(root node)\n * ├ --- RowHeadersRenderer\n * ├ \\\n * ├ \\\n * ├ - CellsRenderer\n * ├ /\n * └ /.\n *\n * @class {CellsRenderer}\n */\n\nvar CellsRenderer = /*#__PURE__*/function (_BaseRenderer) {\n _inherits(CellsRenderer, _BaseRenderer);\n\n var _super = _createSuper(CellsRenderer);\n\n function CellsRenderer() {\n var _this;\n\n _classCallCheck(this, CellsRenderer);\n\n _this = _super.call(this, 'TD');\n /**\n * Cache for OrderView classes connected to specified node.\n *\n * @type {WeakMap}\n */\n\n _this.orderViews = new WeakMap();\n /**\n * Row index which specifies the row position of the processed cell.\n *\n * @type {number}\n */\n\n _this.sourceRowIndex = 0;\n return _this;\n }\n /**\n * Obtains the instance of the SharedOrderView class which is responsible for rendering the nodes to the root node.\n *\n * @param {HTMLTableRowElement} rootNode The TR element, which is root element for cells (TD).\n * @returns {SharedOrderView}\n */\n\n\n _createClass(CellsRenderer, [{\n key: \"obtainOrderView\",\n value: function obtainOrderView(rootNode) {\n var _this2 = this;\n\n var orderView;\n\n if (this.orderViews.has(rootNode)) {\n orderView = this.orderViews.get(rootNode);\n } else {\n orderView = new SharedOrderView(rootNode, function (sourceColumnIndex) {\n return _this2.nodesPool.obtain(_this2.sourceRowIndex, sourceColumnIndex);\n }, this.nodeType);\n this.orderViews.set(rootNode, orderView);\n }\n\n return orderView;\n }\n /**\n * Renders the cells.\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this$table = this.table,\n rowsToRender = _this$table.rowsToRender,\n columnsToRender = _this$table.columnsToRender,\n rows = _this$table.rows,\n rowHeaders = _this$table.rowHeaders;\n\n for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {\n var sourceRowIndex = this.table.renderedRowToSource(visibleRowIndex);\n var TR = rows.getRenderedNode(visibleRowIndex);\n this.sourceRowIndex = sourceRowIndex;\n var orderView = this.obtainOrderView(TR);\n var rowHeadersView = rowHeaders.obtainOrderView(TR); // @TODO(perf-tip): For cells other than \"visual 0\" generating diff leads/commands can be skipped. New order view\n // shoule share state between next orderViews.\n\n orderView.prependView(rowHeadersView).setSize(columnsToRender).setOffset(this.table.renderedColumnToSource(0)).start();\n\n for (var visibleColumnIndex = 0; visibleColumnIndex < columnsToRender; visibleColumnIndex++) {\n orderView.render();\n var TD = orderView.getCurrentNode();\n var sourceColumnIndex = this.table.renderedColumnToSource(visibleColumnIndex);\n\n if (!hasClass(TD, 'hide')) {\n // Workaround for hidden columns plugin\n TD.className = '';\n }\n\n TD.removeAttribute('style');\n this.table.cellRenderer(sourceRowIndex, sourceColumnIndex, TD);\n }\n\n orderView.end();\n }\n }\n }]);\n\n return CellsRenderer;\n}(BaseRenderer);\n\nexport { CellsRenderer as default };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n/**\n * TableRenderer class collects all renderers and properties necessary for table creation. It's\n * responsible for adjusting and rendering each renderer.\n *\n * Below is a diagram of the renderers together with an indication of what they are responisble for.\n * \n * \\ (root node)\n * \\\n * \\___ ColGroupRenderer\n * /\n * /\n * /\n * \\ (root node)\n * \\\n * \\\n * \\____ ColumnHeadersRenderer\n * /\n * /\n * /\n * /\n * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\\ (root node)\n * (root node) \\\n * --- RowHeadersRenderer\n * \\ \\\n * -- CellsRenderer \\\n * / \\\n * \\\n * (root node) \\\n * --- RowHeadersRenderer \\\n * \\ \\___ RowsRenderer\n * -- CellsRenderer /\n * / /\n * /\n * (root node) /\n * --- RowHeadersRenderer /\n * \\ /\n * -- CellsRenderer /\n * / /\n * /\n * ___________________/\n *
.\n *\n * @class {RowsRenderer}\n */\n\n\nvar TableRenderer = /*#__PURE__*/function () {\n function TableRenderer(rootNode) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n cellRenderer = _ref.cellRenderer;\n\n _classCallCheck(this, TableRenderer);\n /**\n * Table element which will be used to render the children element.\n *\n * @type {HTMLTableElement}\n */\n\n\n this.rootNode = rootNode;\n /**\n * Document owner of the root node.\n *\n * @type {HTMLDocument}\n */\n\n this.rootDocument = this.rootNode.ownerDocument;\n /**\n * Renderer class responsible for rendering row headers.\n *\n * @type {RowsRenderer}\n */\n\n this.rowHeaders = null;\n /**\n * Renderer class responsible for rendering column headers.\n *\n * @type {ColumnHeadersRenderer}\n */\n\n this.columnHeaders = null;\n /**\n * Renderer class responsible for rendering col in colgroup.\n *\n * @type {ColGroupRenderer}\n */\n\n this.colGroup = null;\n /**\n * Renderer class responsible for rendering rows in tbody.\n *\n * @type {RowsRenderer}\n */\n\n this.rows = null;\n /**\n * Renderer class responsible for rendering cells.\n *\n * @type {CellsRenderer}\n */\n\n this.cells = null;\n /**\n * Row filter which contains all necessary information about row index transformation.\n *\n * @type {RowFilter}\n */\n\n this.rowFilter = null;\n /**\n * Column filter which contains all necessary information about column index transformation.\n *\n * @type {ColumnFilter}\n */\n\n this.columnFilter = null;\n /**\n * Row utils class which contains all necessary information about sizes of the rows.\n *\n * @type {RowUtils}\n */\n\n this.rowUtils = null;\n /**\n * Column utils class which contains all necessary information about sizes of the columns.\n *\n * @type {ColumnUtils}\n */\n\n this.columnUtils = null;\n /**\n * Indicates how much rows should be rendered to fill whole table viewport.\n *\n * @type {number}\n */\n\n this.rowsToRender = 0;\n /**\n * Indicates how much columns should be rendered to fill whole table viewport.\n *\n * @type {number}\n */\n\n this.columnsToRender = 0;\n /**\n * An array of functions to be used as a content factory to row headers.\n *\n * @type {Function[]}\n */\n\n this.rowHeaderFunctions = [];\n /**\n * Count of the function used to render row headers.\n *\n * @type {number}\n */\n\n this.rowHeadersCount = 0;\n /**\n * An array of functions to be used as a content factory to column headers.\n *\n * @type {Function[]}\n */\n\n this.columnHeaderFunctions = [];\n /**\n * Count of the function used to render column headers.\n *\n * @type {number}\n */\n\n this.columnHeadersCount = 0;\n /**\n * Cell renderer used to render cells content.\n *\n * @type {Function}\n */\n\n this.cellRenderer = cellRenderer;\n }\n /**\n * Set row and column util classes.\n *\n * @param {RowUtils} rowUtils RowUtils instance which provides useful methods related to row sizes.\n * @param {ColumnUtils} columnUtils ColumnUtils instance which provides useful methods related to row sizes.\n */\n\n\n _createClass(TableRenderer, [{\n key: \"setAxisUtils\",\n value: function setAxisUtils(rowUtils, columnUtils) {\n this.rowUtils = rowUtils;\n this.columnUtils = columnUtils;\n }\n /**\n * Sets viewport size of the table.\n *\n * @param {number} rowsCount An amount of rows to render.\n * @param {number} columnsCount An amount of columns to render.\n */\n\n }, {\n key: \"setViewportSize\",\n value: function setViewportSize(rowsCount, columnsCount) {\n this.rowsToRender = rowsCount;\n this.columnsToRender = columnsCount;\n }\n /**\n * Sets row and column filter instances.\n *\n * @param {RowFilter} rowFilter Row filter instance which contains all necessary information about row index transformation.\n * @param {ColumnFilter} columnFilter Cokumn filter instance which contains all necessary information about row index transformation.\n */\n\n }, {\n key: \"setFilters\",\n value: function setFilters(rowFilter, columnFilter) {\n this.rowFilter = rowFilter;\n this.columnFilter = columnFilter;\n }\n /**\n * Sets row and column header functions.\n *\n * @param {Function[]} rowHeaders Row header functions. Factories for creating content for row headers.\n * @param {Function[]} columnHeaders Column header functions. Factories for creating content for column headers.\n */\n\n }, {\n key: \"setHeaderContentRenderers\",\n value: function setHeaderContentRenderers(rowHeaders, columnHeaders) {\n this.rowHeaderFunctions = rowHeaders;\n this.rowHeadersCount = rowHeaders.length;\n this.columnHeaderFunctions = columnHeaders;\n this.columnHeadersCount = columnHeaders.length;\n }\n /**\n * Sets table renderers.\n *\n * @param {renderers} renderers The renderer units.\n * @param {RowHeadersRenderer} renderers.rowHeaders Row headers renderer.\n * @param {ColumnHeadersRenderer} renderers.columnHeaders Column headers renderer.\n * @param {ColGroupRenderer} renderers.colGroup Col group renderer.\n * @param {RowsRenderer} renderers.rows Rows renderer.\n * @param {CellsRenderer} renderers.cells Cells renderer.\n */\n\n }, {\n key: \"setRenderers\",\n value: function setRenderers() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n rowHeaders = _ref2.rowHeaders,\n columnHeaders = _ref2.columnHeaders,\n colGroup = _ref2.colGroup,\n rows = _ref2.rows,\n cells = _ref2.cells;\n\n rowHeaders.setTable(this);\n columnHeaders.setTable(this);\n colGroup.setTable(this);\n rows.setTable(this);\n cells.setTable(this);\n this.rowHeaders = rowHeaders;\n this.columnHeaders = columnHeaders;\n this.colGroup = colGroup;\n this.rows = rows;\n this.cells = cells;\n }\n /**\n * Transforms visual/rendered row index to source index.\n *\n * @param {number} rowIndex Rendered index.\n * @returns {number}\n */\n\n }, {\n key: \"renderedRowToSource\",\n value: function renderedRowToSource(rowIndex) {\n return this.rowFilter.renderedToSource(rowIndex);\n }\n /**\n * Transforms visual/rendered column index to source index.\n *\n * @param {number} columnIndex Rendered index.\n * @returns {number}\n */\n\n }, {\n key: \"renderedColumnToSource\",\n value: function renderedColumnToSource(columnIndex) {\n return this.columnFilter.renderedToSource(columnIndex);\n }\n /**\n * Renders the table.\n */\n\n }, {\n key: \"render\",\n value: function render() {\n this.colGroup.adjust();\n this.columnHeaders.adjust();\n this.rows.adjust();\n this.rowHeaders.adjust();\n this.columnHeaders.render();\n this.rows.render();\n this.rowHeaders.render();\n this.cells.render(); // After the cells are rendered calculate columns width (or columns stretch width) to prepare proper values\n // for colGroup renderer (which renders COL elements).\n\n this.columnUtils.calculateWidths();\n this.colGroup.render();\n var rowsToRender = this.rowsToRender,\n rows = this.rows; // Fix for multi-line content and for supporting `rowHeights` option.\n\n for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {\n var TR = rows.getRenderedNode(visibleRowIndex);\n\n if (TR.firstChild) {\n var sourceRowIndex = this.renderedRowToSource(visibleRowIndex);\n var rowHeight = this.rowUtils.getHeight(sourceRowIndex);\n\n if (rowHeight) {\n // Decrease height. 1 pixel will be \"replaced\" by 1px border top\n TR.firstChild.style.height = \"\".concat(rowHeight - 1, \"px\");\n } else {\n TR.firstChild.style.height = '';\n }\n }\n }\n }\n }]);\n\n return TableRenderer;\n}();\n\nexport { TableRenderer as default };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport RowHeadersRenderer from \"./rowHeaders.mjs\";\nimport ColumnHeadersRenderer from \"./columnHeaders.mjs\";\nimport ColGroupRenderer from \"./colGroup.mjs\";\nimport RowsRenderer from \"./rows.mjs\";\nimport CellsRenderer from \"./cells.mjs\";\nimport TableRenderer from \"./table.mjs\";\n/**\n * Content renderer.\n *\n * @class Renderer\n */\n\nvar Renderer = /*#__PURE__*/function () {\n function Renderer() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n TABLE = _ref.TABLE,\n THEAD = _ref.THEAD,\n COLGROUP = _ref.COLGROUP,\n TBODY = _ref.TBODY,\n rowUtils = _ref.rowUtils,\n columnUtils = _ref.columnUtils,\n cellRenderer = _ref.cellRenderer;\n\n _classCallCheck(this, Renderer);\n /**\n * General renderer class used to render Walkontable content on screen.\n *\n * @type {TableRenderer}\n */\n\n\n this.renderer = new TableRenderer(TABLE, {\n cellRenderer: cellRenderer\n });\n this.renderer.setRenderers({\n rowHeaders: new RowHeadersRenderer(),\n columnHeaders: new ColumnHeadersRenderer(THEAD),\n colGroup: new ColGroupRenderer(COLGROUP),\n rows: new RowsRenderer(TBODY),\n cells: new CellsRenderer()\n });\n this.renderer.setAxisUtils(rowUtils, columnUtils);\n }\n /**\n * Sets filter calculators for newly calculated row and column position. The filters are used to transform visual\n * indexes (0 to N) to source indexes provided by Handsontable.\n *\n * @param {RowFilter} rowFilter The row filter instance.\n * @param {ColumnFilter} columnFilter The column filter instance.\n * @returns {Renderer}\n */\n\n\n _createClass(Renderer, [{\n key: \"setFilters\",\n value: function setFilters(rowFilter, columnFilter) {\n this.renderer.setFilters(rowFilter, columnFilter);\n return this;\n }\n /**\n * Sets the viewport size of the rendered table.\n *\n * @param {number} rowsCount An amount of rows to render.\n * @param {number} columnsCount An amount of columns to render.\n * @returns {Renderer}\n */\n\n }, {\n key: \"setViewportSize\",\n value: function setViewportSize(rowsCount, columnsCount) {\n this.renderer.setViewportSize(rowsCount, columnsCount);\n return this;\n }\n /**\n * Sets row and column header functions.\n *\n * @param {Function[]} rowHeaders Row header functions. Factories for creating content for row headers.\n * @param {Function[]} columnHeaders Column header functions. Factories for creating content for column headers.\n * @returns {Renderer}\n */\n\n }, {\n key: \"setHeaderContentRenderers\",\n value: function setHeaderContentRenderers(rowHeaders, columnHeaders) {\n this.renderer.setHeaderContentRenderers(rowHeaders, columnHeaders);\n return this;\n }\n /**\n * Adjusts the table (preparing for render).\n */\n\n }, {\n key: \"adjust\",\n value: function adjust() {\n this.renderer.adjust();\n }\n /**\n * Renders the table.\n */\n\n }, {\n key: \"render\",\n value: function render() {\n this.renderer.render();\n }\n }]);\n\n return Renderer;\n}();\n\nexport { RowHeadersRenderer, ColumnHeadersRenderer, ColGroupRenderer, RowsRenderer, CellsRenderer, TableRenderer, Renderer };","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { getScrollbarWidth } from \"./../../../../helpers/dom/element.mjs\";\n/**\n * Column utils class contains all necessary information about sizes of the columns.\n *\n * @class {ColumnUtils}\n */\n\nvar ColumnUtils = /*#__PURE__*/function () {\n function ColumnUtils(wot) {\n _classCallCheck(this, ColumnUtils);\n\n this.wot = wot;\n this.headerWidths = new Map();\n }\n /**\n * Returns column width based on passed source index.\n *\n * @param {number} sourceIndex Column source index.\n * @returns {number}\n */\n\n\n _createClass(ColumnUtils, [{\n key: \"getWidth\",\n value: function getWidth(sourceIndex) {\n var width = this.wot.wtSettings.settings.columnWidth;\n\n if (typeof width === 'function') {\n width = width(sourceIndex);\n } else if (_typeof(width) === 'object') {\n width = width[sourceIndex];\n }\n\n return width || this.wot.wtSettings.settings.defaultColumnWidth;\n }\n /**\n * Returns stretched column width based on passed source index.\n *\n * @param {number} sourceIndex Column source index.\n * @returns {number}\n */\n\n }, {\n key: \"getStretchedColumnWidth\",\n value: function getStretchedColumnWidth(sourceIndex) {\n var columnWidth = this.getWidth(sourceIndex);\n var calculator = this.wot.wtViewport.columnsRenderCalculator;\n var width = columnWidth !== null && columnWidth !== void 0 ? columnWidth : this.wot.wtSettings.settings.defaultColumnWidth;\n\n if (calculator) {\n var stretchedWidth = calculator.getStretchedColumnWidth(sourceIndex, width);\n\n if (stretchedWidth) {\n width = stretchedWidth;\n }\n }\n\n return width;\n }\n /**\n * Returns column header height based on passed header level.\n *\n * @param {number} level Column header level.\n * @returns {number}\n */\n\n }, {\n key: \"getHeaderHeight\",\n value: function getHeaderHeight(level) {\n var height = this.wot.wtSettings.settings.defaultRowHeight;\n var oversizedHeight = this.wot.wtViewport.oversizedColumnHeaders[level];\n\n if (oversizedHeight !== void 0) {\n height = height ? Math.max(height, oversizedHeight) : oversizedHeight;\n }\n\n return height;\n }\n /**\n * Returns column header width based on passed source index.\n *\n * @param {number} sourceIndex Column source index.\n * @returns {number}\n */\n\n }, {\n key: \"getHeaderWidth\",\n value: function getHeaderWidth(sourceIndex) {\n return this.headerWidths.get(this.wot.wtTable.columnFilter.sourceToRendered(sourceIndex));\n }\n /**\n * Calculates column header widths that can be retrieved from the cache.\n */\n\n }, {\n key: \"calculateWidths\",\n value: function calculateWidths() {\n var wot = this.wot;\n var wtTable = wot.wtTable,\n wtViewport = wot.wtViewport,\n cloneSource = wot.cloneSource;\n var mainHolder = cloneSource ? cloneSource.wtTable.holder : wtTable.holder;\n var scrollbarCompensation = mainHolder.offsetHeight < mainHolder.scrollHeight ? getScrollbarWidth() : 0;\n var rowHeaderWidthSetting = wot.getSetting('rowHeaderWidth');\n wtViewport.columnsRenderCalculator.refreshStretching(wtViewport.getViewportWidth() - scrollbarCompensation);\n rowHeaderWidthSetting = wot.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);\n\n if (rowHeaderWidthSetting !== null && rowHeaderWidthSetting !== void 0) {\n var rowHeadersCount = wot.getSetting('rowHeaders').length;\n var defaultColumnWidth = wot.getSetting('defaultColumnWidth');\n\n for (var visibleColumnIndex = 0; visibleColumnIndex < rowHeadersCount; visibleColumnIndex++) {\n var width = Array.isArray(rowHeaderWidthSetting) ? rowHeaderWidthSetting[visibleColumnIndex] : rowHeaderWidthSetting;\n width = width === null || width === void 0 ? defaultColumnWidth : width;\n this.headerWidths.set(visibleColumnIndex, width);\n }\n }\n }\n }]);\n\n return ColumnUtils;\n}();\n\nexport { ColumnUtils as default };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n/**\n * Row utils class contains all necessary information about sizes of the rows.\n *\n * @class {RowUtils}\n */\n\n\nvar RowUtils = /*#__PURE__*/function () {\n function RowUtils(wot) {\n _classCallCheck(this, RowUtils);\n\n this.wot = wot;\n }\n /**\n * Returns row height based on passed source index.\n *\n * @param {number} sourceIndex Row source index.\n * @returns {number}\n */\n\n\n _createClass(RowUtils, [{\n key: \"getHeight\",\n value: function getHeight(sourceIndex) {\n var height = this.wot.wtSettings.settings.rowHeight(sourceIndex);\n var oversizedHeight = this.wot.wtViewport.oversizedRows[sourceIndex];\n\n if (oversizedHeight !== void 0) {\n height = height === void 0 ? oversizedHeight : Math.max(height, oversizedHeight);\n }\n\n return height;\n }\n }]);\n\n return RowUtils;\n}();\n\nexport { RowUtils as default };","import \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { hasClass, index, offset, removeClass, removeTextNodes, overlayContainsElement, closest, outerWidth, innerHeight, isVisible as _isVisible } from \"./../../../helpers/dom/element.mjs\";\nimport { isFunction } from \"./../../../helpers/function.mjs\";\nimport CellCoords from \"./cell/coords.mjs\";\nimport ColumnFilter from \"./filter/column.mjs\";\nimport RowFilter from \"./filter/row.mjs\";\nimport { Renderer } from \"./renderer/index.mjs\";\nimport ColumnUtils from \"./utils/column.mjs\";\nimport RowUtils from \"./utils/row.mjs\";\nimport { isOverlayTypeOf } from \"./overlay/registerer.mjs\";\nimport { CLONE_TOP, CLONE_BOTTOM, CLONE_LEFT, CLONE_TOP_LEFT_CORNER, CLONE_BOTTOM_LEFT_CORNER } from \"./overlay/constants.mjs\";\n/**\n *\n */\n\nvar Table = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n * @param {HTMLTableElement} table An element to the Walkontable generated table is injected.\n */\n function Table(wotInstance, table) {\n var _this = this;\n\n _classCallCheck(this, Table);\n /**\n * Indicates if this instance is of type `MasterTable` (i.e. It is NOT an overlay).\n *\n * @type {boolean}\n */\n\n\n this.isMaster = !wotInstance.cloneOverlay; // \"instanceof\" operator isn't used, because it caused a circular reference in Webpack\n\n this.wot = wotInstance; // legacy support\n\n this.instance = this.wot;\n this.TABLE = table;\n this.TBODY = null;\n this.THEAD = null;\n this.COLGROUP = null;\n this.tableOffset = 0;\n this.holderOffset = 0;\n /**\n * Indicates if the table has height bigger than 0px.\n *\n * @type {boolean}\n */\n\n this.hasTableHeight = true;\n /**\n * Indicates if the table has width bigger than 0px.\n *\n * @type {boolean}\n */\n\n this.hasTableWidth = true;\n /**\n * Indicates if the table is visible. By visible, it means that the holder\n * element has CSS 'display' property different than 'none'.\n *\n * @type {boolean}\n */\n\n this.isTableVisible = false;\n removeTextNodes(this.TABLE);\n this.spreader = this.createSpreader(this.TABLE);\n this.hider = this.createHider(this.spreader);\n this.holder = this.createHolder(this.hider);\n this.wtRootElement = this.holder.parentNode;\n\n if (this.isMaster) {\n this.alignOverlaysWithTrimmingContainer();\n }\n\n this.fixTableDomTree();\n this.rowFilter = null;\n this.columnFilter = null;\n this.correctHeaderWidth = false;\n var origRowHeaderWidth = this.wot.wtSettings.settings.rowHeaderWidth; // Fix for jumping row headers (https://github.com/handsontable/handsontable/issues/3850)\n\n this.wot.wtSettings.settings.rowHeaderWidth = function () {\n return _this._modifyRowHeaderWidth(origRowHeaderWidth);\n };\n\n this.rowUtils = new RowUtils(this.wot);\n this.columnUtils = new ColumnUtils(this.wot);\n this.tableRenderer = new Renderer({\n TABLE: this.TABLE,\n THEAD: this.THEAD,\n COLGROUP: this.COLGROUP,\n TBODY: this.TBODY,\n rowUtils: this.rowUtils,\n columnUtils: this.columnUtils,\n cellRenderer: this.wot.wtSettings.settings.cellRenderer\n });\n }\n /**\n * Returns a boolean that is true if this intance of Table represents a specific overlay, identified by the overlay name.\n * For MasterTable, it returns false.\n *\n * @param {string} overlayTypeName The overlay type.\n * @returns {boolean}\n */\n\n\n _createClass(Table, [{\n key: \"is\",\n value: function is(overlayTypeName) {\n return isOverlayTypeOf(this.wot.cloneOverlay, overlayTypeName);\n }\n /**\n *\n */\n\n }, {\n key: \"fixTableDomTree\",\n value: function fixTableDomTree() {\n var rootDocument = this.wot.rootDocument;\n this.TBODY = this.TABLE.querySelector('tbody');\n\n if (!this.TBODY) {\n this.TBODY = rootDocument.createElement('tbody');\n this.TABLE.appendChild(this.TBODY);\n }\n\n this.THEAD = this.TABLE.querySelector('thead');\n\n if (!this.THEAD) {\n this.THEAD = rootDocument.createElement('thead');\n this.TABLE.insertBefore(this.THEAD, this.TBODY);\n }\n\n this.COLGROUP = this.TABLE.querySelector('colgroup');\n\n if (!this.COLGROUP) {\n this.COLGROUP = rootDocument.createElement('colgroup');\n this.TABLE.insertBefore(this.COLGROUP, this.THEAD);\n }\n\n if (this.wot.getSetting('columnHeaders').length && !this.THEAD.childNodes.length) {\n this.THEAD.appendChild(rootDocument.createElement('TR'));\n }\n }\n /**\n * @param {HTMLTableElement} table An element to process.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"createSpreader\",\n value: function createSpreader(table) {\n var parent = table.parentNode;\n var spreader;\n\n if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {\n spreader = this.wot.rootDocument.createElement('div');\n spreader.className = 'wtSpreader';\n\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(spreader, table);\n }\n\n spreader.appendChild(table);\n }\n\n spreader.style.position = 'relative';\n return spreader;\n }\n /**\n * @param {HTMLElement} spreader An element to the hider element is injected.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"createHider\",\n value: function createHider(spreader) {\n var parent = spreader.parentNode;\n var hider;\n\n if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {\n hider = this.wot.rootDocument.createElement('div');\n hider.className = 'wtHider';\n\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(hider, spreader);\n }\n\n hider.appendChild(spreader);\n }\n\n return hider;\n }\n /**\n *\n * @param {HTMLElement} hider An element to the holder element is injected.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"createHolder\",\n value: function createHolder(hider) {\n var parent = hider.parentNode;\n var holder;\n\n if (!parent || parent.nodeType !== Node.ELEMENT_NODE || !hasClass(parent, 'wtHolder')) {\n holder = this.wot.rootDocument.createElement('div');\n holder.style.position = 'relative';\n holder.className = 'wtHolder';\n\n if (parent) {\n // if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it\n parent.insertBefore(holder, hider);\n }\n\n if (this.isMaster) {\n holder.parentNode.className += 'ht_master handsontable';\n }\n\n holder.appendChild(hider);\n }\n\n return holder;\n }\n /**\n * Redraws the table.\n *\n * @param {boolean} [fastDraw=false] If TRUE, will try to avoid full redraw and only update the border positions.\n * If FALSE or UNDEFINED, will perform a full redraw.\n * @returns {Table}\n */\n\n }, {\n key: \"draw\",\n value: function draw() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var wot = this.wot;\n var wtOverlays = wot.wtOverlays,\n wtViewport = wot.wtViewport;\n var totalRows = wot.getSetting('totalRows');\n var totalColumns = wot.getSetting('totalColumns');\n var rowHeaders = wot.getSetting('rowHeaders');\n var rowHeadersCount = rowHeaders.length;\n var columnHeaders = wot.getSetting('columnHeaders');\n var columnHeadersCount = columnHeaders.length;\n var syncScroll = false;\n var runFastDraw = fastDraw;\n\n if (this.isMaster) {\n this.holderOffset = offset(this.holder);\n runFastDraw = wtViewport.createRenderCalculators(runFastDraw);\n\n if (rowHeadersCount && !wot.getSetting('fixedColumnsLeft')) {\n var leftScrollPos = wtOverlays.leftOverlay.getScrollPosition();\n var previousState = this.correctHeaderWidth;\n this.correctHeaderWidth = leftScrollPos > 0;\n\n if (previousState !== this.correctHeaderWidth) {\n runFastDraw = false;\n }\n }\n }\n\n if (this.isMaster) {\n syncScroll = wtOverlays.prepareOverlays();\n }\n\n if (runFastDraw) {\n if (this.isMaster) {\n // in case we only scrolled without redraw, update visible rows information in oldRowsCalculator\n wtViewport.createVisibleCalculators();\n }\n\n if (wtOverlays) {\n wtOverlays.refresh(true);\n }\n } else {\n if (this.isMaster) {\n this.tableOffset = offset(this.TABLE);\n } else {\n this.tableOffset = this.wot.cloneSource.wtTable.tableOffset;\n }\n\n var startRow = totalRows > 0 ? this.getFirstRenderedRow() : 0;\n var startColumn = totalColumns > 0 ? this.getFirstRenderedColumn() : 0;\n this.rowFilter = new RowFilter(startRow, totalRows, columnHeadersCount);\n this.columnFilter = new ColumnFilter(startColumn, totalColumns, rowHeadersCount);\n var performRedraw = true; // Only master table rendering can be skipped\n\n if (this.isMaster) {\n this.alignOverlaysWithTrimmingContainer();\n var skipRender = {};\n this.wot.getSetting('beforeDraw', true, skipRender);\n performRedraw = skipRender.skipRender !== true;\n }\n\n if (performRedraw) {\n this.tableRenderer.setHeaderContentRenderers(rowHeaders, columnHeaders);\n\n if (this.is(CLONE_BOTTOM) || this.is(CLONE_BOTTOM_LEFT_CORNER)) {\n // do NOT render headers on the bottom or bottom-left corner overlay\n this.tableRenderer.setHeaderContentRenderers(rowHeaders, []);\n }\n\n this.resetOversizedRows();\n this.tableRenderer.setViewportSize(this.getRenderedRowsCount(), this.getRenderedColumnsCount()).setFilters(this.rowFilter, this.columnFilter).render();\n var workspaceWidth;\n\n if (this.isMaster) {\n workspaceWidth = this.wot.wtViewport.getWorkspaceWidth();\n this.wot.wtViewport.containerWidth = null;\n this.markOversizedColumnHeaders();\n }\n\n this.adjustColumnHeaderHeights();\n\n if (this.isMaster || this.is(CLONE_BOTTOM)) {\n this.markOversizedRows();\n }\n\n if (this.isMaster) {\n this.wot.wtViewport.createVisibleCalculators();\n this.wot.wtOverlays.refresh(false);\n this.wot.wtOverlays.applyToDOM();\n var hiderWidth = outerWidth(this.hider);\n var tableWidth = outerWidth(this.TABLE);\n\n if (hiderWidth !== 0 && tableWidth !== hiderWidth) {\n // Recalculate the column widths, if width changes made in the overlays removed the scrollbar, thus changing the viewport width.\n this.columnUtils.calculateWidths();\n this.tableRenderer.renderer.colGroup.render();\n }\n\n if (workspaceWidth !== this.wot.wtViewport.getWorkspaceWidth()) {\n // workspace width changed though to shown/hidden vertical scrollbar. Let's reapply stretching\n this.wot.wtViewport.containerWidth = null;\n this.columnUtils.calculateWidths();\n this.tableRenderer.renderer.colGroup.render();\n }\n\n this.wot.getSetting('onDraw', true);\n } else if (this.is(CLONE_BOTTOM)) {\n this.wot.cloneSource.wtOverlays.adjustElementsSize();\n }\n }\n }\n\n if (this.isMaster) {\n var positionChanged = wtOverlays.topOverlay.resetFixedPosition();\n\n if (wtOverlays.bottomOverlay.clone) {\n positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;\n }\n\n positionChanged = wtOverlays.leftOverlay.resetFixedPosition() || positionChanged;\n\n if (wtOverlays.topLeftCornerOverlay) {\n wtOverlays.topLeftCornerOverlay.resetFixedPosition();\n }\n\n if (wtOverlays.bottomLeftCornerOverlay && wtOverlays.bottomLeftCornerOverlay.clone) {\n wtOverlays.bottomLeftCornerOverlay.resetFixedPosition();\n }\n\n if (positionChanged) {\n // It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or\n // remove `innerBorderTop` and `innerBorderLeft` CSS classes to the DOM element. This happens\n // when there is a switch between rendering from 0 to N rows/columns and vice versa).\n wtOverlays.refreshAll();\n wtOverlays.adjustElementsSize();\n }\n }\n\n this.refreshSelections(runFastDraw);\n\n if (syncScroll) {\n wtOverlays.syncScrollWithMaster();\n }\n\n wot.drawn = true;\n return this;\n }\n /**\n * @param {number} col The visual column index.\n */\n\n }, {\n key: \"markIfOversizedColumnHeader\",\n value: function markIfOversizedColumnHeader(col) {\n var sourceColIndex = this.wot.wtTable.columnFilter.renderedToSource(col);\n var level = this.wot.getSetting('columnHeaders').length;\n var defaultRowHeight = this.wot.wtSettings.settings.defaultRowHeight;\n var previousColHeaderHeight;\n var currentHeader;\n var currentHeaderHeight;\n var columnHeaderHeightSetting = this.wot.getSetting('columnHeaderHeight') || [];\n\n while (level) {\n level -= 1;\n previousColHeaderHeight = this.wot.wtTable.getColumnHeaderHeight(level);\n currentHeader = this.wot.wtTable.getColumnHeader(sourceColIndex, level);\n\n if (!currentHeader) {\n /* eslint-disable no-continue */\n continue;\n }\n\n currentHeaderHeight = innerHeight(currentHeader);\n\n if (!previousColHeaderHeight && defaultRowHeight < currentHeaderHeight || previousColHeaderHeight < currentHeaderHeight) {\n this.wot.wtViewport.oversizedColumnHeaders[level] = currentHeaderHeight;\n }\n\n if (Array.isArray(columnHeaderHeightSetting)) {\n if (columnHeaderHeightSetting[level] !== null && columnHeaderHeightSetting[level] !== void 0) {\n this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level];\n }\n } else if (!isNaN(columnHeaderHeightSetting)) {\n this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting;\n }\n\n if (this.wot.wtViewport.oversizedColumnHeaders[level] < (columnHeaderHeightSetting[level] || columnHeaderHeightSetting)) {\n this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level] || columnHeaderHeightSetting; // eslint-disable-line max-len\n }\n }\n }\n /**\n *\n */\n\n }, {\n key: \"adjustColumnHeaderHeights\",\n value: function adjustColumnHeaderHeights() {\n var wot = this.wot;\n var children = wot.wtTable.THEAD.childNodes;\n var oversizedColumnHeaders = wot.wtViewport.oversizedColumnHeaders;\n var columnHeaders = wot.getSetting('columnHeaders');\n\n for (var i = 0, len = columnHeaders.length; i < len; i++) {\n if (oversizedColumnHeaders[i]) {\n if (!children[i] || children[i].childNodes.length === 0) {\n return;\n }\n\n children[i].childNodes[0].style.height = \"\".concat(oversizedColumnHeaders[i], \"px\");\n }\n }\n }\n /**\n * Resets cache of row heights. The cache should be cached for each render cycle in a case\n * when new cell values have content which increases/decreases cell height.\n */\n\n }, {\n key: \"resetOversizedRows\",\n value: function resetOversizedRows() {\n var wot = this.wot;\n\n if (!this.isMaster && !this.is(CLONE_BOTTOM)) {\n return;\n }\n\n if (!wot.getSetting('externalRowCalculator')) {\n var rowsToRender = this.getRenderedRowsCount(); // Reset the oversized row cache for rendered rows\n\n for (var visibleRowIndex = 0; visibleRowIndex < rowsToRender; visibleRowIndex++) {\n var sourceRow = this.rowFilter.renderedToSource(visibleRowIndex);\n\n if (wot.wtViewport.oversizedRows && wot.wtViewport.oversizedRows[sourceRow]) {\n wot.wtViewport.oversizedRows[sourceRow] = void 0;\n }\n }\n }\n }\n /**\n * @param {string} className The CSS class name to remove from the table cells.\n */\n\n }, {\n key: \"removeClassFromCells\",\n value: function removeClassFromCells(className) {\n var nodes = this.TABLE.querySelectorAll(\".\".concat(className));\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n removeClass(nodes[i], className);\n }\n }\n /**\n * Refresh the table selection by re-rendering Selection instances connected with that instance.\n *\n * @param {boolean} fastDraw If fast drawing is enabled than additionally className clearing is applied.\n */\n\n }, {\n key: \"refreshSelections\",\n value: function refreshSelections(fastDraw) {\n var wot = this.wot;\n\n if (!wot.selections) {\n return;\n }\n\n var highlights = Array.from(wot.selections);\n var len = highlights.length;\n\n if (fastDraw) {\n var classesToRemove = [];\n\n for (var i = 0; i < len; i++) {\n var _highlights$i$setting = highlights[i].settings,\n highlightHeaderClassName = _highlights$i$setting.highlightHeaderClassName,\n highlightRowClassName = _highlights$i$setting.highlightRowClassName,\n highlightColumnClassName = _highlights$i$setting.highlightColumnClassName;\n var classNames = highlights[i].classNames;\n var classNamesLength = classNames.length;\n\n for (var j = 0; j < classNamesLength; j++) {\n if (!classesToRemove.includes(classNames[j])) {\n classesToRemove.push(classNames[j]);\n }\n }\n\n if (highlightHeaderClassName && !classesToRemove.includes(highlightHeaderClassName)) {\n classesToRemove.push(highlightHeaderClassName);\n }\n\n if (highlightRowClassName && !classesToRemove.includes(highlightRowClassName)) {\n classesToRemove.push(highlightRowClassName);\n }\n\n if (highlightColumnClassName && !classesToRemove.includes(highlightColumnClassName)) {\n classesToRemove.push(highlightColumnClassName);\n }\n }\n\n var additionalClassesToRemove = wot.getSetting('onBeforeRemoveCellClassNames');\n\n if (Array.isArray(additionalClassesToRemove)) {\n for (var _i = 0; _i < additionalClassesToRemove.length; _i++) {\n classesToRemove.push(additionalClassesToRemove[_i]);\n }\n }\n\n var classesToRemoveLength = classesToRemove.length;\n\n for (var _i2 = 0; _i2 < classesToRemoveLength; _i2++) {\n // there was no rerender, so we need to remove classNames by ourselves\n this.removeClassFromCells(classesToRemove[_i2]);\n }\n }\n\n for (var _i3 = 0; _i3 < len; _i3++) {\n highlights[_i3].draw(wot, fastDraw);\n }\n }\n /**\n * Get cell element at coords.\n * Negative coords.row or coords.col are used to retrieve header cells. If there are multiple header levels, the\n * negative value corresponds to the distance from the working area. For example, when there are 3 levels of column\n * headers, coords.col=-1 corresponds to the most inner header element, while coords.col=-3 corresponds to the\n * outmost header element.\n *\n * In case an element for the coords is not rendered, the method returns an error code.\n * To produce the error code, the input parameters are validated in the order in which they\n * are given. Thus, if both the row and the column coords are out of the rendered bounds,\n * the method returns the error code for the row.\n *\n * @param {CellCoords} coords The cell coordinates.\n * @returns {HTMLElement|number} HTMLElement on success or Number one of the exit codes on error:\n * -1 row before viewport\n * -2 row after viewport\n * -3 column before viewport\n * -4 column after viewport.\n */\n\n }, {\n key: \"getCell\",\n value: function getCell(coords) {\n var row = coords.row;\n var column = coords.col;\n var hookResult = this.wot.getSetting('onModifyGetCellCoords', row, column);\n\n if (hookResult && Array.isArray(hookResult)) {\n var _hookResult = _slicedToArray(hookResult, 2);\n\n row = _hookResult[0];\n column = _hookResult[1];\n }\n\n if (this.isRowBeforeRenderedRows(row)) {\n // row before rendered rows\n return -1;\n } else if (this.isRowAfterRenderedRows(row)) {\n // row after rendered rows\n return -2;\n } else if (this.isColumnBeforeRenderedColumns(column)) {\n // column before rendered columns\n return -3;\n } else if (this.isColumnAfterRenderedColumns(column)) {\n // column after rendered columns\n return -4;\n }\n\n var TR;\n\n if (row < 0) {\n TR = this.THEAD.childNodes[this.rowFilter.sourceRowToVisibleColHeadedRow(row)];\n } else {\n TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];\n }\n\n if (!TR && row >= 0) {\n throw new Error('TR was expected to be rendered but is not');\n }\n\n var TD = TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(column)];\n\n if (!TD && column >= 0) {\n throw new Error('TD or TH was expected to be rendered but is not');\n }\n\n return TD;\n }\n /**\n * GetColumnHeader.\n *\n * @param {number} col Column index.\n * @param {number} [level=0] Header level (0 = most distant to the table).\n * @returns {object} HTMLElement on success or undefined on error.\n */\n\n }, {\n key: \"getColumnHeader\",\n value: function getColumnHeader(col) {\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var TR = this.THEAD.childNodes[level];\n\n if (TR) {\n return TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(col)];\n }\n }\n /**\n * GetRowHeader.\n *\n * @param {number} row Row index.\n * @returns {HTMLElement} HTMLElement on success or Number one of the exit codes on error: `null table doesn't have row headers`.\n */\n\n }, {\n key: \"getRowHeader\",\n value: function getRowHeader(row) {\n if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {\n return null;\n }\n\n var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];\n\n if (TR) {\n return TR.childNodes[0];\n }\n }\n /**\n * Returns cell coords object for a given TD (or a child element of a TD element).\n *\n * @param {HTMLTableCellElement} TD A cell DOM element (or a child of one).\n * @returns {CellCoords|null} The coordinates of the provided TD element (or the closest TD element) or null, if the provided element is not applicable.\n */\n\n }, {\n key: \"getCoords\",\n value: function getCoords(TD) {\n var cellElement = TD;\n\n if (cellElement.nodeName !== 'TD' && cellElement.nodeName !== 'TH') {\n cellElement = closest(cellElement, ['TD', 'TH']);\n }\n\n if (cellElement === null) {\n return null;\n }\n\n var TR = cellElement.parentNode;\n var CONTAINER = TR.parentNode;\n var row = index(TR);\n var col = cellElement.cellIndex;\n\n if (overlayContainsElement(CLONE_TOP_LEFT_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_TOP, cellElement, this.wtRootElement)) {\n if (CONTAINER.nodeName === 'THEAD') {\n row -= CONTAINER.childNodes.length;\n }\n } else if (overlayContainsElement(CLONE_BOTTOM_LEFT_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_BOTTOM, cellElement, this.wtRootElement)) {\n var totalRows = this.wot.getSetting('totalRows');\n row = totalRows - CONTAINER.childNodes.length + row;\n } else if (CONTAINER === this.THEAD) {\n row = this.rowFilter.visibleColHeadedRowToSourceRow(row);\n } else {\n row = this.rowFilter.renderedToSource(row);\n }\n\n if (overlayContainsElement(CLONE_TOP_LEFT_CORNER, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_LEFT, cellElement, this.wtRootElement) || overlayContainsElement(CLONE_BOTTOM_LEFT_CORNER, cellElement, this.wtRootElement)) {\n col = this.columnFilter.offsettedTH(col);\n } else {\n col = this.columnFilter.visibleRowHeadedColumnToSourceColumn(col);\n }\n\n return new CellCoords(row, col);\n }\n /**\n * Check if any of the rendered rows is higher than expected, and if so, cache them.\n */\n\n }, {\n key: \"markOversizedRows\",\n value: function markOversizedRows() {\n if (this.wot.getSetting('externalRowCalculator')) {\n return;\n }\n\n var rowCount = this.TBODY.childNodes.length;\n var expectedTableHeight = rowCount * this.wot.wtSettings.settings.defaultRowHeight;\n var actualTableHeight = innerHeight(this.TBODY) - 1;\n var previousRowHeight;\n var rowInnerHeight;\n var sourceRowIndex;\n var currentTr;\n var rowHeader;\n\n if (expectedTableHeight === actualTableHeight && !this.wot.getSetting('fixedRowsBottom')) {\n // If the actual table height equals rowCount * default single row height, no row is oversized -> no need to iterate over them\n return;\n }\n\n while (rowCount) {\n rowCount -= 1;\n sourceRowIndex = this.rowFilter.renderedToSource(rowCount);\n previousRowHeight = this.getRowHeight(sourceRowIndex);\n currentTr = this.getTrForRow(sourceRowIndex);\n rowHeader = currentTr.querySelector('th');\n\n if (rowHeader) {\n rowInnerHeight = innerHeight(rowHeader);\n } else {\n rowInnerHeight = innerHeight(currentTr) - 1;\n }\n\n if (!previousRowHeight && this.wot.wtSettings.settings.defaultRowHeight < rowInnerHeight || previousRowHeight < rowInnerHeight) {\n rowInnerHeight += 1;\n this.wot.wtViewport.oversizedRows[sourceRowIndex] = rowInnerHeight;\n }\n }\n }\n /**\n * @param {number} row The visual row index.\n * @returns {HTMLTableElement}\n */\n\n }, {\n key: \"getTrForRow\",\n value: function getTrForRow(row) {\n return this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];\n }\n /**\n * Checks if the column index (negative value from -1 to N) is rendered.\n *\n * @param {number} column The column index (negative value from -1 to N).\n * @returns {boolean}\n */\n\n }, {\n key: \"isColumnHeaderRendered\",\n value: function isColumnHeaderRendered(column) {\n if (column >= 0) {\n return false;\n }\n\n var rowHeaders = this.wot.getSetting('rowHeaders');\n var rowHeadersCount = rowHeaders.length;\n return Math.abs(column) <= rowHeadersCount;\n }\n /**\n * Checks if the row index (negative value from -1 to N) is rendered.\n *\n * @param {number} row The row index (negative value from -1 to N).\n * @returns {boolean}\n */\n\n }, {\n key: \"isRowHeaderRendered\",\n value: function isRowHeaderRendered(row) {\n if (row >= 0) {\n return false;\n }\n\n var columnHeaders = this.wot.getSetting('columnHeaders');\n var columnHeadersCount = columnHeaders.length;\n return Math.abs(row) <= columnHeadersCount;\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * Check if the given row index is lower than the index of the first row that\n * is currently rendered and return TRUE in that case, or FALSE otherwise.\n *\n * Negative row index is used to check the columns' headers.\n *\n * Headers\n * +--------------+ │\n * -3 │ │ │ │ │\n * +--------------+ │\n * -2 │ │ │ │ │ TRUE\n * +--------------+ │\n * -1 │ │ │ │ │\n * Cells +==================+ │\n * 0 ┇ ┇ ┇ ┇ <--- For fixedRowsTop: 1 │\n * +--------------+ the master overlay do ---+ first rendered row (index 1)\n * 1 │ A2 │ B2 │ C2 │ not render the first row. │\n * +--------------+ │ FALSE\n * 2 │ A3 │ B3 │ C3 │ │\n * +--------------+ ---+ last rendered row\n * │\n * │ FALSE\n *\n * @param {number} row The visual row index.\n * @memberof Table#\n * @function isRowBeforeRenderedRows\n * @returns {boolean}\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"isRowBeforeRenderedRows\",\n value: function isRowBeforeRenderedRows(row) {\n var first = this.getFirstRenderedRow(); // Check the headers only in case when the first rendered row is -1 or 0.\n // This is an indication that the overlay is placed on the most top position.\n\n if (row < 0 && first <= 0) {\n return !this.isRowHeaderRendered(row);\n }\n\n return row < first;\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * Check if the given column index is greater than the index of the last column that\n * is currently rendered and return TRUE in that case, or FALSE otherwise.\n *\n * The negative row index is used to check the columns' headers. However,\n * keep in mind that for negative indexes, the method always returns FALSE as\n * it is not possible to render headers partially. The \"after\" index can not be\n * lower than -1.\n *\n * Headers\n * +--------------+ │\n * -3 │ │ │ │ │\n * +--------------+ │\n * -2 │ │ │ │ │ FALSE\n * +--------------+ │\n * -1 │ │ │ │ │\n * Cells +==================+ │\n * 0 ┇ ┇ ┇ ┇ <--- For fixedRowsTop: 1 │\n * +--------------+ the master overlay do ---+ first rendered row (index 1)\n * 1 │ A2 │ B2 │ C2 │ not render the first rows │\n * +--------------+ │ FALSE\n * 2 │ A3 │ B3 │ C3 │ │\n * +--------------+ ---+ last rendered row\n * │\n * │ TRUE\n *\n * @param {number} row The visual row index.\n * @memberof Table#\n * @function isRowAfterRenderedRows\n * @returns {boolean}\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"isRowAfterRenderedRows\",\n value: function isRowAfterRenderedRows(row) {\n return row > this.getLastRenderedRow();\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * Check if the given column index is lower than the index of the first column that\n * is currently rendered and return TRUE in that case, or FALSE otherwise.\n *\n * Negative column index is used to check the rows' headers.\n *\n * For fixedColumnsLeft: 1 the master overlay\n * do not render this first columns.\n * Headers -3 -2 -1 |\n * +----+----+----║┄ ┄ +------+------+\n * │ │ │ ║ │ B1 │ C1 │\n * +--------------║┄ ┄ --------------│\n * │ │ │ ║ │ B2 │ C2 │\n * +--------------║┄ ┄ --------------│\n * │ │ │ ║ │ B3 │ C3 │\n * +----+----+----║┄ ┄ +------+------+\n * ╷ ╷\n * -------------------------+-------------+---------------->\n * TRUE first FALSE last FALSE\n * rendered rendered\n * column column\n *\n * @param {number} column The visual column index.\n * @memberof Table#\n * @function isColumnBeforeRenderedColumns\n * @returns {boolean}\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"isColumnBeforeRenderedColumns\",\n value: function isColumnBeforeRenderedColumns(column) {\n var first = this.getFirstRenderedColumn(); // Check the headers only in case when the first rendered column is -1 or 0.\n // This is an indication that the overlay is placed on the most left position.\n\n if (column < 0 && first <= 0) {\n return !this.isColumnHeaderRendered(column);\n }\n\n return column < first;\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * Check if the given column index is greater than the index of the last column that\n * is currently rendered and return TRUE in that case, or FALSE otherwise.\n *\n * The negative column index is used to check the rows' headers. However,\n * keep in mind that for negative indexes, the method always returns FALSE as\n * it is not possible to render headers partially. The \"after\" index can not be\n * lower than -1.\n *\n * For fixedColumnsLeft: 1 the master overlay\n * do not render this first columns.\n * Headers -3 -2 -1 |\n * +----+----+----║┄ ┄ +------+------+\n * │ │ │ ║ │ B1 │ C1 │\n * +--------------║┄ ┄ --------------│\n * │ │ │ ║ │ B2 │ C2 │\n * +--------------║┄ ┄ --------------│\n * │ │ │ ║ │ B3 │ C3 │\n * +----+----+----║┄ ┄ +------+------+\n * ╷ ╷\n * -------------------------+-------------+---------------->\n * FALSE first FALSE last TRUE\n * rendered rendered\n * column column\n *\n * @param {number} column The visual column index.\n * @memberof Table#\n * @function isColumnAfterRenderedColumns\n * @returns {boolean}\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"isColumnAfterRenderedColumns\",\n value: function isColumnAfterRenderedColumns(column) {\n return this.columnFilter && column > this.getLastRenderedColumn();\n }\n }, {\n key: \"isColumnAfterViewport\",\n value: function isColumnAfterViewport(column) {\n return this.columnFilter && column > this.getLastVisibleColumn();\n }\n }, {\n key: \"isRowAfterViewport\",\n value: function isRowAfterViewport(row) {\n return this.rowFilter && row > this.getLastVisibleRow();\n }\n }, {\n key: \"isColumnBeforeViewport\",\n value: function isColumnBeforeViewport(column) {\n return this.columnFilter && this.columnFilter.sourceToRendered(column) < 0 && column >= 0;\n }\n }, {\n key: \"isLastRowFullyVisible\",\n value: function isLastRowFullyVisible() {\n return this.getLastVisibleRow() === this.getLastRenderedRow();\n }\n }, {\n key: \"isLastColumnFullyVisible\",\n value: function isLastColumnFullyVisible() {\n return this.getLastVisibleColumn() === this.getLastRenderedColumn();\n }\n }, {\n key: \"allRowsInViewport\",\n value: function allRowsInViewport() {\n return this.wot.getSetting('totalRows') === this.getVisibleRowsCount();\n }\n }, {\n key: \"allColumnsInViewport\",\n value: function allColumnsInViewport() {\n return this.wot.getSetting('totalColumns') === this.getVisibleColumnsCount();\n }\n /**\n * Checks if any of the row's cells content exceeds its initial height, and if so, returns the oversized height.\n *\n * @param {number} sourceRow The physical row index.\n * @returns {number}\n */\n\n }, {\n key: \"getRowHeight\",\n value: function getRowHeight(sourceRow) {\n return this.rowUtils.getHeight(sourceRow);\n }\n /**\n * @param {number} level The column level.\n * @returns {number}\n */\n\n }, {\n key: \"getColumnHeaderHeight\",\n value: function getColumnHeaderHeight(level) {\n return this.columnUtils.getHeaderHeight(level);\n }\n /**\n * @param {number} sourceColumn The physical column index.\n * @returns {number}\n */\n\n }, {\n key: \"getColumnWidth\",\n value: function getColumnWidth(sourceColumn) {\n return this.columnUtils.getWidth(sourceColumn);\n }\n /**\n * @param {number} sourceColumn The physical column index.\n * @returns {number}\n */\n\n }, {\n key: \"getStretchedColumnWidth\",\n value: function getStretchedColumnWidth(sourceColumn) {\n return this.columnUtils.getStretchedColumnWidth(sourceColumn);\n }\n /**\n * Checks if the table has defined size. It returns `true` when the table has width and height\n * set bigger than `0px`.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"hasDefinedSize\",\n value: function hasDefinedSize() {\n return this.hasTableHeight && this.hasTableWidth;\n }\n /**\n * Checks if the table is visible. It returns `true` when the holder element (or its parents)\n * has CSS 'display' property different than 'none'.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isVisible\",\n value: function isVisible() {\n return _isVisible(this.TABLE);\n }\n /**\n * Modify row header widths provided by user in class contructor.\n *\n * @private\n * @param {Function} rowHeaderWidthFactory The function which can provide default width values for rows..\n * @returns {number}\n */\n\n }, {\n key: \"_modifyRowHeaderWidth\",\n value: function _modifyRowHeaderWidth(rowHeaderWidthFactory) {\n var widths = isFunction(rowHeaderWidthFactory) ? rowHeaderWidthFactory() : null;\n\n if (Array.isArray(widths)) {\n widths = _toConsumableArray(widths);\n widths[widths.length - 1] = this._correctRowHeaderWidth(widths[widths.length - 1]);\n } else {\n widths = this._correctRowHeaderWidth(widths);\n }\n\n return widths;\n }\n /**\n * Correct row header width if necessary.\n *\n * @private\n * @param {number} width The width to process.\n * @returns {number}\n */\n\n }, {\n key: \"_correctRowHeaderWidth\",\n value: function _correctRowHeaderWidth(width) {\n var rowHeaderWidth = width;\n\n if (typeof width !== 'number') {\n rowHeaderWidth = this.wot.getSetting('defaultColumnWidth');\n }\n\n if (this.correctHeaderWidth) {\n rowHeaderWidth += 1;\n }\n\n return rowHeaderWidth;\n }\n }]);\n\n return Table;\n}();\n\nexport default Table;","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'stickyRowsBottom';\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to rows.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use sticky rendering of the bottom rows in the vertical axis.\n *\n * @type {object}\n */\n\nvar stickyRowsBottom = {\n /**\n * Get the source index of the first rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getFirstRenderedRow: function getFirstRenderedRow() {\n var totalRows = this.wot.getSetting('totalRows');\n var fixedRowsBottom = this.wot.getSetting('fixedRowsBottom');\n var index = totalRows - fixedRowsBottom;\n\n if (totalRows === 0 || fixedRowsBottom === 0) {\n return -1;\n }\n\n if (index < 0) {\n return 0;\n }\n\n return index;\n },\n\n /**\n * Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n */\n getFirstVisibleRow: function getFirstVisibleRow() {\n return this.getFirstRenderedRow();\n },\n\n /**\n * Get the source index of the last rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getLastRenderedRow: function getLastRenderedRow() {\n return this.wot.getSetting('totalRows') - 1;\n },\n\n /**\n * Get the source index of the last row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n */\n getLastVisibleRow: function getLastVisibleRow() {\n return this.getLastRenderedRow();\n },\n\n /**\n * Get the number of rendered rows.\n *\n * @returns {number}\n */\n getRenderedRowsCount: function getRenderedRowsCount() {\n var totalRows = this.wot.getSetting('totalRows');\n return Math.min(this.wot.getSetting('fixedRowsBottom'), totalRows);\n },\n\n /**\n * Get the number of fully visible rows in the viewport.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n */\n getVisibleRowsCount: function getVisibleRowsCount() {\n return this.getRenderedRowsCount();\n }\n};\ndefineGetter(stickyRowsBottom, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default stickyRowsBottom;","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'stickyColumnsLeft';\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to columns.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use sticky rendering of the first columns in the horizontal axis.\n *\n * @type {object}\n */\n\nvar stickyColumnsLeft = {\n /**\n * Get the source index of the first rendered column. If no columns are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getFirstRenderedColumn: function getFirstRenderedColumn() {\n var totalColumns = this.wot.getSetting('totalColumns');\n\n if (totalColumns === 0) {\n return -1;\n }\n\n return 0;\n },\n\n /**\n * Get the source index of the first column fully visible in the viewport. If no columns are fully visible, returns an error code: -1.\n * Assumes that all rendered columns are fully visible.\n *\n * @returns {number}\n */\n getFirstVisibleColumn: function getFirstVisibleColumn() {\n return this.getFirstRenderedColumn();\n },\n\n /**\n * Get the source index of the last rendered column. If no columns are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getLastRenderedColumn: function getLastRenderedColumn() {\n return this.getRenderedColumnsCount() - 1;\n },\n\n /**\n * Get the source index of the last column fully visible in the viewport. If no columns are fully visible, returns an error code: -1.\n * Assumes that all rendered columns are fully visible.\n *\n * @returns {number}\n */\n getLastVisibleColumn: function getLastVisibleColumn() {\n return this.getLastRenderedColumn();\n },\n\n /**\n * Get the number of rendered columns.\n *\n * @returns {number}\n */\n getRenderedColumnsCount: function getRenderedColumnsCount() {\n var totalColumns = this.wot.getSetting('totalColumns');\n return Math.min(this.wot.getSetting('fixedColumnsLeft'), totalColumns);\n },\n\n /**\n * Get the number of fully visible columns in the viewport.\n * Assumes that all rendered columns are fully visible.\n *\n * @returns {number}\n */\n getVisibleColumnsCount: function getVisibleColumnsCount() {\n return this.getRenderedColumnsCount();\n }\n};\ndefineGetter(stickyColumnsLeft, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default stickyColumnsLeft;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport Table from \"../table.mjs\";\nimport stickyRowsBottom from \"./mixin/stickyRowsBottom.mjs\";\nimport stickyColumnsLeft from \"./mixin/stickyColumnsLeft.mjs\";\nimport { mixin } from \"./../../../../helpers/object.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to BottomLeftCornerOverlay, implemented through mixins.\n */\n\nvar BottomLeftCornerOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(BottomLeftCornerOverlayTable, _Table);\n\n var _super = _createSuper(BottomLeftCornerOverlayTable);\n\n function BottomLeftCornerOverlayTable() {\n _classCallCheck(this, BottomLeftCornerOverlayTable);\n\n return _super.apply(this, arguments);\n }\n\n return BottomLeftCornerOverlayTable;\n}(Table);\n\nmixin(BottomLeftCornerOverlayTable, stickyRowsBottom);\nmixin(BottomLeftCornerOverlayTable, stickyColumnsLeft);\nexport default BottomLeftCornerOverlayTable;","import \"core-js/modules/es.array.index-of.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { getScrollableElement, getTrimmingContainer } from \"./../../../../helpers/dom/element.mjs\";\nimport { defineGetter } from \"./../../../../helpers/object.mjs\";\nimport { arrayEach } from \"./../../../../helpers/array.mjs\";\nimport { warn } from \"./../../../../helpers/console.mjs\";\nimport EventManager from \"./../../../../eventManager.mjs\";\nimport { CLONE_TYPES, CLONE_TOP, CLONE_LEFT } from \"./constants.mjs\";\n/**\n * Creates an overlay over the original Walkontable instance. The overlay renders the clone of the original Walkontable\n * and (optionally) implements behavior needed for native horizontal and vertical scrolling.\n *\n * @class Overlay\n */\n\nexport var Overlay = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n function Overlay(wotInstance) {\n _classCallCheck(this, Overlay);\n\n defineGetter(this, 'wot', wotInstance, {\n writable: false\n });\n var _this$wot$wtTable = this.wot.wtTable,\n TABLE = _this$wot$wtTable.TABLE,\n hider = _this$wot$wtTable.hider,\n spreader = _this$wot$wtTable.spreader,\n holder = _this$wot$wtTable.holder,\n wtRootElement = _this$wot$wtTable.wtRootElement; // legacy support, deprecated in the future\n\n this.instance = this.wot;\n this.type = '';\n this.mainTableScrollableElement = null;\n this.TABLE = TABLE;\n this.hider = hider;\n this.spreader = spreader;\n this.holder = holder;\n this.wtRootElement = wtRootElement;\n this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);\n this.updateStateOfRendering();\n }\n /**\n * Update internal state of object with an information about the need of full rendering of the overlay.\n *\n * @returns {boolean} Returns `true` if the state has changed since the last check.\n */\n\n\n _createClass(Overlay, [{\n key: \"updateStateOfRendering\",\n value: function updateStateOfRendering() {\n var previousState = this.needFullRender;\n this.needFullRender = this.shouldBeRendered();\n var changed = previousState !== this.needFullRender;\n\n if (changed && !this.needFullRender) {\n this.reset();\n }\n\n return changed;\n }\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return true;\n }\n /**\n * Update the trimming container.\n */\n\n }, {\n key: \"updateTrimmingContainer\",\n value: function updateTrimmingContainer() {\n this.trimmingContainer = getTrimmingContainer(this.hider.parentNode.parentNode);\n }\n /**\n * Update the main scrollable element.\n */\n\n }, {\n key: \"updateMainScrollableElement\",\n value: function updateMainScrollableElement() {\n var _this$wot = this.wot,\n wtTable = _this$wot.wtTable,\n rootWindow = _this$wot.rootWindow;\n\n if (rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden') {\n this.mainTableScrollableElement = this.wot.wtTable.holder;\n } else {\n this.mainTableScrollableElement = getScrollableElement(wtTable.TABLE);\n }\n }\n /**\n * Calculates coordinates of the provided element, relative to the root Handsontable element.\n * NOTE: The element needs to be a child of the overlay in order for the method to work correctly.\n *\n * @param {HTMLElement} element The cell element to calculate the position for.\n * @param {number} rowIndex Visual row index.\n * @param {number} columnIndex Visual column index.\n * @returns {{top: number, left: number}|undefined}\n */\n\n }, {\n key: \"getRelativeCellPosition\",\n value: function getRelativeCellPosition(element, rowIndex, columnIndex) {\n if (this.clone.wtTable.holder.contains(element) === false) {\n warn(\"The provided element is not a child of the \".concat(this.type, \" overlay\"));\n return;\n }\n\n var windowScroll = this.mainTableScrollableElement === this.wot.rootWindow;\n var fixedColumn = columnIndex < this.wot.getSetting('fixedColumnsLeft');\n var fixedRowTop = rowIndex < this.wot.getSetting('fixedRowsTop');\n var fixedRowBottom = rowIndex >= this.wot.getSetting('totalRows') - this.wot.getSetting('fixedRowsBottom');\n var spreaderOffset = {\n left: this.clone.wtTable.spreader.offsetLeft,\n top: this.clone.wtTable.spreader.offsetTop\n };\n var elementOffset = {\n left: element.offsetLeft,\n top: element.offsetTop\n };\n var offsetObject = null;\n\n if (windowScroll) {\n offsetObject = this.getRelativeCellPositionWithinWindow(fixedRowTop, fixedColumn, elementOffset, spreaderOffset);\n } else {\n offsetObject = this.getRelativeCellPositionWithinHolder(fixedRowTop, fixedRowBottom, fixedColumn, elementOffset, spreaderOffset);\n }\n\n return offsetObject;\n }\n /**\n * Calculates coordinates of the provided element, relative to the root Handsontable element within a table with window\n * as a scrollable element.\n *\n * @private\n * @param {boolean} onFixedRowTop `true` if the coordinates point to a place within the top fixed rows.\n * @param {boolean} onFixedColumn `true` if the coordinates point to a place within the fixed columns.\n * @param {number} elementOffset Offset position of the cell element.\n * @param {number} spreaderOffset Offset position of the spreader element.\n * @returns {{top: number, left: number}}\n */\n\n }, {\n key: \"getRelativeCellPositionWithinWindow\",\n value: function getRelativeCellPositionWithinWindow(onFixedRowTop, onFixedColumn, elementOffset, spreaderOffset) {\n var absoluteRootElementPosition = this.wot.wtTable.wtRootElement.getBoundingClientRect();\n var horizontalOffset = 0;\n var verticalOffset = 0;\n\n if (!onFixedColumn) {\n horizontalOffset = spreaderOffset.left;\n } else {\n horizontalOffset = absoluteRootElementPosition.left <= 0 ? -1 * absoluteRootElementPosition.left : 0;\n }\n\n if (onFixedRowTop) {\n var absoluteOverlayPosition = this.clone.wtTable.TABLE.getBoundingClientRect();\n verticalOffset = absoluteOverlayPosition.top - absoluteRootElementPosition.top;\n } else {\n verticalOffset = spreaderOffset.top;\n }\n\n return {\n left: elementOffset.left + horizontalOffset,\n top: elementOffset.top + verticalOffset\n };\n }\n /**\n * Calculates coordinates of the provided element, relative to the root Handsontable element within a table with window\n * as a scrollable element.\n *\n * @private\n * @param {boolean} onFixedRowTop `true` if the coordinates point to a place within the top fixed rows.\n * @param {boolean} onFixedRowBottom `true` if the coordinates point to a place within the bottom fixed rows.\n * @param {boolean} onFixedColumn `true` if the coordinates point to a place within the fixed columns.\n * @param {number} elementOffset Offset position of the cell element.\n * @param {number} spreaderOffset Offset position of the spreader element.\n * @returns {{top: number, left: number}}\n */\n\n }, {\n key: \"getRelativeCellPositionWithinHolder\",\n value: function getRelativeCellPositionWithinHolder(onFixedRowTop, onFixedRowBottom, onFixedColumn, elementOffset, spreaderOffset) {\n var tableScrollPosition = {\n horizontal: this.clone.cloneSource.wtOverlays.leftOverlay.getScrollPosition(),\n vertical: this.clone.cloneSource.wtOverlays.topOverlay.getScrollPosition()\n };\n var horizontalOffset = 0;\n var verticalOffset = 0;\n\n if (!onFixedColumn) {\n horizontalOffset = tableScrollPosition.horizontal - spreaderOffset.left;\n }\n\n if (onFixedRowBottom) {\n var absoluteRootElementPosition = this.wot.wtTable.wtRootElement.getBoundingClientRect();\n var absoluteOverlayPosition = this.clone.wtTable.TABLE.getBoundingClientRect();\n verticalOffset = absoluteOverlayPosition.top * -1 + absoluteRootElementPosition.top;\n } else if (!onFixedRowTop) {\n verticalOffset = tableScrollPosition.vertical - spreaderOffset.top;\n }\n\n return {\n left: elementOffset.left - horizontalOffset,\n top: elementOffset.top - verticalOffset\n };\n }\n /**\n * Make a clone of table for overlay.\n *\n * @param {string} direction Can be `Overlay.CLONE_TOP`, `Overlay.CLONE_LEFT`,\n * `Overlay.CLONE_TOP_LEFT_CORNER`.\n * @returns {Walkontable}\n */\n\n }, {\n key: \"makeClone\",\n value: function makeClone(direction) {\n if (CLONE_TYPES.indexOf(direction) === -1) {\n throw new Error(\"Clone type \\\"\".concat(direction, \"\\\" is not supported.\"));\n }\n\n var _this$wot2 = this.wot,\n wtTable = _this$wot2.wtTable,\n rootDocument = _this$wot2.rootDocument,\n rootWindow = _this$wot2.rootWindow;\n var clone = rootDocument.createElement('DIV');\n var clonedTable = rootDocument.createElement('TABLE');\n var tableParent = wtTable.wtRootElement.parentNode;\n clone.className = \"ht_clone_\".concat(direction, \" handsontable\");\n clone.style.position = 'absolute';\n clone.style.top = 0;\n clone.style.left = 0;\n clone.style.overflow = 'visible';\n clonedTable.className = wtTable.TABLE.className;\n clone.appendChild(clonedTable);\n this.type = direction;\n tableParent.appendChild(clone);\n var preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (preventOverflow === true || preventOverflow === 'horizontal' && this.type === CLONE_TOP || preventOverflow === 'vertical' && this.type === CLONE_LEFT) {\n this.mainTableScrollableElement = rootWindow;\n } else if (rootWindow.getComputedStyle(tableParent).getPropertyValue('overflow') === 'hidden') {\n this.mainTableScrollableElement = wtTable.holder;\n } else {\n this.mainTableScrollableElement = getScrollableElement(wtTable.TABLE);\n } // Create a new instance of the Walkontable class\n\n\n return new this.wot.constructor({\n cloneSource: this.wot,\n cloneOverlay: this,\n table: clonedTable\n });\n }\n /**\n * Refresh/Redraw overlay.\n *\n * @param {boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering\n * the data. It will only work if Table.draw() does not force\n * rendering anyway.\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; // When hot settings are changed we allow to refresh overlay once before blocking\n\n var nextCycleRenderFlag = this.shouldBeRendered();\n\n if (this.clone && (this.needFullRender || nextCycleRenderFlag)) {\n this.clone.draw(fastDraw);\n }\n\n this.needFullRender = nextCycleRenderFlag;\n }\n /**\n * Reset overlay styles to initial values.\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n if (!this.clone) {\n return;\n }\n\n var holder = this.clone.wtTable.holder;\n var hider = this.clone.wtTable.hider;\n var holderStyle = holder.style;\n var hidderStyle = hider.style;\n var rootStyle = holder.parentNode.style;\n arrayEach([holderStyle, hidderStyle, rootStyle], function (style) {\n style.width = '';\n style.height = '';\n });\n }\n /**\n * Destroy overlay instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n new EventManager(this.clone).destroy();\n }\n }]);\n\n return Overlay;\n}();","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { getScrollbarWidth, outerHeight, outerWidth, resetCssTransform } from \"./../../../../helpers/dom/element.mjs\";\nimport BottomLeftCornerOverlayTable from \"./../table/bottomLeftCorner.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_BOTTOM_LEFT_CORNER } from \"./constants.mjs\";\n/**\n * @class TopLeftCornerOverlay\n */\n\nexport var BottomLeftCornerOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(BottomLeftCornerOverlay, _Overlay);\n\n var _super = _createSuper(BottomLeftCornerOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n\n\n function BottomLeftCornerOverlay(wotInstance) {\n var _this;\n\n _classCallCheck(this, BottomLeftCornerOverlay);\n\n _this = _super.call(this, wotInstance);\n _this.clone = _this.makeClone(CLONE_BOTTOM_LEFT_CORNER);\n return _this;\n }\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {Table}\n */\n\n\n _createClass(BottomLeftCornerOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _construct(BottomLeftCornerOverlayTable, args);\n }\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n var wot = this.wot;\n return wot.getSetting('shouldRenderBottomOverlay') && wot.getSetting('shouldRenderLeftOverlay');\n }\n /**\n * Updates the corner overlay position.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n var wot = this.wot;\n this.updateTrimmingContainer();\n\n if (!wot.wtTable.holder.parentNode) {\n // removed from DOM\n return;\n }\n\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n overlayRoot.style.top = '';\n\n if (this.trimmingContainer === wot.rootWindow) {\n var _this$wot = this.wot,\n rootDocument = _this$wot.rootDocument,\n wtTable = _this$wot.wtTable;\n var hiderRect = wtTable.hider.getBoundingClientRect();\n var bottom = Math.ceil(hiderRect.bottom);\n var left = Math.ceil(hiderRect.left);\n var bodyHeight = rootDocument.documentElement.clientHeight;\n var finalLeft;\n var finalBottom;\n\n if (left < 0) {\n finalLeft = -left;\n } else {\n finalLeft = 0;\n }\n\n if (bottom > bodyHeight) {\n finalBottom = bottom - bodyHeight;\n } else {\n finalBottom = 0;\n }\n\n finalBottom += 'px';\n finalLeft += 'px';\n overlayRoot.style.left = finalLeft;\n overlayRoot.style.bottom = finalBottom;\n } else {\n resetCssTransform(overlayRoot);\n this.repositionOverlay();\n }\n\n var tableHeight = outerHeight(this.clone.wtTable.TABLE);\n var tableWidth = outerWidth(this.clone.wtTable.TABLE);\n\n if (!this.wot.wtTable.hasDefinedSize()) {\n tableHeight = 0;\n }\n\n overlayRoot.style.height = \"\".concat(tableHeight, \"px\");\n overlayRoot.style.width = \"\".concat(tableWidth, \"px\");\n return false;\n }\n /**\n * Reposition the overlay.\n */\n\n }, {\n key: \"repositionOverlay\",\n value: function repositionOverlay() {\n var _this$wot2 = this.wot,\n wtTable = _this$wot2.wtTable,\n rootDocument = _this$wot2.rootDocument;\n var cloneRoot = this.clone.wtTable.holder.parentNode;\n var scrollbarWidth = getScrollbarWidth(rootDocument);\n\n if (wtTable.holder.clientHeight === wtTable.holder.offsetHeight) {\n scrollbarWidth = 0;\n }\n\n cloneRoot.style.bottom = \"\".concat(scrollbarWidth, \"px\");\n }\n }], [{\n key: \"OVERLAY_NAME\",\n get: function get() {\n return CLONE_BOTTOM_LEFT_CORNER;\n }\n }]);\n\n return BottomLeftCornerOverlay;\n}(Overlay);","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'calculatedColumns';\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to columns.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use virtual rendering in the horizontal axis.\n *\n * @type {object}\n */\n\nvar calculatedColumns = {\n /**\n * Get the source index of the first rendered column. If no columns are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getFirstRenderedColumn: function getFirstRenderedColumn() {\n var startColumn = this.wot.wtViewport.columnsRenderCalculator.startColumn;\n\n if (startColumn === null) {\n return -1;\n }\n\n return startColumn;\n },\n\n /**\n * Get the source index of the first column fully visible in the viewport. If no columns are fully visible, returns an error code: -1.\n *\n * @returns {number}\n */\n getFirstVisibleColumn: function getFirstVisibleColumn() {\n var startColumn = this.wot.wtViewport.columnsVisibleCalculator.startColumn;\n\n if (startColumn === null) {\n return -1;\n }\n\n return startColumn;\n },\n\n /**\n * Get the source index of the last rendered column. If no columns are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getLastRenderedColumn: function getLastRenderedColumn() {\n var endColumn = this.wot.wtViewport.columnsRenderCalculator.endColumn;\n\n if (endColumn === null) {\n return -1;\n }\n\n return endColumn;\n },\n\n /**\n * Get the source index of the last column fully visible in the viewport. If no columns are fully visible, returns an error code: -1.\n *\n * @returns {number}\n */\n getLastVisibleColumn: function getLastVisibleColumn() {\n var endColumn = this.wot.wtViewport.columnsVisibleCalculator.endColumn;\n\n if (endColumn === null) {\n return -1;\n }\n\n return endColumn;\n },\n\n /**\n * Get the number of rendered columns.\n *\n * @returns {number}\n */\n getRenderedColumnsCount: function getRenderedColumnsCount() {\n return this.wot.wtViewport.columnsRenderCalculator.count;\n },\n\n /**\n * Get the number of fully visible columns in the viewport.\n *\n * @returns {number}\n */\n getVisibleColumnsCount: function getVisibleColumnsCount() {\n return this.wot.wtViewport.columnsVisibleCalculator.count;\n }\n};\ndefineGetter(calculatedColumns, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default calculatedColumns;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport Table from \"../table.mjs\";\nimport stickyRowsBottom from \"./mixin/stickyRowsBottom.mjs\";\nimport calculatedColumns from \"./mixin/calculatedColumns.mjs\";\nimport { mixin } from \"./../../../../helpers/object.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to BottomOverlay, implemented through mixins.\n */\n\nvar BottomOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(BottomOverlayTable, _Table);\n\n var _super = _createSuper(BottomOverlayTable);\n\n function BottomOverlayTable() {\n _classCallCheck(this, BottomOverlayTable);\n\n return _super.apply(this, arguments);\n }\n\n return BottomOverlayTable;\n}(Table);\n\nmixin(BottomOverlayTable, stickyRowsBottom);\nmixin(BottomOverlayTable, calculatedColumns);\nexport default BottomOverlayTable;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass } from \"./../../../../helpers/dom/element.mjs\";\nimport BottomOverlayTable from \"./../table/bottom.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_BOTTOM } from \"./constants.mjs\";\n/**\n * @class BottomOverlay\n */\n\nexport var BottomOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(BottomOverlay, _Overlay);\n\n var _super = _createSuper(BottomOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n\n\n function BottomOverlay(wotInstance) {\n var _this;\n\n _classCallCheck(this, BottomOverlay);\n\n _this = _super.call(this, wotInstance);\n\n _defineProperty(_assertThisInitialized(_this), \"cachedFixedRowsBottom\", -1);\n\n _this.clone = _this.makeClone(CLONE_BOTTOM);\n _this.cachedFixedRowsBottom = _this.wot.getSetting('fixedRowsBottom');\n return _this;\n }\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {Table}\n */\n\n\n _createClass(BottomOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _construct(BottomOverlayTable, args);\n }\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return this.wot.getSetting('shouldRenderBottomOverlay');\n }\n /**\n * Updates the top overlay position.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n if (!this.needFullRender || !this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return;\n }\n\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n overlayRoot.style.top = '';\n var headerPosition = 0;\n var preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer === this.wot.rootWindow && (!preventOverflow || preventOverflow !== 'vertical')) {\n var _this$wot = this.wot,\n rootDocument = _this$wot.rootDocument,\n wtTable = _this$wot.wtTable;\n var hiderRect = wtTable.hider.getBoundingClientRect();\n var bottom = Math.ceil(hiderRect.bottom);\n var bodyHeight = rootDocument.documentElement.clientHeight;\n var finalLeft;\n var finalBottom;\n finalLeft = wtTable.hider.style.left;\n finalLeft = finalLeft === '' ? 0 : finalLeft;\n\n if (bottom > bodyHeight) {\n finalBottom = bottom - bodyHeight;\n } else {\n finalBottom = 0;\n }\n\n headerPosition = finalBottom;\n finalBottom += 'px';\n overlayRoot.style.left = finalLeft;\n overlayRoot.style.bottom = finalBottom;\n } else {\n headerPosition = this.getScrollPosition();\n this.repositionOverlay();\n }\n\n var positionChanged = this.adjustHeaderBordersPosition(headerPosition);\n this.adjustElementsSize();\n return positionChanged;\n }\n /**\n * Updates the bottom overlay position.\n */\n\n }, {\n key: \"repositionOverlay\",\n value: function repositionOverlay() {\n var _this$wot2 = this.wot,\n wtTable = _this$wot2.wtTable,\n rootDocument = _this$wot2.rootDocument;\n var cloneRoot = this.clone.wtTable.holder.parentNode;\n var scrollbarWidth = getScrollbarWidth(rootDocument);\n\n if (wtTable.holder.clientHeight === wtTable.holder.offsetHeight) {\n scrollbarWidth = 0;\n }\n\n cloneRoot.style.bottom = \"\".concat(scrollbarWidth, \"px\");\n }\n /**\n * Sets the main overlay's vertical scroll position.\n *\n * @param {number} pos The scroll position.\n * @returns {boolean}\n */\n\n }, {\n key: \"setScrollPosition\",\n value: function setScrollPosition(pos) {\n var rootWindow = this.wot.rootWindow;\n var result = false;\n\n if (this.mainTableScrollableElement === rootWindow) {\n rootWindow.scrollTo(getWindowScrollLeft(rootWindow), pos);\n result = true;\n } else if (this.mainTableScrollableElement.scrollTop !== pos) {\n this.mainTableScrollableElement.scrollTop = pos;\n result = true;\n }\n\n return result;\n }\n /**\n * Triggers onScroll hook callback.\n */\n\n }, {\n key: \"onScroll\",\n value: function onScroll() {\n this.wot.getSetting('onScrollHorizontally');\n }\n /**\n * Calculates total sum cells height.\n *\n * @param {number} from Row index which calculates started from.\n * @param {number} to Row index where calculation is finished.\n * @returns {number} Height sum.\n */\n\n }, {\n key: \"sumCellSizes\",\n value: function sumCellSizes(from, to) {\n var _this$wot3 = this.wot,\n wtTable = _this$wot3.wtTable,\n wtSettings = _this$wot3.wtSettings;\n var defaultRowHeight = wtSettings.settings.defaultRowHeight;\n var row = from;\n var sum = 0;\n\n while (row < to) {\n var height = wtTable.getRowHeight(row);\n sum += height === void 0 ? defaultRowHeight : height;\n row += 1;\n }\n\n return sum;\n }\n /**\n * Adjust overlay root element, childs and master table element sizes (width, height).\n *\n * @param {boolean} [force=false] When `true`, it adjusts the DOM nodes sizes for that overlay.\n */\n\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.updateTrimmingContainer();\n\n if (this.needFullRender || force) {\n this.adjustRootElementSize();\n this.adjustRootChildrenSize();\n }\n }\n /**\n * Adjust overlay root element size (width and height).\n */\n\n }, {\n key: \"adjustRootElementSize\",\n value: function adjustRootElementSize() {\n var _this$wot4 = this.wot,\n wtTable = _this$wot4.wtTable,\n wtViewport = _this$wot4.wtViewport,\n rootWindow = _this$wot4.rootWindow;\n var scrollbarWidth = getScrollbarWidth(this.wot.rootDocument);\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var overlayRootStyle = overlayRoot.style;\n var preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer !== rootWindow || preventOverflow === 'horizontal') {\n var width = wtViewport.getWorkspaceWidth();\n\n if (this.wot.wtOverlays.hasScrollbarRight) {\n width -= scrollbarWidth;\n }\n\n width = Math.min(width, wtTable.wtRootElement.scrollWidth);\n overlayRootStyle.width = \"\".concat(width, \"px\");\n } else {\n overlayRootStyle.width = '';\n }\n\n this.clone.wtTable.holder.style.width = overlayRootStyle.width;\n var tableHeight = outerHeight(this.clone.wtTable.TABLE);\n\n if (!this.wot.wtTable.hasDefinedSize()) {\n tableHeight = 0;\n }\n\n overlayRootStyle.height = \"\".concat(tableHeight, \"px\");\n }\n /**\n * Adjust overlay root childs size.\n */\n\n }, {\n key: \"adjustRootChildrenSize\",\n value: function adjustRootChildrenSize() {\n var holder = this.clone.wtTable.holder;\n this.clone.wtTable.hider.style.width = this.hider.style.width;\n holder.style.width = holder.parentNode.style.width;\n holder.style.height = holder.parentNode.style.height;\n }\n /**\n * Adjust the overlay dimensions and position.\n */\n\n }, {\n key: \"applyToDOM\",\n value: function applyToDOM() {\n var total = this.wot.getSetting('totalRows');\n\n if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {\n this.spreader.style.top = \"\".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition, \"px\");\n } else if (total === 0) {\n // can happen if there are 0 rows\n this.spreader.style.top = '0';\n } else {\n throw new Error('Incorrect value of the rowsRenderCalculator');\n }\n\n this.spreader.style.bottom = '';\n\n if (this.needFullRender) {\n this.syncOverlayOffset();\n }\n }\n /**\n * Synchronize calculated left position to an element.\n */\n\n }, {\n key: \"syncOverlayOffset\",\n value: function syncOverlayOffset() {\n if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {\n this.clone.wtTable.spreader.style.left = \"\".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition, \"px\");\n } else {\n this.clone.wtTable.spreader.style.left = '';\n }\n }\n /**\n * Scrolls vertically to a row.\n *\n * @param {number} sourceRow Row index which you want to scroll to.\n * @param {boolean} [bottomEdge=false] If `true`, scrolls according to the bottom edge (top edge is by default).\n */\n\n }, {\n key: \"scrollTo\",\n value: function scrollTo(sourceRow, bottomEdge) {\n var newY = this.getTableParentOffset();\n var sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;\n var mainHolder = sourceInstance.wtTable.holder;\n var scrollbarCompensation = 0;\n\n if (bottomEdge && mainHolder.offsetHeight !== mainHolder.clientHeight) {\n scrollbarCompensation = getScrollbarWidth(this.wot.rootDocument);\n }\n\n if (bottomEdge) {\n newY += this.sumCellSizes(0, sourceRow + 1);\n newY -= this.wot.wtViewport.getViewportHeight(); // Fix 1 pixel offset when cell is selected\n\n newY += 1;\n } else {\n newY += this.sumCellSizes(this.wot.getSetting('fixedRowsBottom'), sourceRow);\n }\n\n newY += scrollbarCompensation;\n this.setScrollPosition(newY);\n }\n /**\n * Gets table parent top position.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getTableParentOffset\",\n value: function getTableParentOffset() {\n if (this.mainTableScrollableElement === this.wot.rootWindow) {\n return this.wot.wtTable.holderOffset.top;\n }\n\n return 0;\n }\n /**\n * Gets the main overlay's vertical scroll position.\n *\n * @returns {number} Main table's vertical scroll position.\n */\n\n }, {\n key: \"getScrollPosition\",\n value: function getScrollPosition() {\n return getScrollTop(this.mainTableScrollableElement, this.wot.rootWindow);\n }\n /**\n * Adds css classes to hide the header border's header (cell-selection border hiding issue).\n *\n * @param {number} position Header Y position if trimming container is window or scroll top if not.\n * @returns {boolean}\n */\n\n }, {\n key: \"adjustHeaderBordersPosition\",\n value: function adjustHeaderBordersPosition(position) {\n var fixedRowsBottom = this.wot.getSetting('fixedRowsBottom');\n var areFixedRowsBottomChanged = this.cachedFixedRowsBottom !== fixedRowsBottom;\n var columnHeaders = this.wot.getSetting('columnHeaders');\n var positionChanged = false;\n\n if ((areFixedRowsBottomChanged || fixedRowsBottom === 0) && columnHeaders.length > 0) {\n var masterParent = this.wot.wtTable.holder.parentNode;\n var previousState = hasClass(masterParent, 'innerBorderBottom');\n this.cachedFixedRowsBottom = this.wot.getSetting('fixedRowsBottom');\n\n if (position || this.wot.getSetting('totalRows') === 0) {\n addClass(masterParent, 'innerBorderBottom');\n positionChanged = !previousState;\n } else {\n removeClass(masterParent, 'innerBorderBottom');\n positionChanged = previousState;\n }\n }\n\n return positionChanged;\n }\n }], [{\n key: \"OVERLAY_NAME\",\n get: function get() {\n return CLONE_BOTTOM;\n }\n /**\n * Cached value which holds the previous value of the `fixedRowsBottom` option.\n * It is used as a comparison value that can be used to detect changes in that value.\n *\n * @type {number}\n */\n\n }]);\n\n return BottomOverlay;\n}(Overlay);","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'calculatedRows';\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to rows.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use virtual rendering in the vertical axis.\n *\n * @type {object}\n */\n\nvar calculatedRows = {\n /**\n * Get the source index of the first rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getFirstRenderedRow: function getFirstRenderedRow() {\n var startRow = this.wot.wtViewport.rowsRenderCalculator.startRow;\n\n if (startRow === null) {\n return -1;\n }\n\n return startRow;\n },\n\n /**\n * Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n *\n * @returns {number}\n */\n getFirstVisibleRow: function getFirstVisibleRow() {\n var startRow = this.wot.wtViewport.rowsVisibleCalculator.startRow;\n\n if (startRow === null) {\n return -1;\n }\n\n return startRow;\n },\n\n /**\n * Get the source index of the last rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getLastRenderedRow: function getLastRenderedRow() {\n var endRow = this.wot.wtViewport.rowsRenderCalculator.endRow;\n\n if (endRow === null) {\n return -1;\n }\n\n return endRow;\n },\n\n /**\n * Get the source index of the last row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n *\n * @returns {number}\n */\n getLastVisibleRow: function getLastVisibleRow() {\n var endRow = this.wot.wtViewport.rowsVisibleCalculator.endRow;\n\n if (endRow === null) {\n return -1;\n }\n\n return endRow;\n },\n\n /**\n * Get the number of rendered rows.\n *\n * @returns {number}\n */\n getRenderedRowsCount: function getRenderedRowsCount() {\n return this.wot.wtViewport.rowsRenderCalculator.count;\n },\n\n /**\n * Get the number of fully visible rows in the viewport.\n *\n * @returns {number}\n */\n getVisibleRowsCount: function getVisibleRowsCount() {\n return this.wot.wtViewport.rowsVisibleCalculator.count;\n }\n};\ndefineGetter(calculatedRows, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default calculatedRows;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport Table from \"../table.mjs\";\nimport calculatedRows from \"./mixin/calculatedRows.mjs\";\nimport stickyColumnsLeft from \"./mixin/stickyColumnsLeft.mjs\";\nimport { mixin } from \"./../../../../helpers/object.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to LeftOverlay, implemented through mixins.\n */\n\nvar LeftOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(LeftOverlayTable, _Table);\n\n var _super = _createSuper(LeftOverlayTable);\n\n function LeftOverlayTable() {\n _classCallCheck(this, LeftOverlayTable);\n\n return _super.apply(this, arguments);\n }\n\n return LeftOverlayTable;\n}(Table);\n\nmixin(LeftOverlayTable, calculatedRows);\nmixin(LeftOverlayTable, stickyColumnsLeft);\nexport default LeftOverlayTable;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass, getScrollbarWidth, getScrollLeft, getWindowScrollTop, hasClass, outerWidth, removeClass, setOverlayPosition, resetCssTransform } from \"./../../../../helpers/dom/element.mjs\";\nimport LeftOverlayTable from \"./../table/left.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_LEFT } from \"./constants.mjs\";\n/**\n * @class LeftOverlay\n */\n\nexport var LeftOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(LeftOverlay, _Overlay);\n\n var _super = _createSuper(LeftOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n\n\n function LeftOverlay(wotInstance) {\n var _this;\n\n _classCallCheck(this, LeftOverlay);\n\n _this = _super.call(this, wotInstance);\n _this.clone = _this.makeClone(CLONE_LEFT);\n return _this;\n }\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {Table}\n */\n\n\n _createClass(LeftOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _construct(LeftOverlayTable, args);\n }\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return this.wot.getSetting('shouldRenderLeftOverlay');\n }\n /**\n * Updates the left overlay position.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n var wtTable = this.wot.wtTable;\n\n if (!this.needFullRender || !wtTable.holder.parentNode) {\n // removed from DOM\n return;\n }\n\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var headerPosition = 0;\n var preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer === this.wot.rootWindow && (!preventOverflow || preventOverflow !== 'horizontal')) {\n var hiderRect = wtTable.hider.getBoundingClientRect();\n var left = Math.ceil(hiderRect.left);\n var right = Math.ceil(hiderRect.right);\n var finalLeft;\n var finalTop;\n finalTop = wtTable.hider.style.top;\n finalTop = finalTop === '' ? 0 : finalTop;\n\n if (left < 0 && right - overlayRoot.offsetWidth > 0) {\n finalLeft = -left;\n } else {\n finalLeft = 0;\n }\n\n headerPosition = finalLeft;\n finalLeft += 'px';\n setOverlayPosition(overlayRoot, finalLeft, finalTop);\n } else {\n headerPosition = this.getScrollPosition();\n resetCssTransform(overlayRoot);\n }\n\n var positionChanged = this.adjustHeaderBordersPosition(headerPosition);\n this.adjustElementsSize();\n return positionChanged;\n }\n /**\n * Sets the main overlay's horizontal scroll position.\n *\n * @param {number} pos The scroll position.\n * @returns {boolean}\n */\n\n }, {\n key: \"setScrollPosition\",\n value: function setScrollPosition(pos) {\n var rootWindow = this.wot.rootWindow;\n var result = false;\n\n if (this.mainTableScrollableElement === rootWindow && rootWindow.scrollX !== pos) {\n rootWindow.scrollTo(pos, getWindowScrollTop(rootWindow));\n result = true;\n } else if (this.mainTableScrollableElement.scrollLeft !== pos) {\n this.mainTableScrollableElement.scrollLeft = pos;\n result = true;\n }\n\n return result;\n }\n /**\n * Triggers onScroll hook callback.\n */\n\n }, {\n key: \"onScroll\",\n value: function onScroll() {\n this.wot.getSetting('onScrollVertically');\n }\n /**\n * Calculates total sum cells width.\n *\n * @param {number} from Column index which calculates started from.\n * @param {number} to Column index where calculation is finished.\n * @returns {number} Width sum.\n */\n\n }, {\n key: \"sumCellSizes\",\n value: function sumCellSizes(from, to) {\n var defaultColumnWidth = this.wot.wtSettings.defaultColumnWidth;\n var column = from;\n var sum = 0;\n\n while (column < to) {\n sum += this.wot.wtTable.getStretchedColumnWidth(column) || defaultColumnWidth;\n column += 1;\n }\n\n return sum;\n }\n /**\n * Adjust overlay root element, childs and master table element sizes (width, height).\n *\n * @param {boolean} [force=false] When `true`, it adjusts the DOM nodes sizes for that overlay.\n */\n\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.updateTrimmingContainer();\n\n if (this.needFullRender || force) {\n this.adjustRootElementSize();\n this.adjustRootChildrenSize();\n }\n }\n /**\n * Adjust overlay root element size (width and height).\n */\n\n }, {\n key: \"adjustRootElementSize\",\n value: function adjustRootElementSize() {\n var _this$wot = this.wot,\n wtTable = _this$wot.wtTable,\n rootDocument = _this$wot.rootDocument,\n rootWindow = _this$wot.rootWindow;\n var scrollbarHeight = getScrollbarWidth(rootDocument);\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var overlayRootStyle = overlayRoot.style;\n var preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer !== rootWindow || preventOverflow === 'vertical') {\n var height = this.wot.wtViewport.getWorkspaceHeight();\n\n if (this.wot.wtOverlays.hasScrollbarBottom) {\n height -= scrollbarHeight;\n }\n\n height = Math.min(height, wtTable.wtRootElement.scrollHeight);\n overlayRootStyle.height = \"\".concat(height, \"px\");\n } else {\n overlayRootStyle.height = '';\n }\n\n this.clone.wtTable.holder.style.height = overlayRootStyle.height;\n var tableWidth = outerWidth(this.clone.wtTable.TABLE);\n overlayRootStyle.width = \"\".concat(tableWidth, \"px\");\n }\n /**\n * Adjust overlay root childs size.\n */\n\n }, {\n key: \"adjustRootChildrenSize\",\n value: function adjustRootChildrenSize() {\n var _selections$getCell$g;\n\n var holder = this.clone.wtTable.holder;\n var selections = this.wot.selections;\n var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(this.wot).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);\n this.clone.wtTable.hider.style.height = this.hider.style.height;\n holder.style.height = holder.parentNode.style.height; // Add selection corner protruding part to the holder total width to make sure that\n // borders' corner won't be cut after horizontal scroll (#6937).\n\n holder.style.width = \"\".concat(parseInt(holder.parentNode.style.width, 10) + selectionCornerOffset, \"px\");\n }\n /**\n * Adjust the overlay dimensions and position.\n */\n\n }, {\n key: \"applyToDOM\",\n value: function applyToDOM() {\n var total = this.wot.getSetting('totalColumns');\n\n if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {\n this.spreader.style.left = \"\".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition, \"px\");\n } else if (total === 0) {\n this.spreader.style.left = '0';\n } else {\n throw new Error('Incorrect value of the columnsRenderCalculator');\n }\n\n this.spreader.style.right = '';\n\n if (this.needFullRender) {\n this.syncOverlayOffset();\n }\n }\n /**\n * Synchronize calculated top position to an element.\n */\n\n }, {\n key: \"syncOverlayOffset\",\n value: function syncOverlayOffset() {\n if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {\n this.clone.wtTable.spreader.style.top = \"\".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition, \"px\");\n } else {\n this.clone.wtTable.spreader.style.top = '';\n }\n }\n /**\n * Scrolls horizontally to a column at the left edge of the viewport.\n *\n * @param {number} sourceCol Column index which you want to scroll to.\n * @param {boolean} [beyondRendered] If `true`, scrolls according to the bottom\n * edge (top edge is by default).\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollTo\",\n value: function scrollTo(sourceCol, beyondRendered) {\n var newX = this.getTableParentOffset();\n var sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;\n var mainHolder = sourceInstance.wtTable.holder;\n var scrollbarCompensation = 0;\n\n if (beyondRendered && mainHolder.offsetWidth !== mainHolder.clientWidth) {\n scrollbarCompensation = getScrollbarWidth(this.wot.rootDocument);\n }\n\n if (beyondRendered) {\n newX += this.sumCellSizes(0, sourceCol + 1);\n newX -= this.wot.wtViewport.getViewportWidth();\n } else {\n newX += this.sumCellSizes(this.wot.getSetting('fixedColumnsLeft'), sourceCol);\n }\n\n newX += scrollbarCompensation;\n return this.setScrollPosition(newX);\n }\n /**\n * Gets table parent left position.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getTableParentOffset\",\n value: function getTableParentOffset() {\n var preventOverflow = this.wot.getSetting('preventOverflow');\n var offset = 0;\n\n if (!preventOverflow && this.trimmingContainer === this.wot.rootWindow) {\n offset = this.wot.wtTable.holderOffset.left;\n }\n\n return offset;\n }\n /**\n * Gets the main overlay's horizontal scroll position.\n *\n * @returns {number} Main table's vertical scroll position.\n */\n\n }, {\n key: \"getScrollPosition\",\n value: function getScrollPosition() {\n return getScrollLeft(this.mainTableScrollableElement, this.wot.rootWindow);\n }\n /**\n * Adds css classes to hide the header border's header (cell-selection border hiding issue).\n *\n * @param {number} position Header X position if trimming container is window or scroll top if not.\n * @returns {boolean}\n */\n\n }, {\n key: \"adjustHeaderBordersPosition\",\n value: function adjustHeaderBordersPosition(position) {\n var masterParent = this.wot.wtTable.holder.parentNode;\n var rowHeaders = this.wot.getSetting('rowHeaders');\n var fixedColumnsLeft = this.wot.getSetting('fixedColumnsLeft');\n var totalRows = this.wot.getSetting('totalRows');\n\n if (totalRows) {\n removeClass(masterParent, 'emptyRows');\n } else {\n addClass(masterParent, 'emptyRows');\n }\n\n var positionChanged = false;\n\n if (fixedColumnsLeft && !rowHeaders.length) {\n addClass(masterParent, 'innerBorderLeft');\n } else if (!fixedColumnsLeft && rowHeaders.length) {\n var previousState = hasClass(masterParent, 'innerBorderLeft');\n\n if (position) {\n addClass(masterParent, 'innerBorderLeft');\n positionChanged = !previousState;\n } else {\n removeClass(masterParent, 'innerBorderLeft');\n positionChanged = previousState;\n }\n }\n\n return positionChanged;\n }\n }], [{\n key: \"OVERLAY_NAME\",\n get: function get() {\n return CLONE_LEFT;\n }\n }]);\n\n return LeftOverlay;\n}(Overlay);","import { defineGetter } from \"../../../../../helpers/object.mjs\";\nvar MIXIN_NAME = 'stickyRowsTop';\n/**\n * Mixin for the subclasses of `Table` with implementations of\n * helper methods that are related to rows.\n * This mixin is meant to be applied in the subclasses of `Table`\n * that use sticky rendering of the top rows in the vertical axis.\n *\n * @type {object}\n */\n\nvar stickyRowsTop = {\n /**\n * Get the source index of the first rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getFirstRenderedRow: function getFirstRenderedRow() {\n var totalRows = this.wot.getSetting('totalRows');\n\n if (totalRows === 0) {\n return -1;\n }\n\n return 0;\n },\n\n /**\n * Get the source index of the first row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n */\n getFirstVisibleRow: function getFirstVisibleRow() {\n return this.getFirstRenderedRow();\n },\n\n /**\n * Get the source index of the last rendered row. If no rows are rendered, returns an error code: -1.\n *\n * @returns {number}\n */\n getLastRenderedRow: function getLastRenderedRow() {\n return this.getRenderedRowsCount() - 1;\n },\n\n /**\n * Get the source index of the last row fully visible in the viewport. If no rows are fully visible, returns an error code: -1.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n */\n getLastVisibleRow: function getLastVisibleRow() {\n return this.getLastRenderedRow();\n },\n\n /**\n * Get the number of rendered rows.\n *\n * @returns {number}\n */\n getRenderedRowsCount: function getRenderedRowsCount() {\n var totalRows = this.wot.getSetting('totalRows');\n return Math.min(this.wot.getSetting('fixedRowsTop'), totalRows);\n },\n\n /**\n * Get the number of fully visible rows in the viewport.\n * Assumes that all rendered rows are fully visible.\n *\n * @returns {number}\n */\n getVisibleRowsCount: function getVisibleRowsCount() {\n return this.getRenderedRowsCount();\n }\n};\ndefineGetter(stickyRowsTop, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default stickyRowsTop;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport Table from \"../table.mjs\";\nimport stickyRowsTop from \"./mixin/stickyRowsTop.mjs\";\nimport stickyColumnsLeft from \"./mixin/stickyColumnsLeft.mjs\";\nimport { mixin } from \"./../../../../helpers/object.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to TopLeftCornerOverlay, implemented through mixins.\n */\n\nvar TopLeftCornerOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(TopLeftCornerOverlayTable, _Table);\n\n var _super = _createSuper(TopLeftCornerOverlayTable);\n\n function TopLeftCornerOverlayTable() {\n _classCallCheck(this, TopLeftCornerOverlayTable);\n\n return _super.apply(this, arguments);\n }\n\n return TopLeftCornerOverlayTable;\n}(Table);\n\nmixin(TopLeftCornerOverlayTable, stickyRowsTop);\nmixin(TopLeftCornerOverlayTable, stickyColumnsLeft);\nexport default TopLeftCornerOverlayTable;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { outerHeight, outerWidth, setOverlayPosition, resetCssTransform } from \"./../../../../helpers/dom/element.mjs\";\nimport TopLeftCornerOverlayTable from \"./../table/topLeftCorner.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_TOP_LEFT_CORNER } from \"./constants.mjs\";\n/**\n * @class TopLeftCornerOverlay\n */\n\nexport var TopLeftCornerOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(TopLeftCornerOverlay, _Overlay);\n\n var _super = _createSuper(TopLeftCornerOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n\n\n function TopLeftCornerOverlay(wotInstance) {\n var _this;\n\n _classCallCheck(this, TopLeftCornerOverlay);\n\n _this = _super.call(this, wotInstance);\n _this.clone = _this.makeClone(CLONE_TOP_LEFT_CORNER);\n return _this;\n }\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {Table}\n */\n\n\n _createClass(TopLeftCornerOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _construct(TopLeftCornerOverlayTable, args);\n }\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n var wot = this.wot;\n return wot.getSetting('shouldRenderTopOverlay') && wot.getSetting('shouldRenderLeftOverlay');\n }\n /**\n * Updates the corner overlay position.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n this.updateTrimmingContainer();\n\n if (!this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return;\n }\n\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer === this.wot.rootWindow) {\n var wtTable = this.wot.wtTable;\n var hiderRect = wtTable.hider.getBoundingClientRect();\n var top = Math.ceil(hiderRect.top);\n var left = Math.ceil(hiderRect.left);\n var bottom = Math.ceil(hiderRect.bottom);\n var right = Math.ceil(hiderRect.right);\n var finalLeft = '0';\n var finalTop = '0';\n\n if (!preventOverflow || preventOverflow === 'vertical') {\n if (left < 0 && right - overlayRoot.offsetWidth > 0) {\n finalLeft = \"\".concat(-left, \"px\");\n }\n }\n\n if (!preventOverflow || preventOverflow === 'horizontal') {\n if (top < 0 && bottom - overlayRoot.offsetHeight > 0) {\n finalTop = \"\".concat(-top, \"px\");\n }\n }\n\n setOverlayPosition(overlayRoot, finalLeft, finalTop);\n } else {\n resetCssTransform(overlayRoot);\n }\n\n var tableHeight = outerHeight(this.clone.wtTable.TABLE);\n var tableWidth = outerWidth(this.clone.wtTable.TABLE);\n\n if (!this.wot.wtTable.hasDefinedSize()) {\n tableHeight = 0;\n }\n\n overlayRoot.style.height = \"\".concat(tableHeight, \"px\");\n overlayRoot.style.width = \"\".concat(tableWidth, \"px\");\n return false;\n }\n }], [{\n key: \"OVERLAY_NAME\",\n get: function get() {\n return CLONE_TOP_LEFT_CORNER;\n }\n }]);\n\n return TopLeftCornerOverlay;\n}(Overlay);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport Table from \"../table.mjs\";\nimport stickyRowsTop from \"./mixin/stickyRowsTop.mjs\";\nimport calculatedColumns from \"./mixin/calculatedColumns.mjs\";\nimport { mixin } from \"./../../../../helpers/object.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to TopOverlay, implemented through mixins.\n */\n\nvar TopOverlayTable = /*#__PURE__*/function (_Table) {\n _inherits(TopOverlayTable, _Table);\n\n var _super = _createSuper(TopOverlayTable);\n\n function TopOverlayTable() {\n _classCallCheck(this, TopOverlayTable);\n\n return _super.apply(this, arguments);\n }\n\n return TopOverlayTable;\n}(Table);\n\nmixin(TopOverlayTable, stickyRowsTop);\nmixin(TopOverlayTable, calculatedColumns);\nexport default TopOverlayTable;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport { addClass, getScrollbarWidth, getScrollTop, getWindowScrollLeft, hasClass, outerHeight, removeClass, setOverlayPosition, resetCssTransform } from \"./../../../../helpers/dom/element.mjs\";\nimport TopOverlayTable from \"./../table/top.mjs\";\nimport { Overlay } from \"./_base.mjs\";\nimport { CLONE_TOP } from \"./constants.mjs\";\n/**\n * @class TopOverlay\n */\n\nexport var TopOverlay = /*#__PURE__*/function (_Overlay) {\n _inherits(TopOverlay, _Overlay);\n\n var _super = _createSuper(TopOverlay);\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n\n\n function TopOverlay(wotInstance) {\n var _this;\n\n _classCallCheck(this, TopOverlay);\n\n _this = _super.call(this, wotInstance);\n\n _defineProperty(_assertThisInitialized(_this), \"cachedFixedRowsTop\", -1);\n\n _this.clone = _this.makeClone(CLONE_TOP);\n _this.cachedFixedRowsTop = _this.wot.getSetting('fixedRowsTop');\n return _this;\n }\n /**\n * Factory method to create a subclass of `Table` that is relevant to this overlay.\n *\n * @see Table#constructor\n * @param {...*} args Parameters that will be forwarded to the `Table` constructor.\n * @returns {Table}\n */\n\n\n _createClass(TopOverlay, [{\n key: \"createTable\",\n value: function createTable() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _construct(TopOverlayTable, args);\n }\n /**\n * Checks if overlay should be fully rendered.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"shouldBeRendered\",\n value: function shouldBeRendered() {\n return this.wot.getSetting('shouldRenderTopOverlay');\n }\n /**\n * Updates the top overlay position.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"resetFixedPosition\",\n value: function resetFixedPosition() {\n if (!this.needFullRender || !this.wot.wtTable.holder.parentNode) {\n // removed from DOM\n return;\n }\n\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var preventOverflow = this.wot.getSetting('preventOverflow');\n var headerPosition = 0;\n var skipInnerBorderAdjusting = false;\n\n if (this.trimmingContainer === this.wot.rootWindow && (!preventOverflow || preventOverflow !== 'vertical')) {\n var wtTable = this.wot.wtTable;\n var hiderRect = wtTable.hider.getBoundingClientRect();\n var top = Math.ceil(hiderRect.top);\n var bottom = Math.ceil(hiderRect.bottom);\n var rootHeight = overlayRoot.offsetHeight; // This checks if the overlay is going to an infinite loop caused by added (or removed)\n // `innerBorderTop` class name. Toggling the class name shifts the viewport by 1px and\n // triggers the `scroll` event. It causes the table to render. The new render cycle takes into,\n // account the shift and toggles the class name again. This causes the next loops. This\n // happens only on Chrome (#7256).\n //\n // When we detect that the table bottom position is the same as the overlay bottom,\n // do not toggle the class name.\n //\n // This workaround will be able to be cleared after merging the SVG borders, which introduces\n // frozen lines (no more `innerBorderTop` workaround).\n\n skipInnerBorderAdjusting = bottom === rootHeight;\n var finalLeft;\n var finalTop;\n finalLeft = wtTable.hider.style.left;\n finalLeft = finalLeft === '' ? 0 : finalLeft;\n\n if (top < 0 && bottom - rootHeight > 0) {\n finalTop = -top;\n } else {\n finalTop = 0;\n }\n\n headerPosition = finalTop;\n finalTop += 'px';\n setOverlayPosition(overlayRoot, finalLeft, finalTop);\n } else {\n headerPosition = this.getScrollPosition();\n resetCssTransform(overlayRoot);\n }\n\n var positionChanged = this.adjustHeaderBordersPosition(headerPosition, skipInnerBorderAdjusting);\n this.adjustElementsSize();\n return positionChanged;\n }\n /**\n * Sets the main overlay's vertical scroll position.\n *\n * @param {number} pos The scroll position.\n * @returns {boolean}\n */\n\n }, {\n key: \"setScrollPosition\",\n value: function setScrollPosition(pos) {\n var rootWindow = this.wot.rootWindow;\n var result = false;\n\n if (this.mainTableScrollableElement === rootWindow && rootWindow.scrollY !== pos) {\n rootWindow.scrollTo(getWindowScrollLeft(rootWindow), pos);\n result = true;\n } else if (this.mainTableScrollableElement.scrollTop !== pos) {\n this.mainTableScrollableElement.scrollTop = pos;\n result = true;\n }\n\n return result;\n }\n /**\n * Triggers onScroll hook callback.\n */\n\n }, {\n key: \"onScroll\",\n value: function onScroll() {\n this.wot.getSetting('onScrollHorizontally');\n }\n /**\n * Calculates total sum cells height.\n *\n * @param {number} from Row index which calculates started from.\n * @param {number} to Row index where calculation is finished.\n * @returns {number} Height sum.\n */\n\n }, {\n key: \"sumCellSizes\",\n value: function sumCellSizes(from, to) {\n var defaultRowHeight = this.wot.wtSettings.settings.defaultRowHeight;\n var row = from;\n var sum = 0;\n\n while (row < to) {\n var height = this.wot.wtTable.getRowHeight(row);\n sum += height === void 0 ? defaultRowHeight : height;\n row += 1;\n }\n\n return sum;\n }\n /**\n * Adjust overlay root element, childs and master table element sizes (width, height).\n *\n * @param {boolean} [force=false] When `true`, it adjusts the DOM nodes sizes for that overlay.\n */\n\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.updateTrimmingContainer();\n\n if (this.needFullRender || force) {\n this.adjustRootElementSize();\n this.adjustRootChildrenSize();\n }\n }\n /**\n * Adjust overlay root element size (width and height).\n */\n\n }, {\n key: \"adjustRootElementSize\",\n value: function adjustRootElementSize() {\n var _this$wot = this.wot,\n wtTable = _this$wot.wtTable,\n rootDocument = _this$wot.rootDocument,\n rootWindow = _this$wot.rootWindow;\n var scrollbarWidth = getScrollbarWidth(rootDocument);\n var overlayRoot = this.clone.wtTable.holder.parentNode;\n var overlayRootStyle = overlayRoot.style;\n var preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (this.trimmingContainer !== rootWindow || preventOverflow === 'horizontal') {\n var width = this.wot.wtViewport.getWorkspaceWidth();\n\n if (this.wot.wtOverlays.hasScrollbarRight) {\n width -= scrollbarWidth;\n }\n\n width = Math.min(width, wtTable.wtRootElement.scrollWidth);\n overlayRootStyle.width = \"\".concat(width, \"px\");\n } else {\n overlayRootStyle.width = '';\n }\n\n this.clone.wtTable.holder.style.width = overlayRootStyle.width;\n var tableHeight = outerHeight(this.clone.wtTable.TABLE);\n\n if (!this.wot.wtTable.hasDefinedSize()) {\n tableHeight = 0;\n }\n\n overlayRootStyle.height = \"\".concat(tableHeight, \"px\");\n }\n /**\n * Adjust overlay root childs size.\n */\n\n }, {\n key: \"adjustRootChildrenSize\",\n value: function adjustRootChildrenSize() {\n var _selections$getCell$g;\n\n var holder = this.clone.wtTable.holder;\n var selections = this.wot.selections;\n var selectionCornerOffset = Math.abs((_selections$getCell$g = selections === null || selections === void 0 ? void 0 : selections.getCell().getBorder(this.wot).cornerCenterPointOffset) !== null && _selections$getCell$g !== void 0 ? _selections$getCell$g : 0);\n this.clone.wtTable.hider.style.width = this.hider.style.width;\n holder.style.width = holder.parentNode.style.width; // Add selection corner protruding part to the holder total height to make sure that\n // borders' corner won't be cut after vertical scroll (#6937).\n\n holder.style.height = \"\".concat(parseInt(holder.parentNode.style.height, 10) + selectionCornerOffset, \"px\");\n }\n /**\n * Adjust the overlay dimensions and position.\n */\n\n }, {\n key: \"applyToDOM\",\n value: function applyToDOM() {\n var total = this.wot.getSetting('totalRows');\n\n if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {\n this.spreader.style.top = \"\".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition, \"px\");\n } else if (total === 0) {\n // can happen if there are 0 rows\n this.spreader.style.top = '0';\n } else {\n throw new Error('Incorrect value of the rowsRenderCalculator');\n }\n\n this.spreader.style.bottom = '';\n\n if (this.needFullRender) {\n this.syncOverlayOffset();\n }\n }\n /**\n * Synchronize calculated left position to an element.\n */\n\n }, {\n key: \"syncOverlayOffset\",\n value: function syncOverlayOffset() {\n if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {\n this.clone.wtTable.spreader.style.left = \"\".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition, \"px\");\n } else {\n this.clone.wtTable.spreader.style.left = '';\n }\n }\n /**\n * Scrolls vertically to a row.\n *\n * @param {number} sourceRow Row index which you want to scroll to.\n * @param {boolean} [bottomEdge] If `true`, scrolls according to the bottom edge (top edge is by default).\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollTo\",\n value: function scrollTo(sourceRow, bottomEdge) {\n var wot = this.wot;\n var sourceInstance = wot.cloneSource ? wot.cloneSource : wot;\n var mainHolder = sourceInstance.wtTable.holder;\n var newY = this.getTableParentOffset();\n var scrollbarCompensation = 0;\n\n if (bottomEdge && mainHolder.offsetHeight !== mainHolder.clientHeight) {\n scrollbarCompensation = getScrollbarWidth(wot.rootDocument);\n }\n\n if (bottomEdge) {\n var fixedRowsBottom = wot.getSetting('fixedRowsBottom');\n var totalRows = wot.getSetting('totalRows');\n newY += this.sumCellSizes(0, sourceRow + 1);\n newY -= wot.wtViewport.getViewportHeight() - this.sumCellSizes(totalRows - fixedRowsBottom, totalRows); // Fix 1 pixel offset when cell is selected\n\n newY += 1;\n } else {\n newY += this.sumCellSizes(wot.getSetting('fixedRowsTop'), sourceRow);\n }\n\n newY += scrollbarCompensation;\n return this.setScrollPosition(newY);\n }\n /**\n * Gets table parent top position.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getTableParentOffset\",\n value: function getTableParentOffset() {\n if (this.mainTableScrollableElement === this.wot.rootWindow) {\n return this.wot.wtTable.holderOffset.top;\n }\n\n return 0;\n }\n /**\n * Gets the main overlay's vertical scroll position.\n *\n * @returns {number} Main table's vertical scroll position.\n */\n\n }, {\n key: \"getScrollPosition\",\n value: function getScrollPosition() {\n return getScrollTop(this.mainTableScrollableElement, this.wot.rootWindow);\n }\n /**\n * Adds css classes to hide the header border's header (cell-selection border hiding issue).\n *\n * @param {number} position Header Y position if trimming container is window or scroll top if not.\n * @param {boolean} [skipInnerBorderAdjusting=false] If `true` the inner border adjusting will be skipped.\n * @returns {boolean}\n */\n\n }, {\n key: \"adjustHeaderBordersPosition\",\n value: function adjustHeaderBordersPosition(position) {\n var skipInnerBorderAdjusting = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var masterParent = this.wot.wtTable.holder.parentNode;\n var totalColumns = this.wot.getSetting('totalColumns');\n\n if (totalColumns) {\n removeClass(masterParent, 'emptyColumns');\n } else {\n addClass(masterParent, 'emptyColumns');\n }\n\n var positionChanged = false;\n\n if (!skipInnerBorderAdjusting) {\n var fixedRowsTop = this.wot.getSetting('fixedRowsTop');\n var areFixedRowsTopChanged = this.cachedFixedRowsTop !== fixedRowsTop;\n var columnHeaders = this.wot.getSetting('columnHeaders');\n\n if ((areFixedRowsTopChanged || fixedRowsTop === 0) && columnHeaders.length > 0) {\n var previousState = hasClass(masterParent, 'innerBorderTop');\n this.cachedFixedRowsTop = this.wot.getSetting('fixedRowsTop');\n\n if (position || this.wot.getSetting('totalRows') === 0) {\n addClass(masterParent, 'innerBorderTop');\n positionChanged = !previousState;\n } else {\n removeClass(masterParent, 'innerBorderTop');\n positionChanged = previousState;\n }\n }\n } // nasty workaround for double border in the header, TODO: find a pure-css solution\n\n\n if (this.wot.getSetting('rowHeaders').length === 0) {\n var secondHeaderCell = this.clone.wtTable.THEAD.querySelectorAll('th:nth-of-type(2)');\n\n if (secondHeaderCell) {\n for (var i = 0; i < secondHeaderCell.length; i++) {\n secondHeaderCell[i].style['border-left-width'] = 0;\n }\n }\n }\n\n return positionChanged;\n }\n }], [{\n key: \"OVERLAY_NAME\",\n get: function get() {\n return CLONE_TOP;\n }\n /**\n * Cached value which holds the previous value of the `fixedRowsTop` option.\n * It is used as a comparison value that can be used to detect changes in this value.\n *\n * @type {number}\n */\n\n }]);\n\n return TopOverlay;\n}(Overlay);","import \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { getScrollableElement, getScrollbarWidth } from \"./../../../helpers/dom/element.mjs\";\nimport { arrayEach } from \"./../../../helpers/array.mjs\";\nimport { isKey } from \"./../../../helpers/unicode.mjs\";\nimport { isChrome } from \"./../../../helpers/browser.mjs\";\nimport EventManager from \"./../../../eventManager.mjs\";\nimport { CLONE_BOTTOM_LEFT_CORNER, CLONE_BOTTOM, CLONE_LEFT, CLONE_TOP_LEFT_CORNER, CLONE_TOP, LeftOverlay, TopOverlay, TopLeftCornerOverlay, BottomOverlay, BottomLeftCornerOverlay, registerOverlayOnce, createOverlay, hasOverlay } from \"./overlay/index.mjs\";\nregisterOverlayOnce(BottomLeftCornerOverlay);\nregisterOverlayOnce(BottomOverlay);\nregisterOverlayOnce(LeftOverlay);\nregisterOverlayOnce(TopLeftCornerOverlay);\nregisterOverlayOnce(TopOverlay);\n/**\n * @class Overlays\n */\n\nvar Overlays = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n function Overlays(wotInstance) {\n _classCallCheck(this, Overlays);\n /**\n * Walkontable instance's reference.\n *\n * @private\n * @type {Walkontable}\n */\n\n\n this.wot = wotInstance;\n var _this$wot = this.wot,\n rootDocument = _this$wot.rootDocument,\n rootWindow = _this$wot.rootWindow,\n wtTable = _this$wot.wtTable;\n /**\n * Sometimes `line-height` might be set to 'normal'. In that case, a default `font-size` should be multiplied by roughly 1.2.\n * Https://developer.mozilla.org/pl/docs/Web/CSS/line-height#Values.\n */\n\n var BODY_LINE_HEIGHT = parseInt(rootWindow.getComputedStyle(rootDocument.body).lineHeight, 10);\n var FALLBACK_BODY_LINE_HEIGHT = parseInt(rootWindow.getComputedStyle(rootDocument.body).fontSize, 10) * 1.2; // legacy support\n\n this.instance = this.wot;\n this.eventManager = new EventManager(this.wot);\n this.scrollbarSize = getScrollbarWidth(rootDocument);\n this.wot.update('scrollbarWidth', this.scrollbarSize);\n this.wot.update('scrollbarHeight', this.scrollbarSize);\n var isOverflowHidden = rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden';\n this.scrollableElement = isOverflowHidden ? wtTable.holder : getScrollableElement(wtTable.TABLE);\n this.topOverlay = void 0;\n this.bottomOverlay = void 0;\n this.leftOverlay = void 0;\n this.topLeftCornerOverlay = void 0;\n this.bottomLeftCornerOverlay = void 0;\n this.prepareOverlays();\n this.hasScrollbarBottom = false;\n this.hasScrollbarRight = false;\n this.destroyed = false;\n this.keyPressed = false;\n this.spreaderLastSize = {\n width: null,\n height: null\n };\n this.verticalScrolling = false;\n this.horizontalScrolling = false;\n this.browserLineHeight = BODY_LINE_HEIGHT || FALLBACK_BODY_LINE_HEIGHT;\n this.registerListeners();\n this.lastScrollX = rootWindow.scrollX;\n this.lastScrollY = rootWindow.scrollY;\n }\n /**\n * Prepare overlays based on user settings.\n *\n * @returns {boolean} Returns `true` if changes applied to overlay needs scroll synchronization.\n */\n\n\n _createClass(Overlays, [{\n key: \"prepareOverlays\",\n value: function prepareOverlays() {\n var syncScroll = false;\n\n if (this.topOverlay) {\n syncScroll = this.topOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.topOverlay = createOverlay(CLONE_TOP, this.wot);\n }\n\n if (!hasOverlay(CLONE_BOTTOM)) {\n this.bottomOverlay = {\n needFullRender: false,\n updateStateOfRendering: function updateStateOfRendering() {\n return false;\n }\n };\n }\n\n if (!hasOverlay(CLONE_BOTTOM_LEFT_CORNER)) {\n this.bottomLeftCornerOverlay = {\n needFullRender: false,\n updateStateOfRendering: function updateStateOfRendering() {\n return false;\n }\n };\n }\n\n if (this.bottomOverlay) {\n syncScroll = this.bottomOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.bottomOverlay = createOverlay(CLONE_BOTTOM, this.wot);\n }\n\n if (this.leftOverlay) {\n syncScroll = this.leftOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.leftOverlay = createOverlay(CLONE_LEFT, this.wot);\n }\n\n if (this.topOverlay.needFullRender && this.leftOverlay.needFullRender) {\n if (this.topLeftCornerOverlay) {\n syncScroll = this.topLeftCornerOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.topLeftCornerOverlay = createOverlay(CLONE_TOP_LEFT_CORNER, this.wot);\n }\n }\n\n if (this.bottomOverlay.needFullRender && this.leftOverlay.needFullRender) {\n if (this.bottomLeftCornerOverlay) {\n syncScroll = this.bottomLeftCornerOverlay.updateStateOfRendering() || syncScroll;\n } else {\n this.bottomLeftCornerOverlay = createOverlay(CLONE_BOTTOM_LEFT_CORNER, this.wot);\n }\n }\n\n return syncScroll;\n }\n /**\n * Refresh and redraw table.\n */\n\n }, {\n key: \"refreshAll\",\n value: function refreshAll() {\n if (!this.wot.drawn) {\n return;\n }\n\n if (!this.wot.wtTable.holder.parentNode) {\n // Walkontable was detached from DOM, but this handler was not removed\n this.destroy();\n return;\n }\n\n this.wot.draw(true);\n\n if (this.verticalScrolling) {\n this.leftOverlay.onScroll();\n }\n\n if (this.horizontalScrolling) {\n this.topOverlay.onScroll();\n }\n\n this.verticalScrolling = false;\n this.horizontalScrolling = false;\n }\n /**\n * Register all necessary event listeners.\n */\n\n }, {\n key: \"registerListeners\",\n value: function registerListeners() {\n var _this = this;\n\n var _this$wot2 = this.wot,\n rootDocument = _this$wot2.rootDocument,\n rootWindow = _this$wot2.rootWindow;\n var topOverlayScrollableElement = this.topOverlay.mainTableScrollableElement;\n var leftOverlayScrollableElement = this.leftOverlay.mainTableScrollableElement;\n this.eventManager.addEventListener(rootDocument.documentElement, 'keydown', function (event) {\n return _this.onKeyDown(event);\n });\n this.eventManager.addEventListener(rootDocument.documentElement, 'keyup', function () {\n return _this.onKeyUp();\n });\n this.eventManager.addEventListener(rootDocument, 'visibilitychange', function () {\n return _this.onKeyUp();\n });\n this.eventManager.addEventListener(topOverlayScrollableElement, 'scroll', function (event) {\n return _this.onTableScroll(event);\n }, {\n passive: true\n });\n\n if (topOverlayScrollableElement !== leftOverlayScrollableElement) {\n this.eventManager.addEventListener(leftOverlayScrollableElement, 'scroll', function (event) {\n return _this.onTableScroll(event);\n }, {\n passive: true\n });\n }\n\n var isHighPixelRatio = rootWindow.devicePixelRatio && rootWindow.devicePixelRatio > 1;\n var isScrollOnWindow = this.scrollableElement === rootWindow;\n var preventWheel = this.wot.wtSettings.getSetting('preventWheel');\n var wheelEventOptions = {\n passive: isScrollOnWindow\n };\n\n if (preventWheel || isHighPixelRatio || !isChrome()) {\n this.eventManager.addEventListener(this.wot.wtTable.wtRootElement, 'wheel', function (event) {\n return _this.onCloneWheel(event, preventWheel);\n }, wheelEventOptions);\n }\n\n var overlays = [this.topOverlay, this.bottomOverlay, this.leftOverlay, this.topLeftCornerOverlay, this.bottomLeftCornerOverlay];\n overlays.forEach(function (overlay) {\n if (overlay && overlay.needFullRender) {\n var holder = overlay.clone.wtTable.holder;\n\n _this.eventManager.addEventListener(holder, 'wheel', function (event) {\n return _this.onCloneWheel(event, preventWheel);\n }, wheelEventOptions);\n }\n });\n var resizeTimeout;\n this.eventManager.addEventListener(rootWindow, 'resize', function () {\n clearTimeout(resizeTimeout);\n resizeTimeout = setTimeout(function () {\n _this.wot.getSetting('onWindowResize');\n }, 200);\n });\n }\n /**\n * Deregister all previously registered listeners.\n */\n\n }, {\n key: \"deregisterListeners\",\n value: function deregisterListeners() {\n this.eventManager.clearEvents(true);\n }\n /**\n * Scroll listener.\n *\n * @param {Event} event The mouse event object.\n */\n\n }, {\n key: \"onTableScroll\",\n value: function onTableScroll(event) {\n // There was if statement which controlled flow of this function. It avoided the execution of the next lines\n // on mobile devices. It was changed. Broader description of this case is included within issue #4856.\n var rootWindow = this.wot.rootWindow;\n var masterHorizontal = this.leftOverlay.mainTableScrollableElement;\n var masterVertical = this.topOverlay.mainTableScrollableElement;\n var target = event.target; // For key press, sync only master -> overlay position because while pressing Walkontable.render is triggered\n // by hot.refreshBorder\n\n if (this.keyPressed) {\n if (masterVertical !== rootWindow && target !== rootWindow && !event.target.contains(masterVertical) || masterHorizontal !== rootWindow && target !== rootWindow && !event.target.contains(masterHorizontal)) {\n return;\n }\n }\n\n this.syncScrollPositions(event);\n }\n /**\n * Wheel listener for cloned overlays.\n *\n * @param {Event} event The mouse event object.\n * @param {boolean} preventDefault If `true`, the `preventDefault` will be called on event object.\n */\n\n }, {\n key: \"onCloneWheel\",\n value: function onCloneWheel(event, preventDefault) {\n var rootWindow = this.wot.rootWindow; // There was if statement which controlled flow of this function. It avoided the execution of the next lines\n // on mobile devices. It was changed. Broader description of this case is included within issue #4856.\n\n var masterHorizontal = this.leftOverlay.mainTableScrollableElement;\n var masterVertical = this.topOverlay.mainTableScrollableElement;\n var target = event.target; // For key press, sync only master -> overlay position because while pressing Walkontable.render is triggered\n // by hot.refreshBorder\n\n var shouldNotWheelVertically = masterVertical !== rootWindow && target !== rootWindow && !target.contains(masterVertical);\n var shouldNotWheelHorizontally = masterHorizontal !== rootWindow && target !== rootWindow && !target.contains(masterHorizontal);\n\n if (this.keyPressed && (shouldNotWheelVertically || shouldNotWheelHorizontally)) {\n return;\n }\n\n var isScrollPossible = this.translateMouseWheelToScroll(event);\n\n if (preventDefault || this.scrollableElement !== rootWindow && isScrollPossible) {\n event.preventDefault();\n }\n }\n /**\n * Key down listener.\n *\n * @param {Event} event The keyboard event object.\n */\n\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(event) {\n this.keyPressed = isKey(event.keyCode, 'ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT');\n }\n /**\n * Key up listener.\n */\n\n }, {\n key: \"onKeyUp\",\n value: function onKeyUp() {\n this.keyPressed = false;\n }\n /**\n * Translate wheel event into scroll event and sync scroll overlays position.\n *\n * @private\n * @param {Event} event The mouse event object.\n * @returns {boolean}\n */\n\n }, {\n key: \"translateMouseWheelToScroll\",\n value: function translateMouseWheelToScroll(event) {\n var browserLineHeight = this.browserLineHeight;\n var deltaY = isNaN(event.deltaY) ? -1 * event.wheelDeltaY : event.deltaY;\n var deltaX = isNaN(event.deltaX) ? -1 * event.wheelDeltaX : event.deltaX;\n\n if (event.deltaMode === 1) {\n deltaX += deltaX * browserLineHeight;\n deltaY += deltaY * browserLineHeight;\n }\n\n var isScrollVerticallyPossible = this.scrollVertically(deltaY);\n var isScrollHorizontallyPossible = this.scrollHorizontally(deltaX);\n return isScrollVerticallyPossible || isScrollHorizontallyPossible;\n }\n /**\n * Scrolls main scrollable element horizontally.\n *\n * @param {number} delta Relative value to scroll.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollVertically\",\n value: function scrollVertically(delta) {\n var previousScroll = this.scrollableElement.scrollTop;\n this.scrollableElement.scrollTop += delta;\n return previousScroll !== this.scrollableElement.scrollTop;\n }\n /**\n * Scrolls main scrollable element horizontally.\n *\n * @param {number} delta Relative value to scroll.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollHorizontally\",\n value: function scrollHorizontally(delta) {\n var previousScroll = this.scrollableElement.scrollLeft;\n this.scrollableElement.scrollLeft += delta;\n return previousScroll !== this.scrollableElement.scrollLeft;\n }\n /**\n * Synchronize scroll position between master table and overlay table.\n *\n * @private\n */\n\n }, {\n key: \"syncScrollPositions\",\n value: function syncScrollPositions() {\n if (this.destroyed) {\n return;\n }\n\n var rootWindow = this.wot.rootWindow;\n var topHolder = this.topOverlay.clone.wtTable.holder;\n var leftHolder = this.leftOverlay.clone.wtTable.holder;\n var _ref = [this.scrollableElement.scrollLeft, this.scrollableElement.scrollTop],\n scrollLeft = _ref[0],\n scrollTop = _ref[1];\n this.horizontalScrolling = topHolder.scrollLeft !== scrollLeft || this.lastScrollX !== rootWindow.scrollX;\n this.verticalScrolling = leftHolder.scrollTop !== scrollTop || this.lastScrollY !== rootWindow.scrollY;\n this.lastScrollX = rootWindow.scrollX;\n this.lastScrollY = rootWindow.scrollY;\n\n if (this.horizontalScrolling) {\n topHolder.scrollLeft = scrollLeft;\n var bottomHolder = this.bottomOverlay.needFullRender ? this.bottomOverlay.clone.wtTable.holder : null;\n\n if (bottomHolder) {\n bottomHolder.scrollLeft = scrollLeft;\n }\n }\n\n if (this.verticalScrolling) {\n leftHolder.scrollTop = scrollTop;\n }\n\n this.refreshAll();\n }\n /**\n * Synchronize overlay scrollbars with the master scrollbar.\n */\n\n }, {\n key: \"syncScrollWithMaster\",\n value: function syncScrollWithMaster() {\n var master = this.topOverlay.mainTableScrollableElement;\n var scrollLeft = master.scrollLeft,\n scrollTop = master.scrollTop;\n\n if (this.topOverlay.needFullRender) {\n this.topOverlay.clone.wtTable.holder.scrollLeft = scrollLeft;\n }\n\n if (this.bottomOverlay.needFullRender) {\n this.bottomOverlay.clone.wtTable.holder.scrollLeft = scrollLeft;\n }\n\n if (this.leftOverlay.needFullRender) {\n this.leftOverlay.clone.wtTable.holder.scrollTop = scrollTop;\n }\n }\n /**\n * Update the main scrollable elements for all the overlays.\n */\n\n }, {\n key: \"updateMainScrollableElements\",\n value: function updateMainScrollableElements() {\n this.deregisterListeners();\n this.leftOverlay.updateMainScrollableElement();\n this.topOverlay.updateMainScrollableElement();\n\n if (this.bottomOverlay.needFullRender) {\n this.bottomOverlay.updateMainScrollableElement();\n }\n\n var _this$wot3 = this.wot,\n rootWindow = _this$wot3.rootWindow,\n wtTable = _this$wot3.wtTable;\n\n if (rootWindow.getComputedStyle(wtTable.wtRootElement.parentNode).getPropertyValue('overflow') === 'hidden') {\n this.scrollableElement = wtTable.holder;\n } else {\n this.scrollableElement = getScrollableElement(wtTable.TABLE);\n }\n\n this.registerListeners();\n }\n /**\n *\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.eventManager.destroy();\n this.topOverlay.destroy();\n\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.destroy();\n }\n\n this.leftOverlay.destroy();\n\n if (this.topLeftCornerOverlay) {\n this.topLeftCornerOverlay.destroy();\n }\n\n if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone) {\n this.bottomLeftCornerOverlay.destroy();\n }\n\n this.destroyed = true;\n }\n /**\n * @param {boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering\n * the data. It will only work if Table.draw() does not force\n * rendering anyway.\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var spreader = this.wot.wtTable.spreader;\n var width = spreader.clientWidth;\n var height = spreader.clientHeight;\n\n if (width !== this.spreaderLastSize.width || height !== this.spreaderLastSize.height) {\n this.spreaderLastSize.width = width;\n this.spreaderLastSize.height = height;\n this.adjustElementsSize();\n }\n\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.refresh(fastDraw);\n }\n\n this.leftOverlay.refresh(fastDraw);\n this.topOverlay.refresh(fastDraw);\n\n if (this.topLeftCornerOverlay) {\n this.topLeftCornerOverlay.refresh(fastDraw);\n }\n\n if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone) {\n this.bottomLeftCornerOverlay.refresh(fastDraw);\n }\n }\n /**\n * Adjust overlays elements size and master table size.\n *\n * @param {boolean} [force=false] When `true`, it adjust the DOM nodes sizes for all overlays.\n */\n\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var _this$wot4 = this.wot,\n wtViewport = _this$wot4.wtViewport,\n wtTable = _this$wot4.wtTable;\n var totalColumns = this.wot.getSetting('totalColumns');\n var totalRows = this.wot.getSetting('totalRows');\n var headerRowSize = wtViewport.getRowHeaderWidth();\n var headerColumnSize = wtViewport.getColumnHeaderHeight();\n var hiderStyle = wtTable.hider.style;\n hiderStyle.width = \"\".concat(headerRowSize + this.leftOverlay.sumCellSizes(0, totalColumns), \"px\");\n hiderStyle.height = \"\".concat(headerColumnSize + this.topOverlay.sumCellSizes(0, totalRows) + 1, \"px\");\n\n if (this.scrollbarSize > 0) {\n var _wtTable$wtRootElemen = wtTable.wtRootElement,\n rootElemScrollHeight = _wtTable$wtRootElemen.scrollHeight,\n rootElemScrollWidth = _wtTable$wtRootElemen.scrollWidth;\n var _wtTable$holder = wtTable.holder,\n holderScrollHeight = _wtTable$holder.scrollHeight,\n holderScrollWidth = _wtTable$holder.scrollWidth;\n this.hasScrollbarRight = rootElemScrollHeight < holderScrollHeight;\n this.hasScrollbarBottom = rootElemScrollWidth < holderScrollWidth;\n\n if (this.hasScrollbarRight && wtTable.hider.scrollWidth + this.scrollbarSize > rootElemScrollWidth) {\n this.hasScrollbarBottom = true;\n } else if (this.hasScrollbarBottom && wtTable.hider.scrollHeight + this.scrollbarSize > rootElemScrollHeight) {\n this.hasScrollbarRight = true;\n }\n }\n\n this.topOverlay.adjustElementsSize(force);\n this.leftOverlay.adjustElementsSize(force);\n this.bottomOverlay.adjustElementsSize(force);\n }\n /**\n *\n */\n\n }, {\n key: \"applyToDOM\",\n value: function applyToDOM() {\n var wtTable = this.wot.wtTable;\n\n if (!wtTable.isVisible()) {\n return;\n }\n\n this.topOverlay.applyToDOM();\n\n if (this.bottomOverlay.clone) {\n this.bottomOverlay.applyToDOM();\n }\n\n this.leftOverlay.applyToDOM();\n }\n /**\n * Get the parent overlay of the provided element.\n *\n * @param {HTMLElement} element An element to process.\n * @returns {object|null}\n */\n\n }, {\n key: \"getParentOverlay\",\n value: function getParentOverlay(element) {\n if (!element) {\n return null;\n }\n\n var overlays = [this.topOverlay, this.leftOverlay, this.bottomOverlay, this.topLeftCornerOverlay, this.bottomLeftCornerOverlay];\n var result = null;\n arrayEach(overlays, function (elem) {\n if (!elem) {\n return;\n }\n\n if (elem.clone && elem.clone.wtTable.TABLE.contains(element)) {\n result = elem.clone;\n }\n });\n return result;\n }\n /**\n * Synchronize the class names between the main overlay table and the tables on the other overlays.\n *\n */\n\n }, {\n key: \"syncOverlayTableClassNames\",\n value: function syncOverlayTableClassNames() {\n var masterTable = this.instance.wtTable.TABLE;\n var overlays = [this.topOverlay, this.leftOverlay, this.bottomOverlay, this.topLeftCornerOverlay, this.bottomLeftCornerOverlay];\n arrayEach(overlays, function (elem) {\n if (!elem) {\n return;\n }\n\n elem.clone.wtTable.TABLE.className = masterTable.className;\n });\n }\n }]);\n\n return Overlays;\n}();\n\nexport default Overlays;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { innerHeight, innerWidth, getScrollLeft, getScrollTop, offset } from \"./../../../helpers/dom/element.mjs\";\n/**\n * @class Scroll\n */\n\nvar Scroll = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n function Scroll(wotInstance) {\n _classCallCheck(this, Scroll);\n\n this.wot = wotInstance;\n }\n /**\n * Scrolls viewport to a cell.\n *\n * @param {CellCoords} coords The cell coordinates.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left of the table.\n * @returns {boolean}\n */\n\n\n _createClass(Scroll, [{\n key: \"scrollViewport\",\n value: function scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft) {\n if (coords.col < 0 || coords.row < 0) {\n return false;\n }\n\n var scrolledHorizontally = this.scrollViewportHorizontally(coords.col, snapToRight, snapToLeft);\n var scrolledVertically = this.scrollViewportVertically(coords.row, snapToTop, snapToBottom);\n return scrolledHorizontally || scrolledVertically;\n }\n /**\n * Scrolls viewport to a column.\n *\n * @param {number} column Visual column index.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left of the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollViewportHorizontally\",\n value: function scrollViewportHorizontally(column, snapToRight, snapToLeft) {\n if (!this.wot.drawn) {\n return false;\n }\n\n var _this$_getVariables = this._getVariables(),\n fixedColumnsLeft = _this$_getVariables.fixedColumnsLeft,\n leftOverlay = _this$_getVariables.leftOverlay,\n totalColumns = _this$_getVariables.totalColumns;\n\n var result = false;\n\n if (column >= 0 && column <= Math.max(totalColumns - 1, 0)) {\n var firstVisibleColumn = this.getFirstVisibleColumn();\n var lastVisibleColumn = this.getLastVisibleColumn();\n\n if (column >= fixedColumnsLeft && firstVisibleColumn > -1 && (column < firstVisibleColumn || snapToLeft)) {\n result = leftOverlay.scrollTo(column);\n } else if (lastVisibleColumn === -1 || lastVisibleColumn > -1 && (column > lastVisibleColumn || snapToRight)) {\n result = leftOverlay.scrollTo(column, true);\n }\n }\n\n return result;\n }\n /**\n * Scrolls viewport to a row.\n *\n * @param {number} row Visual row index.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollViewportVertically\",\n value: function scrollViewportVertically(row, snapToTop, snapToBottom) {\n if (!this.wot.drawn) {\n return false;\n }\n\n var _this$_getVariables2 = this._getVariables(),\n fixedRowsBottom = _this$_getVariables2.fixedRowsBottom,\n fixedRowsTop = _this$_getVariables2.fixedRowsTop,\n topOverlay = _this$_getVariables2.topOverlay,\n totalRows = _this$_getVariables2.totalRows;\n\n var result = false;\n\n if (row >= 0 && row <= Math.max(totalRows - 1, 0)) {\n var firstVisibleRow = this.getFirstVisibleRow();\n var lastVisibleRow = this.getLastVisibleRow();\n\n if (row >= fixedRowsTop && firstVisibleRow > -1 && (row < firstVisibleRow || snapToTop)) {\n result = topOverlay.scrollTo(row);\n } else if (lastVisibleRow === -1 || lastVisibleRow > -1 && (row > lastVisibleRow && row < totalRows - fixedRowsBottom || snapToBottom)) {\n result = topOverlay.scrollTo(row, true);\n }\n }\n\n return result;\n }\n /**\n * Get first visible row based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getFirstVisibleRow\",\n value: function getFirstVisibleRow() {\n var _this$_getVariables3 = this._getVariables(),\n topOverlay = _this$_getVariables3.topOverlay,\n wtTable = _this$_getVariables3.wtTable,\n wtViewport = _this$_getVariables3.wtViewport,\n totalRows = _this$_getVariables3.totalRows,\n fixedRowsTop = _this$_getVariables3.fixedRowsTop;\n\n var rootWindow = this.wot.rootWindow;\n var firstVisibleRow = wtTable.getFirstVisibleRow();\n\n if (topOverlay.mainTableScrollableElement === rootWindow) {\n var rootElementOffset = offset(wtTable.wtRootElement);\n var totalTableHeight = innerHeight(wtTable.hider);\n var windowHeight = innerHeight(rootWindow);\n var windowScrollTop = getScrollTop(rootWindow, rootWindow); // Only calculate firstVisibleRow when table didn't filled (from up) whole viewport space\n\n if (rootElementOffset.top + totalTableHeight - windowHeight <= windowScrollTop) {\n var rowsHeight = wtViewport.getColumnHeaderHeight();\n rowsHeight += topOverlay.sumCellSizes(0, fixedRowsTop);\n\n for (var row = totalRows; row > 0; row--) {\n rowsHeight += topOverlay.sumCellSizes(row - 1, row);\n\n if (rootElementOffset.top + totalTableHeight - rowsHeight <= windowScrollTop) {\n // Return physical row + 1\n firstVisibleRow = row;\n break;\n }\n }\n }\n }\n\n return firstVisibleRow;\n }\n /**\n * Get last visible row based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLastVisibleRow\",\n value: function getLastVisibleRow() {\n var _this$_getVariables4 = this._getVariables(),\n topOverlay = _this$_getVariables4.topOverlay,\n wtTable = _this$_getVariables4.wtTable,\n wtViewport = _this$_getVariables4.wtViewport,\n totalRows = _this$_getVariables4.totalRows;\n\n var rootWindow = this.wot.rootWindow;\n var lastVisibleRow = wtTable.getLastVisibleRow();\n\n if (topOverlay.mainTableScrollableElement === rootWindow) {\n var rootElementOffset = offset(wtTable.wtRootElement);\n var windowScrollTop = getScrollTop(rootWindow, rootWindow); // Only calculate lastVisibleRow when table didn't filled (from bottom) whole viewport space\n\n if (rootElementOffset.top > windowScrollTop) {\n var windowHeight = innerHeight(rootWindow);\n var rowsHeight = wtViewport.getColumnHeaderHeight();\n\n for (var row = 1; row <= totalRows; row++) {\n rowsHeight += topOverlay.sumCellSizes(row - 1, row);\n\n if (rootElementOffset.top + rowsHeight - windowScrollTop >= windowHeight) {\n // Return physical row - 1 (-2 because rangeEach gives row index + 1 - sumCellSizes requirements)\n lastVisibleRow = row - 2;\n break;\n }\n }\n }\n }\n\n return lastVisibleRow;\n }\n /**\n * Get first visible column based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getFirstVisibleColumn\",\n value: function getFirstVisibleColumn() {\n var _this$_getVariables5 = this._getVariables(),\n leftOverlay = _this$_getVariables5.leftOverlay,\n wtTable = _this$_getVariables5.wtTable,\n wtViewport = _this$_getVariables5.wtViewport,\n totalColumns = _this$_getVariables5.totalColumns;\n\n var rootWindow = this.wot.rootWindow;\n var firstVisibleColumn = wtTable.getFirstVisibleColumn();\n\n if (leftOverlay.mainTableScrollableElement === rootWindow) {\n var rootElementOffset = offset(wtTable.wtRootElement);\n var totalTableWidth = innerWidth(wtTable.hider);\n var windowWidth = innerWidth(rootWindow);\n var windowScrollLeft = getScrollLeft(rootWindow, rootWindow); // Only calculate firstVisibleColumn when table didn't filled (from left) whole viewport space\n\n if (rootElementOffset.left + totalTableWidth - windowWidth <= windowScrollLeft) {\n var columnsWidth = wtViewport.getRowHeaderWidth();\n\n for (var column = totalColumns; column > 0; column--) {\n columnsWidth += leftOverlay.sumCellSizes(column - 1, column);\n\n if (rootElementOffset.left + totalTableWidth - columnsWidth <= windowScrollLeft) {\n // Return physical column + 1\n firstVisibleColumn = column;\n break;\n }\n }\n }\n }\n\n return firstVisibleColumn;\n }\n /**\n * Get last visible column based on virtual dom and how table is visible in browser window viewport.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLastVisibleColumn\",\n value: function getLastVisibleColumn() {\n var _this$_getVariables6 = this._getVariables(),\n leftOverlay = _this$_getVariables6.leftOverlay,\n wtTable = _this$_getVariables6.wtTable,\n wtViewport = _this$_getVariables6.wtViewport,\n totalColumns = _this$_getVariables6.totalColumns;\n\n var rootWindow = this.wot.rootWindow;\n var lastVisibleColumn = wtTable.getLastVisibleColumn();\n\n if (leftOverlay.mainTableScrollableElement === rootWindow) {\n var rootElementOffset = offset(wtTable.wtRootElement);\n var windowScrollLeft = getScrollLeft(rootWindow, rootWindow); // Only calculate lastVisibleColumn when table didn't filled (from right) whole viewport space\n\n if (rootElementOffset.left > windowScrollLeft) {\n var windowWidth = innerWidth(rootWindow);\n var columnsWidth = wtViewport.getRowHeaderWidth();\n\n for (var column = 1; column <= totalColumns; column++) {\n columnsWidth += leftOverlay.sumCellSizes(column - 1, column);\n\n if (rootElementOffset.left + columnsWidth - windowScrollLeft >= windowWidth) {\n // Return physical column - 1 (-2 because rangeEach gives column index + 1 - sumCellSizes requirements)\n lastVisibleColumn = column - 2;\n break;\n }\n }\n }\n }\n\n return lastVisibleColumn;\n }\n /**\n * Returns collection of variables used to rows and columns visibility calculations.\n *\n * @returns {object}\n * @private\n */\n\n }, {\n key: \"_getVariables\",\n value: function _getVariables() {\n var wot = this.wot;\n var topOverlay = wot.wtOverlays.topOverlay;\n var leftOverlay = wot.wtOverlays.leftOverlay;\n var wtTable = wot.wtTable;\n var wtViewport = wot.wtViewport;\n var totalRows = wot.getSetting('totalRows');\n var totalColumns = wot.getSetting('totalColumns');\n var fixedRowsTop = wot.getSetting('fixedRowsTop');\n var fixedRowsBottom = wot.getSetting('fixedRowsBottom');\n var fixedColumnsLeft = wot.getSetting('fixedColumnsLeft');\n return {\n topOverlay: topOverlay,\n leftOverlay: leftOverlay,\n wtTable: wtTable,\n wtViewport: wtViewport,\n totalRows: totalRows,\n totalColumns: totalColumns,\n fixedRowsTop: fixedRowsTop,\n fixedRowsBottom: fixedRowsBottom,\n fixedColumnsLeft: fixedColumnsLeft\n };\n }\n }]);\n\n return Scroll;\n}();\n\nexport default Scroll;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { fastInnerText } from \"./../../../helpers/dom/element.mjs\";\nimport { objectEach } from \"./../../../helpers/object.mjs\";\n/**\n * @class Settings\n */\n\nvar Settings = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n * @param {object} settings The user defined settings.\n */\n function Settings(wotInstance, settings) {\n var _this = this;\n\n _classCallCheck(this, Settings);\n\n this.wot = wotInstance; // legacy support\n\n this.instance = wotInstance; // default settings. void 0 means it is required, null means it can be empty\n\n this.defaults = {\n table: void 0,\n // presentation mode\n externalRowCalculator: false,\n stretchH: 'none',\n // values: all, last, none\n currentRowClassName: null,\n currentColumnClassName: null,\n preventOverflow: function preventOverflow() {\n return false;\n },\n preventWheel: false,\n // data source\n data: void 0,\n freezeOverlays: false,\n // Number of renderable columns for the left overlay.\n fixedColumnsLeft: 0,\n // Number of renderable rows for the top overlay.\n fixedRowsTop: 0,\n // Number of renderable rows for the bottom overlay.\n fixedRowsBottom: 0,\n // Enable the left overlay when conditions are met.\n shouldRenderLeftOverlay: function shouldRenderLeftOverlay() {\n return _this.getSetting('fixedColumnsLeft') > 0 || _this.getSetting('rowHeaders').length > 0;\n },\n // Enable the top overlay when conditions are met.\n shouldRenderTopOverlay: function shouldRenderTopOverlay() {\n return _this.getSetting('fixedRowsTop') > 0 || _this.getSetting('columnHeaders').length > 0;\n },\n // Enable the bottom overlay when conditions are met.\n shouldRenderBottomOverlay: function shouldRenderBottomOverlay() {\n return _this.getSetting('fixedRowsBottom') > 0;\n },\n minSpareRows: 0,\n // this must be array of functions: [function (row, TH) {}]\n rowHeaders: function rowHeaders() {\n return [];\n },\n // this must be array of functions: [function (column, TH) {}]\n columnHeaders: function columnHeaders() {\n return [];\n },\n totalRows: void 0,\n totalColumns: void 0,\n cellRenderer: function cellRenderer(row, column, TD) {\n var cellData = _this.getSetting('data', row, column);\n\n fastInnerText(TD, cellData === void 0 || cellData === null ? '' : cellData);\n },\n // columnWidth: 50,\n columnWidth: function columnWidth() {// return undefined means use default size for the rendered cell content\n },\n rowHeight: function rowHeight() {// return undefined means use default size for the rendered cell content\n },\n defaultRowHeight: 23,\n defaultColumnWidth: 50,\n selections: null,\n hideBorderOnMouseDownOver: false,\n viewportRowCalculatorOverride: null,\n viewportColumnCalculatorOverride: null,\n // callbacks\n onCellMouseDown: null,\n onCellContextMenu: null,\n onCellMouseOver: null,\n onCellMouseOut: null,\n onCellMouseUp: null,\n // onCellMouseOut: null,\n onCellDblClick: null,\n onCellCornerMouseDown: null,\n onCellCornerDblClick: null,\n beforeDraw: null,\n onDraw: null,\n onBeforeRemoveCellClassNames: null,\n onAfterDrawSelection: null,\n onBeforeDrawBorders: null,\n onScrollVertically: null,\n onScrollHorizontally: null,\n onBeforeTouchScroll: null,\n onAfterMomentumScroll: null,\n onBeforeStretchingColumnWidth: function onBeforeStretchingColumnWidth(width) {\n return width;\n },\n onModifyRowHeaderWidth: null,\n onModifyGetCellCoords: null,\n onWindowResize: null,\n // constants\n scrollbarWidth: 10,\n scrollbarHeight: 10,\n renderAllRows: false,\n groups: false,\n rowHeaderWidth: null,\n columnHeaderHeight: null,\n headerClassName: null\n }; // reference to settings\n\n this.settings = {};\n objectEach(this.defaults, function (value, key) {\n if (settings[key] !== void 0) {\n _this.settings[key] = settings[key];\n } else if (value === void 0) {\n throw new Error(\"A required setting \\\"\".concat(key, \"\\\" was not provided\"));\n } else {\n _this.settings[key] = value;\n }\n });\n }\n /**\n * Update settings.\n *\n * @param {object} settings The singular settings to update or if passed as object to merge with.\n * @param {*} value The value to set if the first argument is passed as string.\n * @returns {Walkontable}\n */\n\n\n _createClass(Settings, [{\n key: \"update\",\n value: function update(settings, value) {\n var _this2 = this;\n\n if (value === void 0) {\n // settings is object\n objectEach(settings, function (settingValue, key) {\n _this2.settings[key] = settingValue;\n });\n } else {\n // if value is defined then settings is the key\n this.settings[settings] = value;\n }\n\n return this.wot;\n }\n /**\n * Get setting by name.\n *\n * @param {string} key The settings key to retrieve.\n * @param {*} [param1] Additional parameter passed to the options defined as function.\n * @param {*} [param2] Additional parameter passed to the options defined as function.\n * @param {*} [param3] Additional parameter passed to the options defined as function.\n * @param {*} [param4] Additional parameter passed to the options defined as function.\n * @returns {*}\n */\n\n }, {\n key: \"getSetting\",\n value: function getSetting(key, param1, param2, param3, param4) {\n if (typeof this.settings[key] === 'function') {\n // this is faster than .apply - https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\n return this.settings[key](param1, param2, param3, param4);\n } else if (param1 !== void 0 && Array.isArray(this.settings[key])) {\n // perhaps this can be removed, it is only used in tests\n return this.settings[key][param1];\n }\n\n return this.settings[key];\n }\n /**\n * Checks if setting exists.\n *\n * @param {boolean} key The settings key to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"has\",\n value: function has(key) {\n return !!this.settings[key];\n }\n }]);\n\n return Settings;\n}();\n\nexport default Settings;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.includes.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { getStyle, getComputedStyle, getTrimmingContainer, isVisible } from \"./../../../../helpers/dom/element.mjs\";\nimport Table from \"../table.mjs\";\nimport calculatedRows from \"./mixin/calculatedRows.mjs\";\nimport calculatedColumns from \"./mixin/calculatedColumns.mjs\";\nimport { mixin } from \"./../../../../helpers/object.mjs\";\n/**\n * Subclass of `Table` that provides the helper methods relevant to the master table (not overlays), implemented through mixins.\n */\n\nvar MasterTable = /*#__PURE__*/function (_Table) {\n _inherits(MasterTable, _Table);\n\n var _super = _createSuper(MasterTable);\n\n function MasterTable() {\n _classCallCheck(this, MasterTable);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MasterTable, [{\n key: \"alignOverlaysWithTrimmingContainer\",\n value: function alignOverlaysWithTrimmingContainer() {\n var trimmingElement = getTrimmingContainer(this.wtRootElement);\n var rootWindow = this.wot.rootWindow;\n\n if (trimmingElement === rootWindow) {\n var preventOverflow = this.wot.getSetting('preventOverflow');\n\n if (!preventOverflow) {\n this.holder.style.overflow = 'visible';\n this.wtRootElement.style.overflow = 'visible';\n }\n } else {\n var trimmingElementParent = trimmingElement.parentElement;\n var trimmingHeight = getStyle(trimmingElement, 'height', rootWindow);\n var trimmingOverflow = getStyle(trimmingElement, 'overflow', rootWindow);\n var holderStyle = this.holder.style;\n var scrollWidth = trimmingElement.scrollWidth,\n scrollHeight = trimmingElement.scrollHeight;\n\n var _trimmingElement$getB = trimmingElement.getBoundingClientRect(),\n width = _trimmingElement$getB.width,\n height = _trimmingElement$getB.height;\n\n var overflow = ['auto', 'hidden', 'scroll'];\n\n if (trimmingElementParent && overflow.includes(trimmingOverflow)) {\n var cloneNode = trimmingElement.cloneNode(false); // Before calculating the height of the trimming element, set overflow: auto to hide scrollbars.\n // An issue occurred on Firefox, where an empty element with overflow: scroll returns an element height higher than 0px\n // despite an empty content within.\n\n cloneNode.style.overflow = 'auto';\n\n if (trimmingElement.nextElementSibling) {\n trimmingElementParent.insertBefore(cloneNode, trimmingElement.nextElementSibling);\n } else {\n trimmingElementParent.appendChild(cloneNode);\n }\n\n var cloneHeight = parseInt(getComputedStyle(cloneNode, rootWindow).height, 10);\n trimmingElementParent.removeChild(cloneNode);\n\n if (cloneHeight === 0) {\n height = 0;\n }\n }\n\n height = Math.min(height, scrollHeight);\n holderStyle.height = trimmingHeight === 'auto' ? 'auto' : \"\".concat(height, \"px\");\n width = Math.min(width, scrollWidth);\n holderStyle.width = \"\".concat(width, \"px\");\n holderStyle.overflow = '';\n this.hasTableHeight = holderStyle.height === 'auto' ? true : height > 0;\n this.hasTableWidth = width > 0;\n }\n\n this.isTableVisible = isVisible(this.TABLE);\n }\n }, {\n key: \"markOversizedColumnHeaders\",\n value: function markOversizedColumnHeaders() {\n var wot = this.wot;\n var overlayName = wot.getOverlayName();\n var columnHeaders = wot.getSetting('columnHeaders');\n var columnHeadersCount = columnHeaders.length;\n\n if (columnHeadersCount && !wot.wtViewport.hasOversizedColumnHeadersMarked[overlayName]) {\n var rowHeaders = wot.getSetting('rowHeaders');\n var rowHeaderCount = rowHeaders.length;\n var columnCount = this.getRenderedColumnsCount();\n\n for (var i = 0; i < columnHeadersCount; i++) {\n for (var renderedColumnIndex = -1 * rowHeaderCount; renderedColumnIndex < columnCount; renderedColumnIndex++) {\n // eslint-disable-line max-len\n this.markIfOversizedColumnHeader(renderedColumnIndex);\n }\n }\n\n wot.wtViewport.hasOversizedColumnHeadersMarked[overlayName] = true;\n }\n }\n }]);\n\n return MasterTable;\n}(Table);\n\nmixin(MasterTable, calculatedRows);\nmixin(MasterTable, calculatedColumns);\nexport default MasterTable;","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { RENDER_TYPE, FULLY_VISIBLE_TYPE } from \"./constants.mjs\";\nvar privatePool = new WeakMap();\n/**\n * Calculates indexes of rows to render OR rows that are visible.\n * To redo the calculation, you need to create a new calculator.\n *\n * @class ViewportRowsCalculator\n */\n\nvar ViewportRowsCalculator = /*#__PURE__*/function () {\n /**\n * @param {object} options Object with all options specified for row viewport calculation.\n * @param {number} options.viewportHeight Height of the viewport.\n * @param {number} options.scrollOffset Current vertical scroll position of the viewport.\n * @param {number} options.totalRows Total number of rows.\n * @param {Function} options.rowHeightFn Function that returns the height of the row at a given index (in px).\n * @param {Function} options.overrideFn Function that changes calculated this.startRow, this.endRow (used by MergeCells plugin).\n * @param {string} options.calculationType String which describes types of calculation which will be performed.\n * @param {number} options.horizontalScrollbarHeight The scrollbar height.\n */\n function ViewportRowsCalculator() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n viewportSize = _ref.viewportSize,\n scrollOffset = _ref.scrollOffset,\n totalItems = _ref.totalItems,\n itemSizeFn = _ref.itemSizeFn,\n overrideFn = _ref.overrideFn,\n calculationType = _ref.calculationType,\n scrollbarHeight = _ref.scrollbarHeight;\n\n _classCallCheck(this, ViewportRowsCalculator);\n\n privatePool.set(this, {\n viewportHeight: viewportSize,\n scrollOffset: scrollOffset,\n totalRows: totalItems,\n rowHeightFn: itemSizeFn,\n overrideFn: overrideFn,\n calculationType: calculationType,\n horizontalScrollbarHeight: scrollbarHeight\n });\n /**\n * Number of rendered/visible rows.\n *\n * @type {number}\n */\n\n this.count = 0;\n /**\n * Index of the first rendered/visible row (can be overwritten using overrideFn).\n *\n * @type {number|null}\n */\n\n this.startRow = null;\n /**\n * Index of the last rendered/visible row (can be overwritten using overrideFn).\n *\n * @type {null}\n */\n\n this.endRow = null;\n /**\n * Position of the first rendered/visible row (in px).\n *\n * @type {number|null}\n */\n\n this.startPosition = null;\n this.calculate();\n }\n /**\n * Calculates viewport.\n */\n\n\n _createClass(ViewportRowsCalculator, [{\n key: \"calculate\",\n value: function calculate() {\n var sum = 0;\n var needReverse = true;\n var startPositions = [];\n var priv = privatePool.get(this);\n var calculationType = priv.calculationType;\n var overrideFn = priv.overrideFn;\n var rowHeightFn = priv.rowHeightFn;\n var scrollOffset = priv.scrollOffset;\n var totalRows = priv.totalRows;\n var viewportHeight = priv.viewportHeight;\n var horizontalScrollbarHeight = priv.horizontalScrollbarHeight || 0;\n var rowHeight; // Calculate the number (start and end index) of rows needed\n\n for (var i = 0; i < totalRows; i++) {\n rowHeight = rowHeightFn(i);\n\n if (isNaN(rowHeight)) {\n rowHeight = ViewportRowsCalculator.DEFAULT_HEIGHT;\n }\n\n if (sum <= scrollOffset && calculationType !== FULLY_VISIBLE_TYPE) {\n this.startRow = i;\n }\n\n if (sum >= scrollOffset && sum + (calculationType === FULLY_VISIBLE_TYPE ? rowHeight : 0) <= scrollOffset + viewportHeight - horizontalScrollbarHeight) {\n // eslint-disable-line max-len\n if (this.startRow === null) {\n this.startRow = i;\n }\n\n this.endRow = i;\n }\n\n startPositions.push(sum);\n sum += rowHeight;\n\n if (calculationType !== FULLY_VISIBLE_TYPE) {\n this.endRow = i;\n }\n\n if (sum >= scrollOffset + viewportHeight - horizontalScrollbarHeight) {\n needReverse = false;\n break;\n }\n } // If the estimation has reached the last row and there is still some space available in the viewport,\n // we need to render in reverse in order to fill the whole viewport with rows\n\n\n if (this.endRow === totalRows - 1 && needReverse) {\n this.startRow = this.endRow;\n\n while (this.startRow > 0) {\n // rowHeight is the height of the last row\n var viewportSum = startPositions[this.endRow] + rowHeight - startPositions[this.startRow - 1];\n\n if (viewportSum <= viewportHeight - horizontalScrollbarHeight || calculationType !== FULLY_VISIBLE_TYPE) {\n this.startRow -= 1;\n }\n\n if (viewportSum >= viewportHeight - horizontalScrollbarHeight) {\n break;\n }\n }\n }\n\n if (calculationType === RENDER_TYPE && this.startRow !== null && overrideFn) {\n overrideFn(this);\n }\n\n this.startPosition = startPositions[this.startRow];\n\n if (this.startPosition === void 0) {\n this.startPosition = null;\n } // If totalRows exceeded its total rows size set endRow to the latest item\n\n\n if (totalRows < this.endRow) {\n this.endRow = totalRows - 1;\n }\n\n if (this.startRow !== null) {\n this.count = this.endRow - this.startRow + 1;\n }\n }\n }], [{\n key: \"DEFAULT_HEIGHT\",\n get:\n /**\n * Default row height.\n *\n * @type {number}\n */\n function get() {\n return 23;\n }\n }]);\n\n return ViewportRowsCalculator;\n}();\n\nexport default ViewportRowsCalculator;","/**\n * Render type calculation calculates how many DOM nodes should be created and where placed\n * based on `startRow` and `endRow` properties.\n *\n * @type {number}\n */\nexport var RENDER_TYPE = 1;\n/**\n * Fully visible type calculation calculates rows that are fully visible in the viewport.\n * This type of calculation is used in scrolling by arrow keys navigation.\n *\n * @type {number}\n */\n\nexport var FULLY_VISIBLE_TYPE = 2;\n/**\n * Partially visible type calculation calculates rows that are fully and partially visible in\n * the viewport. This type of calculation is used to check `endRow` (or `startRow`) with properties\n * calculated in render calculator. If checking met the criteria slow render is\n * performed (which render calculator with new data).\n *\n * @type {number}\n */\n\nexport var PARTIALLY_VISIBLE_TYPE = 3;","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { RENDER_TYPE, FULLY_VISIBLE_TYPE } from \"./constants.mjs\";\nvar privatePool = new WeakMap();\n/**\n * Calculates indexes of columns to render OR columns that are visible.\n * To redo the calculation, you need to create a new calculator.\n *\n * @class ViewportColumnsCalculator\n */\n\nvar ViewportColumnsCalculator = /*#__PURE__*/function () {\n /**\n * @param {object} options Object with all options specified for column viewport calculation.\n * @param {number} options.viewportWidth Width of the viewport.\n * @param {number} options.scrollOffset Current horizontal scroll position of the viewport.\n * @param {number} options.totalColumns Total number of columns.\n * @param {Function} options.columnWidthFn Function that returns the width of the column at a given index (in px).\n * @param {Function} options.overrideFn Function that changes calculated this.startRow, this.endRow (used by MergeCells plugin).\n * @param {string} options.calculationType String which describes types of calculation which will be performed.\n * @param {string} [options.stretchH] Stretch mode 'all' or 'last'.\n * @param {Function} [options.stretchingColumnWidthFn] Function that returns the new width of the stretched column.\n */\n function ViewportColumnsCalculator() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n viewportSize = _ref.viewportSize,\n scrollOffset = _ref.scrollOffset,\n totalItems = _ref.totalItems,\n itemSizeFn = _ref.itemSizeFn,\n overrideFn = _ref.overrideFn,\n calculationType = _ref.calculationType,\n stretchMode = _ref.stretchMode,\n _ref$stretchingItemWi = _ref.stretchingItemWidthFn,\n stretchingItemWidthFn = _ref$stretchingItemWi === void 0 ? function (width) {\n return width;\n } : _ref$stretchingItemWi;\n\n _classCallCheck(this, ViewportColumnsCalculator);\n\n privatePool.set(this, {\n viewportWidth: viewportSize,\n scrollOffset: scrollOffset,\n totalColumns: totalItems,\n columnWidthFn: itemSizeFn,\n overrideFn: overrideFn,\n calculationType: calculationType,\n stretchingColumnWidthFn: stretchingItemWidthFn\n });\n /**\n * Number of rendered/visible columns.\n *\n * @type {number}\n */\n\n this.count = 0;\n /**\n * Index of the first rendered/visible column (can be overwritten using overrideFn).\n *\n * @type {number|null}\n */\n\n this.startColumn = null;\n /**\n * Index of the last rendered/visible column (can be overwritten using overrideFn).\n *\n * @type {null}\n */\n\n this.endColumn = null;\n /**\n * Position of the first rendered/visible column (in px).\n *\n * @type {number|null}\n */\n\n this.startPosition = null;\n this.stretchAllRatio = 0;\n this.stretchLastWidth = 0;\n this.stretch = stretchMode;\n this.totalTargetWidth = 0;\n this.needVerifyLastColumnWidth = true;\n this.stretchAllColumnsWidth = [];\n this.calculate();\n }\n /**\n * Calculates viewport.\n */\n\n\n _createClass(ViewportColumnsCalculator, [{\n key: \"calculate\",\n value: function calculate() {\n var sum = 0;\n var needReverse = true;\n var startPositions = [];\n var columnWidth;\n var priv = privatePool.get(this);\n var calculationType = priv.calculationType;\n var overrideFn = priv.overrideFn;\n var scrollOffset = priv.scrollOffset;\n var totalColumns = priv.totalColumns;\n var viewportWidth = priv.viewportWidth;\n\n for (var i = 0; i < totalColumns; i++) {\n columnWidth = this._getColumnWidth(i);\n\n if (sum <= scrollOffset && calculationType !== FULLY_VISIBLE_TYPE) {\n this.startColumn = i;\n } // +1 pixel for row header width compensation for horizontal scroll > 0\n\n\n var compensatedViewportWidth = scrollOffset > 0 ? viewportWidth + 1 : viewportWidth;\n\n if (sum >= scrollOffset && sum + (calculationType === FULLY_VISIBLE_TYPE ? columnWidth : 0) <= scrollOffset + compensatedViewportWidth) {\n // eslint-disable-line max-len\n if (this.startColumn === null || this.startColumn === void 0) {\n this.startColumn = i;\n }\n\n this.endColumn = i;\n }\n\n startPositions.push(sum);\n sum += columnWidth;\n\n if (calculationType !== FULLY_VISIBLE_TYPE) {\n this.endColumn = i;\n }\n\n if (sum >= scrollOffset + viewportWidth) {\n needReverse = false;\n break;\n }\n }\n\n if (this.endColumn === totalColumns - 1 && needReverse) {\n this.startColumn = this.endColumn;\n\n while (this.startColumn > 0) {\n var viewportSum = startPositions[this.endColumn] + columnWidth - startPositions[this.startColumn - 1];\n\n if (viewportSum <= viewportWidth || calculationType !== FULLY_VISIBLE_TYPE) {\n this.startColumn -= 1;\n }\n\n if (viewportSum > viewportWidth) {\n break;\n }\n }\n }\n\n if (calculationType === RENDER_TYPE && this.startColumn !== null && overrideFn) {\n overrideFn(this);\n }\n\n this.startPosition = startPositions[this.startColumn];\n\n if (this.startPosition === void 0) {\n this.startPosition = null;\n } // If totalColumns exceeded its total columns size set endColumn to the latest item\n\n\n if (totalColumns < this.endColumn) {\n this.endColumn = totalColumns - 1;\n }\n\n if (this.startColumn !== null) {\n this.count = this.endColumn - this.startColumn + 1;\n }\n }\n /**\n * Recalculate columns stretching.\n *\n * @param {number} totalWidth The total width of the table.\n */\n\n }, {\n key: \"refreshStretching\",\n value: function refreshStretching(totalWidth) {\n if (this.stretch === 'none') {\n return;\n }\n\n var totalColumnsWidth = totalWidth;\n this.totalTargetWidth = totalColumnsWidth;\n var priv = privatePool.get(this);\n var totalColumns = priv.totalColumns;\n var sumAll = 0;\n\n for (var i = 0; i < totalColumns; i++) {\n var columnWidth = this._getColumnWidth(i);\n\n var permanentColumnWidth = priv.stretchingColumnWidthFn(void 0, i);\n\n if (typeof permanentColumnWidth === 'number') {\n totalColumnsWidth -= permanentColumnWidth;\n } else {\n sumAll += columnWidth;\n }\n }\n\n var remainingSize = totalColumnsWidth - sumAll;\n\n if (this.stretch === 'all' && remainingSize > 0) {\n this.stretchAllRatio = totalColumnsWidth / sumAll;\n this.stretchAllColumnsWidth = [];\n this.needVerifyLastColumnWidth = true;\n } else if (this.stretch === 'last' && totalColumnsWidth !== Infinity) {\n var _columnWidth = this._getColumnWidth(totalColumns - 1);\n\n var lastColumnWidth = remainingSize + _columnWidth;\n this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : _columnWidth;\n }\n }\n /**\n * Get stretched column width based on stretchH (all or last) setting passed in handsontable instance.\n *\n * @param {number} column The visual column index.\n * @param {number} baseWidth The default column width.\n * @returns {number|null}\n */\n\n }, {\n key: \"getStretchedColumnWidth\",\n value: function getStretchedColumnWidth(column, baseWidth) {\n var result = null;\n\n if (this.stretch === 'all' && this.stretchAllRatio !== 0) {\n result = this._getStretchedAllColumnWidth(column, baseWidth);\n } else if (this.stretch === 'last' && this.stretchLastWidth !== 0) {\n result = this._getStretchedLastColumnWidth(column);\n }\n\n return result;\n }\n /**\n * @param {number} column The visual column index.\n * @param {number} baseWidth The default column width.\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getStretchedAllColumnWidth\",\n value: function _getStretchedAllColumnWidth(column, baseWidth) {\n var sumRatioWidth = 0;\n var priv = privatePool.get(this);\n var totalColumns = priv.totalColumns;\n\n if (!this.stretchAllColumnsWidth[column]) {\n var stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);\n var newStretchedWidth = priv.stretchingColumnWidthFn(stretchedWidth, column);\n\n if (newStretchedWidth === void 0) {\n this.stretchAllColumnsWidth[column] = stretchedWidth;\n } else {\n this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;\n }\n }\n\n if (this.stretchAllColumnsWidth.length === totalColumns && this.needVerifyLastColumnWidth) {\n this.needVerifyLastColumnWidth = false;\n\n for (var i = 0; i < this.stretchAllColumnsWidth.length; i++) {\n sumRatioWidth += this.stretchAllColumnsWidth[i];\n }\n\n if (sumRatioWidth !== this.totalTargetWidth) {\n this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += this.totalTargetWidth - sumRatioWidth;\n }\n }\n\n return this.stretchAllColumnsWidth[column];\n }\n /**\n * @param {number} column The visual column index.\n * @returns {number|null}\n * @private\n */\n\n }, {\n key: \"_getStretchedLastColumnWidth\",\n value: function _getStretchedLastColumnWidth(column) {\n var priv = privatePool.get(this);\n var totalColumns = priv.totalColumns;\n\n if (column === totalColumns - 1) {\n return this.stretchLastWidth;\n }\n\n return null;\n }\n /**\n * @param {number} column The visual column index.\n * @returns {number}\n * @private\n */\n\n }, {\n key: \"_getColumnWidth\",\n value: function _getColumnWidth(column) {\n var width = privatePool.get(this).columnWidthFn(column);\n\n if (isNaN(width)) {\n width = ViewportColumnsCalculator.DEFAULT_WIDTH;\n }\n\n return width;\n }\n }], [{\n key: \"DEFAULT_WIDTH\",\n get:\n /**\n * Default column width.\n *\n * @type {number}\n */\n function get() {\n return 50;\n }\n }]);\n\n return ViewportColumnsCalculator;\n}();\n\nexport default ViewportColumnsCalculator;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { getScrollbarWidth, getStyle, offset, outerHeight, outerWidth } from \"./../../../helpers/dom/element.mjs\";\nimport { objectEach } from \"./../../../helpers/object.mjs\";\nimport EventManager from \"./../../../eventManager.mjs\";\nimport { RENDER_TYPE, FULLY_VISIBLE_TYPE, ViewportColumnsCalculator, ViewportRowsCalculator } from \"./calculator/index.mjs\";\n/**\n * @class Viewport\n */\n\nvar Viewport = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n function Viewport(wotInstance) {\n var _this = this;\n\n _classCallCheck(this, Viewport);\n\n this.wot = wotInstance; // legacy support\n\n this.instance = this.wot;\n this.oversizedRows = [];\n this.oversizedColumnHeaders = [];\n this.hasOversizedColumnHeadersMarked = {};\n this.clientHeight = 0;\n this.containerWidth = NaN;\n this.rowHeaderWidth = NaN;\n this.rowsVisibleCalculator = null;\n this.columnsVisibleCalculator = null;\n this.eventManager = new EventManager(this.wot);\n this.eventManager.addEventListener(this.wot.rootWindow, 'resize', function () {\n _this.clientHeight = _this.getWorkspaceHeight();\n });\n }\n /**\n * @returns {number}\n */\n\n\n _createClass(Viewport, [{\n key: \"getWorkspaceHeight\",\n value: function getWorkspaceHeight() {\n var currentDocument = this.wot.rootDocument;\n var trimmingContainer = this.instance.wtOverlays.topOverlay.trimmingContainer;\n var height = 0;\n\n if (trimmingContainer === this.wot.rootWindow) {\n height = currentDocument.documentElement.clientHeight;\n } else {\n var elemHeight = outerHeight(trimmingContainer); // returns height without DIV scrollbar\n\n height = elemHeight > 0 && trimmingContainer.clientHeight > 0 ? trimmingContainer.clientHeight : Infinity;\n }\n\n return height;\n }\n }, {\n key: \"getWorkspaceWidth\",\n value: function getWorkspaceWidth() {\n var wot = this.wot;\n var rootDocument = wot.rootDocument,\n rootWindow = wot.rootWindow;\n var trimmingContainer = this.instance.wtOverlays.leftOverlay.trimmingContainer;\n var docOffsetWidth = rootDocument.documentElement.offsetWidth;\n var totalColumns = wot.getSetting('totalColumns');\n var preventOverflow = wot.getSetting('preventOverflow');\n var width;\n var overflow;\n\n if (preventOverflow) {\n return outerWidth(this.instance.wtTable.wtRootElement);\n }\n\n if (wot.getSetting('freezeOverlays')) {\n width = Math.min(docOffsetWidth - this.getWorkspaceOffset().left, docOffsetWidth);\n } else {\n width = Math.min(this.getContainerFillWidth(), docOffsetWidth - this.getWorkspaceOffset().left, docOffsetWidth);\n }\n\n if (trimmingContainer === rootWindow && totalColumns > 0 && this.sumColumnWidths(0, totalColumns - 1) > width) {\n // in case sum of column widths is higher than available stylesheet width, let's assume using the whole window\n // otherwise continue below, which will allow stretching\n // this is used in `scroll_window.html`\n // TODO test me\n return rootDocument.documentElement.clientWidth;\n }\n\n if (trimmingContainer !== rootWindow) {\n overflow = getStyle(this.instance.wtOverlays.leftOverlay.trimmingContainer, 'overflow', rootWindow);\n\n if (overflow === 'scroll' || overflow === 'hidden' || overflow === 'auto') {\n // this is used in `scroll.html`\n // TODO test me\n return Math.max(width, trimmingContainer.clientWidth);\n }\n }\n\n var stretchSetting = wot.getSetting('stretchH');\n\n if (stretchSetting === 'none' || !stretchSetting) {\n // if no stretching is used, return the maximum used workspace width\n return Math.max(width, outerWidth(this.instance.wtTable.TABLE));\n } // if stretching is used, return the actual container width, so the columns can fit inside it\n\n\n return width;\n }\n /**\n * Checks if viewport has vertical scroll.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"hasVerticalScroll\",\n value: function hasVerticalScroll() {\n return this.getWorkspaceActualHeight() > this.getWorkspaceHeight();\n }\n /**\n * Checks if viewport has horizontal scroll.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"hasHorizontalScroll\",\n value: function hasHorizontalScroll() {\n return this.getWorkspaceActualWidth() > this.getWorkspaceWidth();\n }\n /**\n * @param {number} from The visual column index from the width sum is start calculated.\n * @param {number} length The length of the column to traverse.\n * @returns {number}\n */\n\n }, {\n key: \"sumColumnWidths\",\n value: function sumColumnWidths(from, length) {\n var wtTable = this.wot.wtTable;\n var sum = 0;\n var column = from;\n\n while (column < length) {\n sum += wtTable.getColumnWidth(column);\n column += 1;\n }\n\n return sum;\n }\n /**\n * @returns {number}\n */\n\n }, {\n key: \"getContainerFillWidth\",\n value: function getContainerFillWidth() {\n if (this.containerWidth) {\n return this.containerWidth;\n }\n\n var mainContainer = this.instance.wtTable.holder;\n var dummyElement = this.wot.rootDocument.createElement('div');\n dummyElement.style.width = '100%';\n dummyElement.style.height = '1px';\n mainContainer.appendChild(dummyElement);\n var fillWidth = dummyElement.offsetWidth;\n this.containerWidth = fillWidth;\n mainContainer.removeChild(dummyElement);\n return fillWidth;\n }\n /**\n * @returns {number}\n */\n\n }, {\n key: \"getWorkspaceOffset\",\n value: function getWorkspaceOffset() {\n return offset(this.wot.wtTable.TABLE);\n }\n /**\n * @returns {number}\n */\n\n }, {\n key: \"getWorkspaceActualHeight\",\n value: function getWorkspaceActualHeight() {\n return outerHeight(this.wot.wtTable.TABLE);\n }\n /**\n * @returns {number}\n */\n\n }, {\n key: \"getWorkspaceActualWidth\",\n value: function getWorkspaceActualWidth() {\n var wtTable = this.wot.wtTable;\n return outerWidth(wtTable.TABLE) || outerWidth(wtTable.TBODY) || outerWidth(wtTable.THEAD); // IE8 reports 0 as offsetWidth;\n }\n /**\n * @returns {number}\n */\n\n }, {\n key: \"getColumnHeaderHeight\",\n value: function getColumnHeaderHeight() {\n var columnHeaders = this.instance.getSetting('columnHeaders');\n\n if (!columnHeaders.length) {\n this.columnHeaderHeight = 0;\n } else if (isNaN(this.columnHeaderHeight)) {\n this.columnHeaderHeight = outerHeight(this.wot.wtTable.THEAD);\n }\n\n return this.columnHeaderHeight;\n }\n /**\n * @returns {number}\n */\n\n }, {\n key: \"getViewportHeight\",\n value: function getViewportHeight() {\n var containerHeight = this.getWorkspaceHeight();\n\n if (containerHeight === Infinity) {\n return containerHeight;\n }\n\n var columnHeaderHeight = this.getColumnHeaderHeight();\n\n if (columnHeaderHeight > 0) {\n containerHeight -= columnHeaderHeight;\n }\n\n return containerHeight;\n }\n /**\n * @returns {number}\n */\n\n }, {\n key: \"getRowHeaderWidth\",\n value: function getRowHeaderWidth() {\n var rowHeadersWidthSetting = this.instance.getSetting('rowHeaderWidth');\n var rowHeaders = this.instance.getSetting('rowHeaders');\n\n if (rowHeadersWidthSetting) {\n this.rowHeaderWidth = 0;\n\n for (var i = 0, len = rowHeaders.length; i < len; i++) {\n this.rowHeaderWidth += rowHeadersWidthSetting[i] || rowHeadersWidthSetting;\n }\n }\n\n if (this.wot.cloneSource) {\n return this.wot.cloneSource.wtViewport.getRowHeaderWidth();\n }\n\n if (isNaN(this.rowHeaderWidth)) {\n if (rowHeaders.length) {\n var TH = this.instance.wtTable.TABLE.querySelector('TH');\n this.rowHeaderWidth = 0;\n\n for (var _i = 0, _len = rowHeaders.length; _i < _len; _i++) {\n if (TH) {\n this.rowHeaderWidth += outerWidth(TH);\n TH = TH.nextSibling;\n } else {\n // yes this is a cheat but it worked like that before, just taking assumption from CSS instead of measuring.\n // TODO: proper fix\n this.rowHeaderWidth += 50;\n }\n }\n } else {\n this.rowHeaderWidth = 0;\n }\n }\n\n this.rowHeaderWidth = this.instance.getSetting('onModifyRowHeaderWidth', this.rowHeaderWidth) || this.rowHeaderWidth;\n return this.rowHeaderWidth;\n }\n /**\n * @returns {number}\n */\n\n }, {\n key: \"getViewportWidth\",\n value: function getViewportWidth() {\n var containerWidth = this.getWorkspaceWidth();\n\n if (containerWidth === Infinity) {\n return containerWidth;\n }\n\n var rowHeaderWidth = this.getRowHeaderWidth();\n\n if (rowHeaderWidth > 0) {\n return containerWidth - rowHeaderWidth;\n }\n\n return containerWidth;\n }\n /**\n * Creates:\n * - rowsRenderCalculator (before draw, to qualify rows for rendering)\n * - rowsVisibleCalculator (after draw, to measure which rows are actually visible).\n *\n * @param {number} calculationType The render type ID, which determines for what type of\n * calculation calculator is created.\n * @returns {ViewportRowsCalculator}\n */\n\n }, {\n key: \"createRowsCalculator\",\n value: function createRowsCalculator() {\n var calculationType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RENDER_TYPE;\n var wot = this.wot;\n var wtSettings = wot.wtSettings,\n wtOverlays = wot.wtOverlays,\n wtTable = wot.wtTable,\n rootDocument = wot.rootDocument;\n var height;\n var scrollbarHeight;\n var fixedRowsHeight;\n this.rowHeaderWidth = NaN;\n\n if (wtSettings.settings.renderAllRows && calculationType === RENDER_TYPE) {\n height = Infinity;\n } else {\n height = this.getViewportHeight();\n }\n\n var pos = wtOverlays.topOverlay.getScrollPosition() - wtOverlays.topOverlay.getTableParentOffset();\n\n if (pos < 0) {\n pos = 0;\n }\n\n var fixedRowsTop = wot.getSetting('fixedRowsTop');\n var fixedRowsBottom = wot.getSetting('fixedRowsBottom');\n var totalRows = wot.getSetting('totalRows');\n\n if (fixedRowsTop) {\n fixedRowsHeight = wtOverlays.topOverlay.sumCellSizes(0, fixedRowsTop);\n pos += fixedRowsHeight;\n height -= fixedRowsHeight;\n }\n\n if (fixedRowsBottom && wtOverlays.bottomOverlay.clone) {\n fixedRowsHeight = wtOverlays.bottomOverlay.sumCellSizes(totalRows - fixedRowsBottom, totalRows);\n height -= fixedRowsHeight;\n }\n\n if (wtTable.holder.clientHeight === wtTable.holder.offsetHeight) {\n scrollbarHeight = 0;\n } else {\n scrollbarHeight = getScrollbarWidth(rootDocument);\n }\n\n return new ViewportRowsCalculator({\n viewportSize: height,\n scrollOffset: pos,\n totalItems: wot.getSetting('totalRows'),\n itemSizeFn: function itemSizeFn(sourceRow) {\n return wtTable.getRowHeight(sourceRow);\n },\n overrideFn: wtSettings.settings.viewportRowCalculatorOverride,\n calculationType: calculationType,\n scrollbarHeight: scrollbarHeight\n });\n }\n /**\n * Creates:\n * - columnsRenderCalculator (before draw, to qualify columns for rendering)\n * - columnsVisibleCalculator (after draw, to measure which columns are actually visible).\n *\n * @param {number} calculationType The render type ID, which determines for what type of\n * calculation calculator is created.\n * @returns {ViewportRowsCalculator}\n */\n\n }, {\n key: \"createColumnsCalculator\",\n value: function createColumnsCalculator() {\n var calculationType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : RENDER_TYPE;\n var wot = this.wot;\n var wtSettings = wot.wtSettings,\n wtOverlays = wot.wtOverlays,\n wtTable = wot.wtTable,\n rootDocument = wot.rootDocument;\n var width = this.getViewportWidth();\n var pos = wtOverlays.leftOverlay.getScrollPosition() - wtOverlays.leftOverlay.getTableParentOffset();\n this.columnHeaderHeight = NaN;\n\n if (pos < 0) {\n pos = 0;\n }\n\n var fixedColumnsLeft = wot.getSetting('fixedColumnsLeft');\n\n if (fixedColumnsLeft) {\n var fixedColumnsWidth = wtOverlays.leftOverlay.sumCellSizes(0, fixedColumnsLeft);\n pos += fixedColumnsWidth;\n width -= fixedColumnsWidth;\n }\n\n if (wtTable.holder.clientWidth !== wtTable.holder.offsetWidth) {\n width -= getScrollbarWidth(rootDocument);\n }\n\n return new ViewportColumnsCalculator({\n viewportSize: width,\n scrollOffset: pos,\n totalItems: wot.getSetting('totalColumns'),\n itemSizeFn: function itemSizeFn(sourceCol) {\n return wot.wtTable.getColumnWidth(sourceCol);\n },\n overrideFn: wtSettings.settings.viewportColumnCalculatorOverride,\n calculationType: calculationType,\n stretchMode: wot.getSetting('stretchH'),\n stretchingItemWidthFn: function stretchingItemWidthFn(stretchedWidth, column) {\n return wot.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column);\n }\n });\n }\n /**\n * Creates rowsRenderCalculator and columnsRenderCalculator (before draw, to determine what rows and\n * cols should be rendered).\n *\n * @param {boolean} fastDraw If `true`, will try to avoid full redraw and only update the border positions.\n * If `false` or `undefined`, will perform a full redraw.\n * @returns {boolean} The fastDraw value, possibly modified.\n */\n\n }, {\n key: \"createRenderCalculators\",\n value: function createRenderCalculators() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var runFastDraw = fastDraw;\n\n if (runFastDraw) {\n var proposedRowsVisibleCalculator = this.createRowsCalculator(FULLY_VISIBLE_TYPE);\n var proposedColumnsVisibleCalculator = this.createColumnsCalculator(FULLY_VISIBLE_TYPE);\n\n if (!(this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) && this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator))) {\n runFastDraw = false;\n }\n }\n\n if (!runFastDraw) {\n this.rowsRenderCalculator = this.createRowsCalculator(RENDER_TYPE);\n this.columnsRenderCalculator = this.createColumnsCalculator(RENDER_TYPE);\n } // delete temporarily to make sure that renderers always use rowsRenderCalculator, not rowsVisibleCalculator\n\n\n this.rowsVisibleCalculator = null;\n this.columnsVisibleCalculator = null;\n return runFastDraw;\n }\n /**\n * Creates rowsVisibleCalculator and columnsVisibleCalculator (after draw, to determine what are\n * the actually fully visible rows and columns).\n */\n\n }, {\n key: \"createVisibleCalculators\",\n value: function createVisibleCalculators() {\n this.rowsVisibleCalculator = this.createRowsCalculator(FULLY_VISIBLE_TYPE);\n this.columnsVisibleCalculator = this.createColumnsCalculator(FULLY_VISIBLE_TYPE);\n }\n /**\n * Returns information whether proposedRowsVisibleCalculator viewport\n * is contained inside rows rendered in previous draw (cached in rowsRenderCalculator).\n *\n * @param {ViewportRowsCalculator} proposedRowsVisibleCalculator The instance of the viewport calculator to compare with.\n * @returns {boolean} Returns `true` if all proposed visible rows are already rendered (meaning: redraw is not needed).\n * Returns `false` if at least one proposed visible row is not already rendered (meaning: redraw is needed).\n */\n\n }, {\n key: \"areAllProposedVisibleRowsAlreadyRendered\",\n value: function areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) {\n if (!this.rowsVisibleCalculator) {\n return false;\n }\n\n var startRow = proposedRowsVisibleCalculator.startRow,\n endRow = proposedRowsVisibleCalculator.endRow;\n var _this$rowsRenderCalcu = this.rowsRenderCalculator,\n renderedStartRow = _this$rowsRenderCalcu.startRow,\n renderedEndRow = _this$rowsRenderCalcu.endRow;\n\n if (startRow < renderedStartRow || startRow === renderedStartRow && startRow > 0) {\n return false;\n } else if (endRow > renderedEndRow || endRow === renderedEndRow && endRow < this.wot.getSetting('totalRows') - 1) {\n return false;\n }\n\n return true;\n }\n /**\n * Returns information whether proposedColumnsVisibleCalculator viewport\n * is contained inside column rendered in previous draw (cached in columnsRenderCalculator).\n *\n * @param {ViewportRowsCalculator} proposedColumnsVisibleCalculator The instance of the viewport calculator to compare with.\n * @returns {boolean} Returns `true` if all proposed visible columns are already rendered (meaning: redraw is not needed).\n * Returns `false` if at least one proposed visible column is not already rendered (meaning: redraw is needed).\n */\n\n }, {\n key: \"areAllProposedVisibleColumnsAlreadyRendered\",\n value: function areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator) {\n if (!this.columnsVisibleCalculator) {\n return false;\n }\n\n var startColumn = proposedColumnsVisibleCalculator.startColumn,\n endColumn = proposedColumnsVisibleCalculator.endColumn;\n var _this$columnsRenderCa = this.columnsRenderCalculator,\n renderedStartColumn = _this$columnsRenderCa.startColumn,\n renderedEndColumn = _this$columnsRenderCa.endColumn;\n\n if (startColumn < renderedStartColumn || startColumn === renderedStartColumn && startColumn > 0) {\n return false;\n } else if (endColumn > renderedEndColumn || endColumn === renderedEndColumn && endColumn < this.wot.getSetting('totalColumns') - 1) {\n return false;\n }\n\n return true;\n }\n /**\n * Resets values in keys of the hasOversizedColumnHeadersMarked object after updateSettings.\n */\n\n }, {\n key: \"resetHasOversizedColumnHeadersMarked\",\n value: function resetHasOversizedColumnHeadersMarked() {\n objectEach(this.hasOversizedColumnHeadersMarked, function (value, key, object) {\n object[key] = void 0;\n });\n }\n }]);\n\n return Viewport;\n}();\n\nexport default Viewport;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { addClass, fastInnerText, removeClass } from \"./../../../helpers/dom/element.mjs\";\nimport { objectEach } from \"./../../../helpers/object.mjs\";\nimport { randomString } from \"./../../../helpers/string.mjs\";\nimport Event from \"./event.mjs\";\nimport Overlays from \"./overlays.mjs\";\nimport Scroll from \"./scroll.mjs\";\nimport Settings from \"./settings.mjs\";\nimport MasterTable from \"./table/master.mjs\";\nimport Viewport from \"./viewport.mjs\";\n/**\n * @class Walkontable\n */\n\nvar Walkontable = /*#__PURE__*/function () {\n /**\n * @param {object} settings The Walkontable settings.\n */\n function Walkontable(settings) {\n _classCallCheck(this, Walkontable);\n\n var originalHeaders = []; // this is the namespace for global events\n\n this.guid = \"wt_\".concat(randomString());\n this.rootDocument = settings.table.ownerDocument;\n this.rootWindow = this.rootDocument.defaultView; // bootstrap from settings\n\n if (settings.cloneSource) {\n this.cloneSource = settings.cloneSource;\n this.cloneOverlay = settings.cloneOverlay;\n this.wtSettings = settings.cloneSource.wtSettings;\n this.wtTable = this.cloneOverlay.createTable(this, settings.table);\n this.wtScroll = new Scroll(this);\n this.wtViewport = settings.cloneSource.wtViewport;\n this.wtEvent = new Event(this);\n this.selections = this.cloneSource.selections;\n } else {\n this.wtSettings = new Settings(this, settings);\n this.wtTable = new MasterTable(this, settings.table);\n this.wtScroll = new Scroll(this);\n this.wtViewport = new Viewport(this);\n this.wtEvent = new Event(this);\n this.selections = this.getSetting('selections');\n this.wtOverlays = new Overlays(this);\n this.exportSettingsAsClassNames();\n } // find original headers\n\n\n if (this.wtTable.THEAD.childNodes.length && this.wtTable.THEAD.childNodes[0].childNodes.length) {\n for (var c = 0, clen = this.wtTable.THEAD.childNodes[0].childNodes.length; c < clen; c++) {\n originalHeaders.push(this.wtTable.THEAD.childNodes[0].childNodes[c].innerHTML);\n }\n\n if (!this.getSetting('columnHeaders').length) {\n this.update('columnHeaders', [function (column, TH) {\n fastInnerText(TH, originalHeaders[column]);\n }]);\n }\n }\n\n this.drawn = false;\n this.drawInterrupted = false;\n }\n /**\n * Force rerender of Walkontable.\n *\n * @param {boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering\n * the data. It will only work if Table.draw() does not force\n * rendering anyway.\n * @returns {Walkontable}\n */\n\n\n _createClass(Walkontable, [{\n key: \"draw\",\n value: function draw() {\n var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.drawInterrupted = false;\n\n if (!fastDraw && !this.wtTable.isVisible()) {\n // draw interrupted because TABLE is not visible\n this.drawInterrupted = true;\n } else {\n this.wtTable.draw(fastDraw);\n }\n\n return this;\n }\n /**\n * Returns the TD at coords. If topmost is set to true, returns TD from the topmost overlay layer,\n * if not set or set to false, returns TD from the master table.\n *\n * @param {CellCoords} coords The cell coordinates.\n * @param {boolean} [topmost=false] If set to `true`, it returns the TD element from the topmost overlay. For example,\n * if the wanted cell is in the range of fixed rows, it will return a TD element\n * from the top overlay.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"getCell\",\n value: function getCell(coords) {\n var topmost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!topmost) {\n return this.wtTable.getCell(coords);\n }\n\n var totalRows = this.wtSettings.getSetting('totalRows');\n var fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');\n var fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');\n var fixedColumns = this.wtSettings.getSetting('fixedColumnsLeft');\n\n if (coords.row < fixedRowsTop && coords.col < fixedColumns) {\n return this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(coords);\n } else if (coords.row < fixedRowsTop) {\n return this.wtOverlays.topOverlay.clone.wtTable.getCell(coords);\n } else if (coords.col < fixedColumns && coords.row >= totalRows - fixedRowsBottom) {\n if (this.wtOverlays.bottomLeftCornerOverlay && this.wtOverlays.bottomLeftCornerOverlay.clone) {\n return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(coords);\n }\n } else if (coords.col < fixedColumns) {\n return this.wtOverlays.leftOverlay.clone.wtTable.getCell(coords);\n } else if (coords.row < totalRows && coords.row >= totalRows - fixedRowsBottom) {\n if (this.wtOverlays.bottomOverlay && this.wtOverlays.bottomOverlay.clone) {\n return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(coords);\n }\n }\n\n return this.wtTable.getCell(coords);\n }\n /**\n * @param {object} settings The singular settings to update or if passed as object to merge with.\n * @param {*} value The value to set if the first argument is passed as string.\n * @returns {Walkontable}\n */\n\n }, {\n key: \"update\",\n value: function update(settings, value) {\n return this.wtSettings.update(settings, value);\n }\n /**\n * Scrolls the viewport to a cell (rerenders if needed).\n *\n * @param {CellCoords} coords The cell coordinates to scroll to.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left of the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollViewport\",\n value: function scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft) {\n if (coords.col < 0 || coords.row < 0) {\n return false;\n }\n\n return this.wtScroll.scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft);\n }\n /**\n * Scrolls the viewport to a column (rerenders if needed).\n *\n * @param {number} column Visual column index.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left of the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollViewportHorizontally\",\n value: function scrollViewportHorizontally(column, snapToRight, snapToLeft) {\n if (column < 0) {\n return false;\n }\n\n return this.wtScroll.scrollViewportHorizontally(column, snapToRight, snapToLeft);\n }\n /**\n * Scrolls the viewport to a row (rerenders if needed).\n *\n * @param {number} row Visual row index.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollViewportVertically\",\n value: function scrollViewportVertically(row, snapToTop, snapToBottom) {\n if (row < 0) {\n return false;\n }\n\n return this.wtScroll.scrollViewportVertically(row, snapToTop, snapToBottom);\n }\n /**\n * @returns {Array}\n */\n\n }, {\n key: \"getViewport\",\n value: function getViewport() {\n return [this.wtTable.getFirstVisibleRow(), this.wtTable.getFirstVisibleColumn(), this.wtTable.getLastVisibleRow(), this.wtTable.getLastVisibleColumn()];\n }\n /**\n * Get overlay name.\n *\n * @returns {string}\n */\n\n }, {\n key: \"getOverlayName\",\n value: function getOverlayName() {\n return this.cloneOverlay ? this.cloneOverlay.type : 'master';\n }\n /**\n * Export settings as class names added to the parent element of the table.\n */\n\n }, {\n key: \"exportSettingsAsClassNames\",\n value: function exportSettingsAsClassNames() {\n var _this = this;\n\n var toExport = {\n rowHeaders: 'htRowHeaders',\n columnHeaders: 'htColumnHeaders'\n };\n var allClassNames = [];\n var newClassNames = [];\n objectEach(toExport, function (className, key) {\n if (_this.getSetting(key).length) {\n newClassNames.push(className);\n }\n\n allClassNames.push(className);\n });\n removeClass(this.wtTable.wtRootElement.parentNode, allClassNames);\n addClass(this.wtTable.wtRootElement.parentNode, newClassNames);\n }\n /**\n * Get/Set Walkontable instance setting.\n *\n * @param {string} key The settings key to retrieve.\n * @param {*} [param1] Additional parameter passed to the options defined as function.\n * @param {*} [param2] Additional parameter passed to the options defined as function.\n * @param {*} [param3] Additional parameter passed to the options defined as function.\n * @param {*} [param4] Additional parameter passed to the options defined as function.\n * @returns {*}\n */\n\n }, {\n key: \"getSetting\",\n value: function getSetting(key, param1, param2, param3, param4) {\n // this is faster than .apply - https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\n return this.wtSettings.getSetting(key, param1, param2, param3, param4);\n }\n /**\n * Checks if setting exists.\n *\n * @param {string} key The settings key to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"hasSetting\",\n value: function hasSetting(key) {\n return this.wtSettings.has(key);\n }\n /**\n * Destroy instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.wtOverlays.destroy();\n this.wtEvent.destroy();\n }\n }]);\n\n return Walkontable;\n}();\n\nexport default Walkontable;","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { isRightClick as isRightClickEvent, isLeftClick as isLeftClickEvent } from \"./../helpers/dom/event.mjs\";\nimport { CellCoords } from \"./../3rdparty/walkontable/src/index.mjs\";\n/**\n * MouseDown handler.\n *\n * @param {object} options The handler options.\n * @param {boolean} options.isShiftKey The flag which indicates if the shift key is pressed.\n * @param {boolean} options.isLeftClick The flag which indicates if the left mouse button is pressed.\n * @param {boolean} options.isRightClick The flag which indicates if the right mouse button is pressed.\n * @param {CellRange} options.coords The CellCoords object with defined visual coordinates.\n * @param {Selection} options.selection The Selection class instance.\n * @param {object} options.controller An object with keys `row`, `column`, `cell` which indicate what\n * operation will be performed in later selection stages.\n */\n\nexport function mouseDown(_ref) {\n var isShiftKey = _ref.isShiftKey,\n isLeftClick = _ref.isLeftClick,\n isRightClick = _ref.isRightClick,\n coords = _ref.coords,\n selection = _ref.selection,\n controller = _ref.controller;\n var currentSelection = selection.isSelected() ? selection.getSelectedRange().current() : null;\n var selectedCorner = selection.isSelectedByCorner();\n var selectedRow = selection.isSelectedByRowHeader();\n\n if (isShiftKey && currentSelection) {\n if (coords.row >= 0 && coords.col >= 0 && !controller.cells) {\n selection.setRangeEnd(coords);\n } else if ((selectedCorner || selectedRow) && coords.row >= 0 && coords.col >= 0 && !controller.cells) {\n selection.setRangeEnd(new CellCoords(coords.row, coords.col));\n } else if (selectedCorner && coords.row < 0 && !controller.column) {\n selection.setRangeEnd(new CellCoords(currentSelection.to.row, coords.col));\n } else if (selectedRow && coords.col < 0 && !controller.row) {\n selection.setRangeEnd(new CellCoords(coords.row, currentSelection.to.col));\n } else if ((!selectedCorner && !selectedRow && coords.col < 0 || selectedCorner && coords.col < 0) && !controller.row) {\n selection.selectRows(Math.max(currentSelection.from.row, 0), coords.row);\n } else if ((!selectedCorner && !selectedRow && coords.row < 0 || selectedRow && coords.row < 0) && !controller.column) {\n selection.selectColumns(Math.max(currentSelection.from.col, 0), coords.col);\n }\n } else {\n var allowRightClickSelection = !selection.inInSelection(coords);\n var performSelection = isLeftClick || isRightClick && allowRightClickSelection; // clicked row header and when some column was selected\n\n if (coords.row < 0 && coords.col >= 0 && !controller.column) {\n if (performSelection) {\n selection.selectColumns(coords.col);\n } // clicked column header and when some row was selected\n\n } else if (coords.col < 0 && coords.row >= 0 && !controller.row) {\n if (performSelection) {\n selection.selectRows(coords.row);\n }\n } else if (coords.col >= 0 && coords.row >= 0 && !controller.cells) {\n if (performSelection) {\n selection.setRangeStart(coords);\n }\n } else if (coords.col < 0 && coords.row < 0) {\n selection.selectAll(true, true);\n }\n }\n}\n/**\n * MouseOver handler.\n *\n * @param {object} options The handler options.\n * @param {boolean} options.isLeftClick Indicates that event was fired using the left mouse button.\n * @param {CellRange} options.coords The CellCoords object with defined visual coordinates.\n * @param {Selection} options.selection The Selection class instance.\n * @param {object} options.controller An object with keys `row`, `column`, `cell` which indicate what\n * operation will be performed in later selection stages.\n */\n\nexport function mouseOver(_ref2) {\n var isLeftClick = _ref2.isLeftClick,\n coords = _ref2.coords,\n selection = _ref2.selection,\n controller = _ref2.controller;\n\n if (!isLeftClick) {\n return;\n }\n\n var selectedRow = selection.isSelectedByRowHeader();\n var selectedColumn = selection.isSelectedByColumnHeader();\n var countCols = selection.tableProps.countCols();\n var countRows = selection.tableProps.countRows();\n\n if (selectedColumn && !controller.column) {\n selection.setRangeEnd(new CellCoords(countRows - 1, coords.col));\n } else if (selectedRow && !controller.row) {\n selection.setRangeEnd(new CellCoords(coords.row, countCols - 1));\n } else if (!controller.cell) {\n selection.setRangeEnd(coords);\n }\n}\nvar handlers = new Map([['mousedown', mouseDown], ['mouseover', mouseOver], ['touchstart', mouseDown]]);\n/**\n * Mouse handler for selection functionality.\n *\n * @param {Event} event An native event to handle.\n * @param {object} options The handler options.\n * @param {CellRange} options.coords The CellCoords object with defined visual coordinates.\n * @param {Selection} options.selection The Selection class instance.\n * @param {object} options.controller An object with keys `row`, `column`, `cell` which indicate what\n * operation will be performed in later selection stages.\n */\n\nexport function handleMouseEvent(event, _ref3) {\n var coords = _ref3.coords,\n selection = _ref3.selection,\n controller = _ref3.controller;\n handlers.get(event.type)({\n coords: coords,\n selection: selection,\n controller: controller,\n isShiftKey: event.shiftKey,\n isLeftClick: isLeftClickEvent(event) || event.type === 'touchstart',\n isRightClick: isRightClickEvent(event)\n });\n}","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { addClass, clearTextSelection, empty, fastInnerHTML, fastInnerText, getScrollbarWidth, hasClass, isChildOf, isInput, isOutsideInput } from \"./helpers/dom/element.mjs\";\nimport EventManager from \"./eventManager.mjs\";\nimport { isImmediatePropagationStopped, isRightClick, isLeftClick } from \"./helpers/dom/event.mjs\";\nimport Walkontable, { CellCoords } from \"./3rdparty/walkontable/src/index.mjs\";\nimport { handleMouseEvent } from \"./selection/mouseEventHandler.mjs\";\nvar privatePool = new WeakMap();\n/**\n * @class TableView\n * @private\n */\n\nvar TableView = /*#__PURE__*/function () {\n /**\n * @param {Hanstontable} instance Instance of {@link Handsontable}.\n */\n function TableView(instance) {\n _classCallCheck(this, TableView);\n /**\n * Instance of {@link Handsontable}.\n *\n * @private\n * @type {Handsontable}\n */\n\n\n this.instance = instance;\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n\n this.eventManager = new EventManager(instance);\n /**\n * Current Handsontable's GridSettings object.\n *\n * @private\n * @type {GridSettings}\n */\n\n this.settings = instance.getSettings();\n /**\n * Main element.\n *\n * @type {HTMLTableSectionElement}\n */\n\n this.THEAD = void 0;\n /**\n * Main element.\n *\n * @type {HTMLTableSectionElement}\n */\n\n this.TBODY = void 0;\n /**\n * Main Walkontable instance.\n *\n * @type {Walkontable}\n */\n\n this.wt = void 0;\n /**\n * Main Walkontable instance.\n *\n * @private\n * @type {Walkontable}\n */\n\n this.activeWt = void 0;\n /**\n * The flag determines if the `adjustElementsSize` method call was made during\n * the render suspending. If true, the method has to be triggered once after render\n * resuming.\n *\n * @private\n * @type {boolean}\n */\n\n this.postponedAdjustElementsSize = false;\n privatePool.set(this, {\n /**\n * Defines if the text should be selected during mousemove.\n *\n * @private\n * @type {boolean}\n */\n selectionMouseDown: false,\n\n /**\n * @private\n * @type {boolean}\n */\n mouseDown: void 0,\n\n /**\n * Main element.\n *\n * @private\n * @type {HTMLTableElement}\n */\n table: void 0,\n\n /**\n * Cached width of the rootElement.\n *\n * @type {number}\n */\n lastWidth: 0,\n\n /**\n * Cached height of the rootElement.\n *\n * @type {number}\n */\n lastHeight: 0\n });\n this.createElements();\n this.registerEvents();\n this.initializeWalkontable();\n }\n /**\n * Renders WalkontableUI.\n */\n\n\n _createClass(TableView, [{\n key: \"render\",\n value: function render() {\n if (!this.instance.isRenderSuspended()) {\n if (this.postponedAdjustElementsSize) {\n this.postponedAdjustElementsSize = false;\n this.adjustElementsSize(true);\n }\n\n this.wt.draw(!this.instance.forceFullRender);\n this.instance.forceFullRender = false;\n this.instance.renderCall = false;\n }\n }\n /**\n * Adjust overlays elements size and master table size.\n *\n * @param {boolean} [force=false] When `true`, it adjust the DOM nodes sizes for all overlays.\n */\n\n }, {\n key: \"adjustElementsSize\",\n value: function adjustElementsSize() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (this.instance.isRenderSuspended()) {\n this.postponedAdjustElementsSize = true;\n } else {\n this.wt.wtOverlays.adjustElementsSize(force);\n }\n }\n /**\n * Returns td object given coordinates.\n *\n * @param {CellCoords} coords Renderable cell coordinates.\n * @param {boolean} topmost Indicates whether the cell should be calculated from the topmost.\n * @returns {HTMLTableCellElement|null}\n */\n\n }, {\n key: \"getCellAtCoords\",\n value: function getCellAtCoords(coords, topmost) {\n var td = this.wt.getCell(coords, topmost);\n\n if (td < 0) {\n // there was an exit code (cell is out of bounds)\n return null;\n }\n\n return td;\n }\n /**\n * Scroll viewport to a cell.\n *\n * @param {CellCoords} coords Renderable cell coordinates.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right side of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom side of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left side of the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollViewport\",\n value: function scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft) {\n return this.wt.scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft);\n }\n /**\n * Scroll viewport to a column.\n *\n * @param {number} column Renderable column index.\n * @param {boolean} [snapToRight] If `true`, viewport is scrolled to show the cell on the right side of the table.\n * @param {boolean} [snapToLeft] If `true`, viewport is scrolled to show the cell on the left side of the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollViewportHorizontally\",\n value: function scrollViewportHorizontally(column, snapToRight, snapToLeft) {\n return this.wt.scrollViewportHorizontally(column, snapToRight, snapToLeft);\n }\n /**\n * Scroll viewport to a row.\n *\n * @param {number} row Renderable row index.\n * @param {boolean} [snapToTop] If `true`, viewport is scrolled to show the cell on the top of the table.\n * @param {boolean} [snapToBottom] If `true`, viewport is scrolled to show the cell on the bottom side of the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"scrollViewportVertically\",\n value: function scrollViewportVertically(row, snapToTop, snapToBottom) {\n return this.wt.scrollViewportVertically(row, snapToTop, snapToBottom);\n }\n /**\n * Prepares DOMElements and adds correct className to the root element.\n *\n * @private\n */\n\n }, {\n key: \"createElements\",\n value: function createElements() {\n var priv = privatePool.get(this);\n var _this$instance = this.instance,\n rootElement = _this$instance.rootElement,\n rootDocument = _this$instance.rootDocument;\n var originalStyle = rootElement.getAttribute('style');\n\n if (originalStyle) {\n rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions\n }\n\n addClass(rootElement, 'handsontable');\n priv.table = rootDocument.createElement('TABLE');\n addClass(priv.table, 'htCore');\n\n if (this.instance.getSettings().tableClassName) {\n addClass(priv.table, this.instance.getSettings().tableClassName);\n }\n\n this.THEAD = rootDocument.createElement('THEAD');\n priv.table.appendChild(this.THEAD);\n this.TBODY = rootDocument.createElement('TBODY');\n priv.table.appendChild(this.TBODY);\n this.instance.table = priv.table;\n this.instance.container.insertBefore(priv.table, this.instance.container.firstChild);\n }\n /**\n * Attaches necessary listeners.\n *\n * @private\n */\n\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this = this;\n\n var priv = privatePool.get(this);\n var _this$instance2 = this.instance,\n rootElement = _this$instance2.rootElement,\n rootDocument = _this$instance2.rootDocument,\n selection = _this$instance2.selection;\n var documentElement = rootDocument.documentElement;\n this.eventManager.addEventListener(rootElement, 'mousedown', function (event) {\n priv.selectionMouseDown = true;\n\n if (!_this.isTextSelectionAllowed(event.target)) {\n var rootWindow = _this.instance.rootWindow;\n clearTextSelection(rootWindow);\n event.preventDefault();\n rootWindow.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.\n }\n });\n this.eventManager.addEventListener(rootElement, 'mouseup', function () {\n priv.selectionMouseDown = false;\n });\n this.eventManager.addEventListener(rootElement, 'mousemove', function (event) {\n if (priv.selectionMouseDown && !_this.isTextSelectionAllowed(event.target)) {\n // Clear selection only when fragmentSelection is enabled, otherwise clearing selection breakes the IME editor.\n if (_this.settings.fragmentSelection) {\n clearTextSelection(_this.instance.rootWindow);\n }\n\n event.preventDefault();\n }\n });\n this.eventManager.addEventListener(documentElement, 'keyup', function (event) {\n if (selection.isInProgress() && !event.shiftKey) {\n selection.finish();\n }\n });\n this.eventManager.addEventListener(documentElement, 'mouseup', function (event) {\n if (selection.isInProgress() && isLeftClick(event)) {\n // is left mouse button\n selection.finish();\n }\n\n priv.mouseDown = false;\n\n if (isOutsideInput(rootDocument.activeElement) || !selection.isSelected() && !selection.isSelectedByAnyHeader() && !rootElement.contains(event.target) && !isRightClick(event)) {\n _this.instance.unlisten();\n }\n });\n this.eventManager.addEventListener(documentElement, 'contextmenu', function (event) {\n if (selection.isInProgress() && isRightClick(event)) {\n selection.finish();\n priv.mouseDown = false;\n }\n });\n this.eventManager.addEventListener(documentElement, 'touchend', function () {\n if (selection.isInProgress()) {\n selection.finish();\n }\n\n priv.mouseDown = false;\n });\n this.eventManager.addEventListener(documentElement, 'mousedown', function (event) {\n var originalTarget = event.target;\n var eventX = event.x || event.clientX;\n var eventY = event.y || event.clientY;\n var next = event.target;\n\n if (priv.mouseDown || !rootElement || !_this.instance.view) {\n return; // it must have been started in a cell\n } // immediate click on \"holder\" means click on the right side of vertical scrollbar\n\n\n var holder = _this.instance.view.wt.wtTable.holder;\n\n if (next === holder) {\n var scrollbarWidth = getScrollbarWidth(rootDocument);\n\n if (rootDocument.elementFromPoint(eventX + scrollbarWidth, eventY) !== holder || rootDocument.elementFromPoint(eventX, eventY + scrollbarWidth) !== holder) {\n return;\n }\n } else {\n while (next !== documentElement) {\n if (next === null) {\n if (event.isTargetWebComponent) {\n break;\n } // click on something that was a row but now is detached (possibly because your click triggered a rerender)\n\n\n return;\n }\n\n if (next === rootElement) {\n // click inside container\n return;\n }\n\n next = next.parentNode;\n }\n } // function did not return until here, we have an outside click!\n\n\n var outsideClickDeselects = typeof _this.settings.outsideClickDeselects === 'function' ? _this.settings.outsideClickDeselects(originalTarget) : _this.settings.outsideClickDeselects;\n\n if (outsideClickDeselects) {\n _this.instance.deselectCell();\n } else {\n _this.instance.destroyEditor(false, false);\n }\n });\n this.eventManager.addEventListener(priv.table, 'selectstart', function (event) {\n if (_this.settings.fragmentSelection || isInput(event.target)) {\n return;\n } // https://github.com/handsontable/handsontable/issues/160\n // Prevent text from being selected when performing drag down.\n\n\n event.preventDefault();\n });\n }\n /**\n * Translate renderable cell coordinates to visual coordinates.\n *\n * @param {CellCoords} coords The cell coordinates.\n * @returns {CellCoords}\n */\n\n }, {\n key: \"translateFromRenderableToVisualCoords\",\n value: function translateFromRenderableToVisualCoords(_ref) {\n var row = _ref.row,\n col = _ref.col; // TODO: To consider an idea to reusing the CellCoords instance instead creating new one.\n\n return _construct(CellCoords, _toConsumableArray(this.translateFromRenderableToVisualIndex(row, col)));\n }\n /**\n * Translate renderable row and column indexes to visual row and column indexes.\n *\n * @param {number} renderableRow Renderable row index.\n * @param {number} renderableColumn Renderable columnIndex.\n * @returns {number[]}\n */\n\n }, {\n key: \"translateFromRenderableToVisualIndex\",\n value: function translateFromRenderableToVisualIndex(renderableRow, renderableColumn) {\n // TODO: Some helper may be needed.\n // We perform translation for indexes (without headers).\n var visualRow = renderableRow >= 0 ? this.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow;\n var visualColumn = renderableColumn >= 0 ? this.instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn;\n\n if (visualRow === null) {\n visualRow = renderableRow;\n }\n\n if (visualColumn === null) {\n visualColumn = renderableColumn;\n }\n\n return [visualRow, visualColumn];\n }\n /**\n * Returns the number of renderable indexes.\n *\n * @private\n * @param {IndexMapper} indexMapper The IndexMapper instance for specific axis.\n * @param {number} maxElements Maximum number of elements (rows or columns).\n *\n * @returns {number|*}\n */\n\n }, {\n key: \"countRenderableIndexes\",\n value: function countRenderableIndexes(indexMapper, maxElements) {\n var consideredElements = Math.min(indexMapper.getNotTrimmedIndexesLength(), maxElements); // Don't take hidden indexes into account. We are looking just for renderable indexes.\n\n var firstNotHiddenIndex = indexMapper.getFirstNotHiddenIndex(consideredElements - 1, -1); // There are no renderable indexes.\n\n if (firstNotHiddenIndex === null) {\n return 0;\n }\n\n return indexMapper.getRenderableFromVisualIndex(firstNotHiddenIndex) + 1;\n }\n /**\n * Returns the number of renderable columns.\n *\n * @returns {number}\n */\n\n }, {\n key: \"countRenderableColumns\",\n value: function countRenderableColumns() {\n return this.countRenderableIndexes(this.instance.columnIndexMapper, this.settings.maxCols);\n }\n /**\n * Returns the number of renderable rows.\n *\n * @returns {number}\n */\n\n }, {\n key: \"countRenderableRows\",\n value: function countRenderableRows() {\n return this.countRenderableIndexes(this.instance.rowIndexMapper, this.settings.maxRows);\n }\n /**\n * Returns number of not hidden row indexes counting from the passed starting index.\n * The counting direction can be controlled by `incrementBy` argument.\n *\n * @param {number} visualIndex The visual index from which the counting begins.\n * @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.\n * @returns {number}\n */\n\n }, {\n key: \"countNotHiddenRowIndexes\",\n value: function countNotHiddenRowIndexes(visualIndex, incrementBy) {\n return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.rowIndexMapper, this.countRenderableRows());\n }\n /**\n * Returns number of not hidden column indexes counting from the passed starting index.\n * The counting direction can be controlled by `incrementBy` argument.\n *\n * @param {number} visualIndex The visual index from which the counting begins.\n * @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.\n * @returns {number}\n */\n\n }, {\n key: \"countNotHiddenColumnIndexes\",\n value: function countNotHiddenColumnIndexes(visualIndex, incrementBy) {\n return this.countNotHiddenIndexes(visualIndex, incrementBy, this.instance.columnIndexMapper, this.countRenderableColumns());\n }\n /**\n * Returns number of not hidden indexes counting from the passed starting index.\n * The counting direction can be controlled by `incrementBy` argument.\n *\n * @param {number} visualIndex The visual index from which the counting begins.\n * @param {number} incrementBy If `-1` then counting is backwards or forward when `1`.\n * @param {IndexMapper} indexMapper The IndexMapper instance for specific axis.\n * @param {number} renderableIndexesCount Total count of renderable indexes for specific axis.\n * @returns {number}\n */\n\n }, {\n key: \"countNotHiddenIndexes\",\n value: function countNotHiddenIndexes(visualIndex, incrementBy, indexMapper, renderableIndexesCount) {\n if (isNaN(visualIndex) || visualIndex < 0) {\n return 0;\n }\n\n var firstVisibleIndex = indexMapper.getFirstNotHiddenIndex(visualIndex, incrementBy);\n var renderableIndex = indexMapper.getRenderableFromVisualIndex(firstVisibleIndex);\n\n if (!Number.isInteger(renderableIndex)) {\n return 0;\n }\n\n var notHiddenIndexes = 0;\n\n if (incrementBy < 0) {\n // Zero-based numbering for renderable indexes corresponds to a number of not hidden indexes.\n notHiddenIndexes = renderableIndex + 1;\n } else if (incrementBy > 0) {\n notHiddenIndexes = renderableIndexesCount - renderableIndex;\n }\n\n return notHiddenIndexes;\n }\n /**\n * Defines default configuration and initializes WalkOnTable intance.\n *\n * @private\n */\n\n }, {\n key: \"initializeWalkontable\",\n value: function initializeWalkontable() {\n var _this2 = this;\n\n var priv = privatePool.get(this);\n var walkontableConfig = {\n externalRowCalculator: this.instance.getPlugin('autoRowSize') && this.instance.getPlugin('autoRowSize').isEnabled(),\n table: priv.table,\n preventOverflow: function preventOverflow() {\n return _this2.settings.preventOverflow;\n },\n preventWheel: function preventWheel() {\n return _this2.settings.preventWheel;\n },\n stretchH: function stretchH() {\n return _this2.settings.stretchH;\n },\n data: function data(renderableRow, renderableColumn) {\n var _this2$instance;\n\n return (_this2$instance = _this2.instance).getDataAtCell.apply(_this2$instance, _toConsumableArray(_this2.translateFromRenderableToVisualIndex(renderableRow, renderableColumn)));\n },\n totalRows: function totalRows() {\n return _this2.countRenderableRows();\n },\n totalColumns: function totalColumns() {\n return _this2.countRenderableColumns();\n },\n // Number of renderable columns for the left overlay.\n fixedColumnsLeft: function fixedColumnsLeft() {\n var countCols = _this2.instance.countCols();\n\n var visualFixedColumnsLeft = Math.min(parseInt(_this2.settings.fixedColumnsLeft, 10), countCols) - 1;\n return _this2.countNotHiddenColumnIndexes(visualFixedColumnsLeft, -1);\n },\n // Number of renderable rows for the top overlay.\n fixedRowsTop: function fixedRowsTop() {\n var countRows = _this2.instance.countRows();\n\n var visualFixedRowsTop = Math.min(parseInt(_this2.settings.fixedRowsTop, 10), countRows) - 1;\n return _this2.countNotHiddenRowIndexes(visualFixedRowsTop, -1);\n },\n // Number of renderable rows for the bottom overlay.\n fixedRowsBottom: function fixedRowsBottom() {\n var countRows = _this2.instance.countRows();\n\n var visualFixedRowsBottom = Math.max(countRows - parseInt(_this2.settings.fixedRowsBottom, 10), 0);\n return _this2.countNotHiddenRowIndexes(visualFixedRowsBottom, 1);\n },\n // Enable the left overlay when conditions are met.\n shouldRenderLeftOverlay: function shouldRenderLeftOverlay() {\n return _this2.settings.fixedColumnsLeft > 0 || walkontableConfig.rowHeaders().length > 0;\n },\n // Enable the top overlay when conditions are met.\n shouldRenderTopOverlay: function shouldRenderTopOverlay() {\n return _this2.settings.fixedRowsTop > 0 || walkontableConfig.columnHeaders().length > 0;\n },\n // Enable the bottom overlay when conditions are met.\n shouldRenderBottomOverlay: function shouldRenderBottomOverlay() {\n return _this2.settings.fixedRowsBottom > 0;\n },\n minSpareRows: function minSpareRows() {\n return _this2.settings.minSpareRows;\n },\n renderAllRows: this.settings.renderAllRows,\n rowHeaders: function rowHeaders() {\n var headerRenderers = [];\n\n if (_this2.instance.hasRowHeaders()) {\n headerRenderers.push(function (renderableRowIndex, TH) {\n // TODO: Some helper may be needed.\n // We perform translation for row indexes (without row headers).\n var visualRowIndex = renderableRowIndex >= 0 ? _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;\n\n _this2.appendRowHeader(visualRowIndex, TH);\n });\n }\n\n _this2.instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);\n\n return headerRenderers;\n },\n columnHeaders: function columnHeaders() {\n var headerRenderers = [];\n\n if (_this2.instance.hasColHeaders()) {\n headerRenderers.push(function (renderedColumnIndex, TH) {\n // TODO: Some helper may be needed.\n // We perform translation for columns indexes (without column headers).\n var visualColumnsIndex = renderedColumnIndex >= 0 ? _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex) : renderedColumnIndex;\n\n _this2.appendColHeader(visualColumnsIndex, TH);\n });\n }\n\n _this2.instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);\n\n return headerRenderers;\n },\n columnWidth: function columnWidth(renderedColumnIndex) {\n var visualIndex = _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex); // It's not a bug that we can't find visual index for some handled by method indexes. The function is called also\n // for not displayed indexes (beyond the table boundaries), i.e. when `fixedColumnsLeft` > `startCols` (wrong config?) or\n // scrolling and dataset is empty (scroll should handle that?).\n\n\n return _this2.instance.getColWidth(visualIndex === null ? renderedColumnIndex : visualIndex);\n },\n rowHeight: function rowHeight(renderedRowIndex) {\n var visualIndex = _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(renderedRowIndex);\n\n return _this2.instance.getRowHeight(visualIndex === null ? renderedRowIndex : visualIndex);\n },\n cellRenderer: function cellRenderer(renderedRowIndex, renderedColumnIndex, TD) {\n var _this2$translateFromR = _this2.translateFromRenderableToVisualIndex(renderedRowIndex, renderedColumnIndex),\n _this2$translateFromR2 = _slicedToArray(_this2$translateFromR, 2),\n visualRowIndex = _this2$translateFromR2[0],\n visualColumnIndex = _this2$translateFromR2[1]; // Coords may be modified. For example, by the `MergeCells` plugin. It should affect cell value and cell meta.\n\n\n var modifiedCellCoords = _this2.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex);\n\n var visualRowToCheck = visualRowIndex;\n var visualColumnToCheck = visualColumnIndex;\n\n if (Array.isArray(modifiedCellCoords)) {\n var _modifiedCellCoords = _slicedToArray(modifiedCellCoords, 2);\n\n visualRowToCheck = _modifiedCellCoords[0];\n visualColumnToCheck = _modifiedCellCoords[1];\n }\n\n var cellProperties = _this2.instance.getCellMeta(visualRowToCheck, visualColumnToCheck);\n\n var prop = _this2.instance.colToProp(visualColumnToCheck);\n\n var value = _this2.instance.getDataAtRowProp(visualRowToCheck, prop);\n\n if (_this2.instance.hasHook('beforeValueRender')) {\n value = _this2.instance.runHooks('beforeValueRender', value, cellProperties);\n }\n\n _this2.instance.runHooks('beforeRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);\n\n _this2.instance.getCellRenderer(cellProperties)(_this2.instance, TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);\n\n _this2.instance.runHooks('afterRenderer', TD, visualRowIndex, visualColumnIndex, prop, value, cellProperties);\n },\n selections: this.instance.selection.highlight,\n hideBorderOnMouseDownOver: function hideBorderOnMouseDownOver() {\n return _this2.settings.fragmentSelection;\n },\n onWindowResize: function onWindowResize() {\n if (!_this2.instance || _this2.instance.isDestroyed) {\n return;\n }\n\n _this2.instance.refreshDimensions();\n },\n onCellMouseDown: function onCellMouseDown(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n\n var blockCalculations = {\n row: false,\n column: false,\n cell: false\n };\n\n _this2.instance.listen();\n\n _this2.activeWt = wt;\n priv.mouseDown = true;\n\n _this2.instance.runHooks('beforeOnCellMouseDown', event, visualCoords, TD, blockCalculations);\n\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n handleMouseEvent(event, {\n coords: visualCoords,\n selection: _this2.instance.selection,\n controller: blockCalculations\n });\n\n _this2.instance.runHooks('afterOnCellMouseDown', event, visualCoords, TD);\n\n _this2.activeWt = _this2.wt;\n },\n onCellContextMenu: function onCellContextMenu(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n\n _this2.activeWt = wt;\n priv.mouseDown = false;\n\n if (_this2.instance.selection.isInProgress()) {\n _this2.instance.selection.finish();\n }\n\n _this2.instance.runHooks('beforeOnCellContextMenu', event, visualCoords, TD);\n\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n _this2.instance.runHooks('afterOnCellContextMenu', event, visualCoords, TD);\n\n _this2.activeWt = _this2.wt;\n },\n onCellMouseOut: function onCellMouseOut(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n\n _this2.activeWt = wt;\n\n _this2.instance.runHooks('beforeOnCellMouseOut', event, visualCoords, TD);\n\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n _this2.instance.runHooks('afterOnCellMouseOut', event, visualCoords, TD);\n\n _this2.activeWt = _this2.wt;\n },\n onCellMouseOver: function onCellMouseOver(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n\n var blockCalculations = {\n row: false,\n column: false,\n cell: false\n };\n _this2.activeWt = wt;\n\n _this2.instance.runHooks('beforeOnCellMouseOver', event, visualCoords, TD, blockCalculations);\n\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n if (priv.mouseDown) {\n handleMouseEvent(event, {\n coords: visualCoords,\n selection: _this2.instance.selection,\n controller: blockCalculations\n });\n }\n\n _this2.instance.runHooks('afterOnCellMouseOver', event, visualCoords, TD);\n\n _this2.activeWt = _this2.wt;\n },\n onCellMouseUp: function onCellMouseUp(event, coords, TD, wt) {\n var visualCoords = _this2.translateFromRenderableToVisualCoords(coords);\n\n _this2.activeWt = wt;\n\n _this2.instance.runHooks('beforeOnCellMouseUp', event, visualCoords, TD); // TODO: Second argument is for workaround. Callback corresponding the method `updateSettings` disable plugin\n // and enable it again. Disabling plugin closes the menu. Thus, calling the `updateSettings` in a body of\n // any callback executed right after some context-menu action breaks the table (#7231).\n\n\n if (isImmediatePropagationStopped(event) || _this2.instance.isDestroyed) {\n return;\n }\n\n _this2.instance.runHooks('afterOnCellMouseUp', event, visualCoords, TD);\n\n _this2.activeWt = _this2.wt;\n },\n onCellCornerMouseDown: function onCellCornerMouseDown(event) {\n event.preventDefault();\n\n _this2.instance.runHooks('afterOnCellCornerMouseDown', event);\n },\n onCellCornerDblClick: function onCellCornerDblClick(event) {\n event.preventDefault();\n\n _this2.instance.runHooks('afterOnCellCornerDblClick', event);\n },\n beforeDraw: function beforeDraw(force, skipRender) {\n return _this2.beforeRender(force, skipRender);\n },\n onDraw: function onDraw(force) {\n return _this2.onDraw(force);\n },\n onScrollVertically: function onScrollVertically() {\n return _this2.instance.runHooks('afterScrollVertically');\n },\n onScrollHorizontally: function onScrollHorizontally() {\n return _this2.instance.runHooks('afterScrollHorizontally');\n },\n onBeforeRemoveCellClassNames: function onBeforeRemoveCellClassNames() {\n return _this2.instance.runHooks('beforeRemoveCellClassNames');\n },\n onAfterDrawSelection: function onAfterDrawSelection(currentRow, currentColumn, layerLevel) {\n var cornersOfSelection;\n\n var _this2$translateFromR3 = _this2.translateFromRenderableToVisualIndex(currentRow, currentColumn),\n _this2$translateFromR4 = _slicedToArray(_this2$translateFromR3, 2),\n visualRowIndex = _this2$translateFromR4[0],\n visualColumnIndex = _this2$translateFromR4[1];\n\n var selectedRange = _this2.instance.selection.getSelectedRange();\n\n var selectionRangeSize = selectedRange.size();\n\n if (selectionRangeSize > 0) {\n // Selection layers are stored from the \"oldest\" to the \"newest\". We should calculate the offset.\n // Please look at the `SelectedRange` class and it's method for getting selection's layer for more information.\n var selectionOffset = (layerLevel !== null && layerLevel !== void 0 ? layerLevel : 0) + 1 - selectionRangeSize;\n var selectionForLayer = selectedRange.peekByIndex(selectionOffset);\n cornersOfSelection = [selectionForLayer.from.row, selectionForLayer.from.col, selectionForLayer.to.row, selectionForLayer.to.col];\n }\n\n return _this2.instance.runHooks('afterDrawSelection', visualRowIndex, visualColumnIndex, cornersOfSelection, layerLevel);\n },\n onBeforeDrawBorders: function onBeforeDrawBorders(corners, borderClassName) {\n var _corners = _slicedToArray(corners, 4),\n startRenderableRow = _corners[0],\n startRenderableColumn = _corners[1],\n endRenderableRow = _corners[2],\n endRenderableColumn = _corners[3];\n\n var visualCorners = [_this2.instance.rowIndexMapper.getVisualFromRenderableIndex(startRenderableRow), _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(startRenderableColumn), _this2.instance.rowIndexMapper.getVisualFromRenderableIndex(endRenderableRow), _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(endRenderableColumn)];\n return _this2.instance.runHooks('beforeDrawBorders', visualCorners, borderClassName);\n },\n onBeforeTouchScroll: function onBeforeTouchScroll() {\n return _this2.instance.runHooks('beforeTouchScroll');\n },\n onAfterMomentumScroll: function onAfterMomentumScroll() {\n return _this2.instance.runHooks('afterMomentumScroll');\n },\n onBeforeStretchingColumnWidth: function onBeforeStretchingColumnWidth(stretchedWidth, renderedColumnIndex) {\n var visualColumnIndex = _this2.instance.columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);\n\n return _this2.instance.runHooks('beforeStretchingColumnWidth', stretchedWidth, visualColumnIndex);\n },\n onModifyRowHeaderWidth: function onModifyRowHeaderWidth(rowHeaderWidth) {\n return _this2.instance.runHooks('modifyRowHeaderWidth', rowHeaderWidth);\n },\n onModifyGetCellCoords: function onModifyGetCellCoords(renderableRowIndex, renderableColumnIndex, topmost) {\n var rowMapper = _this2.instance.rowIndexMapper;\n var columnMapper = _this2.instance.columnIndexMapper; // Callback handle also headers. We shouldn't translate them.\n\n var visualColumnIndex = renderableColumnIndex >= 0 ? columnMapper.getVisualFromRenderableIndex(renderableColumnIndex) : renderableColumnIndex;\n var visualRowIndex = renderableRowIndex >= 0 ? rowMapper.getVisualFromRenderableIndex(renderableRowIndex) : renderableRowIndex;\n\n var visualIndexes = _this2.instance.runHooks('modifyGetCellCoords', visualRowIndex, visualColumnIndex, topmost);\n\n if (Array.isArray(visualIndexes)) {\n var _visualIndexes = _slicedToArray(visualIndexes, 4),\n visualRowFrom = _visualIndexes[0],\n visualColumnFrom = _visualIndexes[1],\n visualRowTo = _visualIndexes[2],\n visualColumnTo = _visualIndexes[3]; // Result of the hook is handled by the Walkontable (renderable indexes).\n\n\n return [visualRowFrom >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getFirstNotHiddenIndex(visualRowFrom, 1)) : visualRowFrom, visualColumnFrom >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getFirstNotHiddenIndex(visualColumnFrom, 1)) : visualColumnFrom, visualRowTo >= 0 ? rowMapper.getRenderableFromVisualIndex(rowMapper.getFirstNotHiddenIndex(visualRowTo, -1)) : visualRowTo, visualColumnTo >= 0 ? columnMapper.getRenderableFromVisualIndex(columnMapper.getFirstNotHiddenIndex(visualColumnTo, -1)) : visualColumnTo];\n }\n },\n viewportRowCalculatorOverride: function viewportRowCalculatorOverride(calc) {\n var viewportOffset = _this2.settings.viewportRowRenderingOffset;\n\n if (viewportOffset === 'auto' && _this2.settings.fixedRowsTop) {\n viewportOffset = 10;\n }\n\n if (viewportOffset > 0 || viewportOffset === 'auto') {\n var rows = _this2.countRenderableRows();\n\n if (typeof viewportOffset === 'number') {\n calc.startRow = Math.max(calc.startRow - viewportOffset, 0);\n calc.endRow = Math.min(calc.endRow + viewportOffset, rows - 1);\n } else if (viewportOffset === 'auto') {\n var center = calc.startRow + calc.endRow - calc.startRow;\n var offset = Math.ceil(center / rows * 12);\n calc.startRow = Math.max(calc.startRow - offset, 0);\n calc.endRow = Math.min(calc.endRow + offset, rows - 1);\n }\n }\n\n _this2.instance.runHooks('afterViewportRowCalculatorOverride', calc);\n },\n viewportColumnCalculatorOverride: function viewportColumnCalculatorOverride(calc) {\n var viewportOffset = _this2.settings.viewportColumnRenderingOffset;\n\n if (viewportOffset === 'auto' && _this2.settings.fixedColumnsLeft) {\n viewportOffset = 10;\n }\n\n if (viewportOffset > 0 || viewportOffset === 'auto') {\n var cols = _this2.countRenderableColumns();\n\n if (typeof viewportOffset === 'number') {\n calc.startColumn = Math.max(calc.startColumn - viewportOffset, 0);\n calc.endColumn = Math.min(calc.endColumn + viewportOffset, cols - 1);\n }\n\n if (viewportOffset === 'auto') {\n var center = calc.startColumn + calc.endColumn - calc.startColumn;\n var offset = Math.ceil(center / cols * 12);\n calc.startRow = Math.max(calc.startColumn - offset, 0);\n calc.endColumn = Math.min(calc.endColumn + offset, cols - 1);\n }\n }\n\n _this2.instance.runHooks('afterViewportColumnCalculatorOverride', calc);\n },\n rowHeaderWidth: function rowHeaderWidth() {\n return _this2.settings.rowHeaderWidth;\n },\n columnHeaderHeight: function columnHeaderHeight() {\n var columnHeaderHeight = _this2.instance.runHooks('modifyColumnHeaderHeight');\n\n return _this2.settings.columnHeaderHeight || columnHeaderHeight;\n }\n };\n this.instance.runHooks('beforeInitWalkontable', walkontableConfig);\n this.wt = new Walkontable(walkontableConfig);\n this.activeWt = this.wt;\n var spreader = this.wt.wtTable.spreader; // We have to cache width and height after Walkontable initialization.\n\n var _this$instance$rootEl = this.instance.rootElement.getBoundingClientRect(),\n width = _this$instance$rootEl.width,\n height = _this$instance$rootEl.height;\n\n this.setLastSize(width, height);\n this.eventManager.addEventListener(spreader, 'mousedown', function (event) {\n // right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar\n if (event.target === spreader && event.which === 3) {\n event.stopPropagation();\n }\n });\n this.eventManager.addEventListener(spreader, 'contextmenu', function (event) {\n // right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar\n if (event.target === spreader && event.which === 3) {\n event.stopPropagation();\n }\n });\n this.eventManager.addEventListener(this.instance.rootDocument.documentElement, 'click', function () {\n if (_this2.settings.observeDOMVisibility) {\n if (_this2.wt.drawInterrupted) {\n _this2.instance.forceFullRender = true;\n\n _this2.render();\n }\n }\n });\n }\n /**\n * Checks if it's possible to create text selection in element.\n *\n * @private\n * @param {HTMLElement} el The element to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isTextSelectionAllowed\",\n value: function isTextSelectionAllowed(el) {\n if (isInput(el)) {\n return true;\n }\n\n var isChildOfTableBody = isChildOf(el, this.instance.view.wt.wtTable.spreader);\n\n if (this.settings.fragmentSelection === true && isChildOfTableBody) {\n return true;\n }\n\n if (this.settings.fragmentSelection === 'cell' && this.isSelectedOnlyCell() && isChildOfTableBody) {\n return true;\n }\n\n if (!this.settings.fragmentSelection && this.isCellEdited() && this.isSelectedOnlyCell()) {\n return true;\n }\n\n return false;\n }\n /**\n * Checks if user's been called mousedown.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"isMouseDown\",\n value: function isMouseDown() {\n return privatePool.get(this).mouseDown;\n }\n /**\n * Check if selected only one cell.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"isSelectedOnlyCell\",\n value: function isSelectedOnlyCell() {\n var _this$instance$getSel, _this$instance$getSel2;\n\n return (_this$instance$getSel = (_this$instance$getSel2 = this.instance.getSelectedRangeLast()) === null || _this$instance$getSel2 === void 0 ? void 0 : _this$instance$getSel2.isSingle()) !== null && _this$instance$getSel !== void 0 ? _this$instance$getSel : false;\n }\n /**\n * Checks if active cell is editing.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"isCellEdited\",\n value: function isCellEdited() {\n var activeEditor = this.instance.getActiveEditor();\n return activeEditor && activeEditor.isOpened();\n }\n /**\n * `beforeDraw` callback.\n *\n * @private\n * @param {boolean} force If `true` rendering was triggered by a change of settings or data or `false` if\n * rendering was triggered by scrolling or moving selection.\n * @param {boolean} skipRender Indicates whether the rendering is skipped.\n */\n\n }, {\n key: \"beforeRender\",\n value: function beforeRender(force, skipRender) {\n if (force) {\n // this.instance.forceFullRender = did Handsontable request full render?\n this.instance.runHooks('beforeRender', this.instance.forceFullRender, skipRender);\n }\n }\n /**\n * `onDraw` callback.\n *\n * @private\n * @param {boolean} force If `true` rendering was triggered by a change of settings or data or `false` if\n * rendering was triggered by scrolling or moving selection.\n */\n\n }, {\n key: \"onDraw\",\n value: function onDraw(force) {\n if (force) {\n // this.instance.forceFullRender = did Handsontable request full render?\n this.instance.runHooks('afterRender', this.instance.forceFullRender);\n }\n }\n /**\n * Append row header to a TH element.\n *\n * @private\n * @param {number} visualRowIndex The visual row index.\n * @param {HTMLTableHeaderCellElement} TH The table header element.\n */\n\n }, {\n key: \"appendRowHeader\",\n value: function appendRowHeader(visualRowIndex, TH) {\n if (TH.firstChild) {\n var container = TH.firstChild;\n\n if (!hasClass(container, 'relative')) {\n empty(TH);\n this.appendRowHeader(visualRowIndex, TH);\n return;\n }\n\n this.updateCellHeader(container.querySelector('.rowHeader'), visualRowIndex, this.instance.getRowHeader);\n } else {\n var _this$instance3 = this.instance,\n rootDocument = _this$instance3.rootDocument,\n getRowHeader = _this$instance3.getRowHeader;\n var div = rootDocument.createElement('div');\n var span = rootDocument.createElement('span');\n div.className = 'relative';\n span.className = 'rowHeader';\n this.updateCellHeader(span, visualRowIndex, getRowHeader);\n div.appendChild(span);\n TH.appendChild(div);\n }\n\n this.instance.runHooks('afterGetRowHeader', visualRowIndex, TH);\n }\n /**\n * Append column header to a TH element.\n *\n * @private\n * @param {number} visualColumnIndex Visual column index.\n * @param {HTMLTableHeaderCellElement} TH The table header element.\n */\n\n }, {\n key: \"appendColHeader\",\n value: function appendColHeader(visualColumnIndex, TH) {\n if (TH.firstChild) {\n var container = TH.firstChild;\n\n if (hasClass(container, 'relative')) {\n this.updateCellHeader(container.querySelector('.colHeader'), visualColumnIndex, this.instance.getColHeader);\n } else {\n empty(TH);\n this.appendColHeader(visualColumnIndex, TH);\n }\n } else {\n var rootDocument = this.instance.rootDocument;\n var div = rootDocument.createElement('div');\n var span = rootDocument.createElement('span');\n div.className = 'relative';\n span.className = 'colHeader';\n this.updateCellHeader(span, visualColumnIndex, this.instance.getColHeader);\n div.appendChild(span);\n TH.appendChild(div);\n }\n\n this.instance.runHooks('afterGetColHeader', visualColumnIndex, TH);\n }\n /**\n * Updates header cell content.\n *\n * @since 0.15.0-beta4\n * @param {HTMLElement} element Element to update.\n * @param {number} index Row index or column index.\n * @param {Function} content Function which should be returns content for this cell.\n */\n\n }, {\n key: \"updateCellHeader\",\n value: function updateCellHeader(element, index, content) {\n var renderedIndex = index;\n var parentOverlay = this.wt.wtOverlays.getParentOverlay(element) || this.wt; // prevent wrong calculations from SampleGenerator\n\n if (element.parentNode) {\n if (hasClass(element, 'colHeader')) {\n renderedIndex = parentOverlay.wtTable.columnFilter.sourceToRendered(index);\n } else if (hasClass(element, 'rowHeader')) {\n renderedIndex = parentOverlay.wtTable.rowFilter.sourceToRendered(index);\n }\n }\n\n if (renderedIndex > -1) {\n fastInnerHTML(element, content(index));\n } else {\n // workaround for https://github.com/handsontable/handsontable/issues/1946\n fastInnerText(element, String.fromCharCode(160));\n addClass(element, 'cornerHeader');\n }\n }\n /**\n * Given a element's left position relative to the viewport, returns maximum element width until the right\n * edge of the viewport (before scrollbar).\n *\n * @private\n * @param {number} leftOffset The left offset.\n * @returns {number}\n */\n\n }, {\n key: \"maximumVisibleElementWidth\",\n value: function maximumVisibleElementWidth(leftOffset) {\n var workspaceWidth = this.wt.wtViewport.getWorkspaceWidth();\n var maxWidth = workspaceWidth - leftOffset;\n return maxWidth > 0 ? maxWidth : 0;\n }\n /**\n * Given a element's top position relative to the viewport, returns maximum element height until the bottom\n * edge of the viewport (before scrollbar).\n *\n * @private\n * @param {number} topOffset The top offset.\n * @returns {number}\n */\n\n }, {\n key: \"maximumVisibleElementHeight\",\n value: function maximumVisibleElementHeight(topOffset) {\n var workspaceHeight = this.wt.wtViewport.getWorkspaceHeight();\n var maxHeight = workspaceHeight - topOffset;\n return maxHeight > 0 ? maxHeight : 0;\n }\n /**\n * Sets new dimensions of the container.\n *\n * @param {number} width The table width.\n * @param {number} height The table height.\n */\n\n }, {\n key: \"setLastSize\",\n value: function setLastSize(width, height) {\n var priv = privatePool.get(this);\n var _ref2 = [width, height];\n priv.lastWidth = _ref2[0];\n priv.lastHeight = _ref2[1];\n }\n /**\n * Returns cached dimensions.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getLastSize\",\n value: function getLastSize() {\n var priv = privatePool.get(this);\n return {\n width: priv.lastWidth,\n height: priv.lastHeight\n };\n }\n /**\n * Checks if master overlay is active.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"mainViewIsActive\",\n value: function mainViewIsActive() {\n return this.wt === this.activeWt;\n }\n /**\n * Destroyes internal WalkOnTable's instance. Detaches all of the bonded listeners.\n *\n * @private\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.wt.destroy();\n this.eventManager.destroy();\n }\n }]);\n\n return TableView;\n}();\n\nexport default TableView;","import staticRegister from \"../utils/staticRegister.mjs\";\nimport { registerEditor } from \"../editors/registry.mjs\";\nimport { registerRenderer } from \"../renderers/registry.mjs\";\nimport { registerValidator } from \"../validators/registry.mjs\";\n\nvar _staticRegister = staticRegister('cellTypes'),\n register = _staticRegister.register,\n getItem = _staticRegister.getItem,\n hasItem = _staticRegister.hasItem,\n getNames = _staticRegister.getNames,\n getValues = _staticRegister.getValues;\n/**\n * Retrieve cell type object.\n *\n * @param {string} name Cell type identification.\n * @returns {object} Returns cell type object.\n */\n\n\nfunction _getItem(name) {\n if (!hasItem(name)) {\n throw Error(\"You declared cell type \\\"\".concat(name, \"\\\" 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\\n \\\"Handsontable.cellTypes.registerCellType\\\" method\"));\n }\n\n return getItem(name);\n}\n/**\n * Register cell type under specified name.\n *\n * @param {string} name Cell type identification.\n * @param {object} type An object with contains keys (eq: `editor`, `renderer`, `validator`) which describes specified behaviour of the cell.\n */\n\n\nfunction _register(name, type) {\n if (typeof name !== 'string') {\n type = name;\n name = type.CELL_TYPE;\n }\n\n var _type = type,\n editor = _type.editor,\n renderer = _type.renderer,\n validator = _type.validator;\n\n if (editor) {\n registerEditor(name, editor);\n }\n\n if (renderer) {\n registerRenderer(name, renderer);\n }\n\n if (validator) {\n registerValidator(name, validator);\n }\n\n register(name, type);\n}\n\nexport { _register as registerCellType, _getItem as getCellType, hasItem as hasCellType, getNames as getRegisteredCellTypeNames, getValues as getRegisteredCellTypes };","import \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport { getCellType } from \"./../cellTypes/registry.mjs\";\nimport { deepObjectSize, hasOwnProperty, isObject } from \"./object.mjs\";\nvar COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nvar COLUMN_LABEL_BASE_LENGTH = COLUMN_LABEL_BASE.length;\n/**\n * Generates spreadsheet-like column names: A, B, C, ..., Z, AA, AB, etc.\n *\n * @param {number} index Column index.\n * @returns {string}\n */\n\nexport function spreadsheetColumnLabel(index) {\n var dividend = index + 1;\n var columnLabel = '';\n var modulo;\n\n while (dividend > 0) {\n modulo = (dividend - 1) % COLUMN_LABEL_BASE_LENGTH;\n columnLabel = String.fromCharCode(65 + modulo) + columnLabel;\n dividend = parseInt((dividend - modulo) / COLUMN_LABEL_BASE_LENGTH, 10);\n }\n\n return columnLabel;\n}\n/**\n * Generates spreadsheet-like column index from theirs labels: A, B, C ...., Z, AA, AB, etc.\n *\n * @param {string} label Column label.\n * @returns {number}\n */\n\nexport function spreadsheetColumnIndex(label) {\n var result = 0;\n\n if (label) {\n for (var i = 0, j = label.length - 1; i < label.length; i += 1, j -= 1) {\n result += Math.pow(COLUMN_LABEL_BASE_LENGTH, j) * (COLUMN_LABEL_BASE.indexOf(label[i]) + 1);\n }\n }\n\n result -= 1;\n return result;\n}\n/**\n * Creates 2D array of Excel-like values \"A1\", \"A2\", ...\n *\n * @param {number} rows Number of rows to generate.\n * @param {number} columns Number of columns to generate.\n * @returns {Array}\n */\n\nexport function createSpreadsheetData() {\n var rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;\n var columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;\n var _rows = [];\n var i;\n var j;\n\n for (i = 0; i < rows; i++) {\n var row = [];\n\n for (j = 0; j < columns; j++) {\n row.push(spreadsheetColumnLabel(j) + (i + 1));\n }\n\n _rows.push(row);\n }\n\n return _rows;\n}\n/**\n * Creates 2D array of Excel-like values \"A1\", \"A2\", as an array of objects.\n *\n * @param {number} rows Number of rows to generate.\n * @param {number} colCount Number of columns to generate.\n * @returns {Array}\n */\n\nexport function createSpreadsheetObjectData() {\n var rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;\n var colCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;\n var _rows = [];\n var i;\n var j;\n\n for (i = 0; i < rows; i++) {\n var row = {};\n\n for (j = 0; j < colCount; j++) {\n row[\"prop\".concat(j)] = spreadsheetColumnLabel(j) + (i + 1);\n }\n\n _rows.push(row);\n }\n\n return _rows;\n}\n/**\n * Generates an empty data object.\n *\n * @param {number} rows Number of rows to generate.\n * @param {number} columns Number of columns to generate.\n * @returns {Array}\n */\n\nexport function createEmptySpreadsheetData(rows, columns) {\n var data = [];\n var row;\n\n for (var i = 0; i < rows; i++) {\n row = [];\n\n for (var j = 0; j < columns; j++) {\n row.push('');\n }\n\n data.push(row);\n }\n\n return data;\n}\n/**\n * @param {Array} input The data to translate.\n * @returns {Array}\n */\n\nexport function translateRowsToColumns(input) {\n var output = [];\n var i;\n var ilen;\n var j;\n var jlen;\n var olen = 0;\n\n for (i = 0, ilen = input.length; i < ilen; i++) {\n for (j = 0, jlen = input[i].length; j < jlen; j++) {\n if (j === olen) {\n output.push([]);\n olen += 1;\n }\n\n output[j].push(input[i][j]);\n }\n }\n\n return output;\n}\n/**\n * Factory that produces a function for searching methods (or any properties) which could be defined directly in\n * table configuration or implicitly, within cell type definition.\n *\n * For example: renderer can be defined explicitly using \"renderer\" property in column configuration or it can be\n * defined implicitly using \"type\" property.\n *\n * Methods/properties defined explicitly always takes precedence over those defined through \"type\".\n *\n * If the method/property is not found in an object, searching is continued recursively through prototype chain, until\n * it reaches the Object.prototype.\n *\n *\n * @param {string} methodName Name of the method/property to search (i.e. 'renderer', 'validator', 'copyable').\n * @param {boolean} [allowUndefined] If `false`, the search is continued if methodName has not been found in cell \"type\".\n * @returns {Function}\n */\n\nexport function cellMethodLookupFactory(methodName, allowUndefined) {\n var isUndefinedAllowed = typeof allowUndefined === 'undefined' ? true : allowUndefined;\n return function cellMethodLookup(row, col) {\n return function getMethodFromProperties(properties) {\n if (!properties) {\n return; // method or property not found\n }\n\n if (hasOwnProperty(properties, methodName) && properties[methodName] !== void 0) {\n // check if it is own and is not empty\n return properties[methodName]; // method defined directly\n } else if (hasOwnProperty(properties, 'type') && properties.type) {\n // check if it is own and is not empty\n if (typeof properties.type !== 'string') {\n throw new Error('Cell \"type\" must be a string');\n }\n\n var type = getCellType(properties.type);\n\n if (hasOwnProperty(type, methodName)) {\n return type[methodName]; // method defined in type.\n } else if (isUndefinedAllowed) {\n return; // method does not defined in type (eg. validator), returns undefined\n }\n }\n\n return getMethodFromProperties(Object.getPrototypeOf(properties));\n }(typeof row === 'number' ? this.getCellMeta(row, col) : row);\n };\n}\n/**\n * Transform a data row (either an array or an object) or an array of data rows to array of changes in a form of `[row, prop/col, value]`.\n * Convenient to use with `setDataAtRowProp` and `setSourceDataAtCell` methods.\n *\n * @param {Array|object} dataRow Object of row data, array of row data or an array of either.\n * @param {number} rowOffset Row offset to be passed to the resulting change list. Defaults to `0`.\n * @returns {Array} Array of changes (in a form of an array).\n */\n\nexport function dataRowToChangesArray(dataRow) {\n var rowOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var dataRows = dataRow;\n var changesArray = [];\n\n if (!Array.isArray(dataRow) || !Array.isArray(dataRow[0])) {\n dataRows = [dataRow];\n }\n\n dataRows.forEach(function (row, rowIndex) {\n if (Array.isArray(row)) {\n row.forEach(function (value, column) {\n changesArray.push([rowIndex + rowOffset, column, value]);\n });\n } else {\n Object.keys(row).forEach(function (propName) {\n changesArray.push([rowIndex + rowOffset, propName, row[propName]]);\n });\n }\n });\n return changesArray;\n}\n/**\n * Count the number of keys (or, basically, columns when the data is an array or arrays) in the first row of the provided dataset.\n *\n * @param {Array} data The dataset.\n * @returns {number} Number of keys in the first row of the dataset.\n */\n\nexport function countFirstRowKeys(data) {\n var result = 0;\n\n if (Array.isArray(data)) {\n if (data[0] && Array.isArray(data[0])) {\n result = data[0].length;\n } else if (data[0] && isObject(data[0])) {\n result = deepObjectSize(data[0]);\n }\n }\n\n return result;\n}","import \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { createObjectPropListener, getProperty, isObject, objectEach, setProperty } from \"./helpers/object.mjs\";\nimport { countFirstRowKeys as _countFirstRowKeys } from \"./helpers/data.mjs\";\nimport { arrayEach } from \"./helpers/array.mjs\";\nimport { rangeEach } from \"./helpers/number.mjs\";\nimport { isFunction } from \"./helpers/function.mjs\";\n/**\n * @class DataSource\n * @private\n */\n\nvar DataSource = /*#__PURE__*/function () {\n function DataSource(hotInstance) {\n var dataSource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n _classCallCheck(this, DataSource);\n /**\n * Instance of Handsontable.\n *\n * @type {Handsontable}\n */\n\n\n this.hot = hotInstance;\n /**\n * Data source.\n *\n * @type {Array}\n */\n\n this.data = dataSource;\n /**\n * Type of data source.\n *\n * @type {string}\n * @default 'array'\n */\n\n this.dataType = 'array';\n\n this.colToProp = function () {};\n\n this.propToCol = function () {};\n }\n /**\n * Run the `modifyRowData` hook and return either the modified or the source data for the provided row.\n *\n * @private\n * @param {number} rowIndex Row index.\n * @returns {Array|object} Source or modified row of data.\n */\n\n\n _createClass(DataSource, [{\n key: \"modifyRowData\",\n value: function modifyRowData(rowIndex) {\n var modifyRowData;\n\n if (this.hot.hasHook('modifyRowData')) {\n modifyRowData = this.hot.runHooks('modifyRowData', rowIndex);\n }\n\n return modifyRowData !== void 0 && !Number.isInteger(modifyRowData) ? modifyRowData : this.data[rowIndex];\n }\n /**\n * Get all data.\n *\n * @param {boolean} [toArray=false] If `true` return source data as an array of arrays even when source data was provided\n * in another format.\n * @returns {Array}\n */\n\n }, {\n key: \"getData\",\n value: function getData() {\n var toArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!this.data || this.data.length === 0) {\n return this.data;\n }\n\n return this.getByRange(null, null, toArray);\n }\n /**\n * Set new data source.\n *\n * @param {Array} data The new data.\n */\n\n }, {\n key: \"setData\",\n value: function setData(data) {\n this.data = data;\n }\n /**\n * Returns array of column values from the data source. `column` is the index of the row in the data source.\n *\n * @param {number} column Visual column index.\n * @returns {Array}\n */\n\n }, {\n key: \"getAtColumn\",\n value: function getAtColumn(column) {\n var _this = this;\n\n var result = [];\n arrayEach(this.data, function (row, rowIndex) {\n var value = _this.getAtCell(rowIndex, column);\n\n result.push(value);\n });\n return result;\n }\n /**\n * Returns a single row of the data or a subset of its columns. If a column range or `toArray` arguments are provided, it\n * operates only on the columns declared by the `columns` setting or the data schema.\n *\n * @param {number} row Physical row index.\n * @param {number} [startColumn] Starting index for the column range (optional).\n * @param {number} [endColumn] Ending index for the column range (optional).\n * @param {boolean} [toArray=false] `true` if the returned value should be forced to be presented as an array.\n * @returns {Array|object}\n */\n\n }, {\n key: \"getAtRow\",\n value: function getAtRow(row, startColumn, endColumn) {\n var _this2 = this;\n\n var toArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var getAllProps = startColumn === void 0 && endColumn === void 0;\n var dataRow = null;\n var newDataRow = null;\n dataRow = this.modifyRowData(row);\n\n if (Array.isArray(dataRow)) {\n newDataRow = [];\n\n if (getAllProps) {\n dataRow.forEach(function (cell, column) {\n newDataRow[column] = _this2.getAtPhysicalCell(row, column, dataRow);\n });\n } else {\n // Only the columns from the provided range\n rangeEach(startColumn, endColumn, function (column) {\n newDataRow[column - startColumn] = _this2.getAtPhysicalCell(row, column, dataRow);\n });\n }\n } else if (isObject(dataRow) || isFunction(dataRow)) {\n if (toArray) {\n newDataRow = [];\n } else {\n newDataRow = {};\n }\n\n if (!getAllProps || toArray) {\n var rangeStart = 0;\n var rangeEnd = this.countFirstRowKeys() - 1;\n rangeEach(rangeStart, rangeEnd, function (column) {\n var prop = _this2.colToProp(column);\n\n if (column >= (startColumn || rangeStart) && column <= (endColumn || rangeEnd) && !Number.isInteger(prop)) {\n var cellValue = _this2.getAtPhysicalCell(row, prop, dataRow);\n\n if (toArray) {\n newDataRow.push(cellValue);\n } else {\n setProperty(newDataRow, prop, cellValue);\n }\n }\n });\n } else {\n objectEach(dataRow, function (value, prop) {\n setProperty(newDataRow, prop, _this2.getAtPhysicalCell(row, prop, dataRow));\n });\n }\n }\n\n return newDataRow;\n }\n /**\n * Set the provided value in the source data set at the provided coordinates.\n *\n * @param {number} row Physical row index.\n * @param {number|string} column Property name / physical column index.\n * @param {*} value The value to be set at the provided coordinates.\n */\n\n }, {\n key: \"setAtCell\",\n value: function setAtCell(row, column, value) {\n if (row >= this.countRows() || column >= this.countFirstRowKeys()) {\n // Not enough rows and/or columns.\n return;\n }\n\n if (this.hot.hasHook('modifySourceData')) {\n var valueHolder = createObjectPropListener(value);\n this.hot.runHooks('modifySourceData', row, this.propToCol(column), valueHolder, 'set');\n\n if (valueHolder.isTouched()) {\n value = valueHolder.value;\n }\n }\n\n if (!Number.isInteger(column)) {\n // column argument is the prop name\n setProperty(this.data[row], column, value);\n } else {\n this.data[row][column] = value;\n }\n }\n /**\n * Get data from the source data set using the physical indexes.\n *\n * @private\n * @param {number} row Physical row index.\n * @param {string|number|Function} column Physical column index / property / function.\n * @param {Array|object} dataRow A representation of a data row.\n * @returns {*} Value at the provided coordinates.\n */\n\n }, {\n key: \"getAtPhysicalCell\",\n value: function getAtPhysicalCell(row, column, dataRow) {\n var result = null;\n\n if (dataRow) {\n if (typeof column === 'string') {\n result = getProperty(dataRow, column);\n } else if (typeof column === 'function') {\n result = column(dataRow);\n } else {\n result = dataRow[column];\n }\n }\n\n if (this.hot.hasHook('modifySourceData')) {\n var valueHolder = createObjectPropListener(result);\n this.hot.runHooks('modifySourceData', row, this.colToProp(column), valueHolder, 'get');\n\n if (valueHolder.isTouched()) {\n result = valueHolder.value;\n }\n }\n\n return result;\n }\n /**\n * Returns a single value from the data.\n *\n * @param {number} row Physical row index.\n * @param {number} column Visual column index.\n * @returns {*}\n */\n\n }, {\n key: \"getAtCell\",\n value: function getAtCell(row, column) {\n var dataRow = this.modifyRowData(row);\n return this.getAtPhysicalCell(row, this.colToProp(column), dataRow);\n }\n /**\n * Returns source data by passed range.\n *\n * @param {object} [start] Object with physical `row` and `col` keys (or visual column index, if data type is an array of objects).\n * @param {object} [end] Object with physical `row` and `col` keys (or visual column index, if data type is an array of objects).\n * @param {boolean} [toArray=false] If `true` return source data as an array of arrays even when source data was provided\n * in another format.\n * @returns {Array}\n */\n\n }, {\n key: \"getByRange\",\n value: function getByRange() {\n var _this3 = this;\n\n var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var toArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var getAllProps = false;\n var startRow = null;\n var startCol = null;\n var endRow = null;\n var endCol = null;\n\n if (start === null || end === null) {\n getAllProps = true;\n startRow = 0;\n endRow = this.countRows() - 1;\n } else {\n startRow = Math.min(start.row, end.row);\n startCol = Math.min(start.col, end.col);\n endRow = Math.max(start.row, end.row);\n endCol = Math.max(start.col, end.col);\n }\n\n var result = [];\n rangeEach(startRow, endRow, function (currentRow) {\n result.push(getAllProps ? _this3.getAtRow(currentRow, void 0, void 0, toArray) : _this3.getAtRow(currentRow, startCol, endCol, toArray));\n });\n return result;\n }\n /**\n * Count number of rows.\n *\n * @returns {number}\n */\n\n }, {\n key: \"countRows\",\n value: function countRows() {\n if (this.hot.hasHook('modifySourceLength')) {\n var modifiedSourceLength = this.hot.runHooks('modifySourceLength');\n\n if (Number.isInteger(modifiedSourceLength)) {\n return modifiedSourceLength;\n }\n }\n\n return this.data.length;\n }\n /**\n * Count number of columns.\n *\n * @returns {number}\n */\n\n }, {\n key: \"countFirstRowKeys\",\n value: function countFirstRowKeys() {\n return _countFirstRowKeys(this.data);\n }\n /**\n * Destroy instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.data = null;\n this.hot = null;\n }\n }]);\n\n return DataSource;\n}();\n\nexport default DataSource;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.string.includes.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nimport { arrayFilter } from \"../../../helpers/array.mjs\";\n/**\n * Insert new items to the list.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {number} insertionIndex Position inside the actual list.\n * @param {Array} insertedIndexes List of inserted indexes.\n * @returns {Array} List with new mappings.\n */\n\nexport function getListWithInsertedItems(indexedValues, insertionIndex, insertedIndexes) {\n return [].concat(_toConsumableArray(indexedValues.slice(0, insertionIndex)), _toConsumableArray(insertedIndexes), _toConsumableArray(indexedValues.slice(insertionIndex)));\n}\n/**\n * Filter items from the list.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {Array} removedIndexes List of removed indexes.\n * @returns {Array} Reduced list of mappings.\n */\n\nexport function getListWithRemovedItems(indexedValues, removedIndexes) {\n return arrayFilter(indexedValues, function (index) {\n return removedIndexes.includes(index) === false;\n });\n}","import { arrayEach } from \"./../helpers/array.mjs\";\nimport { defineGetter } from \"./../helpers/object.mjs\";\nvar MIXIN_NAME = 'localHooks';\n/**\n * Mixin object to extend objects functionality for local hooks.\n *\n * @type {object}\n */\n\nvar localHooks = {\n /**\n * Internal hooks storage.\n */\n _localHooks: Object.create(null),\n\n /**\n * Add hook to the collection.\n *\n * @param {string} key The hook name.\n * @param {Function} callback The hook callback.\n * @returns {object}\n */\n addLocalHook: function addLocalHook(key, callback) {\n if (!this._localHooks[key]) {\n this._localHooks[key] = [];\n }\n\n this._localHooks[key].push(callback);\n\n return this;\n },\n\n /**\n * Run hooks.\n *\n * @param {string} key The hook name.\n * @param {*} params Additional parameters passed to callback function.\n */\n runLocalHooks: function runLocalHooks(key) {\n var _this = this;\n\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n\n if (this._localHooks[key]) {\n arrayEach(this._localHooks[key], function (callback) {\n return callback.apply(_this, params);\n });\n }\n },\n\n /**\n * Clear all added hooks.\n *\n * @returns {object}\n */\n clearLocalHooks: function clearLocalHooks() {\n this._localHooks = {};\n return this;\n }\n};\ndefineGetter(localHooks, 'MIXIN_NAME', MIXIN_NAME, {\n writable: false,\n enumerable: false\n});\nexport default localHooks;","import \"core-js/modules/es.array.slice.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport { isFunction } from \"../../helpers/function.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\n/**\n * Map for storing mappings from an index to a value.\n */\n\nvar IndexMap = /*#__PURE__*/function () {\n function IndexMap() {\n var initValueOrFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n _classCallCheck(this, IndexMap);\n /**\n * List of values for particular indexes.\n *\n * @private\n * @type {Array}\n */\n\n\n this.indexedValues = [];\n /**\n * Initial value or function for each existing index.\n *\n * @private\n * @type {*}\n */\n\n this.initValueOrFn = initValueOrFn;\n }\n /**\n * Get full list of values for particular indexes.\n *\n * @returns {Array}\n */\n\n\n _createClass(IndexMap, [{\n key: \"getValues\",\n value: function getValues() {\n return this.indexedValues;\n }\n /**\n * Get value for the particular index.\n *\n * @param {number} index Index for which value is got.\n * @returns {*}\n */\n\n }, {\n key: \"getValueAtIndex\",\n value: function getValueAtIndex(index) {\n var values = this.indexedValues;\n\n if (index < values.length) {\n return values[index];\n }\n }\n /**\n * Set new values for particular indexes.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @param {Array} values List of set values.\n */\n\n }, {\n key: \"setValues\",\n value: function setValues(values) {\n this.indexedValues = values.slice();\n this.runLocalHooks('change');\n }\n /**\n * Set new value for the particular index.\n *\n * @param {number} index The index.\n * @param {*} value The value to save.\n *\n * Note: Please keep in mind that it is not possible to set value beyond the map (not respecting already set\n * map's size). Please use the `setValues` method when you would like to extend the map.\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"setValueAtIndex\",\n value: function setValueAtIndex(index, value) {\n if (index < this.indexedValues.length) {\n this.indexedValues[index] = value;\n this.runLocalHooks('change');\n return true;\n }\n\n return false;\n }\n /**\n * Clear all values to the defaults.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.setDefaultValues();\n }\n /**\n * Get length of the index map.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLength\",\n value: function getLength() {\n return this.getValues().length;\n }\n /**\n * Set default values for elements from `0` to `n`, where `n` is equal to the handled variable.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @private\n * @param {number} [length] Length of list.\n */\n\n }, {\n key: \"setDefaultValues\",\n value: function setDefaultValues() {\n var _this = this;\n\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.indexedValues.length;\n this.indexedValues.length = 0;\n\n if (isFunction(this.initValueOrFn)) {\n rangeEach(length - 1, function (index) {\n return _this.indexedValues.push(_this.initValueOrFn(index));\n });\n } else {\n rangeEach(length - 1, function () {\n return _this.indexedValues.push(_this.initValueOrFn);\n });\n }\n\n this.runLocalHooks('change');\n }\n /**\n * Initialize list with default values for particular indexes.\n *\n * @private\n * @param {number} length New length of indexed list.\n * @returns {IndexMap}\n */\n\n }, {\n key: \"init\",\n value: function init(length) {\n this.setDefaultValues(length);\n this.runLocalHooks('init');\n return this;\n }\n /**\n * Add values to the list.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @private\n */\n\n }, {\n key: \"insert\",\n value: function insert() {\n this.runLocalHooks('change');\n }\n /**\n * Remove values from the list.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @private\n */\n\n }, {\n key: \"remove\",\n value: function remove() {\n this.runLocalHooks('change');\n }\n }]);\n\n return IndexMap;\n}();\n\nmixin(IndexMap, localHooks);\nexport default IndexMap;","import \"core-js/modules/es.array.filter.js\";\nimport { arrayMap } from \"../../../helpers/array.mjs\";\n/**\n * Transform mappings after removal.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {Array} removedIndexes List of removed indexes.\n * @returns {Array} List with decreased indexes.\n */\n\nexport function getDecreasedIndexes(indexedValues, removedIndexes) {\n return arrayMap(indexedValues, function (index) {\n return index - removedIndexes.filter(function (removedIndex) {\n return removedIndex < index;\n }).length;\n });\n}\n/**\n * Transform mappings after insertion.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {Array} insertedIndexes List of inserted indexes.\n * @returns {Array} List with increased indexes.\n */\n\nexport function getIncreasedIndexes(indexedValues, insertedIndexes) {\n var firstInsertedIndex = insertedIndexes[0];\n var amountOfIndexes = insertedIndexes.length;\n return arrayMap(indexedValues, function (index) {\n if (index >= firstInsertedIndex) {\n return index + amountOfIndexes;\n }\n\n return index;\n });\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport IndexMap from \"./indexMap.mjs\";\nimport { getListWithRemovedItems, getListWithInsertedItems } from \"./utils/indexesSequence.mjs\";\nimport { getDecreasedIndexes, getIncreasedIndexes } from \"./utils/index.mjs\";\n/**\n * Map for storing mappings from an index to a physical index.\n *\n * It also updates the physical indexes (remaining in the map) on remove/add row or column action.\n */\n\nvar IndexesSequence = /*#__PURE__*/function (_IndexMap) {\n _inherits(IndexesSequence, _IndexMap);\n\n var _super = _createSuper(IndexesSequence);\n\n function IndexesSequence() {\n _classCallCheck(this, IndexesSequence); // Not handling custom init function or init value.\n\n\n return _super.call(this, function (index) {\n return index;\n });\n }\n /**\n * Add values to list and reorganize.\n *\n * @private\n * @param {number} insertionIndex Position inside the list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n\n\n _createClass(IndexesSequence, [{\n key: \"insert\",\n value: function insert(insertionIndex, insertedIndexes) {\n var listAfterUpdate = getIncreasedIndexes(this.indexedValues, insertedIndexes);\n this.indexedValues = getListWithInsertedItems(listAfterUpdate, insertionIndex, insertedIndexes);\n\n _get(_getPrototypeOf(IndexesSequence.prototype), \"insert\", this).call(this, insertionIndex, insertedIndexes);\n }\n /**\n * Remove values from the list and reorganize.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n\n }, {\n key: \"remove\",\n value: function remove(removedIndexes) {\n var listAfterUpdate = getListWithRemovedItems(this.indexedValues, removedIndexes);\n this.indexedValues = getDecreasedIndexes(listAfterUpdate, removedIndexes);\n\n _get(_getPrototypeOf(IndexesSequence.prototype), \"remove\", this).call(this, removedIndexes);\n }\n }]);\n\n return IndexesSequence;\n}(IndexMap);\n\nexport default IndexesSequence;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.string.includes.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nimport { isFunction } from \"../../../helpers/function.mjs\";\nimport { arrayFilter } from \"../../../helpers/array.mjs\";\n/**\n * Insert new items to the list.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {number} insertionIndex Position inside the actual list.\n * @param {Array} insertedIndexes List of inserted indexes.\n * @param {*} insertedValuesMapping Mapping which may provide value or function returning value for the specific parameters.\n * @returns {Array} List with new mappings.\n */\n\nexport function getListWithInsertedItems(indexedValues, insertionIndex, insertedIndexes, insertedValuesMapping) {\n var firstInsertedIndex = insertedIndexes.length ? insertedIndexes[0] : void 0;\n return [].concat(_toConsumableArray(indexedValues.slice(0, firstInsertedIndex)), _toConsumableArray(insertedIndexes.map(function (insertedIndex, ordinalNumber) {\n if (isFunction(insertedValuesMapping)) {\n return insertedValuesMapping(insertedIndex, ordinalNumber);\n }\n\n return insertedValuesMapping;\n })), _toConsumableArray(firstInsertedIndex === void 0 ? [] : indexedValues.slice(firstInsertedIndex)));\n}\n/**\n * Filter items from the list.\n *\n * @private\n * @param {Array} indexedValues List of values for particular indexes.\n * @param {Array} removedIndexes List of removed indexes.\n * @returns {Array} Reduced list of mappings.\n */\n\nexport function getListWithRemovedItems(indexedValues, removedIndexes) {\n return arrayFilter(indexedValues, function (_, index) {\n return removedIndexes.includes(index) === false;\n });\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport IndexMap from \"./indexMap.mjs\";\nimport { getListWithRemovedItems, getListWithInsertedItems } from \"./utils/physicallyIndexed.mjs\";\n/**\n * Map for storing mappings from an physical index to a value.\n *\n * Does not update stored values on remove/add row or column action.\n */\n\nvar PhysicalIndexToValueMap = /*#__PURE__*/function (_IndexMap) {\n _inherits(PhysicalIndexToValueMap, _IndexMap);\n\n var _super = _createSuper(PhysicalIndexToValueMap);\n\n function PhysicalIndexToValueMap() {\n _classCallCheck(this, PhysicalIndexToValueMap);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PhysicalIndexToValueMap, [{\n key: \"insert\",\n value:\n /**\n * Add values to list and reorganize.\n *\n * @private\n * @param {number} insertionIndex Position inside the list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n function insert(insertionIndex, insertedIndexes) {\n this.indexedValues = getListWithInsertedItems(this.indexedValues, insertionIndex, insertedIndexes, this.initValueOrFn);\n\n _get(_getPrototypeOf(PhysicalIndexToValueMap.prototype), \"insert\", this).call(this, insertionIndex, insertedIndexes);\n }\n /**\n * Remove values from the list and reorganize.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n\n }, {\n key: \"remove\",\n value: function remove(removedIndexes) {\n this.indexedValues = getListWithRemovedItems(this.indexedValues, removedIndexes);\n\n _get(_getPrototypeOf(PhysicalIndexToValueMap.prototype), \"remove\", this).call(this, removedIndexes);\n }\n }]);\n\n return PhysicalIndexToValueMap;\n}(IndexMap);\n\nexport default PhysicalIndexToValueMap;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport PhysicalIndexToValueMap from \"./physicalIndexToValueMap.mjs\";\nimport { arrayReduce } from \"../../helpers/array.mjs\";\n/**\n * Map for storing mappings from an physical index to a boolean value. It stores information whether physical index is\n * NOT included in a dataset and skipped in the process of rendering.\n */\n\nvar TrimmingMap = /*#__PURE__*/function (_PhysicalIndexToValue) {\n _inherits(TrimmingMap, _PhysicalIndexToValue);\n\n var _super = _createSuper(TrimmingMap);\n\n function TrimmingMap() {\n var initValueOrFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n _classCallCheck(this, TrimmingMap);\n\n return _super.call(this, initValueOrFn);\n }\n /**\n * Get physical indexes which are trimmed.\n *\n * Note: Indexes marked as trimmed aren't included in a {@link DataMap} and aren't rendered.\n *\n * @returns {Array}\n */\n\n\n _createClass(TrimmingMap, [{\n key: \"getTrimmedIndexes\",\n value: function getTrimmedIndexes() {\n return arrayReduce(this.getValues(), function (indexesList, isTrimmed, physicalIndex) {\n if (isTrimmed) {\n indexesList.push(physicalIndex);\n }\n\n return indexesList;\n }, []);\n }\n }]);\n\n return TrimmingMap;\n}(PhysicalIndexToValueMap);\n\nexport default TrimmingMap;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport PhysicalIndexToValueMap from \"./physicalIndexToValueMap.mjs\";\nimport { arrayReduce } from \"../../helpers/array.mjs\";\n/**\n * Map for storing mappings from an physical index to a boolean value. It stores information whether physical index is\n * included in a dataset, but skipped in the process of rendering.\n */\n\nvar HidingMap = /*#__PURE__*/function (_PhysicalIndexToValue) {\n _inherits(HidingMap, _PhysicalIndexToValue);\n\n var _super = _createSuper(HidingMap);\n\n function HidingMap() {\n var initValueOrFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n _classCallCheck(this, HidingMap);\n\n return _super.call(this, initValueOrFn);\n }\n /**\n * Get physical indexes which are hidden.\n *\n * Note: Indexes marked as hidden are included in a {@link DataMap}, but aren't rendered.\n *\n * @returns {Array}\n */\n\n\n _createClass(HidingMap, [{\n key: \"getHiddenIndexes\",\n value: function getHiddenIndexes() {\n return arrayReduce(this.getValues(), function (indexesList, isHidden, physicalIndex) {\n if (isHidden) {\n indexesList.push(physicalIndex);\n }\n\n return indexesList;\n }, []);\n }\n }]);\n\n return HidingMap;\n}(PhysicalIndexToValueMap);\n\nexport default HidingMap;","import \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { isUndefined, isDefined } from \"../helpers/mixed.mjs\";\nimport { mixin } from \"../helpers/object.mjs\";\nimport localHooks from \"../mixins/localHooks.mjs\"; // Counter for checking if there is a memory leak.\n\nvar registeredMaps = 0;\n/**\n * Collection of index maps having unique names. It allow us to perform bulk operations such as init, remove, insert on all index maps that have been registered in the collection.\n */\n\nvar MapCollection = /*#__PURE__*/function () {\n function MapCollection() {\n _classCallCheck(this, MapCollection);\n /**\n * Collection of index maps.\n *\n * @type {Map}\n */\n\n\n this.collection = new Map();\n }\n /**\n * Register custom index map.\n *\n * @param {string} uniqueName Unique name of the index map.\n * @param {IndexMap} indexMap Index map containing miscellaneous (i.e. Meta data, indexes sequence), updated after remove and insert data actions.\n */\n\n\n _createClass(MapCollection, [{\n key: \"register\",\n value: function register(uniqueName, indexMap) {\n var _this = this;\n\n if (this.collection.has(uniqueName) === false) {\n this.collection.set(uniqueName, indexMap);\n indexMap.addLocalHook('change', function () {\n return _this.runLocalHooks('change', indexMap);\n });\n registeredMaps += 1;\n }\n }\n /**\n * Unregister custom index map.\n *\n * @param {string} name Name of the index map.\n */\n\n }, {\n key: \"unregister\",\n value: function unregister(name) {\n var indexMap = this.collection.get(name);\n\n if (isDefined(indexMap)) {\n indexMap.clearLocalHooks();\n this.collection.delete(name);\n this.runLocalHooks('change', indexMap);\n registeredMaps -= 1;\n }\n }\n /**\n * Get index map for the provided name.\n *\n * @param {string} [name] Name of the index map.\n * @returns {Array|IndexMap}\n */\n\n }, {\n key: \"get\",\n value: function get(name) {\n if (isUndefined(name)) {\n return Array.from(this.collection.values());\n }\n\n return this.collection.get(name);\n }\n /**\n * Get collection size.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLength\",\n value: function getLength() {\n return this.collection.size;\n }\n /**\n * Remove some indexes and corresponding mappings and update values of the others within all collection's index maps.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n\n }, {\n key: \"removeFromEvery\",\n value: function removeFromEvery(removedIndexes) {\n this.collection.forEach(function (indexMap) {\n indexMap.remove(removedIndexes);\n });\n }\n /**\n * Insert new indexes and corresponding mapping and update values of the others all collection's index maps.\n *\n * @private\n * @param {number} insertionIndex Position inside the actual list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n\n }, {\n key: \"insertToEvery\",\n value: function insertToEvery(insertionIndex, insertedIndexes) {\n this.collection.forEach(function (indexMap) {\n indexMap.insert(insertionIndex, insertedIndexes);\n });\n }\n /**\n * Set default values to index maps within collection.\n *\n * @param {number} length Destination length for all stored maps.\n */\n\n }, {\n key: \"initEvery\",\n value: function initEvery(length) {\n this.collection.forEach(function (indexMap) {\n indexMap.init(length);\n });\n }\n }]);\n\n return MapCollection;\n}();\n\nmixin(MapCollection, localHooks);\nexport default MapCollection;\n/**\n * @returns {number}\n */\n\nexport function getRegisteredMapsCounter() {\n return registeredMaps;\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport MapCollection from \"./mapCollection.mjs\";\nimport { arrayMap } from \"../helpers/array.mjs\";\nimport { isDefined } from \"../helpers/mixed.mjs\";\n/**\n * Collection of maps. This collection aggregate maps with the same type of values. Values from the registered maps\n * can be used to calculate a single result for particular index.\n */\n\nvar AggregatedCollection = /*#__PURE__*/function (_MapCollection) {\n _inherits(AggregatedCollection, _MapCollection);\n\n var _super = _createSuper(AggregatedCollection);\n\n function AggregatedCollection(aggregationFunction, fallbackValue) {\n var _this;\n\n _classCallCheck(this, AggregatedCollection);\n\n _this = _super.call(this);\n /**\n * List of merged values. Value for each index is calculated using values inside registered maps.\n *\n * @type {Array}\n */\n\n _this.mergedValuesCache = [];\n /**\n * Function which do aggregation on the values for particular index.\n */\n\n _this.aggregationFunction = aggregationFunction;\n /**\n * Fallback value when there is no calculated value for particular index.\n */\n\n _this.fallbackValue = fallbackValue;\n return _this;\n }\n /**\n * Get merged values for all indexes.\n *\n * @param {boolean} [readFromCache=true] Determine if read results from the cache.\n * @returns {Array}\n */\n\n\n _createClass(AggregatedCollection, [{\n key: \"getMergedValues\",\n value: function getMergedValues() {\n var readFromCache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (readFromCache === true) {\n return this.mergedValuesCache;\n }\n\n if (this.getLength() === 0) {\n return [];\n } // Below variable stores values for every particular map. Example describing situation when we have 2 registered maps,\n // with length equal to 5.\n //\n // +---------+---------------------------------------------+\n // | | indexes |\n // +---------+---------------------------------------------+\n // | maps | 0 | 1 | 2 | 3 | 4 |\n // +---------+----------+-------+-------+-------+----------+\n // | 0 | [[ value, value, value, value, value ], |\n // | 1 | [ value, value, value, value, value ]] |\n // +---------+----------+-------+-------+-------+----------+\n\n\n var mapsValuesMatrix = arrayMap(this.get(), function (map) {\n return map.getValues();\n }); // Below variable stores values for every particular index. Example describing situation when we have 2 registered maps,\n // with length equal to 5.\n //\n // +---------+---------------------+\n // | | maps |\n // +---------+---------------------+\n // | indexes | 0 | 1 |\n // +---------+----------+----------+\n // | 0 | [[ value, value ], |\n // | 1 | [ value, value ], |\n // | 2 | [ value, value ], |\n // | 3 | [ value, value ], |\n // | 4 | [ value, value ]] |\n // +---------+----------+----------+\n\n var indexesValuesMatrix = [];\n var mapsLength = isDefined(mapsValuesMatrix[0]) && mapsValuesMatrix[0].length || 0;\n\n for (var index = 0; index < mapsLength; index += 1) {\n var valuesForIndex = [];\n\n for (var mapIndex = 0; mapIndex < this.getLength(); mapIndex += 1) {\n valuesForIndex.push(mapsValuesMatrix[mapIndex][index]);\n }\n\n indexesValuesMatrix.push(valuesForIndex);\n }\n\n return arrayMap(indexesValuesMatrix, this.aggregationFunction);\n }\n /**\n * Get merged value for particular index.\n *\n * @param {number} index Index for which we calculate single result.\n * @param {boolean} [readFromCache=true] Determine if read results from the cache.\n * @returns {*}\n */\n\n }, {\n key: \"getMergedValueAtIndex\",\n value: function getMergedValueAtIndex(index, readFromCache) {\n var valueAtIndex = this.getMergedValues(readFromCache)[index];\n return isDefined(valueAtIndex) ? valueAtIndex : this.fallbackValue;\n }\n /**\n * Rebuild cache for the collection.\n */\n\n }, {\n key: \"updateCache\",\n value: function updateCache() {\n this.mergedValuesCache = this.getMergedValues(false);\n }\n }]);\n\n return AggregatedCollection;\n}(MapCollection);\n\nexport default AggregatedCollection;","import \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayMap } from \"../helpers/array.mjs\";\nimport { getListWithRemovedItems, getListWithInsertedItems } from \"./maps/utils/indexesSequence.mjs\";\nimport IndexesSequence from \"./maps/indexesSequence.mjs\";\nimport TrimmingMap from \"./maps/trimmingMap.mjs\";\nimport HidingMap from \"./maps/hidingMap.mjs\";\nimport MapCollection from \"./mapCollection.mjs\";\nimport AggregatedCollection from \"./aggregatedCollection.mjs\";\nimport localHooks from \"../mixins/localHooks.mjs\";\nimport { mixin } from \"../helpers/object.mjs\";\nimport { isDefined } from \"../helpers/mixed.mjs\";\n/**\n * Index mapper stores, registers and manages the indexes on the basis of calculations collected from the subsidiary maps.\n * It should be seen as a single source of truth (regarding row and column indexes, for example, their sequence, information if they are skipped in the process of rendering (hidden or trimmed), values linked to them)\n * for any operation that considers CRUD actions such as **insertion**, **movement**, **removal** etc, and is used to properly calculate physical and visual indexes translations in both ways.\n * It has a built-in cache that is updated only when the data or structure changes.\n *\n * **Physical index** is a type of an index from the sequence of indexes assigned to the data source rows or columns\n * (from 0 to n, where n is number of the cells on the axis of data set).\n * **Visual index** is a type of an index from the sequence of indexes assigned to rows or columns existing in {@link DataMap} (from 0 to n, where n is number of the cells on the axis of data set).\n * **Renderable index** is a type of an index from the sequence of indexes assigned to rows or columns whose may be rendered (when they are in a viewport; from 0 to n, where n is number of the cells renderable on the axis).\n *\n * There are different kinds of index maps which may be registered in the collections and can be used by a reference.\n * They also expose public API and trigger two local hooks such as `init` (on initialization) and `change` (on change).\n *\n * These are: {@link to IndexesSequence}, {@link to PhysicalIndexToValueMap}, {@link to HidingMap}, and {@link to TrimmingMap}.\n */\n\nvar IndexMapper = /*#__PURE__*/function () {\n function IndexMapper() {\n var _this = this;\n\n _classCallCheck(this, IndexMapper);\n /**\n * Map for storing the sequence of indexes.\n *\n * It is registered by default and may be used from API methods.\n *\n * @private\n * @type {IndexesSequence}\n */\n\n\n this.indexesSequence = new IndexesSequence();\n /**\n * Collection for different trimming maps. Indexes marked as trimmed in any map WILL NOT be included in\n * the {@link DataMap} and won't be rendered.\n *\n * @private\n * @type {MapCollection}\n */\n\n this.trimmingMapsCollection = new AggregatedCollection(function (valuesForIndex) {\n return valuesForIndex.some(function (value) {\n return value === true;\n });\n }, false);\n /**\n * Collection for different hiding maps. Indexes marked as hidden in any map WILL be included in the {@link DataMap},\n * but won't be rendered.\n *\n * @private\n * @type {MapCollection}\n */\n\n this.hidingMapsCollection = new AggregatedCollection(function (valuesForIndex) {\n return valuesForIndex.some(function (value) {\n return value === true;\n });\n }, false);\n /**\n * Collection for another kind of maps. There are stored mappings from indexes (visual or physical) to values.\n *\n * @private\n * @type {MapCollection}\n */\n\n this.variousMapsCollection = new MapCollection();\n /**\n * Cache for list of not trimmed indexes, respecting the indexes sequence (physical indexes).\n *\n * Note: Please keep in mind that trimmed index can be also hidden.\n *\n * @private\n * @type {Array}\n */\n\n this.notTrimmedIndexesCache = [];\n /**\n * Cache for list of not hidden indexes, respecting the indexes sequence (physical indexes).\n *\n * Note: Please keep in mind that hidden index can be also trimmed.\n *\n * @private\n * @type {Array}\n */\n\n this.notHiddenIndexesCache = [];\n /**\n * Flag determining whether actions performed on index mapper have been batched. It's used for cache management.\n *\n * @private\n * @type {boolean}\n */\n\n this.isBatched = false;\n /**\n * Flag determining whether any action on indexes sequence has been performed. It's used for cache management.\n *\n * @private\n * @type {boolean}\n */\n\n this.indexesSequenceChanged = false;\n /**\n * Flag determining whether any action on trimmed indexes has been performed. It's used for cache management.\n *\n * @private\n * @type {boolean}\n */\n\n this.trimmedIndexesChanged = false;\n /**\n * Flag determining whether any action on hidden indexes has been performed. It's used for cache management.\n *\n * @private\n * @type {boolean}\n */\n\n this.hiddenIndexesChanged = false;\n /**\n * Physical indexes (respecting the sequence of indexes) which may be rendered (when they are in a viewport).\n *\n * @private\n * @type {Array}\n */\n\n this.renderablePhysicalIndexesCache = [];\n /**\n * Visual indexes (native map's value) corresponding to physical indexes (native map's index).\n *\n * @private\n * @type {Map}\n */\n\n this.fromPhysicalToVisualIndexesCache = new Map();\n /**\n * Visual indexes (native map's value) corresponding to physical indexes (native map's index).\n *\n * @private\n * @type {Map}\n */\n\n this.fromVisualToRenderableIndexesCache = new Map();\n this.indexesSequence.addLocalHook('change', function () {\n _this.indexesSequenceChanged = true; // Sequence of stored indexes might change.\n\n _this.updateCache();\n\n _this.runLocalHooks('change', _this.indexesSequence, null);\n });\n this.trimmingMapsCollection.addLocalHook('change', function (changedMap) {\n _this.trimmedIndexesChanged = true; // Number of trimmed indexes might change.\n\n _this.updateCache();\n\n _this.runLocalHooks('change', changedMap, _this.trimmingMapsCollection);\n });\n this.hidingMapsCollection.addLocalHook('change', function (changedMap) {\n _this.hiddenIndexesChanged = true; // Number of hidden indexes might change.\n\n _this.updateCache();\n\n _this.runLocalHooks('change', changedMap, _this.hidingMapsCollection);\n });\n this.variousMapsCollection.addLocalHook('change', function (changedMap) {\n _this.runLocalHooks('change', changedMap, _this.variousMapsCollection);\n });\n }\n /**\n * Suspends the cache update for this map. The method is helpful to group multiple\n * operations, which affects the cache. In this case, the cache will be updated once after\n * calling the `resumeOperations` method.\n */\n\n\n _createClass(IndexMapper, [{\n key: \"suspendOperations\",\n value: function suspendOperations() {\n this.isBatched = true;\n }\n /**\n * Resumes the cache update for this map. It recalculates the cache and restores the\n * default behavior where each map modification updates the cache.\n */\n\n }, {\n key: \"resumeOperations\",\n value: function resumeOperations() {\n this.isBatched = false;\n this.updateCache();\n }\n /**\n * Register map which provide some index mappings. Type of map determining to which collection it will be added.\n *\n * @param {string} uniqueName Name of the index map. It should be unique.\n * @param {IndexMap} indexMap Registered index map updated on items removal and insertion.\n * @returns {IndexMap}\n */\n\n }, {\n key: \"registerMap\",\n value: function registerMap(uniqueName, indexMap) {\n if (this.trimmingMapsCollection.get(uniqueName) || this.hidingMapsCollection.get(uniqueName) || this.variousMapsCollection.get(uniqueName)) {\n throw Error(\"Map with name \\\"\".concat(uniqueName, \"\\\" has been already registered.\"));\n }\n\n if (indexMap instanceof TrimmingMap) {\n this.trimmingMapsCollection.register(uniqueName, indexMap);\n } else if (indexMap instanceof HidingMap) {\n this.hidingMapsCollection.register(uniqueName, indexMap);\n } else {\n this.variousMapsCollection.register(uniqueName, indexMap);\n }\n\n var numberOfIndexes = this.getNumberOfIndexes();\n /*\n We initialize map ony when we have full information about number of indexes and the dataset is not empty.\n Otherwise it's unnecessary. Initialization of empty array would not give any positive changes. After initializing\n it with number of indexes equal to 0 the map would be still empty. What's more there would be triggered\n not needed hook (no real change have occurred). Number of indexes is known after loading data (the `loadData`\n function from the `Core`).\n */\n\n if (numberOfIndexes > 0) {\n indexMap.init(numberOfIndexes);\n }\n\n return indexMap;\n }\n /**\n * Unregister a map with given name.\n *\n * @param {string} name Name of the index map.\n */\n\n }, {\n key: \"unregisterMap\",\n value: function unregisterMap(name) {\n this.trimmingMapsCollection.unregister(name);\n this.hidingMapsCollection.unregister(name);\n this.variousMapsCollection.unregister(name);\n }\n /**\n * Get a physical index corresponding to the given visual index.\n *\n * @param {number} visualIndex Visual index.\n * @returns {number|null} Returns translated index mapped by passed visual index.\n */\n\n }, {\n key: \"getPhysicalFromVisualIndex\",\n value: function getPhysicalFromVisualIndex(visualIndex) {\n // Index in the table boundaries provided by the `DataMap`.\n var physicalIndex = this.notTrimmedIndexesCache[visualIndex];\n\n if (isDefined(physicalIndex)) {\n return physicalIndex;\n }\n\n return null;\n }\n /**\n * Get a physical index corresponding to the given renderable index.\n *\n * @param {number} renderableIndex Renderable index.\n * @returns {null|number}\n */\n\n }, {\n key: \"getPhysicalFromRenderableIndex\",\n value: function getPhysicalFromRenderableIndex(renderableIndex) {\n var physicalIndex = this.renderablePhysicalIndexesCache[renderableIndex]; // Index in the renderable table boundaries.\n\n if (isDefined(physicalIndex)) {\n return physicalIndex;\n }\n\n return null;\n }\n /**\n * Get a visual index corresponding to the given physical index.\n *\n * @param {number} physicalIndex Physical index to search.\n * @returns {number|null} Returns a visual index of the index mapper.\n */\n\n }, {\n key: \"getVisualFromPhysicalIndex\",\n value: function getVisualFromPhysicalIndex(physicalIndex) {\n var visualIndex = this.fromPhysicalToVisualIndexesCache.get(physicalIndex); // Index in the table boundaries provided by the `DataMap`.\n\n if (isDefined(visualIndex)) {\n return visualIndex;\n }\n\n return null;\n }\n /**\n * Get a visual index corresponding to the given renderable index.\n *\n * @param {number} renderableIndex Renderable index.\n * @returns {null|number}\n */\n\n }, {\n key: \"getVisualFromRenderableIndex\",\n value: function getVisualFromRenderableIndex(renderableIndex) {\n return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(renderableIndex));\n }\n /**\n * Get a renderable index corresponding to the given visual index.\n *\n * @param {number} visualIndex Visual index.\n * @returns {null|number}\n */\n\n }, {\n key: \"getRenderableFromVisualIndex\",\n value: function getRenderableFromVisualIndex(visualIndex) {\n var renderableIndex = this.fromVisualToRenderableIndexesCache.get(visualIndex); // Index in the renderable table boundaries.\n\n if (isDefined(renderableIndex)) {\n return renderableIndex;\n }\n\n return null;\n }\n /**\n * Search for the first visible, not hidden index (represented by a visual index).\n *\n * @param {number} fromVisualIndex Visual start index. Starting point for finding destination index. Start point may be destination\n * point when handled index is NOT hidden.\n * @param {number} incrementBy We are searching for a next visible indexes by increasing (to be precise, or decreasing) indexes.\n * This variable represent indexes shift. We are looking for an index:\n * - for rows: from the left to the right (increasing indexes, then variable should have value 1) or\n * other way around (decreasing indexes, then variable should have the value -1)\n * - for columns: from the top to the bottom (increasing indexes, then variable should have value 1)\n * or other way around (decreasing indexes, then variable should have the value -1).\n * @param {boolean} searchAlsoOtherWayAround The argument determine if an additional other way around search should be\n * performed, when the search in the first direction had no effect in finding visual index.\n * @param {number} indexForNextSearch Visual index for next search, when the flag is truthy.\n *\n * @returns {number|null} Visual column index or `null`.\n */\n\n }, {\n key: \"getFirstNotHiddenIndex\",\n value: function getFirstNotHiddenIndex(fromVisualIndex, incrementBy) {\n var searchAlsoOtherWayAround = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var indexForNextSearch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fromVisualIndex - incrementBy;\n var physicalIndex = this.getPhysicalFromVisualIndex(fromVisualIndex); // First or next (it may be end of the table) index is beyond the table boundaries.\n\n if (physicalIndex === null) {\n // Looking for the next index in the opposite direction. This conditional won't be fulfilled when we STARTED\n // the search from the index beyond the table boundaries.\n if (searchAlsoOtherWayAround === true && indexForNextSearch !== fromVisualIndex - incrementBy) {\n return this.getFirstNotHiddenIndex(indexForNextSearch, -incrementBy, false, indexForNextSearch);\n }\n\n return null;\n }\n\n if (this.isHidden(physicalIndex) === false) {\n return fromVisualIndex;\n } // Looking for the next index, as the current isn't visible.\n\n\n return this.getFirstNotHiddenIndex(fromVisualIndex + incrementBy, incrementBy, searchAlsoOtherWayAround, indexForNextSearch);\n }\n /**\n * Set default values for all indexes in registered index maps.\n *\n * @param {number} [length] Destination length for all stored index maps.\n */\n\n }, {\n key: \"initToLength\",\n value: function initToLength() {\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getNumberOfIndexes();\n this.notTrimmedIndexesCache = _toConsumableArray(new Array(length).keys());\n this.notHiddenIndexesCache = _toConsumableArray(new Array(length).keys());\n this.suspendOperations();\n this.indexesSequence.init(length);\n this.trimmingMapsCollection.initEvery(length);\n this.resumeOperations(); // We move initialization of hidden collection to next batch for purpose of working on sequence of already trimmed indexes.\n\n this.suspendOperations();\n this.hidingMapsCollection.initEvery(length); // It shouldn't reset the cache.\n\n this.variousMapsCollection.initEvery(length);\n this.resumeOperations();\n this.runLocalHooks('init');\n }\n /**\n * Get sequence of indexes.\n *\n * @returns {Array} Physical indexes.\n */\n\n }, {\n key: \"getIndexesSequence\",\n value: function getIndexesSequence() {\n return this.indexesSequence.getValues();\n }\n /**\n * Set completely new indexes sequence.\n *\n * @param {Array} indexes Physical indexes.\n */\n\n }, {\n key: \"setIndexesSequence\",\n value: function setIndexesSequence(indexes) {\n this.indexesSequence.setValues(indexes);\n }\n /**\n * Get all NOT trimmed indexes.\n *\n * Note: Indexes marked as trimmed aren't included in a {@link DataMap} and aren't rendered.\n *\n * @param {boolean} [readFromCache=true] Determine if read indexes from cache.\n * @returns {Array} List of physical indexes. Index of this native array is a \"visual index\",\n * value of this native array is a \"physical index\".\n */\n\n }, {\n key: \"getNotTrimmedIndexes\",\n value: function getNotTrimmedIndexes() {\n var _this2 = this;\n\n var readFromCache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (readFromCache === true) {\n return this.notTrimmedIndexesCache;\n }\n\n var indexesSequence = this.getIndexesSequence();\n return indexesSequence.filter(function (physicalIndex) {\n return _this2.isTrimmed(physicalIndex) === false;\n });\n }\n /**\n * Get length of all NOT trimmed indexes.\n *\n * Note: Indexes marked as trimmed aren't included in a {@link DataMap} and aren't rendered.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getNotTrimmedIndexesLength\",\n value: function getNotTrimmedIndexesLength() {\n return this.getNotTrimmedIndexes().length;\n }\n /**\n * Get all NOT hidden indexes.\n *\n * Note: Indexes marked as hidden are included in a {@link DataMap}, but aren't rendered.\n *\n * @param {boolean} [readFromCache=true] Determine if read indexes from cache.\n * @returns {Array} List of physical indexes. Please keep in mind that index of this native array IS NOT a \"visual index\".\n */\n\n }, {\n key: \"getNotHiddenIndexes\",\n value: function getNotHiddenIndexes() {\n var _this3 = this;\n\n var readFromCache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (readFromCache === true) {\n return this.notHiddenIndexesCache;\n }\n\n var indexesSequence = this.getIndexesSequence();\n return indexesSequence.filter(function (physicalIndex) {\n return _this3.isHidden(physicalIndex) === false;\n });\n }\n /**\n * Get length of all NOT hidden indexes.\n *\n * Note: Indexes marked as hidden are included in a {@link DataMap}, but aren't rendered.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getNotHiddenIndexesLength\",\n value: function getNotHiddenIndexesLength() {\n return this.getNotHiddenIndexes().length;\n }\n /**\n * Get list of physical indexes (respecting the sequence of indexes) which may be rendered (when they are in a viewport).\n *\n * @param {boolean} [readFromCache=true] Determine if read indexes from cache.\n * @returns {Array} List of physical indexes. Index of this native array is a \"renderable index\",\n * value of this native array is a \"physical index\".\n */\n\n }, {\n key: \"getRenderableIndexes\",\n value: function getRenderableIndexes() {\n var _this4 = this;\n\n var readFromCache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (readFromCache === true) {\n return this.renderablePhysicalIndexesCache;\n }\n\n var notTrimmedIndexes = this.getNotTrimmedIndexes();\n return notTrimmedIndexes.filter(function (physicalIndex) {\n return _this4.isHidden(physicalIndex) === false;\n });\n }\n /**\n * Get length of all NOT trimmed and NOT hidden indexes.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getRenderableIndexesLength\",\n value: function getRenderableIndexesLength() {\n return this.getRenderableIndexes().length;\n }\n /**\n * Get number of all indexes.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getNumberOfIndexes\",\n value: function getNumberOfIndexes() {\n return this.getIndexesSequence().length;\n }\n /**\n * Move indexes in the index mapper.\n *\n * @param {number|Array} movedIndexes Visual index(es) to move.\n * @param {number} finalIndex Visual index being a start index for the moved elements.\n */\n\n }, {\n key: \"moveIndexes\",\n value: function moveIndexes(movedIndexes, finalIndex) {\n var _this5 = this;\n\n if (typeof movedIndexes === 'number') {\n movedIndexes = [movedIndexes];\n }\n\n var physicalMovedIndexes = arrayMap(movedIndexes, function (visualIndex) {\n return _this5.getPhysicalFromVisualIndex(visualIndex);\n });\n var notTrimmedIndexesLength = this.getNotTrimmedIndexesLength();\n var movedIndexesLength = movedIndexes.length; // Removing indexes without re-indexing.\n\n var listWithRemovedItems = getListWithRemovedItems(this.getIndexesSequence(), physicalMovedIndexes); // When item(s) are moved after the last visible item we assign the last possible index.\n\n var destinationPosition = notTrimmedIndexesLength - movedIndexesLength; // Otherwise, we find proper index for inserted item(s).\n\n if (finalIndex + movedIndexesLength < notTrimmedIndexesLength) {\n // Physical index at final index position.\n var physicalIndex = listWithRemovedItems.filter(function (index) {\n return _this5.isTrimmed(index) === false;\n })[finalIndex];\n destinationPosition = listWithRemovedItems.indexOf(physicalIndex);\n } // Adding indexes without re-indexing.\n\n\n this.setIndexesSequence(getListWithInsertedItems(listWithRemovedItems, destinationPosition, physicalMovedIndexes));\n }\n /**\n * Get whether index is trimmed. Index marked as trimmed isn't included in a {@link DataMap} and isn't rendered.\n *\n * @param {number} physicalIndex Physical index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isTrimmed\",\n value: function isTrimmed(physicalIndex) {\n return this.trimmingMapsCollection.getMergedValueAtIndex(physicalIndex);\n }\n /**\n * Get whether index is hidden. Index marked as hidden is included in a {@link DataMap}, but isn't rendered.\n *\n * @param {number} physicalIndex Physical index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isHidden\",\n value: function isHidden(physicalIndex) {\n return this.hidingMapsCollection.getMergedValueAtIndex(physicalIndex);\n }\n /**\n * Insert new indexes and corresponding mapping and update values of the others, for all stored index maps.\n *\n * @private\n * @param {number} firstInsertedVisualIndex First inserted visual index.\n * @param {number} amountOfIndexes Amount of inserted indexes.\n */\n\n }, {\n key: \"insertIndexes\",\n value: function insertIndexes(firstInsertedVisualIndex, amountOfIndexes) {\n var nthVisibleIndex = this.getNotTrimmedIndexes()[firstInsertedVisualIndex];\n var firstInsertedPhysicalIndex = isDefined(nthVisibleIndex) ? nthVisibleIndex : this.getNumberOfIndexes();\n var insertionIndex = this.getIndexesSequence().includes(nthVisibleIndex) ? this.getIndexesSequence().indexOf(nthVisibleIndex) : this.getNumberOfIndexes();\n var insertedIndexes = arrayMap(new Array(amountOfIndexes).fill(firstInsertedPhysicalIndex), function (nextIndex, stepsFromStart) {\n return nextIndex + stepsFromStart;\n });\n this.suspendOperations();\n this.indexesSequence.insert(insertionIndex, insertedIndexes);\n this.trimmingMapsCollection.insertToEvery(insertionIndex, insertedIndexes);\n this.hidingMapsCollection.insertToEvery(insertionIndex, insertedIndexes);\n this.variousMapsCollection.insertToEvery(insertionIndex, insertedIndexes);\n this.resumeOperations();\n }\n /**\n * Remove some indexes and corresponding mappings and update values of the others, for all stored index maps.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n\n }, {\n key: \"removeIndexes\",\n value: function removeIndexes(removedIndexes) {\n this.suspendOperations();\n this.indexesSequence.remove(removedIndexes);\n this.trimmingMapsCollection.removeFromEvery(removedIndexes);\n this.hidingMapsCollection.removeFromEvery(removedIndexes);\n this.variousMapsCollection.removeFromEvery(removedIndexes);\n this.resumeOperations();\n }\n /**\n * Rebuild cache for some indexes. Every action on indexes sequence or indexes skipped in the process of rendering\n * by default reset cache, thus batching some index maps actions is recommended.\n *\n * @private\n * @param {boolean} [force=false] Determine if force cache update.\n */\n\n }, {\n key: \"updateCache\",\n value: function updateCache() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var anyCachedIndexChanged = this.indexesSequenceChanged || this.trimmedIndexesChanged || this.hiddenIndexesChanged;\n\n if (force === true || this.isBatched === false && anyCachedIndexChanged === true) {\n this.trimmingMapsCollection.updateCache();\n this.hidingMapsCollection.updateCache();\n this.notTrimmedIndexesCache = this.getNotTrimmedIndexes(false);\n this.notHiddenIndexesCache = this.getNotHiddenIndexes(false);\n this.renderablePhysicalIndexesCache = this.getRenderableIndexes(false);\n this.cacheFromPhysicalToVisualIndexes();\n this.cacheFromVisualToRenderabIendexes();\n this.runLocalHooks('cacheUpdated', this.indexesSequenceChanged, this.trimmedIndexesChanged, this.hiddenIndexesChanged);\n this.indexesSequenceChanged = false;\n this.trimmedIndexesChanged = false;\n this.hiddenIndexesChanged = false;\n }\n }\n /**\n * Update cache for translations from physical to visual indexes.\n *\n * @private\n */\n\n }, {\n key: \"cacheFromPhysicalToVisualIndexes\",\n value: function cacheFromPhysicalToVisualIndexes() {\n var nrOfNotTrimmedIndexes = this.getNotTrimmedIndexesLength();\n this.fromPhysicalToVisualIndexesCache.clear();\n\n for (var visualIndex = 0; visualIndex < nrOfNotTrimmedIndexes; visualIndex += 1) {\n var physicalIndex = this.getPhysicalFromVisualIndex(visualIndex); // Every visual index have corresponding physical index, but some physical indexes may don't have\n // corresponding visual indexes (physical indexes may represent trimmed indexes, beyond the table boundaries)\n\n this.fromPhysicalToVisualIndexesCache.set(physicalIndex, visualIndex);\n }\n }\n /**\n * Update cache for translations from visual to renderable indexes.\n *\n * @private\n */\n\n }, {\n key: \"cacheFromVisualToRenderabIendexes\",\n value: function cacheFromVisualToRenderabIendexes() {\n var nrOfRenderableIndexes = this.getRenderableIndexesLength();\n this.fromVisualToRenderableIndexesCache.clear();\n\n for (var renderableIndex = 0; renderableIndex < nrOfRenderableIndexes; renderableIndex += 1) {\n // Can't use getRenderableFromVisualIndex here because we're building the cache here\n var physicalIndex = this.getPhysicalFromRenderableIndex(renderableIndex);\n var visualIndex = this.getVisualFromPhysicalIndex(physicalIndex);\n this.fromVisualToRenderableIndexesCache.set(visualIndex, renderableIndex);\n }\n }\n }]);\n\n return IndexMapper;\n}();\n\nmixin(IndexMapper, localHooks);\nexport default IndexMapper;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\n\nvar _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nimport { isUndefined, isDefined } from \"./../helpers/mixed.mjs\";\nimport { objectEach } from \"./../helpers/object.mjs\";\nimport { error } from \"./../helpers/console.mjs\";\nimport { toSingleLine } from \"./../helpers/templateLiteralTag.mjs\";\n/**\n * Perform shallow extend of a target object with only this extension's properties which doesn't exist in the target.\n *\n * TODO: Maybe it should be moved to global helpers? It's changed `extend` function.\n *\n * @param {object} target An object that will receive the new properties.\n * @param {object} extension An object containing additional properties to merge into the target.\n * @returns {object}\n */\n\nexport function extendNotExistingKeys(target, extension) {\n objectEach(extension, function (value, key) {\n if (isUndefined(target[key])) {\n target[key] = value;\n }\n });\n return target;\n}\n/**\n * Create range of values basing on cell indexes. For example, it will create below ranges for specified function arguments:\n *\n * createCellHeadersRange(2, 7) => `2-7`\n * createCellHeadersRange(7, 2) => `2-7`\n * createCellHeadersRange(0, 4, 'A', 'D') => `A-D`\n * createCellHeadersRange(4, 0, 'D', 'A') => `A-D`.\n *\n * @param {number} firstRowIndex Index of \"first\" cell.\n * @param {number} nextRowIndex Index of \"next\" cell.\n * @param {*} fromValue Value which will represent \"first\" cell.\n * @param {*} toValue Value which will represent \"next\" cell.\n * @returns {string} Value representing range i.e. A-Z, 11-15.\n */\n\nexport function createCellHeadersRange(firstRowIndex, nextRowIndex) {\n var fromValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : firstRowIndex;\n var toValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : nextRowIndex; // Will swap `fromValue` with `toValue` if it's necessary.\n\n var from = fromValue,\n to = toValue;\n\n if (firstRowIndex > nextRowIndex) {\n var _ref = [to, from];\n from = _ref[0];\n to = _ref[1];\n }\n\n return \"\".concat(from, \"-\").concat(to);\n}\n/**\n * Normalize language code. It takes handled languageCode proposition and change it to proper languageCode.\n * For example, when it takes `eN-us` as parameter it return `en-US`.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @returns {string}\n */\n\nexport function normalizeLanguageCode(languageCode) {\n var languageCodePattern = /^([a-zA-Z]{2})-([a-zA-Z]{2})$/;\n var partsOfLanguageCode = languageCodePattern.exec(languageCode);\n\n if (partsOfLanguageCode) {\n return \"\".concat(partsOfLanguageCode[1].toLowerCase(), \"-\").concat(partsOfLanguageCode[2].toUpperCase());\n }\n\n return languageCode;\n}\n/**\n *\n * Warn user if there is no registered language.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n */\n\nexport function warnUserAboutLanguageRegistration(languageCode) {\n if (isDefined(languageCode)) {\n error(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Language with code \\\"\", \"\\\" was not found. You should register particular language \\n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.\"], [\"Language with code \\\"\", \"\\\" was not found. You should register particular language\\\\x20\\n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.\"])), languageCode));\n }\n}","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nexport var holder = new WeakMap();\nexport var rootInstanceSymbol = Symbol('rootInstance');\n/**\n * Register an object as a root instance.\n *\n * @param {object} object An object to associate with root instance flag.\n */\n\nexport function registerAsRootInstance(object) {\n holder.set(object, true);\n}\n/**\n * Check if the source of the root indication call is valid.\n *\n * @param {symbol} rootSymbol A symbol as a source of truth.\n * @returns {boolean}\n */\n\nexport function hasValidParameter(rootSymbol) {\n return rootSymbol === rootInstanceSymbol;\n}\n/**\n * Check if passed an object was flagged as a root instance.\n *\n * @param {object} object An object to check.\n * @returns {boolean}\n */\n\nexport function isRootInstance(object) {\n return holder.has(object);\n}","import staticRegister from \"./../../utils/staticRegister.mjs\";\nimport pluralizeFn from \"./pluralize.mjs\";\n\nvar _staticRegister = staticRegister('phraseFormatters'),\n registerGloballyPhraseFormatter = _staticRegister.register,\n getGlobalPhraseFormatters = _staticRegister.getValues;\n/**\n * Register phrase formatter.\n *\n * @param {string} name Name of formatter.\n * @param {Function} formatterFn Function which will be applied on phrase propositions. It will transform them if it's possible.\n */\n\n\nexport function register(name, formatterFn) {\n registerGloballyPhraseFormatter(name, formatterFn);\n}\n/**\n * Get all registered previously formatters.\n *\n * @returns {Array}\n */\n\nexport function getAll() {\n return getGlobalPhraseFormatters();\n}\nexport { register as registerPhraseFormatter, getAll as getPhraseFormatters };\nregister('pluralize', pluralizeFn);","import \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\n/**\n * Try to choose plural form from available phrase propositions.\n *\n * @param {Array} phrasePropositions List of phrases propositions.\n * @param {number} pluralForm Number determining which phrase form should be used.\n *\n * @returns {string|Array} One particular phrase if it's possible, list of unchanged phrase propositions otherwise.\n */\n\nexport default function pluralize(phrasePropositions, pluralForm) {\n var isPluralizable = Array.isArray(phrasePropositions) && Number.isInteger(pluralForm);\n\n if (isPluralizable) {\n return phrasePropositions[pluralForm];\n }\n\n return phrasePropositions;\n}","/**\n * Constants for parts of translation.\n */\nexport var CONTEXT_MENU_ITEMS_NAMESPACE = 'ContextMenu:items';\nexport var CONTEXTMENU_ITEMS_NO_ITEMS = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".noItems\");\nexport var CONTEXTMENU_ITEMS_ROW_ABOVE = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".insertRowAbove\");\nexport var CONTEXTMENU_ITEMS_ROW_BELOW = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".insertRowBelow\");\nexport var CONTEXTMENU_ITEMS_INSERT_LEFT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".insertColumnOnTheLeft\");\nexport var CONTEXTMENU_ITEMS_INSERT_RIGHT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".insertColumnOnTheRight\");\nexport var CONTEXTMENU_ITEMS_REMOVE_ROW = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".removeRow\");\nexport var CONTEXTMENU_ITEMS_REMOVE_COLUMN = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".removeColumn\");\nexport var CONTEXTMENU_ITEMS_UNDO = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".undo\");\nexport var CONTEXTMENU_ITEMS_REDO = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".redo\");\nexport var CONTEXTMENU_ITEMS_READ_ONLY = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".readOnly\");\nexport var CONTEXTMENU_ITEMS_CLEAR_COLUMN = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".clearColumn\");\nexport var CONTEXTMENU_ITEMS_COPY = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".copy\");\nexport var CONTEXTMENU_ITEMS_CUT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".cut\");\nexport var CONTEXTMENU_ITEMS_FREEZE_COLUMN = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".freezeColumn\");\nexport var CONTEXTMENU_ITEMS_UNFREEZE_COLUMN = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".unfreezeColumn\");\nexport var CONTEXTMENU_ITEMS_MERGE_CELLS = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".mergeCells\");\nexport var CONTEXTMENU_ITEMS_UNMERGE_CELLS = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".unmergeCells\");\nexport var CONTEXTMENU_ITEMS_ADD_COMMENT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".addComment\");\nexport var CONTEXTMENU_ITEMS_EDIT_COMMENT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".editComment\");\nexport var CONTEXTMENU_ITEMS_REMOVE_COMMENT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".removeComment\");\nexport var CONTEXTMENU_ITEMS_READ_ONLY_COMMENT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".readOnlyComment\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".align\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_LEFT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".align.left\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_CENTER = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".align.center\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".align.right\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".align.justify\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_TOP = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".align.top\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".align.middle\");\nexport var CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".align.bottom\");\nexport var CONTEXTMENU_ITEMS_BORDERS = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".borders\");\nexport var CONTEXTMENU_ITEMS_BORDERS_TOP = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".borders.top\");\nexport var CONTEXTMENU_ITEMS_BORDERS_RIGHT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".borders.right\");\nexport var CONTEXTMENU_ITEMS_BORDERS_BOTTOM = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".borders.bottom\");\nexport var CONTEXTMENU_ITEMS_BORDERS_LEFT = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".borders.left\");\nexport var CONTEXTMENU_ITEMS_REMOVE_BORDERS = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".borders.remove\");\nexport var CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".nestedHeaders.insertChildRow\"); // eslint-disable-line max-len\n\nexport var CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".nestedHeaders.detachFromParent\"); // eslint-disable-line max-len\n\nexport var CONTEXTMENU_ITEMS_HIDE_COLUMN = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".hideColumn\");\nexport var CONTEXTMENU_ITEMS_SHOW_COLUMN = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".showColumn\");\nexport var CONTEXTMENU_ITEMS_HIDE_ROW = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".hideRow\");\nexport var CONTEXTMENU_ITEMS_SHOW_ROW = \"\".concat(CONTEXT_MENU_ITEMS_NAMESPACE, \".showRow\");\nexport var FILTERS_NAMESPACE = 'Filters:';\nexport var FILTERS_CONDITIONS_NAMESPACE = \"\".concat(FILTERS_NAMESPACE, \"conditions\");\nexport var FILTERS_CONDITIONS_NONE = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".none\");\nexport var FILTERS_CONDITIONS_EMPTY = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isEmpty\");\nexport var FILTERS_CONDITIONS_NOT_EMPTY = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isNotEmpty\");\nexport var FILTERS_CONDITIONS_EQUAL = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isEqualTo\");\nexport var FILTERS_CONDITIONS_NOT_EQUAL = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isNotEqualTo\");\nexport var FILTERS_CONDITIONS_BEGINS_WITH = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".beginsWith\");\nexport var FILTERS_CONDITIONS_ENDS_WITH = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".endsWith\");\nexport var FILTERS_CONDITIONS_CONTAINS = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".contains\");\nexport var FILTERS_CONDITIONS_NOT_CONTAIN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".doesNotContain\");\nexport var FILTERS_CONDITIONS_BY_VALUE = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".byValue\");\nexport var FILTERS_CONDITIONS_GREATER_THAN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".greaterThan\");\nexport var FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".greaterThanOrEqualTo\");\nexport var FILTERS_CONDITIONS_LESS_THAN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".lessThan\");\nexport var FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".lessThanOrEqualTo\");\nexport var FILTERS_CONDITIONS_BETWEEN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isBetween\");\nexport var FILTERS_CONDITIONS_NOT_BETWEEN = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".isNotBetween\");\nexport var FILTERS_CONDITIONS_AFTER = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".after\");\nexport var FILTERS_CONDITIONS_BEFORE = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".before\");\nexport var FILTERS_CONDITIONS_TODAY = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".today\");\nexport var FILTERS_CONDITIONS_TOMORROW = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".tomorrow\");\nexport var FILTERS_CONDITIONS_YESTERDAY = \"\".concat(FILTERS_CONDITIONS_NAMESPACE, \".yesterday\");\nexport var FILTERS_DIVS_FILTER_BY_CONDITION = \"\".concat(FILTERS_NAMESPACE, \"labels.filterByCondition\");\nexport var FILTERS_DIVS_FILTER_BY_VALUE = \"\".concat(FILTERS_NAMESPACE, \"labels.filterByValue\");\nexport var FILTERS_LABELS_CONJUNCTION = \"\".concat(FILTERS_NAMESPACE, \"labels.conjunction\");\nexport var FILTERS_LABELS_DISJUNCTION = \"\".concat(FILTERS_NAMESPACE, \"labels.disjunction\");\nexport var FILTERS_VALUES_BLANK_CELLS = \"\".concat(FILTERS_NAMESPACE, \"values.blankCells\");\nexport var FILTERS_BUTTONS_SELECT_ALL = \"\".concat(FILTERS_NAMESPACE, \"buttons.selectAll\");\nexport var FILTERS_BUTTONS_CLEAR = \"\".concat(FILTERS_NAMESPACE, \"buttons.clear\");\nexport var FILTERS_BUTTONS_OK = \"\".concat(FILTERS_NAMESPACE, \"buttons.ok\");\nexport var FILTERS_BUTTONS_CANCEL = \"\".concat(FILTERS_NAMESPACE, \"buttons.cancel\");\nexport var FILTERS_BUTTONS_PLACEHOLDER_SEARCH = \"\".concat(FILTERS_NAMESPACE, \"buttons.placeholder.search\");\nexport var FILTERS_BUTTONS_PLACEHOLDER_VALUE = \"\".concat(FILTERS_NAMESPACE, \"buttons.placeholder.value\");\nexport var FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE = \"\".concat(FILTERS_NAMESPACE, \"buttons.placeholder.secondValue\");","var _dictionary;\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n/**\n * @preserve\n * Authors: Handsoncode\n * Last updated: Nov 15, 2017\n *\n * Description: Definition file for English - United States language-country.\n */\n\n\nimport * as C from \"../constants.mjs\";\nvar dictionary = (_dictionary = {\n languageCode: 'en-US'\n}, _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_NO_ITEMS, 'No available options'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ROW_ABOVE, 'Insert row above'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ROW_BELOW, 'Insert row below'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_INSERT_LEFT, 'Insert column left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_INSERT_RIGHT, 'Insert column right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_ROW, ['Remove row', 'Remove rows']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_COLUMN, ['Remove column', 'Remove columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNDO, 'Undo'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REDO, 'Redo'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_READ_ONLY, 'Read only'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_CLEAR_COLUMN, 'Clear column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT, 'Alignment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT, 'Left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER, 'Center'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT, 'Right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY, 'Justify'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP, 'Top'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE, 'Middle'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM, 'Bottom'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_FREEZE_COLUMN, 'Freeze column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN, 'Unfreeze column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS, 'Borders'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_TOP, 'Top'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_RIGHT, 'Right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_BOTTOM, 'Bottom'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_LEFT, 'Left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_BORDERS, 'Remove border(s)'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ADD_COMMENT, 'Add comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_EDIT_COMMENT, 'Edit comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_COMMENT, 'Delete comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT, 'Read-only comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_MERGE_CELLS, 'Merge cells'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNMERGE_CELLS, 'Unmerge cells'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_COPY, 'Copy'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_CUT, 'Cut'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD, 'Insert child row'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD, 'Detach from parent'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_HIDE_COLUMN, ['Hide column', 'Hide columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_SHOW_COLUMN, ['Show column', 'Show columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_HIDE_ROW, ['Hide row', 'Hide rows']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_SHOW_ROW, ['Show row', 'Show rows']), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NONE, 'None'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_EMPTY, 'Is empty'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_EMPTY, 'Is not empty'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_EQUAL, 'Is equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_EQUAL, 'Is not equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BEGINS_WITH, 'Begins with'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_ENDS_WITH, 'Ends with'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_CONTAINS, 'Contains'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_CONTAIN, 'Does not contain'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_GREATER_THAN, 'Greater than'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL, 'Greater than or equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_LESS_THAN, 'Less than'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL, 'Less than or equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BETWEEN, 'Is between'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_BETWEEN, 'Is not between'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_AFTER, 'After'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BEFORE, 'Before'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_TODAY, 'Today'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_TOMORROW, 'Tomorrow'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_YESTERDAY, 'Yesterday'), _defineProperty(_dictionary, C.FILTERS_VALUES_BLANK_CELLS, 'Blank cells'), _defineProperty(_dictionary, C.FILTERS_DIVS_FILTER_BY_CONDITION, 'Filter by condition'), _defineProperty(_dictionary, C.FILTERS_DIVS_FILTER_BY_VALUE, 'Filter by value'), _defineProperty(_dictionary, C.FILTERS_LABELS_CONJUNCTION, 'And'), _defineProperty(_dictionary, C.FILTERS_LABELS_DISJUNCTION, 'Or'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_SELECT_ALL, 'Select all'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_CLEAR, 'Clear'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_OK, 'OK'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_CANCEL, 'Cancel'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_SEARCH, 'Search'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_VALUE, 'Value'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE, 'Second value'), _dictionary);\nexport default dictionary;","import { isObject, deepClone } from \"../helpers/object.mjs\";\nimport { arrayEach } from \"./../helpers/array.mjs\";\nimport { isUndefined } from \"../helpers/mixed.mjs\";\nimport { extendNotExistingKeys, normalizeLanguageCode, warnUserAboutLanguageRegistration } from \"./utils.mjs\";\nimport staticRegister from \"../utils/staticRegister.mjs\";\nimport { getPhraseFormatters } from \"./phraseFormatters/index.mjs\";\nimport DEFAULT_DICTIONARY from \"./languages/en-US.mjs\";\nimport * as _dictionaryKeys from \"./constants.mjs\";\nexport { _dictionaryKeys as dictionaryKeys };\nexport var DEFAULT_LANGUAGE_CODE = DEFAULT_DICTIONARY.languageCode;\n\nvar _staticRegister = staticRegister('languagesDictionaries'),\n registerGloballyLanguageDictionary = _staticRegister.register,\n getGlobalLanguageDictionary = _staticRegister.getItem,\n hasGlobalLanguageDictionary = _staticRegister.hasItem,\n getGlobalLanguagesDictionaries = _staticRegister.getValues;\n/**\n * Register automatically the default language dictionary.\n */\n\n\nregisterLanguageDictionary(DEFAULT_DICTIONARY);\n/**\n * Register language dictionary for specific language code.\n *\n * @param {string|object} languageCodeOrDictionary Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE' or object representing dictionary.\n * @param {object} dictionary Dictionary for specific language (optional if first parameter has already dictionary).\n * @returns {object}\n */\n\nexport function registerLanguageDictionary(languageCodeOrDictionary, dictionary) {\n var languageCode = languageCodeOrDictionary;\n var dictionaryObject = dictionary; // Dictionary passed as first argument.\n\n if (isObject(languageCodeOrDictionary)) {\n dictionaryObject = languageCodeOrDictionary;\n languageCode = dictionaryObject.languageCode;\n }\n\n extendLanguageDictionary(languageCode, dictionaryObject);\n registerGloballyLanguageDictionary(languageCode, deepClone(dictionaryObject)); // We do not allow user to work with dictionary by reference, it can cause lot of bugs.\n\n return deepClone(dictionaryObject);\n}\n/**\n * Extend handled dictionary by default language dictionary. As result, if any dictionary key isn't defined for specific language, it will be filled with default language value (\"dictionary gaps\" are supplemented).\n *\n * @private\n * @param {string} languageCode Language code.\n * @param {object} dictionary Dictionary which is extended.\n */\n\nfunction extendLanguageDictionary(languageCode, dictionary) {\n if (languageCode !== DEFAULT_LANGUAGE_CODE) {\n extendNotExistingKeys(dictionary, getGlobalLanguageDictionary(DEFAULT_LANGUAGE_CODE));\n }\n}\n/**\n * Get language dictionary for specific language code.\n *\n * @param {string} languageCode Language code.\n * @returns {object} Object with constants representing identifiers for translation (as keys) and corresponding translation phrases (as values).\n */\n\n\nexport function getLanguageDictionary(languageCode) {\n if (!hasLanguageDictionary(languageCode)) {\n return null;\n }\n\n return deepClone(getGlobalLanguageDictionary(languageCode));\n}\n/**\n *\n * Get if language with specified language code was registered.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @returns {boolean}\n */\n\nexport function hasLanguageDictionary(languageCode) {\n return hasGlobalLanguageDictionary(languageCode);\n}\n/**\n * Get default language dictionary.\n *\n * @returns {object} Object with constants representing identifiers for translation (as keys) and corresponding translation phrases (as values).\n */\n\nexport function getDefaultLanguageDictionary() {\n return DEFAULT_DICTIONARY;\n}\n/**\n * Get registered language dictionaries.\n *\n * @returns {Array}\n */\n\nexport function getLanguagesDictionaries() {\n return getGlobalLanguagesDictionaries();\n}\n/**\n * Get phrase for specified dictionary key.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @param {string} dictionaryKey Constant which is dictionary key.\n * @param {*} argumentsForFormatters Arguments which will be handled by formatters.\n *\n * @returns {string}\n */\n\nexport function getTranslatedPhrase(languageCode, dictionaryKey, argumentsForFormatters) {\n var languageDictionary = getLanguageDictionary(languageCode);\n\n if (languageDictionary === null) {\n return null;\n }\n\n var phrasePropositions = languageDictionary[dictionaryKey];\n\n if (isUndefined(phrasePropositions)) {\n return null;\n }\n\n var formattedPhrase = getFormattedPhrase(phrasePropositions, argumentsForFormatters);\n\n if (Array.isArray(formattedPhrase)) {\n return formattedPhrase[0];\n }\n\n return formattedPhrase;\n}\n/**\n * Get formatted phrase from phrases propositions for specified dictionary key.\n *\n * @private\n * @param {Array|string} phrasePropositions List of phrase propositions.\n * @param {*} argumentsForFormatters Arguments which will be handled by formatters.\n *\n * @returns {Array|string}\n */\n\nfunction getFormattedPhrase(phrasePropositions, argumentsForFormatters) {\n var formattedPhrasePropositions = phrasePropositions;\n arrayEach(getPhraseFormatters(), function (formatter) {\n formattedPhrasePropositions = formatter(phrasePropositions, argumentsForFormatters);\n });\n return formattedPhrasePropositions;\n}\n/**\n * Returns valid language code. If the passed language code doesn't exist default one will be used.\n *\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @returns {string}\n */\n\n\nexport function getValidLanguageCode(languageCode) {\n var normalizedLanguageCode = normalizeLanguageCode(languageCode);\n\n if (!hasLanguageDictionary(normalizedLanguageCode)) {\n normalizedLanguageCode = DEFAULT_LANGUAGE_CODE;\n warnUserAboutLanguageRegistration(languageCode);\n }\n\n return normalizedLanguageCode;\n}","import \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport EventManager from \"../eventManager.mjs\";\nimport { isCtrlMetaKey, isKey } from \"../helpers/unicode.mjs\";\nvar eventManager = new EventManager();\nvar pressedKeys = new Set();\nvar refCount = 0;\n/**\n * Begins observing keyboard keys states.\n *\n * @param {Document} rootDocument The document owner.\n */\n\nfunction startObserving(rootDocument) {\n if (refCount === 0) {\n eventManager.addEventListener(rootDocument, 'keydown', function (event) {\n if (!pressedKeys.has(event.keyCode)) {\n pressedKeys.add(event.keyCode);\n }\n });\n eventManager.addEventListener(rootDocument, 'keyup', function (event) {\n if (pressedKeys.has(event.keyCode)) {\n pressedKeys.delete(event.keyCode);\n }\n });\n eventManager.addEventListener(rootDocument, 'visibilitychange', function () {\n if (rootDocument.hidden) {\n pressedKeys.clear();\n }\n });\n eventManager.addEventListener(rootDocument.defaultView, 'blur', function () {\n pressedKeys.clear();\n });\n }\n\n refCount += 1;\n}\n/**\n * Stops observing keyboard keys states and clear all previously saved states.\n */\n\n\nfunction stopObserving() {\n if (refCount > 0) {\n refCount -= 1;\n }\n\n if (refCount === 0) {\n _resetState();\n }\n}\n/**\n * Remove all listeners attached to the DOM and clear all previously saved states.\n */\n\n\nfunction _resetState() {\n eventManager.clearEvents();\n pressedKeys.clear();\n refCount = 0;\n}\n/**\n * Checks if provided keyCode or keyCodes are pressed.\n *\n * @param {string} keyCodes The key codes passed as a string defined in helpers/unicode.js file delimited with '|'.\n * @returns {boolean}\n */\n\n\nfunction isPressed(keyCodes) {\n return Array.from(pressedKeys.values()).some(function (_keyCode) {\n return isKey(_keyCode, keyCodes);\n });\n}\n/**\n * Checks if ctrl keys are pressed.\n *\n * @returns {boolean}\n */\n\n\nfunction isPressedCtrlKey() {\n var values = Array.from(pressedKeys.values());\n return values.some(function (_keyCode) {\n return isCtrlMetaKey(_keyCode);\n });\n}\n/**\n * Returns reference count. Useful for debugging and testing purposes.\n *\n * @returns {number}\n */\n\n\nfunction _getRefCount() {\n return refCount;\n}\n\nexport { _getRefCount, _resetState, isPressed, isPressedCtrlKey, startObserving, stopObserving };","import \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.string.includes.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport CellCoords from \"./../cell/coords.mjs\";\n/**\n * CellRange holds cell coordinates as {@link CellCoords} instances. This object represent unit of the selection layer which\n * can contains multiple contiquous cells or single cell.\n *\n * @util\n */\n\nvar CellRange = /*#__PURE__*/function () {\n function CellRange(highlight) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : highlight;\n var to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : highlight;\n\n _classCallCheck(this, CellRange);\n /**\n * Used to draw bold border around a cell where selection was started and to edit the cell\n * when you press Enter. The highlight cannot point to headers (negative values) so its\n * coordinates object is normalized while assigning.\n *\n * @type {CellCoords}\n */\n\n\n this.highlight = highlight.clone().normalize();\n /**\n * Usually the same as highlight, but in Excel there is distinction - one can change\n * highlight within a selection.\n *\n * @type {CellCoords}\n */\n\n this.from = from.clone();\n /**\n * End selection.\n *\n * @type {CellCoords}\n */\n\n this.to = to.clone();\n }\n /**\n * Set the new coordinates for highlighting selection.\n *\n * @param {CellCoords} coords Coordinates to use.\n * @returns {CellRange}\n */\n\n\n _createClass(CellRange, [{\n key: \"setHighlight\",\n value: function setHighlight(coords) {\n this.highlight = coords.clone().normalize();\n return this;\n }\n /**\n * Set the new coordinates where selection starts from.\n *\n * @param {CellCoords} coords Coordinates to use.\n * @returns {CellRange}\n */\n\n }, {\n key: \"setFrom\",\n value: function setFrom(coords) {\n this.from = coords.clone();\n return this;\n }\n /**\n * Set new coordinates where selection ends from.\n *\n * @param {CellCoords} coords Coordinates to use.\n * @returns {CellRange}\n */\n\n }, {\n key: \"setTo\",\n value: function setTo(coords) {\n this.to = coords.clone();\n return this;\n }\n /**\n * Checks if given coordinates are valid in context of a given Walkontable instance.\n *\n * @param {Walkontable} wot The Walkontable instance.\n * @returns {boolean}\n */\n\n }, {\n key: \"isValid\",\n value: function isValid(wot) {\n return this.from.isValid(wot) && this.to.isValid(wot);\n }\n /**\n * Checks if this cell range is restricted to one cell.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isSingle\",\n value: function isSingle() {\n return this.from.row >= 0 && this.from.row === this.to.row && this.from.col >= 0 && this.from.col === this.to.col;\n }\n /**\n * Returns selected range height (in number of rows including rows' headers).\n *\n * @returns {number}\n */\n\n }, {\n key: \"getOuterHeight\",\n value: function getOuterHeight() {\n return Math.max(this.from.row, this.to.row) - Math.min(this.from.row, this.to.row) + 1;\n }\n /**\n * Returns selected range width (in number of columns including columns' headers).\n *\n * @returns {number}\n */\n\n }, {\n key: \"getOuterWidth\",\n value: function getOuterWidth() {\n return Math.max(this.from.col, this.to.col) - Math.min(this.from.col, this.to.col) + 1;\n }\n /**\n * Returns selected range height (in number of rows excluding rows' headers).\n *\n * @returns {number}\n */\n\n }, {\n key: \"getHeight\",\n value: function getHeight() {\n var fromRow = Math.max(this.from.row, 0);\n var toRow = Math.max(this.to.row, 0);\n return Math.max(fromRow, toRow) - Math.min(fromRow, toRow) + 1;\n }\n /**\n * Returns selected range width (in number of columns excluding columns' headers).\n *\n * @returns {number}\n */\n\n }, {\n key: \"getWidth\",\n value: function getWidth() {\n var fromCol = Math.max(this.from.col, 0);\n var toCol = Math.max(this.to.col, 0);\n return Math.max(fromCol, toCol) - Math.min(fromCol, toCol) + 1;\n }\n /**\n * Checks if given cell coordinates are within `from` and `to` cell coordinates of this range.\n *\n * @param {CellCoords} cellCoords The cell coordinates to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"includes\",\n value: function includes(cellCoords) {\n var row = cellCoords.row,\n col = cellCoords.col;\n var topLeft = this.getOuterTopLeftCorner();\n var bottomRight = this.getOuterBottomRightCorner();\n return topLeft.row <= row && bottomRight.row >= row && topLeft.col <= col && bottomRight.col >= col;\n }\n /**\n * Checks if given range is within of this range.\n *\n * @param {CellRange} cellRange The cells range to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"includesRange\",\n value: function includesRange(cellRange) {\n return this.includes(cellRange.getOuterTopLeftCorner()) && this.includes(cellRange.getOuterBottomRightCorner());\n }\n /**\n * Checks if given range is equal to this range.\n *\n * @param {CellRange} cellRange The cells range to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isEqual\",\n value: function isEqual(cellRange) {\n return Math.min(this.from.row, this.to.row) === Math.min(cellRange.from.row, cellRange.to.row) && Math.max(this.from.row, this.to.row) === Math.max(cellRange.from.row, cellRange.to.row) && Math.min(this.from.col, this.to.col) === Math.min(cellRange.from.col, cellRange.to.col) && Math.max(this.from.col, this.to.col) === Math.max(cellRange.from.col, cellRange.to.col);\n }\n /**\n * Checks if tested range overlaps with the range. Range A is considered to to be overlapping with range B\n * if intersection of A and B or B and A is not empty.\n *\n * @param {CellRange} cellRange The cells range to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"overlaps\",\n value: function overlaps(cellRange) {\n return cellRange.isSouthEastOf(this.getOuterTopLeftCorner()) && cellRange.isNorthWestOf(this.getOuterBottomRightCorner());\n }\n /**\n * Checks if tested coordinates are positioned in south-east from this cell range.\n *\n * @param {CellRange} cellRange The cells range to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isSouthEastOf\",\n value: function isSouthEastOf(cellRange) {\n return this.getOuterTopLeftCorner().isSouthEastOf(cellRange) || this.getOuterBottomRightCorner().isSouthEastOf(cellRange);\n }\n /**\n * Checks if tested coordinates are positioned in north-west from this cell range.\n *\n * @param {CellRange} cellRange The cells range to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isNorthWestOf\",\n value: function isNorthWestOf(cellRange) {\n return this.getOuterTopLeftCorner().isNorthWestOf(cellRange) || this.getOuterBottomRightCorner().isNorthWestOf(cellRange);\n }\n /**\n * Returns `true` if the provided range is overlapping the current range horizontally (e.g. The current range's last\n * column is 5 and the provided range's first column is 3).\n *\n * @param {CellRange} cellRange The cells range to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isOverlappingHorizontally\",\n value: function isOverlappingHorizontally(cellRange) {\n return this.getOuterTopRightCorner().col >= cellRange.getOuterTopLeftCorner().col && this.getOuterTopRightCorner().col <= cellRange.getOuterTopRightCorner().col || this.getOuterTopLeftCorner().col <= cellRange.getOuterTopRightCorner().col && this.getOuterTopLeftCorner().col >= cellRange.getOuterTopLeftCorner().col;\n }\n /**\n * Returns `true` if the provided range is overlapping the current range vertically (e.g. The current range's last\n * row is 5 and the provided range's first row is 3).\n *\n * @param {CellRange} cellRange The cells range to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isOverlappingVertically\",\n value: function isOverlappingVertically(cellRange) {\n return this.getOuterBottomRightCorner().row >= cellRange.getOuterTopRightCorner().row && this.getOuterBottomRightCorner().row <= cellRange.getOuterBottomRightCorner().row || this.getOuterTopRightCorner().row <= cellRange.getOuterBottomRightCorner().row && this.getOuterTopRightCorner().row >= cellRange.getOuterTopRightCorner().row;\n }\n /**\n * Adds a cell to a range (only if exceeds corners of the range). Returns information if range was expanded.\n *\n * @param {CellCoords} cellCoords The cell coordinates.\n * @returns {boolean}\n */\n\n }, {\n key: \"expand\",\n value: function expand(cellCoords) {\n var topLeft = this.getOuterTopLeftCorner();\n var bottomRight = this.getOuterBottomRightCorner();\n\n if (cellCoords.row < topLeft.row || cellCoords.col < topLeft.col || cellCoords.row > bottomRight.row || cellCoords.col > bottomRight.col) {\n this.from = new CellCoords(Math.min(topLeft.row, cellCoords.row), Math.min(topLeft.col, cellCoords.col));\n this.to = new CellCoords(Math.max(bottomRight.row, cellCoords.row), Math.max(bottomRight.col, cellCoords.col));\n return true;\n }\n\n return false;\n }\n /**\n * Expand the current object by the range passed in the first argument.\n *\n * @param {CellRange} expandingRange Object extending the range.\n * @returns {boolean}\n */\n\n }, {\n key: \"expandByRange\",\n value: function expandByRange(expandingRange) {\n if (this.includesRange(expandingRange) || !this.overlaps(expandingRange)) {\n return false;\n }\n\n var topLeft = this.getOuterTopLeftCorner();\n var bottomRight = this.getOuterBottomRightCorner();\n var initialDirection = this.getDirection();\n var expandingTopLeft = expandingRange.getOuterTopLeftCorner();\n var expandingBottomRight = expandingRange.getOuterBottomRightCorner();\n var resultTopRow = Math.min(topLeft.row, expandingTopLeft.row);\n var resultTopCol = Math.min(topLeft.col, expandingTopLeft.col);\n var resultBottomRow = Math.max(bottomRight.row, expandingBottomRight.row);\n var resultBottomCol = Math.max(bottomRight.col, expandingBottomRight.col);\n var finalFrom = new CellCoords(resultTopRow, resultTopCol);\n var finalTo = new CellCoords(resultBottomRow, resultBottomCol);\n this.from = finalFrom;\n this.to = finalTo;\n this.setDirection(initialDirection);\n\n if (this.highlight.row === this.getOuterBottomRightCorner().row && this.getVerticalDirection() === 'N-S') {\n this.flipDirectionVertically();\n }\n\n if (this.highlight.col === this.getOuterTopRightCorner().col && this.getHorizontalDirection() === 'W-E') {\n this.flipDirectionHorizontally();\n }\n\n return true;\n }\n /**\n * Gets the direction of the selection.\n *\n * @returns {string} Returns one of the values: `'NW-SE'`, `'NE-SW'`, `'SE-NW'`, `'SW-NE'`.\n */\n\n }, {\n key: \"getDirection\",\n value: function getDirection() {\n if (this.from.isNorthWestOf(this.to)) {\n // NorthWest - SouthEast\n return 'NW-SE';\n } else if (this.from.isNorthEastOf(this.to)) {\n // NorthEast - SouthWest\n return 'NE-SW';\n } else if (this.from.isSouthEastOf(this.to)) {\n // SouthEast - NorthWest\n return 'SE-NW';\n } else if (this.from.isSouthWestOf(this.to)) {\n // SouthWest - NorthEast\n return 'SW-NE';\n }\n }\n /**\n * Sets the direction of the selection.\n *\n * @param {string} direction One of the values: `'NW-SE'`, `'NE-SW'`, `'SE-NW'`, `'SW-NE'`.\n */\n\n }, {\n key: \"setDirection\",\n value: function setDirection(direction) {\n switch (direction) {\n case 'NW-SE':\n var _ref = [this.getOuterTopLeftCorner(), this.getOuterBottomRightCorner()];\n this.from = _ref[0];\n this.to = _ref[1];\n break;\n\n case 'NE-SW':\n var _ref2 = [this.getOuterTopRightCorner(), this.getOuterBottomLeftCorner()];\n this.from = _ref2[0];\n this.to = _ref2[1];\n break;\n\n case 'SE-NW':\n var _ref3 = [this.getOuterBottomRightCorner(), this.getOuterTopLeftCorner()];\n this.from = _ref3[0];\n this.to = _ref3[1];\n break;\n\n case 'SW-NE':\n var _ref4 = [this.getOuterBottomLeftCorner(), this.getOuterTopRightCorner()];\n this.from = _ref4[0];\n this.to = _ref4[1];\n break;\n\n default:\n break;\n }\n }\n /**\n * Gets the vertical direction of the range.\n *\n * @returns {string} Returns one of the values: `N-S` (north->south), `S-N` (south->north).\n */\n\n }, {\n key: \"getVerticalDirection\",\n value: function getVerticalDirection() {\n return ['NE-SW', 'NW-SE'].indexOf(this.getDirection()) > -1 ? 'N-S' : 'S-N';\n }\n /**\n * Gets the horizontal direction of the range.\n *\n * @returns {string} Returns one of the values: `W-E` (west->east), `E-W` (east->west).\n */\n\n }, {\n key: \"getHorizontalDirection\",\n value: function getHorizontalDirection() {\n return ['NW-SE', 'SW-NE'].indexOf(this.getDirection()) > -1 ? 'W-E' : 'E-W';\n }\n /**\n * Flip the direction vertically. (e.g. `NW-SE` changes to `SW-NE`).\n */\n\n }, {\n key: \"flipDirectionVertically\",\n value: function flipDirectionVertically() {\n var direction = this.getDirection();\n\n switch (direction) {\n case 'NW-SE':\n this.setDirection('SW-NE');\n break;\n\n case 'NE-SW':\n this.setDirection('SE-NW');\n break;\n\n case 'SE-NW':\n this.setDirection('NE-SW');\n break;\n\n case 'SW-NE':\n this.setDirection('NW-SE');\n break;\n\n default:\n break;\n }\n }\n /**\n * Flip the direction horizontally. (e.g. `NW-SE` changes to `NE-SW`).\n */\n\n }, {\n key: \"flipDirectionHorizontally\",\n value: function flipDirectionHorizontally() {\n var direction = this.getDirection();\n\n switch (direction) {\n case 'NW-SE':\n this.setDirection('NE-SW');\n break;\n\n case 'NE-SW':\n this.setDirection('NW-SE');\n break;\n\n case 'SE-NW':\n this.setDirection('SW-NE');\n break;\n\n case 'SW-NE':\n this.setDirection('SE-NW');\n break;\n\n default:\n break;\n }\n }\n /**\n * Gets the top left corner of this range. If the corner contains header coordinates\n * (negative values), the corner coordinates will be normalized to 0.\n *\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getTopLeftCorner\",\n value: function getTopLeftCorner() {\n return new CellCoords(Math.min(this.from.row, this.to.row), Math.min(this.from.col, this.to.col)).normalize();\n }\n /**\n * Gets the bottom right corner of this range. If the corner contains header coordinates\n * (negative values), the corner coordinates will be normalized to 0.\n *\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getBottomRightCorner\",\n value: function getBottomRightCorner() {\n return new CellCoords(Math.max(this.from.row, this.to.row), Math.max(this.from.col, this.to.col)).normalize();\n }\n /**\n * Gets the top right corner of this range. If the corner contains header coordinates\n * (negative values), the corner coordinates will be normalized to 0.\n *\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getTopRightCorner\",\n value: function getTopRightCorner() {\n return new CellCoords(Math.min(this.from.row, this.to.row), Math.max(this.from.col, this.to.col)).normalize();\n }\n /**\n * Gets the bottom left corner of this range. If the corner contains header coordinates\n * (negative values), the corner coordinates will be normalized to 0.\n *\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getBottomLeftCorner\",\n value: function getBottomLeftCorner() {\n return new CellCoords(Math.max(this.from.row, this.to.row), Math.min(this.from.col, this.to.col)).normalize();\n }\n /**\n * Gets the top left corner of this range. If the corner contains header coordinates\n * (negative values), then the top and left coordinates will be pointed to that header.\n *\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getOuterTopLeftCorner\",\n value: function getOuterTopLeftCorner() {\n return new CellCoords(Math.min(this.from.row, this.to.row), Math.min(this.from.col, this.to.col));\n }\n /**\n * Gets the bottom right corner of this range.\n *\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getOuterBottomRightCorner\",\n value: function getOuterBottomRightCorner() {\n return new CellCoords(Math.max(this.from.row, this.to.row), Math.max(this.from.col, this.to.col));\n }\n /**\n * Gets the top right corner of this range. If the corner contains header coordinates\n * (negative values), then the top coordinate will be pointed to that header.\n *\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getOuterTopRightCorner\",\n value: function getOuterTopRightCorner() {\n return new CellCoords(Math.min(this.from.row, this.to.row), Math.max(this.from.col, this.to.col));\n }\n /**\n * Gets the bottom left corner of this range. If the corner contains header coordinates\n * (negative values), then the left coordinate will be pointed to that header.\n *\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getOuterBottomLeftCorner\",\n value: function getOuterBottomLeftCorner() {\n return new CellCoords(Math.max(this.from.row, this.to.row), Math.min(this.from.col, this.to.col));\n }\n /**\n * Checks if coordinates match to one of the 4th corners of this range.\n *\n * @param {CellCoords} coords Cell coordinates to check.\n * @param {CellRange} [expandedRange] The cells range to compare with.\n * @returns {boolean}\n */\n\n }, {\n key: \"isCorner\",\n value: function isCorner(coords, expandedRange) {\n if (expandedRange && expandedRange.includes(coords) && (this.getOuterTopLeftCorner().isEqual(new CellCoords(expandedRange.from.row, expandedRange.from.col)) || this.getOuterTopRightCorner().isEqual(new CellCoords(expandedRange.from.row, expandedRange.to.col)) || this.getOuterBottomLeftCorner().isEqual(new CellCoords(expandedRange.to.row, expandedRange.from.col)) || this.getOuterBottomRightCorner().isEqual(new CellCoords(expandedRange.to.row, expandedRange.to.col)))) {\n return true;\n }\n\n return coords.isEqual(this.getOuterTopLeftCorner()) || coords.isEqual(this.getOuterTopRightCorner()) || coords.isEqual(this.getOuterBottomLeftCorner()) || coords.isEqual(this.getOuterBottomRightCorner());\n }\n /**\n * Gets coordinates of the corner which is opposite to the matched. When the passed coordinates matched to the\n * bottom-right corner of this range then the coordinates for top-left will be returned.\n *\n * @param {CellCoords} coords Cell coordinates to check.\n * @param {CellRange} [expandedRange] The cells range to compare with.\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getOppositeCorner\",\n value: function getOppositeCorner(coords, expandedRange) {\n if (!(coords instanceof CellCoords)) {\n return false;\n }\n\n if (expandedRange) {\n if (expandedRange.includes(coords)) {\n if (this.getOuterTopLeftCorner().isEqual(new CellCoords(expandedRange.from.row, expandedRange.from.col))) {\n return this.getOuterBottomRightCorner();\n }\n\n if (this.getOuterTopRightCorner().isEqual(new CellCoords(expandedRange.from.row, expandedRange.to.col))) {\n return this.getOuterBottomLeftCorner();\n }\n\n if (this.getOuterBottomLeftCorner().isEqual(new CellCoords(expandedRange.to.row, expandedRange.from.col))) {\n return this.getOuterTopRightCorner();\n }\n\n if (this.getOuterBottomRightCorner().isEqual(new CellCoords(expandedRange.to.row, expandedRange.to.col))) {\n return this.getOuterTopLeftCorner();\n }\n }\n }\n\n if (coords.isEqual(this.getOuterBottomRightCorner())) {\n return this.getOuterTopLeftCorner();\n } else if (coords.isEqual(this.getOuterTopLeftCorner())) {\n return this.getOuterBottomRightCorner();\n } else if (coords.isEqual(this.getOuterTopRightCorner())) {\n return this.getOuterBottomLeftCorner();\n } else if (coords.isEqual(this.getOuterBottomLeftCorner())) {\n return this.getOuterTopRightCorner();\n }\n }\n /**\n * @param {CellRange} range The cells range to compare with.\n * @returns {Array}\n */\n\n }, {\n key: \"getBordersSharedWith\",\n value: function getBordersSharedWith(range) {\n if (!this.includesRange(range)) {\n return [];\n }\n\n var thisBorders = {\n top: Math.min(this.from.row, this.to.row),\n bottom: Math.max(this.from.row, this.to.row),\n left: Math.min(this.from.col, this.to.col),\n right: Math.max(this.from.col, this.to.col)\n };\n var rangeBorders = {\n top: Math.min(range.from.row, range.to.row),\n bottom: Math.max(range.from.row, range.to.row),\n left: Math.min(range.from.col, range.to.col),\n right: Math.max(range.from.col, range.to.col)\n };\n var result = [];\n\n if (thisBorders.top === rangeBorders.top) {\n result.push('top');\n }\n\n if (thisBorders.right === rangeBorders.right) {\n result.push('right');\n }\n\n if (thisBorders.bottom === rangeBorders.bottom) {\n result.push('bottom');\n }\n\n if (thisBorders.left === rangeBorders.left) {\n result.push('left');\n }\n\n return result;\n }\n /**\n * Get inner selected cell coords defined by this range.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getInner\",\n value: function getInner() {\n var topLeft = this.getOuterTopLeftCorner();\n var bottomRight = this.getOuterBottomRightCorner();\n var out = [];\n\n for (var r = topLeft.row; r <= bottomRight.row; r++) {\n for (var c = topLeft.col; c <= bottomRight.col; c++) {\n if (!(this.from.row === r && this.from.col === c) && !(this.to.row === r && this.to.col === c)) {\n out.push(new CellCoords(r, c));\n }\n }\n }\n\n return out;\n }\n /**\n * Get all selected cell coords defined by this range.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getAll\",\n value: function getAll() {\n var topLeft = this.getOuterTopLeftCorner();\n var bottomRight = this.getOuterBottomRightCorner();\n var out = [];\n\n for (var r = topLeft.row; r <= bottomRight.row; r++) {\n for (var c = topLeft.col; c <= bottomRight.col; c++) {\n if (topLeft.row === r && topLeft.col === c) {\n out.push(topLeft);\n } else if (bottomRight.row === r && bottomRight.col === c) {\n out.push(bottomRight);\n } else {\n out.push(new CellCoords(r, c));\n }\n }\n }\n\n return out;\n }\n /**\n * Runs a callback function against all cells in the range. You can break the iteration by returning\n * `false` in the callback function.\n *\n * @param {Function} callback The callback function.\n */\n\n }, {\n key: \"forAll\",\n value: function forAll(callback) {\n var topLeft = this.getOuterTopLeftCorner();\n var bottomRight = this.getOuterBottomRightCorner();\n\n for (var r = topLeft.row; r <= bottomRight.row; r++) {\n for (var c = topLeft.col; c <= bottomRight.col; c++) {\n var breakIteration = callback(r, c);\n\n if (breakIteration === false) {\n return;\n }\n }\n }\n }\n /**\n * Clones the range coordinates.\n *\n * @returns {CellRange}\n */\n\n }, {\n key: \"clone\",\n value: function clone() {\n return new CellRange(this.highlight, this.from, this.to);\n }\n /**\n * Convert CellRange to literal object.\n *\n * @returns {object} Returns a literal object with `from` and `to` properties which each of that object\n * contains `row` and `col` keys.\n */\n\n }, {\n key: \"toObject\",\n value: function toObject() {\n return {\n from: this.from.toObject(),\n to: this.to.toObject()\n };\n }\n }]);\n\n return CellRange;\n}();\n\nexport default CellRange;","import \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.string.includes.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { addClass, hasClass, removeClass, getComputedStyle, getTrimmingContainer, innerWidth, innerHeight, offset, outerHeight, outerWidth } from \"./../../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation } from \"./../../../helpers/dom/event.mjs\";\nimport { objectEach } from \"./../../../helpers/object.mjs\";\nimport { isMobileBrowser } from \"./../../../helpers/browser.mjs\";\nimport EventManager from \"./../../../eventManager.mjs\";\nimport CellCoords from \"./cell/coords.mjs\";\n/**\n *\n */\n\nvar Border = /*#__PURE__*/function () {\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n * @param {object} settings The border settings.\n */\n function Border(wotInstance, settings) {\n _classCallCheck(this, Border);\n\n if (!settings) {\n return;\n }\n\n this.eventManager = new EventManager(wotInstance);\n this.instance = wotInstance;\n this.wot = wotInstance;\n this.settings = settings;\n this.mouseDown = false;\n this.main = null;\n this.top = null;\n this.left = null;\n this.bottom = null;\n this.right = null;\n this.topStyle = null;\n this.leftStyle = null;\n this.bottomStyle = null;\n this.rightStyle = null;\n this.cornerDefaultStyle = {\n width: '6px',\n height: '6px',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: '#FFF'\n }; // Offset to moving the corner to be centered relative to the grid.\n\n this.cornerCenterPointOffset = -(parseInt(this.cornerDefaultStyle.width, 10) / 2);\n this.corner = null;\n this.cornerStyle = null;\n this.createBorders(settings);\n this.registerListeners();\n }\n /**\n * Register all necessary events.\n */\n\n\n _createClass(Border, [{\n key: \"registerListeners\",\n value: function registerListeners() {\n var _this2 = this;\n\n var documentBody = this.wot.rootDocument.body;\n this.eventManager.addEventListener(documentBody, 'mousedown', function () {\n return _this2.onMouseDown();\n });\n this.eventManager.addEventListener(documentBody, 'mouseup', function () {\n return _this2.onMouseUp();\n });\n\n var _loop = function _loop(c, len) {\n var element = _this2.main.childNodes[c];\n\n _this2.eventManager.addEventListener(element, 'mouseenter', function (event) {\n return _this2.onMouseEnter(event, _this2.main.childNodes[c]);\n });\n };\n\n for (var c = 0, len = this.main.childNodes.length; c < len; c++) {\n _loop(c, len);\n }\n }\n /**\n * Mouse down listener.\n *\n * @private\n */\n\n }, {\n key: \"onMouseDown\",\n value: function onMouseDown() {\n this.mouseDown = true;\n }\n /**\n * Mouse up listener.\n *\n * @private\n */\n\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp() {\n this.mouseDown = false;\n }\n /**\n * Mouse enter listener for fragment selection functionality.\n *\n * @private\n * @param {Event} event Dom event.\n * @param {HTMLElement} parentElement Part of border element.\n */\n\n }, {\n key: \"onMouseEnter\",\n value: function onMouseEnter(event, parentElement) {\n if (!this.mouseDown || !this.wot.getSetting('hideBorderOnMouseDownOver')) {\n return;\n }\n\n event.preventDefault();\n stopImmediatePropagation(event);\n\n var _this = this;\n\n var documentBody = this.wot.rootDocument.body;\n var bounds = parentElement.getBoundingClientRect(); // Hide border to prevents selection jumping when fragmentSelection is enabled.\n\n parentElement.style.display = 'none';\n /**\n * @param {Event} mouseEvent The mouse event object.\n * @returns {boolean}\n */\n\n function isOutside(mouseEvent) {\n if (mouseEvent.clientY < Math.floor(bounds.top)) {\n return true;\n }\n\n if (mouseEvent.clientY > Math.ceil(bounds.top + bounds.height)) {\n return true;\n }\n\n if (mouseEvent.clientX < Math.floor(bounds.left)) {\n return true;\n }\n\n if (mouseEvent.clientX > Math.ceil(bounds.left + bounds.width)) {\n return true;\n }\n }\n /**\n * @param {Event} handlerEvent The mouse event object.\n */\n\n\n function handler(handlerEvent) {\n if (isOutside(handlerEvent)) {\n _this.eventManager.removeEventListener(documentBody, 'mousemove', handler);\n\n parentElement.style.display = 'block';\n }\n }\n\n this.eventManager.addEventListener(documentBody, 'mousemove', handler);\n }\n /**\n * Create border elements.\n *\n * @param {object} settings The border settings.\n */\n\n }, {\n key: \"createBorders\",\n value: function createBorders(settings) {\n var rootDocument = this.wot.rootDocument;\n this.main = rootDocument.createElement('div');\n var borderDivs = ['top', 'left', 'bottom', 'right', 'corner'];\n var style = this.main.style;\n style.position = 'absolute';\n style.top = 0;\n style.left = 0;\n\n for (var i = 0; i < 5; i++) {\n var position = borderDivs[i];\n var div = rootDocument.createElement('div');\n div.className = \"wtBorder \".concat(this.settings.className || ''); // + borderDivs[i];\n\n if (this.settings[position] && this.settings[position].hide) {\n div.className += ' hidden';\n }\n\n style = div.style;\n style.backgroundColor = this.settings[position] && this.settings[position].color ? this.settings[position].color : settings.border.color;\n style.height = this.settings[position] && this.settings[position].width ? \"\".concat(this.settings[position].width, \"px\") : \"\".concat(settings.border.width, \"px\");\n style.width = this.settings[position] && this.settings[position].width ? \"\".concat(this.settings[position].width, \"px\") : \"\".concat(settings.border.width, \"px\");\n this.main.appendChild(div);\n }\n\n this.top = this.main.childNodes[0];\n this.left = this.main.childNodes[1];\n this.bottom = this.main.childNodes[2];\n this.right = this.main.childNodes[3];\n this.topStyle = this.top.style;\n this.leftStyle = this.left.style;\n this.bottomStyle = this.bottom.style;\n this.rightStyle = this.right.style;\n this.corner = this.main.childNodes[4];\n this.corner.className += ' corner';\n this.cornerStyle = this.corner.style;\n this.cornerStyle.width = this.cornerDefaultStyle.width;\n this.cornerStyle.height = this.cornerDefaultStyle.height;\n this.cornerStyle.border = [this.cornerDefaultStyle.borderWidth, this.cornerDefaultStyle.borderStyle, this.cornerDefaultStyle.borderColor].join(' ');\n\n if (isMobileBrowser()) {\n this.createMultipleSelectorHandles();\n }\n\n this.disappear();\n var wtTable = this.wot.wtTable;\n var bordersHolder = wtTable.bordersHolder;\n\n if (!bordersHolder) {\n bordersHolder = rootDocument.createElement('div');\n bordersHolder.className = 'htBorders';\n wtTable.bordersHolder = bordersHolder;\n wtTable.spreader.appendChild(bordersHolder);\n }\n\n bordersHolder.appendChild(this.main);\n }\n /**\n * Create multiple selector handler for mobile devices.\n */\n\n }, {\n key: \"createMultipleSelectorHandles\",\n value: function createMultipleSelectorHandles() {\n var _this3 = this;\n\n var rootDocument = this.wot.rootDocument;\n this.selectionHandles = {\n topLeft: rootDocument.createElement('DIV'),\n topLeftHitArea: rootDocument.createElement('DIV'),\n bottomRight: rootDocument.createElement('DIV'),\n bottomRightHitArea: rootDocument.createElement('DIV')\n };\n var width = 10;\n var hitAreaWidth = 40;\n this.selectionHandles.topLeft.className = 'topLeftSelectionHandle';\n this.selectionHandles.topLeftHitArea.className = 'topLeftSelectionHandle-HitArea';\n this.selectionHandles.bottomRight.className = 'bottomRightSelectionHandle';\n this.selectionHandles.bottomRightHitArea.className = 'bottomRightSelectionHandle-HitArea';\n this.selectionHandles.styles = {\n topLeft: this.selectionHandles.topLeft.style,\n topLeftHitArea: this.selectionHandles.topLeftHitArea.style,\n bottomRight: this.selectionHandles.bottomRight.style,\n bottomRightHitArea: this.selectionHandles.bottomRightHitArea.style\n };\n var hitAreaStyle = {\n position: 'absolute',\n height: \"\".concat(hitAreaWidth, \"px\"),\n width: \"\".concat(hitAreaWidth, \"px\"),\n 'border-radius': \"\".concat(parseInt(hitAreaWidth / 1.5, 10), \"px\")\n };\n objectEach(hitAreaStyle, function (value, key) {\n _this3.selectionHandles.styles.bottomRightHitArea[key] = value;\n _this3.selectionHandles.styles.topLeftHitArea[key] = value;\n });\n var handleStyle = {\n position: 'absolute',\n height: \"\".concat(width, \"px\"),\n width: \"\".concat(width, \"px\"),\n 'border-radius': \"\".concat(parseInt(width / 1.5, 10), \"px\"),\n background: '#F5F5FF',\n border: '1px solid #4285c8'\n };\n objectEach(handleStyle, function (value, key) {\n _this3.selectionHandles.styles.bottomRight[key] = value;\n _this3.selectionHandles.styles.topLeft[key] = value;\n });\n this.main.appendChild(this.selectionHandles.topLeft);\n this.main.appendChild(this.selectionHandles.bottomRight);\n this.main.appendChild(this.selectionHandles.topLeftHitArea);\n this.main.appendChild(this.selectionHandles.bottomRightHitArea);\n }\n /**\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isPartRange\",\n value: function isPartRange(row, col) {\n var areaSelection = this.wot.selections.createOrGetArea();\n\n if (areaSelection.cellRange) {\n if (row !== areaSelection.cellRange.to.row || col !== areaSelection.cellRange.to.col) {\n return true;\n }\n }\n\n return false;\n }\n /**\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number} top The top position of the handler.\n * @param {number} left The left position of the handler.\n * @param {number} width The width of the handler.\n * @param {number} height The height of the handler.\n */\n\n }, {\n key: \"updateMultipleSelectionHandlesPosition\",\n value: function updateMultipleSelectionHandlesPosition(row, col, top, left, width, height) {\n var handleWidth = parseInt(this.selectionHandles.styles.topLeft.width, 10);\n var hitAreaWidth = parseInt(this.selectionHandles.styles.topLeftHitArea.width, 10);\n this.selectionHandles.styles.topLeft.top = \"\".concat(parseInt(top - handleWidth, 10), \"px\");\n this.selectionHandles.styles.topLeft.left = \"\".concat(parseInt(left - handleWidth, 10), \"px\");\n this.selectionHandles.styles.topLeftHitArea.top = \"\".concat(parseInt(top - hitAreaWidth / 4 * 3, 10), \"px\");\n this.selectionHandles.styles.topLeftHitArea.left = \"\".concat(parseInt(left - hitAreaWidth / 4 * 3, 10), \"px\");\n this.selectionHandles.styles.bottomRight.top = \"\".concat(parseInt(top + height, 10), \"px\");\n this.selectionHandles.styles.bottomRight.left = \"\".concat(parseInt(left + width, 10), \"px\");\n this.selectionHandles.styles.bottomRightHitArea.top = \"\".concat(parseInt(top + height - hitAreaWidth / 4, 10), \"px\");\n this.selectionHandles.styles.bottomRightHitArea.left = \"\".concat(parseInt(left + width - hitAreaWidth / 4, 10), \"px\");\n\n if (this.settings.border.cornerVisible && this.settings.border.cornerVisible()) {\n this.selectionHandles.styles.topLeft.display = 'block';\n this.selectionHandles.styles.topLeftHitArea.display = 'block';\n\n if (this.isPartRange(row, col)) {\n this.selectionHandles.styles.bottomRight.display = 'none';\n this.selectionHandles.styles.bottomRightHitArea.display = 'none';\n } else {\n this.selectionHandles.styles.bottomRight.display = 'block';\n this.selectionHandles.styles.bottomRightHitArea.display = 'block';\n }\n } else {\n this.selectionHandles.styles.topLeft.display = 'none';\n this.selectionHandles.styles.bottomRight.display = 'none';\n this.selectionHandles.styles.topLeftHitArea.display = 'none';\n this.selectionHandles.styles.bottomRightHitArea.display = 'none';\n }\n\n if (row === this.wot.wtSettings.getSetting('fixedRowsTop') || col === this.wot.wtSettings.getSetting('fixedColumnsLeft')) {\n this.selectionHandles.styles.topLeft.zIndex = '9999';\n this.selectionHandles.styles.topLeftHitArea.zIndex = '9999';\n } else {\n this.selectionHandles.styles.topLeft.zIndex = '';\n this.selectionHandles.styles.topLeftHitArea.zIndex = '';\n }\n }\n /**\n * Show border around one or many cells.\n *\n * @param {Array} corners The corner coordinates.\n */\n\n }, {\n key: \"appear\",\n value: function appear(corners) {\n if (this.disabled) {\n return;\n }\n\n var _this$wot = this.wot,\n wtTable = _this$wot.wtTable,\n rootDocument = _this$wot.rootDocument,\n rootWindow = _this$wot.rootWindow;\n var fromRow;\n var toRow;\n var fromColumn;\n var toColumn;\n var rowsCount = wtTable.getRenderedRowsCount();\n\n for (var i = 0; i < rowsCount; i += 1) {\n var s = wtTable.rowFilter.renderedToSource(i);\n\n if (s >= corners[0] && s <= corners[2]) {\n fromRow = s;\n break;\n }\n }\n\n for (var _i = rowsCount - 1; _i >= 0; _i -= 1) {\n var _s = wtTable.rowFilter.renderedToSource(_i);\n\n if (_s >= corners[0] && _s <= corners[2]) {\n toRow = _s;\n break;\n }\n }\n\n var columnsCount = wtTable.getRenderedColumnsCount();\n\n for (var _i2 = 0; _i2 < columnsCount; _i2 += 1) {\n var _s2 = wtTable.columnFilter.renderedToSource(_i2);\n\n if (_s2 >= corners[1] && _s2 <= corners[3]) {\n fromColumn = _s2;\n break;\n }\n }\n\n for (var _i3 = columnsCount - 1; _i3 >= 0; _i3 -= 1) {\n var _s3 = wtTable.columnFilter.renderedToSource(_i3);\n\n if (_s3 >= corners[1] && _s3 <= corners[3]) {\n toColumn = _s3;\n break;\n }\n }\n\n if (fromRow === void 0 || fromColumn === void 0) {\n this.disappear();\n return;\n }\n\n var fromTD = wtTable.getCell(new CellCoords(fromRow, fromColumn));\n var isMultiple = fromRow !== toRow || fromColumn !== toColumn;\n var toTD = isMultiple ? wtTable.getCell(new CellCoords(toRow, toColumn)) : fromTD;\n var fromOffset = offset(fromTD);\n var toOffset = isMultiple ? offset(toTD) : fromOffset;\n var containerOffset = offset(wtTable.TABLE);\n var minTop = fromOffset.top;\n var minLeft = fromOffset.left;\n var left = minLeft - containerOffset.left - 1;\n var width = toOffset.left + outerWidth(toTD) - minLeft;\n\n if (this.isEntireColumnSelected(fromRow, toRow)) {\n var modifiedValues = this.getDimensionsFromHeader('columns', fromColumn, toColumn, containerOffset);\n var fromTH = null;\n\n if (modifiedValues) {\n var _modifiedValues = _slicedToArray(modifiedValues, 3);\n\n fromTH = _modifiedValues[0];\n left = _modifiedValues[1];\n width = _modifiedValues[2];\n }\n\n if (fromTH) {\n fromTD = fromTH;\n }\n }\n\n var top = minTop - containerOffset.top - 1;\n var height = toOffset.top + outerHeight(toTD) - minTop;\n\n if (this.isEntireRowSelected(fromColumn, toColumn)) {\n var _modifiedValues2 = this.getDimensionsFromHeader('rows', fromRow, toRow, containerOffset);\n\n var _fromTH = null;\n\n if (_modifiedValues2) {\n var _modifiedValues3 = _slicedToArray(_modifiedValues2, 3);\n\n _fromTH = _modifiedValues3[0];\n top = _modifiedValues3[1];\n height = _modifiedValues3[2];\n }\n\n if (_fromTH) {\n fromTD = _fromTH;\n }\n }\n\n var style = getComputedStyle(fromTD, rootWindow);\n\n if (parseInt(style.borderTopWidth, 10) > 0) {\n top += 1;\n height = height > 0 ? height - 1 : 0;\n }\n\n if (parseInt(style.borderLeftWidth, 10) > 0) {\n left += 1;\n width = width > 0 ? width - 1 : 0;\n }\n\n this.topStyle.top = \"\".concat(top, \"px\");\n this.topStyle.left = \"\".concat(left, \"px\");\n this.topStyle.width = \"\".concat(width, \"px\");\n this.topStyle.display = 'block';\n this.leftStyle.top = \"\".concat(top, \"px\");\n this.leftStyle.left = \"\".concat(left, \"px\");\n this.leftStyle.height = \"\".concat(height, \"px\");\n this.leftStyle.display = 'block';\n var delta = Math.floor(this.settings.border.width / 2);\n this.bottomStyle.top = \"\".concat(top + height - delta, \"px\");\n this.bottomStyle.left = \"\".concat(left, \"px\");\n this.bottomStyle.width = \"\".concat(width, \"px\");\n this.bottomStyle.display = 'block';\n this.rightStyle.top = \"\".concat(top, \"px\");\n this.rightStyle.left = \"\".concat(left + width - delta, \"px\");\n this.rightStyle.height = \"\".concat(height + 1, \"px\");\n this.rightStyle.display = 'block';\n var cornerVisibleSetting = this.settings.border.cornerVisible;\n cornerVisibleSetting = typeof cornerVisibleSetting === 'function' ? cornerVisibleSetting(this.settings.layerLevel) : cornerVisibleSetting;\n var hookResult = this.wot.getSetting('onModifyGetCellCoords', toRow, toColumn);\n var checkRow = toRow,\n checkCol = toColumn;\n\n if (hookResult && Array.isArray(hookResult)) {\n var _hookResult = _slicedToArray(hookResult, 4);\n\n checkRow = _hookResult[2];\n checkCol = _hookResult[3];\n }\n\n if (isMobileBrowser() || !cornerVisibleSetting || this.isPartRange(checkRow, checkCol)) {\n this.cornerStyle.display = 'none';\n } else {\n this.cornerStyle.top = \"\".concat(top + height + this.cornerCenterPointOffset - 1, \"px\");\n this.cornerStyle.left = \"\".concat(left + width + this.cornerCenterPointOffset - 1, \"px\");\n this.cornerStyle.borderRightWidth = this.cornerDefaultStyle.borderWidth;\n this.cornerStyle.width = this.cornerDefaultStyle.width; // Hide the fill handle, so the possible further adjustments won't force unneeded scrollbars.\n\n this.cornerStyle.display = 'none';\n var trimmingContainer = getTrimmingContainer(wtTable.TABLE);\n var trimToWindow = trimmingContainer === rootWindow;\n\n if (trimToWindow) {\n trimmingContainer = rootDocument.documentElement;\n }\n\n if (toColumn === this.wot.getSetting('totalColumns') - 1) {\n var toTdOffsetLeft = trimToWindow ? toTD.getBoundingClientRect().left : toTD.offsetLeft;\n var cornerRightEdge = toTdOffsetLeft + outerWidth(toTD) + parseInt(this.cornerDefaultStyle.width, 10) / 2;\n var cornerOverlappingContainer = cornerRightEdge >= innerWidth(trimmingContainer);\n\n if (cornerOverlappingContainer) {\n this.cornerStyle.left = \"\".concat(Math.floor(left + width + this.cornerCenterPointOffset - parseInt(this.cornerDefaultStyle.width, 10) / 2), \"px\"); // eslint-disable-line max-len\n\n this.cornerStyle.borderRightWidth = 0;\n }\n }\n\n if (toRow === this.wot.getSetting('totalRows') - 1) {\n var toTdOffsetTop = trimToWindow ? toTD.getBoundingClientRect().top : toTD.offsetTop;\n var cornerBottomEdge = toTdOffsetTop + outerHeight(toTD) + parseInt(this.cornerDefaultStyle.height, 10) / 2;\n\n var _cornerOverlappingContainer = cornerBottomEdge >= innerHeight(trimmingContainer);\n\n if (_cornerOverlappingContainer) {\n this.cornerStyle.top = \"\".concat(Math.floor(top + height + this.cornerCenterPointOffset - parseInt(this.cornerDefaultStyle.height, 10) / 2), \"px\"); // eslint-disable-line max-len\n\n this.cornerStyle.borderBottomWidth = 0;\n }\n }\n\n this.cornerStyle.display = 'block';\n }\n\n if (isMobileBrowser()) {\n this.updateMultipleSelectionHandlesPosition(toRow, toColumn, top, left, width, height);\n }\n }\n /**\n * Check whether an entire column of cells is selected.\n *\n * @private\n * @param {number} startRowIndex Start row index.\n * @param {number} endRowIndex End row index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isEntireColumnSelected\",\n value: function isEntireColumnSelected(startRowIndex, endRowIndex) {\n return startRowIndex === this.wot.wtTable.getFirstRenderedRow() && endRowIndex === this.wot.wtTable.getLastRenderedRow();\n }\n /**\n * Check whether an entire row of cells is selected.\n *\n * @private\n * @param {number} startColumnIndex Start column index.\n * @param {number} endColumnIndex End column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isEntireRowSelected\",\n value: function isEntireRowSelected(startColumnIndex, endColumnIndex) {\n return startColumnIndex === this.wot.wtTable.getFirstRenderedColumn() && endColumnIndex === this.wot.wtTable.getLastRenderedColumn();\n }\n /**\n * Get left/top index and width/height depending on the `direction` provided.\n *\n * @private\n * @param {string} direction `rows` or `columns`, defines if an entire column or row is selected.\n * @param {number} fromIndex Start index of the selection.\n * @param {number} toIndex End index of the selection.\n * @param {number} containerOffset Offset of the container.\n * @returns {Array|boolean} Returns an array of [headerElement, left, width] or [headerElement, top, height], depending on `direction` (`false` in case of an error getting the headers).\n */\n\n }, {\n key: \"getDimensionsFromHeader\",\n value: function getDimensionsFromHeader(direction, fromIndex, toIndex, containerOffset) {\n var wtTable = this.wot.wtTable;\n var rootHotElement = wtTable.wtRootElement.parentNode;\n var getHeaderFn = null;\n var dimensionFn = null;\n var entireSelectionClassname = null;\n var index = null;\n var dimension = null;\n var dimensionProperty = null;\n var startHeader = null;\n var endHeader = null;\n\n switch (direction) {\n case 'rows':\n getHeaderFn = function getHeaderFn() {\n return wtTable.getRowHeader.apply(wtTable, arguments);\n };\n\n dimensionFn = function dimensionFn() {\n return outerHeight.apply(void 0, arguments);\n };\n\n entireSelectionClassname = 'ht__selection--rows';\n dimensionProperty = 'top';\n break;\n\n case 'columns':\n getHeaderFn = function getHeaderFn() {\n return wtTable.getColumnHeader.apply(wtTable, arguments);\n };\n\n dimensionFn = function dimensionFn() {\n return outerWidth.apply(void 0, arguments);\n };\n\n entireSelectionClassname = 'ht__selection--columns';\n dimensionProperty = 'left';\n break;\n\n default:\n }\n\n if (rootHotElement.className.includes(entireSelectionClassname)) {\n var columnHeaderLevelCount = this.wot.getSetting('columnHeaders').length;\n startHeader = getHeaderFn(fromIndex, columnHeaderLevelCount - 1);\n endHeader = getHeaderFn(toIndex, columnHeaderLevelCount - 1);\n\n if (!startHeader || !endHeader) {\n return false;\n }\n\n var startHeaderOffset = offset(startHeader);\n var endOffset = offset(endHeader);\n\n if (startHeader && endHeader) {\n index = startHeaderOffset[dimensionProperty] - containerOffset[dimensionProperty] - 1;\n dimension = endOffset[dimensionProperty] + dimensionFn(endHeader) - startHeaderOffset[dimensionProperty];\n }\n\n return [startHeader, index, dimension];\n }\n\n return false;\n }\n /**\n * Change border style.\n *\n * @private\n * @param {string} borderElement Coordinate where add/remove border: top, right, bottom, left.\n * @param {object} border The border object descriptor.\n */\n\n }, {\n key: \"changeBorderStyle\",\n value: function changeBorderStyle(borderElement, border) {\n var style = this[borderElement].style;\n var borderStyle = border[borderElement];\n\n if (!borderStyle || borderStyle.hide) {\n addClass(this[borderElement], 'hidden');\n } else {\n if (hasClass(this[borderElement], 'hidden')) {\n removeClass(this[borderElement], 'hidden');\n }\n\n style.backgroundColor = borderStyle.color;\n\n if (borderElement === 'top' || borderElement === 'bottom') {\n style.height = \"\".concat(borderStyle.width, \"px\");\n }\n\n if (borderElement === 'right' || borderElement === 'left') {\n style.width = \"\".concat(borderStyle.width, \"px\");\n }\n }\n }\n /**\n * Change border style to default.\n *\n * @private\n * @param {string} position The position type (\"top\", \"bottom\", \"left\", \"right\") to change.\n */\n\n }, {\n key: \"changeBorderToDefaultStyle\",\n value: function changeBorderToDefaultStyle(position) {\n var defaultBorder = {\n width: 1,\n color: '#000'\n };\n var style = this[position].style;\n style.backgroundColor = defaultBorder.color;\n style.width = \"\".concat(defaultBorder.width, \"px\");\n style.height = \"\".concat(defaultBorder.width, \"px\");\n }\n /**\n * Toggle class 'hidden' to element.\n *\n * @private\n * @param {string} borderElement Coordinate where add/remove border: top, right, bottom, left.\n * @param {boolean} [remove] Defines type of the action to perform.\n */\n\n }, {\n key: \"toggleHiddenClass\",\n value: function toggleHiddenClass(borderElement, remove) {\n this.changeBorderToDefaultStyle(borderElement);\n\n if (remove) {\n addClass(this[borderElement], 'hidden');\n } else {\n removeClass(this[borderElement], 'hidden');\n }\n }\n /**\n * Hide border.\n */\n\n }, {\n key: \"disappear\",\n value: function disappear() {\n this.topStyle.display = 'none';\n this.leftStyle.display = 'none';\n this.bottomStyle.display = 'none';\n this.rightStyle.display = 'none';\n this.cornerStyle.display = 'none';\n\n if (isMobileBrowser()) {\n this.selectionHandles.styles.topLeft.display = 'none';\n this.selectionHandles.styles.bottomRight.display = 'none';\n }\n }\n /**\n * Cleans up all the DOM state related to a Border instance. Call this prior to deleting a Border instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.eventManager.destroyWithOwnEventsOnly();\n this.main.parentNode.removeChild(this.main);\n }\n }]);\n\n return Border;\n}();\n\nexport default Border;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.object.values.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { addClass, hasClass } from \"./../../../helpers/dom/element.mjs\";\nimport Border from \"./border.mjs\";\nimport CellCoords from \"./cell/coords.mjs\";\nimport CellRange from \"./cell/range.mjs\";\n/**\n * @class Selection\n */\n\nvar Selection = /*#__PURE__*/function () {\n /**\n * @param {object} settings The selection settings object.\n * @param {CellRange} cellRange The cell range instance.\n */\n function Selection(settings, cellRange) {\n _classCallCheck(this, Selection);\n\n this.settings = settings;\n this.cellRange = cellRange || null;\n this.instanceBorders = {};\n this.classNames = [this.settings.className];\n this.classNameGenerator = this.linearClassNameGenerator(this.settings.className, this.settings.layerLevel);\n }\n /**\n * Each Walkontable clone requires it's own border for every selection. This method creates and returns selection\n * borders per instance.\n *\n * @param {Walkontable} wotInstance The Walkontable instance.\n * @returns {Border}\n */\n\n\n _createClass(Selection, [{\n key: \"getBorder\",\n value: function getBorder(wotInstance) {\n if (!this.instanceBorders[wotInstance.guid]) {\n this.instanceBorders[wotInstance.guid] = new Border(wotInstance, this.settings);\n }\n\n return this.instanceBorders[wotInstance.guid];\n }\n /**\n * Checks if selection is empty.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n return this.cellRange === null;\n }\n /**\n * Adds a cell coords to the selection.\n *\n * @param {CellCoords} coords The cell coordinates to add.\n * @returns {Selection}\n */\n\n }, {\n key: \"add\",\n value: function add(coords) {\n if (this.isEmpty()) {\n this.cellRange = new CellRange(coords);\n } else {\n this.cellRange.expand(coords);\n }\n\n return this;\n }\n /**\n * If selection range from or to property equals oldCoords, replace it with newCoords. Return boolean\n * information about success.\n *\n * @param {CellCoords} oldCoords An old cell coordinates to replace.\n * @param {CellCoords} newCoords The new cell coordinates.\n * @returns {boolean}\n */\n\n }, {\n key: \"replace\",\n value: function replace(oldCoords, newCoords) {\n if (!this.isEmpty()) {\n if (this.cellRange.from.isEqual(oldCoords)) {\n this.cellRange.from = newCoords;\n return true;\n }\n\n if (this.cellRange.to.isEqual(oldCoords)) {\n this.cellRange.to = newCoords;\n return true;\n }\n }\n\n return false;\n }\n /**\n * Clears selection.\n *\n * @returns {Selection}\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.cellRange = null;\n return this;\n }\n /**\n * Returns the top left (TL) and bottom right (BR) selection coordinates.\n *\n * @returns {Array} Returns array of coordinates for example `[1, 1, 5, 5]`.\n */\n\n }, {\n key: \"getCorners\",\n value: function getCorners() {\n var topLeft = this.cellRange.getOuterTopLeftCorner();\n var bottomRight = this.cellRange.getOuterBottomRightCorner();\n return [topLeft.row, topLeft.col, bottomRight.row, bottomRight.col];\n }\n /**\n * Adds class name to cell element at given coords.\n *\n * @param {Walkontable} wotInstance Walkontable instance.\n * @param {number} sourceRow Cell row coord.\n * @param {number} sourceColumn Cell column coord.\n * @param {string} className Class name.\n * @param {boolean} [markIntersections=false] If `true`, linear className generator will be used to add CSS classes\n * in a continuous way.\n * @returns {Selection}\n */\n\n }, {\n key: \"addClassAtCoords\",\n value: function addClassAtCoords(wotInstance, sourceRow, sourceColumn, className) {\n var markIntersections = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n var TD = wotInstance.wtTable.getCell(new CellCoords(sourceRow, sourceColumn));\n\n if (_typeof(TD) === 'object') {\n var cellClassName = className;\n\n if (markIntersections) {\n cellClassName = this.classNameGenerator(TD);\n\n if (!this.classNames.includes(cellClassName)) {\n this.classNames.push(cellClassName);\n }\n }\n\n addClass(TD, cellClassName);\n }\n\n return this;\n }\n /**\n * Generate helper for calculating classNames based on previously added base className.\n * The generated className is always generated as a continuation of the previous className. For example, when\n * the currently checked element has 'area-2' className the generated new className will be 'area-3'. When\n * the element doesn't have any classNames than the base className will be returned ('area');.\n *\n * @param {string} baseClassName Base className to be used.\n * @param {number} layerLevelOwner Layer level which the instance of the Selection belongs to.\n * @returns {Function}\n */\n\n }, {\n key: \"linearClassNameGenerator\",\n value: function linearClassNameGenerator(baseClassName, layerLevelOwner) {\n // TODO: Make this recursive function Proper Tail Calls (TCO/PTC) friendly.\n return function calcClassName(element) {\n var previousIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;\n\n if (layerLevelOwner === 0 || previousIndex === 0) {\n return baseClassName;\n }\n\n var index = previousIndex >= 0 ? previousIndex : layerLevelOwner;\n var className = baseClassName;\n index -= 1;\n var previousClassName = index === 0 ? baseClassName : \"\".concat(baseClassName, \"-\").concat(index);\n\n if (hasClass(element, previousClassName)) {\n var currentLayer = index + 1;\n className = \"\".concat(baseClassName, \"-\").concat(currentLayer);\n } else {\n className = calcClassName(element, index);\n }\n\n return className;\n };\n }\n /**\n * @param {Walkontable} wotInstance The Walkontable instance.\n */\n\n }, {\n key: \"draw\",\n value: function draw(wotInstance) {\n if (this.isEmpty()) {\n if (this.settings.border) {\n this.getBorder(wotInstance).disappear();\n }\n\n return;\n }\n\n var renderedRows = wotInstance.wtTable.getRenderedRowsCount();\n var renderedColumns = wotInstance.wtTable.getRenderedColumnsCount();\n var corners = this.getCorners();\n\n var _corners = _slicedToArray(corners, 4),\n topRow = _corners[0],\n topColumn = _corners[1],\n bottomRow = _corners[2],\n bottomColumn = _corners[3];\n\n if (topColumn !== null && bottomColumn !== null) {\n for (var column = 0; column < renderedColumns; column += 1) {\n var sourceCol = wotInstance.wtTable.columnFilter.renderedToSource(column);\n\n if (sourceCol >= topColumn && sourceCol <= bottomColumn) {\n var TH = wotInstance.wtTable.getColumnHeader(sourceCol);\n\n if (TH) {\n var newClasses = [];\n\n if (this.settings.highlightHeaderClassName) {\n newClasses.push(this.settings.highlightHeaderClassName);\n }\n\n if (this.settings.highlightColumnClassName) {\n newClasses.push(this.settings.highlightColumnClassName);\n }\n\n addClass(TH, newClasses);\n }\n }\n }\n }\n\n if (topRow !== null && bottomRow !== null) {\n for (var row = 0; row < renderedRows; row += 1) {\n var sourceRow = wotInstance.wtTable.rowFilter.renderedToSource(row);\n\n if (sourceRow >= topRow && sourceRow <= bottomRow) {\n var _TH = wotInstance.wtTable.getRowHeader(sourceRow);\n\n if (_TH) {\n var _newClasses = [];\n\n if (this.settings.highlightHeaderClassName) {\n _newClasses.push(this.settings.highlightHeaderClassName);\n }\n\n if (this.settings.highlightRowClassName) {\n _newClasses.push(this.settings.highlightRowClassName);\n }\n\n addClass(_TH, _newClasses);\n }\n }\n\n if (topColumn !== null && bottomColumn !== null) {\n for (var _column = 0; _column < renderedColumns; _column += 1) {\n var _sourceCol = wotInstance.wtTable.columnFilter.renderedToSource(_column);\n\n if (sourceRow >= topRow && sourceRow <= bottomRow && _sourceCol >= topColumn && _sourceCol <= bottomColumn) {\n // selected cell\n if (this.settings.className) {\n this.addClassAtCoords(wotInstance, sourceRow, _sourceCol, this.settings.className, this.settings.markIntersections);\n }\n } else if (sourceRow >= topRow && sourceRow <= bottomRow) {\n // selection is in this row\n if (this.settings.highlightRowClassName) {\n this.addClassAtCoords(wotInstance, sourceRow, _sourceCol, this.settings.highlightRowClassName);\n }\n } else if (_sourceCol >= topColumn && _sourceCol <= bottomColumn) {\n // selection is in this column\n if (this.settings.highlightColumnClassName) {\n this.addClassAtCoords(wotInstance, sourceRow, _sourceCol, this.settings.highlightColumnClassName);\n }\n }\n\n var additionalSelectionClass = wotInstance.getSetting('onAfterDrawSelection', sourceRow, _sourceCol, this.settings.layerLevel);\n\n if (typeof additionalSelectionClass === 'string') {\n this.addClassAtCoords(wotInstance, sourceRow, _sourceCol, additionalSelectionClass);\n }\n }\n }\n }\n }\n\n wotInstance.getSetting('onBeforeDrawBorders', corners, this.settings.className);\n\n if (this.settings.border) {\n // warning! border.appear modifies corners!\n this.getBorder(wotInstance).appear(corners);\n }\n }\n /**\n * Cleans up all the DOM state related to a Selection instance. Call this prior to deleting a Selection instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n Object.values(this.instanceBorders).forEach(function (border) {\n return border.destroy();\n });\n }\n }]);\n\n return Selection;\n}();\n\nexport default Selection;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { Selection, CellCoords, CellRange } from \"./../../3rdparty/walkontable/src/index.mjs\";\n\nvar VisualSelection = /*#__PURE__*/function (_Selection) {\n _inherits(VisualSelection, _Selection);\n\n var _super = _createSuper(VisualSelection);\n\n function VisualSelection(settings, visualCellRange) {\n var _this;\n\n _classCallCheck(this, VisualSelection);\n\n _this = _super.call(this, settings, null);\n /**\n * Range of selection visually. Visual representation may have representation in a rendered selection.\n *\n * @type {null|CellRange}\n */\n\n _this.visualCellRange = visualCellRange || null;\n\n _this.commit();\n\n return _this;\n }\n /**\n * Adds a cell coords to the selection.\n *\n * @param {CellCoords} coords Visual coordinates of a cell.\n * @returns {VisualSelection}\n */\n\n\n _createClass(VisualSelection, [{\n key: \"add\",\n value: function add(coords) {\n if (this.visualCellRange === null) {\n this.visualCellRange = new CellRange(coords);\n } else {\n this.visualCellRange.expand(coords);\n }\n\n return this;\n }\n /**\n * Clears visual and renderable selection.\n *\n * @returns {VisualSelection}\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.visualCellRange = null;\n return _get(_getPrototypeOf(VisualSelection.prototype), \"clear\", this).call(this);\n }\n /**\n * Search for the first visible coordinates in the range as range may start and/or end with the hidden index.\n *\n * @private\n * @param {CellCoords} startCoords Visual start coordinates for the range. Starting point for finding destination coordinates\n * with visible coordinates (we are going from the starting coordinates to the end coordinates until the criteria are met).\n * @param {CellCoords} endCoords Visual end coordinates for the range.\n * @param {number} incrementByRow We are searching for a next visible rows by increasing (to be precise, or decreasing) indexes.\n * This variable represent indexes shift. We are looking for an index:\n * - for rows: from the left to the right (increasing indexes, then variable should have value 1) or\n * other way around (decreasing indexes, then variable should have the value -1)\n * - for columns: from the top to the bottom (increasing indexes, then variable should have value 1)\n * or other way around (decreasing indexes, then variable should have the value -1).\n * @param {number} incrementByColumn As above, just indexes shift for columns.\n * @returns {null|CellCoords} Visual cell coordinates.\n */\n\n }, {\n key: \"findVisibleCoordsInRange\",\n value: function findVisibleCoordsInRange(startCoords, endCoords, incrementByRow) {\n var incrementByColumn = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : incrementByRow;\n var nextVisibleRow = this.findVisibleCoordsInRowsRange(startCoords.row, endCoords.row, incrementByRow); // There are no more visual rows in the range.\n\n if (nextVisibleRow === null) {\n return null;\n }\n\n var nextVisibleColumn = this.findVisibleCoordsInColumnsRange(startCoords.col, endCoords.col, incrementByColumn); // There are no more visual columns in the range.\n\n if (nextVisibleColumn === null) {\n return null;\n }\n\n return new CellCoords(nextVisibleRow, nextVisibleColumn);\n }\n /**\n * Searches the nearest visible row index, which is not hidden (is renderable).\n *\n * @private\n * @param {CellCoords} startVisibleRow Visual row index which starts the range. Starting point for finding\n * destination coordinates with visible coordinates (we are going from the starting coordinates to the end\n * coordinates until the criteria are met).\n * @param {CellCoords} endVisibleRow Visual row index which ends the range.\n * @param {number} incrementBy We are searching for a next visible rows by increasing (to be precise, or decreasing)\n * indexes. This variable represent indexes shift. From the left to the right (increasing indexes, then variable\n * should have value 1) or other way around (decreasing indexes, then variable should have the value -1).\n * @returns {number|null} The visual row index.\n */\n\n }, {\n key: \"findVisibleCoordsInRowsRange\",\n value: function findVisibleCoordsInRowsRange(startVisibleRow, endVisibleRow, incrementBy) {\n var _this$settings$visual = this.settings.visualToRenderableCoords({\n row: startVisibleRow,\n col: -1\n }),\n startRowRenderable = _this$settings$visual.row; // There are no more visual rows in the range.\n\n\n if (endVisibleRow === startVisibleRow && startRowRenderable === null) {\n return null;\n } // We are looking for a next visible row in the range.\n\n\n if (startRowRenderable === null) {\n return this.findVisibleCoordsInRowsRange(startVisibleRow + incrementBy, endVisibleRow, incrementBy);\n } // We found visible row index in the range.\n\n\n return startVisibleRow;\n }\n /**\n * Searches the nearest visible column index, which is not hidden (is renderable).\n *\n * @private\n * @param {CellCoords} startVisibleColumn Visual column index which starts the range. Starting point for finding\n * destination coordinates with visible coordinates (we are going from the starting coordinates to the end\n * coordinates until the criteria are met).\n * @param {CellCoords} endVisibleColumn Visual column index which ends the range.\n * @param {number} incrementBy We are searching for a next visible columns by increasing (to be precise, or decreasing)\n * indexes. This variable represent indexes shift. From the top to the bottom (increasing indexes, then variable\n * should have value 1) or other way around (decreasing indexes, then variable should have the value -1).\n * @returns {number|null} The visual column index.\n */\n\n }, {\n key: \"findVisibleCoordsInColumnsRange\",\n value: function findVisibleCoordsInColumnsRange(startVisibleColumn, endVisibleColumn, incrementBy) {\n var _this$settings$visual2 = this.settings.visualToRenderableCoords({\n row: -1,\n col: startVisibleColumn\n }),\n startColumnRenderable = _this$settings$visual2.col; // There are no more visual columns in the range.\n\n\n if (endVisibleColumn === startVisibleColumn && startColumnRenderable === null) {\n return null;\n } // We are looking for a next visible column in the range.\n\n\n if (startColumnRenderable === null) {\n return this.findVisibleCoordsInColumnsRange(startVisibleColumn + incrementBy, endVisibleColumn, incrementBy);\n } // We found visible column index in the range.\n\n\n return startVisibleColumn;\n }\n /**\n * Searches the nearest visible column and row index, which is not hidden (is renderable). If one\n * of the axes' range is entirely hidden, then created CellCoords object will hold the `null` value\n * under a specific axis. For example, when we select the hidden column, then the calculated `col`\n * prop will be `null`. In that case, rows are calculated further (regardless of the column result)\n * to make rows header highlightable.\n *\n * @private\n * @param {CellCoords} visualFromCoords Visual start coordinates for the range. Starting point for finding destination coordinates\n * with visible coordinates (we are going from the starting coordinates to the end coordinates until the criteria are met).\n * @param {CellCoords} visualToCoords Visual end coordinates for the range.\n * @param {number} incrementByRow We are searching for a next visible rows by increasing (to be precise, or decreasing) indexes.\n * This variable represent indexes shift. We are looking for an index:\n * - for rows: from the left to the right (increasing indexes, then variable should have value 1) or\n * other way around (decreasing indexes, then variable should have the value -1)\n * - for columns: from the top to the bottom (increasing indexes, then variable should have value 1)\n * or other way around (decreasing indexes, then variable should have the value -1).\n * @param {number} incrementByColumn As above, just indexes shift for columns.\n * @returns {CellCoords[]|null} Visual cell coordinates.\n */\n\n }, {\n key: \"findVisibleHeaderRange\",\n value: function findVisibleHeaderRange(visualFromCoords, visualToCoords, incrementByRow, incrementByColumn) {\n var fromRangeVisualRow = this.findVisibleCoordsInRowsRange(visualFromCoords.row, visualToCoords.row, incrementByRow);\n var toRangeVisualRow = this.findVisibleCoordsInRowsRange(visualToCoords.row, visualFromCoords.row, -incrementByRow);\n var fromRangeVisualColumn = this.findVisibleCoordsInColumnsRange(visualFromCoords.col, visualToCoords.col, incrementByColumn);\n var toRangeVisualColumn = this.findVisibleCoordsInColumnsRange(visualToCoords.col, visualFromCoords.col, -incrementByColumn); // All rows and columns ranges are hidden.\n\n if (fromRangeVisualRow === null && toRangeVisualRow === null && fromRangeVisualColumn === null && toRangeVisualColumn === null) {\n return null;\n }\n\n return [new CellCoords(fromRangeVisualRow, fromRangeVisualColumn), new CellCoords(toRangeVisualRow, toRangeVisualColumn)];\n }\n /**\n * Override internally stored visual indexes added by the Selection's `add` function. It should be executed\n * at the end of process of adding visual selection coordinates.\n *\n * @returns {VisualSelection}\n */\n\n }, {\n key: \"commit\",\n value: function commit() {\n // There is no information about visual ranges, thus no selection may be displayed.\n if (this.visualCellRange === null) {\n return this;\n }\n\n var _this$visualCellRange = this.visualCellRange,\n visualFromCoords = _this$visualCellRange.from,\n visualToCoords = _this$visualCellRange.to; // We may move in two different directions while searching for visible rows and visible columns.\n\n var incrementByRow = this.getRowSearchDirection(this.visualCellRange);\n var incrementByColumn = this.getColumnSearchDirection(this.visualCellRange);\n var fromRangeVisual = this.findVisibleCoordsInRange(visualFromCoords, visualToCoords, incrementByRow, incrementByColumn);\n var toRangeVisual = this.findVisibleCoordsInRange(visualToCoords, visualFromCoords, -incrementByRow, -incrementByColumn); // There is no visual start point (and also visual end point) in the range.\n // We are looking for the first visible cell in a broader range.\n\n if (fromRangeVisual === null || toRangeVisual === null) {\n var isHeaderSelectionType = this.settings.type === 'header';\n var cellRange = null; // For the \"header\" selection type, find rows and column indexes, which should be\n // highlighted, although one of the axes is completely hidden.\n\n if (isHeaderSelectionType) {\n var _this$findVisibleHead = this.findVisibleHeaderRange(visualFromCoords, visualToCoords, incrementByRow, incrementByColumn),\n _this$findVisibleHead2 = _slicedToArray(_this$findVisibleHead, 2),\n fromRangeVisualHeader = _this$findVisibleHead2[0],\n toRangeVisualHeader = _this$findVisibleHead2[1];\n\n cellRange = this.createRenderableCellRange(fromRangeVisualHeader, toRangeVisualHeader);\n }\n\n this.cellRange = cellRange;\n } else {\n this.cellRange = this.createRenderableCellRange(fromRangeVisual, toRangeVisual);\n }\n\n return this;\n }\n /**\n * Some selection may be a part of broader cell range. This function adjusting coordinates of current selection\n * and the broader cell range when needed (current selection can't be presented visually).\n *\n * @param {CellRange} broaderCellRange Visual range. Actual cell range may be contained in the broader cell range.\n * When there is no way to represent some cell range visually we try to find range containing just the first visible cell.\n *\n * Warn: Please keep in mind that this function may change coordinates of the handled broader range.\n *\n * @returns {VisualSelection}\n */\n\n }, {\n key: \"adjustCoordinates\",\n value: function adjustCoordinates(broaderCellRange) {\n // We may move in two different directions while searching for visible rows and visible columns.\n var incrementByRow = this.getRowSearchDirection(broaderCellRange);\n var incrementByColumn = this.getColumnSearchDirection(broaderCellRange);\n var normFromCoords = broaderCellRange.from.clone().normalize();\n var normToCoords = broaderCellRange.to.clone().normalize();\n var singleCellRangeVisual = this.findVisibleCoordsInRange(normFromCoords, normToCoords, incrementByRow, incrementByColumn);\n\n if (singleCellRangeVisual !== null) {\n // We can't show selection visually now, but we found fist visible range in the broader cell range.\n if (this.cellRange === null) {\n var singleCellRangeRenderable = this.settings.visualToRenderableCoords(singleCellRangeVisual);\n this.cellRange = new CellRange(singleCellRangeRenderable);\n } // We set new highlight as it might change (for example, when showing/hiding some cells from the broader selection range)\n // TODO: It is also handled by the `MergeCells` plugin while adjusting already modified coordinates. Should it?\n\n\n broaderCellRange.setHighlight(singleCellRangeVisual);\n return this;\n } // Fallback to the start of the range. It resets the previous highlight (for example, when all columns have been hidden).\n\n\n broaderCellRange.setHighlight(broaderCellRange.from);\n return this;\n }\n /**\n * Returns the top left (TL) and bottom right (BR) selection coordinates (renderable indexes).\n * The method overwrites the original method to support header selection for hidden cells.\n * To make the header selection working, the CellCoords and CellRange have to support not\n * complete coordinates (`null` values for example, `row: null`, `col: 2`).\n *\n * @returns {Array} Returns array of coordinates for example `[1, 1, 5, 5]`.\n */\n\n }, {\n key: \"getCorners\",\n value: function getCorners() {\n var _this$cellRange = this.cellRange,\n from = _this$cellRange.from,\n to = _this$cellRange.to;\n var isRowUndefined = from.row === null || to.row === null;\n var isColumnUndefined = from.col === null || to.col === null;\n var topLeftCorner = new CellCoords(isRowUndefined ? null : Math.min(from.row, to.row), isColumnUndefined ? null : Math.min(from.col, to.col));\n var bottomRightCorner = new CellCoords(isRowUndefined ? null : Math.max(from.row, to.row), isColumnUndefined ? null : Math.max(from.col, to.col));\n return [topLeftCorner.row, topLeftCorner.col, bottomRightCorner.row, bottomRightCorner.col];\n }\n /**\n * Returns the top left (TL) and bottom right (BR) selection coordinates (visual indexes).\n *\n * @returns {Array} Returns array of coordinates for example `[1, 1, 5, 5]`.\n */\n\n }, {\n key: \"getVisualCorners\",\n value: function getVisualCorners() {\n var topLeft = this.settings.renderableToVisualCoords(this.cellRange.getTopLeftCorner());\n var bottomRight = this.settings.renderableToVisualCoords(this.cellRange.getBottomRightCorner());\n return [topLeft.row, topLeft.col, bottomRight.row, bottomRight.col];\n }\n /**\n * Creates a new CellRange object based on visual coordinates which before object creation are\n * translated to renderable indexes.\n *\n * @param {CellCoords} visualFromCoords The CellCoords object which contains coordinates that\n * points to the begining of the selection.\n * @param {CellCoords} visualToCoords The CellCoords object which contains coordinates that\n * points to the end of the selection.\n * @returns {CellRange}\n */\n\n }, {\n key: \"createRenderableCellRange\",\n value: function createRenderableCellRange(visualFromCoords, visualToCoords) {\n var renderableFromCoords = this.settings.visualToRenderableCoords(visualFromCoords);\n var renderableToCoords = this.settings.visualToRenderableCoords(visualToCoords);\n return new CellRange(renderableFromCoords, renderableFromCoords, renderableToCoords);\n }\n /**\n * It returns rows shift needed for searching visual row.\n *\n * @private\n * @param {CellRange} cellRange Selection range.\n * @returns {number} Rows shift. It return 1 when we should increase indexes (moving from the top to the bottom) or\n * -1 when we should decrease indexes (moving other way around).\n */\n\n }, {\n key: \"getRowSearchDirection\",\n value: function getRowSearchDirection(cellRange) {\n if (cellRange.from.row < cellRange.to.row) {\n return 1; // Increasing row indexes.\n }\n\n return -1; // Decreasing row indexes.\n }\n /**\n * It returns columns shift needed for searching visual column.\n *\n * @private\n * @param {CellRange} cellRange Selection range.\n * @returns {number} Columns shift. It return 1 when we should increase indexes (moving from the left to the right) or\n * -1 when we should decrease indexes (moving other way around).\n */\n\n }, {\n key: \"getColumnSearchDirection\",\n value: function getColumnSearchDirection(cellRange) {\n if (cellRange.from.col < cellRange.to.col) {\n return 1; // Increasing column indexes.\n }\n\n return -1; // Decreasing column indexes.\n }\n }]);\n\n return VisualSelection;\n}(Selection);\n\nexport default VisualSelection;","function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * @returns {Selection}\n */\n\nfunction createHighlight(_ref) {\n var activeHeaderClassName = _ref.activeHeaderClassName,\n restOptions = _objectWithoutProperties(_ref, [\"activeHeaderClassName\"]);\n\n var s = new VisualSelection(_objectSpread({\n highlightHeaderClassName: activeHeaderClassName\n }, restOptions));\n return s;\n}\n\nexport default createHighlight;","function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection responsible for highlighting area of the selected multiple cells.\n *\n * @returns {Selection}\n */\n\nfunction createHighlight(_ref) {\n var layerLevel = _ref.layerLevel,\n areaCornerVisible = _ref.areaCornerVisible,\n restOptions = _objectWithoutProperties(_ref, [\"layerLevel\", \"areaCornerVisible\"]);\n\n var s = new VisualSelection(_objectSpread({\n className: 'area',\n markIntersections: true,\n layerLevel: Math.min(layerLevel, 7),\n border: {\n width: 1,\n color: '#4b89ff',\n cornerVisible: areaCornerVisible\n }\n }, restOptions));\n return s;\n}\n\nexport default createHighlight;","function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection\n * can present on the table only one at the time.\n *\n * @returns {Selection}\n */\n\nfunction createHighlight(_ref) {\n var cellCornerVisible = _ref.cellCornerVisible,\n restOptions = _objectWithoutProperties(_ref, [\"cellCornerVisible\"]);\n\n var s = new VisualSelection(_objectSpread({\n className: 'current',\n border: {\n width: 2,\n color: '#4b89ff',\n cornerVisible: cellCornerVisible\n }\n }, restOptions));\n return s;\n}\n\nexport default createHighlight;","function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection responsible for highlighting currently selected cell. This type of selection\n * can present on the table only one at the time.\n *\n * @returns {Selection}\n */\n\nfunction createHighlight(_ref) {\n var border = _ref.border,\n visualCellRange = _ref.visualCellRange,\n restOptions = _objectWithoutProperties(_ref, [\"border\", \"visualCellRange\"]);\n\n var s = new VisualSelection(_objectSpread(_objectSpread({}, border), restOptions), visualCellRange);\n return s;\n}\n\nexport default createHighlight;","import \"core-js/modules/es.object.assign.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection, responsible for highlighting cells which are covered by fill handle\n * functionality. This type of selection can present on the table only one at the time.\n *\n * @returns {Selection}\n */\n\nfunction createHighlight(_ref) {\n var restOptions = Object.assign({}, _ref);\n var s = new VisualSelection(_objectSpread({\n className: 'fill',\n border: {\n width: 1,\n color: '#ff0000'\n }\n }, restOptions));\n return s;\n}\n\nexport default createHighlight;","function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport VisualSelection from \"../visualSelection.mjs\";\n/**\n * Creates the new instance of Selection, responsible for highlighting row and column headers. This type of selection\n * can occur multiple times.\n *\n * @returns {Selection}\n */\n\nfunction createHighlight(_ref) {\n var headerClassName = _ref.headerClassName,\n rowClassName = _ref.rowClassName,\n columnClassName = _ref.columnClassName,\n restOptions = _objectWithoutProperties(_ref, [\"headerClassName\", \"rowClassName\", \"columnClassName\"]);\n\n var s = new VisualSelection(_objectSpread({\n className: 'highlight',\n highlightHeaderClassName: headerClassName,\n highlightRowClassName: rowClassName,\n highlightColumnClassName: columnClassName\n }, restOptions));\n return s;\n}\n\nexport default createHighlight;","function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport staticRegister from \"./../../../utils/staticRegister.mjs\";\nimport activeHeaderHighlight from \"./activeHeader.mjs\";\nimport areaHighlight from \"./area.mjs\";\nimport cellHighlight from \"./cell.mjs\";\nimport customSelection from \"./customSelection.mjs\";\nimport fillHighlight from \"./fill.mjs\";\nimport headerHighlight from \"./header.mjs\";\n\nvar _staticRegister = staticRegister('highlight/types'),\n register = _staticRegister.register,\n getItem = _staticRegister.getItem;\n\nregister('active-header', activeHeaderHighlight);\nregister('area', areaHighlight);\nregister('cell', cellHighlight);\nregister('custom-selection', customSelection);\nregister('fill', fillHighlight);\nregister('header', headerHighlight);\n/**\n * @param {string} highlightType The selection type.\n * @param {object} options The selection options.\n * @returns {Selection}\n */\n\nfunction createHighlight(highlightType, options) {\n return getItem(highlightType)(_objectSpread({\n type: highlightType\n }, options));\n}\n\nexport { createHighlight };","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { createHighlight } from \"./types/index.mjs\";\nimport { arrayEach } from \"./../../helpers/array.mjs\";\nexport var ACTIVE_HEADER_TYPE = 'active-header';\nexport var AREA_TYPE = 'area';\nexport var CELL_TYPE = 'cell';\nexport var FILL_TYPE = 'fill';\nexport var HEADER_TYPE = 'header';\nexport var CUSTOM_SELECTION = 'custom-selection';\n/**\n * Highlight class responsible for managing Walkontable Selection classes.\n *\n * With Highlight object you can manipulate four different highlight types:\n * - `cell` can be added only to a single cell at a time and it defines currently selected cell;\n * - `fill` can occur only once and its highlight defines selection of autofill functionality (managed by the plugin with the same name);\n * - `areas` can be added to multiple cells at a time. This type highlights selected cell or multiple cells.\n * The multiple cells have to be defined as an uninterrupted order (regular shape). Otherwise, the new layer of\n * that type should be created to manage not-consecutive selection;\n * - `header` can occur multiple times. This type is designed to highlight only headers. Like `area` type it\n * can appear with multiple highlights (accessed under different level layers).\n *\n * @class Highlight\n * @util\n */\n\nvar Highlight = /*#__PURE__*/function () {\n function Highlight(options) {\n _classCallCheck(this, Highlight);\n /**\n * Options consumed by Highlight class and Walkontable Selection classes.\n *\n * @type {object}\n */\n\n\n this.options = options;\n /**\n * The property which describes which layer level of the visual selection will be modified.\n * This option is valid only for `area` and `header` highlight types which occurs multiple times on\n * the table (as a non-consecutive selection).\n *\n * An order of the layers is the same as the order of added new non-consecutive selections.\n *\n * @type {number}\n * @default 0\n */\n\n this.layerLevel = 0;\n /**\n * `cell` highlight object which describes attributes for the currently selected cell.\n * It can only occur only once on the table.\n *\n * @type {Selection}\n */\n\n this.cell = createHighlight(CELL_TYPE, options);\n /**\n * `fill` highlight object which describes attributes for the borders for autofill functionality.\n * It can only occur only once on the table.\n *\n * @type {Selection}\n */\n\n this.fill = createHighlight(FILL_TYPE, options);\n /**\n * Collection of the `area` highlights. That objects describes attributes for the borders and selection of\n * the multiple selected cells. It can occur multiple times on the table.\n *\n * @type {Map.}\n */\n\n this.areas = new Map();\n /**\n * Collection of the `header` highlights. That objects describes attributes for the selection of\n * the multiple selected rows and columns in the table header. It can occur multiple times on the table.\n *\n * @type {Map.}\n */\n\n this.headers = new Map();\n /**\n * Collection of the `active-header` highlights. That objects describes attributes for the selection of\n * the multiple selected rows and columns in the table header. The table headers which have selected all items in\n * a row will be marked as `active-header`.\n *\n * @type {Map.}\n */\n\n this.activeHeaders = new Map();\n /**\n * Collection of the `custom-selection`, holder for example borders added through CustomBorders plugin.\n *\n * @type {Selection[]}\n */\n\n this.customSelections = [];\n }\n /**\n * Check if highlight cell rendering is disabled for specified highlight type.\n *\n * @param {string} highlightType Highlight type. Possible values are: `cell`, `area`, `fill` or `header`.\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {boolean}\n */\n\n\n _createClass(Highlight, [{\n key: \"isEnabledFor\",\n value: function isEnabledFor(highlightType, coords) {\n var type = highlightType; // Legacy compatibility.\n\n if (highlightType === CELL_TYPE) {\n type = 'current'; // One from settings for `disableVisualSelection` up to Handsontable 0.36/Handsontable Pro 1.16.0.\n }\n\n var disableHighlight = this.options.disabledCellSelection(coords.row, coords.col);\n\n if (typeof disableHighlight === 'string') {\n disableHighlight = [disableHighlight];\n }\n\n return disableHighlight === false || Array.isArray(disableHighlight) && !disableHighlight.includes(type);\n }\n /**\n * Set a new layer level to make access to the desire `area` and `header` highlights.\n *\n * @param {number} [level=0] Layer level to use.\n * @returns {Highlight}\n */\n\n }, {\n key: \"useLayerLevel\",\n value: function useLayerLevel() {\n var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n this.layerLevel = level;\n return this;\n }\n /**\n * Get Walkontable Selection instance created for controlling highlight of the currently selected/edited cell.\n *\n * @returns {Selection}\n */\n\n }, {\n key: \"getCell\",\n value: function getCell() {\n return this.cell;\n }\n /**\n * Get Walkontable Selection instance created for controlling highlight of the autofill functionality.\n *\n * @returns {Selection}\n */\n\n }, {\n key: \"getFill\",\n value: function getFill() {\n return this.fill;\n }\n /**\n * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight\n * of the multiple selected cells.\n *\n * @returns {Selection}\n */\n\n }, {\n key: \"createOrGetArea\",\n value: function createOrGetArea() {\n var layerLevel = this.layerLevel;\n var area;\n\n if (this.areas.has(layerLevel)) {\n area = this.areas.get(layerLevel);\n } else {\n area = createHighlight(AREA_TYPE, _objectSpread({\n layerLevel: layerLevel\n }, this.options));\n this.areas.set(layerLevel, area);\n }\n\n return area;\n }\n /**\n * Get all Walkontable Selection instances which describes the state of the visual highlight of the cells.\n *\n * @returns {Selection[]}\n */\n\n }, {\n key: \"getAreas\",\n value: function getAreas() {\n return _toConsumableArray(this.areas.values());\n }\n /**\n * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight\n * of the multiple selected header cells.\n *\n * @returns {Selection}\n */\n\n }, {\n key: \"createOrGetHeader\",\n value: function createOrGetHeader() {\n var layerLevel = this.layerLevel;\n var header;\n\n if (this.headers.has(layerLevel)) {\n header = this.headers.get(layerLevel);\n } else {\n header = createHighlight(HEADER_TYPE, _objectSpread({}, this.options));\n this.headers.set(layerLevel, header);\n }\n\n return header;\n }\n /**\n * Get all Walkontable Selection instances which describes the state of the visual highlight of the headers.\n *\n * @returns {Selection[]}\n */\n\n }, {\n key: \"getHeaders\",\n value: function getHeaders() {\n return _toConsumableArray(this.headers.values());\n }\n /**\n * Get or create (if not exist in the cache) Walkontable Selection instance created for controlling highlight\n * of the multiple selected active header cells.\n *\n * @returns {Selection}\n */\n\n }, {\n key: \"createOrGetActiveHeader\",\n value: function createOrGetActiveHeader() {\n var layerLevel = this.layerLevel;\n var header;\n\n if (this.activeHeaders.has(layerLevel)) {\n header = this.activeHeaders.get(layerLevel);\n } else {\n header = createHighlight(ACTIVE_HEADER_TYPE, _objectSpread({}, this.options));\n this.activeHeaders.set(layerLevel, header);\n }\n\n return header;\n }\n /**\n * Get all Walkontable Selection instances which describes the state of the visual highlight of the active headers.\n *\n * @returns {Selection[]}\n */\n\n }, {\n key: \"getActiveHeaders\",\n value: function getActiveHeaders() {\n return _toConsumableArray(this.activeHeaders.values());\n }\n /**\n * Get Walkontable Selection instance created for controlling highlight of the custom selection functionality.\n *\n * @returns {Selection}\n */\n\n }, {\n key: \"getCustomSelections\",\n value: function getCustomSelections() {\n return _toConsumableArray(this.customSelections.values());\n }\n /**\n * Add selection to the custom selection instance. The new selection are added to the end of the selection collection.\n *\n * @param {object} selectionInstance The selection instance.\n */\n\n }, {\n key: \"addCustomSelection\",\n value: function addCustomSelection(selectionInstance) {\n this.customSelections.push(createHighlight(CUSTOM_SELECTION, _objectSpread(_objectSpread({}, this.options), selectionInstance)));\n }\n /**\n * Perform cleaning visual highlights for the whole table.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.cell.clear();\n this.fill.clear();\n arrayEach(this.areas.values(), function (highlight) {\n return void highlight.clear();\n });\n arrayEach(this.headers.values(), function (highlight) {\n return void highlight.clear();\n });\n arrayEach(this.activeHeaders.values(), function (highlight) {\n return void highlight.clear();\n });\n }\n /**\n * This object can be iterate over using `for of` syntax or using internal `arrayEach` helper.\n *\n * @returns {Selection[]}\n */\n\n }, {\n key: Symbol.iterator,\n value: function value() {\n return [this.cell, this.fill].concat(_toConsumableArray(this.areas.values()), _toConsumableArray(this.headers.values()), _toConsumableArray(this.activeHeaders.values()), _toConsumableArray(this.customSelections))[Symbol.iterator]();\n }\n }]);\n\n return Highlight;\n}();\n\nexport default Highlight;","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { CellRange } from \"./../3rdparty/walkontable/src/index.mjs\";\n/**\n * The SelectionRange class is a simple CellRanges collection designed for easy manipulation of the multiple\n * consecutive and non-consecutive selections.\n *\n * @class SelectionRange\n * @util\n */\n\nvar SelectionRange = /*#__PURE__*/function () {\n function SelectionRange() {\n _classCallCheck(this, SelectionRange);\n /**\n * List of all CellRanges added to the class instance.\n *\n * @type {CellRange[]}\n */\n\n\n this.ranges = [];\n }\n /**\n * Check if selected range is empty.\n *\n * @returns {boolean}\n */\n\n\n _createClass(SelectionRange, [{\n key: \"isEmpty\",\n value: function isEmpty() {\n return this.size() === 0;\n }\n /**\n * Set coordinates to the class instance. It clears all previously added coordinates and push `coords`\n * to the collection.\n *\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {SelectionRange}\n */\n\n }, {\n key: \"set\",\n value: function set(coords) {\n this.clear();\n this.ranges.push(new CellRange(coords));\n return this;\n }\n /**\n * Add coordinates to the class instance. The new coordinates are added to the end of the range collection.\n *\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {SelectionRange}\n */\n\n }, {\n key: \"add\",\n value: function add(coords) {\n this.ranges.push(new CellRange(coords));\n return this;\n }\n /**\n * Removes from the stack the last added coordinates.\n *\n * @returns {SelectionRange}\n */\n\n }, {\n key: \"pop\",\n value: function pop() {\n this.ranges.pop();\n return this;\n }\n /**\n * Get last added coordinates from ranges, it returns a CellRange instance.\n *\n * @returns {CellRange|undefined}\n */\n\n }, {\n key: \"current\",\n value: function current() {\n return this.peekByIndex(0);\n }\n /**\n * Get previously added coordinates from ranges, it returns a CellRange instance.\n *\n * @returns {CellRange|undefined}\n */\n\n }, {\n key: \"previous\",\n value: function previous() {\n return this.peekByIndex(-1);\n }\n /**\n * Returns `true` if coords is within selection coords. This method iterates through all selection layers to check if\n * the coords object is within selection range.\n *\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {boolean}\n */\n\n }, {\n key: \"includes\",\n value: function includes(coords) {\n return this.ranges.some(function (cellRange) {\n return cellRange.includes(coords);\n });\n }\n /**\n * Clear collection.\n *\n * @returns {SelectionRange}\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.ranges.length = 0;\n return this;\n }\n /**\n * Get count of added all coordinates added to the selection.\n *\n * @returns {number}\n */\n\n }, {\n key: \"size\",\n value: function size() {\n return this.ranges.length;\n }\n /**\n * Peek the coordinates based on the offset where that coordinate resides in the collection.\n *\n * @param {number} [offset=0] An offset where the coordinate will be retrieved from.\n * @returns {CellRange|undefined}\n */\n\n }, {\n key: \"peekByIndex\",\n value: function peekByIndex() {\n var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var rangeIndex = this.size() + offset - 1;\n var cellRange;\n\n if (rangeIndex >= 0) {\n cellRange = this.ranges[rangeIndex];\n }\n\n return cellRange;\n }\n }, {\n key: Symbol.iterator,\n value: function value() {\n return this.ranges[Symbol.iterator]();\n }\n }]);\n\n return SelectionRange;\n}();\n\nexport default SelectionRange;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { CellCoords } from \"./../3rdparty/walkontable/src/index.mjs\";\nimport { mixin } from \"../helpers/object.mjs\";\nimport localHooks from \"./../mixins/localHooks.mjs\";\n/**\n * The Transformation class implements algorithms for transforming coordinates based on current settings\n * passed to the Handsontable.\n *\n * Transformation is always applied relative to the current selection.\n *\n * @class Transformation\n * @util\n */\n\nvar Transformation = /*#__PURE__*/function () {\n function Transformation(range, options) {\n _classCallCheck(this, Transformation);\n /**\n * Instance of the SelectionRange, holder for visual coordinates applied to the table.\n *\n * @type {SelectionRange}\n */\n\n\n this.range = range;\n /**\n * Additional options which define the state of the settings which can infer transformation and\n * give the possibility to translate indexes.\n *\n * @type {object}\n */\n\n this.options = options;\n }\n /**\n * Selects cell relative to current cell (if possible).\n *\n * @param {number} rowDelta Rows number to move, value can be passed as negative number.\n * @param {number} colDelta Columns number to move, value can be passed as negative number.\n * @param {boolean} force If `true` the new rows/columns will be created if necessary. Otherwise, row/column will\n * be created according to `minSpareRows/minSpareCols` settings of Handsontable.\n * @returns {CellCoords} Visual coordinates after transformation.\n */\n\n\n _createClass(Transformation, [{\n key: \"transformStart\",\n value: function transformStart(rowDelta, colDelta, force) {\n var delta = new CellCoords(rowDelta, colDelta);\n var highlightCoords = this.range.current().highlight;\n\n var _this$options$visualT = this.options.visualToRenderableCoords(highlightCoords),\n renderableRow = _this$options$visualT.row,\n renderableColumn = _this$options$visualT.col;\n\n var visualCoords = highlightCoords;\n var rowTransformDir = 0;\n var colTransformDir = 0;\n this.runLocalHooks('beforeTransformStart', delta);\n\n if (renderableRow !== null && renderableColumn !== null) {\n var totalRows = this.options.countRows();\n var totalCols = this.options.countCols();\n var fixedRowsBottom = this.options.fixedRowsBottom();\n var minSpareRows = this.options.minSpareRows();\n var minSpareCols = this.options.minSpareCols();\n var autoWrapRow = this.options.autoWrapRow();\n var autoWrapCol = this.options.autoWrapCol();\n\n if (renderableRow + rowDelta > totalRows - 1) {\n if (force && minSpareRows > 0 && !(fixedRowsBottom && renderableRow >= totalRows - fixedRowsBottom - 1)) {\n this.runLocalHooks('insertRowRequire', totalRows);\n totalRows = this.options.countRows();\n } else if (autoWrapCol) {\n delta.row = 1 - totalRows;\n delta.col = renderableColumn + delta.col === totalCols - 1 ? 1 - totalCols : 1;\n }\n } else if (autoWrapCol && renderableRow + delta.row < 0 && renderableColumn + delta.col >= 0) {\n delta.row = totalRows - 1;\n delta.col = renderableColumn + delta.col === 0 ? totalCols - 1 : -1;\n }\n\n if (renderableColumn + delta.col > totalCols - 1) {\n if (force && minSpareCols > 0) {\n this.runLocalHooks('insertColRequire', totalCols);\n totalCols = this.options.countCols();\n } else if (autoWrapRow) {\n delta.row = renderableRow + delta.row === totalRows - 1 ? 1 - totalRows : 1;\n delta.col = 1 - totalCols;\n }\n } else if (autoWrapRow && renderableColumn + delta.col < 0 && renderableRow + delta.row >= 0) {\n delta.row = renderableRow + delta.row === 0 ? totalRows - 1 : -1;\n delta.col = totalCols - 1;\n }\n\n var coords = new CellCoords(renderableRow + delta.row, renderableColumn + delta.col);\n rowTransformDir = 0;\n colTransformDir = 0;\n\n if (coords.row < 0) {\n rowTransformDir = -1;\n coords.row = 0;\n } else if (coords.row > 0 && coords.row >= totalRows) {\n rowTransformDir = 1;\n coords.row = totalRows - 1;\n }\n\n if (coords.col < 0) {\n colTransformDir = -1;\n coords.col = 0;\n } else if (coords.col > 0 && coords.col >= totalCols) {\n colTransformDir = 1;\n coords.col = totalCols - 1;\n }\n\n visualCoords = this.options.renderableToVisualCoords(coords);\n }\n\n this.runLocalHooks('afterTransformStart', visualCoords, rowTransformDir, colTransformDir);\n return visualCoords;\n }\n /**\n * Sets selection end cell relative to current selection end cell (if possible).\n *\n * @param {number} rowDelta Rows number to move, value can be passed as negative number.\n * @param {number} colDelta Columns number to move, value can be passed as negative number.\n * @returns {CellCoords} Visual coordinates after transformation.\n */\n\n }, {\n key: \"transformEnd\",\n value: function transformEnd(rowDelta, colDelta) {\n var delta = new CellCoords(rowDelta, colDelta);\n var cellRange = this.range.current();\n var visualCoords = cellRange.to;\n var rowTransformDir = 0;\n var colTransformDir = 0;\n this.runLocalHooks('beforeTransformEnd', delta);\n\n var _this$options$visualT2 = this.options.visualToRenderableCoords(cellRange.highlight),\n rowHighlight = _this$options$visualT2.row,\n colHighlight = _this$options$visualT2.col; // We have highlight (start point for the selection).\n\n\n if (rowHighlight !== null && colHighlight !== null) {\n var totalRows = this.options.countRows();\n var totalCols = this.options.countCols();\n\n var _this$options$visualT3 = this.options.visualToRenderableCoords(cellRange.to),\n rowTo = _this$options$visualT3.row,\n colTo = _this$options$visualT3.col;\n\n var coords = new CellCoords(rowTo + delta.row, colTo + delta.col);\n rowTransformDir = 0;\n colTransformDir = 0;\n\n if (coords.row < 0) {\n rowTransformDir = -1;\n coords.row = 0;\n } else if (coords.row > 0 && coords.row >= totalRows) {\n rowTransformDir = 1;\n coords.row = totalRows - 1;\n }\n\n if (coords.col < 0) {\n colTransformDir = -1;\n coords.col = 0;\n } else if (coords.col > 0 && coords.col >= totalCols) {\n colTransformDir = 1;\n coords.col = totalCols - 1;\n }\n\n visualCoords = this.options.renderableToVisualCoords(coords);\n }\n\n this.runLocalHooks('afterTransformEnd', visualCoords, rowTransformDir, colTransformDir);\n return visualCoords;\n }\n }]);\n\n return Transformation;\n}();\n\nmixin(Transformation, localHooks);\nexport default Transformation;","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport { CellRange } from \"./../3rdparty/walkontable/src/index.mjs\";\nimport { arrayEach, arrayReduce } from \"./../helpers/array.mjs\";\nimport { isUndefined } from \"./../helpers/mixed.mjs\";\nexport var SELECTION_TYPE_UNRECOGNIZED = 0;\nexport var SELECTION_TYPE_EMPTY = 1;\nexport var SELECTION_TYPE_ARRAY = 2;\nexport var SELECTION_TYPE_OBJECT = 3;\nexport var SELECTION_TYPES = [SELECTION_TYPE_OBJECT, SELECTION_TYPE_ARRAY];\nvar ARRAY_TYPE_PATTERN = [['number'], ['number', 'string'], ['number', 'undefined'], ['number', 'string', 'undefined']];\nvar rootCall = Symbol('root');\nvar childCall = Symbol('child');\n/**\n * Detect selection schema structure.\n *\n * @param {*} selectionRanges The selected range or and array of selected ranges. This type of data is produced by\n * `hot.getSelected()`, `hot.getSelectedLast()`, `hot.getSelectedRange()`\n * and `hot.getSelectedRangeLast()` methods.\n * @param {symbol} _callSymbol The symbol object which indicates source of the helper invocation.\n * @returns {number} Returns a number that specifies the type of detected selection schema. If selection schema type\n * is unrecognized than it returns `0`.\n */\n\nexport function detectSelectionType(selectionRanges) {\n var _callSymbol = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : rootCall;\n\n if (_callSymbol !== rootCall && _callSymbol !== childCall) {\n throw new Error('The second argument is used internally only and cannot be overwritten.');\n }\n\n var isArray = Array.isArray(selectionRanges);\n var isRootCall = _callSymbol === rootCall;\n var result = SELECTION_TYPE_UNRECOGNIZED;\n\n if (isArray) {\n var firstItem = selectionRanges[0];\n\n if (selectionRanges.length === 0) {\n result = SELECTION_TYPE_EMPTY;\n } else if (isRootCall && firstItem instanceof CellRange) {\n result = SELECTION_TYPE_OBJECT;\n } else if (isRootCall && Array.isArray(firstItem)) {\n result = detectSelectionType(firstItem, childCall);\n } else if (selectionRanges.length >= 2 && selectionRanges.length <= 4) {\n var isArrayType = !selectionRanges.some(function (value, index) {\n return !ARRAY_TYPE_PATTERN[index].includes(_typeof(value));\n });\n\n if (isArrayType) {\n result = SELECTION_TYPE_ARRAY;\n }\n }\n }\n\n return result;\n}\n/**\n * Factory function designed for normalization data schema from different data structures of the selection ranges.\n *\n * @param {string} type Selection type which will be processed.\n * @param {object} [options] The normalization options.\n * @param {boolean} [options.keepDirection=false] If `true`, the coordinates which contain the direction of the\n * selected cells won't be changed. Otherwise, the selection will be\n * normalized to values starting from top-left to bottom-right.\n * @param {Function} [options.propToCol] Pass the converting function (usually `datamap.propToCol`) if the column\n * defined as props should be normalized to the numeric values.\n * @returns {number[]} Returns normalized data about selected range as an array (`[rowStart, columnStart, rowEnd, columnEnd]`).\n */\n\nexport function normalizeSelectionFactory(type) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$keepDirection = _ref.keepDirection,\n keepDirection = _ref$keepDirection === void 0 ? false : _ref$keepDirection,\n propToCol = _ref.propToCol;\n\n if (!SELECTION_TYPES.includes(type)) {\n throw new Error('Unsupported selection ranges schema type was provided.');\n }\n\n return function (selection) {\n var isObjectType = type === SELECTION_TYPE_OBJECT;\n var rowStart = isObjectType ? selection.from.row : selection[0];\n var columnStart = isObjectType ? selection.from.col : selection[1];\n var rowEnd = isObjectType ? selection.to.row : selection[2];\n var columnEnd = isObjectType ? selection.to.col : selection[3];\n\n if (typeof propToCol === 'function') {\n if (typeof columnStart === 'string') {\n columnStart = propToCol(columnStart);\n }\n\n if (typeof columnEnd === 'string') {\n columnEnd = propToCol(columnEnd);\n }\n }\n\n if (isUndefined(rowEnd)) {\n rowEnd = rowStart;\n }\n\n if (isUndefined(columnEnd)) {\n columnEnd = columnStart;\n }\n\n if (!keepDirection) {\n var origRowStart = rowStart;\n var origColumnStart = columnStart;\n var origRowEnd = rowEnd;\n var origColumnEnd = columnEnd;\n rowStart = Math.min(origRowStart, origRowEnd);\n columnStart = Math.min(origColumnStart, origColumnEnd);\n rowEnd = Math.max(origRowStart, origRowEnd);\n columnEnd = Math.max(origColumnStart, origColumnEnd);\n }\n\n return [rowStart, columnStart, rowEnd, columnEnd];\n };\n}\n/**\n * Function transform selection ranges (produced by `hot.getSelected()` and `hot.getSelectedRange()`) to normalized\n * data structure. It merges repeated ranges into consecutive coordinates. The returned structure\n * contains an array of arrays. The single item contains at index 0 visual column index from the selection was\n * started and at index 1 distance as a count of selected columns.\n *\n * @param {Array[]|CellRange[]} selectionRanges Selection ranges produced by Handsontable.\n * @returns {Array[]} Returns an array of arrays with ranges defines in that schema:\n * `[[visualColumnStart, distance], [visualColumnStart, distance], ...]`.\n * The column distances are always created starting from the left (zero index) to the\n * right (the latest column index).\n */\n\nexport function transformSelectionToColumnDistance(selectionRanges) {\n var selectionType = detectSelectionType(selectionRanges);\n\n if (selectionType === SELECTION_TYPE_UNRECOGNIZED || selectionType === SELECTION_TYPE_EMPTY) {\n return [];\n }\n\n var selectionSchemaNormalizer = normalizeSelectionFactory(selectionType);\n var unorderedIndexes = new Set(); // Iterate through all ranges and collect all column indexes which are not saved yet.\n\n arrayEach(selectionRanges, function (selection) {\n var _selectionSchemaNorma = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma2 = _slicedToArray(_selectionSchemaNorma, 4),\n columnStart = _selectionSchemaNorma2[1],\n columnEnd = _selectionSchemaNorma2[3];\n\n var columnNonHeaderStart = Math.max(columnStart, 0);\n var amount = columnEnd - columnNonHeaderStart + 1;\n arrayEach(Array.from(new Array(amount), function (_, i) {\n return columnNonHeaderStart + i;\n }), function (index) {\n if (!unorderedIndexes.has(index)) {\n unorderedIndexes.add(index);\n }\n });\n }); // Sort indexes in ascending order to easily detecting non-consecutive columns.\n\n var orderedIndexes = Array.from(unorderedIndexes).sort(function (a, b) {\n return a - b;\n });\n var normalizedColumnRanges = arrayReduce(orderedIndexes, function (acc, visualColumnIndex, index, array) {\n if (index !== 0 && visualColumnIndex === array[index - 1] + 1) {\n acc[acc.length - 1][1] += 1;\n } else {\n acc.push([visualColumnIndex, 1]);\n }\n\n return acc;\n }, []);\n return normalizedColumnRanges;\n}\n/**\n * Function transform selection ranges (produced by `hot.getSelected()` and `hot.getSelectedRange()`) to normalized\n * data structure. It merges repeated ranges into consecutive coordinates. The returned structure\n * contains an array of arrays. The single item contains at index 0 visual column index from the selection was\n * started and at index 1 distance as a count of selected columns.\n *\n * @param {Array[]|CellRange[]} selectionRanges Selection ranges produced by Handsontable.\n * @returns {Array[]} Returns an array of arrays with ranges defines in that schema:\n * `[[visualColumnStart, distance], [visualColumnStart, distance], ...]`.\n * The column distances are always created starting from the left (zero index) to the\n * right (the latest column index).\n */\n\nexport function transformSelectionToRowDistance(selectionRanges) {\n var selectionType = detectSelectionType(selectionRanges);\n\n if (selectionType === SELECTION_TYPE_UNRECOGNIZED || selectionType === SELECTION_TYPE_EMPTY) {\n return [];\n }\n\n var selectionSchemaNormalizer = normalizeSelectionFactory(selectionType);\n var unorderedIndexes = new Set(); // Iterate through all ranges and collect all column indexes which are not saved yet.\n\n arrayEach(selectionRanges, function (selection) {\n var _selectionSchemaNorma3 = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma4 = _slicedToArray(_selectionSchemaNorma3, 3),\n rowStart = _selectionSchemaNorma4[0],\n rowEnd = _selectionSchemaNorma4[2];\n\n var rowNonHeaderStart = Math.max(rowStart, 0);\n var amount = rowEnd - rowNonHeaderStart + 1;\n arrayEach(Array.from(new Array(amount), function (_, i) {\n return rowNonHeaderStart + i;\n }), function (index) {\n if (!unorderedIndexes.has(index)) {\n unorderedIndexes.add(index);\n }\n });\n }); // Sort indexes in ascending order to easily detecting non-consecutive columns.\n\n var orderedIndexes = Array.from(unorderedIndexes).sort(function (a, b) {\n return a - b;\n });\n var normalizedRowRanges = arrayReduce(orderedIndexes, function (acc, rowIndex, index, array) {\n if (index !== 0 && rowIndex === array[index - 1] + 1) {\n acc[acc.length - 1][1] += 1;\n } else {\n acc.push([rowIndex, 1]);\n }\n\n return acc;\n }, []);\n return normalizedRowRanges;\n}\n/**\n * Check if passed value can be treated as valid cell coordinate. The second argument is\n * used to check if the value doesn't exceed the defined max table rows/columns count.\n *\n * @param {number} coord The coordinate to validate (row index or column index).\n * @param {number} maxTableItemsCount The value that declares the maximum coordinate that is still validatable.\n * @returns {boolean}\n */\n\nexport function isValidCoord(coord) {\n var maxTableItemsCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;\n return typeof coord === 'number' && coord >= 0 && coord < maxTableItemsCount;\n}","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nvar _templateObject;\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport Highlight, { AREA_TYPE, HEADER_TYPE, CELL_TYPE } from \"./highlight/highlight.mjs\";\nimport SelectionRange from \"./range.mjs\";\nimport { CellCoords } from \"./../3rdparty/walkontable/src/index.mjs\";\nimport { isPressedCtrlKey } from \"./../utils/keyStateObserver.mjs\";\nimport { createObjectPropListener, mixin } from \"./../helpers/object.mjs\";\nimport { isUndefined } from \"./../helpers/mixed.mjs\";\nimport { arrayEach } from \"./../helpers/array.mjs\";\nimport localHooks from \"./../mixins/localHooks.mjs\";\nimport Transformation from \"./transformation.mjs\";\nimport { detectSelectionType, isValidCoord, normalizeSelectionFactory, SELECTION_TYPE_EMPTY, SELECTION_TYPE_UNRECOGNIZED } from \"./utils.mjs\";\nimport { toSingleLine } from \"./../helpers/templateLiteralTag.mjs\";\n/**\n * @class Selection\n * @util\n */\n\nvar Selection = /*#__PURE__*/function () {\n function Selection(settings, tableProps) {\n var _this = this;\n\n _classCallCheck(this, Selection);\n /**\n * Handsontable settings instance.\n *\n * @type {GridSettings}\n */\n\n\n this.settings = settings;\n /**\n * An additional object with dynamically defined properties which describes table state.\n *\n * @type {object}\n */\n\n this.tableProps = tableProps;\n /**\n * The flag which determines if the selection is in progress.\n *\n * @type {boolean}\n */\n\n this.inProgress = false;\n /**\n * The flag indicates that selection was performed by clicking the corner overlay.\n *\n * @type {boolean}\n */\n\n this.selectedByCorner = false;\n /**\n * The collection of the selection layer levels where the whole row was selected using the row header or\n * the corner header.\n *\n * @type {Set.}\n */\n\n this.selectedByRowHeader = new Set();\n /**\n * The collection of the selection layer levels where the whole column was selected using the column header or\n * the corner header.\n *\n * @type {Set.}\n */\n\n this.selectedByColumnHeader = new Set();\n /**\n * Selection data layer (handle visual coordinates).\n *\n * @type {SelectionRange}\n */\n\n this.selectedRange = new SelectionRange();\n /**\n * Visualization layer.\n *\n * @type {Highlight}\n */\n\n this.highlight = new Highlight({\n headerClassName: settings.currentHeaderClassName,\n activeHeaderClassName: settings.activeHeaderClassName,\n rowClassName: settings.currentRowClassName,\n columnClassName: settings.currentColClassName,\n disabledCellSelection: function disabledCellSelection(row, column) {\n return _this.tableProps.isDisabledCellSelection(row, column);\n },\n cellCornerVisible: function cellCornerVisible() {\n return _this.isCellCornerVisible.apply(_this, arguments);\n },\n areaCornerVisible: function areaCornerVisible() {\n return _this.isAreaCornerVisible.apply(_this, arguments);\n },\n visualToRenderableCoords: function visualToRenderableCoords(coords) {\n return _this.tableProps.visualToRenderableCoords(coords);\n },\n renderableToVisualCoords: function renderableToVisualCoords(coords) {\n return _this.tableProps.renderableToVisualCoords(coords);\n }\n });\n /**\n * The module for modifying coordinates.\n *\n * @type {Transformation}\n */\n\n this.transformation = new Transformation(this.selectedRange, {\n countRows: function countRows() {\n return _this.tableProps.countRowsTranslated();\n },\n countCols: function countCols() {\n return _this.tableProps.countColsTranslated();\n },\n visualToRenderableCoords: function visualToRenderableCoords(coords) {\n return _this.tableProps.visualToRenderableCoords(coords);\n },\n renderableToVisualCoords: function renderableToVisualCoords(coords) {\n return _this.tableProps.renderableToVisualCoords(coords);\n },\n fixedRowsBottom: function fixedRowsBottom() {\n return settings.fixedRowsBottom;\n },\n minSpareRows: function minSpareRows() {\n return settings.minSpareRows;\n },\n minSpareCols: function minSpareCols() {\n return settings.minSpareCols;\n },\n autoWrapRow: function autoWrapRow() {\n return settings.autoWrapRow;\n },\n autoWrapCol: function autoWrapCol() {\n return settings.autoWrapCol;\n }\n });\n this.transformation.addLocalHook('beforeTransformStart', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _this.runLocalHooks.apply(_this, ['beforeModifyTransformStart'].concat(args));\n });\n this.transformation.addLocalHook('afterTransformStart', function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _this.runLocalHooks.apply(_this, ['afterModifyTransformStart'].concat(args));\n });\n this.transformation.addLocalHook('beforeTransformEnd', function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return _this.runLocalHooks.apply(_this, ['beforeModifyTransformEnd'].concat(args));\n });\n this.transformation.addLocalHook('afterTransformEnd', function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return _this.runLocalHooks.apply(_this, ['afterModifyTransformEnd'].concat(args));\n });\n this.transformation.addLocalHook('insertRowRequire', function () {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n return _this.runLocalHooks.apply(_this, ['insertRowRequire'].concat(args));\n });\n this.transformation.addLocalHook('insertColRequire', function () {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n return _this.runLocalHooks.apply(_this, ['insertColRequire'].concat(args));\n });\n }\n /**\n * Get data layer for current selection.\n *\n * @returns {SelectionRange}\n */\n\n\n _createClass(Selection, [{\n key: \"getSelectedRange\",\n value: function getSelectedRange() {\n return this.selectedRange;\n }\n /**\n * Indicate that selection process began. It sets internaly `.inProgress` property to `true`.\n */\n\n }, {\n key: \"begin\",\n value: function begin() {\n this.inProgress = true;\n }\n /**\n * Indicate that selection process finished. It sets internaly `.inProgress` property to `false`.\n */\n\n }, {\n key: \"finish\",\n value: function finish() {\n this.runLocalHooks('afterSelectionFinished', Array.from(this.selectedRange));\n this.inProgress = false;\n }\n /**\n * Check if the process of selecting the cell/cells is in progress.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isInProgress\",\n value: function isInProgress() {\n return this.inProgress;\n }\n /**\n * Starts selection range on given coordinate object.\n *\n * @param {CellCoords} coords Visual coords.\n * @param {boolean} [multipleSelection] If `true`, selection will be worked in 'multiple' mode. This option works\n * only when 'selectionMode' is set as 'multiple'. If the argument is not defined\n * the default trigger will be used (isPressedCtrlKey() helper).\n * @param {boolean} [fragment=false] If `true`, the selection will be treated as a partial selection where the\n * `setRangeEnd` method won't be called on every `setRangeStart` call.\n */\n\n }, {\n key: \"setRangeStart\",\n value: function setRangeStart(coords, multipleSelection) {\n var fragment = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isMultipleMode = this.settings.selectionMode === 'multiple';\n var isMultipleSelection = isUndefined(multipleSelection) ? isPressedCtrlKey() : multipleSelection;\n var isRowNegative = coords.row < 0;\n var isColumnNegative = coords.col < 0;\n var selectedByCorner = isRowNegative && isColumnNegative;\n this.selectedByCorner = selectedByCorner;\n this.runLocalHooks(\"beforeSetRangeStart\".concat(fragment ? 'Only' : ''), coords);\n\n if (!isMultipleMode || isMultipleMode && !isMultipleSelection && isUndefined(multipleSelection)) {\n this.selectedRange.clear();\n }\n\n this.selectedRange.add(coords);\n\n if (this.getLayerLevel() === 0) {\n this.selectedByRowHeader.clear();\n this.selectedByColumnHeader.clear();\n }\n\n if (!selectedByCorner && isColumnNegative) {\n this.selectedByRowHeader.add(this.getLayerLevel());\n }\n\n if (!selectedByCorner && isRowNegative) {\n this.selectedByColumnHeader.add(this.getLayerLevel());\n }\n\n if (!fragment) {\n this.setRangeEnd(coords);\n }\n }\n /**\n * Starts selection range on given coordinate object.\n *\n * @param {CellCoords} coords Visual coords.\n * @param {boolean} [multipleSelection] If `true`, selection will be worked in 'multiple' mode. This option works\n * only when 'selectionMode' is set as 'multiple'. If the argument is not defined\n * the default trigger will be used (isPressedCtrlKey() helper).\n */\n\n }, {\n key: \"setRangeStartOnly\",\n value: function setRangeStartOnly(coords, multipleSelection) {\n this.setRangeStart(coords, multipleSelection, true);\n }\n /**\n * Ends selection range on given coordinate object.\n *\n * @param {CellCoords} coords Visual coords.\n */\n\n }, {\n key: \"setRangeEnd\",\n value: function setRangeEnd(coords) {\n if (this.selectedRange.isEmpty()) {\n return;\n }\n\n this.runLocalHooks('beforeSetRangeEnd', coords);\n this.begin();\n var cellRange = this.selectedRange.current();\n\n if (this.settings.selectionMode !== 'single') {\n cellRange.setTo(new CellCoords(coords.row, coords.col));\n } // Set up current selection.\n\n\n this.highlight.getCell().clear();\n\n if (this.highlight.isEnabledFor(CELL_TYPE, cellRange.highlight)) {\n this.highlight.getCell().add(this.selectedRange.current().highlight).commit().adjustCoordinates(cellRange);\n }\n\n var layerLevel = this.getLayerLevel(); // If the next layer level is lower than previous then clear all area and header highlights. This is the\n // indication that the new selection is performing.\n\n if (layerLevel < this.highlight.layerLevel) {\n arrayEach(this.highlight.getAreas(), function (highlight) {\n return void highlight.clear();\n });\n arrayEach(this.highlight.getHeaders(), function (highlight) {\n return void highlight.clear();\n });\n arrayEach(this.highlight.getActiveHeaders(), function (highlight) {\n return void highlight.clear();\n });\n }\n\n this.highlight.useLayerLevel(layerLevel);\n var areaHighlight = this.highlight.createOrGetArea();\n var headerHighlight = this.highlight.createOrGetHeader();\n var activeHeaderHighlight = this.highlight.createOrGetActiveHeader();\n areaHighlight.clear();\n headerHighlight.clear();\n activeHeaderHighlight.clear();\n\n if (this.highlight.isEnabledFor(AREA_TYPE, cellRange.highlight) && (this.isMultiple() || layerLevel >= 1)) {\n areaHighlight.add(cellRange.from).add(cellRange.to).commit();\n\n if (layerLevel === 1) {\n // For single cell selection in the same layer, we do not create area selection to prevent blue background.\n // When non-consecutive selection is performed we have to add that missing area selection to the previous layer\n // based on previous coordinates. It only occurs when the previous selection wasn't select multiple cells.\n var previousRange = this.selectedRange.previous();\n this.highlight.useLayerLevel(layerLevel - 1).createOrGetArea().add(previousRange.from).commit() // Range may start with hidden indexes. Commit would not found start point (as we add just the `from` coords).\n .adjustCoordinates(previousRange);\n this.highlight.useLayerLevel(layerLevel);\n }\n }\n\n if (this.highlight.isEnabledFor(HEADER_TYPE, cellRange.highlight)) {\n // The header selection generally contains cell selection. In a case when all rows (or columns)\n // are hidden that visual coordinates are translated to renderable coordinates that do not exist.\n // Hence no header highlight is generated. In that case, to make a column (or a row) header\n // highlight, the row and column index has to point to the header (the negative value). See #7052.\n var areAnyRowsRendered = this.tableProps.countRowsTranslated() === 0;\n var areAnyColumnsRendered = this.tableProps.countColsTranslated() === 0;\n var headerCellRange = cellRange;\n\n if (areAnyRowsRendered || areAnyColumnsRendered) {\n headerCellRange = cellRange.clone();\n }\n\n if (areAnyRowsRendered) {\n headerCellRange.from.row = -1;\n }\n\n if (areAnyColumnsRendered) {\n headerCellRange.from.col = -1;\n }\n\n if (this.settings.selectionMode === 'single') {\n if (this.isSelectedByAnyHeader()) {\n headerCellRange.from.normalize();\n }\n\n headerHighlight.add(headerCellRange.from).commit();\n } else {\n headerHighlight.add(headerCellRange.from).add(headerCellRange.to).commit();\n }\n\n if (this.isEntireRowSelected()) {\n var isRowSelected = this.tableProps.countCols() === cellRange.getWidth(); // Make sure that the whole row is selected (in case where selectionMode is set to 'single')\n\n if (isRowSelected) {\n activeHeaderHighlight.add(new CellCoords(cellRange.from.row, -1)).add(new CellCoords(cellRange.to.row, -1)).commit();\n }\n }\n\n if (this.isEntireColumnSelected()) {\n var isColumnSelected = this.tableProps.countRows() === cellRange.getHeight(); // Make sure that the whole column is selected (in case where selectionMode is set to 'single')\n\n if (isColumnSelected) {\n activeHeaderHighlight.add(new CellCoords(-1, cellRange.from.col)).add(new CellCoords(-1, cellRange.to.col)).commit();\n }\n }\n }\n\n this.runLocalHooks('afterSetRangeEnd', coords);\n }\n /**\n * Returns information if we have a multiselection. This method check multiselection only on the latest layer of\n * the selection.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isMultiple\",\n value: function isMultiple() {\n var isMultipleListener = createObjectPropListener(!this.selectedRange.current().isSingle());\n this.runLocalHooks('afterIsMultipleSelection', isMultipleListener);\n return isMultipleListener.value;\n }\n /**\n * Selects cell relative to the current cell (if possible).\n *\n * @param {number} rowDelta Rows number to move, value can be passed as negative number.\n * @param {number} colDelta Columns number to move, value can be passed as negative number.\n * @param {boolean} force If `true` the new rows/columns will be created if necessary. Otherwise, row/column will\n * be created according to `minSpareRows/minSpareCols` settings of Handsontable.\n */\n\n }, {\n key: \"transformStart\",\n value: function transformStart(rowDelta, colDelta, force) {\n this.setRangeStart(this.transformation.transformStart(rowDelta, colDelta, force));\n }\n /**\n * Sets selection end cell relative to the current selection end cell (if possible).\n *\n * @param {number} rowDelta Rows number to move, value can be passed as negative number.\n * @param {number} colDelta Columns number to move, value can be passed as negative number.\n */\n\n }, {\n key: \"transformEnd\",\n value: function transformEnd(rowDelta, colDelta) {\n this.setRangeEnd(this.transformation.transformEnd(rowDelta, colDelta));\n }\n /**\n * Returns currently used layer level.\n *\n * @returns {number} Returns layer level starting from 0. If no selection was added to the table -1 is returned.\n */\n\n }, {\n key: \"getLayerLevel\",\n value: function getLayerLevel() {\n return this.selectedRange.size() - 1;\n }\n /**\n * Returns `true` if currently there is a selection on the screen, `false` otherwise.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isSelected\",\n value: function isSelected() {\n return !this.selectedRange.isEmpty();\n }\n /**\n * Returns `true` if the selection was applied by clicking to the row header. If the `layerLevel`\n * argument is passed then only that layer will be checked. Otherwise, it checks if any row header\n * was clicked on any selection layer level.\n *\n * @param {number} [layerLevel=this.getLayerLevel()] Selection layer level to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isSelectedByRowHeader\",\n value: function isSelectedByRowHeader() {\n var layerLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getLayerLevel();\n return !this.isSelectedByCorner(layerLevel) && this.isEntireRowSelected(layerLevel);\n }\n /**\n * Returns `true` if the selection consists of entire rows (including their headers). If the `layerLevel`\n * argument is passed then only that layer will be checked. Otherwise, it checks the selection for all layers.\n *\n * @param {number} [layerLevel=this.getLayerLevel()] Selection layer level to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isEntireRowSelected\",\n value: function isEntireRowSelected() {\n var layerLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getLayerLevel();\n return layerLevel === -1 ? this.selectedByRowHeader.size > 0 : this.selectedByRowHeader.has(layerLevel);\n }\n /**\n * Returns `true` if the selection was applied by clicking to the column header. If the `layerLevel`\n * argument is passed then only that layer will be checked. Otherwise, it checks if any column header\n * was clicked on any selection layer level.\n *\n * @param {number} [layerLevel=this.getLayerLevel()] Selection layer level to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isSelectedByColumnHeader\",\n value: function isSelectedByColumnHeader() {\n var layerLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getLayerLevel();\n return !this.isSelectedByCorner() && this.isEntireColumnSelected(layerLevel);\n }\n /**\n * Returns `true` if the selection consists of entire columns (including their headers). If the `layerLevel`\n * argument is passed then only that layer will be checked. Otherwise, it checks the selection for all layers.\n *\n * @param {number} [layerLevel=this.getLayerLevel()] Selection layer level to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isEntireColumnSelected\",\n value: function isEntireColumnSelected() {\n var layerLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getLayerLevel();\n return layerLevel === -1 ? this.selectedByColumnHeader.size > 0 : this.selectedByColumnHeader.has(layerLevel);\n }\n /**\n * Returns `true` if the selection was applied by clicking on the row or column header on any layer level.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isSelectedByAnyHeader\",\n value: function isSelectedByAnyHeader() {\n return this.isSelectedByRowHeader(-1) || this.isSelectedByColumnHeader(-1) || this.isSelectedByCorner();\n }\n /**\n * Returns `true` if the selection was applied by clicking on the left-top corner overlay.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isSelectedByCorner\",\n value: function isSelectedByCorner() {\n return this.selectedByCorner;\n }\n /**\n * Returns `true` if coords is within selection coords. This method iterates through all selection layers to check if\n * the coords object is within selection range.\n *\n * @param {CellCoords} coords The CellCoords instance with defined visual coordinates.\n * @returns {boolean}\n */\n\n }, {\n key: \"inInSelection\",\n value: function inInSelection(coords) {\n return this.selectedRange.includes(coords);\n }\n /**\n * Returns `true` if the cell corner should be visible.\n *\n * @private\n * @returns {boolean} `true` if the corner element has to be visible, `false` otherwise.\n */\n\n }, {\n key: \"isCellCornerVisible\",\n value: function isCellCornerVisible() {\n return this.settings.fillHandle && !this.tableProps.isEditorOpened() && !this.isMultiple();\n }\n /**\n * Returns `true` if the area corner should be visible.\n *\n * @param {number} layerLevel The layer level.\n * @returns {boolean} `true` if the corner element has to be visible, `false` otherwise.\n */\n\n }, {\n key: \"isAreaCornerVisible\",\n value: function isAreaCornerVisible(layerLevel) {\n if (Number.isInteger(layerLevel) && layerLevel !== this.getLayerLevel()) {\n return false;\n }\n\n return this.settings.fillHandle && !this.tableProps.isEditorOpened() && this.isMultiple();\n }\n /**\n * Clear the selection by resetting the collected ranges and highlights.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n // TODO: collections selectedByColumnHeader and selectedByRowHeader should be clear too.\n this.selectedRange.clear();\n this.highlight.clear();\n }\n /**\n * Deselects all selected cells.\n */\n\n }, {\n key: \"deselect\",\n value: function deselect() {\n if (!this.isSelected()) {\n return;\n }\n\n this.inProgress = false;\n this.clear();\n this.runLocalHooks('afterDeselect');\n }\n /**\n * Select all cells.\n *\n * @param {boolean} [includeRowHeaders=false] `true` If the selection should include the row headers, `false`\n * otherwise.\n * @param {boolean} [includeColumnHeaders=false] `true` If the selection should include the column headers, `false`\n * otherwise.\n */\n\n }, {\n key: \"selectAll\",\n value: function selectAll() {\n var includeRowHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var includeColumnHeaders = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var nrOfRows = this.tableProps.countRows();\n var nrOfColumns = this.tableProps.countCols(); // We can't select cells when there is no data.\n\n if (!includeRowHeaders && !includeColumnHeaders && (nrOfRows === 0 || nrOfColumns === 0)) {\n return;\n }\n\n var startCoords = new CellCoords(includeColumnHeaders ? -1 : 0, includeRowHeaders ? -1 : 0);\n this.clear();\n this.setRangeStartOnly(startCoords);\n this.selectedByRowHeader.add(this.getLayerLevel());\n this.selectedByColumnHeader.add(this.getLayerLevel());\n this.setRangeEnd(new CellCoords(nrOfRows - 1, nrOfColumns - 1));\n this.finish();\n }\n /**\n * Make multiple, non-contiguous selection specified by `row` and `column` values or a range of cells\n * finishing at `endRow`, `endColumn`. The method supports two input formats, first as an array of arrays such\n * as `[[rowStart, columnStart, rowEnd, columnEnd]]` and second format as an array of CellRange objects.\n * If the passed ranges have another format the exception will be thrown.\n *\n * @param {Array[]|CellRange[]} selectionRanges The coordinates which define what the cells should be selected.\n * @returns {boolean} Returns `true` if selection was successful, `false` otherwise.\n */\n\n }, {\n key: \"selectCells\",\n value: function selectCells(selectionRanges) {\n var _this2 = this;\n\n var selectionType = detectSelectionType(selectionRanges);\n\n if (selectionType === SELECTION_TYPE_EMPTY) {\n return false;\n } else if (selectionType === SELECTION_TYPE_UNRECOGNIZED) {\n throw new Error(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Unsupported format of the selection ranges was passed. To select cells pass \\n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, \\n columnEnd/columnPropEnd]]) or as an array of CellRange objects.\"], [\"Unsupported format of the selection ranges was passed. To select cells pass\\\\x20\\n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\\\\x20\\n columnEnd/columnPropEnd]]) or as an array of CellRange objects.\"]))));\n }\n\n var selectionSchemaNormalizer = normalizeSelectionFactory(selectionType, {\n propToCol: function propToCol(prop) {\n return _this2.tableProps.propToCol(prop);\n },\n keepDirection: true\n });\n var nrOfRows = this.tableProps.countRows();\n var nrOfColumns = this.tableProps.countCols(); // Check if every layer of the coordinates are valid.\n\n var isValid = !selectionRanges.some(function (selection) {\n var _selectionSchemaNorma = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma2 = _slicedToArray(_selectionSchemaNorma, 4),\n rowStart = _selectionSchemaNorma2[0],\n columnStart = _selectionSchemaNorma2[1],\n rowEnd = _selectionSchemaNorma2[2],\n columnEnd = _selectionSchemaNorma2[3];\n\n var _isValid = isValidCoord(rowStart, nrOfRows) && isValidCoord(columnStart, nrOfColumns) && isValidCoord(rowEnd, nrOfRows) && isValidCoord(columnEnd, nrOfColumns);\n\n return !_isValid;\n });\n\n if (isValid) {\n this.clear();\n arrayEach(selectionRanges, function (selection) {\n var _selectionSchemaNorma3 = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma4 = _slicedToArray(_selectionSchemaNorma3, 4),\n rowStart = _selectionSchemaNorma4[0],\n columnStart = _selectionSchemaNorma4[1],\n rowEnd = _selectionSchemaNorma4[2],\n columnEnd = _selectionSchemaNorma4[3];\n\n _this2.setRangeStartOnly(new CellCoords(rowStart, columnStart), false);\n\n _this2.setRangeEnd(new CellCoords(rowEnd, columnEnd));\n\n _this2.finish();\n });\n }\n\n return isValid;\n }\n /**\n * Select column specified by `startColumn` visual index or column property or a range of columns finishing at\n * `endColumn`.\n *\n * @param {number|string} startColumn Visual column index or column property from which the selection starts.\n * @param {number|string} [endColumn] Visual column index or column property from to the selection finishes.\n * @returns {boolean} Returns `true` if selection was successful, `false` otherwise.\n */\n\n }, {\n key: \"selectColumns\",\n value: function selectColumns(startColumn) {\n var endColumn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startColumn;\n var start = typeof startColumn === 'string' ? this.tableProps.propToCol(startColumn) : startColumn;\n var end = typeof endColumn === 'string' ? this.tableProps.propToCol(endColumn) : endColumn;\n var nrOfColumns = this.tableProps.countCols();\n var nrOfRows = this.tableProps.countRows();\n var isValid = isValidCoord(start, nrOfColumns) && isValidCoord(end, nrOfColumns);\n\n if (isValid) {\n this.setRangeStartOnly(new CellCoords(-1, start));\n this.setRangeEnd(new CellCoords(nrOfRows - 1, end));\n this.finish();\n }\n\n return isValid;\n }\n /**\n * Select row specified by `startRow` visual index or a range of rows finishing at `endRow`.\n *\n * @param {number} startRow Visual row index from which the selection starts.\n * @param {number} [endRow] Visual row index from to the selection finishes.\n * @returns {boolean} Returns `true` if selection was successful, `false` otherwise.\n */\n\n }, {\n key: \"selectRows\",\n value: function selectRows(startRow) {\n var endRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startRow;\n var nrOfRows = this.tableProps.countRows();\n var nrOfColumns = this.tableProps.countCols();\n var isValid = isValidCoord(startRow, nrOfRows) && isValidCoord(endRow, nrOfRows);\n\n if (isValid) {\n this.setRangeStartOnly(new CellCoords(startRow, -1));\n this.setRangeEnd(new CellCoords(endRow, nrOfColumns - 1));\n this.finish();\n }\n\n return isValid;\n }\n /**\n * Rewrite the rendered state of the selection as visual selection may have a new representation in the DOM.\n */\n\n }, {\n key: \"refresh\",\n value: function refresh() {\n var customSelections = this.highlight.getCustomSelections();\n customSelections.forEach(function (customSelection) {\n customSelection.commit();\n });\n\n if (!this.isSelected()) {\n return;\n }\n\n var cellHighlight = this.highlight.getCell();\n var currentLayer = this.getLayerLevel();\n cellHighlight.commit().adjustCoordinates(this.selectedRange.current()); // Rewriting rendered ranges going through all layers.\n\n for (var layerLevel = 0; layerLevel < this.selectedRange.size(); layerLevel += 1) {\n this.highlight.useLayerLevel(layerLevel);\n var areaHighlight = this.highlight.createOrGetArea();\n var headerHighlight = this.highlight.createOrGetHeader();\n var activeHeaderHighlight = this.highlight.createOrGetActiveHeader();\n areaHighlight.commit();\n headerHighlight.commit();\n activeHeaderHighlight.commit();\n } // Reverting starting layer for the Highlight.\n\n\n this.highlight.useLayerLevel(currentLayer);\n }\n }]);\n\n return Selection;\n}();\n\nmixin(Selection, localHooks);\nexport default Selection;","import \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport { hasOwnProperty, isObject, objectEach, inherit } from \"../../helpers/object.mjs\";\nimport { getCellType } from \"../../cellTypes/registry.mjs\";\n/**\n * Expands \"type\" property of the meta object to single values. For example `type: 'numeric'` sets\n * \"renderer\", \"editor\", \"validator\" properties to specific functions designed for numeric values.\n * If \"type\" is passed as an object that object will be returned, excluding properties that\n * already exist in the \"metaObject\" if passed.\n *\n * @param {object|string} type Type to expand;.\n * @param {object|undefined} [metaObject] Source meta object.\n * @returns {object|undefined}\n */\n\nexport function expandMetaType(type, metaObject) {\n var validType = typeof type === 'string' ? getCellType(type) : type;\n\n if (!isObject(validType)) {\n return;\n }\n\n var preventSourceOverwrite = isObject(metaObject);\n var expandedType = {};\n objectEach(validType, function (value, property) {\n if (property !== 'CELL_TYPE' && (!preventSourceOverwrite || preventSourceOverwrite && !hasOwnProperty(metaObject, property))) {\n expandedType[property] = value;\n }\n });\n return expandedType;\n}\n/**\n * Creates new class which extends properties from TableMeta layer class.\n *\n * @param {TableMeta} TableMeta The TableMeta which the new ColumnMeta is created from.\n * @param {string[]} [conflictList] List of the properties which are conflicted with the column meta layer.\n * Conflicted properties are overwritten by `undefined` value, to separate them\n * from the TableMeta layer.\n * @returns {ColumnMeta} Returns constructor ready to initialize with `new` operator.\n */\n\nexport function columnFactory(TableMeta) {\n var conflictList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; // Do not use ES6 \"class extends\" syntax here. It seems that the babel produces code\n // which drastically decreases the performance of the ColumnMeta class creation.\n\n /**\n * Base \"class\" for column meta.\n */\n\n function ColumnMeta() {}\n\n inherit(ColumnMeta, TableMeta); // Clear conflict settings\n\n for (var i = 0; i < conflictList.length; i++) {\n ColumnMeta.prototype[conflictList[i]] = void 0;\n }\n\n return ColumnMeta;\n}\n/**\n * Helper which checks if the provided argument is an unsigned number.\n *\n * @param {*} value Value to check.\n * @returns {boolean}\n */\n\nexport function isUnsignedNumber(value) {\n return Number.isInteger(value) && value >= 0;\n}\n/**\n * Function which makes assertion by custom condition. Function throws an error when assertion doesn't meet the spec.\n *\n * @param {Function} condition Function with custom logic. The condition has to return boolean values.\n * @param {string} errorMessage String which describes assertion error.\n */\n\nexport function assert(condition, errorMessage) {\n if (!condition()) {\n throw new Error(\"Assertion failed: \".concat(errorMessage));\n }\n}\n/**\n * Check if given variable is null or undefined.\n *\n * @param {*} variable Variable to check.\n * @returns {boolean}\n */\n\nexport function isNullish(variable) {\n return variable === null || variable === void 0;\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport { isDefined } from \"../../helpers/mixed.mjs\";\nimport { isObjectEqual } from \"../../helpers/object.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @alias Options\n * @class Options\n * @description\n *\n * ## Constructor options.\n *\n * Constructor options are applied using an object literal passed as a second argument to the Handsontable constructor.\n *\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: myArray,\n * width: 400,\n * height: 300\n * });\n * ```\n *\n * ---\n * ## Cascading configuration.\n *\n * Handsontable is using *Cascading Configuration*, which is a fast way to provide configuration options\n * for the entire table, including its columns and particular cells.\n *\n * Consider the following example:\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * readOnly: true,\n * columns: [\n * {readOnly: false},\n * {},\n * {},\n * ],\n * cells: function(row, col, prop) {\n * var cellProperties = {};\n *\n * if (row === 0 && col === 0) {\n * cellProperties.readOnly = true;\n * }.\n *\n * return cellProperties;\n * }\n * });\n * ```\n *\n * The above notation will result in all TDs being *read only*, except for first column TDs which will be *editable*, except for the TD in top left corner which will still be *read only*.\n *\n * ### The Cascading Configuration model\n *\n * ##### 1. Constructor\n *\n * Configuration options that are provided using first-level `handsontable(container, {option: \"value\"})` and `updateSettings` method.\n *\n * ##### 2. Columns\n *\n * Configuration options that are provided using second-level object `handsontable(container, {columns: {option: \"value\"}]})`\n *\n * ##### 3. Cells\n *\n * Configuration options that are provided using third-level function `handsontable(container, {cells: function: (row, col, prop){ }})`\n *\n * ---\n * ## Architecture performance\n *\n * The Cascading Configuration model is based on prototypical inheritance. It is much faster and memory efficient\n * compared to the previous model that used jQuery extend. See: [http://jsperf.com/extending-settings](http://jsperf.com/extending-settings).\n *\n * ---\n * __Important notice:__ In order for the data separation to work properly, make sure that each instance of Handsontable has a unique `id`.\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nexport default (function () {\n return {\n /**\n * License key for commercial version of Handsontable.\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n * @example\n * ```js\n * licenseKey: '00000-00000-00000-00000-00000',\n * // or\n * licenseKey: 'non-commercial-and-evaluation',\n * ```\n */\n licenseKey: void 0,\n\n /**\n * @description\n * Initial data source that will be bound to the data grid __by reference__ (editing data grid alters the data source).\n * Can be declared as an array of arrays or an array of objects.\n *\n * See [Understanding binding as reference](https://docs.handsontable.com/tutorial-data-binding.html#page-reference).\n *\n * @memberof Options#\n * @type {Array[]|object[]}\n * @default undefined\n * @example\n * ```js\n * // as an array of arrays\n * data: [\n * ['A', 'B', 'C'],\n * ['D', 'E', 'F'],\n * ['G', 'H', 'J']\n * ]\n *\n * // as an array of objects\n * data: [\n * {id: 1, name: 'Ted Right'},\n * {id: 2, name: 'Frank Honest'},\n * {id: 3, name: 'Joan Well'},\n * {id: 4, name: 'Gail Polite'},\n * {id: 5, name: 'Michael Fair'},\n * ]\n * ```\n */\n data: void 0,\n\n /**\n * @description\n * Defines the structure of a new row when data source is an array of objects.\n *\n * See [data-schema](https://docs.handsontable.com/tutorial-data-sources.html#page-data-schema) for more options.\n *\n * @memberof Options#\n * @type {object}\n * @default undefined\n *\n * @example\n * ```\n * // with data schema we can start with an empty table\n * data: null,\n * dataSchema: {id: null, name: {first: null, last: null}, address: null},\n * colHeaders: ['ID', 'First Name', 'Last Name', 'Address'],\n * columns: [\n * {data: 'id'},\n * {data: 'name.first'},\n * {data: 'name.last'},\n * {data: 'address'}\n * ],\n * startRows: 5,\n * minSpareRows: 1\n * ```\n */\n dataSchema: void 0,\n\n /**\n * Width of the grid. Can be a value or a function that returns a value.\n *\n * @memberof Options#\n * @type {number|string|Function}\n * @default undefined\n *\n * @example\n * ```\n * // as a number\n * width: 500,\n *\n * // as a string\n * width: '75vw',\n *\n * // as a function\n * width: function() {\n * return 500;\n * },\n * ```\n */\n width: void 0,\n\n /**\n * Height of the grid. Can be a number or a function that returns a number.\n *\n * @memberof Options#\n * @type {number|string|Function}\n * @default undefined\n *\n * @example\n * ```js\n * // as a number\n * height: 500,\n *\n * // as a string\n * height: '75vh',\n *\n * // as a function\n * height: function() {\n * return 500;\n * },\n * ```\n */\n height: void 0,\n\n /**\n * @description\n * Initial number of rows.\n *\n * __Note:__ This option only has effect in Handsontable constructor and only if `data` option is not provided.\n *\n * @memberof Options#\n * @type {number}\n * @default 5\n *\n * @example\n * ```js\n * // start with 15 empty rows\n * startRows: 15,\n * ```\n */\n startRows: 5,\n\n /**\n * @description\n * Initial number of columns.\n *\n * __Note:__ This option only has effect in Handsontable constructor and only if `data` option is not provided.\n *\n * @memberof Options#\n * @type {number}\n * @default 5\n *\n * @example\n * ```js\n * // start with 15 empty columns\n * startCols: 15,\n * ```\n */\n startCols: 5,\n\n /**\n * Setting `true` or `false` will enable or disable the default row headers (1, 2, 3).\n * You can also define an array `['One', 'Two', 'Three', ...]` or a function to define the headers.\n * If a function is set the index of the row is passed as a parameter.\n *\n * @memberof Options#\n * @type {boolean|string[]|Function}\n * @default undefined\n *\n * @example\n * ```js\n * // as a boolean\n * rowHeaders: true,\n *\n * // as an array\n * rowHeaders: ['1', '2', '3'],\n *\n * // as a function\n * rowHeaders: function(index) {\n * return index + ': AB';\n * },\n * ```\n */\n rowHeaders: void 0,\n\n /**\n * Setting `true` or `false` will enable or disable the default column headers (A, B, C).\n * You can also define an array `['One', 'Two', 'Three', ...]` or a function to define the headers.\n * If a function is set, then the index of the column is passed as a parameter.\n *\n * @memberof Options#\n * @type {boolean|string[]|Function}\n * @default null\n *\n * @example\n * ```js\n * // as a boolean\n * colHeaders: true,\n *\n * // as an array\n * colHeaders: ['A', 'B', 'C'],\n *\n * // as a function\n * colHeaders: function(index) {\n * return index + ': AB';\n * },\n * ```\n */\n colHeaders: null,\n\n /**\n * Defines column widths in pixels. Accepts number, string (that will be converted to a number), array of numbers\n * (if you want to define column width separately for each column) or a function (if you want to set column width\n * dynamically on each render).\n *\n * The default width for columns in the rendering process equals 50px.\n *\n * An `undefined` value is for detection in {@link Hooks#modifyColWidth} hook if plugin or setting changed the default size.\n *\n * Note: This option will forcely disable {@link AutoColumnSize} plugin.\n *\n * @memberof Options#\n * @type {number|number[]|string|string[]|Array|Function}\n * @default undefined\n *\n * @example\n * ```js\n * // as a number, for each column.\n * colWidths: 100,\n *\n * // as a string, for each column.\n * colWidths: '100px',\n *\n * // as an array, based on visual indexes. Unspecified columns have a default width.\n * colWidths: [100, 120, undefined, 90],\n *\n * // as a function, based on visual indexes.\n * colWidths: function(index) {\n * return index * 10;\n * },\n * ```\n */\n colWidths: void 0,\n\n /**\n * Defines row heights in pixels. Accepts numbers, strings (that will be converted into a number), array of numbers\n * (if you want to define row height separately for each row) or a function (if you want to set row height dynamically\n * on each render).\n *\n * If the {@link ManualRowResize} or {@link AutoRowSize} plugins are enabled, this is also the minimum height that can\n * be set via either of those two plugins.\n *\n * The default height for rows in the rendering process equals 23px.\n * Height should be equal or greater than 23px. Table is rendered incorrectly if height is less than 23px.\n *\n * An `undefined` value is for detection in {@link Hooks#modifyRowHeight} hook if plugin or setting changed the default size.\n *\n * @memberof Options#\n * @type {number|number[]|string|string[]|Array|Function}\n * @default undefined\n *\n * @example\n * ```js\n * // as a number, the same for all rows\n * rowHeights: 100,\n *\n * // as a string, the same for all row\n * rowHeights: '100px',\n *\n * // as an array, based on visual indexes. The rest of the rows have a default height\n * rowHeights: [100, 120, 90],\n *\n * // as a function, based on visual indexes\n * rowHeights: function(index) {\n * return index * 10;\n * },\n * ```\n */\n rowHeights: void 0,\n\n /**\n * @description\n * Defines the cell properties and data binding for certain columns.\n *\n * __Note:__ Using this option sets a fixed number of columns (options `startCols`, `minCols`, `maxCols` will be ignored).\n *\n * See [documentation -> datasources.html](https://docs.handsontable.com/tutorial-data-sources.html#page-nested) for examples.\n *\n * @memberof Options#\n * @type {object[]|Function}\n * @default undefined\n *\n * @example\n * ```js\n * // as an array of objects\n * // order of the objects in array is representation of physical indexes.\n * columns: [\n * {\n * // column options for the first column\n * type: 'numeric',\n * numericFormat: {\n * pattern: '0,0.00 $'\n * }\n * },\n * {\n * // column options for the second column\n * type: 'text',\n * readOnly: true\n * }\n * ],\n *\n * // or as a function, based on physical indexes\n * columns: function(index) {\n * return {\n * type: index > 0 ? 'numeric' : 'text',\n * readOnly: index < 1\n * }\n * }\n * ```\n */\n columns: void 0,\n\n /**\n * @description\n * Defines the cell properties for given `row`, `col`, `prop` coordinates. Any constructor or column option may be\n * overwritten for a particular cell (row/column combination) using the `cells` property in the Handsontable constructor.\n *\n * __Note:__ Parameters `row` and `col` always represent __physical indexes__. Example below show how to execute\n * operations based on the __visual__ representation of Handsontable.\n *\n * Possible values of `prop`:\n * - property name for column's data source object, when dataset is an [array of objects](https://handsontable.com/docs/tutorial-data-sources.html#page-object)\n * - the same number as `col`, when dataset is an [array of arrays](https://handsontable.com/docs/tutorial-data-sources.html#page-array).\n *\n * @memberof Options#\n * @type {Function}\n * @default undefined\n *\n * @example\n * ```js\n * cells: function(row, column, prop) {\n * const cellProperties = { readOnly: false };\n * const visualRowIndex = this.instance.toVisualRow(row);\n * const visualColIndex = this.instance.toVisualColumn(column);\n *\n * if (visualRowIndex === 0 && visualColIndex === 0) {\n * cellProperties.readOnly = true;\n * }\n *\n * return cellProperties;\n * },\n * ```\n */\n cells: void 0,\n\n /**\n * Any constructor or column option may be overwritten for a particular cell (row/column combination), using `cell`\n * array passed to the Handsontable constructor.\n *\n * @memberof Options#\n * @type {Array[]}\n * @default []\n *\n * @example\n * ```js\n * // make cell with coordinates (0, 0) read only\n * cell: [\n * {\n * row: 0,\n * col: 0,\n * readOnly: true\n * }\n * ],\n * ```\n */\n cell: [],\n\n /**\n * @description\n * If `true`, enables the {@link Comments} plugin, which enables an option to apply cell comments through the context menu\n * (configurable with context menu keys `commentsAddEdit`, `commentsRemove`).\n *\n * To initialize Handsontable with predefined comments, provide cell coordinates and comment text values in a form of\n * an array.\n *\n * See [Comments](https://docs.handsontable.com/demo-comments_.html) demo for examples.\n *\n * @memberof Options#\n * @type {boolean|object[]}\n * @default false\n *\n * @example\n * ```js\n * // enable comments plugin\n * comments: true,\n *\n * // or an object with extra predefined plugin config:\n *\n * comments: {\n * displayDelay: 1000\n * }\n *\n * // or\n * // enable comments plugin and add predefined comments\n * const hot = new Handsontable(document.getElementById('example'), {\n * data: getData(),\n * comments: true,\n * cell: [\n * { row: 1, col: 1, comment: { value: 'Foo' } },\n * { row: 2, col: 2, comment: { value: 'Bar' } }\n * ]\n * });\n * ```\n */\n comments: false,\n\n /**\n * @description\n * If `true`, enables the {@link CustomBorders} plugin, which enables an option to apply custom borders through the context\n * menu (configurable with context menu key `borders`). To initialize Handsontable with predefined custom borders,\n * provide cell coordinates and border styles in a form of an array.\n *\n * See [Custom Borders](https://docs.handsontable.com/demo-custom-borders.html) demo for examples.\n *\n * @memberof Options#\n * @type {boolean|object[]}\n * @default false\n *\n * @example\n * ```js\n * // enable custom borders\n * customBorders: true,\n *\n * // or\n * // enable custom borders and start with predefined left border\n * customBorders: [\n * {\n * range: {\n * from: {\n * row: 1,\n * col: 1\n * },\n * to: {\n * row: 3,\n * col: 4\n * }\n * },\n * left: {\n * width: 2,\n * color: 'red'\n * },\n * right: {},\n * top: {},\n * bottom: {}\n * }\n * ],\n *\n * // or\n * customBorders: [\n * {\n * row: 2,\n * col: 2,\n * left: {\n * width: 2,\n * color: 'red'\n * },\n * right: {\n * width: 1,\n * color: 'green'\n * },\n * top: '',\n * bottom: ''\n * }\n * ],\n * ```\n */\n customBorders: false,\n\n /**\n * Minimum number of rows. At least that number of rows will be created during initialization.\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n *\n * @example\n * ```js\n * // set minimum table size to 10 rows\n * minRows: 10,\n * ```\n */\n minRows: 0,\n\n /**\n * Minimum number of columns. At least that number of columns will be created during initialization.\n * Works only with an array data source. When data source in an object, you can only have as many columns\n * as defined in the first data row, data schema, or the `columns` setting.\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n *\n * @example\n * ```js\n * // set minimum table size to 10 columns\n * minCols: 10,\n * ```\n */\n minCols: 0,\n\n /**\n * Maximum number of rows. If set to a value lower than the initial row count, the data will be trimmed to the provided\n * value as the number of rows.\n *\n * @memberof Options#\n * @type {number}\n * @default Infinity\n *\n * @example\n * ```js\n * // limit table size to maximum 300 rows\n * maxRows: 300,\n * ```\n */\n maxRows: Infinity,\n\n /**\n * Maximum number of cols. If set to a value lower than the initial col count, the data will be trimmed to the provided\n * value as the number of cols.\n *\n * @memberof Options#\n * @type {number}\n * @default Infinity\n *\n * @example\n * ```js\n * // limit table size to maximum 300 columns\n * maxCols: 300,\n * ```\n */\n maxCols: Infinity,\n\n /**\n * When set to 1 (or more), Handsontable will add a new row at the end of grid if there are no more empty rows.\n * (unless the number of rows exceeds the one set in the `maxRows` property).\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n *\n * @example\n * ```js\n * // always add 3 empty rows at the table end\n * minSpareRows: 3,\n * ```\n */\n minSpareRows: 0,\n\n /**\n * When set to 1 (or more), Handsontable will add a new column at the end of grid if there are no more empty columns.\n * (unless the number of rows exceeds the one set in the `maxCols` property).\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n *\n * @example\n * ```js\n * // always add 3 empty columns at the table end\n * minSpareCols: 3,\n * ```\n */\n minSpareCols: 0,\n\n /**\n * If set to `false`, there won't be an option to insert new rows in the Context Menu.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // hide \"Insert row above\" and \"Insert row below\" options from the Context Menu\n * allowInsertRow: false,\n * ```\n */\n allowInsertRow: true,\n\n /**\n * If set to `false`, there won't be an option to insert new columns in the Context Menu.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // hide \"Insert column left\" and \"Insert column right\" options from the Context Menu\n * allowInsertColumn: false,\n * ```\n */\n allowInsertColumn: true,\n\n /**\n * If set to `false`, there won't be an option to remove rows in the Context Menu.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // hide \"Remove row\" option from the Context Menu\n * allowRemoveRow: false,\n * ```\n */\n allowRemoveRow: true,\n\n /**\n * If set to `false`, there won't be an option to remove columns in the Context Menu.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // hide \"Remove column\" option from the Context Menu\n * allowRemoveColumn: false,\n * ```\n */\n allowRemoveColumn: true,\n\n /**\n * @description\n * Defines how the table selection reacts. The selection support three different behaviors defined as:\n * * `'single'` Only a single cell can be selected.\n * * `'range'` Multiple cells within a single range can be selected.\n * * `'multiple'` Multiple ranges of cells can be selected.\n *\n * To see how to interact with selection by getting selected data or change styles of the selected cells go to\n * [https://docs.handsontable.com/demo-selecting-ranges.html](https://docs.handsontable.com/demo-selecting-ranges.html).\n *\n * @memberof Options#\n * @type {string}\n * @default 'multiple'\n *\n * @example\n * ```js\n * // only one cell can be selected at a time\n * selectionMode: 'single',\n * ```\n */\n selectionMode: 'multiple',\n\n /**\n * Enables the fill handle (drag-down and copy-down) functionality, which shows a small rectangle in bottom\n * right corner of the selected area, that let's you expand values to the adjacent cells.\n *\n * Setting to `true` enables the fillHandle plugin. Possible values: `true` (to enable in all directions),\n * `'vertical'` or `'horizontal'` (to enable in one direction), `false` (to disable completely), an object with\n * options: `autoInsertRow`, `direction`.\n *\n * If `autoInsertRow` option is `true`, fill-handler will create new rows till it reaches the last row.\n * It is enabled by default.\n *\n * @memberof Options#\n * @type {boolean|string|object}\n * @default true\n *\n * @example\n * ```js\n * // enable plugin in all directions and with autoInsertRow as true\n * fillHandle: true,\n *\n * // or\n * // enable plugin in vertical direction and with autoInsertRow as true\n * fillHandle: 'vertical',\n *\n * // or\n * fillHandle: {\n * // enable plugin in both directions and with autoInsertRow as false\n * autoInsertRow: false,\n * },\n *\n * // or\n * fillHandle: {\n * // enable plugin in vertical direction and with autoInsertRow as false\n * autoInsertRow: false,\n * direction: 'vertical'\n * },\n * ```\n */\n fillHandle: {\n autoInsertRow: false\n },\n\n /**\n * Allows to specify the number of fixed (or *frozen*) rows at the top of the table.\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n *\n * @example\n * ```js\n * // freeze the first 3 rows of the table.\n * fixedRowsTop: 3,\n * ```\n */\n fixedRowsTop: 0,\n\n /**\n * Allows to specify the number of fixed (or *frozen*) rows at the bottom of the table.\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n *\n * @example\n * ```js\n * // freeze the last 3 rows of the table.\n * fixedRowsBottom: 3,\n * ```\n */\n fixedRowsBottom: 0,\n\n /**\n * Allows to specify the number of fixed (or *frozen*) columns on the left of the table.\n *\n * @memberof Options#\n * @type {number}\n * @default 0\n *\n * @example\n * ```js\n * // freeze first 3 columns of the table.\n * fixedColumnsLeft: 3,\n * ```\n */\n fixedColumnsLeft: 0,\n\n /**\n * If `true`, mouse click outside the grid will deselect the current selection. Can be a function that takes the\n * click event target and returns a boolean.\n *\n * @memberof Options#\n * @type {boolean|Function}\n * @default true\n *\n * @example\n * ```js\n * // don't clear current selection when mouse click was outside the grid\n * outsideClickDeselects: false,\n *\n * // or\n * outsideClickDeselects: function(event) {\n * return false;\n * }\n * ```\n */\n outsideClickDeselects: true,\n\n /**\n * If `true`, ENTER begins editing mode (like in Google Docs). If `false`, ENTER moves to next\n * row (like Excel) and adds a new row if necessary. TAB adds new column if necessary.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * enterBeginsEditing: false,\n * ```\n */\n enterBeginsEditing: true,\n\n /**\n * Defines the cursor movement after ENTER was pressed (SHIFT + ENTER uses a negative vector). Can\n * be an object or a function that returns an object. The event argument passed to the function is a DOM Event object\n * received after the ENTER key has been pressed. This event object can be used to check whether user pressed\n * ENTER or SHIFT + ENTER .\n *\n * @memberof Options#\n * @type {object|Function}\n * @default {col: 0, row: 1}\n *\n * @example\n * ```js\n * // move selection diagonal by 1 cell in x and y axis\n * enterMoves: {col: 1, row: 1},\n * // or as a function\n * enterMoves: function(event) {\n * return {col: 1, row: 1};\n * },\n * ```\n */\n enterMoves: {\n col: 0,\n row: 1\n },\n\n /**\n * Defines the cursor movement after TAB is pressed (SHIFT + TAB uses a negative vector). Can\n * be an object or a function that returns an object. The event argument passed to the function is a DOM Event object\n * received after the TAB key has been pressed. This event object can be used to check whether user pressed\n * TAB or SHIFT + TAB .\n *\n * @memberof Options#\n * @type {object|Function}\n * @default {row: 0, col: 1}\n *\n * @example\n * ```js\n * // move selection 2 cells away after TAB pressed.\n * tabMoves: {row: 2, col: 2},\n * // or as a function\n * tabMoves: function(event) {\n * return {row: 2, col: 2};\n * },\n * ```\n */\n tabMoves: {\n row: 0,\n col: 1\n },\n\n /**\n * If `true`, pressing TAB or right arrow in the last column will move to first column in next row.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // stop TAB key navigation on the last column\n * autoWrapRow: false,\n * ```\n */\n autoWrapRow: true,\n\n /**\n * If `true`, pressing ENTER or down arrow in the last row will move to the first row in the next column.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // stop ENTER key navigation on the last row\n * autoWrapCol: false,\n * ```\n */\n autoWrapCol: true,\n\n /**\n * @description\n * Turns on saving the state of column sorting, column positions and column sizes in local storage.\n *\n * You can save any sort of data in local storage to preserve table state between page reloads. In order to enable\n * data storage mechanism, `persistentState` option must be set to `true` (you can set it either during Handsontable\n * initialization or using the `updateSettings` method). When `persistentState` is enabled it exposes 3 hooks:\n *\n * __persistentStateSave__ (key: String, value: Mixed).\n *\n * * Saves value under given key in browser local storage.\n *\n * __persistentStateLoad__ (key: String, valuePlaceholder: Object).\n *\n * * Loads `value`, saved under given key, form browser local storage. The loaded `value` will be saved in\n * `valuePlaceholder.value` (this is due to specific behaviour of `Hooks.run()` method). If no value have\n * been saved under key `valuePlaceholder.value` will be `undefined`.\n *\n * __persistentStateReset__ (key: String).\n *\n * * Clears the value saved under `key`. If no `key` is given, all values associated with table will be cleared.\n *\n * __Note:__ The main reason behind using `persistentState` hooks rather than regular LocalStorage API is that it\n * ensures separation of data stored by multiple Handsontable instances. In other words, if you have two (or more)\n * instances of Handsontable on one page, data saved by one instance won't be accessible by the second instance.\n * Those two instances can store data under the same key and no data would be overwritten.\n *\n * __Important:__ In order for the data separation to work properly, make sure that each instance of Handsontable has a unique `id`.\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * // enable the persistent state plugin\n * persistentState: true,\n * ```\n */\n persistentState: void 0,\n\n /**\n * Class name for all visible rows in the current selection.\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n *\n * @example\n * ```js\n * // This will add a 'currentRow' class name to appropriate table cells.\n * currentRowClassName: 'currentRow',\n * ```\n */\n currentRowClassName: void 0,\n\n /**\n * Class name for all visible columns in the current selection.\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n *\n * @example\n * ```js\n * // This will add a 'currentColumn' class name to appropriate table cells.\n * currentColClassName: 'currentColumn',\n * ```\n */\n currentColClassName: void 0,\n\n /**\n * Class name for all visible headers in current selection.\n *\n * @memberof Options#\n * @type {string}\n * @default 'ht__highlight'\n *\n * @example\n * ```js\n * // This will add a 'ht__highlight' class name to appropriate table headers.\n * currentHeaderClassName: 'ht__highlight',\n * ```\n */\n currentHeaderClassName: 'ht__highlight',\n\n /**\n * Class name for all active headers in selections. The header will be marked with this class name\n * only when a whole column or row will be selected.\n *\n * @memberof Options#\n * @type {string}\n * @since 0.38.2\n * @default 'ht__active_highlight'\n *\n * @example\n * ```js\n * // this will add a 'ht__active_highlight' class name to appropriate table headers.\n * activeHeaderClassName: 'ht__active_highlight',\n * ```\n */\n activeHeaderClassName: 'ht__active_highlight',\n\n /**\n * Class name for the current element.\n * The interpretation depends on the level on which this option is provided in the [cascading configuration](https://handsontable.com/docs/Options.html).\n * If `className` is provided on the first (constructor) level, it is the applied to the Handsontable container.\n * If `className` is provided on the second (`column`) or the third (`cell` or `cells`) level, it is applied to the table cell.\n *\n * @memberof Options#\n * @type {string|string[]}\n * @default undefined\n *\n * @example\n * ```js\n * // can be set as a string\n * className: 'your__class--name',\n *\n * // or as an array of strings\n * className: ['first-class-name', 'second-class-name'],\n * ```\n */\n className: void 0,\n\n /**\n * Class name for all tables inside container element.\n *\n * @memberof Options#\n * @type {string|string[]}\n * @default undefined\n *\n * @example\n * ```js\n * // set custom class for table element\n * tableClassName: 'your__class--name',\n *\n * // or\n * tableClassName: ['first-class-name', 'second-class-name'],\n * ```\n */\n tableClassName: void 0,\n\n /**\n * @description\n * Defines how the columns react, when the declared table width is different than the calculated sum of all column widths.\n * [See more](https://docs.handsontable.com/demo-stretching.html) mode. Possible values:\n * * `'none'` Disable stretching\n * * `'last'` Stretch only the last column\n * * `'all'` Stretch all the columns evenly.\n *\n * @memberof Options#\n * @type {string}\n * @default 'none'\n *\n * @example\n * ```js\n * // fit table to the container\n * stretchH: 'all',\n * ```\n */\n stretchH: 'none',\n\n /**\n * Overwrites the default `isEmptyRow` method, which checks if row at the provided index is empty.\n *\n * @memberof Options#\n * @type {Function}\n * @param {number} row Visual row index.\n * @returns {boolean}\n *\n * @example\n * ```js\n * // define custom checks for empty row\n * isEmptyRow: function(row) {\n * ...\n * },\n * ```\n */\n isEmptyRow: function isEmptyRow(row) {\n var col;\n var colLen;\n var value;\n var meta;\n\n for (col = 0, colLen = this.countCols(); col < colLen; col++) {\n value = this.getDataAtCell(row, col);\n\n if (value !== '' && value !== null && isDefined(value)) {\n if (_typeof(value) === 'object') {\n meta = this.getCellMeta(row, col);\n return isObjectEqual(this.getSchema()[meta.prop], value);\n }\n\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * Overwrites the default `isEmptyCol` method, which checks if column at the provided index is empty.\n *\n * @memberof Options#\n * @type {Function}\n * @param {number} col Visual column index.\n * @returns {boolean}\n *\n * @example\n * ```js\n * // define custom checks for empty column\n * isEmptyCol: function(column) {\n * return false;\n * },\n * ```\n */\n isEmptyCol: function isEmptyCol(col) {\n var row;\n var rowLen;\n var value;\n\n for (row = 0, rowLen = this.countRows(); row < rowLen; row++) {\n value = this.getDataAtCell(row, col);\n\n if (value !== '' && value !== null && isDefined(value)) {\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * When set to `true`, the table is re-rendered when it is detected that it was made visible in DOM.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // don't rerender the table on visibility changes\n * observeDOMVisibility: false,\n * ```\n */\n observeDOMVisibility: true,\n\n /**\n * If set to `true`, Handsontable will accept values that were marked as invalid by the cell `validator`. It will\n * result with *invalid* cells being treated as *valid* (will save the *invalid* value into the Handsontable data source).\n * If set to `false`, Handsontable will *not* accept the invalid values and won't allow the user to close the editor.\n * This option will be particularly useful when used with the Autocomplete's `strict` mode.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // don't save the invalid values\n * allowInvalid: false,\n * ```\n */\n allowInvalid: true,\n\n /**\n * If set to `true`, Handsontable will accept values that are empty (`null`, `undefined` or `''`). If set\n * to `false`, Handsontable will *not* accept the empty values and mark cell as invalid.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // allow empty values for all cells (whole table)\n * allowEmpty: true,\n *\n * // or\n * columns: [\n * {\n * data: 'date',\n * dateFormat: 'DD/MM/YYYY',\n * // allow empty values only for the 'date' column\n * allowEmpty: true\n * }\n * ],\n * ```\n */\n allowEmpty: true,\n\n /**\n * CSS class name for cells that did not pass validation.\n *\n * @memberof Options#\n * @type {string}\n * @default 'htInvalid'\n *\n * @example\n * ```js\n * // set custom validation error class\n * invalidCellClassName: 'highlight--error',\n * ```\n */\n invalidCellClassName: 'htInvalid',\n\n /**\n * When set to an non-empty string, displayed as the cell content for empty cells. If a value of a different type is provided,\n * it will be stringified and applied as a string.\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n *\n * @example\n * ```js\n * // add custom placeholder content to empty cells\n * placeholder: 'Empty Cell',\n * ```\n */\n placeholder: void 0,\n\n /**\n * CSS class name for cells that have a placeholder in use.\n *\n * @memberof Options#\n * @type {string}\n * @default 'htPlaceholder'\n *\n * @example\n * ```js\n * // set custom placeholder class\n * placeholderCellClassName: 'has-placeholder',\n * ```\n */\n placeholderCellClassName: 'htPlaceholder',\n\n /**\n * CSS class name for read-only cells.\n *\n * @memberof Options#\n * @type {string}\n * @default 'htDimmed'\n *\n * @example\n * ```js\n * // set custom read-only class\n * readOnlyCellClassName: 'is-readOnly',\n * ```\n */\n readOnlyCellClassName: 'htDimmed',\n\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * @description\n * If a string is provided, it may be one of the following predefined values:\n * * `autocomplete`,\n * * `checkbox`,\n * * `html`,\n * * `numeric`,\n * * `password`.\n * * `text`.\n *\n * Or you can [register](https://docs.handsontable.com/demo-custom-renderers.html) the custom renderer under specified name and use its name as an alias in your\n * configuration.\n *\n * If a function is provided, it will receive the following arguments:\n * ```js\n * function(instance, TD, row, col, prop, value, cellProperties) {}\n * ```\n *\n * You can read more about custom renderes [in the documentation](https://docs.handsontable.com/demo-custom-renderers.html).\n *\n * @memberof Options#\n * @type {string|Function}\n * @default undefined\n *\n * @example\n * ```js\n * // register custom renderer\n * Handsontable.renderers.registerRenderer('my.renderer', function(instance, TD, row, col, prop, value, cellProperties) {\n * TD.innerHTML = value;\n * });\n *\n * // use it for selected column:\n * columns: [\n * {\n * // as a string with the name of build in renderer\n * renderer: 'autocomplete',\n * editor: 'select'\n * },\n * {\n * // as an alias to custom renderer registered above\n * renderer: 'my.renderer'\n * },\n * {\n * // renderer as custom function\n * renderer: function(hotInstance, TD, row, col, prop, value, cellProperties) {\n * TD.style.color = 'blue';\n * TD.innerHTML = value;\n * }\n * }\n * ],\n * ```\n */\n renderer: void 0,\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n /**\n * CSS class name added to the commented cells.\n *\n * @memberof Options#\n * @type {string}\n * @default 'htCommentCell'\n *\n * @example\n * ```js\n * // set custom class for commented cells\n * commentedCellClassName: 'has-comment',\n * ```\n */\n commentedCellClassName: 'htCommentCell',\n\n /**\n * If set to `true`, it enables the browser's native selection of a fragment of the text within a single cell, between\n * adjacent cells or in a whole table. If set to `'cell'`, it enables the possibility of selecting a fragment of the\n * text within a single cell's body.\n *\n * @memberof Options#\n * @type {boolean|string}\n * @default false\n *\n * @example\n * ```js\n * // enable text selection within table\n * fragmentSelection: true,\n *\n * // or\n * // enable text selection within cells only\n * fragmentSelection: 'cell',\n * ```\n */\n fragmentSelection: false,\n\n /**\n * @description\n * Makes cell, column or comment [read only](https://docs.handsontable.com/demo-read-only.html).\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * // set as read only\n * readOnly: true,\n * ```\n */\n readOnly: false,\n\n /**\n * @description\n * When added to a `column` property, it skips the column on paste and pastes the data on the next column to the right.\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * columns: [\n * {\n * // don't paste data to this column\n * skipColumnOnPaste: true\n * }\n * ],\n * ```\n */\n skipColumnOnPaste: false,\n\n /**\n * @description\n * When added to a cell property, it skips the row on paste and pastes the data on the following row.\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * cells: function(row, column) {\n * const cellProperties = {};\n *\n * // don't paste data to the second row\n * if (row === 1) {\n * cellProperties.skipRowOnPaste = true;\n * }\n *\n * return cellProperties;\n * }\n * ```\n */\n skipRowOnPaste: false,\n\n /**\n * @description\n * Setting to `true` enables the {@link Search} plugin (see [demo](https://docs.handsontable.com/demo-search-for-values.html)).\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * // enable search plugin\n * search: true,\n *\n * // or\n * // as an object with detailed configuration\n * search: {\n * searchResultClass: 'customClass',\n * queryMethod: function(queryStr, value) {\n * ...\n * },\n * callback: function(instance, row, column, value, result) {\n * ...\n * }\n * }\n * ```\n */\n search: false,\n\n /**\n * @description\n * Shortcut to define the combination of the cell renderer, editor and validator for the column, cell or whole table.\n *\n * Possible values:\n * * [autocomplete](https://docs.handsontable.com/demo-autocomplete.html)\n * * [checkbox](https://docs.handsontable.com/demo-checkbox.html)\n * * [date](https://docs.handsontable.com/demo-date.html)\n * * [dropdown](https://docs.handsontable.com/demo-dropdown.html)\n * * [handsontable](https://docs.handsontable.com/demo-handsontable.html)\n * * [numeric](https://docs.handsontable.com/demo-numeric.html)\n * * [password](https://docs.handsontable.com/demo-password.html)\n * * text\n * * [time](https://docs.handsontable.com/demo-time.html).\n *\n * Or you can register the custom cell type under specified name and use\n * its name as an alias in your configuration.\n *\n * @memberof Options#\n * @type {string}\n * @default 'text'\n *\n * @example\n * ```js\n * // register custom cell type:\n * Handsontable.cellTypes.registerCellType('my.type', {\n * editor: MyEditorClass,\n * renderer: function(hot, td, row, col, prop, value, cellProperties) {\n * td.innerHTML = value;\n * },\n * validator: function(value, callback) {\n * callback(value === 'foo' ? true : false);\n * }\n * });\n *\n * // use it in column settings:\n * columns: [\n * {\n * type: 'text'\n * },\n * {\n * // an alias to custom type\n * type: 'my.type'\n * },\n * {\n * type: 'checkbox'\n * }\n * ],\n * ```\n */\n type: 'text',\n\n /**\n * @description\n * Makes a cell copyable (pressing CTRL + C on your keyboard moves its value to system clipboard).\n *\n * __Note:__ this setting is `false` by default for cells with type `password`.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * cells: [\n * {\n * cell: 0,\n * row: 0,\n * // cell with coordinates (0, 0) can't be copied\n * copyable: false,\n * }\n * ],\n * ```\n */\n copyable: true,\n\n /**\n * Defines the editor for the table/column/cell.\n *\n * If a string is provided, it may be one of the following predefined values:\n * * [autocomplete](https://docs.handsontable.com/demo-autocomplete.html)\n * * [checkbox](https://docs.handsontable.com/demo-checkbox.html)\n * * [date](https://docs.handsontable.com/demo-date.html)\n * * [dropdown](https://docs.handsontable.com/demo-dropdown.html)\n * * [handsontable](https://docs.handsontable.com/demo-handsontable.html)\n * * [mobile](https://docs.handsontable.com/demo-mobiles-and-tablets.html)\n * * [password](https://docs.handsontable.com/demo-password.html)\n * * [select](https://docs.handsontable.com/demo-select.html)\n * * text.\n *\n * Or you can [register](https://docs.handsontable.com/tutorial-cell-editor.html#registering-an-editor) the custom editor under specified name and use its name as an alias in your\n * configuration.\n *\n * To disable cell editing completely set `editor` property to `false`.\n *\n * @memberof Options#\n * @type {string|Function|boolean}\n * @default undefined\n *\n * @example\n * ```js\n * columns: [\n * {\n * // set editor for the first column\n * editor: 'select'\n * },\n * {\n * // disable editor for the second column\n * editor: false\n * }\n * ],\n * ```\n */\n editor: void 0,\n\n /**\n * Control number of choices for the autocomplete (or dropdown) typed cells. After exceeding it, a scrollbar for the\n * dropdown list of choices will appear.\n *\n * @memberof Options#\n * @type {number}\n * @default 10\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'autocomplete',\n * // set autocomplete options list height\n * visibleRows: 15,\n * }\n * ],\n * ```\n */\n visibleRows: 10,\n\n /**\n * Makes autocomplete or dropdown width the same as the edited cell width. If `false` then editor will be scaled\n * according to its content.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'autocomplete',\n * // don't trim dropdown width with column width\n * trimDropdown: false,\n * }\n * ],\n * ```\n */\n trimDropdown: true,\n\n /**\n * When set to `true`, the text of the cell content is wrapped if it does not fit in the fixed column width.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * colWidths: 100,\n * columns: [\n * {\n * // fixed column width is set but don't wrap the content\n * wordWrap: false,\n * }\n * ],\n * ```\n */\n wordWrap: true,\n\n /**\n * CSS class name added to cells with cell meta `wordWrap: false`.\n *\n * @memberof Options#\n * @type {string}\n * @default 'htNoWrap'\n *\n * @example\n * ```js\n * // set custom class for cells which content won't be wrapped\n * noWordWrapClassName: 'is-noWrapCell',\n * ```\n */\n noWordWrapClassName: 'htNoWrap',\n\n /**\n * @description\n * Defines if the right-click context menu should be enabled. Context menu allows to create new row or column at any\n * place in the grid among [other features](https://docs.handsontable.com/demo-context-menu.html).\n * Possible values:\n * * `true` (to enable default options),\n * * `false` (to disable completely)\n * * an array of [predefined options](https://docs.handsontable.com/demo-context-menu.html#page-specific),\n * * an object [with defined structure](https://docs.handsontable.com/demo-context-menu.html#page-custom).\n *\n * If the value is an object, you can also customize the options with:\n * * `disableSelection` - a `boolean`, if set to true it prevents mouseover from highlighting the item for selection\n * * `isCommand` - a `boolean`, if set to false it prevents clicks from executing the command and closing the menu.\n *\n * See [the context menu demo](https://docs.handsontable.com/demo-context-menu.html) for examples.\n *\n * @memberof Options#\n * @type {boolean|string[]|object}\n * @default undefined\n *\n * @example\n * ```js\n * // as a boolean\n * contextMenu: true,\n *\n * // as an array\n * contextMenu: ['row_above', 'row_below', '---------', 'undo', 'redo'],\n *\n * // as an object (`name` attribute is required in the custom keys)\n * contextMenu: {\n * items: {\n * \"option1\": {\n * name: \"option1\"\n * },\n * \"option2\": {\n * name: \"option2\",\n * submenu: {\n * items: [\n * {\n * key: \"option2:suboption1\",\n * name: \"option2:suboption1\",\n * callback: function(key, options) {\n * ...\n * }\n * },\n * ...\n * ]\n * }\n * }\n * }\n * },\n * ```\n */\n contextMenu: void 0,\n\n /**\n * Disables or enables the copy/paste functionality.\n *\n * @memberof Options#\n * @type {object|boolean}\n * @default true\n *\n * @example\n * ```js\n * // disable copy and paste\n * copyPaste: false,\n *\n * // enable copy and paste with custom configuration\n * copyPaste: {\n * columnsLimit: 25,\n * rowsLimit: 50,\n * pasteMode: 'shift_down',\n * uiContainer: document.body,\n * },\n * ```\n */\n copyPaste: true,\n\n /**\n * If `true`, undo/redo functionality is enabled.\n * Note: `undefined` by default but it acts as enabled.\n * You need to switch it to `false` to disable it completely.\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n *\n * @example\n * ```js\n * // enable undo and redo\n * undo: true,\n * ```\n */\n undo: void 0,\n\n /**\n * @description\n * Turns on [Column sorting](https://docs.handsontable.com/demo-sorting-data.html). Can be either a boolean (`true` / `false`) or an object with a declared sorting options:\n * * `initialConfig` - Object with predefined keys:\n * * `column` - sorted column\n * * `sortOrder` - order in which column will be sorted\n * * `'asc'` = ascending\n * * `'desc'` = descending\n * * `indicator` - display status for sorting order indicator (an arrow icon in the column header, specifying the sorting order).\n * * `true` = show sort indicator for sorted columns\n * * `false` = don't show sort indicator for sorted columns\n * * `headerAction` - allow to click on the headers to sort\n * * `true` = turn on possibility to click on the headers to sort\n * * `false` = turn off possibility to click on the headers to sort\n * * `sortEmptyCells` - how empty values should be handled\n * * `true` = the table sorts empty cells\n * * `false` = the table moves all empty cells to the end of the table\n * * `compareFunctionFactory` - curry function returning compare function; compare function should work in the same way as function which is handled by native `Array.sort` method); please take a look at below examples for more information.\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n *\n * @example\n * ```js\n * // as boolean\n * columnSorting: true\n *\n * // as an object with initial sort config (sort ascending for column at index 1)\n * columnSorting: {\n * initialConfig: {\n * column: 1,\n * sortOrder: 'asc'\n * }\n * }\n *\n * // as an object which define specific sorting options for all columns\n * columnSorting: {\n * sortEmptyCells: true, // true = the table sorts empty cells, false = the table moves all empty cells to the end of the table\n * indicator: true, // true = shows indicator for all columns, false = don't show indicator for columns\n * headerAction: false, // true = allow to click on the headers to sort, false = turn off possibility to click on the headers to sort\n * compareFunctionFactory: function(sortOrder, columnMeta) {\n * return function(value, nextValue) {\n * // Some value comparisons which will return -1, 0 or 1...\n * }\n * }\n * }```\n */\n columnSorting: void 0,\n\n /**\n * Turns on [Manual column move](https://docs.handsontable.com/demo-moving-rows-and-columns.html), if set to a boolean or define initial column order (as an array of column indexes).\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n *\n * @example\n * ```js\n * // as a boolean to enable column move\n * manualColumnMove: true,\n *\n * // as a array with initial order\n * // (move column index at 0 to 1 and move column index at 1 to 4)\n * manualColumnMove: [1, 4],\n * ```\n */\n manualColumnMove: void 0,\n\n /**\n * @description\n * Turns on [Manual column resize](https://docs.handsontable.com/demo-resizing.html), if set to a boolean or define initial column resized widths (an an array of widths).\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n *\n * @example\n * ```js\n * // as a boolean to enable column resize\n * manualColumnResize: true,\n *\n * // as a array with initial widths\n * // (column at 0 index has 40px and column at 1 index has 50px)\n * manualColumnResize: [40, 50],\n * ```\n */\n manualColumnResize: void 0,\n\n /**\n * @description\n * Turns on [Manual row move](https://docs.handsontable.com/demo-moving-rows-and-columns.html), if set to a boolean or define initial row order (as an array of row indexes).\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n *\n * @example\n * ```js\n * // as a boolean\n * manualRowMove: true,\n *\n * // as a array with initial order\n * // (move row index at 0 to 1 and move row index at 1 to 4)\n * manualRowMove: [1, 4],\n * ```\n */\n manualRowMove: void 0,\n\n /**\n * @description\n * Turns on [Manual row resize](https://docs.handsontable.com/demo-resizing.html), if set to a boolean or define initial row resized heights (as an array of heights).\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n *\n * @example\n * ```js\n * // as a boolean to enable row resize\n * manualRowResize: true,\n *\n * // as an array to set initial heights\n * // (row at 0 index has 40px and row at 1 index has 50px)\n * manualRowResize: [40, 50],\n * ```\n */\n manualRowResize: void 0,\n\n /**\n * @description\n * If set to `true`, it enables a possibility to merge cells. If set to an array of objects, it merges the cells provided\n * in the objects (see the example below). More information on [the demo page](https://docs.handsontable.com/demo-merge-cells.html).\n *\n * @memberof Options#\n * @type {boolean|object[]}\n * @default false\n *\n * @example\n * ```js\n * // enables the mergeCells plugin\n * margeCells: true,\n *\n * // declares a list of merged sections\n * mergeCells: [\n * // rowspan and colspan properties declare the width and height of a merged section in cells\n * {row: 1, col: 1, rowspan: 3, colspan: 3},\n * {row: 3, col: 4, rowspan: 2, colspan: 2},\n * {row: 5, col: 6, rowspan: 3, colspan: 3}\n * ],\n * ```\n */\n mergeCells: false,\n\n /**\n * @description\n * Turns on [Multi-column sorting](https://docs.handsontable.com/demo-multicolumn-sorting.html). Can be either a boolean (`true` / `false`) or an object with a declared sorting options:\n * * `initialConfig` - Array containing objects, every with predefined keys:\n * * `column` - sorted column\n * * `sortOrder` - order in which column will be sorted\n * * `'asc'` = ascending\n * * `'desc'` = descending\n * * `indicator` - display status for sorting order indicator (an arrow icon in the column header, specifying the sorting order).\n * * `true` = show sort indicator for sorted columns\n * * `false` = don't show sort indicator for sorted columns\n * * `headerAction` - allow to click on the headers to sort\n * * `true` = turn on possibility to click on the headers to sort\n * * `false` = turn off possibility to click on the headers to sort\n * * `sortEmptyCells` - how empty values should be handled\n * * `true` = the table sorts empty cells\n * * `false` = the table moves all empty cells to the end of the table\n * * `compareFunctionFactory` - curry function returning compare function; compare function should work in the same way as function which is handled by native `Array.sort` method); please take a look at below examples for more information.\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n *\n * @example\n * ```js\n * // as boolean\n * multiColumnSorting: true\n *\n * // as an object with initial sort config (sort ascending for column at index 1 and then sort descending for column at index 0)\n * multiColumnSorting: {\n * initialConfig: [{\n * column: 1,\n * sortOrder: 'asc'\n * }, {\n * column: 0,\n * sortOrder: 'desc'\n * }]\n * }\n *\n * // as an object which define specific sorting options for all columns\n * multiColumnSorting: {\n * sortEmptyCells: true, // true = the table sorts empty cells, false = the table moves all empty cells to the end of the table\n * indicator: true, // true = shows indicator for all columns, false = don't show indicator for columns\n * headerAction: false, // true = allow to click on the headers to sort, false = turn off possibility to click on the headers to sort\n * compareFunctionFactory: function(sortOrder, columnMeta) {\n * return function(value, nextValue) {\n * // Some value comparisons which will return -1, 0 or 1...\n * }\n * }\n * }```\n */\n multiColumnSorting: void 0,\n\n /**\n * @description\n * Number of rows to be rendered outside of the visible part of the table. By default, it's set to `'auto'`, which\n * makes Handsontable to attempt to calculate the best offset performance-wise.\n *\n * You may test out different values to find the best one that works for your specific implementation.\n *\n * @memberof Options#\n * @type {number|string}\n * @default 'auto'\n *\n * @example\n * ```js\n * viewportRowRenderingOffset: 70,\n * ```\n */\n viewportRowRenderingOffset: 'auto',\n\n /**\n * @description\n * Number of columns to be rendered outside of the visible part of the table. By default, it's set to `'auto'`, which\n * makes Handsontable try calculating the best offset performance-wise.\n *\n * You may experiment with the value to find the one that works best for your specific implementation.\n *\n * @memberof Options#\n * @type {number|string}\n * @default 'auto'\n *\n * @example\n * ```js\n * viewportColumnRenderingOffset: 70,\n * ```\n */\n viewportColumnRenderingOffset: 'auto',\n\n /**\n * @description\n * A function, regular expression or a string, which will be used in the process of cell validation. If a function is\n * used, be sure to execute the callback argument with either `true` (`callback(true)`) if the validation passed\n * or with `false` (`callback(false)`), if the validation failed.\n *\n * __Note__, that `this` in the function points to the `cellProperties` object.\n *\n * If a string is provided, it may be one of the following predefined values:\n * * `autocomplete`,\n * * `date`,\n * * `numeric`,\n * * `time`.\n *\n * Or you can [register](https://docs.handsontable.com/demo-data-validation.html) the validator function under specified name and use its name as an alias in your\n * configuration.\n *\n * See more [in the demo](https://docs.handsontable.com/demo-data-validation.html).\n *\n * @memberof Options#\n * @type {Function|RegExp|string}\n * @default undefined\n *\n * @example\n * ```js\n * columns: [\n * {\n * // as a function\n * validator: function(value, callback) {\n * ...\n * }\n * },\n * {\n * // regular expression\n * validator: /^[0-9]$/\n * },\n * {\n * // as a string\n * validator: 'numeric'\n * }\n * ],\n * ```\n */\n validator: void 0,\n\n /**\n * @description\n * Disables visual cells selection.\n *\n * Possible values:\n * * `true` - Disables any type of visual selection (current, header and area selection),\n * * `false` - Enables any type of visual selection. This is default value.\n * * `'current'` - Disables the selection of a currently selected cell, the area selection is still present.\n * * `'area'` - Disables the area selection, the currently selected cell selection is still present.\n * * `'header'` - Disables the headers selection, the currently selected cell selection is still present.\n *\n * @memberof Options#\n * @type {boolean|string|string[]}\n * @default false\n *\n * @example\n * ```js\n * // as a boolean\n * disableVisualSelection: true,\n *\n * // as a string ('current', 'area' or 'header')\n * disableVisualSelection: 'current',\n *\n * // as an array\n * disableVisualSelection: ['current', 'area'],\n * ```\n */\n disableVisualSelection: false,\n\n /**\n * Disables or enables {@link ManualColumnFreeze} plugin.\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n *\n * @example\n * ```js\n * // enable fixed columns\n * manualColumnFreeze: true,\n * ```\n */\n manualColumnFreeze: void 0,\n\n /**\n * Defines whether Handsontable should trim the whitespace at the beginning and the end of the cell contents.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * columns: [\n * {\n * // don't remove whitespace\n * trimWhitespace: false\n * }\n * ]\n * ```\n */\n trimWhitespace: true,\n\n /**\n * Defines data source for Autocomplete or Dropdown cell types.\n *\n * @memberof Options#\n * @type {Array|Function}\n * @default undefined\n *\n * @example\n * ```js\n * // source as a array\n * columns: [{\n * type: 'autocomplete',\n * source: ['A', 'B', 'C', 'D']\n * }],\n *\n * // source as a function\n * columns: [{\n * type: 'autocomplete',\n * source: function(query, callback) {\n * fetch('https://example.com/query?q=' + query, function(response) {\n * callback(response.items);\n * })\n * }\n * }],\n * ```\n */\n source: void 0,\n\n /**\n * @description\n * Defines the column header name.\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n *\n * @example\n * ```js\n * // set header names for every column\n * columns: [\n * {\n * title: 'First name',\n * type: 'text',\n * },\n * {\n * title: 'Last name',\n * type: 'text',\n * }\n * ],\n * ```\n */\n title: void 0,\n\n /**\n * Data template for `'checkbox'` type when checkbox is checked.\n *\n * @memberof Options#\n * @type {boolean|string|number}\n * @default true\n *\n * @example\n * ```js\n * checkedTemplate: 'good'\n *\n * // if a checkbox-typed cell is checked, then getDataAtCell(x, y),\n * // where x and y are the coordinates of the cell will return 'good'.\n * ```\n */\n checkedTemplate: void 0,\n\n /**\n * Data template for `'checkbox'` type when checkbox is unchecked.\n *\n * @memberof Options#\n * @type {boolean|string|number}\n * @default false\n *\n * @example\n * ```js\n * uncheckedTemplate: 'bad'\n *\n * // if a checkbox-typed cell is not checked, then getDataAtCell(x,y),\n * // where x and y are the coordinates of the cell will return 'bad'.\n * ```\n */\n uncheckedTemplate: void 0,\n\n /**\n * @description\n * Object which describes if renderer should create checkbox element with label element as a parent.\n *\n * __Note__, this option only works for [checkbox-typed](https://docs.handsontable.com/demo-checkbox.html) cells.\n *\n * By default the [checkbox](https://docs.handsontable.com/demo-checkbox.html) renderer renders the checkbox without a label.\n *\n * Possible object properties:\n * * `property` - Defines the property name of the data object, which will to be used as a label.\n * (eg. `label: {property: 'name.last'}`). This option works only if data was passed as an array of objects.\n * * `position` - String which describes where to place the label text (before or after checkbox element).\n * Valid values are `'before'` and '`after`' (defaults to `'after'`).\n * * `value` - String or a Function which will be used as label text.\n *\n * @memberof Options#\n * @type {object}\n * @default undefined\n *\n * @example\n * ```js\n * columns: [{\n * type: 'checkbox',\n * // add \"My label:\" after the checkbox\n * label: {position: 'after', value: 'My label: '}\n * }],\n * ```\n */\n label: void 0,\n\n /**\n * Display format for numeric typed renderers.\n *\n * __Note__, this option only works for [numeric-typed](https://docs.handsontable.com/demo-numeric.html) cells.\n *\n * Format is described by two properties:\n * * `pattern` - Handled by `numbro` for purpose of formatting numbers to desired pattern. List of supported patterns can be found [here](http://numbrojs.com/format.html#numbers).\n * * `culture` - Handled by `numbro` for purpose of formatting currencies. Examples showing how it works can be found [here](http://numbrojs.com/format.html#currency). List of supported cultures can be found [here](http://numbrojs.com/languages.html#supported-languages).\n *\n * __Note:__ Please keep in mind that this option is used only to format the displayed output! It has no effect on the input data provided for the cell. The numeric data can be entered to the table only as floats (separated by a dot or a comma) or integers, and are stored in the source dataset as JavaScript numbers.\n *\n * Handsontable uses [numbro](http://numbrojs.com/) as a main library for numbers formatting.\n *\n * @memberof Options#\n * @since 0.35.0\n * @type {object}\n * @default undefined\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'numeric',\n * // set desired format pattern and\n * numericFormat: {\n * pattern: '0,00',\n * culture: 'en-US'\n * }\n * }\n * ],\n * ```\n */\n numericFormat: void 0,\n\n /**\n * Language for Handsontable translation. Possible language codes are [listed here](https://docs.handsontable.com/tutorial-internationalization.html#available-languages).\n *\n * @memberof Options#\n * @type {string}\n * @default 'en-US'\n *\n * @example\n * ```js\n * // set Polish language\n * language: 'pl-PL',\n * ```\n */\n language: 'en-US',\n\n /**\n * Data source for [select-typed](https://docs.handsontable.com/demo-select.html) cells.\n *\n * __Note__, this option only works for [select-typed](https://docs.handsontable.com/demo-select.html) cells.\n *\n * @memberof Options#\n * @type {string[]}\n * @default undefined\n *\n * @example\n * ```js\n * columns: [\n * {\n * editor: 'select',\n * // add three select options to choose from\n * selectOptions: ['A', 'B', 'C'],\n * }\n * ],\n * ```\n */\n selectOptions: void 0,\n\n /**\n * Enables or disables the {@link AutoColumnSize} plugin. Default value is `undefined`, which has the same effect as `true`,\n * meaning, the `syncLimit` is set to 50.\n * Disabling this plugin can increase performance, as no size-related calculations would be done.\n *\n * Column width calculations are divided into sync and async part. Each of those parts has their own advantages and\n * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous\n * operations don't block the browser UI.\n *\n * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value.\n *\n * You can also use the `useHeaders` option to take the column headers width into calculation.\n *\n * Note: Using {@link Core#colWidths} option will forcely disable {@link AutoColumnSize}.\n *\n * @memberof Options#\n * @type {object|boolean}\n * @default {syncLimit: 50}\n *\n * @example\n * ```js\n * // as a number (300 columns in sync, rest async)\n * autoColumnSize: {syncLimit: 300},\n *\n * // as a string (percent)\n * autoColumnSize: {syncLimit: '40%'},\n *\n * // use headers width while calculating the column width\n * autoColumnSize: {useHeaders: true},\n * ```\n */\n autoColumnSize: void 0,\n\n /**\n * Enables or disables {@link AutoRowSize} plugin. Default value is `undefined`, which has the same effect as `false`\n * (disabled). Enabling this plugin can decrease performance, as size-related calculations would be performed.\n *\n * __Note:__ the default `syncLimit` value is set to 500 when the plugin is manually enabled by declaring it as: `autoRowSize: true`.\n *\n * Row height calculations are divided into sync and async stages. Each of these stages has their own advantages and\n * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous\n * operations don't block the browser UI.\n *\n * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value.\n *\n * @memberof Options#\n * @type {object|boolean}\n * @default undefined\n *\n * @example\n * ```js\n * // as a number (300 columns in sync, rest async)\n * autoRowSize: {syncLimit: 300},\n *\n * // as a string (percent)\n * autoRowSize: {syncLimit: '40%'},\n * ```\n */\n autoRowSize: void 0,\n\n /**\n * Date validation format.\n *\n * __Note__, this option only works for [date-typed](https://docs.handsontable.com/demo-date.html) cells.\n *\n * @memberof Options#\n * @type {string}\n * @default 'DD/MM/YYYY'\n *\n * @example\n * ```js\n * columns: [{\n * type: 'date',\n * // localise date format\n * dateFormat: 'MM/DD/YYYY'\n * }],\n * ```\n */\n dateFormat: 'DD/MM/YYYY',\n\n /**\n * If `true` then dates will be automatically formatted to match the desired format.\n *\n * __Note__, this option only works for [date-typed](https://docs.handsontable.com/demo-date.html) cells.\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * columns: [{\n * type: 'date',\n * dateFormat: 'YYYY-MM-DD',\n * // force selected date format\n * correctFormat: true\n * }],\n * ```\n */\n correctFormat: false,\n\n /**\n * Definition of default value which will fill the empty cells.\n *\n * __Note__, this option only works for [date-typed](https://docs.handsontable.com/demo-date.html) cells.\n *\n * @memberof Options#\n * @type {string}\n * @default undefined\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'date',\n * // always set this date for empty cells\n * defaultDate: '2015-02-02'\n * }\n * ],\n * ```\n */\n defaultDate: void 0,\n\n /**\n * If set to `true`, the value entered into the cell must match (case-sensitive) the autocomplete source.\n * Otherwise, cell won't pass the validation. When filtering the autocomplete source list, the editor will\n * be working in case-insensitive mode.\n *\n * __Note__, this option only works for [autocomplete-typed](https://docs.handsontable.com/demo-autocomplete.html) cells.\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n *\n * @example\n * ```js\n * columns: [{\n * type: 'autocomplete',\n * source: ['A', 'B', 'C'],\n * // force selected value to match the source list\n * strict: true\n * }],\n * ```\n */\n strict: void 0,\n\n /**\n * If set to `true`, data defined in `source` of the autocomplete or dropdown cell will be treated as HTML.\n *\n * __Warning:__ Enabling this option can cause serious XSS vulnerabilities.\n *\n * __Note__, this option only works for [autocomplete-typed](https://docs.handsontable.com/demo-autocomplete.html) cells.\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * columns: [{\n * type: 'autocomplete',\n * // use HTML in the source list\n * allowHtml: true,\n * source: ['foo ', 'bar ']\n * }],\n * ```\n */\n allowHtml: false,\n\n /**\n * If typed `true` then virtual rendering mechanism for handsontable will be disabled.\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n *\n * @example\n * ```js\n * // disable virtual rows rendering\n * renderAllRows: true,\n * ```\n */\n renderAllRows: void 0,\n\n /**\n * Prevents table to overlap outside the parent element. If `'horizontal'` option is chosen then table will show\n * a horizontal scrollbar if parent's width is narrower then table's width.\n *\n * Possible values:\n * * `false` - Disables functionality.\n * * `horizontal` - Prevents horizontal overflow table.\n * * `vertical` - Prevents vertical overflow table.\n *\n * @memberof Options#\n * @type {string|boolean}\n * @default false\n *\n * @example\n * ```js\n * preventOverflow: 'horizontal',\n * ```\n */\n preventOverflow: false,\n\n /**\n * Prevents wheel event on overlays for doing default action.\n *\n * @memberof Options#\n * @private\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * preventWheel: false,\n * ```\n */\n preventWheel: false,\n\n /**\n * @description\n * Enables the functionality of the {@link BindRowsWithHeaders} plugin which allows binding the table rows with their headers.\n * If the plugin is enabled, the table row headers will \"stick\" to the rows, when they are hidden/moved. Basically,\n * if at the initialization row 0 has a header titled \"A\", it will have it no matter what you do with the table.\n *\n * @memberof Options#\n * @type {boolean|string}\n * @default undefined\n *\n * @example\n * ```js\n * // keep row data and row headers in sync\n * bindRowsWithHeaders: true\n * ```\n */\n bindRowsWithHeaders: void 0,\n\n /**\n * @description\n * The {@link CollapsibleColumns} plugin allows collapsing of columns, covered by a header with the `colspan` property\n * defined.\n *\n * Clicking the \"collapse/expand\" button collapses (or expands) all \"child\" headers except the first one.\n *\n * Setting the `collapsibleColumns` property to `true` will display a \"collapse/expand\" button in every\n * header with a defined colspan` property.\n *\n * To limit this functionality to a smaller group of headers, define the `collapsibleColumns` property\n * as an array of objects, as in the example below.\n *\n * @memberof Options#\n * @type {boolean|object[]}\n * @default undefined\n *\n * @example\n * ```js\n * // enable collapsing for all headers\n * collapsibleColumns: true,\n *\n * // or\n * // enable collapsing for selected headers\n * collapsibleColumns: [\n * {row: -4, col: 1, collapsible: true},\n * {row: -3, col: 5, collapsible: true}\n * ],\n * ```\n */\n collapsibleColumns: void 0,\n\n /**\n * @description\n * Allows making pre-defined calculations on the cell values and display the results within Handsontable.\n *\n * Possible types:\n * * `'sum'`\n * * `'min'`\n * * `'max'`\n * * `'count'`\n * * `'average'`\n * * `'custom'` - add `customFunction`.\n *\n * [See the demo for more information](https://docs.handsontable.com/demo-summary-calculations.html).\n *\n * @memberof Options#\n * @type {object[]|Function}\n * @default undefined\n *\n * @example\n * ```\n * columnSummary: [\n * {\n * destinationRow: 4,\n * destinationColumn: 1,\n * forceNumeric: true,\n * reversedRowCoords: true,\n * suppressDataTypeErrors: false,\n * readOnly: true,\n * roundFloat: false,\n * type: 'custom',\n * customFunction: function(endpoint) {\n * return 100;\n * }\n * }\n * ],\n * ```\n */\n columnSummary: void 0,\n\n /**\n * This plugin allows adding a configurable dropdown menu to the table's column headers. The dropdown menu acts like\n * the {@link Options#contextMenu}, but is triggered by clicking the button in the header.\n *\n * @memberof Options#\n * @type {boolean|object|string[]}\n * @default undefined\n *\n * @example\n * ```js\n * // enable dropdown menu\n * dropdownMenu: true,\n *\n * // or\n * // enable and configure dropdown menu options\n * dropdownMenu: ['remove_col', '---------', 'make_read_only', 'alignment']\n * ```\n */\n dropdownMenu: void 0,\n\n /**\n * The {@link Filters} plugin allows filtering the table data either by the built-in component or with the API.\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n *\n * @example\n * ```js\n * // enable filters\n * filters: true,\n * ```\n */\n filters: void 0,\n\n /**\n * The {@link Formulas} plugin allows Handsontable to process formula expressions defined in the provided data.\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n *\n * @example\n * ```js\n * // enable formulas plugin\n * formulas: true,\n *\n * // or as an object with custom variables to be used in formula expressions\n * formulas: {\n * variables: {\n * FOO: 64,\n * BAR: 'baz',\n * }\n * },\n * ```\n */\n formulas: void 0,\n\n /**\n * @description\n * Allows adding a tooltip to the table headers.\n *\n * Available options:\n * * the `rows` property defines if tooltips should be added to row headers,\n * * the `columns` property defines if tooltips should be added to column headers,\n * * the `onlyTrimmed` property defines if tooltips should be added only to headers, which content is trimmed by the header itself (the content being wider then the header).\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n * @deprecated This plugin is deprecated and will be removed in the next major release.\n *\n * @example\n * ```js\n * // enable tooltips for all headers\n * headerTooltips: true,\n *\n * // or\n * headerTooltips: {\n * rows: false,\n * columns: true,\n * onlyTrimmed: true\n * }\n * ```\n */\n headerTooltips: void 0,\n\n /**\n * The {@link HiddenColumns} plugin allows hiding of certain columns. You can pass additional configuration with an\n * object notation. Options that are then available are:\n * * `columns` - an array of rows that should be hidden on plugin initialization\n * * `indicators` - enables small ui markers to indicate where are hidden columns.\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n *\n * @example\n * ```js\n * // enable column hiding\n * hiddenColumns: true,\n *\n * // or\n * hiddenColumns: {\n * // set columns that are hidden by default\n * columns: [5, 10, 15],\n * // show where are hidden columns\n * indicators: true\n * }\n * ```\n */\n hiddenColumns: void 0,\n\n /**\n * The {@link HiddenRows} plugin allows hiding of certain rows. You can pass additional configuration with an\n * object notation. Options that are then available are:\n * * `rows` - an array of rows that should be hidden on plugin initialization\n * * `indicators` - enables small ui markers to indicate where are hidden columns.\n *\n * @memberof Options#\n * @type {boolean|object}\n * @default undefined\n *\n * @example\n * ```js\n * // enable row hiding\n * hiddenRows: true,\n *\n * // or\n * hiddenRows: {\n * // set rows that are hidden by default\n * rows: [5, 10, 15],\n * // show where are hidden rows\n * indicators: true\n * }\n * ```\n */\n hiddenRows: void 0,\n\n /**\n * @description\n * Allows creating a nested header structure, using the HTML's colspan attribute.\n *\n * @memberof Options#\n * @type {Array[]}\n * @default undefined\n *\n * @example\n * ```\n * nestedHeaders: [\n * ['A', {label: 'B', colspan: 8}, 'C'],\n * ['D', {label: 'E', colspan: 4}, {label: 'F', colspan: 4}, 'G'],\n * ['H', 'I', 'J', 'K', 'L', 'M', 'N', 'R', 'S', 'T']\n * ],\n * ```\n */\n nestedHeaders: void 0,\n\n /**\n * @description\n * Plugin allowing hiding of certain rows.\n *\n * @memberof Options#\n * @type {boolean|number[]}\n * @default undefined\n *\n * @example\n * ```js\n * // enable plugin\n * trimRows: true,\n *\n * // or\n * // trim selected rows on table initialization\n * trimRows: [5, 10, 15],\n * ```\n */\n trimRows: void 0,\n\n /**\n * @description\n * Allows setting a custom width of the row headers. You can provide a number or an array of widths, if many row\n * header levels are defined.\n *\n * @memberof Options#\n * @type {number|number[]}\n * @default undefined\n *\n * @example\n * ```js\n * // set width for all row headers\n * rowHeaderWidth: 25,\n *\n * // or\n * // set width for selected headers only\n * rowHeaderWidth: [25, 30, 55],\n * ```\n */\n rowHeaderWidth: void 0,\n\n /**\n * @description\n * Allows setting a custom height of the column headers. You can provide a number or an array of heights, if many\n * column header levels are defined.\n *\n * @memberof Options#\n * @type {number|number[]}\n * @default undefined\n *\n * @example\n * ```js\n * // set shared height for all headers\n * columnHeaderHeight: 35,\n *\n * // or\n * // set height for each header individually\n * columnHeaderHeight: [35, 20, 55],\n *\n * // or\n * // skipped headers will fallback to default value\n * columnHeaderHeight: [35, undefined, 55],\n * ```\n */\n columnHeaderHeight: void 0,\n\n /**\n * @description\n * Enables the {@link ObserveChanges} plugin switches table into one-way data binding where changes are applied into\n * data source (from outside table) will be automatically reflected in the table.\n *\n * For every data change [afterChangesObserved](Hooks.html#event:afterChangesObserved) hook will be fired.\n *\n * @memberof Options#\n * @type {boolean}\n * @default undefined\n * @deprecated This plugin is deprecated and will be removed in the next major release.\n *\n * @example\n * ```js\n * observeChanges: true,\n * ```\n */\n observeChanges: void 0,\n\n /**\n * If defined as `true`, the Autocomplete's suggestion list would be sorted by relevance (the closer to the left the\n * match is, the higher the suggestion).\n *\n * __Note__, this option only works for [autocomplete-typed](https://docs.handsontable.com/demo-autocomplete.html) cells.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'autocomplete',\n * source: [ ... ],\n * // keep options order as they were defined\n * sortByRelevance: false\n * }\n * ],\n * ```\n */\n sortByRelevance: true,\n\n /**\n * If defined as `true`, when the user types into the input area the Autocomplete's suggestion list is updated to only\n * include those choices starting with what has been typed; if defined as `false` all suggestions remain shown, with\n * those matching what has been typed marked in bold.\n *\n * __Note__, this option only works for [autocomplete-typed](https://docs.handsontable.com/demo-autocomplete.html) cells.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'autocomplete',\n * source: [ ... ],\n * // don't hide options that don't match search query\n * filter: false\n * }\n * ],\n * ```\n */\n filter: true,\n\n /**\n * If defined as `true`, filtering in the Autocomplete Editor will be case-sensitive.\n *\n * __Note__, this option only works for [autocomplete-typed](https://docs.handsontable.com/demo-autocomplete.html) cells.\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n *\n * @example\n * ```js\n * columns: [\n * {\n * type: 'autocomplete',\n * source: [ ... ],\n * // match case while searching autocomplete options\n * filteringCaseSensitive: true\n * }\n * ],\n * ```\n */\n filteringCaseSensitive: false,\n\n /**\n * @description\n * Disables or enables the drag to scroll functionality.\n *\n * @memberof Options#\n * @type {boolean}\n * @default true\n *\n * @example\n * ```js\n * // don't scroll the viewport when selection gets to the viewport edge\n * dragToScroll: false,\n * ```\n */\n dragToScroll: true,\n\n /**\n * @description\n * Disable or enable the nested rows functionality - displaying nested structures in a two-dimensional data table.\n *\n * See [quick setup of the Nested rows](https://handsontable.com/docs/demo-nested-rows.html).\n * @example\n * ```js\n * nestedRows: true,\n * ```\n *\n * @memberof Options#\n * @type {boolean}\n * @default false\n */\n nestedRows: void 0\n };\n});","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { expandMetaType } from \"../utils.mjs\";\nimport metaSchemaFactory from \"../metaSchema.mjs\";\n/**\n * @returns {TableMeta} Returns an empty object. The holder for global meta object.\n */\n\nfunction createTableMetaEmptyClass() {\n return function TableMeta() {\n _classCallCheck(this, TableMeta);\n };\n}\n/**\n * The global meta object is a root of all default settings, which are recognizable by Handsontable.\n * Other layers are inherited from this object. Adding, removing, or changing property in that\n * object has a direct reflection to all layers such as: TableMeta, ColumnMeta, or CellMeta layers.\n *\n * +-------------+.\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+.\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+.\n * │\n * │\n * \\│/\n * +-------------+.\n * │ CellMeta │\n * │ (instance) │\n * +-------------+.\n */\n\n\nvar GlobalMeta = /*#__PURE__*/function () {\n function GlobalMeta() {\n _classCallCheck(this, GlobalMeta);\n /**\n * An alias for the constructor. Necessary for inheritance for creating new layers.\n *\n * @type {TableMeta}\n */\n\n\n this.metaCtor = createTableMetaEmptyClass();\n /**\n * Main object (prototype of the internal TableMeta class), holder for all default settings.\n *\n * @type {object}\n */\n\n this.meta = this.metaCtor.prototype;\n extend(this.meta, metaSchemaFactory());\n }\n /**\n * Gets constructor of the global meta object. Necessary for inheritance for creating the next meta layers.\n *\n * @returns {Function}\n */\n\n\n _createClass(GlobalMeta, [{\n key: \"getMetaConstructor\",\n value: function getMetaConstructor() {\n return this.metaCtor;\n }\n /**\n * Gets settings object for this layer.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getMeta\",\n value: function getMeta() {\n return this.meta;\n }\n /**\n * Updates global settings object by merging settings with the current state.\n *\n * @param {object} settings An object to merge with.\n */\n\n }, {\n key: \"updateMeta\",\n value: function updateMeta(settings) {\n extend(this.meta, settings);\n extend(this.meta, expandMetaType(settings.type, settings));\n }\n }]);\n\n return GlobalMeta;\n}();\n\nexport { GlobalMeta as default };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { expandMetaType } from \"../utils.mjs\";\n/**\n * The table meta object is a layer that keeps all settings of the Handsontable that was passed in\n * the constructor. That layer contains all default settings inherited from the GlobalMeta layer\n * merged with settings passed by the developer. Adding, removing, or changing property in that\n * object has no direct reflection on any other layers.\n *\n * +-------------+.\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+.\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+.\n * │\n * │\n * \\│/\n * +-------------+.\n * │ CellMeta │\n * │ (instance) │\n * +-------------+.\n */\n\nvar TableMeta = /*#__PURE__*/function () {\n function TableMeta(globalMeta) {\n _classCallCheck(this, TableMeta);\n\n var MetaCtor = globalMeta.getMetaConstructor();\n /**\n * Main object (instance of the internal TableMeta class from GlobalMeta), holder for all settings defined in the table scope.\n *\n * @type {object}\n */\n\n this.meta = new MetaCtor();\n }\n /**\n * Gets settings object for this layer.\n *\n * @returns {object}\n */\n\n\n _createClass(TableMeta, [{\n key: \"getMeta\",\n value: function getMeta() {\n return this.meta;\n }\n /**\n * Updates table settings object by merging settings with the current state.\n *\n * @param {object} settings An object to merge with.\n */\n\n }, {\n key: \"updateMeta\",\n value: function updateMeta(settings) {\n extend(this.meta, settings);\n extend(this.meta, expandMetaType(settings.type, settings));\n }\n }]);\n\n return TableMeta;\n}();\n\nexport { TableMeta as default };","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayFilter } from \"../../helpers/array.mjs\";\nimport { assert, isUnsignedNumber, isNullish } from \"./utils.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @class LazyFactoryMap\n *\n * The LazyFactoryMap object holds key-value pairs in the structure similar to the\n * regular Map. Once created, items can be moved around a grid depending on the operations\n * performed on that grid - adding or removing rows. The collection requires \"key\"\n * to be a zero-based index.\n *\n * It's essential to notice that the \"key\" index under which the item was created\n * is volatile. After altering the grid, the \"key\" index can change.\n *\n * Having created N items with corresponding example data where the data has 10\n * holes (`undefined` values) within (that's why internal storage index counts from 10).\n * +------+------+------+------+------+.\n * | 0/10 | 1/11 | 2/12 | 3/13 | 4/14 | Keys (volatile zero-based index / internal storage index)\n * +------+------+------+------+------+.\n * │ │ │ │ │\n * +------+------+------+------+------+.\n * | AAA | BBB | CCC | DDD | EEE | Data\n * +------+------+------+------+------+.\n *\n * Map.obtain(0) // returns \"AAA\"\n * map.obtain(2) // returns \"CCC\".\n *\n * After inserting 2 new rows, keys that hold the data positioned after the place\n * where the new rows are added are upshifted by 2.\n * │\n * │ Insert 2 rows\n * \\│/\n * +------+------+------+------+------+.\n * | 0/10 | 1/11 | 2/12 | 3/13 | 4/14 | Keys before\n * +------+------+------+------+------+.\n *\n * / 2 new rows \\\n * +------+------+------+------+------+------+------+.\n * | 0/10 | 1/11 | 2/15 | 3/16 | 4/12 | 5/13 | 6/14 | Keys after\n * +------+------+------+------+------+------+------+.\n * │ │ │ │ │ │ │\n * │ │ └──────┼──────┼──────┼┐ │\n * │ │ └──────┼──────┼┼────┼┐\n * │ │ ┌─────────────┘ ││ ││\n * │ │ │ ┌─────────────┘│ ││\n * │ │ │ │ ┌───────┼────┘│\n * │ │ │ │ │ │ │\n * +------+------+------+------+------+------+------+.\n * | AAA | BBB | CCC | DDD | EEE | FFF | GGG | Data\n * +------+------+------+------+------+------+------+\n *\n * Now at index 2 and 3 we have access to new items.\n *\n * map.obtain(2) // returns new value \"FFF\" for newly created row.\n * map.obtain(4) // index shifted by 2 has access to the old \"CCC\" value, as before inserting.\n *\n * after removing 4 rows, keys that hold the data positioned after the place where the\n * rows are removed are downshifted by 4.\n * │\n * │ Remove 4 rows\n * ├───────────────────────────┐\n * \\│/ │\n * +------+------+------+------+------+------+------+\n * | 0/10 | 1/11 | 2/15 | 3/16 | 4/12 | 5/13 | 6/14 | Keys after\n * +------+------+------+------+------+------+------+\n * │ │ │ │ │ │ │\n * │ │ └──────┼──────┼──────┼┐ │\n * │ │ └──────┼──────┼┼────┼┐\n * │ │ ┌─────────────┘ ││ ││\n * │ │ │ ┌─────────────┘│ ││\n * │ │ │ │ ┌───────┼────┘│\n * │ │ │ │ │ │ │\n * +------+------+------+------+------+------+------+\n * | AAA | BBB | CCC | DDD | EEE | FFF | GGG | Data\n * +------+------+------+------+------+------+------+\n *\n * +------+------+------+\n * | 0/10 | 1/13 | 2/14 | Keys after\n * +------+------+------+\n * │ │ │\n * │ │ └─────────────┐\n * │ └────────────┐ │\n * │ │ │\n * │ │ │\n * │ │ │\n * │ │ │\n * +------+------+------+------+------+------+------+\n * | AAA | BBB | CCC | DDD | EEE | FFF | GGG | Data\n * +------+------+------+------+------+------+------+\n * /│\\ /│\\ /│\\ /│\\\n * └──┬──┘ └──┬──┘\n * This data is marked as \"hole\" which\n * means that can be replaced by new item\n * when that will be created.\n *\n * map.obtain(2) // returns the value (\"EEE\") as it should. Access to the value is\n * // changed (the key was downshifted). However, the internal index has not changed,\n * // which means that the data does not need to be changed (spliced) too.\n *\n * After previous remove operation which creates some \"holes\" obtaining new\n * items replaces that \"holes\" as follows:\n *\n * // Obtains new item\n * map.obtain(90) // Returns \"NEW\" value\n *\n * +------+------+------+...+------+\n * | 0/10 | 1/13 | 2/14 | | 90/0 | Keys after\n * +------+------+------+...+------+\n * │ │ │ │\n * │ │ └──────────┼────────────┐\n * │ └─────────────────┼─────┐ │\n * └──────────┐ │ │ │\n * │ │ │ │\n * ┌──────────┼──────────────┘ │ │\n * │ │ │ │\n * +------+...+------+------+------+------+------+-----+\n * | NEW | | AAA | BBB | CCC | DDD | EEE | FFF | Data\n * +------+...+------+------+------+------+------+-----+\n * /│\\\n * │\n * The first \"hole\" (at index 0) item is permanently removed and replaced by a new item.\n * The hole index is taken from the hole collection which act as FIFO (First In First Out).\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nvar LazyFactoryMap = /*#__PURE__*/function () {\n function LazyFactoryMap(valueFactory) {\n _classCallCheck(this, LazyFactoryMap);\n\n this.valueFactory = valueFactory;\n /**\n * An array which contains data.\n *\n * @type {Array}\n */\n\n this.data = [];\n /**\n * An array of indexes where the key of the array is mapped to the value which points to the\n * specific position of the data array.\n *\n * @type {number[]}\n */\n\n this.index = [];\n /**\n * The collection of indexes that points to the data items which can be replaced by obtaining new\n * ones. The \"holes\" are an intended effect of deleting entries.\n *\n * The idea of \"holes\" generally allows us to not modify the \"data\" structure while removing\n * items from the collection.\n *\n * @type {Set}\n */\n\n this.holes = new Set();\n }\n /**\n * Gets or if data not exist creates and returns new data.\n *\n * @param {number} key The item key as zero-based index.\n * @returns {*}\n */\n\n\n _createClass(LazyFactoryMap, [{\n key: \"obtain\",\n value: function obtain(key) {\n assert(function () {\n return isUnsignedNumber(key);\n }, 'Expecting an unsigned number.');\n\n var dataIndex = this._getStorageIndexByKey(key);\n\n var result;\n\n if (dataIndex >= 0) {\n result = this.data[dataIndex];\n\n if (result === void 0) {\n result = this.valueFactory(key);\n this.data[dataIndex] = result;\n }\n } else {\n result = this.valueFactory(key);\n\n if (this.holes.size > 0) {\n var reuseIndex = this.holes.values().next().value; // Gets first item from the collection\n\n this.holes.delete(reuseIndex);\n this.data[reuseIndex] = result;\n this.index[key] = reuseIndex;\n } else {\n this.data.push(result);\n this.index[key] = this.data.length - 1;\n }\n }\n\n return result;\n }\n /**\n * Inserts an empty data to the map. This method creates an empty space for obtaining\n * new data.\n *\n * @param {number} key The key as volatile zero-based index at which to begin inserting space for new data.\n * @param {number} [amount=1] Ammount of data to insert.\n */\n\n }, {\n key: \"insert\",\n value: function insert(key) {\n var _this$index;\n\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n assert(function () {\n return isUnsignedNumber(key) || isNullish(key);\n }, 'Expecting an unsigned number or null/undefined argument.');\n var newIndexes = [];\n var dataLength = this.data.length;\n\n for (var i = 0; i < amount; i++) {\n newIndexes.push(dataLength + i);\n this.data.push(void 0);\n }\n\n (_this$index = this.index).splice.apply(_this$index, [isNullish(key) ? this.index.length : key, 0].concat(newIndexes));\n }\n /**\n * Removes (soft remove) data from \"index\" and according to the amount of data.\n *\n * @param {number} key The key as volatile zero-based index at which to begin removing the data.\n * @param {number} [amount=1] Ammount data to remove.\n */\n\n }, {\n key: \"remove\",\n value: function remove(key) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n assert(function () {\n return isUnsignedNumber(key) || isNullish(key);\n }, 'Expecting an unsigned number or null/undefined argument.');\n var removed = this.index.splice(isNullish(key) ? this.index.length - amount : key, amount);\n\n for (var i = 0; i < removed.length; i++) {\n var removedIndex = removed[i];\n\n if (typeof removedIndex === 'number') {\n this.holes.add(removedIndex);\n }\n }\n }\n /**\n * Returns the size of the data which this map holds.\n *\n * @returns {number}\n */\n\n }, {\n key: \"size\",\n value: function size() {\n return this.data.length - this.holes.size;\n }\n /**\n * Returns a new Iterator object that contains the values for each item in the LazyMap object.\n *\n * @returns {Iterator}\n */\n\n }, {\n key: \"values\",\n value: function values() {\n var _this = this;\n\n return arrayFilter(this.data, function (_, index) {\n return !_this.holes.has(index);\n })[Symbol.iterator]();\n }\n /**\n * Returns a new Iterator object that contains an array of `[index, value]` for each item in the LazyMap object.\n *\n * @returns {Iterator}\n */\n\n }, {\n key: \"entries\",\n value: function entries() {\n var validEntries = [];\n\n for (var i = 0; i < this.data.length; i++) {\n var keyIndex = this._getKeyByStorageIndex(i);\n\n if (keyIndex !== -1) {\n validEntries.push([keyIndex, this.data[i]]);\n }\n }\n\n var dataIndex = 0;\n return {\n next: function next() {\n if (dataIndex < validEntries.length) {\n var value = validEntries[dataIndex];\n dataIndex += 1;\n return {\n value: value,\n done: false\n };\n }\n\n return {\n done: true\n };\n }\n };\n }\n /**\n * Clears the map.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.data = [];\n this.index = [];\n this.holes.clear();\n }\n /**\n * Gets storage index calculated from the key associated with the specified value.\n *\n * @param {number} key Volatile zero-based index.\n * @returns {number} Returns index 0-N or -1 if no storage index found.\n */\n\n }, {\n key: \"_getStorageIndexByKey\",\n value: function _getStorageIndexByKey(key) {\n return this.index.length > key ? this.index[key] : -1;\n }\n /**\n * Gets the key associated with the specified value calculated from storage index.\n *\n * @param {number} dataIndex Zero-based storage index.\n * @returns {number} Returns index 0-N or -1 if no key found.\n */\n\n }, {\n key: \"_getKeyByStorageIndex\",\n value: function _getKeyByStorageIndex(dataIndex) {\n return this.index.indexOf(dataIndex);\n }\n /**\n * Makes this object iterable.\n *\n * @returns {Iterator}\n */\n\n }, {\n key: Symbol.iterator,\n value: function value() {\n return this.entries();\n }\n }]);\n\n return LazyFactoryMap;\n}();\n\nexport { LazyFactoryMap as default };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { columnFactory, expandMetaType } from \"../utils.mjs\";\nimport LazyFactoryMap from \"../lazyFactoryMap.mjs\";\n/**\n * List of props which have to be cleared in the column meta-layer. That props have a\n * different meaning when using in column meta.\n *\n * @type {string[]}\n */\n\nvar COLUMNS_PROPS_CONFLICTS = ['data', 'width'];\n/**\n * The column meta object is a root of all settings defined in the column property of the Handsontable\n * settings. Each column in the Handsontable is associated with a unique meta object which is managed by\n * this layer. Adding, removing, or changing property in that object has a direct reflection only for\n * the CellMeta layer. The reflection will be visible only if the property doesn't exist in the lower\n * layers (prototype lookup).\n *\n * +-------------+.\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+.\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+.\n * │\n * │\n * \\│/\n * +-------------+.\n * │ CellMeta │\n * │ (instance) │\n * +-------------+.\n */\n\nvar ColumnMeta = /*#__PURE__*/function () {\n function ColumnMeta(globalMeta) {\n var _this = this;\n\n _classCallCheck(this, ColumnMeta);\n /**\n * Reference to the GlobalMeta layer. While creating new column meta objects, all new objects\n * inherit properties from the GlobalMeta layer.\n *\n * @type {GlobalMeta}\n */\n\n\n this.globalMeta = globalMeta;\n /**\n * The LazyFactoryMap structure, holder for column meta objects where each column meta is\n * stored under the physical column index.\n *\n * @type {LazyFactoryMap}\n */\n\n this.metas = new LazyFactoryMap(function () {\n return _this._createMeta();\n });\n }\n /**\n * Updates column meta object by merging settings with the current state.\n *\n * @param {number} physicalColumn The physical column index which points what column meta object is updated.\n * @param {object} settings An object to merge with.\n */\n\n\n _createClass(ColumnMeta, [{\n key: \"updateMeta\",\n value: function updateMeta(physicalColumn, settings) {\n var meta = this.getMeta(physicalColumn);\n extend(meta, settings);\n extend(meta, expandMetaType(settings.type, meta));\n }\n /**\n * Creates one or more columns at specific position.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is added.\n * @param {number} amount An amount of columns to add.\n */\n\n }, {\n key: \"createColumn\",\n value: function createColumn(physicalColumn, amount) {\n this.metas.insert(physicalColumn, amount);\n }\n /**\n * Removes one or more columns from the collection.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is removed.\n * @param {number} amount An amount columns to remove.\n */\n\n }, {\n key: \"removeColumn\",\n value: function removeColumn(physicalColumn, amount) {\n this.metas.remove(physicalColumn, amount);\n }\n /**\n * Gets settings object for this layer.\n *\n * @param {number} physicalColumn The physical column index.\n * @returns {object}\n */\n\n }, {\n key: \"getMeta\",\n value: function getMeta(physicalColumn) {\n return this.metas.obtain(physicalColumn);\n }\n /**\n * Gets constructor of the column meta object. Necessary for inheritance - creating the next meta layers.\n *\n * @param {number} physicalColumn The physical column index.\n * @returns {Function}\n */\n\n }, {\n key: \"getMetaConstructor\",\n value: function getMetaConstructor(physicalColumn) {\n return this.metas.obtain(physicalColumn).constructor;\n }\n /**\n * Clears all saved column meta objects.\n */\n\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.metas.clear();\n }\n /**\n * Creates and returns new column meta object with properties inherited from the global meta layer.\n *\n * @private\n * @returns {object}\n */\n\n }, {\n key: \"_createMeta\",\n value: function _createMeta() {\n return columnFactory(this.globalMeta.getMetaConstructor(), COLUMNS_PROPS_CONFLICTS).prototype;\n }\n }]);\n\n return ColumnMeta;\n}();\n\nexport { ColumnMeta as default };","import \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { expandMetaType, assert, isUnsignedNumber } from \"../utils.mjs\";\nimport LazyFactoryMap from \"../lazyFactoryMap.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @class CellMeta\n *\n * The cell meta object is a root of all settings defined for the specific cell rendered by the\n * Handsontable. Each cell meta inherits settings from higher layers. When a property doesn't\n * exist in that layer, it is looked up through a prototype to the highest layer. Starting\n * from CellMeta -> ColumnMeta and ending to GlobalMeta, which stores default settings. Adding,\n * removing, or changing property in that object has no direct reflection on any other layers.\n *\n * +-------------+\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+\n * │\n * │\n * \\│/\n * +-------------+\n * │ CellMeta │\n * │ (instance) │\n * +-------------+\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nvar CellMeta = /*#__PURE__*/function () {\n function CellMeta(columnMeta) {\n var _this = this;\n\n _classCallCheck(this, CellMeta);\n /**\n * Reference to the ColumnMeta layer. While creating new cell meta objects, all new objects\n * inherit properties from the ColumnMeta layer.\n *\n * @type {ColumnMeta}\n */\n\n\n this.columnMeta = columnMeta;\n /**\n * Holder for cell meta objects, organized as a grid of LazyFactoryMap of LazyFactoryMaps.\n * The access to the cell meta object is done through access to the row defined by the physical\n * row index and then by accessing the second LazyFactory Map under the physical column index.\n *\n * @type {LazyFactoryMap>}\n */\n\n this.metas = new LazyFactoryMap(function () {\n return _this._createRow();\n });\n }\n /**\n * Updates cell meta object by merging settings with the current state.\n *\n * @param {number} physicalRow The physical row index which points what cell meta object is updated.\n * @param {number} physicalColumn The physical column index which points what cell meta object is updated.\n * @param {object} settings An object to merge with.\n */\n\n\n _createClass(CellMeta, [{\n key: \"updateMeta\",\n value: function updateMeta(physicalRow, physicalColumn, settings) {\n var meta = this.getMeta(physicalRow, physicalColumn);\n extend(meta, settings);\n extend(meta, expandMetaType(settings.type, meta));\n }\n /**\n * Creates one or more rows at specific position.\n *\n * @param {number} physicalRow The physical row index which points from what position the row is added.\n * @param {number} amount An amount of rows to add.\n */\n\n }, {\n key: \"createRow\",\n value: function createRow(physicalRow, amount) {\n this.metas.insert(physicalRow, amount);\n }\n /**\n * Creates one or more columns at specific position.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is added.\n * @param {number} amount An amount of columns to add.\n */\n\n }, {\n key: \"createColumn\",\n value: function createColumn(physicalColumn, amount) {\n for (var i = 0; i < this.metas.size(); i++) {\n this.metas.obtain(i).insert(physicalColumn, amount);\n }\n }\n /**\n * Removes one or more rows from the collection.\n *\n * @param {number} physicalRow The physical row index which points from what position the row is removed.\n * @param {number} amount An amount of rows to remove.\n */\n\n }, {\n key: \"removeRow\",\n value: function removeRow(physicalRow, amount) {\n this.metas.remove(physicalRow, amount);\n }\n /**\n * Removes one or more columns from the collection.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is removed.\n * @param {number} amount An amount of columns to remove.\n */\n\n }, {\n key: \"removeColumn\",\n value: function removeColumn(physicalColumn, amount) {\n for (var i = 0; i < this.metas.size(); i++) {\n this.metas.obtain(i).remove(physicalColumn, amount);\n }\n }\n /**\n * Gets settings object for this layer.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} [key] If the key exists its value will be returned, otherwise the whole cell meta object.\n * @returns {object}\n */\n\n }, {\n key: \"getMeta\",\n value: function getMeta(physicalRow, physicalColumn, key) {\n var cellMeta = this.metas.obtain(physicalRow).obtain(physicalColumn);\n\n if (key === void 0) {\n return cellMeta;\n }\n\n return cellMeta[key];\n }\n /**\n * Sets settings object for this layer defined by \"key\" property.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key The property name to set.\n * @param {*} value Value to save.\n */\n\n }, {\n key: \"setMeta\",\n value: function setMeta(physicalRow, physicalColumn, key, value) {\n var cellMeta = this.metas.obtain(physicalRow).obtain(physicalColumn);\n cellMeta[key] = value;\n }\n /**\n * Removes a property defined by the \"key\" argument from the cell meta object.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key The property name to remove.\n */\n\n }, {\n key: \"removeMeta\",\n value: function removeMeta(physicalRow, physicalColumn, key) {\n var cellMeta = this.metas.obtain(physicalRow).obtain(physicalColumn);\n delete cellMeta[key];\n }\n /**\n * Returns all cell meta objects that were created during the Handsontable operation. As cell meta\n * objects are created lazy, the length of the returned collection depends on how and when the\n * table has asked for access to that meta objects.\n *\n * @returns {object[]}\n */\n\n }, {\n key: \"getMetas\",\n value: function getMetas() {\n var metas = [];\n var rows = Array.from(this.metas.values());\n\n for (var row = 0; row < rows.length; row++) {\n metas.push.apply(metas, _toConsumableArray(rows[row].values()));\n }\n\n return metas;\n }\n /**\n * Returns all cell meta objects that were created during the Handsontable operation but for\n * specyfic row index.\n *\n * @param {number} physicalRow The physical row index.\n * @returns {object[]}\n */\n\n }, {\n key: \"getMetasAtRow\",\n value: function getMetasAtRow(physicalRow) {\n assert(function () {\n return isUnsignedNumber(physicalRow);\n }, 'Expecting an unsigned number.');\n var rowsMeta = new Map(this.metas);\n return rowsMeta.has(physicalRow) ? Array.from(rowsMeta.get(physicalRow).values()) : [];\n }\n /**\n * Clears all saved cell meta objects.\n */\n\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.metas.clear();\n }\n /**\n * Creates and returns new structure for cell meta objects stored in columnar axis.\n *\n * @private\n * @returns {object}\n */\n\n }, {\n key: \"_createRow\",\n value: function _createRow() {\n var _this2 = this;\n\n return new LazyFactoryMap(function (physicalColumn) {\n return _this2._createMeta(physicalColumn);\n });\n }\n /**\n * Creates and returns new cell meta object with properties inherited from the column meta layer.\n *\n * @private\n * @param {number} physicalColumn The physical column index.\n * @returns {object}\n */\n\n }, {\n key: \"_createMeta\",\n value: function _createMeta(physicalColumn) {\n var ColumnMeta = this.columnMeta.getMetaConstructor(physicalColumn);\n return new ColumnMeta();\n }\n }]);\n\n return CellMeta;\n}();\n\nexport { CellMeta as default };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport GlobalMeta from \"./metaLayers/globalMeta.mjs\";\nimport TableMeta from \"./metaLayers/tableMeta.mjs\";\nimport ColumnMeta from \"./metaLayers/columnMeta.mjs\";\nimport CellMeta from \"./metaLayers/cellMeta.mjs\";\n/**\n * With the Meta Manager class, it can be possible to manage with meta objects for different layers in\n * one place. All coordinates used to fetch, updating, removing, or creating rows or columns have to\n * be passed as physical values.\n *\n * The diagram of the meta layers:\n * +-------------+.\n * │ GlobalMeta │\n * │ (prototype) │\n * +-------------+\\\n * │ \\\n * │ \\\n * \\│/ _\\|\n * +-------------+ +-------------+.\n * │ TableMeta │ │ ColumnMeta │\n * │ (instance) │ │ (prototype) │\n * +-------------+ +-------------+.\n * │\n * │\n * \\│/\n * +-------------+.\n * │ CellMeta │\n * │ (instance) │\n * +-------------+.\n *\n * A more detailed description of the specific layers can be found in the \"metaLayers/\" modules description.\n */\n\nvar MetaManager = /*#__PURE__*/function () {\n function MetaManager() {\n var customSettings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, MetaManager);\n /**\n * @type {GlobalMeta}\n */\n\n\n this.globalMeta = new GlobalMeta();\n this.globalMeta.updateMeta(customSettings);\n /**\n * @type {TableMeta}\n */\n\n this.tableMeta = new TableMeta(this.globalMeta);\n /**\n * @type {ColumnMeta}\n */\n\n this.columnMeta = new ColumnMeta(this.globalMeta);\n /**\n * @type {CellMeta}\n */\n\n this.cellMeta = new CellMeta(this.columnMeta);\n }\n /**\n * Gets the global meta object that is a root of all default settings, which are recognizable by Handsontable.\n * Other layers inherites all properties from this. Adding, removing, or changing property in that\n * object has a direct reflection to all layers.\n *\n * @returns {object}\n */\n\n\n _createClass(MetaManager, [{\n key: \"getGlobalMeta\",\n value: function getGlobalMeta() {\n return this.globalMeta.getMeta();\n }\n /**\n * Updates global settings object by merging settings with the current state.\n *\n * @param {object} settings An object to merge with.\n */\n\n }, {\n key: \"updateGlobalMeta\",\n value: function updateGlobalMeta(settings) {\n this.globalMeta.updateMeta(settings);\n }\n /**\n * Gets settings object that was passed in the Handsontable constructor. That layer contains all\n * default settings inherited from the GlobalMeta layer merged with settings passed by the developer.\n * Adding, removing, or changing property in that object has no direct reflection on any other layers.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getTableMeta\",\n value: function getTableMeta() {\n return this.tableMeta.getMeta();\n }\n /**\n * Updates table settings object by merging settings with the current state.\n *\n * @param {object} settings An object to merge with.\n */\n\n }, {\n key: \"updateTableMeta\",\n value: function updateTableMeta(settings) {\n this.tableMeta.updateMeta(settings);\n }\n /**\n * Gets column meta object that is a root of all settings defined in the column property of the Handsontable\n * settings. Each column in the Handsontable is associated with a unique meta object which identified by\n * the physical column index. Adding, removing, or changing property in that object has a direct reflection\n * only for the CellMeta layer. The reflection will be visible only if the property doesn't exist in the lower\n * layers (prototype lookup).\n *\n * @param {number} physicalColumn The physical column index.\n * @returns {object}\n */\n\n }, {\n key: \"getColumnMeta\",\n value: function getColumnMeta(physicalColumn) {\n return this.columnMeta.getMeta(physicalColumn);\n }\n /**\n * Updates column meta object by merging settings with the current state.\n *\n * @param {number} physicalColumn The physical column index which points what column meta object is updated.\n * @param {object} settings An object to merge with.\n */\n\n }, {\n key: \"updateColumnMeta\",\n value: function updateColumnMeta(physicalColumn, settings) {\n this.columnMeta.updateMeta(physicalColumn, settings);\n }\n /**\n * Gets the cell meta object that is a root of all settings defined for the specific cell rendered by\n * the Handsontable. Each cell meta inherits settings from higher layers. When a property doesn't\n * exist in that layer, it is looked up through a prototype to the highest layer. Starting\n * from CellMeta -> ColumnMeta and ending to GlobalMeta, which stores default settings. Adding,\n * removing, or changing property in that object has no direct reflection on any other layers.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} [key] If the key exists its value will be returned, otherwise the whole cell meta object.\n * @returns {object}\n */\n\n }, {\n key: \"getCellMeta\",\n value: function getCellMeta(physicalRow, physicalColumn, key) {\n return this.cellMeta.getMeta(physicalRow, physicalColumn, key);\n }\n /**\n * Sets settings object for cell meta object defined by \"key\" property.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key The property name to set.\n * @param {*} value Value to save.\n */\n\n }, {\n key: \"setCellMeta\",\n value: function setCellMeta(physicalRow, physicalColumn, key, value) {\n this.cellMeta.setMeta(physicalRow, physicalColumn, key, value);\n }\n /**\n * Updates cell meta object by merging settings with the current state.\n *\n * @param {number} physicalRow The physical row index which points what cell meta object is updated.\n * @param {number} physicalColumn The physical column index which points what cell meta object is updated.\n * @param {object} settings An object to merge with.\n */\n\n }, {\n key: \"updateCellMeta\",\n value: function updateCellMeta(physicalRow, physicalColumn, settings) {\n this.cellMeta.updateMeta(physicalRow, physicalColumn, settings);\n }\n /**\n * Removes a property defined by the \"key\" argument from the cell meta object.\n *\n * @param {number} physicalRow The physical row index.\n * @param {number} physicalColumn The physical column index.\n * @param {string} key The property name to remove.\n */\n\n }, {\n key: \"removeCellMeta\",\n value: function removeCellMeta(physicalRow, physicalColumn, key) {\n this.cellMeta.removeMeta(physicalRow, physicalColumn, key);\n }\n /**\n * Returns all cell meta objects that were created during the Handsontable operation. As cell meta\n * objects are created lazy, the length of the returned collection depends on how and when the\n * table has asked for access to that meta objects.\n *\n * @returns {object[]}\n */\n\n }, {\n key: \"getCellsMeta\",\n value: function getCellsMeta() {\n return this.cellMeta.getMetas();\n }\n /**\n * Returns all cell meta objects that were created during the Handsontable operation but for\n * specyfic row index.\n *\n * @param {number} physicalRow The physical row index.\n * @returns {object[]}\n */\n\n }, {\n key: \"getCellsMetaAtRow\",\n value: function getCellsMetaAtRow(physicalRow) {\n return this.cellMeta.getMetasAtRow(physicalRow);\n }\n /**\n * Creates one or more rows at specific position.\n *\n * @param {number} physicalRow The physical row index which points from what position the row is added.\n * @param {number} [amount=1] An amount of rows to add.\n */\n\n }, {\n key: \"createRow\",\n value: function createRow(physicalRow) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n this.cellMeta.createRow(physicalRow, amount);\n }\n /**\n * Removes one or more rows from the collection.\n *\n * @param {number} physicalRow The physical row index which points from what position the row is removed.\n * @param {number} [amount=1] An amount rows to remove.\n */\n\n }, {\n key: \"removeRow\",\n value: function removeRow(physicalRow) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n this.cellMeta.removeRow(physicalRow, amount);\n }\n /**\n * Creates one or more columns at specific position.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is added.\n * @param {number} [amount=1] An amount of columns to add.\n */\n\n }, {\n key: \"createColumn\",\n value: function createColumn(physicalColumn) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n this.cellMeta.createColumn(physicalColumn, amount);\n this.columnMeta.createColumn(physicalColumn, amount);\n }\n /**\n * Removes one or more columns from the collection.\n *\n * @param {number} physicalColumn The physical column index which points from what position the column is removed.\n * @param {number} [amount=1] An amount of columns to remove.\n */\n\n }, {\n key: \"removeColumn\",\n value: function removeColumn(physicalColumn) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n this.cellMeta.removeColumn(physicalColumn, amount);\n this.columnMeta.removeColumn(physicalColumn, amount);\n }\n /**\n * Clears all saved cell meta objects. It keeps column meta, table meta, and global meta intact.\n */\n\n }, {\n key: \"clearCellsCache\",\n value: function clearCellsCache() {\n this.cellMeta.clearCache();\n }\n /**\n * Clears all saved cell and columns meta objects.\n */\n\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.cellMeta.clearCache();\n this.columnMeta.clearCache();\n }\n }]);\n\n return MetaManager;\n}();\n\nexport { MetaManager as default };","import \"core-js/modules/es.array.fill.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.string.starts-with.js\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * SheetClip - Spreadsheet Clipboard Parser.\n * version 0.2\n *\n * This tiny library transforms JavaScript arrays to strings that are pasteable by LibreOffice, OpenOffice,\n * Google Docs and Microsoft Excel.\n *\n * Copyright 2012, Marcin Warpechowski\n * Licensed under the MIT license.\n * http://github.com/warpech/sheetclip/\n */\n\nvar regUniversalNewLine = /^(\\r\\n|\\n\\r|\\r|\\n)/;\nvar regNextCellNoQuotes = /^[^\\t\\r\\n]+/;\nvar regNextEmptyCell = /^\\t/;\n/**\n * Decode spreadsheet string into array.\n *\n * @param {string} str The string to parse.\n * @returns {Array}\n */\n\nexport function parse(str) {\n var arr = [['']];\n\n if (str.length === 0) {\n return arr;\n }\n\n var column = 0;\n var row = 0;\n var lastLength;\n\n while (str.length > 0) {\n if (lastLength === str.length) {\n // In the case If in last cycle we didn't match anything, we have to leave the infinite loop\n break;\n }\n\n lastLength = str.length;\n\n if (str.match(regNextEmptyCell)) {\n str = str.replace(regNextEmptyCell, '');\n column += 1;\n arr[row][column] = '';\n } else if (str.match(regUniversalNewLine)) {\n str = str.replace(regUniversalNewLine, '');\n column = 0;\n row += 1;\n arr[row] = [''];\n } else {\n var nextCell = '';\n\n if (str.startsWith('\"')) {\n var quoteNo = 0;\n var isStillCell = true;\n\n while (isStillCell) {\n var nextChar = str.slice(0, 1);\n\n if (nextChar === '\"') {\n quoteNo += 1;\n }\n\n nextCell += nextChar;\n str = str.slice(1);\n\n if (str.length === 0 || str.match(/^[\\t\\r\\n]/) && quoteNo % 2 === 0) {\n isStillCell = false;\n }\n }\n\n nextCell = nextCell.replace(/^\"/, '').replace(/\"$/, '').replace(/[\"]*/g, function (match) {\n return new Array(Math.floor(match.length / 2)).fill('\"').join('');\n });\n } else {\n var matchedText = str.match(regNextCellNoQuotes);\n nextCell = matchedText ? matchedText[0] : '';\n str = str.slice(nextCell.length);\n }\n\n arr[row][column] = nextCell;\n }\n }\n\n return arr;\n}\n/**\n * Encode array into valid spreadsheet string.\n *\n * @param {Array} arr An array of arrays to stringify.\n * @returns {string}\n */\n\nexport function stringify(arr) {\n var r;\n var rLen;\n var c;\n var cLen;\n var str = '';\n var val;\n\n for (r = 0, rLen = arr.length; r < rLen; r += 1) {\n cLen = arr[r].length;\n\n for (c = 0; c < cLen; c += 1) {\n if (c > 0) {\n str += '\\t';\n }\n\n val = arr[r][c];\n\n if (typeof val === 'string') {\n if (val.indexOf('\\n') > -1) {\n str += \"\\\"\".concat(val.replace(/\"/g, '\"\"'), \"\\\"\");\n } else {\n str += val;\n }\n } else if (val === null || val === void 0) {\n // void 0 resolves to undefined\n str += '';\n } else {\n str += val;\n }\n }\n\n if (r !== rLen - 1) {\n str += '\\n';\n }\n }\n\n return str;\n}","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { stringify } from \"./3rdparty/SheetClip/index.mjs\";\nimport { cellMethodLookupFactory, countFirstRowKeys as _countFirstRowKeys } from \"./helpers/data.mjs\";\nimport { createObjectPropListener, deepClone, deepExtend, deepObjectSize, duckSchema, hasOwnProperty, isObject, objectEach } from \"./helpers/object.mjs\";\nimport { extendArray, to2dArray } from \"./helpers/array.mjs\";\nimport { rangeEach } from \"./helpers/number.mjs\";\nimport { isDefined } from \"./helpers/mixed.mjs\";\nvar copyableLookup = cellMethodLookupFactory('copyable', false);\n/**\n * Utility class that gets and saves data from/to the data source using mapping of columns numbers to object property names.\n *\n * @todo Refactor arguments of methods getRange, getText to be numbers (not objects).\n * @todo Remove priv, GridSettings from object constructor.\n *\n * @util\n * @class DataMap\n * @private\n */\n\nvar DataMap = /*#__PURE__*/function () {\n /**\n * @param {object} instance Instance of Handsontable.\n * @param {Array} data Array of arrays or array of objects containing data.\n * @param {TableMeta} tableMeta The table meta instance.\n */\n function DataMap(instance, data, tableMeta) {\n _classCallCheck(this, DataMap);\n /**\n * Instance of {@link Handsontable}.\n *\n * @private\n * @type {Handsontable}\n */\n\n\n this.instance = instance;\n /**\n * Instance of {@link TableMeta}.\n *\n * @private\n * @type {TableMeta}\n */\n\n this.tableMeta = tableMeta;\n /**\n * Reference to the original dataset.\n *\n * @type {*}\n */\n\n this.dataSource = data;\n /**\n * Generated schema based on the first row from the source data.\n *\n * @type {object}\n */\n\n this.duckSchema = this.dataSource && this.dataSource[0] ? duckSchema(this.dataSource[0]) : {};\n /**\n * Cached array of properties to columns.\n *\n * @type {Array}\n */\n\n this.colToPropCache = void 0;\n /**\n * Cached map of properties to columns.\n *\n * @type {Map}\n */\n\n this.propToColCache = void 0;\n this.createMap();\n }\n /**\n * Generates cache for property to and from column addressation.\n */\n\n\n _createClass(DataMap, [{\n key: \"createMap\",\n value: function createMap() {\n var schema = this.getSchema();\n\n if (typeof schema === 'undefined') {\n throw new Error('trying to create `columns` definition but you didn\\'t provide `schema` nor `data`');\n }\n\n var columns = this.tableMeta.columns;\n var i;\n this.colToPropCache = [];\n this.propToColCache = new Map();\n\n if (columns) {\n var columnsLen = 0;\n var filteredIndex = 0;\n var columnsAsFunc = false;\n\n if (typeof columns === 'function') {\n var schemaLen = deepObjectSize(schema);\n columnsLen = schemaLen > 0 ? schemaLen : this.countFirstRowKeys();\n columnsAsFunc = true;\n } else {\n var maxCols = this.tableMeta.maxCols;\n columnsLen = Math.min(maxCols, columns.length);\n }\n\n for (i = 0; i < columnsLen; i++) {\n var column = columnsAsFunc ? columns(i) : columns[i];\n\n if (isObject(column)) {\n if (typeof column.data !== 'undefined') {\n var index = columnsAsFunc ? filteredIndex : i;\n this.colToPropCache[index] = column.data;\n this.propToColCache.set(column.data, index);\n }\n\n filteredIndex += 1;\n }\n }\n } else {\n this.recursiveDuckColumns(schema);\n }\n }\n /**\n * Get the amount of physical columns in the first data row.\n *\n * @returns {number} Amount of physical columns in the first data row.\n */\n\n }, {\n key: \"countFirstRowKeys\",\n value: function countFirstRowKeys() {\n return _countFirstRowKeys(this.dataSource);\n }\n /**\n * Generates columns' translation cache.\n *\n * @param {object} schema An object to generate schema from.\n * @param {number} lastCol The column index.\n * @param {number} parent The property cache for recursive calls.\n * @returns {number}\n */\n\n }, {\n key: \"recursiveDuckColumns\",\n value: function recursiveDuckColumns(schema, lastCol, parent) {\n var _this = this;\n\n var lastColumn = lastCol;\n var propertyParent = parent;\n var prop;\n\n if (typeof lastColumn === 'undefined') {\n lastColumn = 0;\n propertyParent = '';\n }\n\n if (_typeof(schema) === 'object' && !Array.isArray(schema)) {\n objectEach(schema, function (value, key) {\n if (value === null) {\n prop = propertyParent + key;\n\n _this.colToPropCache.push(prop);\n\n _this.propToColCache.set(prop, lastColumn);\n\n lastColumn += 1;\n } else {\n lastColumn = _this.recursiveDuckColumns(value, lastColumn, \"\".concat(key, \".\"));\n }\n });\n }\n\n return lastColumn;\n }\n /**\n * Returns property name that corresponds with the given column index.\n *\n * @param {string|number} column Visual column index or another passed argument.\n * @returns {string|number} Column property, physical column index or passed argument.\n */\n\n }, {\n key: \"colToProp\",\n value: function colToProp(column) {\n // TODO: Should it work? Please, look at the test:\n // \"it should return the provided property name, when the user passes a property name as a column number\".\n if (Number.isInteger(column) === false) {\n return column;\n }\n\n var physicalColumn = this.instance.toPhysicalColumn(column); // Out of range, not visible column index.\n\n if (physicalColumn === null) {\n return column;\n } // Cached property.\n\n\n if (this.colToPropCache && isDefined(this.colToPropCache[physicalColumn])) {\n return this.colToPropCache[physicalColumn];\n }\n\n return physicalColumn;\n }\n /**\n * Translates property into visual column index.\n *\n * @param {string|number} prop Column property which may be also a physical column index.\n * @returns {string|number} Visual column index or passed argument.\n */\n\n }, {\n key: \"propToCol\",\n value: function propToCol(prop) {\n var cachedPhysicalIndex = this.propToColCache.get(prop);\n\n if (isDefined(cachedPhysicalIndex)) {\n return this.instance.toVisualColumn(cachedPhysicalIndex);\n } // Property may be a physical column index.\n\n\n var visualColumn = this.instance.toVisualColumn(prop);\n\n if (visualColumn === null) {\n return prop;\n }\n\n return visualColumn;\n }\n /**\n * Returns data's schema.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getSchema\",\n value: function getSchema() {\n var schema = this.tableMeta.dataSchema;\n\n if (schema) {\n if (typeof schema === 'function') {\n return schema();\n }\n\n return schema;\n }\n\n return this.duckSchema;\n }\n /**\n * Creates row at the bottom of the data array.\n *\n * @param {number} [index] Physical index of the row before which the new row will be inserted.\n * @param {number} [amount=1] An amount of rows to add.\n * @param {string} [source] Source of method call.\n * @fires Hooks#afterCreateRow\n * @returns {number} Returns number of created rows.\n */\n\n }, {\n key: \"createRow\",\n value: function createRow(index) {\n var _this2 = this;\n\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var source = arguments.length > 2 ? arguments[2] : undefined;\n var sourceRowsCount = this.instance.countSourceRows();\n var physicalRowIndex = sourceRowsCount;\n var numberOfCreatedRows = 0;\n var rowIndex = index;\n\n if (typeof rowIndex !== 'number' || rowIndex >= sourceRowsCount) {\n rowIndex = sourceRowsCount;\n }\n\n if (rowIndex < this.instance.countRows()) {\n physicalRowIndex = this.instance.toPhysicalRow(rowIndex);\n }\n\n var continueProcess = this.instance.runHooks('beforeCreateRow', rowIndex, amount, source);\n\n if (continueProcess === false || physicalRowIndex === null) {\n return 0;\n }\n\n var maxRows = this.tableMeta.maxRows;\n var columnCount = this.instance.countCols();\n var rowsToAdd = [];\n\n var _loop = function _loop() {\n var row = null;\n\n if (_this2.instance.dataType === 'array') {\n if (_this2.tableMeta.dataSchema) {\n // Clone template array\n row = deepClone(_this2.getSchema());\n } else {\n row = [];\n /* eslint-disable no-loop-func */\n\n rangeEach(columnCount - 1, function () {\n return row.push(null);\n });\n }\n } else if (_this2.instance.dataType === 'function') {\n row = _this2.tableMeta.dataSchema(rowIndex + numberOfCreatedRows);\n } else {\n row = {};\n deepExtend(row, _this2.getSchema());\n }\n\n rowsToAdd.push(row);\n numberOfCreatedRows += 1;\n };\n\n while (numberOfCreatedRows < amount && sourceRowsCount + numberOfCreatedRows < maxRows) {\n _loop();\n }\n\n this.instance.rowIndexMapper.insertIndexes(rowIndex, numberOfCreatedRows);\n this.spliceData.apply(this, [physicalRowIndex, 0].concat(rowsToAdd));\n this.instance.runHooks('afterCreateRow', rowIndex, numberOfCreatedRows, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n return numberOfCreatedRows;\n }\n /**\n * Creates column at the right of the data array.\n *\n * @param {number} [index] Visual index of the column before which the new column will be inserted.\n * @param {number} [amount=1] An amount of columns to add.\n * @param {string} [source] Source of method call.\n * @fires Hooks#afterCreateCol\n * @returns {number} Returns number of created columns.\n */\n\n }, {\n key: \"createCol\",\n value: function createCol(index) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var source = arguments.length > 2 ? arguments[2] : undefined;\n\n if (!this.instance.isColumnModificationAllowed()) {\n 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.');\n }\n\n var dataSource = this.dataSource;\n var maxCols = this.tableMeta.maxCols;\n var columnIndex = index;\n\n if (typeof columnIndex !== 'number' || columnIndex >= this.instance.countSourceCols()) {\n columnIndex = this.instance.countSourceCols();\n }\n\n var continueProcess = this.instance.runHooks('beforeCreateCol', columnIndex, amount, source);\n\n if (continueProcess === false) {\n return 0;\n }\n\n var physicalColumnIndex = this.instance.countSourceCols();\n\n if (columnIndex < this.instance.countCols()) {\n physicalColumnIndex = this.instance.toPhysicalColumn(columnIndex);\n }\n\n var numberOfSourceRows = this.instance.countSourceRows();\n var nrOfColumns = this.instance.countCols();\n var numberOfCreatedCols = 0;\n var currentIndex = physicalColumnIndex;\n\n while (numberOfCreatedCols < amount && nrOfColumns < maxCols) {\n if (typeof columnIndex !== 'number' || columnIndex >= nrOfColumns) {\n if (numberOfSourceRows > 0) {\n for (var row = 0; row < numberOfSourceRows; row += 1) {\n if (typeof dataSource[row] === 'undefined') {\n dataSource[row] = [];\n }\n\n dataSource[row].push(null);\n }\n } else {\n dataSource.push([null]);\n }\n } else {\n for (var _row = 0; _row < numberOfSourceRows; _row++) {\n dataSource[_row].splice(currentIndex, 0, null);\n }\n }\n\n numberOfCreatedCols += 1;\n currentIndex += 1;\n nrOfColumns += 1;\n }\n\n this.instance.columnIndexMapper.insertIndexes(columnIndex, numberOfCreatedCols);\n this.instance.runHooks('afterCreateCol', columnIndex, numberOfCreatedCols, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n return numberOfCreatedCols;\n }\n /**\n * Removes row from the data array.\n *\n * @fires Hooks#beforeRemoveRow\n * @fires Hooks#afterRemoveRow\n * @param {number} [index] Visual index of the row to be removed. If not provided, the last row will be removed.\n * @param {number} [amount=1] Amount of the rows to be removed. If not provided, one row will be removed.\n * @param {string} [source] Source of method call.\n * @returns {boolean} Returns `false` when action was cancelled, otherwise `true`.\n */\n\n }, {\n key: \"removeRow\",\n value: function removeRow(index) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var source = arguments.length > 2 ? arguments[2] : undefined;\n var rowIndex = Number.isInteger(index) ? index : -amount; // -amount = taking indexes from the end.\n\n var removedPhysicalIndexes = this.visualRowsToPhysical(rowIndex, amount);\n var sourceRowsLength = this.instance.countSourceRows();\n rowIndex = (sourceRowsLength + rowIndex) % sourceRowsLength; // It handle also callback from the `NestedRows` plugin. Removing parent node has effect in removing children nodes.\n\n var actionWasNotCancelled = this.instance.runHooks('beforeRemoveRow', rowIndex, removedPhysicalIndexes.length, removedPhysicalIndexes, source);\n\n if (actionWasNotCancelled === false) {\n return false;\n }\n\n var data = this.dataSource; // List of removed indexes might be changed in the `beforeRemoveRow` hook. There may be new values.\n\n var numberOfRemovedIndexes = removedPhysicalIndexes.length;\n var newData = this.filterData(rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes);\n\n if (newData) {\n data.length = 0;\n Array.prototype.push.apply(data, newData);\n } // TODO: Function `removeRow` should validate fully, probably above.\n\n\n if (rowIndex < this.instance.countRows()) {\n this.instance.rowIndexMapper.removeIndexes(removedPhysicalIndexes);\n var customDefinedColumns = isDefined(this.tableMeta.columns) || isDefined(this.tableMeta.dataSchema); // All rows have been removed. There shouldn't be any columns.\n\n if (this.instance.rowIndexMapper.getNotTrimmedIndexesLength() === 0 && customDefinedColumns === false) {\n this.instance.columnIndexMapper.setIndexesSequence([]);\n }\n }\n\n this.instance.runHooks('afterRemoveRow', rowIndex, numberOfRemovedIndexes, removedPhysicalIndexes, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n return true;\n }\n /**\n * Removes column from the data array.\n *\n * @fires Hooks#beforeRemoveCol\n * @fires Hooks#afterRemoveCol\n * @param {number} [index] Visual index of the column to be removed. If not provided, the last column will be removed.\n * @param {number} [amount=1] Amount of the columns to be removed. If not provided, one column will be removed.\n * @param {string} [source] Source of method call.\n * @returns {boolean} Returns `false` when action was cancelled, otherwise `true`.\n */\n\n }, {\n key: \"removeCol\",\n value: function removeCol(index) {\n var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var source = arguments.length > 2 ? arguments[2] : undefined;\n\n if (this.instance.dataType === 'object' || this.tableMeta.columns) {\n throw new Error('cannot remove column with object data source or columns option specified');\n }\n\n var columnIndex = typeof index !== 'number' ? -amount : index;\n columnIndex = (this.instance.countCols() + columnIndex) % this.instance.countCols();\n var logicColumns = this.visualColumnsToPhysical(columnIndex, amount);\n var descendingLogicColumns = logicColumns.slice(0).sort(function (a, b) {\n return b - a;\n });\n var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', columnIndex, amount, logicColumns, source);\n\n if (actionWasNotCancelled === false) {\n return false;\n }\n\n var isTableUniform = true;\n var removedColumnsCount = descendingLogicColumns.length;\n var data = this.dataSource;\n\n for (var c = 0; c < removedColumnsCount; c++) {\n if (isTableUniform && logicColumns[0] !== logicColumns[c] - c) {\n isTableUniform = false;\n }\n }\n\n if (isTableUniform) {\n for (var r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {\n data[r].splice(logicColumns[0], amount);\n }\n } else {\n for (var _r = 0, _rlen = this.instance.countSourceRows(); _r < _rlen; _r++) {\n for (var _c = 0; _c < removedColumnsCount; _c++) {\n data[_r].splice(descendingLogicColumns[_c], 1);\n }\n }\n } // TODO: Function `removeCol` should validate fully, probably above.\n\n\n if (columnIndex < this.instance.countCols()) {\n this.instance.columnIndexMapper.removeIndexes(logicColumns); // All columns have been removed. There shouldn't be any rows.\n\n if (this.instance.columnIndexMapper.getNotTrimmedIndexesLength() === 0) {\n this.instance.rowIndexMapper.setIndexesSequence([]);\n }\n }\n\n this.instance.runHooks('afterRemoveCol', columnIndex, amount, logicColumns, source);\n this.instance.forceFullRender = true; // used when data was changed\n\n return true;\n }\n /**\n * Add/Removes data from the column.\n *\n * @param {number} col Physical index of column in which do you want to do splice.\n * @param {number} index Index at which to start changing the array. If negative, will begin that many elements from the end.\n * @param {number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.\n * @param {Array} [elements] The new columns to add.\n * @returns {Array} Returns removed portion of columns.\n */\n\n }, {\n key: \"spliceCol\",\n value: function spliceCol(col, index, amount) {\n var colData = this.instance.getDataAtCol(col);\n var removed = colData.slice(index, index + amount);\n var after = colData.slice(index + amount);\n\n for (var _len = arguments.length, elements = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n elements[_key - 3] = arguments[_key];\n }\n\n extendArray(elements, after);\n var i = 0;\n\n while (i < amount) {\n elements.push(null); // add null in place of removed elements\n\n i += 1;\n }\n\n to2dArray(elements);\n this.instance.populateFromArray(index, col, elements, null, null, 'spliceCol');\n return removed;\n }\n /**\n * Add/Removes data from the row.\n *\n * @param {number} row Physical index of row in which do you want to do splice.\n * @param {number} index Index at which to start changing the array. If negative, will begin that many elements from the end.\n * @param {number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.\n * @param {Array} [elements] The new rows to add.\n * @returns {Array} Returns removed portion of rows.\n */\n\n }, {\n key: \"spliceRow\",\n value: function spliceRow(row, index, amount) {\n var rowData = this.instance.getSourceDataAtRow(row);\n var removed = rowData.slice(index, index + amount);\n var after = rowData.slice(index + amount);\n\n for (var _len2 = arguments.length, elements = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {\n elements[_key2 - 3] = arguments[_key2];\n }\n\n extendArray(elements, after);\n var i = 0;\n\n while (i < amount) {\n elements.push(null); // add null in place of removed elements\n\n i += 1;\n }\n\n this.instance.populateFromArray(row, index, [elements], null, null, 'spliceRow');\n return removed;\n }\n /**\n * Add/remove row(s) to/from the data source.\n *\n * @param {number} index Physical index of the element to add/remove.\n * @param {number} amount Number of rows to add/remove.\n * @param {...object} elements Row elements to be added.\n */\n\n }, {\n key: \"spliceData\",\n value: function spliceData(index, amount) {\n for (var _len3 = arguments.length, elements = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n elements[_key3 - 2] = arguments[_key3];\n }\n\n var continueSplicing = this.instance.runHooks('beforeDataSplice', index, amount, elements);\n\n if (continueSplicing !== false) {\n var _this$dataSource;\n\n (_this$dataSource = this.dataSource).splice.apply(_this$dataSource, [index, amount].concat(elements));\n }\n }\n /**\n * Filter unwanted data elements from the data source.\n *\n * @param {number} index Visual index of the element to remove.\n * @param {number} amount Number of rows to add/remove.\n * @param {number} physicalRows Physical row indexes.\n * @returns {Array}\n */\n\n }, {\n key: \"filterData\",\n value: function filterData(index, amount, physicalRows) {\n var continueSplicing = this.instance.runHooks('beforeDataFilter', index, amount, physicalRows);\n\n if (continueSplicing !== false) {\n var newData = this.dataSource.filter(function (row, rowIndex) {\n return physicalRows.indexOf(rowIndex) === -1;\n });\n return newData;\n }\n }\n /**\n * Returns single value from the data array.\n *\n * @param {number} row Visual row index.\n * @param {number} prop The column property.\n * @returns {*}\n */\n\n }, {\n key: \"get\",\n value: function get(row, prop) {\n var physicalRow = this.instance.toPhysicalRow(row);\n var dataRow = this.dataSource[physicalRow]; // TODO: To remove, use 'modifyData' hook instead (see below)\n\n var modifiedRowData = this.instance.runHooks('modifyRowData', physicalRow);\n dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow; //\n\n var value = null; // try to get value under property `prop` (includes dot)\n\n if (dataRow && dataRow.hasOwnProperty && hasOwnProperty(dataRow, prop)) {\n value = dataRow[prop];\n } else if (typeof prop === 'string' && prop.indexOf('.') > -1) {\n var sliced = prop.split('.');\n var out = dataRow;\n\n if (!out) {\n return null;\n }\n\n for (var i = 0, ilen = sliced.length; i < ilen; i++) {\n out = out[sliced[i]];\n\n if (typeof out === 'undefined') {\n return null;\n }\n }\n\n value = out;\n } else if (typeof prop === 'function') {\n /**\n * Allows for interacting with complex structures, for example\n * d3/jQuery getter/setter properties:\n *\n * {columns: [{\n * data: function(row, value){\n * if(arguments.length === 1){\n * return row.property();\n * }\n * row.property(value);\n * }\n * }]}.\n */\n value = prop(this.dataSource.slice(physicalRow, physicalRow + 1)[0]);\n }\n\n if (this.instance.hasHook('modifyData')) {\n var valueHolder = createObjectPropListener(value);\n this.instance.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'get');\n\n if (valueHolder.isTouched()) {\n value = valueHolder.value;\n }\n }\n\n return value;\n }\n /**\n * Returns single value from the data array (intended for clipboard copy to an external application).\n *\n * @param {number} row Physical row index.\n * @param {number} prop The column property.\n * @returns {string}\n */\n\n }, {\n key: \"getCopyable\",\n value: function getCopyable(row, prop) {\n if (copyableLookup.call(this.instance, row, this.propToCol(prop))) {\n return this.get(row, prop);\n }\n\n return '';\n }\n /**\n * Saves single value to the data array.\n *\n * @param {number} row Visual row index.\n * @param {number} prop The column property.\n * @param {string} value The value to set.\n */\n\n }, {\n key: \"set\",\n value: function set(row, prop, value) {\n var physicalRow = this.instance.toPhysicalRow(row);\n var newValue = value;\n var dataRow = this.dataSource[physicalRow]; // TODO: To remove, use 'modifyData' hook instead (see below)\n\n var modifiedRowData = this.instance.runHooks('modifyRowData', physicalRow);\n dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow; //\n\n if (this.instance.hasHook('modifyData')) {\n var valueHolder = createObjectPropListener(newValue);\n this.instance.runHooks('modifyData', physicalRow, this.propToCol(prop), valueHolder, 'set');\n\n if (valueHolder.isTouched()) {\n newValue = valueHolder.value;\n }\n } // try to set value under property `prop` (includes dot)\n\n\n if (dataRow && dataRow.hasOwnProperty && hasOwnProperty(dataRow, prop)) {\n dataRow[prop] = newValue;\n } else if (typeof prop === 'string' && prop.indexOf('.') > -1) {\n var sliced = prop.split('.');\n var out = dataRow;\n var i = 0;\n var ilen;\n\n for (i = 0, ilen = sliced.length - 1; i < ilen; i++) {\n if (typeof out[sliced[i]] === 'undefined') {\n out[sliced[i]] = {};\n }\n\n out = out[sliced[i]];\n }\n\n out[sliced[i]] = newValue;\n } else if (typeof prop === 'function') {\n /* see the `function` handler in `get` */\n prop(this.dataSource.slice(physicalRow, physicalRow + 1)[0], newValue);\n } else {\n dataRow[prop] = newValue;\n }\n }\n /**\n * This ridiculous piece of code maps rows Id that are present in table data to those displayed for user.\n * The trick is, the physical row id (stored in settings.data) is not necessary the same\n * as the visual (displayed) row id (e.g. When sorting is applied).\n *\n * @param {number} index Visual row index.\n * @param {number} amount An amount of rows to translate.\n * @returns {number}\n */\n\n }, {\n key: \"visualRowsToPhysical\",\n value: function visualRowsToPhysical(index, amount) {\n var totalRows = this.instance.countSourceRows();\n var logicRows = [];\n var physicRow = (totalRows + index) % totalRows;\n var rowsToRemove = amount;\n var row;\n\n while (physicRow < totalRows && rowsToRemove) {\n row = this.instance.toPhysicalRow(physicRow);\n logicRows.push(row);\n rowsToRemove -= 1;\n physicRow += 1;\n }\n\n return logicRows;\n }\n /**\n *\n * @param {number} index Visual column index.\n * @param {number} amount An amount of rows to translate.\n * @returns {Array}\n */\n\n }, {\n key: \"visualColumnsToPhysical\",\n value: function visualColumnsToPhysical(index, amount) {\n var totalCols = this.instance.countCols();\n var visualCols = [];\n var physicalCol = (totalCols + index) % totalCols;\n var colsToRemove = amount;\n\n while (physicalCol < totalCols && colsToRemove) {\n var col = this.instance.toPhysicalColumn(physicalCol);\n visualCols.push(col);\n colsToRemove -= 1;\n physicalCol += 1;\n }\n\n return visualCols;\n }\n /**\n * Clears the data array.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n for (var r = 0; r < this.instance.countSourceRows(); r++) {\n for (var c = 0; c < this.instance.countCols(); c++) {\n this.set(r, this.colToProp(c), '');\n }\n }\n }\n /**\n * Get data length.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLength\",\n value: function getLength() {\n var maxRowsFromSettings = this.tableMeta.maxRows;\n var maxRows;\n\n if (maxRowsFromSettings < 0 || maxRowsFromSettings === 0) {\n maxRows = 0;\n } else {\n maxRows = maxRowsFromSettings || Infinity;\n }\n\n var length = this.instance.rowIndexMapper.getNotTrimmedIndexesLength();\n return Math.min(length, maxRows);\n }\n /**\n * Returns the data array.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getAll\",\n value: function getAll() {\n var start = {\n row: 0,\n col: 0\n };\n var end = {\n row: Math.max(this.instance.countRows() - 1, 0),\n col: Math.max(this.instance.countCols() - 1, 0)\n };\n\n if (start.row - end.row === 0 && !this.instance.countSourceRows()) {\n return [];\n }\n\n return this.getRange(start, end, DataMap.DESTINATION_RENDERER);\n }\n /**\n * Count the number of columns cached in the `colToProp` cache.\n *\n * @returns {number} Amount of cached columns.\n */\n\n }, {\n key: \"countCachedColumns\",\n value: function countCachedColumns() {\n return this.colToPropCache.length;\n }\n /**\n * Returns data range as array.\n *\n * @param {object} [start] Start selection position. Visual indexes.\n * @param {object} [end] End selection position. Visual indexes.\n * @param {number} destination Destination of datamap.get.\n * @returns {Array}\n */\n\n }, {\n key: \"getRange\",\n value: function getRange(start, end, destination) {\n var output = [];\n var r;\n var c;\n var row;\n var maxRows = this.tableMeta.maxRows;\n var maxCols = this.tableMeta.maxCols;\n\n if (maxRows === 0 || maxCols === 0) {\n return [];\n }\n\n var getFn = destination === DataMap.DESTINATION_CLIPBOARD_GENERATOR ? this.getCopyable : this.get;\n var rlen = Math.min(Math.max(maxRows - 1, 0), Math.max(start.row, end.row));\n var clen = Math.min(Math.max(maxCols - 1, 0), Math.max(start.col, end.col));\n\n for (r = Math.min(start.row, end.row); r <= rlen; r++) {\n row = []; // We just store indexes for rows without headers.\n\n var physicalRow = r >= 0 ? this.instance.toPhysicalRow(r) : r;\n\n for (c = Math.min(start.col, end.col); c <= clen; c++) {\n if (physicalRow === null) {\n break;\n }\n\n row.push(getFn.call(this, r, this.colToProp(c)));\n }\n\n if (physicalRow !== null) {\n output.push(row);\n }\n }\n\n return output;\n }\n /**\n * Return data as text (tab separated columns).\n *\n * @param {object} [start] Start selection position. Visual indexes.\n * @param {object} [end] End selection position. Visual indexes.\n * @returns {string}\n */\n\n }, {\n key: \"getText\",\n value: function getText(start, end) {\n return stringify(this.getRange(start, end, DataMap.DESTINATION_RENDERER));\n }\n /**\n * Return data as copyable text (tab separated columns intended for clipboard copy to an external application).\n *\n * @param {object} [start] Start selection position. Visual indexes.\n * @param {object} [end] End selection position. Visual indexes.\n * @returns {string}\n */\n\n }, {\n key: \"getCopyableText\",\n value: function getCopyableText(start, end) {\n return stringify(this.getRange(start, end, DataMap.DESTINATION_CLIPBOARD_GENERATOR));\n }\n /**\n * Destroy instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.instance = null;\n this.tableMeta = null;\n this.dataSource = null;\n this.duckSchema = null;\n this.colToPropCache.length = 0;\n this.propToColCache.clear();\n this.propToColCache = void 0;\n }\n }], [{\n key: \"DESTINATION_RENDERER\",\n get:\n /**\n * @type {number}\n */\n function get() {\n return 1;\n }\n /**\n * @type {number}\n */\n\n }, {\n key: \"DESTINATION_CLIPBOARD_GENERATOR\",\n get: function get() {\n return 2;\n }\n }]);\n\n return DataMap;\n}();\n\nexport default DataMap;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.reverse.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.immediate.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nimport { addClass, empty, removeClass } from \"./helpers/dom/element.mjs\";\nimport { isFunction } from \"./helpers/function.mjs\";\nimport { isDefined, isUndefined, isRegExp, _injectProductInfo, isEmpty } from \"./helpers/mixed.mjs\";\nimport { isMobileBrowser } from \"./helpers/browser.mjs\";\nimport EditorManager from \"./editorManager.mjs\";\nimport EventManager from \"./eventManager.mjs\";\nimport { deepClone, duckSchema, isObjectEqual, deepObjectSize, hasOwnProperty, createObjectPropListener, objectEach } from \"./helpers/object.mjs\";\nimport { arrayMap, arrayEach, arrayReduce, getDifferenceOfArrays, stringToArray } from \"./helpers/array.mjs\";\nimport { instanceToHTML } from \"./utils/parseTable.mjs\";\nimport { getPlugin, getPluginsNames } from \"./plugins/registry.mjs\";\nimport { getRenderer } from \"./renderers/registry.mjs\";\nimport { getValidator } from \"./validators/registry.mjs\";\nimport { randomString, toUpperCaseFirst } from \"./helpers/string.mjs\";\nimport { rangeEach, rangeEachReverse } from \"./helpers/number.mjs\";\nimport TableView from \"./tableView.mjs\";\nimport DataSource from \"./dataSource.mjs\";\nimport { translateRowsToColumns, cellMethodLookupFactory, spreadsheetColumnLabel } from \"./helpers/data.mjs\";\nimport { IndexMapper } from \"./translations/index.mjs\";\nimport { registerAsRootInstance, hasValidParameter, isRootInstance } from \"./utils/rootInstance.mjs\";\nimport { CellCoords, ViewportColumnsCalculator } from \"./3rdparty/walkontable/src/index.mjs\";\nimport Hooks from \"./pluginHooks.mjs\";\nimport { hasLanguageDictionary, getValidLanguageCode, getTranslatedPhrase } from \"./i18n/registry.mjs\";\nimport { warnUserAboutLanguageRegistration, normalizeLanguageCode } from \"./i18n/utils.mjs\";\nimport { startObserving as keyStateStartObserving, stopObserving as keyStateStopObserving } from \"./utils/keyStateObserver.mjs\";\nimport { Selection } from \"./selection/index.mjs\";\nimport { MetaManager, DataMap } from \"./dataMap/index.mjs\";\nimport { createUniqueMap } from \"./utils/dataStructures/uniqueMap.mjs\";\nvar activeGuid = null;\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * Handsontable constructor.\n *\n * @core\n * @class Core\n * @description\n * After Handsontable is constructed, you can modify the grid behavior using the available public methods.\n *\n * ## How to call methods.\n *\n * These are 2 equal ways to call a Handsontable method:\n *\n * ```js\n * // all following examples assume that you constructed Handsontable like this\n * const hot = new Handsontable(document.getElementById('example1'), options);\n *\n * // now, to use setDataAtCell method, you can either:\n * hot.setDataAtCell(0, 0, 'new value');\n * ```\n *\n * Alternatively, you can call the method using jQuery wrapper (__obsolete__, requires initialization using our jQuery guide\n * ```js\n * $('#example1').handsontable('setDataAtCell', 0, 0, 'new value');\n * ```\n *\n * @param {HTMLElement} rootElement The element to which the Handsontable instance is injected.\n * @param {object} userSettings The user defined options.\n * @param {boolean} [rootInstanceSymbol=false] Indicates if the instance is root of all later instances created.\n */\n\nexport default function Core(rootElement, userSettings) {\n var _this = this;\n\n var rootInstanceSymbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var preventScrollingToCell = false;\n var instance = this;\n var eventManager = new EventManager(instance);\n var datamap;\n var dataSource;\n var grid;\n var editorManager;\n var firstRun = true;\n userSettings.language = getValidLanguageCode(userSettings.language);\n var metaManager = new MetaManager(userSettings);\n var tableMeta = metaManager.getTableMeta();\n var globalMeta = metaManager.getGlobalMeta();\n var pluginsRegistry = createUniqueMap();\n\n if (hasValidParameter(rootInstanceSymbol)) {\n registerAsRootInstance(this);\n } // TODO: check if references to DOM elements should be move to UI layer (Walkontable)\n\n /**\n * Reference to the container element.\n *\n * @private\n * @type {HTMLElement}\n */\n\n\n this.rootElement = rootElement;\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n /**\n * The nearest document over container.\n *\n * @private\n * @type {Document}\n */\n\n this.rootDocument = rootElement.ownerDocument;\n /**\n * Window object over container's document.\n *\n * @private\n * @type {Window}\n */\n\n this.rootWindow = this.rootDocument.defaultView;\n /**\n * A boolean to tell if the Handsontable has been fully destroyed. This is set to `true`\n * after `afterDestroy` hook is called.\n *\n * @memberof Core#\n * @member isDestroyed\n * @type {boolean}\n */\n\n this.isDestroyed = false;\n /**\n * The counter determines how many times the render suspending was called. It allows\n * tracking the nested suspending calls. For each render suspend resuming call the\n * counter is decremented. The value equal to 0 means the render suspending feature\n * is disabled.\n *\n * @private\n * @type {number}\n */\n\n this.renderSuspendedCounter = 0;\n /**\n * The counter determines how many times the execution suspending was called. It allows\n * tracking the nested suspending calls. For each execution suspend resuming call the\n * counter is decremented. The value equal to 0 means the execution suspending feature\n * is disabled.\n *\n * @private\n * @type {number}\n */\n\n this.executionSuspendedCounter = 0;\n keyStateStartObserving(this.rootDocument);\n this.container = this.rootDocument.createElement('div');\n this.renderCall = false;\n rootElement.insertBefore(this.container, rootElement.firstChild);\n\n if (isRootInstance(this)) {\n _injectProductInfo(userSettings.licenseKey, rootElement);\n }\n\n this.guid = \"ht_\".concat(randomString()); // this is the namespace for global events\n\n /**\n * Instance of index mapper which is responsible for managing the column indexes.\n *\n * @memberof Core#\n * @member columnIndexMapper\n * @type {IndexMapper}\n */\n\n this.columnIndexMapper = new IndexMapper();\n /**\n * Instance of index mapper which is responsible for managing the row indexes.\n *\n * @memberof Core#\n * @member rowIndexMapper\n * @type {IndexMapper}\n */\n\n this.rowIndexMapper = new IndexMapper();\n dataSource = new DataSource(instance);\n\n if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {\n this.rootElement.id = this.guid; // if root element does not have an id, assign a random id\n }\n\n var visualToRenderableCoords = function visualToRenderableCoords(coords) {\n var visualRow = coords.row,\n visualColumn = coords.col;\n return new CellCoords( // We just store indexes for rows and columns without headers.\n visualRow >= 0 ? instance.rowIndexMapper.getRenderableFromVisualIndex(visualRow) : visualRow, visualColumn >= 0 ? instance.columnIndexMapper.getRenderableFromVisualIndex(visualColumn) : visualColumn);\n };\n\n var renderableToVisualCoords = function renderableToVisualCoords(coords) {\n var renderableRow = coords.row,\n renderableColumn = coords.col;\n return new CellCoords( // We just store indexes for rows and columns without headers.\n renderableRow >= 0 ? instance.rowIndexMapper.getVisualFromRenderableIndex(renderableRow) : renderableRow, renderableColumn >= 0 ? instance.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn) : renderableColumn // eslint-disable-line max-len\n );\n };\n\n var selection = new Selection(tableMeta, {\n countCols: function countCols() {\n return instance.countCols();\n },\n countRows: function countRows() {\n return instance.countRows();\n },\n propToCol: function propToCol(prop) {\n return datamap.propToCol(prop);\n },\n isEditorOpened: function isEditorOpened() {\n return instance.getActiveEditor() ? instance.getActiveEditor().isOpened() : false;\n },\n countColsTranslated: function countColsTranslated() {\n return _this.view.countRenderableColumns();\n },\n countRowsTranslated: function countRowsTranslated() {\n return _this.view.countRenderableRows();\n },\n visualToRenderableCoords: visualToRenderableCoords,\n renderableToVisualCoords: renderableToVisualCoords,\n isDisabledCellSelection: function isDisabledCellSelection(visualRow, visualColumn) {\n return instance.getCellMeta(visualRow, visualColumn).disableVisualSelection;\n }\n });\n this.selection = selection;\n\n var onIndexMapperCacheUpdate = function onIndexMapperCacheUpdate(flag1, flag2, hiddenIndexesChanged) {\n if (hiddenIndexesChanged) {\n _this.selection.refresh();\n }\n };\n\n this.columnIndexMapper.addLocalHook('cacheUpdated', onIndexMapperCacheUpdate);\n this.rowIndexMapper.addLocalHook('cacheUpdated', onIndexMapperCacheUpdate);\n this.selection.addLocalHook('beforeSetRangeStart', function (cellCoords) {\n _this.runHooks('beforeSetRangeStart', cellCoords);\n });\n this.selection.addLocalHook('beforeSetRangeStartOnly', function (cellCoords) {\n _this.runHooks('beforeSetRangeStartOnly', cellCoords);\n });\n this.selection.addLocalHook('beforeSetRangeEnd', function (cellCoords) {\n _this.runHooks('beforeSetRangeEnd', cellCoords);\n\n if (cellCoords.row < 0) {\n cellCoords.row = _this.view.wt.wtTable.getFirstVisibleRow();\n }\n\n if (cellCoords.col < 0) {\n cellCoords.col = _this.view.wt.wtTable.getFirstVisibleColumn();\n }\n });\n this.selection.addLocalHook('afterSetRangeEnd', function (cellCoords) {\n var preventScrolling = createObjectPropListener(false);\n\n var selectionRange = _this.selection.getSelectedRange();\n\n var _selectionRange$curre = selectionRange.current(),\n from = _selectionRange$curre.from,\n to = _selectionRange$curre.to;\n\n var selectionLayerLevel = selectionRange.size() - 1;\n\n _this.runHooks('afterSelection', from.row, from.col, to.row, to.col, preventScrolling, selectionLayerLevel);\n\n _this.runHooks('afterSelectionByProp', from.row, instance.colToProp(from.col), to.row, instance.colToProp(to.col), preventScrolling, selectionLayerLevel); // eslint-disable-line max-len\n\n\n var isSelectedByAnyHeader = _this.selection.isSelectedByAnyHeader();\n\n var currentSelectedRange = _this.selection.selectedRange.current();\n\n var scrollToCell = true;\n\n if (preventScrollingToCell) {\n scrollToCell = false;\n }\n\n if (preventScrolling.isTouched()) {\n scrollToCell = !preventScrolling.value;\n }\n\n var isSelectedByRowHeader = _this.selection.isSelectedByRowHeader();\n\n var isSelectedByColumnHeader = _this.selection.isSelectedByColumnHeader();\n\n if (scrollToCell !== false) {\n if (!isSelectedByAnyHeader) {\n if (currentSelectedRange && !_this.selection.isMultiple()) {\n _this.view.scrollViewport(visualToRenderableCoords(currentSelectedRange.from));\n } else {\n _this.view.scrollViewport(visualToRenderableCoords(cellCoords));\n }\n } else if (isSelectedByRowHeader) {\n _this.view.scrollViewportVertically(instance.rowIndexMapper.getRenderableFromVisualIndex(cellCoords.row));\n } else if (isSelectedByColumnHeader) {\n _this.view.scrollViewportHorizontally(instance.columnIndexMapper.getRenderableFromVisualIndex(cellCoords.col));\n }\n } // @TODO: These CSS classes are no longer needed anymore. They are used only as a indicator of the selected\n // rows/columns in the MergedCells plugin (via border.js#L520 in the walkontable module). After fixing\n // the Border class this should be removed.\n\n\n if (isSelectedByRowHeader && isSelectedByColumnHeader) {\n addClass(_this.rootElement, ['ht__selection--rows', 'ht__selection--columns']);\n } else if (isSelectedByRowHeader) {\n removeClass(_this.rootElement, 'ht__selection--columns');\n addClass(_this.rootElement, 'ht__selection--rows');\n } else if (isSelectedByColumnHeader) {\n removeClass(_this.rootElement, 'ht__selection--rows');\n addClass(_this.rootElement, 'ht__selection--columns');\n } else {\n removeClass(_this.rootElement, ['ht__selection--rows', 'ht__selection--columns']);\n }\n\n _this._refreshBorders(null);\n });\n this.selection.addLocalHook('afterSelectionFinished', function (cellRanges) {\n var selectionLayerLevel = cellRanges.length - 1;\n var _cellRanges$selection = cellRanges[selectionLayerLevel],\n from = _cellRanges$selection.from,\n to = _cellRanges$selection.to;\n\n _this.runHooks('afterSelectionEnd', from.row, from.col, to.row, to.col, selectionLayerLevel);\n\n _this.runHooks('afterSelectionEndByProp', from.row, instance.colToProp(from.col), to.row, instance.colToProp(to.col), selectionLayerLevel);\n });\n this.selection.addLocalHook('afterIsMultipleSelection', function (isMultiple) {\n var changedIsMultiple = _this.runHooks('afterIsMultipleSelection', isMultiple.value);\n\n if (isMultiple.value) {\n isMultiple.value = changedIsMultiple;\n }\n });\n this.selection.addLocalHook('beforeModifyTransformStart', function (cellCoordsDelta) {\n _this.runHooks('modifyTransformStart', cellCoordsDelta);\n });\n this.selection.addLocalHook('afterModifyTransformStart', function (coords, rowTransformDir, colTransformDir) {\n _this.runHooks('afterModifyTransformStart', coords, rowTransformDir, colTransformDir);\n });\n this.selection.addLocalHook('beforeModifyTransformEnd', function (cellCoordsDelta) {\n _this.runHooks('modifyTransformEnd', cellCoordsDelta);\n });\n this.selection.addLocalHook('afterModifyTransformEnd', function (coords, rowTransformDir, colTransformDir) {\n _this.runHooks('afterModifyTransformEnd', coords, rowTransformDir, colTransformDir);\n });\n this.selection.addLocalHook('afterDeselect', function () {\n editorManager.destroyEditor();\n\n _this._refreshBorders();\n\n removeClass(_this.rootElement, ['ht__selection--rows', 'ht__selection--columns']);\n\n _this.runHooks('afterDeselect');\n });\n this.selection.addLocalHook('insertRowRequire', function (totalRows) {\n _this.alter('insert_row', totalRows, 1, 'auto');\n });\n this.selection.addLocalHook('insertColRequire', function (totalCols) {\n _this.alter('insert_col', totalCols, 1, 'auto');\n });\n grid = {\n /**\n * Inserts or removes rows and columns.\n *\n * @memberof Core#\n * @function alter\n * @private\n * @param {string} action Possible values: \"insert_row\", \"insert_col\", \"remove_row\", \"remove_col\".\n * @param {number|Array} index Row or column visual index which from the alter action will be triggered.\n * Alter actions such as \"remove_row\" and \"remove_col\" support array indexes in the\n * format `[[index, amount], [index, amount]...]` this can be used to remove\n * non-consecutive columns or rows in one call.\n * @param {number} [amount=1] Ammount rows or columns to remove.\n * @param {string} [source] Optional. Source of hook runner.\n * @param {boolean} [keepEmptyRows] Optional. Flag for preventing deletion of empty rows.\n */\n alter: function alter(action, index) {\n var amount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var source = arguments.length > 3 ? arguments[3] : undefined;\n var keepEmptyRows = arguments.length > 4 ? arguments[4] : undefined;\n var delta;\n\n var normalizeIndexesGroup = function normalizeIndexesGroup(indexes) {\n if (indexes.length === 0) {\n return [];\n }\n\n var sortedIndexes = _toConsumableArray(indexes); // Sort the indexes in ascending order.\n\n\n sortedIndexes.sort(function (_ref, _ref2) {\n var _ref3 = _slicedToArray(_ref, 1),\n indexA = _ref3[0];\n\n var _ref4 = _slicedToArray(_ref2, 1),\n indexB = _ref4[0];\n\n if (indexA === indexB) {\n return 0;\n }\n\n return indexA > indexB ? 1 : -1;\n }); // Normalize the {index, amount} groups into bigger groups.\n\n var normalizedIndexes = arrayReduce(sortedIndexes, function (acc, _ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n groupIndex = _ref6[0],\n groupAmount = _ref6[1];\n\n var previousItem = acc[acc.length - 1];\n\n var _previousItem = _slicedToArray(previousItem, 2),\n prevIndex = _previousItem[0],\n prevAmount = _previousItem[1];\n\n var prevLastIndex = prevIndex + prevAmount;\n\n if (groupIndex <= prevLastIndex) {\n var amountToAdd = Math.max(groupAmount - (prevLastIndex - groupIndex), 0);\n previousItem[1] += amountToAdd;\n } else {\n acc.push([groupIndex, groupAmount]);\n }\n\n return acc;\n }, [sortedIndexes[0]]);\n return normalizedIndexes;\n };\n /* eslint-disable no-case-declarations */\n\n\n switch (action) {\n case 'insert_row':\n var numberOfSourceRows = instance.countSourceRows();\n\n if (tableMeta.maxRows === numberOfSourceRows) {\n return;\n } // eslint-disable-next-line no-param-reassign\n\n\n index = isDefined(index) ? index : numberOfSourceRows;\n delta = datamap.createRow(index, amount, source);\n\n if (delta) {\n metaManager.createRow(instance.toPhysicalRow(index), amount);\n var currentSelectedRange = selection.selectedRange.current();\n var currentFromRange = currentSelectedRange === null || currentSelectedRange === void 0 ? void 0 : currentSelectedRange.from;\n var currentFromRow = currentFromRange === null || currentFromRange === void 0 ? void 0 : currentFromRange.row; // Moving down the selection (when it exist). It should be present on the \"old\" row.\n // TODO: The logic here should be handled by selection module.\n\n if (isDefined(currentFromRow) && currentFromRow >= index) {\n var _currentSelectedRange = currentSelectedRange.to,\n currentToRow = _currentSelectedRange.row,\n currentToColumn = _currentSelectedRange.col;\n var currentFromColumn = currentFromRange.col; // Workaround: headers are not stored inside selection.\n\n if (selection.isSelectedByRowHeader()) {\n currentFromColumn = -1;\n } // Remove from the stack the last added selection as that selection below will be\n // replaced by new transformed selection.\n\n\n selection.getSelectedRange().pop(); // I can't use transforms as they don't work in negative indexes.\n\n selection.setRangeStartOnly(new CellCoords(currentFromRow + delta, currentFromColumn), true);\n selection.setRangeEnd(new CellCoords(currentToRow + delta, currentToColumn)); // will call render() internally\n } else {\n instance._refreshBorders(); // it will call render and prepare methods\n\n }\n }\n\n break;\n\n case 'insert_col':\n delta = datamap.createCol(index, amount, source);\n\n if (delta) {\n metaManager.createColumn(instance.toPhysicalColumn(index), amount);\n\n if (Array.isArray(tableMeta.colHeaders)) {\n var spliceArray = [index, 0];\n spliceArray.length += delta; // inserts empty (undefined) elements at the end of an array\n\n Array.prototype.splice.apply(tableMeta.colHeaders, spliceArray); // inserts empty (undefined) elements into the colHeader array\n }\n\n var _currentSelectedRange2 = selection.selectedRange.current();\n\n var _currentFromRange = _currentSelectedRange2 === null || _currentSelectedRange2 === void 0 ? void 0 : _currentSelectedRange2.from;\n\n var _currentFromColumn = _currentFromRange === null || _currentFromRange === void 0 ? void 0 : _currentFromRange.col; // Moving right the selection (when it exist). It should be present on the \"old\" row.\n // TODO: The logic here should be handled by selection module.\n\n\n if (isDefined(_currentFromColumn) && _currentFromColumn >= index) {\n var _currentSelectedRange3 = _currentSelectedRange2.to,\n _currentToRow = _currentSelectedRange3.row,\n _currentToColumn = _currentSelectedRange3.col;\n var _currentFromRow = _currentFromRange.row; // Workaround: headers are not stored inside selection.\n\n if (selection.isSelectedByColumnHeader()) {\n _currentFromRow = -1;\n } // Remove from the stack the last added selection as that selection below will be\n // replaced by new transformed selection.\n\n\n selection.getSelectedRange().pop(); // I can't use transforms as they don't work in negative indexes.\n\n selection.setRangeStartOnly(new CellCoords(_currentFromRow, _currentFromColumn + delta), true);\n selection.setRangeEnd(new CellCoords(_currentToRow, _currentToColumn + delta)); // will call render() internally\n } else {\n instance._refreshBorders(); // it will call render and prepare methods\n\n }\n }\n\n break;\n\n case 'remove_row':\n var removeRow = function removeRow(indexes) {\n var offset = 0; // Normalize the {index, amount} groups into bigger groups.\n\n arrayEach(indexes, function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n groupIndex = _ref8[0],\n groupAmount = _ref8[1];\n\n var calcIndex = isEmpty(groupIndex) ? instance.countRows() - 1 : Math.max(groupIndex - offset, 0); // If the 'index' is an integer decrease it by 'offset' otherwise pass it through to make the value\n // compatible with datamap.removeCol method.\n\n if (Number.isInteger(groupIndex)) {\n // eslint-disable-next-line no-param-reassign\n groupIndex = Math.max(groupIndex - offset, 0);\n } // TODO: for datamap.removeRow index should be passed as it is (with undefined and null values). If not, the logic\n // inside the datamap.removeRow breaks the removing functionality.\n\n\n var wasRemoved = datamap.removeRow(groupIndex, groupAmount, source);\n\n if (!wasRemoved) {\n return;\n }\n\n metaManager.removeRow(instance.toPhysicalRow(calcIndex), groupAmount);\n var totalRows = instance.countRows();\n var fixedRowsTop = tableMeta.fixedRowsTop;\n\n if (fixedRowsTop >= calcIndex + 1) {\n tableMeta.fixedRowsTop -= Math.min(groupAmount, fixedRowsTop - calcIndex);\n }\n\n var fixedRowsBottom = tableMeta.fixedRowsBottom;\n\n if (fixedRowsBottom && calcIndex >= totalRows - fixedRowsBottom) {\n tableMeta.fixedRowsBottom -= Math.min(groupAmount, fixedRowsBottom);\n }\n\n offset += groupAmount;\n });\n };\n\n if (Array.isArray(index)) {\n removeRow(normalizeIndexesGroup(index));\n } else {\n removeRow([[index, amount]]);\n }\n\n grid.adjustRowsAndCols();\n\n instance._refreshBorders(); // it will call render and prepare methods\n\n\n break;\n\n case 'remove_col':\n var removeCol = function removeCol(indexes) {\n var offset = 0; // Normalize the {index, amount} groups into bigger groups.\n\n arrayEach(indexes, function (_ref9) {\n var _ref10 = _slicedToArray(_ref9, 2),\n groupIndex = _ref10[0],\n groupAmount = _ref10[1];\n\n var calcIndex = isEmpty(groupIndex) ? instance.countCols() - 1 : Math.max(groupIndex - offset, 0);\n var physicalColumnIndex = instance.toPhysicalColumn(calcIndex); // If the 'index' is an integer decrease it by 'offset' otherwise pass it through to make the value\n // compatible with datamap.removeCol method.\n\n if (Number.isInteger(groupIndex)) {\n // eslint-disable-next-line no-param-reassign\n groupIndex = Math.max(groupIndex - offset, 0);\n } // TODO: for datamap.removeCol index should be passed as it is (with undefined and null values). If not, the logic\n // inside the datamap.removeCol breaks the removing functionality.\n\n\n var wasRemoved = datamap.removeCol(groupIndex, groupAmount, source);\n\n if (!wasRemoved) {\n return;\n }\n\n metaManager.removeColumn(physicalColumnIndex, groupAmount);\n var fixedColumnsLeft = tableMeta.fixedColumnsLeft;\n\n if (fixedColumnsLeft >= calcIndex + 1) {\n tableMeta.fixedColumnsLeft -= Math.min(groupAmount, fixedColumnsLeft - calcIndex);\n }\n\n if (Array.isArray(tableMeta.colHeaders)) {\n if (typeof physicalColumnIndex === 'undefined') {\n physicalColumnIndex = -1;\n }\n\n tableMeta.colHeaders.splice(physicalColumnIndex, groupAmount);\n }\n\n offset += groupAmount;\n });\n };\n\n if (Array.isArray(index)) {\n removeCol(normalizeIndexesGroup(index));\n } else {\n removeCol([[index, amount]]);\n }\n\n grid.adjustRowsAndCols();\n\n instance._refreshBorders(); // it will call render and prepare methods\n\n\n break;\n\n default:\n throw new Error(\"There is no such action \\\"\".concat(action, \"\\\"\"));\n }\n\n if (!keepEmptyRows) {\n grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh\n }\n },\n\n /**\n * Makes sure there are empty rows at the bottom of the table.\n */\n adjustRowsAndCols: function adjustRowsAndCols() {\n var minRows = tableMeta.minRows;\n var minSpareRows = tableMeta.minSpareRows;\n var minCols = tableMeta.minCols;\n var minSpareCols = tableMeta.minSpareCols;\n\n if (minRows) {\n // should I add empty rows to data source to meet minRows?\n var nrOfRows = instance.countRows();\n\n if (nrOfRows < minRows) {\n // The synchronization with cell meta is not desired here. For `minRows` option,\n // we don't want to touch/shift cell meta objects.\n datamap.createRow(nrOfRows, minRows - nrOfRows, 'auto');\n }\n }\n\n if (minSpareRows) {\n var emptyRows = instance.countEmptyRows(true); // should I add empty rows to meet minSpareRows?\n\n if (emptyRows < minSpareRows) {\n var emptyRowsMissing = minSpareRows - emptyRows;\n var rowsToCreate = Math.min(emptyRowsMissing, tableMeta.maxRows - instance.countSourceRows()); // The synchronization with cell meta is not desired here. For `minSpareRows` option,\n // we don't want to touch/shift cell meta objects.\n\n datamap.createRow(instance.countRows(), rowsToCreate, 'auto');\n }\n }\n\n {\n var emptyCols; // count currently empty cols\n\n if (minCols || minSpareCols) {\n emptyCols = instance.countEmptyCols(true);\n }\n\n var nrOfColumns = instance.countCols(); // should I add empty cols to meet minCols?\n\n if (minCols && !tableMeta.columns && nrOfColumns < minCols) {\n // The synchronization with cell meta is not desired here. For `minSpareRows` option,\n // we don't want to touch/shift cell meta objects.\n var colsToCreate = minCols - nrOfColumns;\n emptyCols += colsToCreate;\n datamap.createCol(nrOfColumns, colsToCreate, 'auto');\n } // should I add empty cols to meet minSpareCols?\n\n\n if (minSpareCols && !tableMeta.columns && instance.dataType === 'array' && emptyCols < minSpareCols) {\n nrOfColumns = instance.countCols();\n var emptyColsMissing = minSpareCols - emptyCols;\n\n var _colsToCreate = Math.min(emptyColsMissing, tableMeta.maxCols - nrOfColumns); // The synchronization with cell meta is not desired here. For `minSpareRows` option,\n // we don't want to touch/shift cell meta objects.\n\n\n datamap.createCol(nrOfColumns, _colsToCreate, 'auto');\n }\n }\n var rowCount = instance.countRows();\n var colCount = instance.countCols();\n\n if (rowCount === 0 || colCount === 0) {\n selection.deselect();\n }\n\n if (selection.isSelected()) {\n arrayEach(selection.selectedRange, function (range) {\n var selectionChanged = false;\n var fromRow = range.from.row;\n var fromCol = range.from.col;\n var toRow = range.to.row;\n var toCol = range.to.col; // if selection is outside, move selection to last row\n\n if (fromRow > rowCount - 1) {\n fromRow = rowCount - 1;\n selectionChanged = true;\n\n if (toRow > fromRow) {\n toRow = fromRow;\n }\n } else if (toRow > rowCount - 1) {\n toRow = rowCount - 1;\n selectionChanged = true;\n\n if (fromRow > toRow) {\n fromRow = toRow;\n }\n } // if selection is outside, move selection to last row\n\n\n if (fromCol > colCount - 1) {\n fromCol = colCount - 1;\n selectionChanged = true;\n\n if (toCol > fromCol) {\n toCol = fromCol;\n }\n } else if (toCol > colCount - 1) {\n toCol = colCount - 1;\n selectionChanged = true;\n\n if (fromCol > toCol) {\n fromCol = toCol;\n }\n }\n\n if (selectionChanged) {\n instance.selectCell(fromRow, fromCol, toRow, toCol);\n }\n });\n }\n\n if (instance.view) {\n instance.view.adjustElementsSize();\n }\n },\n\n /**\n * Populate the data from the provided 2d array from the given cell coordinates.\n *\n * @private\n * @param {object} start Start selection position. Visual indexes.\n * @param {Array} input 2d data array.\n * @param {object} [end] End selection position (only for drag-down mode). Visual indexes.\n * @param {string} [source=\"populateFromArray\"] Source information string.\n * @param {string} [method=\"overwrite\"] Populate method. Possible options: `shift_down`, `shift_right`, `overwrite`.\n * @param {string} direction (left|right|up|down) String specifying the direction.\n * @param {Array} deltas The deltas array. A difference between values of adjacent cells.\n * Useful **only** when the type of handled cells is `numeric`.\n * @returns {object|undefined} Ending td in pasted area (only if any cell was changed).\n */\n populateFromArray: function populateFromArray(start, input, end, source, method, direction, deltas) {\n // TODO: either remove or implement the `direction` argument. Currently it's not working at all.\n var r;\n var rlen;\n var c;\n var clen;\n var setData = [];\n var current = {};\n rlen = input.length;\n\n if (rlen === 0) {\n return false;\n }\n\n var repeatCol;\n var repeatRow;\n var cmax;\n var rmax;\n /* eslint-disable no-case-declarations */\n // insert data with specified pasteMode method\n\n switch (method) {\n case 'shift_down':\n repeatCol = end ? end.col - start.col + 1 : 0;\n repeatRow = end ? end.row - start.row + 1 : 0; // eslint-disable-next-line no-param-reassign\n\n input = translateRowsToColumns(input);\n\n for (c = 0, clen = input.length, cmax = Math.max(clen, repeatCol); c < cmax; c++) {\n if (c < clen) {\n var _instance;\n\n for (r = 0, rlen = input[c].length; r < repeatRow - rlen; r++) {\n input[c].push(input[c][r % rlen]);\n }\n\n input[c].unshift(start.col + c, start.row, 0);\n\n (_instance = instance).spliceCol.apply(_instance, _toConsumableArray(input[c]));\n } else {\n var _instance2;\n\n input[c % clen][0] = start.col + c;\n\n (_instance2 = instance).spliceCol.apply(_instance2, _toConsumableArray(input[c % clen]));\n }\n }\n\n break;\n\n case 'shift_right':\n repeatCol = end ? end.col - start.col + 1 : 0;\n repeatRow = end ? end.row - start.row + 1 : 0;\n\n for (r = 0, rlen = input.length, rmax = Math.max(rlen, repeatRow); r < rmax; r++) {\n if (r < rlen) {\n var _instance3;\n\n for (c = 0, clen = input[r].length; c < repeatCol - clen; c++) {\n input[r].push(input[r][c % clen]);\n }\n\n input[r].unshift(start.row + r, start.col, 0);\n\n (_instance3 = instance).spliceRow.apply(_instance3, _toConsumableArray(input[r]));\n } else {\n var _instance4;\n\n input[r % rlen][0] = start.row + r;\n\n (_instance4 = instance).spliceRow.apply(_instance4, _toConsumableArray(input[r % rlen]));\n }\n }\n\n break;\n\n case 'overwrite':\n default:\n // overwrite and other not specified options\n current.row = start.row;\n current.col = start.col;\n var selected = {\n // selected range\n row: end && start ? end.row - start.row + 1 : 1,\n col: end && start ? end.col - start.col + 1 : 1\n };\n var skippedRow = 0;\n var skippedColumn = 0;\n var pushData = true;\n var cellMeta;\n\n var getInputValue = function getInputValue(row) {\n var col = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var rowValue = input[row % input.length];\n\n if (col !== null) {\n return rowValue[col % rowValue.length];\n }\n\n return rowValue;\n };\n\n var rowInputLength = input.length;\n var rowSelectionLength = end ? end.row - start.row + 1 : 0;\n\n if (end) {\n rlen = rowSelectionLength;\n } else {\n rlen = Math.max(rowInputLength, rowSelectionLength);\n }\n\n for (r = 0; r < rlen; r++) {\n if (end && current.row > end.row && rowSelectionLength > rowInputLength || !tableMeta.allowInsertRow && current.row > instance.countRows() - 1 || current.row >= tableMeta.maxRows) {\n break;\n }\n\n var visualRow = r - skippedRow;\n var colInputLength = getInputValue(visualRow).length;\n var colSelectionLength = end ? end.col - start.col + 1 : 0;\n\n if (end) {\n clen = colSelectionLength;\n } else {\n clen = Math.max(colInputLength, colSelectionLength);\n }\n\n current.col = start.col;\n cellMeta = instance.getCellMeta(current.row, current.col);\n\n if ((source === 'CopyPaste.paste' || source === 'Autofill.fill') && cellMeta.skipRowOnPaste) {\n skippedRow += 1;\n current.row += 1;\n rlen += 1;\n /* eslint-disable no-continue */\n\n continue;\n }\n\n skippedColumn = 0;\n\n for (c = 0; c < clen; c++) {\n if (end && current.col > end.col && colSelectionLength > colInputLength || !tableMeta.allowInsertColumn && current.col > instance.countCols() - 1 || current.col >= tableMeta.maxCols) {\n break;\n }\n\n cellMeta = instance.getCellMeta(current.row, current.col);\n\n if ((source === 'CopyPaste.paste' || source === 'Autofill.fill') && cellMeta.skipColumnOnPaste) {\n skippedColumn += 1;\n current.col += 1;\n clen += 1;\n continue;\n }\n\n if (cellMeta.readOnly) {\n current.col += 1;\n /* eslint-disable no-continue */\n\n continue;\n }\n\n var visualColumn = c - skippedColumn;\n var value = getInputValue(visualRow, visualColumn);\n var orgValue = instance.getDataAtCell(current.row, current.col);\n var index = {\n row: visualRow,\n col: visualColumn\n };\n\n if (source === 'Autofill.fill') {\n var result = instance.runHooks('beforeAutofillInsidePopulate', index, direction, input, deltas, {}, selected);\n\n if (result) {\n value = isUndefined(result.value) ? value : result.value;\n }\n }\n\n if (value !== null && _typeof(value) === 'object') {\n // when 'value' is array and 'orgValue' is null, set 'orgValue' to\n // an empty array so that the null value can be compared to 'value'\n // as an empty value for the array context\n if (Array.isArray(value) && orgValue === null) orgValue = [];\n\n if (orgValue === null || _typeof(orgValue) !== 'object') {\n pushData = false;\n } else {\n var orgValueSchema = duckSchema(Array.isArray(orgValue) ? orgValue : orgValue[0] || orgValue);\n var valueSchema = duckSchema(Array.isArray(value) ? value : value[0] || value);\n /* eslint-disable max-depth */\n\n if (isObjectEqual(orgValueSchema, valueSchema)) {\n value = deepClone(value);\n } else {\n pushData = false;\n }\n }\n } else if (orgValue !== null && _typeof(orgValue) === 'object') {\n pushData = false;\n }\n\n if (pushData) {\n setData.push([current.row, current.col, value]);\n }\n\n pushData = true;\n current.col += 1;\n }\n\n current.row += 1;\n }\n\n instance.setDataAtCell(setData, null, null, source || 'populateFromArray');\n break;\n }\n }\n };\n /**\n * Internal function to set `language` key of settings.\n *\n * @private\n * @param {string} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.\n * @fires Hooks#afterLanguageChange\n */\n\n function setLanguage(languageCode) {\n var normalizedLanguageCode = normalizeLanguageCode(languageCode);\n\n if (hasLanguageDictionary(normalizedLanguageCode)) {\n instance.runHooks('beforeLanguageChange', normalizedLanguageCode);\n globalMeta.language = normalizedLanguageCode;\n instance.runHooks('afterLanguageChange', normalizedLanguageCode);\n } else {\n warnUserAboutLanguageRegistration(languageCode);\n }\n }\n /**\n * Internal function to set `className` or `tableClassName`, depending on the key from the settings object.\n *\n * @private\n * @param {string} className `className` or `tableClassName` from the key in the settings object.\n * @param {string|string[]} classSettings String or array of strings. Contains class name(s) from settings object.\n */\n\n\n function setClassName(className, classSettings) {\n var element = className === 'className' ? instance.rootElement : instance.table;\n\n if (firstRun) {\n addClass(element, classSettings);\n } else {\n var globalMetaSettingsArray = [];\n var settingsArray = [];\n\n if (globalMeta[className]) {\n globalMetaSettingsArray = Array.isArray(globalMeta[className]) ? globalMeta[className] : stringToArray(globalMeta[className]);\n }\n\n if (classSettings) {\n settingsArray = Array.isArray(classSettings) ? classSettings : stringToArray(classSettings);\n }\n\n var classNameToRemove = getDifferenceOfArrays(globalMetaSettingsArray, settingsArray);\n var classNameToAdd = getDifferenceOfArrays(settingsArray, globalMetaSettingsArray);\n\n if (classNameToRemove.length) {\n removeClass(element, classNameToRemove);\n }\n\n if (classNameToAdd.length) {\n addClass(element, classNameToAdd);\n }\n }\n\n globalMeta[className] = classSettings;\n }\n\n this.init = function () {\n dataSource.setData(tableMeta.data);\n instance.runHooks('beforeInit');\n\n if (isMobileBrowser()) {\n addClass(instance.rootElement, 'mobile');\n }\n\n this.updateSettings(tableMeta, true);\n this.view = new TableView(this);\n editorManager = EditorManager.getInstance(instance, tableMeta, selection);\n instance.runHooks('init');\n this.forceFullRender = true; // used when data was changed\n\n this.view.render();\n\n if (_typeof(firstRun) === 'object') {\n instance.runHooks('afterChange', firstRun[0], firstRun[1]);\n firstRun = false;\n }\n\n instance.runHooks('afterInit');\n };\n /**\n * @ignore\n * @returns {object}\n */\n\n\n function ValidatorsQueue() {\n // moved this one level up so it can be used in any function here. Probably this should be moved to a separate file\n var resolved = false;\n return {\n validatorsInQueue: 0,\n valid: true,\n addValidatorToQueue: function addValidatorToQueue() {\n this.validatorsInQueue += 1;\n resolved = false;\n },\n removeValidatorFormQueue: function removeValidatorFormQueue() {\n this.validatorsInQueue = this.validatorsInQueue - 1 < 0 ? 0 : this.validatorsInQueue - 1;\n this.checkIfQueueIsEmpty();\n },\n onQueueEmpty: function onQueueEmpty() {},\n checkIfQueueIsEmpty: function checkIfQueueIsEmpty() {\n if (this.validatorsInQueue === 0 && resolved === false) {\n resolved = true;\n this.onQueueEmpty(this.valid);\n }\n }\n };\n }\n /**\n * Get parsed number from numeric string.\n *\n * @private\n * @param {string} numericData Float (separated by a dot or a comma) or integer.\n * @returns {number} Number if we get data in parsable format, not changed value otherwise.\n */\n\n\n function getParsedNumber(numericData) {\n // Unifying \"float like\" string. Change from value with comma determiner to value with dot determiner,\n // for example from `450,65` to `450.65`.\n var unifiedNumericData = numericData.replace(',', '.');\n\n if (isNaN(parseFloat(unifiedNumericData)) === false) {\n return parseFloat(unifiedNumericData);\n }\n\n return numericData;\n }\n /**\n * @ignore\n * @param {Array} changes The 2D array containing information about each of the edited cells.\n * @param {string} source The string that identifies source of validation.\n * @param {Function} callback The callback function fot async validation.\n */\n\n\n function validateChanges(changes, source, callback) {\n if (!changes.length) {\n return;\n }\n\n var activeEditor = instance.getActiveEditor();\n var beforeChangeResult = instance.runHooks('beforeChange', changes, source || 'edit');\n var shouldBeCanceled = true;\n\n if (beforeChangeResult === false) {\n if (activeEditor) {\n activeEditor.cancelChanges();\n }\n\n return;\n }\n\n var waitingForValidator = new ValidatorsQueue();\n\n var isNumericData = function isNumericData(value) {\n return value.length > 0 && /^\\s*[+-.]?\\s*(?:(?:\\d+(?:(\\.|,)\\d+)?(?:e[+-]?\\d+)?)|(?:0x[a-f\\d]+))\\s*$/.test(value);\n };\n\n waitingForValidator.onQueueEmpty = function (isValid) {\n if (activeEditor && shouldBeCanceled) {\n activeEditor.cancelChanges();\n }\n\n callback(isValid); // called when async validators are resolved and beforeChange was not async\n };\n\n for (var i = changes.length - 1; i >= 0; i--) {\n if (changes[i] === null) {\n changes.splice(i, 1);\n } else {\n var _changes$i = _slicedToArray(changes[i], 4),\n row = _changes$i[0],\n prop = _changes$i[1],\n newValue = _changes$i[3];\n\n var col = datamap.propToCol(prop);\n var cellProperties = instance.getCellMeta(row, col);\n\n if (cellProperties.type === 'numeric' && typeof newValue === 'string' && isNumericData(newValue)) {\n changes[i][3] = getParsedNumber(newValue);\n }\n /* eslint-disable no-loop-func */\n\n\n if (instance.getCellValidator(cellProperties)) {\n waitingForValidator.addValidatorToQueue();\n instance.validateCell(changes[i][3], cellProperties, function (index, cellPropertiesReference) {\n return function (result) {\n if (typeof result !== 'boolean') {\n throw new Error('Validation error: result is not boolean');\n }\n\n if (result === false && cellPropertiesReference.allowInvalid === false) {\n shouldBeCanceled = false;\n changes.splice(index, 1); // cancel the change\n\n cellPropertiesReference.valid = true; // we cancelled the change, so cell value is still valid\n\n var cell = instance.getCell(cellPropertiesReference.visualRow, cellPropertiesReference.visualCol);\n\n if (cell !== null) {\n removeClass(cell, tableMeta.invalidCellClassName);\n } // index -= 1;\n\n }\n\n waitingForValidator.removeValidatorFormQueue();\n };\n }(i, cellProperties), source);\n }\n }\n }\n\n waitingForValidator.checkIfQueueIsEmpty();\n }\n /**\n * Internal function to apply changes. Called after validateChanges.\n *\n * @private\n * @param {Array} changes Array in form of [row, prop, oldValue, newValue].\n * @param {string} source String that identifies how this change will be described in changes array (useful in onChange callback).\n * @fires Hooks#beforeChangeRender\n * @fires Hooks#afterChange\n */\n\n\n function applyChanges(changes, source) {\n var i = changes.length - 1;\n\n if (i < 0) {\n return;\n }\n\n for (; i >= 0; i--) {\n var skipThisChange = false;\n\n if (changes[i] === null) {\n changes.splice(i, 1);\n /* eslint-disable no-continue */\n\n continue;\n }\n\n if ((changes[i][2] === null || changes[i][2] === void 0) && (changes[i][3] === null || changes[i][3] === void 0)) {\n /* eslint-disable no-continue */\n continue;\n }\n\n if (tableMeta.allowInsertRow) {\n while (changes[i][0] > instance.countRows() - 1) {\n var numberOfCreatedRows = datamap.createRow(void 0, void 0, source);\n\n if (numberOfCreatedRows >= 1) {\n metaManager.createRow(null, numberOfCreatedRows);\n } else {\n skipThisChange = true;\n break;\n }\n }\n }\n\n if (instance.dataType === 'array' && (!tableMeta.columns || tableMeta.columns.length === 0) && tableMeta.allowInsertColumn) {\n while (datamap.propToCol(changes[i][1]) > instance.countCols() - 1) {\n var numberOfCreatedColumns = datamap.createCol(void 0, void 0, source);\n\n if (numberOfCreatedColumns >= 1) {\n metaManager.createColumn(null, numberOfCreatedColumns);\n } else {\n skipThisChange = true;\n break;\n }\n }\n }\n\n if (skipThisChange) {\n /* eslint-disable no-continue */\n continue;\n }\n\n datamap.set(changes[i][0], changes[i][1], changes[i][3]);\n }\n\n instance.forceFullRender = true; // used when data was changed\n\n grid.adjustRowsAndCols();\n instance.runHooks('beforeChangeRender', changes, source);\n editorManager.lockEditor();\n\n instance._refreshBorders(null);\n\n editorManager.unlockEditor();\n instance.view.adjustElementsSize();\n instance.runHooks('afterChange', changes, source || 'edit');\n var activeEditor = instance.getActiveEditor();\n\n if (activeEditor && isDefined(activeEditor.refreshValue)) {\n activeEditor.refreshValue();\n }\n }\n /**\n * Validate a single cell.\n *\n * @param {string|number} value The value to validate.\n * @param {object} cellProperties The cell meta which corresponds with the value.\n * @param {Function} callback The callback function.\n * @param {string} source The string that identifies source of the validation.\n */\n\n\n this.validateCell = function (value, cellProperties, callback, source) {\n var validator = instance.getCellValidator(cellProperties); // the `canBeValidated = false` argument suggests, that the cell passes validation by default.\n\n /**\n * @param {boolean} valid Indicates if the validation was successful.\n * @param {boolean} [canBeValidated=true] Flag which controls the validation process.\n */\n\n function done(valid) {\n var canBeValidated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // Fixes GH#3903\n\n if (!canBeValidated || cellProperties.hidden === true) {\n callback(valid);\n return;\n }\n\n var col = cellProperties.visualCol;\n var row = cellProperties.visualRow;\n var td = instance.getCell(row, col, true);\n\n if (td && td.nodeName !== 'TH') {\n var renderableRow = instance.rowIndexMapper.getRenderableFromVisualIndex(row);\n var renderableColumn = instance.columnIndexMapper.getRenderableFromVisualIndex(col);\n instance.view.wt.wtSettings.settings.cellRenderer(renderableRow, renderableColumn, td);\n }\n\n callback(valid);\n }\n\n if (isRegExp(validator)) {\n validator = function (expression) {\n return function (cellValue, validatorCallback) {\n validatorCallback(expression.test(cellValue));\n };\n }(validator);\n }\n\n if (isFunction(validator)) {\n // eslint-disable-next-line no-param-reassign\n value = instance.runHooks('beforeValidate', value, cellProperties.visualRow, cellProperties.prop, source); // To provide consistent behaviour, validation should be always asynchronous\n\n instance._registerImmediate(function () {\n validator.call(cellProperties, value, function (valid) {\n if (!instance) {\n return;\n } // eslint-disable-next-line no-param-reassign\n\n\n valid = instance.runHooks('afterValidate', valid, value, cellProperties.visualRow, cellProperties.prop, source);\n cellProperties.valid = valid;\n done(valid);\n instance.runHooks('postAfterValidate', valid, value, cellProperties.visualRow, cellProperties.prop, source);\n });\n });\n } else {\n // resolve callback even if validator function was not found\n instance._registerImmediate(function () {\n cellProperties.valid = true;\n done(cellProperties.valid, false);\n });\n }\n };\n /**\n * @ignore\n * @param {number} row The visual row index.\n * @param {string|number} propOrCol The visual prop or column index.\n * @param {*} value The cell value.\n * @returns {Array}\n */\n\n\n function setDataInputToArray(row, propOrCol, value) {\n if (Array.isArray(row)) {\n // it's an array of changes\n return row;\n }\n\n return [[row, propOrCol, value]];\n }\n /**\n * @description\n * Set new value to a cell. To change many cells at once (recommended way), pass an array of `changes` in format\n * `[[row, col, value],...]` as the first argument.\n *\n * @memberof Core#\n * @function setDataAtCell\n * @param {number|Array} row Visual row index or array of changes in format `[[row, col, value],...]`.\n * @param {number} [column] Visual column index.\n * @param {string} [value] New value.\n * @param {string} [source] String that identifies how this change will be described in the changes array (useful in afterChange or beforeChange callback). Set to 'edit' if left empty.\n */\n\n\n this.setDataAtCell = function (row, column, value, source) {\n var input = setDataInputToArray(row, column, value);\n var changes = [];\n var changeSource = source;\n var i;\n var ilen;\n var prop;\n\n for (i = 0, ilen = input.length; i < ilen; i++) {\n if (_typeof(input[i]) !== 'object') {\n throw new Error('Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter');\n }\n\n if (typeof input[i][1] !== 'number') {\n throw new Error('Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`'); // eslint-disable-line max-len\n }\n\n if (input[i][1] >= this.countCols()) {\n prop = input[i][1];\n } else {\n prop = datamap.colToProp(input[i][1]);\n }\n\n changes.push([input[i][0], prop, dataSource.getAtCell(this.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]);\n }\n\n if (!changeSource && _typeof(row) === 'object') {\n changeSource = column;\n }\n\n instance.runHooks('afterSetDataAtCell', changes, changeSource);\n validateChanges(changes, changeSource, function () {\n applyChanges(changes, changeSource);\n });\n };\n /**\n * @description\n * Set new value to a cell. To change many cells at once (recommended way), pass an array of `changes` in format\n * `[[row, prop, value],...]` as the first argument.\n *\n * @memberof Core#\n * @function setDataAtRowProp\n * @param {number|Array} row Visual row index or array of changes in format `[[row, prop, value], ...]`.\n * @param {string} prop Property name or the source string (e.g. `'first.name'` or `'0'`).\n * @param {string} value Value to be set.\n * @param {string} [source] String that identifies how this change will be described in changes array (useful in onChange callback).\n */\n\n\n this.setDataAtRowProp = function (row, prop, value, source) {\n var input = setDataInputToArray(row, prop, value);\n var changes = [];\n var changeSource = source;\n var i;\n var ilen;\n\n for (i = 0, ilen = input.length; i < ilen; i++) {\n changes.push([input[i][0], input[i][1], dataSource.getAtCell(this.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]);\n }\n\n if (!changeSource && _typeof(row) === 'object') {\n changeSource = prop;\n }\n\n instance.runHooks('afterSetDataAtRowProp', changes, changeSource);\n validateChanges(changes, changeSource, function () {\n applyChanges(changes, changeSource);\n });\n };\n /**\n * Listen to the keyboard input on document body. This allows Handsontable to capture keyboard events and respond\n * in the right way.\n *\n * @memberof Core#\n * @function listen\n * @fires Hooks#afterListen\n */\n\n\n this.listen = function () {\n if (instance && !instance.isListening()) {\n activeGuid = instance.guid;\n instance.runHooks('afterListen');\n }\n };\n /**\n * Stop listening to keyboard input on the document body. Calling this method makes the Handsontable inactive for\n * any keyboard events.\n *\n * @memberof Core#\n * @function unlisten\n */\n\n\n this.unlisten = function () {\n if (this.isListening()) {\n activeGuid = null;\n instance.runHooks('afterUnlisten');\n }\n };\n /**\n * Returns `true` if the current Handsontable instance is listening to keyboard input on document body.\n *\n * @memberof Core#\n * @function isListening\n * @returns {boolean} `true` if the instance is listening, `false` otherwise.\n */\n\n\n this.isListening = function () {\n return activeGuid === instance.guid;\n };\n /**\n * Destroys the current editor, render the table and prepares the editor of the newly selected cell.\n *\n * @memberof Core#\n * @function destroyEditor\n * @param {boolean} [revertOriginal=false] If `true`, the previous value will be restored. Otherwise, the edited value will be saved.\n * @param {boolean} [prepareEditorIfNeeded=true] If `true` the editor under the selected cell will be prepared to open.\n */\n\n\n this.destroyEditor = function () {\n var revertOriginal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var prepareEditorIfNeeded = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n instance._refreshBorders(revertOriginal, prepareEditorIfNeeded);\n };\n /**\n * Populate cells at position with 2D input array (e.g. `[[1, 2], [3, 4]]`). Use `endRow`, `endCol` when you\n * want to cut input when a certain row is reached.\n *\n * Optional `method` argument has the same effect as pasteMode option (see {@link Options#pasteMode}).\n *\n * @memberof Core#\n * @function populateFromArray\n * @param {number} row Start visual row index.\n * @param {number} column Start visual column index.\n * @param {Array} input 2d array.\n * @param {number} [endRow] End visual row index (use when you want to cut input when certain row is reached).\n * @param {number} [endCol] End visual column index (use when you want to cut input when certain column is reached).\n * @param {string} [source=populateFromArray] Used to identify this call in the resulting events (beforeChange, afterChange).\n * @param {string} [method=overwrite] Populate method, possible values: `'shift_down'`, `'shift_right'`, `'overwrite'`.\n * @param {string} direction Populate direction, possible values: `'left'`, `'right'`, `'up'`, `'down'`.\n * @param {Array} deltas The deltas array. A difference between values of adjacent cells.\n * Useful **only** when the type of handled cells is `numeric`.\n * @returns {object|undefined} Ending td in pasted area (only if any cell was changed).\n */\n\n\n this.populateFromArray = function (row, column, input, endRow, endCol, source, method, direction, deltas) {\n if (!(_typeof(input) === 'object' && _typeof(input[0]) === 'object')) {\n throw new Error('populateFromArray parameter `input` must be an array of arrays'); // API changed in 0.9-beta2, let's check if you use it correctly\n }\n\n var c = typeof endRow === 'number' ? new CellCoords(endRow, endCol) : null;\n return grid.populateFromArray(new CellCoords(row, column), input, c, source, method, direction, deltas);\n };\n /**\n * Adds/removes data from the column. This method works the same as Array.splice for arrays (see {@link DataMap#spliceCol}).\n *\n * @memberof Core#\n * @function spliceCol\n * @param {number} column Index of the column in which do you want to do splice.\n * @param {number} index Index at which to start changing the array. If negative, will begin that many elements from the end.\n * @param {number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.\n * @param {...number} [elements] The elements to add to the array. If you don't specify any elements, spliceCol simply removes elements from the array.\n * @returns {Array} Returns removed portion of columns.\n */\n\n\n this.spliceCol = function (column, index, amount) {\n var _datamap;\n\n for (var _len = arguments.length, elements = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n elements[_key - 3] = arguments[_key];\n }\n\n return (_datamap = datamap).spliceCol.apply(_datamap, [column, index, amount].concat(elements));\n };\n /**\n * Adds/removes data from the row. This method works the same as Array.splice for arrays (see {@link DataMap#spliceRow}).\n *\n * @memberof Core#\n * @function spliceRow\n * @param {number} row Index of column in which do you want to do splice.\n * @param {number} index Index at which to start changing the array. If negative, will begin that many elements from the end.\n * @param {number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.\n * @param {...number} [elements] The elements to add to the array. If you don't specify any elements, spliceCol simply removes elements from the array.\n * @returns {Array} Returns removed portion of rows.\n */\n\n\n this.spliceRow = function (row, index, amount) {\n var _datamap2;\n\n for (var _len2 = arguments.length, elements = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {\n elements[_key2 - 3] = arguments[_key2];\n }\n\n return (_datamap2 = datamap).spliceRow.apply(_datamap2, [row, index, amount].concat(elements));\n };\n /**\n * Returns indexes of the currently selected cells as an array of arrays `[[startRow, startCol, endRow, endCol],...]`.\n *\n * Start row and start column are the coordinates of the active cell (where the selection was started).\n *\n * The version 0.36.0 adds a non-consecutive selection feature. Since this version, the method returns an array of arrays.\n * Additionally to collect the coordinates of the currently selected area (as it was previously done by the method)\n * you need to use `getSelectedLast` method.\n *\n * @memberof Core#\n * @function getSelected\n * @returns {Array[]|undefined} An array of arrays of the selection's coordinates.\n */\n\n\n this.getSelected = function () {\n // https://github.com/handsontable/handsontable/issues/44 //cjl\n if (selection.isSelected()) {\n return arrayMap(selection.getSelectedRange(), function (_ref11) {\n var from = _ref11.from,\n to = _ref11.to;\n return [from.row, from.col, to.row, to.col];\n });\n }\n };\n /**\n * Returns the last coordinates applied to the table as a an array `[startRow, startCol, endRow, endCol]`.\n *\n * @since 0.36.0\n * @memberof Core#\n * @function getSelectedLast\n * @returns {Array|undefined} An array of the selection's coordinates.\n */\n\n\n this.getSelectedLast = function () {\n var selected = this.getSelected();\n var result;\n\n if (selected && selected.length > 0) {\n result = selected[selected.length - 1];\n }\n\n return result;\n };\n /**\n * Returns the current selection as an array of CellRange objects.\n *\n * The version 0.36.0 adds a non-consecutive selection feature. Since this version, the method returns an array of arrays.\n * Additionally to collect the coordinates of the currently selected area (as it was previously done by the method)\n * you need to use `getSelectedRangeLast` method.\n *\n * @memberof Core#\n * @function getSelectedRange\n * @returns {CellRange[]|undefined} Selected range object or undefined if there is no selection.\n */\n\n\n this.getSelectedRange = function () {\n // https://github.com/handsontable/handsontable/issues/44 //cjl\n if (selection.isSelected()) {\n return Array.from(selection.getSelectedRange());\n }\n };\n /**\n * Returns the last coordinates applied to the table as a CellRange object.\n *\n * @memberof Core#\n * @function getSelectedRangeLast\n * @since 0.36.0\n * @returns {CellRange|undefined} Selected range object or undefined` if there is no selection.\n */\n\n\n this.getSelectedRangeLast = function () {\n var selectedRange = this.getSelectedRange();\n var result;\n\n if (selectedRange && selectedRange.length > 0) {\n result = selectedRange[selectedRange.length - 1];\n }\n\n return result;\n };\n /**\n * Erases content from cells that have been selected in the table.\n *\n * @memberof Core#\n * @function emptySelectedCells\n * @param {string} [source] String that identifies how this change will be described in the changes array (useful in afterChange or beforeChange callback). Set to 'edit' if left empty.\n * @since 0.36.0\n */\n\n\n this.emptySelectedCells = function (source) {\n var _this2 = this;\n\n if (!selection.isSelected() || this.countRows() === 0 || this.countCols() === 0) {\n return;\n }\n\n var changes = [];\n arrayEach(selection.getSelectedRange(), function (cellRange) {\n var topLeft = cellRange.getTopLeftCorner();\n var bottomRight = cellRange.getBottomRightCorner();\n rangeEach(topLeft.row, bottomRight.row, function (row) {\n rangeEach(topLeft.col, bottomRight.col, function (column) {\n if (!_this2.getCellMeta(row, column).readOnly) {\n changes.push([row, column, null]);\n }\n });\n });\n });\n\n if (changes.length > 0) {\n this.setDataAtCell(changes, source);\n }\n };\n /**\n * Checks if the table rendering process was suspended. See explanation in {@link Core#suspendRender}.\n *\n * @memberof Core#\n * @function isRenderSuspended\n * @since 8.3.0\n * @returns {boolean}\n */\n\n\n this.isRenderSuspended = function () {\n return this.renderSuspendedCounter > 0;\n };\n /**\n * Suspends the rendering process. It's helpful to wrap the table render\n * cycles triggered by API calls or UI actions (or both) and call the \"render\"\n * once in the end. As a result, it improves the performance of wrapped operations.\n * When the table is in the suspend state, most operations will have no visual\n * effect until the rendering state is resumed. Resuming the state automatically\n * invokes the table rendering. To make sure that after executing all operations,\n * the table will be rendered, it's highly recommended to use the {@link Core#batchRender}\n * method or {@link Core#batch}, which additionally aggregates the logic execution\n * that happens behind the table.\n *\n * The method is intended to be used by advanced users. Suspending the rendering\n * process could cause visual glitches when wrongly implemented.\n *\n * @memberof Core#\n * @function suspendRender\n * @since 8.3.0\n * @example\n * ```js\n * hot.suspendRender();\n * hot.alter('insert_row', 5, 45);\n * hot.alter('insert_col', 10, 40);\n * hot.setDataAtCell(1, 1, 'John');\n * hot.setDataAtCell(2, 2, 'Mark');\n * hot.setDataAtCell(3, 3, 'Ann');\n * hot.setDataAtCell(4, 4, 'Sophia');\n * hot.setDataAtCell(5, 5, 'Mia');\n * hot.selectCell(0, 0);\n * hot.resumeRender(); // It re-renders the table internally\n * ```\n */\n\n\n this.suspendRender = function () {\n this.renderSuspendedCounter += 1;\n };\n /**\n * Resumes the rendering process. In combination with the {@link Core#suspendRender}\n * method it allows aggregating the table render cycles triggered by API calls or UI\n * actions (or both) and calls the \"render\" once in the end. When the table is in\n * the suspend state, most operations will have no visual effect until the rendering\n * state is resumed. Resuming the state automatically invokes the table rendering.\n *\n * The method is intended to be used by advanced users. Suspending the rendering\n * process could cause visual glitches when wrongly implemented.\n *\n * @memberof Core#\n * @function resumeRender\n * @since 8.3.0\n * @example\n * ```js\n * hot.suspendRender();\n * hot.alter('insert_row', 5, 45);\n * hot.alter('insert_col', 10, 40);\n * hot.setDataAtCell(1, 1, 'John');\n * hot.setDataAtCell(2, 2, 'Mark');\n * hot.setDataAtCell(3, 3, 'Ann');\n * hot.setDataAtCell(4, 4, 'Sophia');\n * hot.setDataAtCell(5, 5, 'Mia');\n * hot.selectCell(0, 0);\n * hot.resumeRender(); // It re-renders the table internally\n * ```\n */\n\n\n this.resumeRender = function () {\n var nextValue = this.renderSuspendedCounter - 1;\n this.renderSuspendedCounter = Math.max(nextValue, 0);\n\n if (!this.isRenderSuspended() && nextValue === this.renderSuspendedCounter) {\n if (this.renderCall) {\n this.render();\n } else {\n this._refreshBorders(null);\n }\n }\n };\n /**\n * Rerender the table. Calling this method starts the process of recalculating, redrawing and applying the changes\n * to the DOM. While rendering the table all cell renderers are recalled.\n *\n * Calling this method manually is not recommended. Handsontable tries to render itself by choosing the most\n * optimal moments in its lifecycle.\n *\n * @memberof Core#\n * @function render\n */\n\n\n this.render = function () {\n if (this.view) {\n this.renderCall = true;\n this.forceFullRender = true; // used when data was changed\n\n if (!this.isRenderSuspended()) {\n editorManager.lockEditor();\n\n this._refreshBorders(null);\n\n editorManager.unlockEditor();\n }\n }\n };\n /**\n * The method aggregates multi-line API calls into a callback and postpones the\n * table rendering process. After the execution of the operations, the table is\n * rendered once. As a result, it improves the performance of wrapped operations.\n * Without batching, a similar case could trigger multiple table render calls.\n *\n * @memberof Core#\n * @function batchRender\n * @param {Function} wrappedOperations Batched operations wrapped in a function.\n * @returns {*} Returns result from the wrappedOperations callback.\n * @since 8.3.0\n * @example\n * ```js\n * hot.batchRender(() => {\n * hot.alter('insert_row', 5, 45);\n * hot.alter('insert_col', 10, 40);\n * hot.setDataAtCell(1, 1, 'John');\n * hot.setDataAtCell(2, 2, 'Mark');\n * hot.setDataAtCell(3, 3, 'Ann');\n * hot.setDataAtCell(4, 4, 'Sophia');\n * hot.setDataAtCell(5, 5, 'Mia');\n * hot.selectCell(0, 0);\n * // The table will be rendered once after executing the callback\n * });\n * ```\n */\n\n\n this.batchRender = function (wrappedOperations) {\n this.suspendRender();\n var result = wrappedOperations();\n this.resumeRender();\n return result;\n };\n /**\n * Checks if the table indexes recalculation process was suspended. See explanation\n * in {@link Core#suspendExecution}.\n *\n * @memberof Core#\n * @function isExecutionSuspended\n * @since 8.3.0\n * @returns {boolean}\n */\n\n\n this.isExecutionSuspended = function () {\n return this.executionSuspendedCounter > 0;\n };\n /**\n * Suspends the execution process. It's helpful to wrap the table logic changes\n * such as index changes into one call after which the cache is updated. As a result,\n * it improves the performance of wrapped operations.\n *\n * The method is intended to be used by advanced users. Suspending the execution\n * process could cause visual glitches caused by not updated the internal table cache.\n *\n * @memberof Core#\n * @function suspendExecution\n * @since 8.3.0\n * @example\n * ```js\n * hot.suspendExecution();\n * const filters = hot.getPlugin('filters');\n *\n * filters.addCondition(2, 'contains', ['3']);\n * filters.filter();\n * hot.getPlugin('columnSorting').sort({ column: 1, sortOrder: 'desc' });\n * hot.resumeExecution(); // It updates the cache internally\n * ```\n */\n\n\n this.suspendExecution = function () {\n this.executionSuspendedCounter += 1;\n this.columnIndexMapper.suspendOperations();\n this.rowIndexMapper.suspendOperations();\n };\n /**\n * Resumes the execution process. In combination with the {@link Core#suspendExecution}\n * method it allows aggregating the table logic changes after which the cache is\n * updated. Resuming the state automatically invokes the table cache updating process.\n *\n * The method is intended to be used by advanced users. Suspending the execution\n * process could cause visual glitches caused by not updated the internal table cache.\n *\n * @memberof Core#\n * @function resumeExecution\n * @param {boolean} [forceFlushChanges=false] If `true`, the table internal data cache\n * is recalculated after the execution of the batched operations. For nested\n * {@link Core#batchExecution} calls, it can be desire to recalculate the table\n * after each batch.\n * @since 8.3.0\n * @example\n * ```js\n * hot.suspendExecution();\n * const filters = hot.getPlugin('filters');\n *\n * filters.addCondition(2, 'contains', ['3']);\n * filters.filter();\n * hot.getPlugin('columnSorting').sort({ column: 1, sortOrder: 'desc' });\n * hot.resumeExecution(); // It updates the cache internally\n * ```\n */\n\n\n this.resumeExecution = function () {\n var forceFlushChanges = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var nextValue = this.executionSuspendedCounter - 1;\n this.executionSuspendedCounter = Math.max(nextValue, 0);\n\n if (!this.isExecutionSuspended() && nextValue === this.executionSuspendedCounter || forceFlushChanges) {\n this.columnIndexMapper.resumeOperations();\n this.rowIndexMapper.resumeOperations();\n }\n };\n /**\n * The method aggregates multi-line API calls into a callback and postpones the\n * table execution process. After the execution of the operations, the internal table\n * cache is recalculated once. As a result, it improves the performance of wrapped\n * operations. Without batching, a similar case could trigger multiple table cache rebuilds.\n *\n * @memberof Core#\n * @function batchExecution\n * @param {Function} wrappedOperations Batched operations wrapped in a function.\n * @param {boolean} [forceFlushChanges=false] If `true`, the table internal data cache\n * is recalculated after the execution of the batched operations. For nested calls,\n * it can be a desire to recalculate the table after each batch.\n * @returns {*} Returns result from the wrappedOperations callback.\n * @since 8.3.0\n * @example\n * ```js\n * hot.batchExecution(() => {\n * const filters = hot.getPlugin('filters');\n *\n * filters.addCondition(2, 'contains', ['3']);\n * filters.filter();\n * hot.getPlugin('columnSorting').sort({ column: 1, sortOrder: 'desc' });\n * // The table cache will be recalculated once after executing the callback\n * });\n * ```\n */\n\n\n this.batchExecution = function (wrappedOperations) {\n var forceFlushChanges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n this.suspendExecution();\n var result = wrappedOperations();\n this.resumeExecution(forceFlushChanges);\n return result;\n };\n /**\n * It batches the rendering process and index recalculations. The method aggregates\n * multi-line API calls into a callback and postpones the table rendering process\n * as well aggregates the table logic changes such as index changes into one call\n * after which the cache is updated. After the execution of the operations, the\n * table is rendered, and the cache is updated once. As a result, it improves the\n * performance of wrapped operations.\n *\n * @memberof Core#\n * @function batch\n * @param {Function} wrappedOperations Batched operations wrapped in a function.\n * @returns {*} Returns result from the wrappedOperations callback.\n * @since 8.3.0\n * @example\n * ```js\n * hot.batch(() => {\n * hot.alter('insert_row', 5, 45);\n * hot.alter('insert_col', 10, 40);\n * hot.setDataAtCell(1, 1, 'x');\n * hot.setDataAtCell(2, 2, 'c');\n * hot.setDataAtCell(3, 3, 'v');\n * hot.setDataAtCell(4, 4, 'b');\n * hot.setDataAtCell(5, 5, 'n');\n * hot.selectCell(0, 0);\n *\n * const filters = hot.getPlugin('filters');\n *\n * filters.addCondition(2, 'contains', ['3']);\n * filters.filter();\n * hot.getPlugin('columnSorting').sort({ column: 1, sortOrder: 'desc' });\n * // The table will be re-rendered and cache will be recalculated once after executing the callback\n * });\n * ```\n */\n\n\n this.batch = function (wrappedOperations) {\n this.suspendRender();\n this.suspendExecution();\n var result = wrappedOperations();\n this.resumeExecution();\n this.resumeRender();\n return result;\n };\n /**\n * Updates dimensions of the table. The method compares previous dimensions with the current ones and updates accordingly.\n *\n * @memberof Core#\n * @function refreshDimensions\n * @fires Hooks#beforeRefreshDimensions\n * @fires Hooks#afterRefreshDimensions\n */\n\n\n this.refreshDimensions = function () {\n if (!instance.view) {\n return;\n }\n\n var _instance$view$getLas = instance.view.getLastSize(),\n lastWidth = _instance$view$getLas.width,\n lastHeight = _instance$view$getLas.height;\n\n var _instance$rootElement = instance.rootElement.getBoundingClientRect(),\n width = _instance$rootElement.width,\n height = _instance$rootElement.height;\n\n var isSizeChanged = width !== lastWidth || height !== lastHeight;\n var isResizeBlocked = instance.runHooks('beforeRefreshDimensions', {\n width: lastWidth,\n height: lastHeight\n }, {\n width: width,\n height: height\n }, isSizeChanged) === false;\n\n if (isResizeBlocked) {\n return;\n }\n\n if (isSizeChanged || instance.view.wt.wtOverlays.scrollableElement === instance.rootWindow) {\n instance.view.setLastSize(width, height);\n instance.render();\n }\n\n instance.runHooks('afterRefreshDimensions', {\n width: lastWidth,\n height: lastHeight\n }, {\n width: width,\n height: height\n }, isSizeChanged);\n };\n /**\n * Loads new data to Handsontable. Loading new data resets the cell meta.\n * Since 8.0.0 loading new data also resets states corresponding to rows and columns\n * (for example, row/column sequence, column width, row height, frozen columns etc.).\n *\n * @memberof Core#\n * @function loadData\n * @param {Array} data Array of arrays or array of objects containing data.\n * @fires Hooks#beforeLoadData\n * @fires Hooks#afterLoadData\n * @fires Hooks#afterChange\n */\n\n\n this.loadData = function (data) {\n if (Array.isArray(tableMeta.dataSchema)) {\n instance.dataType = 'array';\n } else if (isFunction(tableMeta.dataSchema)) {\n instance.dataType = 'function';\n } else {\n instance.dataType = 'object';\n }\n\n if (datamap) {\n datamap.destroy();\n }\n\n datamap = new DataMap(instance, data, tableMeta);\n\n if (_typeof(data) === 'object' && data !== null) {\n if (!(data.push && data.splice)) {\n // check if data is array. Must use duck-type check so Backbone Collections also pass it\n // when data is not an array, attempt to make a single-row array of it\n // eslint-disable-next-line no-param-reassign\n data = [data];\n }\n } else if (data === null) {\n var dataSchema = datamap.getSchema(); // eslint-disable-next-line no-param-reassign\n\n data = [];\n var row;\n var r = 0;\n var rlen = 0;\n\n for (r = 0, rlen = tableMeta.startRows; r < rlen; r++) {\n if ((instance.dataType === 'object' || instance.dataType === 'function') && tableMeta.dataSchema) {\n row = deepClone(dataSchema);\n data.push(row);\n } else if (instance.dataType === 'array') {\n row = deepClone(dataSchema[0]);\n data.push(row);\n } else {\n row = [];\n\n for (var c = 0, clen = tableMeta.startCols; c < clen; c++) {\n row.push(null);\n }\n\n data.push(row);\n }\n }\n } else {\n throw new Error(\"loadData only accepts array of objects or array of arrays (\".concat(_typeof(data), \" given)\"));\n }\n\n if (Array.isArray(data[0])) {\n instance.dataType = 'array';\n }\n\n tableMeta.data = data;\n instance.runHooks('beforeLoadData', data, firstRun);\n datamap.dataSource = data;\n dataSource.data = data;\n dataSource.dataType = instance.dataType;\n dataSource.colToProp = datamap.colToProp.bind(datamap);\n dataSource.propToCol = datamap.propToCol.bind(datamap);\n dataSource.countCachedColumns = datamap.countCachedColumns.bind(datamap);\n metaManager.clearCellsCache();\n instance.initIndexMappers();\n grid.adjustRowsAndCols();\n instance.runHooks('afterLoadData', data, firstRun);\n\n if (firstRun) {\n firstRun = [null, 'loadData'];\n } else {\n instance.runHooks('afterChange', null, 'loadData');\n instance.render();\n }\n };\n /**\n * Init index mapper which manage indexes assigned to the data.\n *\n * @private\n */\n\n\n this.initIndexMappers = function () {\n var columnsSettings = tableMeta.columns;\n var finalNrOfColumns = 0; // We will check number of columns when the `columns` property was defined as an array. Columns option may\n // narrow down or expand displayed dataset in that case.\n\n if (Array.isArray(columnsSettings)) {\n finalNrOfColumns = columnsSettings.length;\n } else if (isFunction(columnsSettings)) {\n if (instance.dataType === 'array') {\n var nrOfSourceColumns = this.countSourceCols();\n\n for (var columnIndex = 0; columnIndex < nrOfSourceColumns; columnIndex += 1) {\n if (columnsSettings(columnIndex)) {\n finalNrOfColumns += 1;\n }\n } // Extended dataset by the `columns` property? Moved code right from the refactored `countCols` method.\n\n } else if (instance.dataType === 'object' || instance.dataType === 'function') {\n finalNrOfColumns = datamap.colToPropCache.length;\n } // In some cases we need to check columns length from the schema, i.e. `data` may be empty.\n\n } else if (isDefined(tableMeta.dataSchema)) {\n var schema = datamap.getSchema(); // Schema may be defined as an array of objects. Each object will define column.\n\n finalNrOfColumns = Array.isArray(schema) ? schema.length : deepObjectSize(schema);\n } else {\n // We init index mappers by length of source data to provide indexes also for skipped indexes.\n finalNrOfColumns = this.countSourceCols();\n }\n\n this.columnIndexMapper.initToLength(finalNrOfColumns);\n this.rowIndexMapper.initToLength(this.countSourceRows());\n };\n /**\n * Returns the current data object (the same one that was passed by `data` configuration option or `loadData` method,\n * unless some modifications have been applied (i.e. Sequence of rows/columns was changed, some row/column was skipped).\n * If that's the case - use the {@link Core#getSourceData} method.).\n *\n * Optionally you can provide cell range by defining `row`, `column`, `row2`, `column2` to get only a fragment of table data.\n *\n * @memberof Core#\n * @function getData\n * @param {number} [row] From visual row index.\n * @param {number} [column] From visual column index.\n * @param {number} [row2] To visual row index.\n * @param {number} [column2] To visual column index.\n * @returns {Array[]} Array with the data.\n * @example\n * ```js\n * // Get all data (in order how it is rendered in the table).\n * hot.getData();\n * // Get data fragment (from top-left 0, 0 to bottom-right 3, 3).\n * hot.getData(3, 3);\n * // Get data fragment (from top-left 2, 1 to bottom-right 3, 3).\n * hot.getData(2, 1, 3, 3);\n * ```\n */\n\n\n this.getData = function (row, column, row2, column2) {\n if (isUndefined(row)) {\n return datamap.getAll();\n }\n\n return datamap.getRange(new CellCoords(row, column), new CellCoords(row2, column2), datamap.DESTINATION_RENDERER);\n };\n /**\n * Returns a string value of the selected range. Each column is separated by tab, each row is separated by a new\n * line character (see {@link DataMap#getCopyableText}).\n *\n * @memberof Core#\n * @function getCopyableText\n * @param {number} startRow From visual row index.\n * @param {number} startCol From visual column index.\n * @param {number} endRow To visual row index.\n * @param {number} endCol To visual column index.\n * @returns {string}\n */\n\n\n this.getCopyableText = function (startRow, startCol, endRow, endCol) {\n return datamap.getCopyableText(new CellCoords(startRow, startCol), new CellCoords(endRow, endCol));\n };\n /**\n * Returns the data's copyable value at specified `row` and `column` index (see {@link DataMap#getCopyable}).\n *\n * @memberof Core#\n * @function getCopyableData\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @returns {string}\n */\n\n\n this.getCopyableData = function (row, column) {\n return datamap.getCopyable(row, datamap.colToProp(column));\n };\n /**\n * Returns schema provided by constructor settings. If it doesn't exist then it returns the schema based on the data\n * structure in the first row.\n *\n * @memberof Core#\n * @function getSchema\n * @returns {object} Schema object.\n */\n\n\n this.getSchema = function () {\n return datamap.getSchema();\n };\n /**\n * Use it if you need to change configuration after initialization. The `settings` argument is an object containing the new\n * settings, declared the same way as in the initial settings object.\n *\n * __Note__, that although the `updateSettings` method doesn't overwrite the previously declared settings, it might reset\n * the settings made post-initialization. (for example - ignore changes made using the columnResize feature).\n *\n * Since 8.0.0 passing `columns` or `data` inside `settings` objects will result in resetting states corresponding to rows and columns\n * (for example, row/column sequence, column width, row height, frozen columns etc.).\n *\n * @memberof Core#\n * @function updateSettings\n * @param {object} settings New settings object (see {@link Options}).\n * @param {boolean} [init=false] Internally used for in initialization mode.\n * @example\n * ```js\n * hot.updateSettings({\n * contextMenu: true,\n * colHeaders: true,\n * fixedRowsTop: 2\n * });\n * ```\n * @fires Hooks#afterCellMetaReset\n * @fires Hooks#afterUpdateSettings\n */\n\n\n this.updateSettings = function (settings) {\n var init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var columnsAsFunc = false;\n var i;\n var j;\n\n if (isDefined(settings.rows)) {\n throw new Error('The \"rows\" setting is no longer supported. Do you mean startRows, minRows or maxRows?');\n }\n\n if (isDefined(settings.cols)) {\n throw new Error('The \"cols\" setting is no longer supported. Do you mean startCols, minCols or maxCols?');\n }\n\n if (isDefined(settings.ganttChart)) {\n throw new Error('Since 8.0.0 the \"ganttChart\" setting is no longer supported.');\n } // eslint-disable-next-line no-restricted-syntax\n\n\n for (i in settings) {\n if (i === 'data') {\n /* eslint-disable-next-line no-continue */\n continue; // loadData will be triggered later\n } else if (i === 'language') {\n setLanguage(settings.language);\n /* eslint-disable-next-line no-continue */\n\n continue;\n } else if (i === 'className') {\n setClassName('className', settings.className);\n } else if (i === 'tableClassName' && instance.table) {\n setClassName('tableClassName', settings.tableClassName);\n instance.view.wt.wtOverlays.syncOverlayTableClassNames();\n } else if (Hooks.getSingleton().isRegistered(i) || Hooks.getSingleton().isDeprecated(i)) {\n if (isFunction(settings[i]) || Array.isArray(settings[i])) {\n settings[i].initialHook = true;\n instance.addHook(i, settings[i]);\n }\n } else if (!init && hasOwnProperty(settings, i)) {\n // Update settings\n globalMeta[i] = settings[i];\n }\n } // Load data or create data map\n\n\n if (settings.data === void 0 && tableMeta.data === void 0) {\n instance.loadData(null); // data source created just now\n } else if (settings.data !== void 0) {\n instance.loadData(settings.data); // data source given as option\n } else if (settings.columns !== void 0) {\n datamap.createMap(); // The `column` property has changed - dataset may be expanded or narrowed down. The `loadData` do the same.\n\n instance.initIndexMappers();\n }\n\n var clen = instance.countCols();\n var columnSetting = tableMeta.columns; // Init columns constructors configuration\n\n if (columnSetting && isFunction(columnSetting)) {\n columnsAsFunc = true;\n } // Clear cell meta cache\n\n\n if (settings.cell !== void 0 || settings.cells !== void 0 || settings.columns !== void 0) {\n metaManager.clearCache();\n }\n\n if (clen > 0) {\n for (i = 0, j = 0; i < clen; i++) {\n // Use settings provided by user\n if (columnSetting) {\n var column = columnsAsFunc ? columnSetting(i) : columnSetting[j];\n\n if (column) {\n metaManager.updateColumnMeta(j, column);\n }\n }\n\n j += 1;\n }\n }\n\n if (isDefined(settings.cell)) {\n objectEach(settings.cell, function (cell) {\n instance.setCellMetaObject(cell.row, cell.col, cell);\n });\n }\n\n instance.runHooks('afterCellMetaReset');\n var currentHeight = instance.rootElement.style.height;\n\n if (currentHeight !== '') {\n currentHeight = parseInt(instance.rootElement.style.height, 10);\n }\n\n var height = settings.height;\n\n if (isFunction(height)) {\n height = height();\n }\n\n if (init) {\n var initialStyle = instance.rootElement.getAttribute('style');\n\n if (initialStyle) {\n instance.rootElement.setAttribute('data-initialstyle', instance.rootElement.getAttribute('style'));\n }\n }\n\n if (height === null) {\n var _initialStyle = instance.rootElement.getAttribute('data-initialstyle');\n\n if (_initialStyle && (_initialStyle.indexOf('height') > -1 || _initialStyle.indexOf('overflow') > -1)) {\n instance.rootElement.setAttribute('style', _initialStyle);\n } else {\n instance.rootElement.style.height = '';\n instance.rootElement.style.overflow = '';\n }\n } else if (height !== void 0) {\n instance.rootElement.style.height = isNaN(height) ? \"\".concat(height) : \"\".concat(height, \"px\");\n instance.rootElement.style.overflow = 'hidden';\n }\n\n if (typeof settings.width !== 'undefined') {\n var width = settings.width;\n\n if (isFunction(width)) {\n width = width();\n }\n\n instance.rootElement.style.width = isNaN(width) ? \"\".concat(width) : \"\".concat(width, \"px\");\n }\n\n if (!init) {\n if (instance.view) {\n instance.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked();\n instance.view.wt.exportSettingsAsClassNames();\n }\n\n instance.runHooks('afterUpdateSettings', settings);\n }\n\n grid.adjustRowsAndCols();\n\n if (instance.view && !firstRun) {\n instance.forceFullRender = true; // used when data was changed\n\n editorManager.lockEditor();\n\n instance._refreshBorders(null);\n\n editorManager.unlockEditor();\n }\n\n if (!init && instance.view && (currentHeight === '' || height === '' || height === void 0) && currentHeight !== height) {\n instance.view.wt.wtOverlays.updateMainScrollableElements();\n }\n };\n /**\n * Get value from the selected cell.\n *\n * @memberof Core#\n * @function getValue\n * @returns {*} Value of selected cell.\n */\n\n\n this.getValue = function () {\n var sel = instance.getSelectedLast();\n\n if (tableMeta.getValue) {\n if (isFunction(tableMeta.getValue)) {\n return tableMeta.getValue.call(instance);\n } else if (sel) {\n return instance.getData()[sel[0][0]][tableMeta.getValue];\n }\n } else if (sel) {\n return instance.getDataAtCell(sel[0], sel[1]);\n }\n };\n /**\n * Returns the object settings.\n *\n * @memberof Core#\n * @function getSettings\n * @returns {object} Object containing the current table settings.\n */\n\n\n this.getSettings = function () {\n return tableMeta;\n };\n /**\n * Clears the data from the table (the table settings remain intact).\n *\n * @memberof Core#\n * @function clear\n */\n\n\n this.clear = function () {\n this.selectAll();\n this.emptySelectedCells();\n };\n /**\n * Allows altering the table structure by either inserting/removing rows or columns.\n * This method works with an array data structure only.\n *\n * @memberof Core#\n * @function alter\n * @param {string} action Possible alter operations:\n * * `'insert_row'`\n * * `'insert_col'`\n * * `'remove_row'`\n * * `'remove_col'`.\n * @param {number|number[]} index Visual index of the row/column before which the new row/column will be\n * inserted/removed or an array of arrays in format `[[index, amount],...]`.\n * @param {number} [amount=1] Amount of rows/columns to be inserted or removed.\n * @param {string} [source] Source indicator.\n * @param {boolean} [keepEmptyRows] Flag for preventing deletion of empty rows.\n * @example\n * ```js\n * // Insert new row above the row at given visual index.\n * hot.alter('insert_row', 10);\n * // Insert 3 new columns before 10th column.\n * hot.alter('insert_col', 10, 3);\n * // Remove 2 rows starting from 10th row.\n * hot.alter('remove_row', 10, 2);\n * // Remove 5 non-contiquous rows (it removes 3 rows from visual index 1 and 2 rows from visual index 5).\n * hot.alter('remove_row', [[1, 3], [5, 2]]);\n * ```\n */\n\n\n this.alter = function (action, index, amount, source, keepEmptyRows) {\n grid.alter(action, index, amount, source, keepEmptyRows);\n };\n /**\n * Returns a TD element for the given `row` and `column` arguments, if it is rendered on screen.\n * Returns `null` if the TD is not rendered on screen (probably because that part of the table is not visible).\n *\n * @memberof Core#\n * @function getCell\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {boolean} [topmost=false] If set to `true`, it returns the TD element from the topmost overlay. For example,\n * if the wanted cell is in the range of fixed rows, it will return a TD element from the `top` overlay.\n * @returns {HTMLTableCellElement|null} The cell's TD element.\n */\n\n\n this.getCell = function (row, column) {\n var topmost = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var renderableColumnIndex = column; // Handling also column headers.\n\n var renderableRowIndex = row; // Handling also row headers.\n\n if (column >= 0) {\n if (this.columnIndexMapper.isHidden(this.toPhysicalColumn(column))) {\n return null;\n }\n\n renderableColumnIndex = this.columnIndexMapper.getRenderableFromVisualIndex(column);\n }\n\n if (row >= 0) {\n if (this.rowIndexMapper.isHidden(this.toPhysicalRow(row))) {\n return null;\n }\n\n renderableRowIndex = this.rowIndexMapper.getRenderableFromVisualIndex(row);\n }\n\n if (renderableRowIndex === null || renderableColumnIndex === null) {\n return null;\n }\n\n return instance.view.getCellAtCoords(new CellCoords(renderableRowIndex, renderableColumnIndex), topmost);\n };\n /**\n * Returns the coordinates of the cell, provided as a HTML table cell element.\n *\n * @memberof Core#\n * @function getCoords\n * @param {HTMLTableCellElement} element The HTML Element representing the cell.\n * @returns {CellCoords|null} Visual coordinates object.\n * @example\n * ```js\n * hot.getCoords(hot.getCell(1, 1));\n * // it returns CellCoords object instance with props row: 1 and col: 1.\n * ```\n */\n\n\n this.getCoords = function (element) {\n var renderableCoords = this.view.wt.wtTable.getCoords(element);\n\n if (renderableCoords === null) {\n return null;\n }\n\n var renderableRow = renderableCoords.row,\n renderableColumn = renderableCoords.col;\n var visualRow = renderableRow;\n var visualColumn = renderableColumn;\n\n if (renderableRow >= 0) {\n visualRow = this.rowIndexMapper.getVisualFromRenderableIndex(renderableRow);\n }\n\n if (renderableColumn >= 0) {\n visualColumn = this.columnIndexMapper.getVisualFromRenderableIndex(renderableColumn);\n }\n\n return new CellCoords(visualRow, visualColumn);\n };\n /**\n * Returns the property name that corresponds with the given column index (see {@link DataMap#colToProp}).\n * If the data source is an array of arrays, it returns the columns index.\n *\n * @memberof Core#\n * @function colToProp\n * @param {number} column Visual column index.\n * @returns {string|number} Column property or physical column index.\n */\n\n\n this.colToProp = function (column) {\n return datamap.colToProp(column);\n };\n /**\n * Returns column index that corresponds with the given property (see {@link DataMap#propToCol}).\n *\n * @memberof Core#\n * @function propToCol\n * @param {string|number} prop Property name or physical column index.\n * @returns {number} Visual column index.\n */\n\n\n this.propToCol = function (prop) {\n return datamap.propToCol(prop);\n };\n /**\n * Translate physical row index into visual.\n *\n * This method is useful when you want to retrieve visual row index which can be reordered, moved or trimmed\n * based on a physical index.\n *\n * @memberof Core#\n * @function toVisualRow\n * @param {number} row Physical row index.\n * @returns {number} Returns visual row index.\n */\n\n\n this.toVisualRow = function (row) {\n return _this.rowIndexMapper.getVisualFromPhysicalIndex(row);\n };\n /**\n * Translate physical column index into visual.\n *\n * This method is useful when you want to retrieve visual column index which can be reordered, moved or trimmed\n * based on a physical index.\n *\n * @memberof Core#\n * @function toVisualColumn\n * @param {number} column Physical column index.\n * @returns {number} Returns visual column index.\n */\n\n\n this.toVisualColumn = function (column) {\n return _this.columnIndexMapper.getVisualFromPhysicalIndex(column);\n };\n /**\n * Translate visual row index into physical.\n *\n * This method is useful when you want to retrieve physical row index based on a visual index which can be\n * reordered, moved or trimmed.\n *\n * @memberof Core#\n * @function toPhysicalRow\n * @param {number} row Visual row index.\n * @returns {number} Returns physical row index.\n */\n\n\n this.toPhysicalRow = function (row) {\n return _this.rowIndexMapper.getPhysicalFromVisualIndex(row);\n };\n /**\n * Translate visual column index into physical.\n *\n * This method is useful when you want to retrieve physical column index based on a visual index which can be\n * reordered, moved or trimmed.\n *\n * @memberof Core#\n * @function toPhysicalColumn\n * @param {number} column Visual column index.\n * @returns {number} Returns physical column index.\n */\n\n\n this.toPhysicalColumn = function (column) {\n return _this.columnIndexMapper.getPhysicalFromVisualIndex(column);\n };\n /**\n * @description\n * Returns the cell value at `row`, `column`.\n *\n * __Note__: If data is reordered, sorted or trimmed, the currently visible order will be used.\n *\n * @memberof Core#\n * @function getDataAtCell\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @returns {*} Data at cell.\n */\n\n\n this.getDataAtCell = function (row, column) {\n return datamap.get(row, datamap.colToProp(column));\n };\n /**\n * Returns value at visual `row` and `prop` indexes (see {@link DataMap#get}).\n *\n * __Note__: If data is reordered, sorted or trimmed, the currently visible order will be used.\n *\n * @memberof Core#\n * @function getDataAtRowProp\n * @param {number} row Visual row index.\n * @param {string} prop Property name.\n * @returns {*} Cell value.\n */\n\n\n this.getDataAtRowProp = function (row, prop) {\n return datamap.get(row, prop);\n };\n /**\n * @description\n * Returns array of column values from the data source.\n *\n * __Note__: If columns were reordered or sorted, the currently visible order will be used.\n *\n * @memberof Core#\n * @function getDataAtCol\n * @param {number} column Visual column index.\n * @returns {Array} Array of cell values.\n */\n\n\n this.getDataAtCol = function (column) {\n var _ref12;\n\n return (_ref12 = []).concat.apply(_ref12, _toConsumableArray(datamap.getRange(new CellCoords(0, column), new CellCoords(tableMeta.data.length - 1, column), datamap.DESTINATION_RENDERER)));\n };\n /**\n * Given the object property name (e.g. `'first.name'` or `'0'`), returns an array of column's values from the table data.\n * You can also provide a column index as the first argument.\n *\n * @memberof Core#\n * @function getDataAtProp\n * @param {string|number} prop Property name or physical column index.\n * @returns {Array} Array of cell values.\n */\n // TODO: Getting data from `datamap` should work on visual indexes.\n\n\n this.getDataAtProp = function (prop) {\n var _ref13;\n\n var range = datamap.getRange(new CellCoords(0, datamap.propToCol(prop)), new CellCoords(tableMeta.data.length - 1, datamap.propToCol(prop)), datamap.DESTINATION_RENDERER);\n return (_ref13 = []).concat.apply(_ref13, _toConsumableArray(range));\n };\n /**\n * Returns a clone of the source data object.\n * Optionally you can provide a cell range by using the `row`, `column`, `row2`, `column2` arguments, to get only a\n * fragment of the table data.\n *\n * __Note__: This method does not participate in data transformation. If the visual data of the table is reordered,\n * sorted or trimmed only physical indexes are correct.\n *\n * @memberof Core#\n * @function getSourceData\n * @param {number} [row] From physical row index.\n * @param {number} [column] From physical column index (or visual index, if data type is an array of objects).\n * @param {number} [row2] To physical row index.\n * @param {number} [column2] To physical column index (or visual index, if data type is an array of objects).\n * @returns {Array[]|object[]} The table data.\n */\n\n\n this.getSourceData = function (row, column, row2, column2) {\n var data;\n\n if (row === void 0) {\n data = dataSource.getData();\n } else {\n data = dataSource.getByRange(new CellCoords(row, column), new CellCoords(row2, column2));\n }\n\n return data;\n };\n /**\n * Returns the source data object as an arrays of arrays format even when source data was provided in another format.\n * Optionally you can provide a cell range by using the `row`, `column`, `row2`, `column2` arguments, to get only a\n * fragment of the table data.\n *\n * __Note__: This method does not participate in data transformation. If the visual data of the table is reordered,\n * sorted or trimmed only physical indexes are correct.\n *\n * @memberof Core#\n * @function getSourceDataArray\n * @param {number} [row] From physical row index.\n * @param {number} [column] From physical column index (or visual index, if data type is an array of objects).\n * @param {number} [row2] To physical row index.\n * @param {number} [column2] To physical column index (or visual index, if data type is an array of objects).\n * @returns {Array} An array of arrays.\n */\n\n\n this.getSourceDataArray = function (row, column, row2, column2) {\n var data;\n\n if (row === void 0) {\n data = dataSource.getData(true);\n } else {\n data = dataSource.getByRange(new CellCoords(row, column), new CellCoords(row2, column2), true);\n }\n\n return data;\n };\n /**\n * Returns an array of column values from the data source.\n *\n * @memberof Core#\n * @function getSourceDataAtCol\n * @param {number} column Visual column index.\n * @returns {Array} Array of the column's cell values.\n */\n // TODO: Getting data from `sourceData` should work always on physical indexes.\n\n\n this.getSourceDataAtCol = function (column) {\n return dataSource.getAtColumn(column);\n };\n /* eslint-disable jsdoc/require-param */\n\n /**\n * Set the provided value in the source data set at the provided coordinates.\n *\n * @memberof Core#\n * @function setSourceDataAtCell\n * @param {number|Array} row Physical row index or array of changes in format `[[row, prop, value], ...]`.\n * @param {number|string} column Physical column index / prop name.\n * @param {*} value The value to be set at the provided coordinates.\n * @param {string} [source] Source of the change as a string.\n */\n\n /* eslint-enable jsdoc/require-param */\n\n\n this.setSourceDataAtCell = function (row, column, value, source) {\n var input = setDataInputToArray(row, column, value);\n var isThereAnySetSourceListener = this.hasHook('afterSetSourceDataAtCell');\n var changesForHook = [];\n\n if (isThereAnySetSourceListener) {\n arrayEach(input, function (_ref14) {\n var _ref15 = _slicedToArray(_ref14, 3),\n changeRow = _ref15[0],\n changeProp = _ref15[1],\n changeValue = _ref15[2];\n\n changesForHook.push([changeRow, changeProp, dataSource.getAtCell(changeRow, changeProp), // The previous value.\n changeValue]);\n });\n }\n\n arrayEach(input, function (_ref16) {\n var _ref17 = _slicedToArray(_ref16, 3),\n changeRow = _ref17[0],\n changeProp = _ref17[1],\n changeValue = _ref17[2];\n\n dataSource.setAtCell(changeRow, changeProp, changeValue);\n });\n\n if (isThereAnySetSourceListener) {\n this.runHooks('afterSetSourceDataAtCell', changesForHook, source);\n }\n\n this.render();\n var activeEditor = instance.getActiveEditor();\n\n if (activeEditor && isDefined(activeEditor.refreshValue)) {\n activeEditor.refreshValue();\n }\n };\n /**\n * Returns a single row of the data (array or object, depending on what data format you use).\n *\n * __Note__: This method does not participate in data transformation. If the visual data of the table is reordered,\n * sorted or trimmed only physical indexes are correct.\n *\n * @memberof Core#\n * @function getSourceDataAtRow\n * @param {number} row Physical row index.\n * @returns {Array|object} Single row of data.\n */\n\n\n this.getSourceDataAtRow = function (row) {\n return dataSource.getAtRow(row);\n };\n /**\n * Returns a single value from the data source.\n *\n * @memberof Core#\n * @function getSourceDataAtCell\n * @param {number} row Physical row index.\n * @param {number} column Visual column index.\n * @returns {*} Cell data.\n */\n // TODO: Getting data from `sourceData` should work always on physical indexes.\n\n\n this.getSourceDataAtCell = function (row, column) {\n return dataSource.getAtCell(row, column);\n };\n /**\n * @description\n * Returns a single row of the data.\n *\n * __Note__: If rows were reordered, sorted or trimmed, the currently visible order will be used.\n *\n * @memberof Core#\n * @function getDataAtRow\n * @param {number} row Visual row index.\n * @returns {Array} Array of row's cell data.\n */\n\n\n this.getDataAtRow = function (row) {\n var data = datamap.getRange(new CellCoords(row, 0), new CellCoords(row, this.countCols() - 1), datamap.DESTINATION_RENDERER);\n return data[0] || [];\n };\n /**\n * @description\n * Returns a data type defined in the Handsontable settings under the `type` key ([Options#type](https://handsontable.com/docs/Options.html#type)).\n * If there are cells with different types in the selected range, it returns `'mixed'`.\n *\n * __Note__: If data is reordered, sorted or trimmed, the currently visible order will be used.\n *\n * @memberof Core#\n * @function getDataType\n * @param {number} rowFrom From visual row index.\n * @param {number} columnFrom From visual column index.\n * @param {number} rowTo To visual row index.\n * @param {number} columnTo To visual column index.\n * @returns {string} Cell type (e.q: `'mixed'`, `'text'`, `'numeric'`, `'autocomplete'`).\n */\n\n\n this.getDataType = function (rowFrom, columnFrom, rowTo, columnTo) {\n var _this3 = this;\n\n var coords = rowFrom === void 0 ? [0, 0, this.countRows(), this.countCols()] : [rowFrom, columnFrom, rowTo, columnTo];\n var rowStart = coords[0],\n columnStart = coords[1];\n var rowEnd = coords[2],\n columnEnd = coords[3];\n var previousType = null;\n var currentType = null;\n\n if (rowEnd === void 0) {\n rowEnd = rowStart;\n }\n\n if (columnEnd === void 0) {\n columnEnd = columnStart;\n }\n\n var type = 'mixed';\n rangeEach(Math.max(Math.min(rowStart, rowEnd), 0), Math.max(rowStart, rowEnd), function (row) {\n var isTypeEqual = true;\n rangeEach(Math.max(Math.min(columnStart, columnEnd), 0), Math.max(columnStart, columnEnd), function (column) {\n var cellType = _this3.getCellMeta(row, column);\n\n currentType = cellType.type;\n\n if (previousType) {\n isTypeEqual = previousType === currentType;\n } else {\n previousType = currentType;\n }\n\n return isTypeEqual;\n });\n type = isTypeEqual ? currentType : 'mixed';\n return isTypeEqual;\n });\n return type;\n };\n /**\n * Remove a property defined by the `key` argument from the cell meta object for the provided `row` and `column` coordinates.\n *\n * @memberof Core#\n * @function removeCellMeta\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} key Property name.\n * @fires Hooks#beforeRemoveCellMeta\n * @fires Hooks#afterRemoveCellMeta\n */\n\n\n this.removeCellMeta = function (row, column, key) {\n var _ref18 = [this.toPhysicalRow(row), this.toPhysicalColumn(column)],\n physicalRow = _ref18[0],\n physicalColumn = _ref18[1];\n var cachedValue = metaManager.getCellMeta(physicalRow, physicalColumn, key);\n var hookResult = instance.runHooks('beforeRemoveCellMeta', row, column, key, cachedValue);\n\n if (hookResult !== false) {\n metaManager.removeCellMeta(physicalRow, physicalColumn, key);\n instance.runHooks('afterRemoveCellMeta', row, column, key, cachedValue);\n }\n\n cachedValue = null;\n };\n /**\n * Removes or adds one or more rows of the cell meta objects to the cell meta collections.\n *\n * @since 0.30.0\n * @memberof Core#\n * @function spliceCellsMeta\n * @param {number} visualIndex A visual index that specifies at what position to add/remove items.\n * @param {number} [deleteAmount=0] The number of items to be removed. If set to 0, no cell meta objects will be removed.\n * @param {...object} [cellMetaRows] The new cell meta row objects to be added to the cell meta collection.\n */\n\n\n this.spliceCellsMeta = function (visualIndex) {\n var _this4 = this;\n\n var deleteAmount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n for (var _len3 = arguments.length, cellMetaRows = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n cellMetaRows[_key3 - 2] = arguments[_key3];\n }\n\n if (cellMetaRows.length > 0 && !Array.isArray(cellMetaRows[0])) {\n throw new Error('The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.');\n }\n\n if (deleteAmount > 0) {\n metaManager.removeRow(this.toPhysicalRow(visualIndex), deleteAmount);\n }\n\n if (cellMetaRows.length > 0) {\n arrayEach(cellMetaRows.reverse(), function (cellMetaRow) {\n metaManager.createRow(_this4.toPhysicalRow(visualIndex));\n arrayEach(cellMetaRow, function (cellMeta, columnIndex) {\n return _this4.setCellMetaObject(visualIndex, columnIndex, cellMeta);\n });\n });\n }\n };\n /**\n * Set cell meta data object defined by `prop` to the corresponding params `row` and `column`.\n *\n * @memberof Core#\n * @function setCellMetaObject\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {object} prop Meta object.\n */\n\n\n this.setCellMetaObject = function (row, column, prop) {\n var _this5 = this;\n\n if (_typeof(prop) === 'object') {\n objectEach(prop, function (value, key) {\n _this5.setCellMeta(row, column, key, value);\n });\n }\n };\n /**\n * Sets a property defined by the `key` property to the meta object of a cell corresponding to params `row` and `column`.\n *\n * @memberof Core#\n * @function setCellMeta\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} key Property name.\n * @param {string} value Property value.\n * @fires Hooks#beforeSetCellMeta\n * @fires Hooks#afterSetCellMeta\n */\n\n\n this.setCellMeta = function (row, column, key, value) {\n var allowSetCellMeta = instance.runHooks('beforeSetCellMeta', row, column, key, value);\n\n if (allowSetCellMeta === false) {\n return;\n }\n\n var physicalRow = row;\n var physicalColumn = column;\n\n if (row < this.countRows()) {\n physicalRow = this.toPhysicalRow(row);\n }\n\n if (column < this.countCols()) {\n physicalColumn = this.toPhysicalColumn(column);\n }\n\n metaManager.setCellMeta(physicalRow, physicalColumn, key, value);\n instance.runHooks('afterSetCellMeta', row, column, key, value);\n };\n /**\n * Get all the cells meta settings at least once generated in the table (in order of cell initialization).\n *\n * @memberof Core#\n * @function getCellsMeta\n * @returns {Array} Returns an array of ColumnSettings object instances.\n */\n\n\n this.getCellsMeta = function () {\n return metaManager.getCellsMeta();\n };\n /**\n * Returns the cell properties object for the given `row` and `column` coordinates.\n *\n * @memberof Core#\n * @function getCellMeta\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @returns {object} The cell properties object.\n * @fires Hooks#beforeGetCellMeta\n * @fires Hooks#afterGetCellMeta\n */\n\n\n this.getCellMeta = function (row, column) {\n var physicalRow = this.toPhysicalRow(row);\n var physicalColumn = this.toPhysicalColumn(column);\n\n if (physicalRow === null) {\n physicalRow = row;\n }\n\n if (physicalColumn === null) {\n physicalColumn = column;\n }\n\n var prop = datamap.colToProp(column);\n var cellProperties = metaManager.getCellMeta(physicalRow, physicalColumn); // TODO(perf): Add assigning this props and executing below code only once per table render cycle.\n\n cellProperties.row = physicalRow;\n cellProperties.col = physicalColumn;\n cellProperties.visualRow = row;\n cellProperties.visualCol = column;\n cellProperties.prop = prop;\n cellProperties.instance = instance;\n instance.runHooks('beforeGetCellMeta', row, column, cellProperties); // for `type` added or changed in beforeGetCellMeta\n\n if (instance.hasHook('beforeGetCellMeta') && hasOwnProperty(cellProperties, 'type')) {\n metaManager.updateCellMeta(physicalRow, physicalColumn, {\n type: cellProperties.type\n });\n }\n\n if (cellProperties.cells) {\n var settings = cellProperties.cells(physicalRow, physicalColumn, prop);\n\n if (settings) {\n metaManager.updateCellMeta(physicalRow, physicalColumn, settings);\n }\n }\n\n instance.runHooks('afterGetCellMeta', row, column, cellProperties);\n return cellProperties;\n };\n /**\n * Returns an array of cell meta objects for specified physical row index.\n *\n * @memberof Core#\n * @function getCellMetaAtRow\n * @param {number} row Physical row index.\n * @returns {Array}\n */\n\n\n this.getCellMetaAtRow = function (row) {\n return metaManager.getCellsMetaAtRow(row);\n };\n /**\n * Checks if the data format and config allows user to modify the column structure.\n *\n * @memberof Core#\n * @function isColumnModificationAllowed\n * @returns {boolean}\n */\n\n\n this.isColumnModificationAllowed = function () {\n return !(instance.dataType === 'object' || tableMeta.columns);\n };\n\n var rendererLookup = cellMethodLookupFactory('renderer');\n /**\n * Returns the cell renderer function by given `row` and `column` arguments.\n *\n * @memberof Core#\n * @function getCellRenderer\n * @param {number|object} row Visual row index or cell meta object (see {@link Core#getCellMeta}).\n * @param {number} column Visual column index.\n * @returns {Function} The renderer function.\n * @example\n * ```js\n * // Get cell renderer using `row` and `column` coordinates.\n * hot.getCellRenderer(1, 1);\n * // Get cell renderer using cell meta object.\n * hot.getCellRenderer(hot.getCellMeta(1, 1));\n * ```\n */\n\n this.getCellRenderer = function (row, column) {\n return getRenderer(rendererLookup.call(this, row, column));\n };\n /**\n * Returns the cell editor class by the provided `row` and `column` arguments.\n *\n * @memberof Core#\n * @function getCellEditor\n * @param {number} row Visual row index or cell meta object (see {@link Core#getCellMeta}).\n * @param {number} column Visual column index.\n * @returns {Function} The editor class.\n * @example\n * ```js\n * // Get cell editor class using `row` and `column` coordinates.\n * hot.getCellEditor(1, 1);\n * // Get cell editor class using cell meta object.\n * hot.getCellEditor(hot.getCellMeta(1, 1));\n * ```\n */\n\n\n this.getCellEditor = cellMethodLookupFactory('editor');\n var validatorLookup = cellMethodLookupFactory('validator');\n /**\n * Returns the cell validator by `row` and `column`.\n *\n * @memberof Core#\n * @function getCellValidator\n * @param {number|object} row Visual row index or cell meta object (see {@link Core#getCellMeta}).\n * @param {number} column Visual column index.\n * @returns {Function|RegExp|undefined} The validator function.\n * @example\n * ```js\n * // Get cell valiator using `row` and `column` coordinates.\n * hot.getCellValidator(1, 1);\n * // Get cell valiator using cell meta object.\n * hot.getCellValidator(hot.getCellMeta(1, 1));\n * ```\n */\n\n this.getCellValidator = function (row, column) {\n var validator = validatorLookup.call(this, row, column);\n\n if (typeof validator === 'string') {\n validator = getValidator(validator);\n }\n\n return validator;\n };\n /**\n * Validates all cells using their validator functions and calls callback when finished.\n *\n * If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it\n * would equal `true`.\n *\n * @memberof Core#\n * @function validateCells\n * @param {Function} [callback] The callback function.\n * @example\n * ```js\n * hot.validateCells((valid) => {\n * if (valid) {\n * // ... code for validated cells\n * }\n * })\n * ```\n */\n\n\n this.validateCells = function (callback) {\n this._validateCells(callback);\n };\n /**\n * Validates rows using their validator functions and calls callback when finished.\n *\n * If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it\n * would equal `true`.\n *\n * @memberof Core#\n * @function validateRows\n * @param {Array} [rows] Array of validation target visual row indexes.\n * @param {Function} [callback] The callback function.\n * @example\n * ```js\n * hot.validateRows([3, 4, 5], (valid) => {\n * if (valid) {\n * // ... code for validated rows\n * }\n * })\n * ```\n */\n\n\n this.validateRows = function (rows, callback) {\n if (!Array.isArray(rows)) {\n throw new Error('validateRows parameter `rows` must be an array');\n }\n\n this._validateCells(callback, rows);\n };\n /**\n * Validates columns using their validator functions and calls callback when finished.\n *\n * If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it\n * would equal `true`.\n *\n * @memberof Core#\n * @function validateColumns\n * @param {Array} [columns] Array of validation target visual columns indexes.\n * @param {Function} [callback] The callback function.\n * @example\n * ```js\n * hot.validateColumns([3, 4, 5], (valid) => {\n * if (valid) {\n * // ... code for validated columns\n * }\n * })\n * ```\n */\n\n\n this.validateColumns = function (columns, callback) {\n if (!Array.isArray(columns)) {\n throw new Error('validateColumns parameter `columns` must be an array');\n }\n\n this._validateCells(callback, undefined, columns);\n };\n /**\n * Validates all cells using their validator functions and calls callback when finished.\n *\n * If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it would equal `true`.\n *\n * Private use intended.\n *\n * @private\n * @memberof Core#\n * @function _validateCells\n * @param {Function} [callback] The callback function.\n * @param {Array} [rows] An array of validation target visual row indexes.\n * @param {Array} [columns] An array of validation target visual column indexes.\n */\n\n\n this._validateCells = function (callback, rows, columns) {\n var waitingForValidator = new ValidatorsQueue();\n\n if (callback) {\n waitingForValidator.onQueueEmpty = callback;\n }\n\n var i = instance.countRows() - 1;\n\n while (i >= 0) {\n if (rows !== undefined && rows.indexOf(i) === -1) {\n i -= 1;\n continue;\n }\n\n var j = instance.countCols() - 1;\n\n while (j >= 0) {\n if (columns !== undefined && columns.indexOf(j) === -1) {\n j -= 1;\n continue;\n }\n\n waitingForValidator.addValidatorToQueue();\n instance.validateCell(instance.getDataAtCell(i, j), instance.getCellMeta(i, j), function (result) {\n if (typeof result !== 'boolean') {\n throw new Error('Validation error: result is not boolean');\n }\n\n if (result === false) {\n waitingForValidator.valid = false;\n }\n\n waitingForValidator.removeValidatorFormQueue();\n }, 'validateCells');\n j -= 1;\n }\n\n i -= 1;\n }\n\n waitingForValidator.checkIfQueueIsEmpty();\n };\n /**\n * Returns an array of row headers' values (if they are enabled). If param `row` was given, it returns the header of the given row as a string.\n *\n * @memberof Core#\n * @function getRowHeader\n * @param {number} [row] Visual row index.\n * @fires Hooks#modifyRowHeader\n * @returns {Array|string|number} Array of header values / single header value.\n */\n\n\n this.getRowHeader = function (row) {\n var rowHeader = tableMeta.rowHeaders;\n var physicalRow = row;\n\n if (physicalRow !== void 0) {\n physicalRow = instance.runHooks('modifyRowHeader', physicalRow);\n }\n\n if (physicalRow === void 0) {\n rowHeader = [];\n rangeEach(instance.countRows() - 1, function (i) {\n rowHeader.push(instance.getRowHeader(i));\n });\n } else if (Array.isArray(rowHeader) && rowHeader[physicalRow] !== void 0) {\n rowHeader = rowHeader[physicalRow];\n } else if (isFunction(rowHeader)) {\n rowHeader = rowHeader(physicalRow);\n } else if (rowHeader && typeof rowHeader !== 'string' && typeof rowHeader !== 'number') {\n rowHeader = physicalRow + 1;\n }\n\n return rowHeader;\n };\n /**\n * Returns information about if this table is configured to display row headers.\n *\n * @memberof Core#\n * @function hasRowHeaders\n * @returns {boolean} `true` if the instance has the row headers enabled, `false` otherwise.\n */\n\n\n this.hasRowHeaders = function () {\n return !!tableMeta.rowHeaders;\n };\n /**\n * Returns information about if this table is configured to display column headers.\n *\n * @memberof Core#\n * @function hasColHeaders\n * @returns {boolean} `true` if the instance has the column headers enabled, `false` otherwise.\n */\n\n\n this.hasColHeaders = function () {\n if (tableMeta.colHeaders !== void 0 && tableMeta.colHeaders !== null) {\n // Polymer has empty value = null\n return !!tableMeta.colHeaders;\n }\n\n for (var i = 0, ilen = instance.countCols(); i < ilen; i++) {\n if (instance.getColHeader(i)) {\n return true;\n }\n }\n\n return false;\n };\n /**\n * Returns an array of column headers (in string format, if they are enabled). If param `column` is given, it\n * returns the header at the given column.\n *\n * @memberof Core#\n * @function getColHeader\n * @param {number} [column] Visual column index.\n * @fires Hooks#modifyColHeader\n * @returns {Array|string|number} The column header(s).\n */\n\n\n this.getColHeader = function (column) {\n var columnIndex = instance.runHooks('modifyColHeader', column);\n var result = tableMeta.colHeaders;\n\n if (columnIndex === void 0) {\n var out = [];\n var ilen = instance.countCols();\n\n for (var i = 0; i < ilen; i++) {\n out.push(instance.getColHeader(i));\n }\n\n result = out;\n } else {\n var translateVisualIndexToColumns = function translateVisualIndexToColumns(visualColumnIndex) {\n var arr = [];\n var columnsLen = instance.countCols();\n var index = 0;\n\n for (; index < columnsLen; index++) {\n if (isFunction(tableMeta.columns) && tableMeta.columns(index)) {\n arr.push(index);\n }\n }\n\n return arr[visualColumnIndex];\n };\n\n var physicalColumn = instance.toPhysicalColumn(columnIndex);\n var prop = translateVisualIndexToColumns(physicalColumn);\n\n if (tableMeta.colHeaders === false) {\n result = null;\n } else if (tableMeta.columns && isFunction(tableMeta.columns) && tableMeta.columns(prop) && tableMeta.columns(prop).title) {\n result = tableMeta.columns(prop).title;\n } else if (tableMeta.columns && tableMeta.columns[physicalColumn] && tableMeta.columns[physicalColumn].title) {\n result = tableMeta.columns[physicalColumn].title;\n } else if (Array.isArray(tableMeta.colHeaders) && tableMeta.colHeaders[physicalColumn] !== void 0) {\n result = tableMeta.colHeaders[physicalColumn];\n } else if (isFunction(tableMeta.colHeaders)) {\n result = tableMeta.colHeaders(physicalColumn);\n } else if (tableMeta.colHeaders && typeof tableMeta.colHeaders !== 'string' && typeof tableMeta.colHeaders !== 'number') {\n result = spreadsheetColumnLabel(columnIndex); // see #1458\n }\n }\n\n return result;\n };\n /**\n * Return column width from settings (no guessing). Private use intended.\n *\n * @private\n * @memberof Core#\n * @function _getColWidthFromSettings\n * @param {number} col Visual col index.\n * @returns {number}\n */\n\n\n this._getColWidthFromSettings = function (col) {\n var width; // We currently don't support cell meta objects for headers (negative values)\n\n if (col >= 0) {\n var cellProperties = instance.getCellMeta(0, col);\n width = cellProperties.width;\n }\n\n if (width === void 0 || width === tableMeta.width) {\n width = tableMeta.colWidths;\n }\n\n if (width !== void 0 && width !== null) {\n switch (_typeof(width)) {\n case 'object':\n // array\n width = width[col];\n break;\n\n case 'function':\n width = width(col);\n break;\n\n default:\n break;\n }\n\n if (typeof width === 'string') {\n width = parseInt(width, 10);\n }\n }\n\n return width;\n };\n /**\n * Returns the width of the requested column.\n *\n * @memberof Core#\n * @function getColWidth\n * @param {number} column Visual column index.\n * @returns {number} Column width.\n * @fires Hooks#modifyColWidth\n */\n\n\n this.getColWidth = function (column) {\n var width = instance._getColWidthFromSettings(column);\n\n width = instance.runHooks('modifyColWidth', width, column);\n\n if (width === void 0) {\n width = ViewportColumnsCalculator.DEFAULT_WIDTH;\n }\n\n return width;\n };\n /**\n * Return row height from settings (no guessing). Private use intended.\n *\n * @private\n * @memberof Core#\n * @function _getRowHeightFromSettings\n * @param {number} row Visual row index.\n * @returns {number}\n */\n\n\n this._getRowHeightFromSettings = function (row) {\n // let cellProperties = instance.getCellMeta(row, 0);\n // let height = cellProperties.height;\n //\n // if (height === void 0 || height === tableMeta.height) {\n // height = cellProperties.rowHeights;\n // }\n var height = tableMeta.rowHeights;\n\n if (height !== void 0 && height !== null) {\n switch (_typeof(height)) {\n case 'object':\n // array\n height = height[row];\n break;\n\n case 'function':\n height = height(row);\n break;\n\n default:\n break;\n }\n\n if (typeof height === 'string') {\n height = parseInt(height, 10);\n }\n }\n\n return height;\n };\n /**\n * Returns the row height.\n *\n * @memberof Core#\n * @function getRowHeight\n * @param {number} row Visual row index.\n * @returns {number} The given row's height.\n * @fires Hooks#modifyRowHeight\n */\n\n\n this.getRowHeight = function (row) {\n var height = instance._getRowHeightFromSettings(row);\n\n height = instance.runHooks('modifyRowHeight', height, row);\n return height;\n };\n /**\n * Returns the total number of rows in the data source.\n *\n * @memberof Core#\n * @function countSourceRows\n * @returns {number} Total number of rows.\n */\n\n\n this.countSourceRows = function () {\n return dataSource.countRows();\n };\n /**\n * Returns the total number of columns in the data source.\n *\n * @memberof Core#\n * @function countSourceCols\n * @returns {number} Total number of columns.\n */\n\n\n this.countSourceCols = function () {\n return dataSource.countFirstRowKeys();\n };\n /**\n * Returns the total number of visual rows in the table.\n *\n * @memberof Core#\n * @function countRows\n * @returns {number} Total number of rows.\n */\n\n\n this.countRows = function () {\n return datamap.getLength();\n };\n /**\n * Returns the total number of visible columns in the table.\n *\n * @memberof Core#\n * @function countCols\n * @returns {number} Total number of columns.\n */\n\n\n this.countCols = function () {\n var maxCols = tableMeta.maxCols;\n var dataLen = this.columnIndexMapper.getNotTrimmedIndexesLength();\n return Math.min(maxCols, dataLen);\n };\n /**\n * Returns the number of rendered rows (including rows partially or fully rendered outside viewport).\n *\n * @memberof Core#\n * @function countRenderedRows\n * @returns {number} Returns -1 if table is not visible.\n */\n\n\n this.countRenderedRows = function () {\n return instance.view.wt.drawn ? instance.view.wt.wtTable.getRenderedRowsCount() : -1;\n };\n /**\n * Returns the number of visible rows (rendered rows that fully fit inside viewport).\n *\n * @memberof Core#\n * @function countVisibleRows\n * @returns {number} Number of visible rows or -1.\n */\n\n\n this.countVisibleRows = function () {\n return instance.view.wt.drawn ? instance.view.wt.wtTable.getVisibleRowsCount() : -1;\n };\n /**\n * Returns the number of rendered columns (including columns partially or fully rendered outside viewport).\n *\n * @memberof Core#\n * @function countRenderedCols\n * @returns {number} Returns -1 if table is not visible.\n */\n\n\n this.countRenderedCols = function () {\n return instance.view.wt.drawn ? instance.view.wt.wtTable.getRenderedColumnsCount() : -1;\n };\n /**\n * Returns the number of visible columns. Returns -1 if table is not visible.\n *\n * @memberof Core#\n * @function countVisibleCols\n * @returns {number} Number of visible columns or -1.\n */\n\n\n this.countVisibleCols = function () {\n return instance.view.wt.drawn ? instance.view.wt.wtTable.getVisibleColumnsCount() : -1;\n };\n /**\n * Returns the number of empty rows. If the optional ending parameter is `true`, returns the\n * number of empty rows at the bottom of the table.\n *\n * @memberof Core#\n * @function countEmptyRows\n * @param {boolean} [ending=false] If `true`, will only count empty rows at the end of the data source.\n * @returns {number} Count empty rows.\n */\n\n\n this.countEmptyRows = function () {\n var ending = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var emptyRows = 0;\n rangeEachReverse(instance.countRows() - 1, function (visualIndex) {\n if (instance.isEmptyRow(visualIndex)) {\n emptyRows += 1;\n } else if (ending === true) {\n return false;\n }\n });\n return emptyRows;\n };\n /**\n * Returns the number of empty columns. If the optional ending parameter is `true`, returns the number of empty\n * columns at right hand edge of the table.\n *\n * @memberof Core#\n * @function countEmptyCols\n * @param {boolean} [ending=false] If `true`, will only count empty columns at the end of the data source row.\n * @returns {number} Count empty cols.\n */\n\n\n this.countEmptyCols = function () {\n var ending = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (instance.countRows() < 1) {\n return 0;\n }\n\n var emptyColumns = 0;\n rangeEachReverse(instance.countCols() - 1, function (visualIndex) {\n if (instance.isEmptyCol(visualIndex)) {\n emptyColumns += 1;\n } else if (ending === true) {\n return false;\n }\n });\n return emptyColumns;\n };\n /**\n * Check if all cells in the row declared by the `row` argument are empty.\n *\n * @memberof Core#\n * @function isEmptyRow\n * @param {number} row Visual row index.\n * @returns {boolean} `true` if the row at the given `row` is empty, `false` otherwise.\n */\n\n\n this.isEmptyRow = function (row) {\n return tableMeta.isEmptyRow.call(instance, row);\n };\n /**\n * Check if all cells in the the column declared by the `column` argument are empty.\n *\n * @memberof Core#\n * @function isEmptyCol\n * @param {number} column Column index.\n * @returns {boolean} `true` if the column at the given `col` is empty, `false` otherwise.\n */\n\n\n this.isEmptyCol = function (column) {\n return tableMeta.isEmptyCol.call(instance, column);\n };\n /**\n * Select cell specified by `row` and `column` values or a range of cells finishing at `endRow`, `endCol`. If the table\n * was configured to support data column properties that properties can be used to making a selection.\n *\n * By default, viewport will be scrolled to the selection. After the `selectCell` method had finished, the instance\n * will be listening to keyboard input on the document.\n *\n * @example\n * ```js\n * // select a single cell\n * hot.selectCell(2, 4);\n * // select a single cell using column property\n * hot.selectCell(2, 'address');\n * // select a range of cells\n * hot.selectCell(2, 4, 3, 5);\n * // select a range of cells using column properties\n * hot.selectCell(2, 'address', 3, 'phone_number');\n * // select a range of cells without scrolling to them\n * hot.selectCell(2, 'address', 3, 'phone_number', false);\n * ```\n *\n * @memberof Core#\n * @function selectCell\n * @param {number} row Visual row index.\n * @param {number|string} column Visual column index or column property.\n * @param {number} [endRow] Visual end row index (if selecting a range).\n * @param {number|string} [endColumn] Visual end column index or column property (if selecting a range).\n * @param {boolean} [scrollToCell=true] If `true`, the viewport will be scrolled to the selection.\n * @param {boolean} [changeListener=true] If `false`, Handsontable will not change keyboard events listener to himself.\n * @returns {boolean} `true` if selection was successful, `false` otherwise.\n */\n\n\n this.selectCell = function (row, column, endRow, endColumn) {\n var scrollToCell = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var changeListener = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n\n if (isUndefined(row) || isUndefined(column)) {\n return false;\n }\n\n return this.selectCells([[row, column, endRow, endColumn]], scrollToCell, changeListener);\n };\n /**\n * Make multiple, non-contiguous selection specified by `row` and `column` values or a range of cells\n * finishing at `endRow`, `endColumn`. The method supports two input formats which are the same as that\n * produces by `getSelected` and `getSelectedRange` methods.\n *\n * By default, viewport will be scrolled to selection. After the `selectCells` method had finished, the instance\n * will be listening to keyboard input on the document.\n *\n * @example\n * ```js\n * // Using an array of arrays.\n * hot.selectCells([[1, 1, 2, 2], [3, 3], [6, 2, 0, 2]]);\n * // Using an array of arrays with defined columns as props.\n * hot.selectCells([[1, 'id', 2, 'first_name'], [3, 'full_name'], [6, 'last_name', 0, 'first_name']]);\n * // Using an array of CellRange objects (produced by `.getSelectedRange()` method).\n * const selected = hot.getSelectedRange();\n *\n * selected[0].from.row = 0;\n * selected[0].from.col = 0;\n *\n * hot.selectCells(selected);\n * ```\n *\n * @memberof Core#\n * @since 0.38.0\n * @function selectCells\n * @param {Array[]|CellRange[]} coords Visual coords passed as an array of array (`[[rowStart, columnStart, rowEnd, columnEnd], ...]`)\n * the same format as `getSelected` method returns or as an CellRange objects\n * which is the same format what `getSelectedRange` method returns.\n * @param {boolean} [scrollToCell=true] If `true`, the viewport will be scrolled to the selection.\n * @param {boolean} [changeListener=true] If `false`, Handsontable will not change keyboard events listener to himself.\n * @returns {boolean} `true` if selection was successful, `false` otherwise.\n */\n\n\n this.selectCells = function () {\n var coords = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [[]];\n var scrollToCell = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var changeListener = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (scrollToCell === false) {\n preventScrollingToCell = true;\n }\n\n var wasSelected = selection.selectCells(coords);\n\n if (wasSelected && changeListener) {\n instance.listen();\n }\n\n preventScrollingToCell = false;\n return wasSelected;\n };\n /**\n * Select column specified by `startColumn` visual index, column property or a range of columns finishing at `endColumn`.\n *\n * @example\n * ```js\n * // Select column using visual index.\n * hot.selectColumns(1);\n * // Select column using column property.\n * hot.selectColumns('id');\n * // Select range of columns using visual indexes.\n * hot.selectColumns(1, 4);\n * // Select range of columns using column properties.\n * hot.selectColumns('id', 'last_name');\n * ```\n *\n * @memberof Core#\n * @since 0.38.0\n * @function selectColumns\n * @param {number} startColumn The visual column index from which the selection starts.\n * @param {number} [endColumn=startColumn] The visual column index to which the selection finishes. If `endColumn`\n * is not defined the column defined by `startColumn` will be selected.\n * @returns {boolean} `true` if selection was successful, `false` otherwise.\n */\n\n\n this.selectColumns = function (startColumn) {\n var endColumn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startColumn;\n return selection.selectColumns(startColumn, endColumn);\n };\n /**\n * Select row specified by `startRow` visual index or a range of rows finishing at `endRow`.\n *\n * @example\n * ```js\n * // Select row using visual index.\n * hot.selectRows(1);\n * // Select range of rows using visual indexes.\n * hot.selectRows(1, 4);\n * ```\n *\n * @memberof Core#\n * @since 0.38.0\n * @function selectRows\n * @param {number} startRow The visual row index from which the selection starts.\n * @param {number} [endRow=startRow] The visual row index to which the selection finishes. If `endRow`\n * is not defined the row defined by `startRow` will be selected.\n * @returns {boolean} `true` if selection was successful, `false` otherwise.\n */\n\n\n this.selectRows = function (startRow) {\n var endRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startRow;\n return selection.selectRows(startRow, endRow);\n };\n /**\n * Deselects the current cell selection on the table.\n *\n * @memberof Core#\n * @function deselectCell\n */\n\n\n this.deselectCell = function () {\n selection.deselect();\n };\n /**\n * Select the whole table. The previous selection will be overwritten.\n *\n * @since 0.38.2\n * @memberof Core#\n * @function selectAll\n * @param {boolean} [includeHeaders=true] `true` If the selection should include the row, column and corner headers,\n * `false` otherwise.\n */\n\n\n this.selectAll = function () {\n var includeHeaders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var includeRowHeaders = includeHeaders && this.hasRowHeaders();\n var includeColumnHeaders = includeHeaders && this.hasColHeaders();\n preventScrollingToCell = true;\n selection.selectAll(includeRowHeaders, includeColumnHeaders);\n preventScrollingToCell = false;\n };\n\n var getIndexToScroll = function getIndexToScroll(indexMapper, visualIndex) {\n // Looking for a visual index on the right and then (when not found) on the left.\n return indexMapper.getFirstNotHiddenIndex(visualIndex, 1, true);\n };\n /**\n * Scroll viewport to coordinates specified by the `row` and `column` arguments.\n *\n * @memberof Core#\n * @function scrollViewportTo\n * @param {number} [row] Row index. If the last argument isn't defined we treat the index as a visual row index. Otherwise,\n * we are using the index for numbering only this rows which may be rendered (we don't consider hidden rows).\n * @param {number} [column] Column index. If the last argument isn't defined we treat the index as a visual column index.\n * Otherwise, we are using the index for numbering only this columns which may be rendered (we don't consider hidden columns).\n * @param {boolean} [snapToBottom=false] If `true`, viewport is scrolled to show the cell on the bottom of the table.\n * @param {boolean} [snapToRight=false] If `true`, viewport is scrolled to show the cell on the right side of the table.\n * @param {boolean} [considerHiddenIndexes=true] If `true`, we handle visual indexes, otherwise we handle only indexes which\n * may be rendered when they are in the viewport (we don't consider hidden indexes as they aren't rendered).\n * @returns {boolean} `true` if scroll was successful, `false` otherwise.\n */\n\n\n this.scrollViewportTo = function (row, column) {\n var snapToBottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var snapToRight = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var considerHiddenIndexes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var snapToTop = !snapToBottom;\n var snapToLeft = !snapToRight;\n var renderableRow = row;\n var renderableColumn = column;\n\n if (considerHiddenIndexes) {\n var _isRowInteger = Number.isInteger(row);\n\n var _isColumnInteger = Number.isInteger(column);\n\n var visualRowToScroll = _isRowInteger ? getIndexToScroll(this.rowIndexMapper, row) : void 0;\n var visualColumnToScroll = _isColumnInteger ? getIndexToScroll(this.columnIndexMapper, column) : void 0;\n\n if (visualRowToScroll === null || visualColumnToScroll === null) {\n return false;\n }\n\n renderableRow = _isRowInteger ? instance.rowIndexMapper.getRenderableFromVisualIndex(visualRowToScroll) : void 0;\n renderableColumn = _isColumnInteger ? instance.columnIndexMapper.getRenderableFromVisualIndex(visualColumnToScroll) : void 0;\n }\n\n var isRowInteger = Number.isInteger(renderableRow);\n var isColumnInteger = Number.isInteger(renderableColumn);\n\n if (isRowInteger && isColumnInteger) {\n return instance.view.scrollViewport(new CellCoords(renderableRow, renderableColumn), snapToTop, snapToRight, snapToBottom, snapToLeft);\n }\n\n if (isRowInteger && isColumnInteger === false) {\n return instance.view.scrollViewportVertically(renderableRow, snapToTop, snapToBottom);\n }\n\n if (isColumnInteger && isRowInteger === false) {\n return instance.view.scrollViewportHorizontally(renderableColumn, snapToRight, snapToLeft);\n }\n\n return false;\n };\n /**\n * Removes the table from the DOM and destroys the instance of the Handsontable.\n *\n * @memberof Core#\n * @function destroy\n * @fires Hooks#afterDestroy\n */\n\n\n this.destroy = function () {\n instance._clearTimeouts();\n\n instance._clearImmediates();\n\n if (instance.view) {\n // in case HT is destroyed before initialization has finished\n instance.view.destroy();\n }\n\n if (dataSource) {\n dataSource.destroy();\n }\n\n dataSource = null;\n metaManager.clearCache();\n keyStateStopObserving();\n\n if (isRootInstance(instance)) {\n var licenseInfo = this.rootDocument.querySelector('#hot-display-license-info');\n\n if (licenseInfo) {\n licenseInfo.parentNode.removeChild(licenseInfo);\n }\n }\n\n empty(instance.rootElement);\n eventManager.destroy();\n\n if (editorManager) {\n editorManager.destroy();\n } // The plugin's `destroy` method is called as a consequence and it should handle\n // unregistration of plugin's maps. Some unregistered maps reset the cache.\n\n\n instance.batchExecution(function () {\n pluginsRegistry.getItems().forEach(function (_ref19) {\n var _ref20 = _slicedToArray(_ref19, 2),\n plugin = _ref20[1];\n\n plugin.destroy();\n });\n pluginsRegistry.clear();\n instance.runHooks('afterDestroy');\n }, true);\n Hooks.getSingleton().destroy(instance);\n objectEach(instance, function (property, key, obj) {\n // replace instance methods with post mortem\n if (isFunction(property)) {\n obj[key] = postMortem(key);\n } else if (key !== 'guid') {\n // replace instance properties with null (restores memory)\n // it should not be necessary but this prevents a memory leak side effects that show itself in Jasmine tests\n obj[key] = null;\n }\n });\n instance.isDestroyed = true; // replace private properties with null (restores memory)\n // it should not be necessary but this prevents a memory leak side effects that show itself in Jasmine tests\n\n if (datamap) {\n datamap.destroy();\n }\n\n instance.rowIndexMapper = null;\n instance.columnIndexMapper = null;\n datamap = null;\n grid = null;\n selection = null;\n editorManager = null;\n instance = null;\n };\n /**\n * Replacement for all methods after the Handsontable was destroyed.\n *\n * @private\n * @param {string} method The method name.\n * @returns {Function}\n */\n\n\n function postMortem(method) {\n return function () {\n throw new Error(\"The \\\"\".concat(method, \"\\\" method cannot be called because this Handsontable instance has been destroyed\"));\n };\n }\n /**\n * Returns the active editor class instance.\n *\n * @memberof Core#\n * @function getActiveEditor\n * @returns {BaseEditor} The active editor instance.\n */\n\n\n this.getActiveEditor = function () {\n return editorManager.getActiveEditor();\n };\n /**\n * Returns plugin instance by provided its name.\n *\n * @memberof Core#\n * @function getPlugin\n * @param {string} pluginName The plugin name.\n * @returns {BasePlugin|undefined} The plugin instance or undefined if there is no plugin.\n */\n\n\n this.getPlugin = function (pluginName) {\n var unifiedPluginName = toUpperCaseFirst(pluginName); // Workaround for the UndoRedo plugin which, currently doesn't follow the plugin architecture.\n\n if (unifiedPluginName === 'UndoRedo') {\n return this.undoRedo;\n }\n\n return pluginsRegistry.getItem(unifiedPluginName);\n };\n /**\n * Returns name of the passed plugin.\n *\n * @private\n * @memberof Core#\n * @param {BasePlugin} plugin The plugin instance.\n * @returns {string}\n */\n\n\n this.getPluginName = function (plugin) {\n // Workaround for the UndoRedo plugin which, currently doesn't follow the plugin architecture.\n if (plugin === this.undoRedo) {\n return this.undoRedo.constructor.PLUGIN_KEY;\n }\n\n return pluginsRegistry.getId(plugin);\n };\n /**\n * Returns the Handsontable instance.\n *\n * @memberof Core#\n * @function getInstance\n * @returns {Handsontable} The Handsontable instance.\n */\n\n\n this.getInstance = function () {\n return instance;\n };\n /**\n * Adds listener to the specified hook name (only for this Handsontable instance).\n *\n * @memberof Core#\n * @function addHook\n * @see Hooks#add\n * @param {string} key Hook name (see {@link Hooks}).\n * @param {Function|Array} callback Function or array of functions.\n * @example\n * ```js\n * hot.addHook('beforeInit', myCallback);\n * ```\n */\n\n\n this.addHook = function (key, callback) {\n Hooks.getSingleton().add(key, callback, instance);\n };\n /**\n * Check if for a specified hook name there are added listeners (only for this Handsontable instance). All available\n * hooks you will find {@link Hooks}.\n *\n * @memberof Core#\n * @function hasHook\n * @see Hooks#has\n * @param {string} key Hook name.\n * @returns {boolean}\n *\n * @example\n * ```js\n * const hasBeforeInitListeners = hot.hasHook('beforeInit');\n * ```\n */\n\n\n this.hasHook = function (key) {\n return Hooks.getSingleton().has(key, instance);\n };\n /**\n * Adds listener to specified hook name (only for this Handsontable instance). After the listener is triggered,\n * it will be automatically removed.\n *\n * @memberof Core#\n * @function addHookOnce\n * @see Hooks#once\n * @param {string} key Hook name (see {@link Hooks}).\n * @param {Function|Array} callback Function or array of functions.\n * @example\n * ```js\n * hot.addHookOnce('beforeInit', myCallback);\n * ```\n */\n\n\n this.addHookOnce = function (key, callback) {\n Hooks.getSingleton().once(key, callback, instance);\n };\n /**\n * Removes the hook listener previously registered with {@link Core#addHook}.\n *\n * @memberof Core#\n * @function removeHook\n * @see Hooks#remove\n * @param {string} key Hook name.\n * @param {Function} callback Reference to the function which has been registered using {@link Core#addHook}.\n *\n * @example\n * ```js\n * hot.removeHook('beforeInit', myCallback);\n * ```\n */\n\n\n this.removeHook = function (key, callback) {\n Hooks.getSingleton().remove(key, callback, instance);\n };\n /**\n * Run the callbacks for the hook provided in the `key` argument using the parameters given in the other arguments.\n *\n * @memberof Core#\n * @function runHooks\n * @see Hooks#run\n * @param {string} key Hook name.\n * @param {*} [p1] Argument passed to the callback.\n * @param {*} [p2] Argument passed to the callback.\n * @param {*} [p3] Argument passed to the callback.\n * @param {*} [p4] Argument passed to the callback.\n * @param {*} [p5] Argument passed to the callback.\n * @param {*} [p6] Argument passed to the callback.\n * @returns {*}\n *\n * @example\n * ```js\n * // Run built-in hook\n * hot.runHooks('beforeInit');\n * // Run custom hook\n * hot.runHooks('customAction', 10, 'foo');\n * ```\n */\n\n\n this.runHooks = function (key, p1, p2, p3, p4, p5, p6) {\n return Hooks.getSingleton().run(instance, key, p1, p2, p3, p4, p5, p6);\n };\n /**\n * Get language phrase for specified dictionary key.\n *\n * @memberof Core#\n * @function getTranslatedPhrase\n * @since 0.35.0\n * @param {string} dictionaryKey Constant which is dictionary key.\n * @param {*} extraArguments Arguments which will be handled by formatters.\n * @returns {string}\n */\n\n\n this.getTranslatedPhrase = function (dictionaryKey, extraArguments) {\n return getTranslatedPhrase(tableMeta.language, dictionaryKey, extraArguments);\n };\n /**\n * Converts instance into outerHTML of HTMLTableElement.\n *\n * @memberof Core#\n * @function toHTML\n * @since 7.1.0\n * @returns {string}\n */\n\n\n this.toHTML = function () {\n return instanceToHTML(_this);\n };\n /**\n * Converts instance into HTMLTableElement.\n *\n * @memberof Core#\n * @function toTableElement\n * @since 7.1.0\n * @returns {HTMLTableElement}\n */\n\n\n this.toTableElement = function () {\n var tempElement = _this.rootDocument.createElement('div');\n\n tempElement.insertAdjacentHTML('afterbegin', instanceToHTML(_this));\n return tempElement.firstElementChild;\n };\n\n this.timeouts = [];\n /**\n * Sets timeout. Purpose of this method is to clear all known timeouts when `destroy` method is called.\n *\n * @param {number|Function} handle Handler returned from setTimeout or function to execute (it will be automatically wraped\n * by setTimeout function).\n * @param {number} [delay=0] If first argument is passed as a function this argument set delay of the execution of that function.\n * @private\n */\n\n this._registerTimeout = function (handle) {\n var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var handleFunc = handle;\n\n if (typeof handleFunc === 'function') {\n handleFunc = setTimeout(handleFunc, delay);\n }\n\n this.timeouts.push(handleFunc);\n };\n /**\n * Clears all known timeouts.\n *\n * @private\n */\n\n\n this._clearTimeouts = function () {\n arrayEach(this.timeouts, function (handler) {\n clearTimeout(handler);\n });\n };\n\n this.immediates = [];\n /**\n * Execute function execution to the next event loop cycle. Purpose of this method is to clear all known timeouts when `destroy` method is called.\n *\n * @param {Function} callback Function to be delayed in execution.\n * @private\n */\n\n this._registerImmediate = function (callback) {\n this.immediates.push(setImmediate(callback));\n };\n /**\n * Clears all known timeouts.\n *\n * @private\n */\n\n\n this._clearImmediates = function () {\n arrayEach(this.immediates, function (handler) {\n clearImmediate(handler);\n });\n };\n /**\n * Refresh selection borders. This is temporary method relic after selection rewrite.\n *\n * @private\n * @param {boolean} [revertOriginal=false] If `true`, the previous value will be restored. Otherwise, the edited value will be saved.\n * @param {boolean} [prepareEditorIfNeeded=true] If `true` the editor under the selected cell will be prepared to open.\n */\n\n\n this._refreshBorders = function () {\n var revertOriginal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var prepareEditorIfNeeded = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n editorManager.destroyEditor(revertOriginal);\n instance.view.render();\n\n if (prepareEditorIfNeeded && selection.isSelected()) {\n editorManager.prepareEditor();\n }\n };\n\n getPluginsNames().forEach(function (pluginName) {\n var PluginClass = getPlugin(pluginName);\n pluginsRegistry.addItem(pluginName, new PluginClass(_this));\n });\n Hooks.getSingleton().run(instance, 'construct');\n}","import \"core-js/modules/web.timers.js\";\n/**\n * autoResize - resizes a DOM element to the width and height of another DOM element\n *\n * Copyright 2014, Marcin Warpechowski\n * Licensed under the MIT license\n */\n\nexport function autoResize() {\n var defaults = {\n minHeight: 200,\n maxHeight: 300,\n minWidth: 100,\n maxWidth: 300\n },\n el,\n body = document.body,\n text = document.createTextNode(''),\n span = document.createElement('SPAN'),\n observe = function observe(element, event, handler) {\n element.addEventListener(event, handler, false);\n },\n _unObserve = function unObserve(element, event, handler) {\n element.removeEventListener(event, handler, false);\n },\n resize = function resize(newChar) {\n var width, scrollHeight;\n\n if (!newChar) {\n newChar = \"\";\n } else if (!/^[a-zA-Z \\.,\\\\\\/\\|0-9]$/.test(newChar)) {\n newChar = \".\";\n }\n\n if (text.textContent !== void 0) {\n text.textContent = el.value + newChar;\n } else {\n text.data = el.value + newChar; //IE8\n }\n\n span.style.fontSize = getComputedStyle(el).fontSize;\n span.style.fontFamily = getComputedStyle(el).fontFamily;\n span.style.whiteSpace = \"pre\";\n body.appendChild(span);\n width = span.clientWidth + 2;\n body.removeChild(span);\n el.style.height = defaults.minHeight + 'px';\n\n if (defaults.minWidth > width) {\n el.style.width = defaults.minWidth + 'px';\n } else if (width > defaults.maxWidth) {\n el.style.width = defaults.maxWidth + 'px';\n } else {\n el.style.width = width + 'px';\n }\n\n scrollHeight = el.scrollHeight ? el.scrollHeight - 1 : 0;\n\n if (defaults.minHeight > scrollHeight) {\n el.style.height = defaults.minHeight + 'px';\n } else if (defaults.maxHeight < scrollHeight) {\n el.style.height = defaults.maxHeight + 'px';\n el.style.overflowY = 'visible';\n } else {\n el.style.height = scrollHeight + 'px';\n }\n },\n delayedResize = function delayedResize() {\n window.setTimeout(resize, 0);\n },\n extendDefaults = function extendDefaults(config) {\n if (config && config.minHeight) {\n if (config.minHeight == 'inherit') {\n defaults.minHeight = el.clientHeight;\n } else {\n var minHeight = parseInt(config.minHeight);\n\n if (!isNaN(minHeight)) {\n defaults.minHeight = minHeight;\n }\n }\n }\n\n if (config && config.maxHeight) {\n if (config.maxHeight == 'inherit') {\n defaults.maxHeight = el.clientHeight;\n } else {\n var maxHeight = parseInt(config.maxHeight);\n\n if (!isNaN(maxHeight)) {\n defaults.maxHeight = maxHeight;\n }\n }\n }\n\n if (config && config.minWidth) {\n if (config.minWidth == 'inherit') {\n defaults.minWidth = el.clientWidth;\n } else {\n var minWidth = parseInt(config.minWidth);\n\n if (!isNaN(minWidth)) {\n defaults.minWidth = minWidth;\n }\n }\n }\n\n if (config && config.maxWidth) {\n if (config.maxWidth == 'inherit') {\n defaults.maxWidth = el.clientWidth;\n } else {\n var maxWidth = parseInt(config.maxWidth);\n\n if (!isNaN(maxWidth)) {\n defaults.maxWidth = maxWidth;\n }\n }\n }\n\n if (!span.firstChild) {\n span.className = \"autoResize\";\n span.style.display = 'inline-block';\n span.appendChild(text);\n }\n },\n _init = function init(el_, config, doObserve) {\n el = el_;\n extendDefaults(config);\n\n if (el.nodeName == 'TEXTAREA') {\n el.style.resize = 'none';\n el.style.overflowY = '';\n el.style.height = defaults.minHeight + 'px';\n el.style.minWidth = defaults.minWidth + 'px';\n el.style.maxWidth = defaults.maxWidth + 'px';\n el.style.overflowY = 'hidden';\n }\n\n if (doObserve) {\n observe(el, 'change', resize);\n observe(el, 'cut', delayedResize);\n observe(el, 'paste', delayedResize);\n observe(el, 'drop', delayedResize);\n observe(el, 'keydown', delayedResize);\n observe(el, 'focus', resize);\n observe(el, 'compositionstart', delayedResize);\n observe(el, 'compositionupdate', delayedResize);\n observe(el, 'compositionend', delayedResize);\n }\n\n resize();\n };\n\n function getComputedStyle(element) {\n return element.currentStyle || document.defaultView.getComputedStyle(element);\n }\n\n return {\n init: function init(el_, config, doObserve) {\n _init(el_, config, doObserve);\n },\n unObserve: function unObserve() {\n _unObserve(el, 'change', resize);\n\n _unObserve(el, 'cut', delayedResize);\n\n _unObserve(el, 'paste', delayedResize);\n\n _unObserve(el, 'drop', delayedResize);\n\n _unObserve(el, 'keydown', delayedResize);\n\n _unObserve(el, 'focus', resize);\n\n _unObserve(el, 'compositionstart', delayedResize);\n\n _unObserve(el, 'compositionupdate', delayedResize);\n\n _unObserve(el, 'compositionend', delayedResize);\n },\n resize: resize\n };\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.slice.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BaseEditor, EDITOR_STATE } from \"../baseEditor/index.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { isMobileBrowser, isIE, isEdge } from \"../../helpers/browser.mjs\";\nimport { addClass, getCaretPosition, getComputedStyle, getCssTransform, getScrollbarWidth, innerWidth, offset, resetCssTransform, setCaretPosition, hasVerticalScrollbar, hasHorizontalScrollbar, hasClass, removeClass } from \"../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation, isImmediatePropagationStopped } from \"../../helpers/dom/event.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { KEY_CODES } from \"../../helpers/unicode.mjs\";\nimport { autoResize } from \"../../3rdparty/autoResize/index.mjs\";\nvar EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';\nvar EDITOR_HIDDEN_CLASS_NAME = 'ht_editor_hidden';\nexport var EDITOR_TYPE = 'text';\n/**\n * @private\n * @class TextEditor\n */\n\nexport var TextEditor = /*#__PURE__*/function (_BaseEditor) {\n _inherits(TextEditor, _BaseEditor);\n\n var _super = _createSuper(TextEditor);\n /**\n * @param {Core} instance The Handsontable instance.\n */\n\n\n function TextEditor(instance) {\n var _this;\n\n _classCallCheck(this, TextEditor);\n\n _this = _super.call(this, instance);\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Autoresize instance. Automagically resizes editor after changes.\n *\n * @private\n * @type {autoResize}\n */\n\n _this.autoResize = autoResize();\n /**\n * An TEXTAREA element.\n *\n * @private\n * @type {HTMLTextAreaElement}\n */\n\n _this.TEXTAREA = void 0;\n /**\n * Style declaration object of the TEXTAREA element.\n *\n * @private\n * @type {CSSStyleDeclaration}\n */\n\n _this.textareaStyle = void 0;\n /**\n * Parent element of the TEXTAREA.\n *\n * @private\n * @type {HTMLDivElement}\n */\n\n _this.TEXTAREA_PARENT = void 0;\n /**\n * Style declaration object of the TEXTAREA_PARENT element.\n *\n * @private\n * @type {CSSStyleDeclaration}\n */\n\n _this.textareaParentStyle = void 0;\n /**\n * Z-index class style for the editor.\n *\n * @private\n * @type {string}\n */\n\n _this.layerClass = void 0;\n\n _this.createElements();\n\n _this.bindEvents();\n\n _this.hot.addHookOnce('afterDestroy', function () {\n return _this.destroy();\n });\n\n return _this;\n }\n /**\n * Gets current value from editable element.\n *\n * @returns {number}\n */\n\n\n _createClass(TextEditor, [{\n key: \"getValue\",\n value: function getValue() {\n return this.TEXTAREA.value;\n }\n /**\n * Sets new value into editable element.\n *\n * @param {*} newValue The editor value.\n */\n\n }, {\n key: \"setValue\",\n value: function setValue(newValue) {\n this.TEXTAREA.value = newValue;\n }\n /**\n * Opens the editor and adjust its size.\n */\n\n }, {\n key: \"open\",\n value: function open() {\n var _this2 = this;\n\n this.refreshDimensions(); // need it instantly, to prevent https://github.com/handsontable/handsontable/issues/348\n\n this.showEditableElement();\n this.addHook('beforeKeyDown', function (event) {\n return _this2.onBeforeKeyDown(event);\n });\n }\n /**\n * Closes the editor.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n this.autoResize.unObserve();\n\n if (this.hot.rootDocument.activeElement === this.TEXTAREA) {\n this.hot.listen(); // don't refocus the table if user focused some cell outside of HT on purpose\n }\n\n this.hideEditableElement();\n this.removeHooksByKey('beforeKeyDown');\n }\n /**\n * Prepares editor's meta data.\n *\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {HTMLTableCellElement} td The rendered cell element.\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\n }, {\n key: \"prepare\",\n value: function prepare(row, col, prop, td, value, cellProperties) {\n var previousState = this.state;\n\n _get(_getPrototypeOf(TextEditor.prototype), \"prepare\", this).call(this, row, col, prop, td, value, cellProperties);\n\n if (!cellProperties.readOnly) {\n this.refreshDimensions(true);\n var allowInvalid = cellProperties.allowInvalid,\n fragmentSelection = cellProperties.fragmentSelection;\n\n if (allowInvalid) {\n // Remove an empty space from texarea (added by copyPaste plugin to make copy/paste\n // functionality work with IME)\n this.TEXTAREA.value = '';\n }\n\n if (previousState !== EDITOR_STATE.FINISHED) {\n this.hideEditableElement();\n } // @TODO: The fragmentSelection functionality is conflicted with IME. For this feature\n // refocus has to be disabled (to make IME working).\n\n\n var restoreFocus = !fragmentSelection;\n\n if (restoreFocus && !isMobileBrowser()) {\n this.focus();\n }\n }\n }\n /**\n * Begins editing on a highlighted cell and hides fillHandle corner if was present.\n *\n * @param {*} newInitialValue The editor initial value.\n * @param {Event} event The keyboard event object.\n */\n\n }, {\n key: \"beginEditing\",\n value: function beginEditing(newInitialValue, event) {\n if (this.state !== EDITOR_STATE.VIRGIN) {\n return;\n }\n\n this.TEXTAREA.value = ''; // Remove an empty space from texarea (added by copyPaste plugin to make copy/paste functionality work with IME).\n\n _get(_getPrototypeOf(TextEditor.prototype), \"beginEditing\", this).call(this, newInitialValue, event);\n }\n /**\n * Sets focus state on the select element.\n */\n\n }, {\n key: \"focus\",\n value: function focus() {\n // For IME editor textarea element must be focused using \".select\" method.\n // Using \".focus\" browser automatically scroll into the focused element which\n // is undesire effect.\n this.TEXTAREA.select();\n setCaretPosition(this.TEXTAREA, this.TEXTAREA.value.length);\n }\n /**\n * Creates an editor's elements and adds necessary CSS classnames.\n */\n\n }, {\n key: \"createElements\",\n value: function createElements() {\n var rootDocument = this.hot.rootDocument;\n this.TEXTAREA = rootDocument.createElement('TEXTAREA');\n this.TEXTAREA.setAttribute('data-hot-input', ''); // Makes the element recognizable by Hot as its own component's element.\n\n this.TEXTAREA.tabIndex = -1;\n addClass(this.TEXTAREA, 'handsontableInput');\n this.textareaStyle = this.TEXTAREA.style;\n this.textareaStyle.width = 0;\n this.textareaStyle.height = 0;\n this.textareaStyle.overflowY = 'visible';\n this.TEXTAREA_PARENT = rootDocument.createElement('DIV');\n addClass(this.TEXTAREA_PARENT, 'handsontableInputHolder');\n\n if (hasClass(this.TEXTAREA_PARENT, this.layerClass)) {\n removeClass(this.TEXTAREA_PARENT, this.layerClass);\n }\n\n addClass(this.TEXTAREA_PARENT, EDITOR_HIDDEN_CLASS_NAME);\n this.textareaParentStyle = this.TEXTAREA_PARENT.style;\n this.TEXTAREA_PARENT.appendChild(this.TEXTAREA);\n this.hot.rootElement.appendChild(this.TEXTAREA_PARENT);\n }\n /**\n * Moves an editable element out of the viewport, but element must be able to hold focus for IME support.\n *\n * @private\n */\n\n }, {\n key: \"hideEditableElement\",\n value: function hideEditableElement() {\n if (isIE() || isEdge()) {\n this.textareaStyle.textIndent = '-99999px';\n }\n\n this.textareaStyle.overflowY = 'visible';\n this.textareaParentStyle.opacity = '0';\n this.textareaParentStyle.height = '1px';\n\n if (hasClass(this.TEXTAREA_PARENT, this.layerClass)) {\n removeClass(this.TEXTAREA_PARENT, this.layerClass);\n }\n\n addClass(this.TEXTAREA_PARENT, EDITOR_HIDDEN_CLASS_NAME);\n }\n /**\n * Resets an editable element position.\n *\n * @private\n */\n\n }, {\n key: \"showEditableElement\",\n value: function showEditableElement() {\n this.textareaParentStyle.height = '';\n this.textareaParentStyle.overflow = '';\n this.textareaParentStyle.position = '';\n this.textareaParentStyle.right = 'auto';\n this.textareaParentStyle.opacity = '1';\n this.textareaStyle.textIndent = '';\n this.textareaStyle.overflowY = 'hidden';\n var childNodes = this.TEXTAREA_PARENT.childNodes;\n var hasClassHandsontableEditor = false;\n rangeEach(childNodes.length - 1, function (index) {\n var childNode = childNodes[index];\n\n if (hasClass(childNode, 'handsontableEditor')) {\n hasClassHandsontableEditor = true;\n return false;\n }\n });\n\n if (hasClass(this.TEXTAREA_PARENT, EDITOR_HIDDEN_CLASS_NAME)) {\n removeClass(this.TEXTAREA_PARENT, EDITOR_HIDDEN_CLASS_NAME);\n }\n\n if (hasClassHandsontableEditor) {\n this.layerClass = EDITOR_VISIBLE_CLASS_NAME;\n addClass(this.TEXTAREA_PARENT, this.layerClass);\n } else {\n this.layerClass = this.getEditedCellsLayerClass();\n addClass(this.TEXTAREA_PARENT, this.layerClass);\n }\n }\n /**\n * Refreshes editor's value using source data.\n *\n * @private\n */\n\n }, {\n key: \"refreshValue\",\n value: function refreshValue() {\n var physicalRow = this.hot.toPhysicalRow(this.row);\n var sourceData = this.hot.getSourceDataAtCell(physicalRow, this.col);\n this.originalValue = sourceData;\n this.setValue(sourceData);\n this.refreshDimensions();\n }\n /**\n * Refreshes editor's size and position.\n *\n * @private\n * @param {boolean} force Indicates if the refreshing editor dimensions should be triggered.\n */\n\n }, {\n key: \"refreshDimensions\",\n value: function refreshDimensions() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (this.state !== EDITOR_STATE.EDITING && !force) {\n return;\n }\n\n this.TD = this.getEditedCell(); // TD is outside of the viewport.\n\n if (!this.TD) {\n if (!force) {\n this.close(); // TODO shouldn't it be this.finishEditing() ?\n }\n\n return;\n }\n\n var _this$hot$view$wt = this.hot.view.wt,\n wtOverlays = _this$hot$view$wt.wtOverlays,\n wtViewport = _this$hot$view$wt.wtViewport;\n var currentOffset = offset(this.TD);\n var containerOffset = offset(this.hot.rootElement);\n var scrollableContainerTop = wtOverlays.topOverlay.holder;\n var scrollableContainerLeft = wtOverlays.leftOverlay.holder;\n var containerScrollTop = scrollableContainerTop !== this.hot.rootWindow ? scrollableContainerTop.scrollTop : 0;\n var containerScrollLeft = scrollableContainerLeft !== this.hot.rootWindow ? scrollableContainerLeft.scrollLeft : 0;\n var editorSection = this.checkEditorSection();\n var scrollTop = ['', 'left'].includes(editorSection) ? containerScrollTop : 0;\n var scrollLeft = ['', 'top', 'bottom'].includes(editorSection) ? containerScrollLeft : 0; // If colHeaders is disabled, cells in the first row have border-top\n\n var editTopModifier = currentOffset.top === containerOffset.top ? 0 : 1;\n var backgroundColor = this.TD.style.backgroundColor;\n var editTop = currentOffset.top - containerOffset.top - editTopModifier - scrollTop;\n var editLeft = currentOffset.left - containerOffset.left - 1 - scrollLeft;\n var cssTransformOffset; // TODO: Refactor this to the new instance.getCell method (from #ply-59), after 0.12.1 is released\n\n switch (editorSection) {\n case 'top':\n cssTransformOffset = getCssTransform(wtOverlays.topOverlay.clone.wtTable.holder.parentNode);\n break;\n\n case 'left':\n cssTransformOffset = getCssTransform(wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);\n break;\n\n case 'top-left-corner':\n cssTransformOffset = getCssTransform(wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);\n break;\n\n case 'bottom-left-corner':\n cssTransformOffset = getCssTransform(wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);\n break;\n\n case 'bottom':\n cssTransformOffset = getCssTransform(wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode);\n break;\n\n default:\n break;\n }\n\n var hasColumnHeaders = this.hot.hasColHeaders();\n var renderableRow = this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row);\n var renderableColumn = this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col);\n var nrOfRenderableRowIndexes = this.hot.rowIndexMapper.getRenderableIndexesLength();\n var firstRowIndexOfTheBottomOverlay = nrOfRenderableRowIndexes - this.hot.view.wt.getSetting('fixedRowsBottom');\n\n if (hasColumnHeaders && renderableRow <= 0 || renderableRow === firstRowIndexOfTheBottomOverlay) {\n editTop += 1;\n }\n\n if (renderableColumn <= 0) {\n editLeft += 1;\n }\n\n if (cssTransformOffset && cssTransformOffset !== -1) {\n this.textareaParentStyle[cssTransformOffset[0]] = cssTransformOffset[1];\n } else {\n resetCssTransform(this.TEXTAREA_PARENT);\n }\n\n this.textareaParentStyle.top = \"\".concat(editTop, \"px\");\n this.textareaParentStyle.left = \"\".concat(editLeft, \"px\");\n this.showEditableElement();\n var firstRowOffset = wtViewport.rowsRenderCalculator.startPosition;\n var firstColumnOffset = wtViewport.columnsRenderCalculator.startPosition;\n var horizontalScrollPosition = wtOverlays.leftOverlay.getScrollPosition();\n var verticalScrollPosition = wtOverlays.topOverlay.getScrollPosition();\n var scrollbarWidth = getScrollbarWidth(this.hot.rootDocument);\n var cellTopOffset = this.TD.offsetTop + firstRowOffset - verticalScrollPosition;\n var cellLeftOffset = this.TD.offsetLeft + firstColumnOffset - horizontalScrollPosition;\n var width = innerWidth(this.TD) - 8;\n var actualVerticalScrollbarWidth = hasVerticalScrollbar(scrollableContainerTop) ? scrollbarWidth : 0;\n var actualHorizontalScrollbarWidth = hasHorizontalScrollbar(scrollableContainerLeft) ? scrollbarWidth : 0;\n var maxWidth = this.hot.view.maximumVisibleElementWidth(cellLeftOffset) - 9 - actualVerticalScrollbarWidth;\n var height = this.TD.scrollHeight + 1;\n var maxHeight = Math.max(this.hot.view.maximumVisibleElementHeight(cellTopOffset) - actualHorizontalScrollbarWidth, 23); // eslint-disable-line max-len\n\n var cellComputedStyle = getComputedStyle(this.TD, this.hot.rootWindow);\n this.TEXTAREA.style.fontSize = cellComputedStyle.fontSize;\n this.TEXTAREA.style.fontFamily = cellComputedStyle.fontFamily;\n this.TEXTAREA.style.backgroundColor = backgroundColor;\n this.autoResize.init(this.TEXTAREA, {\n minHeight: Math.min(height, maxHeight),\n maxHeight: maxHeight,\n // TEXTAREA should never be higher than visible part of the viewport (should not cover the scrollbar)\n minWidth: Math.min(width, maxWidth),\n maxWidth: maxWidth // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)\n\n }, true);\n }\n /**\n * Binds events and hooks.\n *\n * @private\n */\n\n }, {\n key: \"bindEvents\",\n value: function bindEvents() {\n var _this3 = this;\n\n this.eventManager.addEventListener(this.TEXTAREA, 'cut', function (event) {\n return event.stopPropagation();\n });\n this.eventManager.addEventListener(this.TEXTAREA, 'paste', function (event) {\n return event.stopPropagation();\n });\n this.addHook('afterScrollHorizontally', function () {\n return _this3.refreshDimensions();\n });\n this.addHook('afterScrollVertically', function () {\n return _this3.refreshDimensions();\n });\n this.addHook('afterColumnResize', function () {\n _this3.refreshDimensions();\n\n _this3.focus();\n });\n this.addHook('afterRowResize', function () {\n _this3.refreshDimensions();\n\n _this3.focus();\n });\n }\n /**\n * Ugly hack for autocompleteEditor.\n *\n * @private\n */\n\n }, {\n key: \"allowKeyEventPropagation\",\n value: function allowKeyEventPropagation() {}\n /**\n * Destroys the internal event manager and clears attached hooks.\n *\n * @private\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.eventManager.destroy();\n this.clearHooks();\n }\n /**\n * OnBeforeKeyDown callback.\n *\n * @param {Event} event The keyboard event object.\n */\n\n }, {\n key: \"onBeforeKeyDown\",\n value: function onBeforeKeyDown(event) {\n // catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)\n var ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey; // Process only events that have been fired in the editor\n\n if (event.target !== this.TEXTAREA || isImmediatePropagationStopped(event)) {\n return;\n }\n\n switch (event.keyCode) {\n case KEY_CODES.ARROW_RIGHT:\n if (this.isInFullEditMode()) {\n if (!this.isWaiting() && !this.allowKeyEventPropagation(event.keyCode)) {\n stopImmediatePropagation(event);\n }\n }\n\n break;\n\n case KEY_CODES.ARROW_LEFT:\n if (this.isInFullEditMode()) {\n if (!this.isWaiting() && !this.allowKeyEventPropagation(event.keyCode)) {\n stopImmediatePropagation(event);\n }\n }\n\n break;\n\n case KEY_CODES.ARROW_UP:\n case KEY_CODES.ARROW_DOWN:\n if (this.isInFullEditMode()) {\n if (!this.isWaiting() && !this.allowKeyEventPropagation(event.keyCode)) {\n stopImmediatePropagation(event);\n }\n }\n\n break;\n\n case KEY_CODES.ENTER:\n {\n var isMultipleSelection = this.hot.selection.isMultiple();\n\n if (ctrlDown && !isMultipleSelection || event.altKey) {\n // if ctrl+enter or alt+enter, add new line\n if (this.isOpened()) {\n var caretPosition = getCaretPosition(this.TEXTAREA);\n var value = this.getValue();\n var newValue = \"\".concat(value.slice(0, caretPosition), \"\\n\").concat(value.slice(caretPosition));\n this.setValue(newValue);\n setCaretPosition(this.TEXTAREA, caretPosition + 1);\n } else {\n this.beginEditing(\"\".concat(this.originalValue, \"\\n\"));\n }\n\n stopImmediatePropagation(event);\n }\n\n event.preventDefault(); // don't add newline to field\n\n break;\n }\n\n case KEY_CODES.BACKSPACE:\n case KEY_CODES.DELETE:\n case KEY_CODES.HOME:\n case KEY_CODES.END:\n stopImmediatePropagation(event); // backspace, delete, home, end should only work locally when cell is edited (not in table context)\n\n break;\n\n default:\n break;\n }\n\n var arrowKeyCodes = [KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN, KEY_CODES.ARROW_LEFT];\n\n if (arrowKeyCodes.indexOf(event.keyCode) === -1) {\n this.autoResize.resize(String.fromCharCode(event.keyCode));\n }\n }\n }], [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return TextEditor;\n}(BaseEditor);","/**\n * Adds appropriate CSS class to table cell, based on cellProperties.\n */\nimport { addClass, removeClass } from \"../../helpers/dom/element.mjs\";\nexport var RENDERER_TYPE = 'base';\n/**\n * @param {Core} instance The Handsontable instance.\n * @param {HTMLTableCellElement} TD The rendered cell element.\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\nexport function baseRenderer(instance, TD, row, col, prop, value, cellProperties) {\n var classesToAdd = [];\n var classesToRemove = [];\n\n if (cellProperties.className) {\n addClass(TD, cellProperties.className);\n }\n\n if (cellProperties.readOnly) {\n classesToAdd.push(cellProperties.readOnlyCellClassName);\n }\n\n if (cellProperties.valid === false && cellProperties.invalidCellClassName) {\n classesToAdd.push(cellProperties.invalidCellClassName);\n } else {\n classesToRemove.push(cellProperties.invalidCellClassName);\n }\n\n if (cellProperties.wordWrap === false && cellProperties.noWordWrapClassName) {\n classesToAdd.push(cellProperties.noWordWrapClassName);\n }\n\n if (!value && cellProperties.placeholder) {\n classesToAdd.push(cellProperties.placeholderCellClassName);\n }\n\n removeClass(TD, classesToRemove);\n addClass(TD, classesToAdd);\n}\nbaseRenderer.RENDERER_TYPE = RENDERER_TYPE;","import \"core-js/modules/es.string.trim.js\";\nimport { baseRenderer } from \"../baseRenderer/index.mjs\";\nimport { empty, fastInnerText } from \"../../helpers/dom/element.mjs\";\nimport { stringify } from \"../../helpers/mixed.mjs\";\nexport var RENDERER_TYPE = 'text';\n/**\n * Default text renderer.\n *\n * @private\n * @param {Core} instance The Handsontable instance.\n * @param {HTMLTableCellElement} TD The rendered cell element.\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\nexport function textRenderer(instance, TD, row, col, prop, value, cellProperties) {\n baseRenderer.apply(this, [instance, TD, row, col, prop, value, cellProperties]);\n var escaped = value;\n\n if (!escaped && cellProperties.placeholder) {\n escaped = cellProperties.placeholder;\n }\n\n escaped = stringify(escaped);\n\n if (instance.getSettings().trimWhitespace) {\n escaped = escaped.trim();\n }\n\n if (cellProperties.rendererTemplate) {\n empty(TD);\n var TEMPLATE = instance.rootDocument.createElement('TEMPLATE');\n TEMPLATE.setAttribute('bind', '{{}}');\n TEMPLATE.innerHTML = cellProperties.rendererTemplate;\n HTMLTemplateElement.decorate(TEMPLATE);\n TEMPLATE.model = instance.getSourceDataAtRow(row);\n TD.appendChild(TEMPLATE);\n } else {\n // this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\n fastInnerText(TD, escaped);\n }\n}\ntextRenderer.RENDERER_TYPE = RENDERER_TYPE;","import { TextEditor } from \"../../editors/textEditor/index.mjs\";\nimport { textRenderer } from \"../../renderers/textRenderer/index.mjs\";\nexport var CELL_TYPE = 'text';\nexport var TextCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: TextEditor,\n renderer: textRenderer\n};","import Core from \"./core.mjs\";\nimport { rootInstanceSymbol } from \"./utils/rootInstance.mjs\"; // FIXME: Bug in eslint-plugin-import: https://github.com/benmosher/eslint-plugin-import/issues/1883\n\n/* eslint-disable import/named */\n\nimport { dictionaryKeys, getTranslatedPhrase, registerLanguageDictionary, getLanguagesDictionaries, getLanguageDictionary } from \"./i18n/registry.mjs\";\n/* eslint-enable import/named */\n\nimport { registerCellType } from \"./cellTypes/registry.mjs\";\nimport { TextCellType } from \"./cellTypes/textType/index.mjs\";\nregisterCellType(TextCellType);\n/**\n * @param {HTMLElement} rootElement The element to which the Handsontable instance is injected.\n * @param {object} userSettings The user defined options.\n * @returns {Core}\n */\n\nfunction Handsontable(rootElement, userSettings) {\n var instance = new Core(rootElement, userSettings || {}, rootInstanceSymbol);\n instance.init();\n return instance;\n}\n\nHandsontable.Core = function (rootElement) {\n var userSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new Core(rootElement, userSettings, rootInstanceSymbol);\n};\n\nHandsontable.packageName = 'handsontable';\nHandsontable.buildDate = \"16/03/2021 11:25:57\";\nHandsontable.version = \"8.3.2\";\nHandsontable.languages = {\n dictionaryKeys: dictionaryKeys,\n getLanguageDictionary: getLanguageDictionary,\n getLanguagesDictionaries: getLanguagesDictionaries,\n registerLanguageDictionary: registerLanguageDictionary,\n getTranslatedPhrase: getTranslatedPhrase\n};\nexport default Handsontable;","import \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.string.trim.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { addClass, outerHeight, outerWidth } from \"./../helpers/dom/element.mjs\";\nimport { arrayEach } from \"./../helpers/array.mjs\";\n/**\n * @class GhostTable\n * @util\n */\n\nvar GhostTable = /*#__PURE__*/function () {\n function GhostTable(hotInstance) {\n _classCallCheck(this, GhostTable);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hotInstance;\n /**\n * Container element where every table will be injected.\n *\n * @type {HTMLElement|null}\n */\n\n this.container = null;\n /**\n * Flag which determine is table was injected to DOM.\n *\n * @type {boolean}\n */\n\n this.injected = false;\n /**\n * Added rows collection.\n *\n * @type {Array}\n */\n\n this.rows = [];\n /**\n * Added columns collection.\n *\n * @type {Array}\n */\n\n this.columns = [];\n /**\n * Samples prepared for calculations.\n *\n * @type {Map}\n * @default {null}\n */\n\n this.samples = null;\n /**\n * Ghost table settings.\n *\n * @type {object}\n * @default {Object}\n */\n\n this.settings = {\n useHeaders: true\n };\n }\n /**\n * Add row.\n *\n * @param {number} row Row index.\n * @param {Map} samples Samples Map object.\n */\n\n\n _createClass(GhostTable, [{\n key: \"addRow\",\n value: function addRow(row, samples) {\n if (this.columns.length) {\n throw new Error('Doesn\\'t support multi-dimensional table');\n }\n\n if (!this.rows.length) {\n this.container = this.createContainer(this.hot.rootElement.className);\n }\n\n var rowObject = {\n row: row\n };\n this.rows.push(rowObject);\n this.samples = samples;\n this.table = this.createTable(this.hot.table.className);\n this.table.colGroup.appendChild(this.createColGroupsCol());\n this.table.tr.appendChild(this.createRow(row));\n this.container.container.appendChild(this.table.fragment);\n rowObject.table = this.table.table;\n }\n /**\n * Add a row consisting of the column headers.\n *\n * @param {Map} samples A map with sampled table values.\n */\n\n }, {\n key: \"addColumnHeadersRow\",\n value: function addColumnHeadersRow(samples) {\n var colHeader = this.hot.getColHeader(0);\n\n if (colHeader !== null && colHeader !== void 0) {\n var rowObject = {\n row: -1\n };\n this.rows.push(rowObject);\n this.container = this.createContainer(this.hot.rootElement.className);\n this.samples = samples;\n this.table = this.createTable(this.hot.table.className);\n this.table.colGroup.appendChild(this.createColGroupsCol());\n this.appendColumnHeadersRow();\n this.container.container.appendChild(this.table.fragment);\n rowObject.table = this.table.table;\n }\n }\n /**\n * Add column.\n *\n * @param {number} column Column index.\n * @param {Map} samples A map with sampled table values.\n */\n\n }, {\n key: \"addColumn\",\n value: function addColumn(column, samples) {\n if (this.rows.length) {\n throw new Error('Doesn\\'t support multi-dimensional table');\n }\n\n if (!this.columns.length) {\n this.container = this.createContainer(this.hot.rootElement.className);\n }\n\n var columnObject = {\n col: column\n };\n this.columns.push(columnObject);\n this.samples = samples;\n this.table = this.createTable(this.hot.table.className);\n\n if (this.getSetting('useHeaders') && this.hot.getColHeader(column) !== null) {\n // Please keep in mind that the renderable column index equal to the visual columns index for the GhostTable.\n // We render all columns.\n this.hot.view.appendColHeader(column, this.table.th);\n }\n\n this.table.tBody.appendChild(this.createCol(column));\n this.container.container.appendChild(this.table.fragment);\n columnObject.table = this.table.table;\n }\n /**\n * Get calculated heights.\n *\n * @param {Function} callback Callback which will be fired for each calculated row.\n */\n\n }, {\n key: \"getHeights\",\n value: function getHeights(callback) {\n if (!this.injected) {\n this.injectTable();\n }\n\n arrayEach(this.rows, function (row) {\n // -1 <- reduce border-top from table\n callback(row.row, outerHeight(row.table) - 1);\n });\n }\n /**\n * Get calculated widths.\n *\n * @param {Function} callback Callback which will be fired for each calculated column.\n */\n\n }, {\n key: \"getWidths\",\n value: function getWidths(callback) {\n if (!this.injected) {\n this.injectTable();\n }\n\n arrayEach(this.columns, function (column) {\n callback(column.col, outerWidth(column.table));\n });\n }\n /**\n * Set the Ghost Table settings to the provided object.\n *\n * @param {object} settings New Ghost Table Settings.\n */\n\n }, {\n key: \"setSettings\",\n value: function setSettings(settings) {\n this.settings = settings;\n }\n /**\n * Set a single setting of the Ghost Table.\n *\n * @param {string} name Setting name.\n * @param {*} value Setting value.\n */\n\n }, {\n key: \"setSetting\",\n value: function setSetting(name, value) {\n if (!this.settings) {\n this.settings = {};\n }\n\n this.settings[name] = value;\n }\n /**\n * Get the Ghost Table settings.\n *\n * @returns {object|null}\n */\n\n }, {\n key: \"getSettings\",\n value: function getSettings() {\n return this.settings;\n }\n /**\n * Get a single Ghost Table setting.\n *\n * @param {string} name The setting name to get.\n * @returns {boolean|null}\n */\n\n }, {\n key: \"getSetting\",\n value: function getSetting(name) {\n if (this.settings) {\n return this.settings[name];\n }\n\n return null;\n }\n /**\n * Create colgroup col elements.\n *\n * @returns {DocumentFragment}\n */\n\n }, {\n key: \"createColGroupsCol\",\n value: function createColGroupsCol() {\n var _this = this;\n\n var fragment = this.hot.rootDocument.createDocumentFragment();\n\n if (this.hot.hasRowHeaders()) {\n fragment.appendChild(this.createColElement(-1));\n }\n\n this.samples.forEach(function (sample) {\n arrayEach(sample.strings, function (string) {\n fragment.appendChild(_this.createColElement(string.col));\n });\n });\n return fragment;\n }\n /**\n * Create table row element.\n *\n * @param {number} row Row index.\n * @returns {DocumentFragment} Returns created table row elements.\n */\n\n }, {\n key: \"createRow\",\n value: function createRow(row) {\n var _this2 = this;\n\n var rootDocument = this.hot.rootDocument;\n var fragment = rootDocument.createDocumentFragment();\n var th = rootDocument.createElement('th');\n\n if (this.hot.hasRowHeaders()) {\n this.hot.view.appendRowHeader(row, th);\n fragment.appendChild(th);\n }\n\n this.samples.forEach(function (sample) {\n arrayEach(sample.strings, function (string) {\n var column = string.col;\n\n var cellProperties = _this2.hot.getCellMeta(row, column);\n\n cellProperties.col = column;\n cellProperties.row = row;\n\n var renderer = _this2.hot.getCellRenderer(cellProperties);\n\n var td = rootDocument.createElement('td'); // Indicate that this element is created and supported by GhostTable. It can be useful to\n // exclude rendering performance costly logic or exclude logic which doesn't work within a hidden table.\n\n td.setAttribute('ghost-table', 1);\n renderer(_this2.hot, td, row, column, _this2.hot.colToProp(column), string.value, cellProperties);\n fragment.appendChild(td);\n });\n });\n return fragment;\n }\n /**\n * Creates DOM elements for headers and appends them to the THEAD element of the table.\n */\n\n }, {\n key: \"appendColumnHeadersRow\",\n value: function appendColumnHeadersRow() {\n var _this3 = this;\n\n var rootDocument = this.hot.rootDocument;\n var domFragment = rootDocument.createDocumentFragment();\n var columnHeaders = [];\n\n if (this.hot.hasRowHeaders()) {\n var th = rootDocument.createElement('th');\n columnHeaders.push([-1, th]);\n domFragment.appendChild(th);\n }\n\n this.samples.forEach(function (sample) {\n arrayEach(sample.strings, function (string) {\n var column = string.col;\n var th = rootDocument.createElement('th');\n columnHeaders.push([column, th]);\n domFragment.appendChild(th);\n });\n }); // Appending DOM elements for headers\n\n this.table.tHead.appendChild(domFragment);\n arrayEach(columnHeaders, function (columnHeader) {\n var _columnHeader = _slicedToArray(columnHeader, 2),\n column = _columnHeader[0],\n th = _columnHeader[1]; // Using source method for filling a header with value.\n\n\n _this3.hot.view.appendColHeader(column, th);\n });\n }\n /**\n * Create table column elements.\n *\n * @param {number} column Column index.\n * @returns {DocumentFragment} Returns created column table column elements.\n */\n\n }, {\n key: \"createCol\",\n value: function createCol(column) {\n var _this4 = this;\n\n var rootDocument = this.hot.rootDocument;\n var fragment = rootDocument.createDocumentFragment();\n this.samples.forEach(function (sample) {\n arrayEach(sample.strings, function (string) {\n var row = string.row;\n\n var cellProperties = _this4.hot.getCellMeta(row, column);\n\n cellProperties.col = column;\n cellProperties.row = row;\n\n var renderer = _this4.hot.getCellRenderer(cellProperties);\n\n var td = rootDocument.createElement('td');\n var tr = rootDocument.createElement('tr'); // Indicate that this element is created and supported by GhostTable. It can be useful to\n // exclude rendering performance costly logic or exclude logic which doesn't work within a hidden table.\n\n td.setAttribute('ghost-table', 1);\n renderer(_this4.hot, td, row, column, _this4.hot.colToProp(column), string.value, cellProperties);\n tr.appendChild(td);\n fragment.appendChild(tr);\n });\n });\n return fragment;\n }\n /**\n * Remove table from document and reset internal state.\n */\n\n }, {\n key: \"clean\",\n value: function clean() {\n this.rows.length = 0;\n this.rows[-1] = void 0;\n this.columns.length = 0;\n\n if (this.samples) {\n this.samples.clear();\n }\n\n this.samples = null;\n this.removeTable();\n }\n /**\n * Inject generated table into document.\n *\n * @param {HTMLElement} [parent=null] The element to which the ghost table is injected.\n */\n\n }, {\n key: \"injectTable\",\n value: function injectTable() {\n var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n if (!this.injected) {\n (parent || this.hot.rootElement).appendChild(this.container.fragment);\n this.injected = true;\n }\n }\n /**\n * Remove table from document.\n */\n\n }, {\n key: \"removeTable\",\n value: function removeTable() {\n if (this.injected && this.container.container.parentNode) {\n this.container.container.parentNode.removeChild(this.container.container);\n this.container = null;\n this.injected = false;\n }\n }\n /**\n * Create col element.\n *\n * @param {number} column Column index.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"createColElement\",\n value: function createColElement(column) {\n var col = this.hot.rootDocument.createElement('col');\n col.style.width = \"\".concat(this.hot.view.wt.wtTable.getStretchedColumnWidth(column), \"px\");\n return col;\n }\n /**\n * Create table element.\n *\n * @param {string} className The CSS classes to add.\n * @returns {object}\n */\n\n }, {\n key: \"createTable\",\n value: function createTable() {\n var className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var rootDocument = this.hot.rootDocument;\n var fragment = rootDocument.createDocumentFragment();\n var table = rootDocument.createElement('table');\n var tHead = rootDocument.createElement('thead');\n var tBody = rootDocument.createElement('tbody');\n var colGroup = rootDocument.createElement('colgroup');\n var tr = rootDocument.createElement('tr');\n var th = rootDocument.createElement('th');\n\n if (this.isVertical()) {\n table.appendChild(colGroup);\n }\n\n if (this.isHorizontal()) {\n tr.appendChild(th);\n tHead.appendChild(tr);\n table.style.tableLayout = 'auto';\n table.style.width = 'auto';\n }\n\n table.appendChild(tHead);\n\n if (this.isVertical()) {\n tBody.appendChild(tr);\n }\n\n table.appendChild(tBody);\n addClass(table, className);\n fragment.appendChild(table);\n return {\n fragment: fragment,\n table: table,\n tHead: tHead,\n tBody: tBody,\n colGroup: colGroup,\n tr: tr,\n th: th\n };\n }\n /**\n * Create container for tables.\n *\n * @param {string} className The CSS classes to add.\n * @returns {object}\n */\n\n }, {\n key: \"createContainer\",\n value: function createContainer() {\n var className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var rootDocument = this.hot.rootDocument;\n var fragment = rootDocument.createDocumentFragment();\n var container = rootDocument.createElement('div');\n var containerClassName = \"htGhostTable htAutoSize \".concat(className.trim());\n addClass(container, containerClassName);\n fragment.appendChild(container);\n return {\n fragment: fragment,\n container: container\n };\n }\n /**\n * Checks if table is raised vertically (checking rows).\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isVertical\",\n value: function isVertical() {\n return !!(this.rows.length && !this.columns.length);\n }\n /**\n * Checks if table is raised horizontally (checking columns).\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isHorizontal\",\n value: function isHorizontal() {\n return !!(this.columns.length && !this.rows.length);\n }\n }]);\n\n return GhostTable;\n}();\n\nexport default GhostTable;","/**\n * Get normalized Date object for the ISO formatted date strings.\n * Natively, the date object parsed from a ISO 8601 string will be offsetted by the timezone difference, which may result in returning a wrong date.\n * See: Github issue #3338.\n *\n * @param {string} dateString String representing the date.\n * @returns {Date} The proper Date object.\n */\nexport function getNormalizedDate(dateString) {\n var nativeDate = new Date(dateString); // NaN if dateString is not in ISO format\n\n if (!isNaN(new Date(\"\".concat(dateString, \"T00:00\")).getDate())) {\n // Compensate timezone offset\n return new Date(nativeDate.getTime() + nativeDate.getTimezoneOffset() * 60000);\n }\n\n return nativeDate;\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { TextEditor } from \"../textEditor/index.mjs\";\nimport { setCaretPosition } from \"../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation, isImmediatePropagationStopped } from \"../../helpers/dom/event.mjs\";\nimport { KEY_CODES } from \"../../helpers/unicode.mjs\";\nimport { extend } from \"../../helpers/object.mjs\";\nexport var EDITOR_TYPE = 'handsontable';\n/**\n * @private\n * @class HandsontableEditor\n */\n\nexport var HandsontableEditor = /*#__PURE__*/function (_TextEditor) {\n _inherits(HandsontableEditor, _TextEditor);\n\n var _super = _createSuper(HandsontableEditor);\n\n function HandsontableEditor() {\n _classCallCheck(this, HandsontableEditor);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(HandsontableEditor, [{\n key: \"open\",\n value:\n /**\n * Opens the editor and adjust its size.\n */\n function open() {\n // this.addHook('beforeKeyDown', event => this.onBeforeKeyDown(event));\n _get(_getPrototypeOf(HandsontableEditor.prototype), \"open\", this).call(this);\n\n if (this.htEditor) {\n this.htEditor.destroy();\n }\n\n if (this.htContainer.style.display === 'none') {\n this.htContainer.style.display = '';\n } // Construct and initialise a new Handsontable\n\n\n this.htEditor = new this.hot.constructor(this.htContainer, this.htOptions);\n this.htEditor.init();\n this.htEditor.rootElement.style.display = '';\n\n if (this.cellProperties.strict) {\n this.htEditor.selectCell(0, 0);\n } else {\n this.htEditor.deselectCell();\n }\n\n setCaretPosition(this.TEXTAREA, 0, this.TEXTAREA.value.length);\n }\n /**\n * Closes the editor.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n if (this.htEditor) {\n this.htEditor.rootElement.style.display = 'none';\n }\n\n this.removeHooksByKey('beforeKeyDown');\n\n _get(_getPrototypeOf(HandsontableEditor.prototype), \"close\", this).call(this);\n }\n /**\n * Prepares editor's meta data and configuration of the internal Handsontable's instance.\n *\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {HTMLTableCellElement} td The rendered cell element.\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\n }, {\n key: \"prepare\",\n value: function prepare(row, col, prop, td, value, cellProperties) {\n _get(_getPrototypeOf(HandsontableEditor.prototype), \"prepare\", this).call(this, row, col, prop, td, value, cellProperties);\n\n var parent = this;\n var options = {\n startRows: 0,\n startCols: 0,\n minRows: 0,\n minCols: 0,\n className: 'listbox',\n copyPaste: false,\n autoColumnSize: false,\n autoRowSize: false,\n readOnly: true,\n fillHandle: false,\n autoWrapCol: false,\n autoWrapRow: false,\n afterOnCellMouseDown: function afterOnCellMouseDown(_, coords) {\n var sourceValue = this.getSourceData(coords.row, coords.col); // if the value is undefined then it means we don't want to set the value\n\n if (sourceValue !== void 0) {\n parent.setValue(sourceValue);\n }\n\n parent.instance.destroyEditor();\n },\n preventWheel: true\n };\n\n if (this.cellProperties.handsontable) {\n extend(options, cellProperties.handsontable);\n }\n\n this.htOptions = options;\n }\n /**\n * Begins editing on a highlighted cell and hides fillHandle corner if was present.\n *\n * @param {*} newInitialValue The editor initial value.\n * @param {*} event The keyboard event object.\n */\n\n }, {\n key: \"beginEditing\",\n value: function beginEditing(newInitialValue, event) {\n var onBeginEditing = this.hot.getSettings().onBeginEditing;\n\n if (onBeginEditing && onBeginEditing() === false) {\n return;\n }\n\n _get(_getPrototypeOf(HandsontableEditor.prototype), \"beginEditing\", this).call(this, newInitialValue, event);\n }\n /**\n * Creates an editor's elements and adds necessary CSS classnames.\n */\n\n }, {\n key: \"createElements\",\n value: function createElements() {\n _get(_getPrototypeOf(HandsontableEditor.prototype), \"createElements\", this).call(this);\n\n var DIV = this.hot.rootDocument.createElement('DIV');\n DIV.className = 'handsontableEditor';\n this.TEXTAREA_PARENT.appendChild(DIV);\n this.htContainer = DIV;\n this.assignHooks();\n }\n /**\n * Finishes editing and start saving or restoring process for editing cell or last selected range.\n *\n * @param {boolean} restoreOriginalValue If true, then closes editor without saving value from the editor into a cell.\n * @param {boolean} ctrlDown If true, then saveValue will save editor's value to each cell in the last selected range.\n * @param {Function} callback The callback function, fired after editor closing.\n */\n\n }, {\n key: \"finishEditing\",\n value: function finishEditing(restoreOriginalValue, ctrlDown, callback) {\n if (this.htEditor && this.htEditor.isListening()) {\n // if focus is still in the HOT editor\n this.hot.listen(); // return the focus to the parent HOT instance\n }\n\n if (this.htEditor && this.htEditor.getSelectedLast()) {\n var value = this.htEditor.getInstance().getValue();\n\n if (value !== void 0) {\n // if the value is undefined then it means we don't want to set the value\n this.setValue(value);\n }\n }\n\n _get(_getPrototypeOf(HandsontableEditor.prototype), \"finishEditing\", this).call(this, restoreOriginalValue, ctrlDown, callback);\n }\n /**\n * Assings afterDestroy callback to prevent memory leaks.\n *\n * @private\n */\n\n }, {\n key: \"assignHooks\",\n value: function assignHooks() {\n var _this = this;\n\n this.hot.addHook('afterDestroy', function () {\n if (_this.htEditor) {\n _this.htEditor.destroy();\n }\n });\n }\n /**\n * OnBeforeKeyDown callback.\n *\n * @private\n * @param {Event} event The keyboard event object.\n */\n\n }, {\n key: \"onBeforeKeyDown\",\n value: function onBeforeKeyDown(event) {\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n var innerHOT = this.htEditor.getInstance();\n var rowToSelect;\n var selectedRow;\n\n if (event.keyCode === KEY_CODES.ARROW_DOWN) {\n if (!innerHOT.getSelectedLast() && !innerHOT.flipped) {\n rowToSelect = 0;\n } else if (innerHOT.getSelectedLast()) {\n if (innerHOT.flipped) {\n rowToSelect = innerHOT.getSelectedLast()[0] + 1;\n } else if (!innerHOT.flipped) {\n var lastRow = innerHOT.countRows() - 1;\n selectedRow = innerHOT.getSelectedLast()[0];\n rowToSelect = Math.min(lastRow, selectedRow + 1);\n }\n }\n } else if (event.keyCode === KEY_CODES.ARROW_UP) {\n if (!innerHOT.getSelectedLast() && innerHOT.flipped) {\n rowToSelect = innerHOT.countRows() - 1;\n } else if (innerHOT.getSelectedLast()) {\n if (innerHOT.flipped) {\n selectedRow = innerHOT.getSelectedLast()[0];\n rowToSelect = Math.max(0, selectedRow - 1);\n } else {\n selectedRow = innerHOT.getSelectedLast()[0];\n rowToSelect = selectedRow - 1;\n }\n }\n }\n\n if (rowToSelect !== void 0) {\n if (rowToSelect < 0 || innerHOT.flipped && rowToSelect > innerHOT.countRows() - 1) {\n innerHOT.deselectCell();\n } else {\n innerHOT.selectCell(rowToSelect, 0);\n }\n\n if (innerHOT.getData().length) {\n event.preventDefault();\n stopImmediatePropagation(event);\n this.hot.listen();\n this.TEXTAREA.focus();\n }\n }\n\n _get(_getPrototypeOf(HandsontableEditor.prototype), \"onBeforeKeyDown\", this).call(this, event);\n }\n }], [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return HandsontableEditor;\n}(TextEditor);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { HandsontableEditor } from \"../handsontableEditor/index.mjs\";\nimport { arrayMap, pivot } from \"../../helpers/array.mjs\";\nimport { addClass, getCaretPosition, getScrollbarWidth, getSelectionEndPosition, getTrimmingContainer, offset, outerHeight, outerWidth, setCaretPosition } from \"../../helpers/dom/element.mjs\";\nimport { isDefined, stringify } from \"../../helpers/mixed.mjs\";\nimport { stripTags } from \"../../helpers/string.mjs\";\nimport { KEY_CODES, isPrintableChar } from \"../../helpers/unicode.mjs\";\nimport { textRenderer } from \"../../renderers/textRenderer/index.mjs\";\nvar privatePool = new WeakMap();\nexport var EDITOR_TYPE = 'autocomplete';\n/**\n * @private\n * @class AutocompleteEditor\n */\n\nexport var AutocompleteEditor = /*#__PURE__*/function (_HandsontableEditor) {\n _inherits(AutocompleteEditor, _HandsontableEditor);\n\n var _super = _createSuper(AutocompleteEditor);\n\n function AutocompleteEditor(instance) {\n var _this;\n\n _classCallCheck(this, AutocompleteEditor);\n\n _this = _super.call(this, instance);\n /**\n * Query string to turn available values over.\n *\n * @type {string}\n */\n\n _this.query = null;\n /**\n * Contains stripped choices.\n *\n * @type {string[]}\n */\n\n _this.strippedChoices = [];\n /**\n * Contains raw choices.\n *\n * @type {Array}\n */\n\n _this.rawChoices = [];\n privatePool.set(_assertThisInitialized(_this), {\n skipOne: false,\n isMacOS: _this.hot.rootWindow.navigator.platform.indexOf('Mac') > -1\n });\n return _this;\n }\n /**\n * Gets current value from editable element.\n *\n * @returns {string}\n */\n\n\n _createClass(AutocompleteEditor, [{\n key: \"getValue\",\n value: function getValue() {\n var _this2 = this;\n\n var selectedValue = this.rawChoices.find(function (value) {\n var strippedValue = _this2.stripValueIfNeeded(value);\n\n return strippedValue === _this2.TEXTAREA.value;\n });\n\n if (isDefined(selectedValue)) {\n return selectedValue;\n }\n\n return this.TEXTAREA.value;\n }\n /**\n * Creates an editor's elements and adds necessary CSS classnames.\n */\n\n }, {\n key: \"createElements\",\n value: function createElements() {\n _get(_getPrototypeOf(AutocompleteEditor.prototype), \"createElements\", this).call(this);\n\n addClass(this.htContainer, 'autocompleteEditor');\n addClass(this.htContainer, this.hot.rootWindow.navigator.platform.indexOf('Mac') === -1 ? '' : 'htMacScroll');\n }\n /**\n * Opens the editor and adjust its size and internal Handsontable's instance.\n */\n\n }, {\n key: \"open\",\n value: function open() {\n var _this3 = this;\n\n var priv = privatePool.get(this);\n\n _get(_getPrototypeOf(AutocompleteEditor.prototype), \"open\", this).call(this);\n\n var choicesListHot = this.htEditor.getInstance();\n var trimDropdown = this.cellProperties.trimDropdown === void 0 ? true : this.cellProperties.trimDropdown;\n this.showEditableElement();\n this.focus();\n var scrollbarWidth = getScrollbarWidth();\n\n if (scrollbarWidth === 0 && priv.isMacOS) {\n scrollbarWidth += 15; // default scroll bar width if scroll bars are visible only when scrolling\n }\n\n choicesListHot.updateSettings({\n colWidths: trimDropdown ? [outerWidth(this.TEXTAREA) - 2] : void 0,\n width: trimDropdown ? outerWidth(this.TEXTAREA) + scrollbarWidth : void 0,\n renderer: function renderer(instance, TD, row, col, prop, value, cellProperties) {\n textRenderer(instance, TD, row, col, prop, value, cellProperties);\n var _this3$cellProperties = _this3.cellProperties,\n filteringCaseSensitive = _this3$cellProperties.filteringCaseSensitive,\n allowHtml = _this3$cellProperties.allowHtml;\n var query = _this3.query;\n var cellValue = stringify(value);\n var indexOfMatch;\n var match;\n\n if (cellValue && !allowHtml) {\n indexOfMatch = filteringCaseSensitive === true ? cellValue.indexOf(query) : cellValue.toLowerCase().indexOf(query.toLowerCase());\n\n if (indexOfMatch !== -1) {\n match = cellValue.substr(indexOfMatch, query.length);\n cellValue = cellValue.replace(match, \"\".concat(match, \" \"));\n }\n }\n\n TD.innerHTML = cellValue;\n },\n autoColumnSize: true\n });\n\n if (priv.skipOne) {\n priv.skipOne = false;\n }\n\n this.hot._registerTimeout(function () {\n _this3.queryChoices(_this3.TEXTAREA.value);\n });\n }\n /**\n * Closes the editor.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n this.removeHooksByKey('beforeKeyDown');\n\n _get(_getPrototypeOf(AutocompleteEditor.prototype), \"close\", this).call(this);\n }\n /**\n * Verifies result of validation or closes editor if user's cancelled changes.\n *\n * @param {boolean|undefined} result If `false` and the cell using allowInvalid option,\n * then an editor won't be closed until validation is passed.\n */\n\n }, {\n key: \"discardEditor\",\n value: function discardEditor(result) {\n _get(_getPrototypeOf(AutocompleteEditor.prototype), \"discardEditor\", this).call(this, result);\n\n this.hot.view.render();\n }\n /**\n * Prepares choices list based on applied argument.\n *\n * @private\n * @param {string} query The query.\n */\n\n }, {\n key: \"queryChoices\",\n value: function queryChoices(query) {\n var _this4 = this;\n\n var source = this.cellProperties.source;\n this.query = query;\n\n if (typeof source === 'function') {\n source.call(this.cellProperties, query, function (choices) {\n _this4.rawChoices = choices;\n\n _this4.updateChoicesList(_this4.stripValuesIfNeeded(choices));\n });\n } else if (Array.isArray(source)) {\n this.rawChoices = source;\n this.updateChoicesList(this.stripValuesIfNeeded(source));\n } else {\n this.updateChoicesList([]);\n }\n }\n /**\n * Updates list of the possible completions to choose.\n *\n * @private\n * @param {Array} choicesList The choices list to process.\n */\n\n }, {\n key: \"updateChoicesList\",\n value: function updateChoicesList(choicesList) {\n var pos = getCaretPosition(this.TEXTAREA);\n var endPos = getSelectionEndPosition(this.TEXTAREA);\n var sortByRelevanceSetting = this.cellProperties.sortByRelevance;\n var filterSetting = this.cellProperties.filter;\n var orderByRelevance = null;\n var highlightIndex = null;\n var choices = choicesList;\n\n if (sortByRelevanceSetting) {\n orderByRelevance = AutocompleteEditor.sortByRelevance(this.stripValueIfNeeded(this.getValue()), choices, this.cellProperties.filteringCaseSensitive);\n }\n\n var orderByRelevanceLength = Array.isArray(orderByRelevance) ? orderByRelevance.length : 0;\n\n if (filterSetting === false) {\n if (orderByRelevanceLength) {\n highlightIndex = orderByRelevance[0];\n }\n } else {\n var sorted = [];\n\n for (var i = 0, choicesCount = choices.length; i < choicesCount; i++) {\n if (sortByRelevanceSetting && orderByRelevanceLength <= i) {\n break;\n }\n\n if (orderByRelevanceLength) {\n sorted.push(choices[orderByRelevance[i]]);\n } else {\n sorted.push(choices[i]);\n }\n }\n\n highlightIndex = 0;\n choices = sorted;\n }\n\n this.strippedChoices = choices;\n this.htEditor.loadData(pivot([choices]));\n this.updateDropdownHeight();\n this.flipDropdownIfNeeded();\n\n if (this.cellProperties.strict === true) {\n this.highlightBestMatchingChoice(highlightIndex);\n }\n\n this.hot.listen();\n setCaretPosition(this.TEXTAREA, pos, pos === endPos ? void 0 : endPos);\n }\n /**\n * Checks where is enough place to open editor.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"flipDropdownIfNeeded\",\n value: function flipDropdownIfNeeded() {\n var textareaOffset = offset(this.TEXTAREA);\n var textareaHeight = outerHeight(this.TEXTAREA);\n var dropdownHeight = this.getDropdownHeight();\n var trimmingContainer = getTrimmingContainer(this.hot.view.wt.wtTable.TABLE);\n var trimmingContainerScrollTop = trimmingContainer.scrollTop;\n var headersHeight = outerHeight(this.hot.view.wt.wtTable.THEAD);\n var containerOffset = {\n row: 0,\n col: 0\n };\n\n if (trimmingContainer !== this.hot.rootWindow) {\n containerOffset = offset(trimmingContainer);\n }\n\n var spaceAbove = textareaOffset.top - containerOffset.top - headersHeight + trimmingContainerScrollTop;\n var spaceBelow = trimmingContainer.scrollHeight - spaceAbove - headersHeight - textareaHeight;\n var flipNeeded = dropdownHeight > spaceBelow && spaceAbove > spaceBelow;\n\n if (flipNeeded) {\n this.flipDropdown(dropdownHeight);\n } else {\n this.unflipDropdown();\n }\n\n this.limitDropdownIfNeeded(flipNeeded ? spaceAbove : spaceBelow, dropdownHeight);\n return flipNeeded;\n }\n /**\n * Checks if the internal table should generate scrollbar or could be rendered without it.\n *\n * @private\n * @param {number} spaceAvailable The free space as height definded in px available for dropdown list.\n * @param {number} dropdownHeight The dropdown height.\n */\n\n }, {\n key: \"limitDropdownIfNeeded\",\n value: function limitDropdownIfNeeded(spaceAvailable, dropdownHeight) {\n if (dropdownHeight > spaceAvailable) {\n var tempHeight = 0;\n var i = 0;\n var lastRowHeight = 0;\n var height = null;\n\n do {\n lastRowHeight = this.htEditor.getRowHeight(i) || this.htEditor.view.wt.wtSettings.settings.defaultRowHeight;\n tempHeight += lastRowHeight;\n i += 1;\n } while (tempHeight < spaceAvailable);\n\n height = tempHeight - lastRowHeight;\n\n if (this.htEditor.flipped) {\n this.htEditor.rootElement.style.top = \"\".concat(parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height, \"px\"); // eslint-disable-line max-len\n }\n\n this.setDropdownHeight(tempHeight - lastRowHeight);\n }\n }\n /**\n * Configures editor to open it at the top.\n *\n * @private\n * @param {number} dropdownHeight The dropdown height.\n */\n\n }, {\n key: \"flipDropdown\",\n value: function flipDropdown(dropdownHeight) {\n var dropdownStyle = this.htEditor.rootElement.style;\n dropdownStyle.position = 'absolute';\n dropdownStyle.top = \"\".concat(-dropdownHeight, \"px\");\n this.htEditor.flipped = true;\n }\n /**\n * Configures editor to open it at the bottom.\n *\n * @private\n */\n\n }, {\n key: \"unflipDropdown\",\n value: function unflipDropdown() {\n var dropdownStyle = this.htEditor.rootElement.style;\n\n if (dropdownStyle.position === 'absolute') {\n dropdownStyle.position = '';\n dropdownStyle.top = '';\n }\n\n this.htEditor.flipped = void 0;\n }\n /**\n * Updates width and height of the internal Handsontable's instance.\n *\n * @private\n */\n\n }, {\n key: \"updateDropdownHeight\",\n value: function updateDropdownHeight() {\n var currentDropdownWidth = this.htEditor.getColWidth(0) + getScrollbarWidth(this.hot.rootDocument) + 2;\n var trimDropdown = this.cellProperties.trimDropdown;\n this.htEditor.updateSettings({\n height: this.getDropdownHeight(),\n width: trimDropdown ? void 0 : currentDropdownWidth\n });\n this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer();\n }\n /**\n * Sets new height of the internal Handsontable's instance.\n *\n * @private\n * @param {number} height The new dropdown height.\n */\n\n }, {\n key: \"setDropdownHeight\",\n value: function setDropdownHeight(height) {\n this.htEditor.updateSettings({\n height: height\n });\n }\n /**\n * Creates new selection on specified row index, or deselects selected cells.\n *\n * @private\n * @param {number|undefined} index The visual row index.\n */\n\n }, {\n key: \"highlightBestMatchingChoice\",\n value: function highlightBestMatchingChoice(index) {\n if (typeof index === 'number') {\n this.htEditor.selectCell(index, 0, void 0, void 0, void 0, false);\n } else {\n this.htEditor.deselectCell();\n }\n }\n /**\n * Calculates and return the internal Handsontable's height.\n *\n * @private\n * @returns {number}\n */\n\n }, {\n key: \"getDropdownHeight\",\n value: function getDropdownHeight() {\n var firstRowHeight = this.htEditor.getInstance().getRowHeight(0) || 23;\n var visibleRows = this.cellProperties.visibleRows;\n return this.strippedChoices.length >= visibleRows ? visibleRows * firstRowHeight : this.strippedChoices.length * firstRowHeight + 8; // eslint-disable-line max-len\n }\n /**\n * Sanitizes value from potential dangerous tags.\n *\n * @private\n * @param {string} value The value to sanitize.\n * @returns {string}\n */\n\n }, {\n key: \"stripValueIfNeeded\",\n value: function stripValueIfNeeded(value) {\n return this.stripValuesIfNeeded([value])[0];\n }\n /**\n * Sanitizes an array of the values from potential dangerous tags.\n *\n * @private\n * @param {string[]} values The value to sanitize.\n * @returns {string[]}\n */\n\n }, {\n key: \"stripValuesIfNeeded\",\n value: function stripValuesIfNeeded(values) {\n var allowHtml = this.cellProperties.allowHtml;\n var stringifiedValues = arrayMap(values, function (value) {\n return stringify(value);\n });\n var strippedValues = arrayMap(stringifiedValues, function (value) {\n return allowHtml ? value : stripTags(value);\n });\n return strippedValues;\n }\n /**\n * Captures use of arrow down and up to control their behaviour.\n *\n * @private\n * @param {number} keyCode The keyboard keycode.\n * @returns {boolean}\n */\n\n }, {\n key: \"allowKeyEventPropagation\",\n value: function allowKeyEventPropagation(keyCode) {\n var selectedRange = this.htEditor.getSelectedRangeLast();\n var selected = {\n row: selectedRange ? selectedRange.from.row : -1\n };\n var allowed = false;\n\n if (keyCode === KEY_CODES.ARROW_DOWN && selected.row > 0 && selected.row < this.htEditor.countRows() - 1) {\n allowed = true;\n }\n\n if (keyCode === KEY_CODES.ARROW_UP && selected.row > -1) {\n allowed = true;\n }\n\n return allowed;\n }\n /**\n * OnBeforeKeyDown callback.\n *\n * @private\n * @param {KeyboardEvent} event The keyboard event object.\n */\n\n }, {\n key: \"onBeforeKeyDown\",\n value: function onBeforeKeyDown(event) {\n var _this5 = this;\n\n var priv = privatePool.get(this);\n priv.skipOne = false;\n\n if (isPrintableChar(event.keyCode) || event.keyCode === KEY_CODES.BACKSPACE || event.keyCode === KEY_CODES.DELETE || event.keyCode === KEY_CODES.INSERT) {\n var timeOffset = 0; // on ctl+c / cmd+c don't update suggestion list\n\n if (event.keyCode === KEY_CODES.C && (event.ctrlKey || event.metaKey)) {\n return;\n }\n\n if (!this.isOpened()) {\n timeOffset += 10;\n }\n\n if (this.htEditor) {\n this.hot._registerTimeout(function () {\n _this5.queryChoices(_this5.TEXTAREA.value);\n\n priv.skipOne = true;\n }, timeOffset);\n }\n }\n\n _get(_getPrototypeOf(AutocompleteEditor.prototype), \"onBeforeKeyDown\", this).call(this, event);\n }\n }], [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return AutocompleteEditor;\n}(HandsontableEditor);\n/**\n * Filters and sorts by relevance.\n *\n * @param {*} value The selected value.\n * @param {string[]} choices The list of available choices.\n * @param {boolean} caseSensitive Indicates if it's sorted by case.\n * @returns {number[]} Array of indexes in original choices array.\n */\n\nAutocompleteEditor.sortByRelevance = function (value, choices, caseSensitive) {\n var choicesRelevance = [];\n var result = [];\n var valueLength = value.length;\n var choicesCount = choices.length;\n var charsLeft;\n var currentItem;\n var i;\n var valueIndex;\n\n if (valueLength === 0) {\n for (i = 0; i < choicesCount; i++) {\n result.push(i);\n }\n\n return result;\n }\n\n for (i = 0; i < choicesCount; i++) {\n currentItem = stripTags(stringify(choices[i]));\n\n if (caseSensitive) {\n valueIndex = currentItem.indexOf(value);\n } else {\n valueIndex = currentItem.toLowerCase().indexOf(value.toLowerCase());\n }\n\n if (valueIndex !== -1) {\n charsLeft = currentItem.length - valueIndex - valueLength;\n choicesRelevance.push({\n baseIndex: i,\n index: valueIndex,\n charsLeft: charsLeft,\n value: currentItem\n });\n }\n }\n\n choicesRelevance.sort(function (a, b) {\n if (b.index === -1) {\n return -1;\n }\n\n if (a.index === -1) {\n return 1;\n }\n\n if (a.index < b.index) {\n return -1;\n } else if (b.index < a.index) {\n return 1;\n } else if (a.index === b.index) {\n if (a.charsLeft < b.charsLeft) {\n return -1;\n } else if (a.charsLeft > b.charsLeft) {\n return 1;\n }\n }\n\n return 0;\n });\n\n for (i = 0, choicesCount = choicesRelevance.length; i < choicesCount; i++) {\n result.push(choicesRelevance[i].baseIndex);\n }\n\n return result;\n};","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BaseEditor } from \"../baseEditor/index.mjs\";\nimport { hasClass } from \"../../helpers/dom/element.mjs\";\nexport var EDITOR_TYPE = 'checkbox';\n/**\n * @private\n * @class CheckboxEditor\n */\n\nexport var CheckboxEditor = /*#__PURE__*/function (_BaseEditor) {\n _inherits(CheckboxEditor, _BaseEditor);\n\n var _super = _createSuper(CheckboxEditor);\n\n function CheckboxEditor() {\n _classCallCheck(this, CheckboxEditor);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(CheckboxEditor, [{\n key: \"beginEditing\",\n value: function beginEditing(initialValue, event) {\n // Just some events connected with checkbox editor are delegated here. Some `keydown` events like `enter` and `space` key press\n // are handled inside `checkboxRenderer`. Some events come here from `editorManager`. Below `if` statement was created by author\n // for purpose of handling only `doubleclick` event which may be done on a cell with checkbox.\n if (event && event.type === 'mouseup') {\n var checkbox = this.TD.querySelector('input[type=\"checkbox\"]');\n\n if (!hasClass(checkbox, 'htBadValue')) {\n checkbox.click();\n }\n }\n }\n }, {\n key: \"finishEditing\",\n value: function finishEditing() {}\n }, {\n key: \"init\",\n value: function init() {}\n }, {\n key: \"open\",\n value: function open() {}\n }, {\n key: \"close\",\n value: function close() {}\n }, {\n key: \"getValue\",\n value: function getValue() {}\n }, {\n key: \"setValue\",\n value: function setValue() {}\n }, {\n key: \"focus\",\n value: function focus() {}\n }], [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return CheckboxEditor;\n}(BaseEditor);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport moment from 'moment';\nimport Pikaday from 'pikaday';\nimport { TextEditor } from \"../textEditor/index.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { addClass, outerHeight } from \"../../helpers/dom/element.mjs\";\nimport { deepExtend } from \"../../helpers/object.mjs\";\nimport { isMetaKey } from \"../../helpers/unicode.mjs\";\nexport var EDITOR_TYPE = 'date';\n/**\n * @private\n * @class DateEditor\n */\n\nexport var DateEditor = /*#__PURE__*/function (_TextEditor) {\n _inherits(DateEditor, _TextEditor);\n\n var _super = _createSuper(DateEditor);\n /**\n * @param {Core} hotInstance Handsontable instance.\n * @private\n */\n\n\n function DateEditor(hotInstance) {\n var _this;\n\n _classCallCheck(this, DateEditor);\n\n _this = _super.call(this, hotInstance); // TODO: Move this option to general settings\n\n _this.defaultDateFormat = 'DD/MM/YYYY';\n _this.isCellEdited = false;\n _this.parentDestroyed = false;\n return _this;\n }\n\n _createClass(DateEditor, [{\n key: \"init\",\n value: function init() {\n var _this2 = this;\n\n if (typeof moment !== 'function') {\n throw new Error('You need to include moment.js to your project.');\n }\n\n if (typeof Pikaday !== 'function') {\n throw new Error('You need to include Pikaday to your project.');\n }\n\n _get(_getPrototypeOf(DateEditor.prototype), \"init\", this).call(this);\n\n this.instance.addHook('afterDestroy', function () {\n _this2.parentDestroyed = true;\n\n _this2.destroyElements();\n });\n }\n /**\n * Create data picker instance.\n */\n\n }, {\n key: \"createElements\",\n value: function createElements() {\n _get(_getPrototypeOf(DateEditor.prototype), \"createElements\", this).call(this);\n\n this.datePicker = this.hot.rootDocument.createElement('DIV');\n this.datePickerStyle = this.datePicker.style;\n this.datePickerStyle.position = 'absolute';\n this.datePickerStyle.top = 0;\n this.datePickerStyle.left = 0;\n this.datePickerStyle.zIndex = 9999;\n addClass(this.datePicker, 'htDatepickerHolder');\n this.hot.rootDocument.body.appendChild(this.datePicker);\n this.$datePicker = new Pikaday(this.getDatePickerConfig());\n var eventManager = new EventManager(this);\n /**\n * Prevent recognizing clicking on datepicker as clicking outside of table.\n */\n\n eventManager.addEventListener(this.datePicker, 'mousedown', function (event) {\n return event.stopPropagation();\n });\n this.hideDatepicker();\n }\n /**\n * Destroy data picker instance.\n */\n\n }, {\n key: \"destroyElements\",\n value: function destroyElements() {\n var datePickerParentElement = this.datePicker.parentNode;\n this.$datePicker.destroy();\n\n if (datePickerParentElement) {\n datePickerParentElement.removeChild(this.datePicker);\n }\n }\n /**\n * Prepare editor to appear.\n *\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {HTMLTableCellElement} td The rendered cell element.\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\n }, {\n key: \"prepare\",\n value: function prepare(row, col, prop, td, value, cellProperties) {\n _get(_getPrototypeOf(DateEditor.prototype), \"prepare\", this).call(this, row, col, prop, td, value, cellProperties);\n }\n /**\n * Open editor.\n *\n * @param {Event} [event=null] The event object.\n */\n\n }, {\n key: \"open\",\n value: function open() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n _get(_getPrototypeOf(DateEditor.prototype), \"open\", this).call(this);\n\n this.showDatepicker(event);\n }\n /**\n * Close editor.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n var _this3 = this;\n\n this._opened = false;\n\n this.instance._registerTimeout(function () {\n _this3.instance._refreshBorders();\n });\n\n _get(_getPrototypeOf(DateEditor.prototype), \"close\", this).call(this);\n }\n /**\n * Finishes editing and start saving or restoring process for editing cell or last selected range.\n *\n * @param {boolean} restoreOriginalValue If true, then closes editor without saving value from the editor into a cell.\n * @param {boolean} ctrlDown If true, then saveValue will save editor's value to each cell in the last selected range.\n */\n\n }, {\n key: \"finishEditing\",\n value: function finishEditing() {\n var restoreOriginalValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var ctrlDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (restoreOriginalValue) {\n // pressed ESC, restore original value\n // var value = this.instance.getDataAtCell(this.row, this.col);\n var value = this.originalValue;\n\n if (value !== void 0) {\n this.setValue(value);\n }\n }\n\n this.hideDatepicker();\n\n _get(_getPrototypeOf(DateEditor.prototype), \"finishEditing\", this).call(this, restoreOriginalValue, ctrlDown);\n }\n /**\n * Show data picker.\n *\n * @param {Event} event The event object.\n */\n\n }, {\n key: \"showDatepicker\",\n value: function showDatepicker(event) {\n this.$datePicker.config(this.getDatePickerConfig());\n var offset = this.TD.getBoundingClientRect();\n var dateFormat = this.cellProperties.dateFormat || this.defaultDateFormat;\n var datePickerConfig = this.$datePicker.config();\n var dateStr;\n var isMouseDown = this.instance.view.isMouseDown();\n var isMeta = event ? isMetaKey(event.keyCode) : false;\n this.datePickerStyle.top = \"\".concat(this.hot.rootWindow.pageYOffset + offset.top + outerHeight(this.TD), \"px\");\n this.datePickerStyle.left = \"\".concat(this.hot.rootWindow.pageXOffset + offset.left, \"px\");\n\n this.$datePicker._onInputFocus = function () {};\n\n datePickerConfig.format = dateFormat;\n\n if (this.originalValue) {\n dateStr = this.originalValue;\n\n if (moment(dateStr, dateFormat, true).isValid()) {\n this.$datePicker.setMoment(moment(dateStr, dateFormat), true);\n } // workaround for date/time cells - pikaday resets the cell value to 12:00 AM by default, this will overwrite the value.\n\n\n if (this.getValue() !== this.originalValue) {\n this.setValue(this.originalValue);\n }\n\n if (!isMeta && !isMouseDown) {\n this.setValue('');\n }\n } else if (this.cellProperties.defaultDate) {\n dateStr = this.cellProperties.defaultDate;\n datePickerConfig.defaultDate = dateStr;\n\n if (moment(dateStr, dateFormat, true).isValid()) {\n this.$datePicker.setMoment(moment(dateStr, dateFormat), true);\n }\n\n if (!isMeta && !isMouseDown) {\n this.setValue('');\n }\n } else {\n // if a default date is not defined, set a soft-default-date: display the current day and month in the\n // datepicker, but don't fill the editor input\n this.$datePicker.gotoToday();\n }\n\n this.datePickerStyle.display = 'block';\n this.$datePicker.show();\n }\n /**\n * Hide data picker.\n */\n\n }, {\n key: \"hideDatepicker\",\n value: function hideDatepicker() {\n this.datePickerStyle.display = 'none';\n this.$datePicker.hide();\n }\n /**\n * Get date picker options.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getDatePickerConfig\",\n value: function getDatePickerConfig() {\n var _this4 = this;\n\n var htInput = this.TEXTAREA;\n var options = {};\n\n if (this.cellProperties && this.cellProperties.datePickerConfig) {\n deepExtend(options, this.cellProperties.datePickerConfig);\n }\n\n var origOnSelect = options.onSelect;\n var origOnClose = options.onClose;\n options.field = htInput;\n options.trigger = htInput;\n options.container = this.datePicker;\n options.bound = false;\n options.format = options.format || this.defaultDateFormat;\n options.reposition = options.reposition || false;\n\n options.onSelect = function (value) {\n var dateStr = value;\n\n if (!isNaN(dateStr.getTime())) {\n dateStr = moment(dateStr).format(_this4.cellProperties.dateFormat || _this4.defaultDateFormat);\n }\n\n _this4.setValue(dateStr);\n\n _this4.hideDatepicker();\n\n if (origOnSelect) {\n origOnSelect();\n }\n };\n\n options.onClose = function () {\n if (!_this4.parentDestroyed) {\n _this4.finishEditing(false);\n }\n\n if (origOnClose) {\n origOnClose();\n }\n };\n\n return options;\n }\n }], [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return DateEditor;\n}(TextEditor);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.filter.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { AutocompleteEditor } from \"../autocompleteEditor/index.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nexport var EDITOR_TYPE = 'dropdown';\n/**\n * @private\n * @class DropdownEditor\n */\n\nexport var DropdownEditor = /*#__PURE__*/function (_AutocompleteEditor) {\n _inherits(DropdownEditor, _AutocompleteEditor);\n\n var _super = _createSuper(DropdownEditor);\n\n function DropdownEditor() {\n _classCallCheck(this, DropdownEditor);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(DropdownEditor, [{\n key: \"prepare\",\n value:\n /**\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {HTMLTableCellElement} td The rendered cell element.\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n function prepare(row, col, prop, td, value, cellProperties) {\n _get(_getPrototypeOf(DropdownEditor.prototype), \"prepare\", this).call(this, row, col, prop, td, value, cellProperties);\n\n this.cellProperties.filter = false;\n this.cellProperties.strict = true;\n }\n }], [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return DropdownEditor;\n}(AutocompleteEditor);\nHooks.getSingleton().add('beforeValidate', function (value, row, col) {\n var cellMeta = this.getCellMeta(row, this.propToCol(col));\n\n if (cellMeta.editor === DropdownEditor) {\n if (cellMeta.strict === void 0) {\n cellMeta.filter = false;\n cellMeta.strict = true;\n }\n }\n});","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { TextEditor } from \"../textEditor/index.mjs\";\nexport var EDITOR_TYPE = 'numeric';\n/**\n * @private\n * @class NumericEditor\n */\n\nexport var NumericEditor = /*#__PURE__*/function (_TextEditor) {\n _inherits(NumericEditor, _TextEditor);\n\n var _super = _createSuper(NumericEditor);\n\n function NumericEditor() {\n _classCallCheck(this, NumericEditor);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(NumericEditor, null, [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return NumericEditor;\n}(TextEditor);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { TextEditor } from \"../textEditor/index.mjs\";\nimport { empty } from \"../../helpers/dom/element.mjs\";\nexport var EDITOR_TYPE = 'password';\n/**\n * @private\n * @class PasswordEditor\n */\n\nexport var PasswordEditor = /*#__PURE__*/function (_TextEditor) {\n _inherits(PasswordEditor, _TextEditor);\n\n var _super = _createSuper(PasswordEditor);\n\n function PasswordEditor() {\n _classCallCheck(this, PasswordEditor);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PasswordEditor, [{\n key: \"createElements\",\n value: function createElements() {\n _get(_getPrototypeOf(PasswordEditor.prototype), \"createElements\", this).call(this);\n\n this.TEXTAREA = this.hot.rootDocument.createElement('input');\n this.TEXTAREA.setAttribute('type', 'password');\n this.TEXTAREA.setAttribute('data-hot-input', ''); // Makes the element recognizable by Hot as its own component's element.\n\n this.TEXTAREA.className = 'handsontableInput';\n this.textareaStyle = this.TEXTAREA.style;\n this.textareaStyle.width = 0;\n this.textareaStyle.height = 0;\n empty(this.TEXTAREA_PARENT);\n this.TEXTAREA_PARENT.appendChild(this.TEXTAREA);\n }\n }], [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return PasswordEditor;\n}(TextEditor);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BaseEditor, EDITOR_STATE } from \"../baseEditor/index.mjs\";\nimport { addClass, empty, fastInnerHTML, getComputedStyle, getCssTransform, hasClass, offset, outerHeight, outerWidth, removeClass, resetCssTransform } from \"../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation } from \"../../helpers/dom/event.mjs\";\nimport { objectEach } from \"../../helpers/object.mjs\";\nimport { KEY_CODES } from \"../../helpers/unicode.mjs\";\nvar EDITOR_VISIBLE_CLASS_NAME = 'ht_editor_visible';\nexport var EDITOR_TYPE = 'select';\n/**\n * @private\n * @class SelectEditor\n */\n\nexport var SelectEditor = /*#__PURE__*/function (_BaseEditor) {\n _inherits(SelectEditor, _BaseEditor);\n\n var _super = _createSuper(SelectEditor);\n\n function SelectEditor() {\n _classCallCheck(this, SelectEditor);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(SelectEditor, [{\n key: \"init\",\n value:\n /**\n * Initializes editor instance, DOM Element and mount hooks.\n */\n function init() {\n this.select = this.hot.rootDocument.createElement('SELECT');\n addClass(this.select, 'htSelectEditor');\n this.select.style.display = 'none';\n this.hot.rootElement.appendChild(this.select);\n this.registerHooks();\n }\n /**\n * Returns select's value.\n *\n * @returns {*}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.select.value;\n }\n /**\n * Sets value in the select element.\n *\n * @param {*} value A new select's value.\n */\n\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n this.select.value = value;\n }\n /**\n * Opens the editor and adjust its size.\n */\n\n }, {\n key: \"open\",\n value: function open() {\n var _this = this;\n\n this._opened = true;\n this.refreshDimensions();\n this.select.style.display = '';\n this.addHook('beforeKeyDown', function () {\n return _this.onBeforeKeyDown();\n });\n }\n /**\n * Closes the editor.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n this._opened = false;\n this.select.style.display = 'none';\n\n if (hasClass(this.select, EDITOR_VISIBLE_CLASS_NAME)) {\n removeClass(this.select, EDITOR_VISIBLE_CLASS_NAME);\n }\n\n this.clearHooks();\n }\n /**\n * Sets focus state on the select element.\n */\n\n }, {\n key: \"focus\",\n value: function focus() {\n this.select.focus();\n }\n /**\n * Binds hooks to refresh editor's size after scrolling of the viewport or resizing of columns/rows.\n *\n * @private\n */\n\n }, {\n key: \"registerHooks\",\n value: function registerHooks() {\n var _this2 = this;\n\n this.addHook('afterScrollHorizontally', function () {\n return _this2.refreshDimensions();\n });\n this.addHook('afterScrollVertically', function () {\n return _this2.refreshDimensions();\n });\n this.addHook('afterColumnResize', function () {\n return _this2.refreshDimensions();\n });\n this.addHook('afterRowResize', function () {\n return _this2.refreshDimensions();\n });\n }\n /**\n * Prepares editor's meta data and a list of available options.\n *\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {HTMLTableCellElement} td The rendered cell element.\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\n }, {\n key: \"prepare\",\n value: function prepare(row, col, prop, td, value, cellProperties) {\n var _this3 = this;\n\n _get(_getPrototypeOf(SelectEditor.prototype), \"prepare\", this).call(this, row, col, prop, td, value, cellProperties);\n\n var selectOptions = this.cellProperties.selectOptions;\n var options;\n\n if (typeof selectOptions === 'function') {\n options = this.prepareOptions(selectOptions(this.row, this.col, this.prop));\n } else {\n options = this.prepareOptions(selectOptions);\n }\n\n empty(this.select);\n objectEach(options, function (optionValue, key) {\n var optionElement = _this3.hot.rootDocument.createElement('OPTION');\n\n optionElement.value = key;\n fastInnerHTML(optionElement, optionValue);\n\n _this3.select.appendChild(optionElement);\n });\n }\n /**\n * Creates consistent list of available options.\n *\n * @private\n * @param {Array|object} optionsToPrepare The list of the values to render in the select eleemnt.\n * @returns {object}\n */\n\n }, {\n key: \"prepareOptions\",\n value: function prepareOptions(optionsToPrepare) {\n var preparedOptions = {};\n\n if (Array.isArray(optionsToPrepare)) {\n for (var i = 0, len = optionsToPrepare.length; i < len; i++) {\n preparedOptions[optionsToPrepare[i]] = optionsToPrepare[i];\n }\n } else if (_typeof(optionsToPrepare) === 'object') {\n preparedOptions = optionsToPrepare;\n }\n\n return preparedOptions;\n }\n /**\n * Refreshes editor's value using source data.\n *\n * @private\n */\n\n }, {\n key: \"refreshValue\",\n value: function refreshValue() {\n var sourceData = this.hot.getSourceDataAtCell(this.row, this.prop);\n this.originalValue = sourceData;\n this.setValue(sourceData);\n this.refreshDimensions();\n }\n /**\n * Refreshes editor's size and position.\n *\n * @private\n */\n\n }, {\n key: \"refreshDimensions\",\n value: function refreshDimensions() {\n if (this.state !== EDITOR_STATE.EDITING) {\n return;\n }\n\n this.TD = this.getEditedCell(); // TD is outside of the viewport.\n\n if (!this.TD) {\n this.close();\n return;\n }\n\n var wtOverlays = this.hot.view.wt.wtOverlays;\n var currentOffset = offset(this.TD);\n var containerOffset = offset(this.hot.rootElement);\n var scrollableContainer = wtOverlays.scrollableElement;\n var editorSection = this.checkEditorSection();\n var width = outerWidth(this.TD) + 1;\n var height = outerHeight(this.TD) + 1;\n var editTop = currentOffset.top - containerOffset.top - 1 - (scrollableContainer.scrollTop || 0);\n var editLeft = currentOffset.left - containerOffset.left - 1 - (scrollableContainer.scrollLeft || 0);\n var cssTransformOffset;\n\n switch (editorSection) {\n case 'top':\n cssTransformOffset = getCssTransform(wtOverlays.topOverlay.clone.wtTable.holder.parentNode);\n break;\n\n case 'left':\n cssTransformOffset = getCssTransform(wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);\n break;\n\n case 'top-left-corner':\n cssTransformOffset = getCssTransform(wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);\n break;\n\n case 'bottom-left-corner':\n cssTransformOffset = getCssTransform(wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);\n break;\n\n case 'bottom':\n cssTransformOffset = getCssTransform(wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode);\n break;\n\n default:\n break;\n }\n\n var renderableRow = this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row);\n var renderableColumn = this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col);\n var nrOfRenderableRowIndexes = this.hot.rowIndexMapper.getRenderableIndexesLength();\n var firstRowIndexOfTheBottomOverlay = nrOfRenderableRowIndexes - this.hot.view.wt.getSetting('fixedRowsBottom');\n\n if (renderableRow <= 0 || renderableRow === firstRowIndexOfTheBottomOverlay) {\n editTop += 1;\n }\n\n if (renderableColumn <= 0) {\n editLeft += 1;\n }\n\n var selectStyle = this.select.style;\n\n if (cssTransformOffset && cssTransformOffset !== -1) {\n selectStyle[cssTransformOffset[0]] = cssTransformOffset[1];\n } else {\n resetCssTransform(this.select);\n }\n\n var cellComputedStyle = getComputedStyle(this.TD, this.hot.rootWindow);\n\n if (parseInt(cellComputedStyle.borderTopWidth, 10) > 0) {\n height -= 1;\n }\n\n if (parseInt(cellComputedStyle.borderLeftWidth, 10) > 0) {\n width -= 1;\n }\n\n selectStyle.height = \"\".concat(height, \"px\");\n selectStyle.minWidth = \"\".concat(width, \"px\");\n selectStyle.top = \"\".concat(editTop, \"px\");\n selectStyle.left = \"\".concat(editLeft, \"px\");\n selectStyle.margin = '0px';\n addClass(this.select, EDITOR_VISIBLE_CLASS_NAME);\n }\n /**\n * OnBeforeKeyDown callback.\n *\n * @private\n */\n\n }, {\n key: \"onBeforeKeyDown\",\n value: function onBeforeKeyDown() {\n var previousOptionIndex = this.select.selectedIndex - 1;\n var nextOptionIndex = this.select.selectedIndex + 1;\n\n switch (event.keyCode) {\n case KEY_CODES.ARROW_UP:\n if (previousOptionIndex >= 0) {\n this.select[previousOptionIndex].selected = true;\n }\n\n stopImmediatePropagation(event);\n event.preventDefault();\n break;\n\n case KEY_CODES.ARROW_DOWN:\n if (nextOptionIndex <= this.select.length - 1) {\n this.select[nextOptionIndex].selected = true;\n }\n\n stopImmediatePropagation(event);\n event.preventDefault();\n break;\n\n default:\n break;\n }\n }\n }], [{\n key: \"EDITOR_TYPE\",\n get: function get() {\n return EDITOR_TYPE;\n }\n }]);\n\n return SelectEditor;\n}(BaseEditor);","import { baseRenderer } from \"../baseRenderer/index.mjs\";\nimport { fastInnerHTML } from \"../../helpers/dom/element.mjs\";\nexport var RENDERER_TYPE = 'html';\n/**\n * @private\n * @param {Core} instance The Handsontable instance.\n * @param {HTMLTableCellElement} TD The rendered cell element.\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\nexport function htmlRenderer(instance, TD, row, col, prop, value, cellProperties) {\n baseRenderer.apply(this, [instance, TD, row, col, prop, value, cellProperties]);\n fastInnerHTML(TD, value === null || value === void 0 ? '' : value, false);\n}\nhtmlRenderer.RENDERER_TYPE = RENDERER_TYPE;","import { htmlRenderer } from \"../htmlRenderer/index.mjs\";\nimport { textRenderer } from \"../textRenderer/index.mjs\";\nimport { CellCoords } from \"../../3rdparty/walkontable/src/index.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { addClass, hasClass } from \"../../helpers/dom/element.mjs\";\nexport var RENDERER_TYPE = 'autocomplete';\n/**\n * Autocomplete renderer.\n *\n * @private\n * @param {Core} instance The Handsontable instance.\n * @param {HTMLTableCellElement} TD The rendered cell element.\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\nexport function autocompleteRenderer(instance, TD, row, col, prop, value, cellProperties) {\n var rootDocument = instance.rootDocument;\n var rendererFunc = cellProperties.allowHtml ? htmlRenderer : textRenderer;\n var ARROW = rootDocument.createElement('DIV');\n ARROW.className = 'htAutocompleteArrow';\n ARROW.appendChild(rootDocument.createTextNode(String.fromCharCode(9660)));\n rendererFunc.apply(this, [instance, TD, row, col, prop, value, cellProperties]);\n\n if (!TD.firstChild) {\n // http://jsperf.com/empty-node-if-needed\n // otherwise empty fields appear borderless in demo/renderers.html (IE)\n TD.appendChild(rootDocument.createTextNode(String.fromCharCode(160))); // workaround for https://github.com/handsontable/handsontable/issues/1946\n // this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips\n }\n\n TD.insertBefore(ARROW, TD.firstChild);\n addClass(TD, 'htAutocomplete');\n\n if (!instance.acArrowListener) {\n var eventManager = new EventManager(instance); // not very elegant but easy and fast\n\n instance.acArrowListener = function (event) {\n if (hasClass(event.target, 'htAutocompleteArrow')) {\n instance.view.wt.getSetting('onCellDblClick', null, new CellCoords(row, col), TD);\n }\n };\n\n eventManager.addEventListener(instance.rootElement, 'mousedown', instance.acArrowListener); // We need to unbind the listener after the table has been destroyed\n\n instance.addHookOnce('afterDestroy', function () {\n eventManager.destroy();\n });\n }\n}\nautocompleteRenderer.RENDERER_TYPE = RENDERER_TYPE;","import \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\nimport { baseRenderer } from \"../baseRenderer/index.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { empty, addClass } from \"../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation, isImmediatePropagationStopped } from \"../../helpers/dom/event.mjs\";\nimport { partial } from \"../../helpers/function.mjs\";\nimport { equalsIgnoreCase } from \"../../helpers/string.mjs\";\nimport { isKey } from \"../../helpers/unicode.mjs\";\nvar isListeningKeyDownEvent = new WeakMap();\nvar isCheckboxListenerAdded = new WeakMap();\nvar BAD_VALUE_CLASS = 'htBadValue';\nexport var RENDERER_TYPE = 'checkbox';\n/**\n * Checkbox renderer.\n *\n * @private\n * @param {Core} instance The Handsontable instance.\n * @param {HTMLTableCellElement} TD The rendered cell element.\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\nexport function checkboxRenderer(instance, TD, row, col, prop, value, cellProperties) {\n var rootDocument = instance.rootDocument;\n baseRenderer.apply(this, [instance, TD, row, col, prop, value, cellProperties]);\n registerEvents(instance);\n var input = createInput(rootDocument);\n var labelOptions = cellProperties.label;\n var badValue = false;\n\n if (typeof cellProperties.checkedTemplate === 'undefined') {\n cellProperties.checkedTemplate = true;\n }\n\n if (typeof cellProperties.uncheckedTemplate === 'undefined') {\n cellProperties.uncheckedTemplate = false;\n }\n\n empty(TD); // TODO identify under what circumstances this line can be removed\n\n if (value === cellProperties.checkedTemplate || equalsIgnoreCase(value, cellProperties.checkedTemplate)) {\n input.checked = true;\n } else if (value === cellProperties.uncheckedTemplate || equalsIgnoreCase(value, cellProperties.uncheckedTemplate)) {\n input.checked = false;\n } else if (value === null) {\n // default value\n addClass(input, 'noValue');\n } else {\n input.style.display = 'none';\n addClass(input, BAD_VALUE_CLASS);\n badValue = true;\n }\n\n input.setAttribute('data-row', row);\n input.setAttribute('data-col', col);\n\n if (!badValue && labelOptions) {\n var labelText = '';\n\n if (labelOptions.value) {\n labelText = typeof labelOptions.value === 'function' ? labelOptions.value.call(this, row, col, prop, value) : labelOptions.value;\n } else if (labelOptions.property) {\n var labelValue = instance.getDataAtRowProp(row, labelOptions.property);\n labelText = labelValue !== null ? labelValue : '';\n }\n\n var label = createLabel(rootDocument, labelText);\n\n if (labelOptions.position === 'before') {\n label.appendChild(input);\n } else {\n label.insertBefore(input, label.firstChild);\n }\n\n input = label;\n }\n\n TD.appendChild(input);\n\n if (badValue) {\n TD.appendChild(rootDocument.createTextNode('#bad-value#'));\n }\n\n if (!isListeningKeyDownEvent.has(instance)) {\n isListeningKeyDownEvent.set(instance, true);\n instance.addHook('beforeKeyDown', onBeforeKeyDown);\n }\n /**\n * On before key down DOM listener.\n *\n * @private\n * @param {Event} event The keyboard event object.\n */\n\n\n function onBeforeKeyDown(event) {\n var toggleKeys = 'SPACE|ENTER';\n var switchOffKeys = 'DELETE|BACKSPACE';\n var isKeyCode = partial(isKey, event.keyCode);\n\n if (!instance.getSettings().enterBeginsEditing && isKeyCode('ENTER')) {\n return;\n }\n\n if (isKeyCode(\"\".concat(toggleKeys, \"|\").concat(switchOffKeys)) && !isImmediatePropagationStopped(event)) {\n eachSelectedCheckboxCell(function () {\n stopImmediatePropagation(event);\n event.preventDefault();\n });\n }\n\n if (isKeyCode(toggleKeys)) {\n changeSelectedCheckboxesState();\n }\n\n if (isKeyCode(switchOffKeys)) {\n changeSelectedCheckboxesState(true);\n }\n }\n /**\n * Change checkbox checked property.\n *\n * @private\n * @param {boolean} [uncheckCheckbox=false] The new \"checked\" state for the checkbox elements.\n */\n\n\n function changeSelectedCheckboxesState() {\n var uncheckCheckbox = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var selRange = instance.getSelectedRange();\n\n if (!selRange) {\n return;\n }\n\n for (var key = 0; key < selRange.length; key++) {\n var _selRange$key$getTopL = selRange[key].getTopLeftCorner(),\n startRow = _selRange$key$getTopL.row,\n startColumn = _selRange$key$getTopL.col;\n\n var _selRange$key$getBott = selRange[key].getBottomRightCorner(),\n endRow = _selRange$key$getBott.row,\n endColumn = _selRange$key$getBott.col;\n\n var changes = [];\n\n for (var visualRow = startRow; visualRow <= endRow; visualRow += 1) {\n for (var visualColumn = startColumn; visualColumn <= endColumn; visualColumn += 1) {\n var cachedCellProperties = instance.getCellMeta(visualRow, visualColumn);\n\n if (cachedCellProperties.type !== 'checkbox') {\n return;\n }\n /* eslint-disable no-continue */\n\n\n if (cachedCellProperties.readOnly === true) {\n continue;\n }\n\n if (typeof cachedCellProperties.checkedTemplate === 'undefined') {\n cachedCellProperties.checkedTemplate = true;\n }\n\n if (typeof cachedCellProperties.uncheckedTemplate === 'undefined') {\n cachedCellProperties.uncheckedTemplate = false;\n }\n\n var dataAtCell = instance.getDataAtCell(visualRow, visualColumn);\n\n if (uncheckCheckbox === false) {\n if ([cachedCellProperties.checkedTemplate, cachedCellProperties.checkedTemplate.toString()].includes(dataAtCell)) {\n // eslint-disable-line max-len\n changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate]);\n } else if ([cachedCellProperties.uncheckedTemplate, cachedCellProperties.uncheckedTemplate.toString(), null, void 0].includes(dataAtCell)) {\n // eslint-disable-line max-len\n changes.push([visualRow, visualColumn, cachedCellProperties.checkedTemplate]);\n }\n } else {\n changes.push([visualRow, visualColumn, cachedCellProperties.uncheckedTemplate]);\n }\n }\n }\n\n if (changes.length > 0) {\n instance.setDataAtCell(changes);\n }\n }\n }\n /**\n * Call callback for each found selected cell with checkbox type.\n *\n * @private\n * @param {Function} callback The callback function.\n */\n\n\n function eachSelectedCheckboxCell(callback) {\n var selRange = instance.getSelectedRange();\n\n if (!selRange) {\n return;\n }\n\n for (var key = 0; key < selRange.length; key++) {\n var topLeft = selRange[key].getTopLeftCorner();\n var bottomRight = selRange[key].getBottomRightCorner();\n\n for (var visualRow = topLeft.row; visualRow <= bottomRight.row; visualRow++) {\n for (var visualColumn = topLeft.col; visualColumn <= bottomRight.col; visualColumn++) {\n var cachedCellProperties = instance.getCellMeta(visualRow, visualColumn);\n\n if (cachedCellProperties.type !== 'checkbox') {\n return;\n }\n\n var cell = instance.getCell(visualRow, visualColumn);\n\n if (cell === null || cell === void 0) {\n callback(visualRow, visualColumn, cachedCellProperties);\n } else {\n var checkboxes = cell.querySelectorAll('input[type=checkbox]');\n\n if (checkboxes.length > 0 && !cachedCellProperties.readOnly) {\n callback(checkboxes);\n }\n }\n }\n }\n }\n }\n}\ncheckboxRenderer.RENDERER_TYPE = RENDERER_TYPE;\n/**\n * Register checkbox listeners.\n *\n * @param {Core} instance The Handsontable instance.\n * @returns {EventManager}\n */\n\nfunction registerEvents(instance) {\n var eventManager = isCheckboxListenerAdded.get(instance);\n\n if (!eventManager) {\n var rootElement = instance.rootElement;\n eventManager = new EventManager(instance);\n eventManager.addEventListener(rootElement, 'click', function (event) {\n return onClick(event, instance);\n });\n eventManager.addEventListener(rootElement, 'mouseup', function (event) {\n return onMouseUp(event, instance);\n });\n eventManager.addEventListener(rootElement, 'change', function (event) {\n return onChange(event, instance);\n });\n isCheckboxListenerAdded.set(instance, eventManager);\n }\n\n return eventManager;\n}\n/**\n * Create input element.\n *\n * @param {Document} rootDocument The document owner.\n * @returns {Node}\n */\n\n\nfunction createInput(rootDocument) {\n var input = rootDocument.createElement('input');\n input.className = 'htCheckboxRendererInput';\n input.type = 'checkbox';\n input.setAttribute('autocomplete', 'off');\n input.setAttribute('tabindex', '-1');\n return input.cloneNode(false);\n}\n/**\n * Create label element.\n *\n * @param {Document} rootDocument The document owner.\n * @param {string} text The label text.\n * @returns {Node}\n */\n\n\nfunction createLabel(rootDocument, text) {\n var label = rootDocument.createElement('label');\n label.className = 'htCheckboxRendererLabel';\n label.appendChild(rootDocument.createTextNode(text));\n return label.cloneNode(true);\n}\n/**\n * `mouseup` callback.\n *\n * @private\n * @param {Event} event `mouseup` event.\n * @param {Core} instance The Handsontable instance.\n */\n\n\nfunction onMouseUp(event, instance) {\n if (!isCheckboxInput(event.target)) {\n return;\n }\n\n setTimeout(instance.listen, 10);\n}\n/**\n * `click` callback.\n *\n * @private\n * @param {Event} event `click` event.\n * @param {Core} instance The Handsontable instance.\n * @returns {boolean|undefined}\n */\n\n\nfunction onClick(event, instance) {\n if (!isCheckboxInput(event.target)) {\n return false;\n }\n\n var row = parseInt(event.target.getAttribute('data-row'), 10);\n var col = parseInt(event.target.getAttribute('data-col'), 10);\n var cellProperties = instance.getCellMeta(row, col);\n\n if (cellProperties.readOnly) {\n event.preventDefault();\n }\n}\n/**\n * `change` callback.\n *\n * @param {Event} event `change` event.\n * @param {Core} instance The Handsontable instance.\n * @returns {boolean}\n */\n\n\nfunction onChange(event, instance) {\n if (!isCheckboxInput(event.target)) {\n return false;\n }\n\n var row = parseInt(event.target.getAttribute('data-row'), 10);\n var col = parseInt(event.target.getAttribute('data-col'), 10);\n var cellProperties = instance.getCellMeta(row, col);\n\n if (!cellProperties.readOnly) {\n var newCheckboxValue = null;\n\n if (event.target.checked) {\n newCheckboxValue = cellProperties.uncheckedTemplate === void 0 ? true : cellProperties.checkedTemplate;\n } else {\n newCheckboxValue = cellProperties.uncheckedTemplate === void 0 ? false : cellProperties.uncheckedTemplate;\n }\n\n instance.setDataAtCell(row, col, newCheckboxValue);\n }\n}\n/**\n * Check if the provided element is the checkbox input.\n *\n * @private\n * @param {HTMLElement} element The element in question.\n * @returns {boolean}\n */\n\n\nfunction isCheckboxInput(element) {\n return element.tagName === 'INPUT' && element.getAttribute('type') === 'checkbox';\n}","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport numbro from 'numbro';\nimport { textRenderer } from \"../textRenderer/index.mjs\";\nimport { isNumeric } from \"../../helpers/number.mjs\";\nexport var RENDERER_TYPE = 'numeric';\n/**\n * Numeric cell renderer.\n *\n * @private\n * @param {Core} instance The Handsontable instance.\n * @param {HTMLTableCellElement} TD The rendered cell element.\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\nexport function numericRenderer(instance, TD, row, col, prop, value, cellProperties) {\n var newValue = value;\n\n if (isNumeric(newValue)) {\n var numericFormat = cellProperties.numericFormat;\n var cellCulture = numericFormat && numericFormat.culture || '-';\n var cellFormatPattern = numericFormat && numericFormat.pattern;\n var className = cellProperties.className || '';\n var classArr = className.length ? className.split(' ') : [];\n\n if (typeof cellCulture !== 'undefined' && !numbro.languages()[cellCulture]) {\n var shortTag = cellCulture.replace('-', '');\n var langData = numbro.allLanguages ? numbro.allLanguages[cellCulture] : numbro[shortTag];\n\n if (langData) {\n numbro.registerLanguage(langData);\n }\n }\n\n numbro.setLanguage(cellCulture);\n newValue = numbro(newValue).format(cellFormatPattern || '0');\n\n if (classArr.indexOf('htLeft') < 0 && classArr.indexOf('htCenter') < 0 && classArr.indexOf('htRight') < 0 && classArr.indexOf('htJustify') < 0) {\n classArr.push('htRight');\n }\n\n if (classArr.indexOf('htNumeric') < 0) {\n classArr.push('htNumeric');\n }\n\n cellProperties.className = classArr.join(' ');\n }\n\n textRenderer(instance, TD, row, col, prop, newValue, cellProperties);\n}\nnumericRenderer.RENDERER_TYPE = RENDERER_TYPE;","import { textRenderer } from \"../textRenderer/index.mjs\";\nimport { fastInnerHTML } from \"../../helpers/dom/element.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nexport var RENDERER_TYPE = 'password';\n/**\n * @private\n * @param {Core} instance The Handsontable instance.\n * @param {HTMLTableCellElement} TD The rendered cell element.\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {number|string} prop The column property (passed when datasource is an array of objects).\n * @param {*} value The rendered value.\n * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).\n */\n\nexport function passwordRenderer(instance, TD, row, col, prop, value, cellProperties) {\n textRenderer.apply(this, [instance, TD, row, col, prop, value, cellProperties]);\n var hashLength = cellProperties.hashLength || TD.innerHTML.length;\n var hashSymbol = cellProperties.hashSymbol || '*';\n var hash = '';\n rangeEach(hashLength - 1, function () {\n hash += hashSymbol;\n });\n fastInnerHTML(TD, hash);\n}\npasswordRenderer.RENDERER_TYPE = RENDERER_TYPE;","export var VALIDATOR_TYPE = 'autocomplete';\n/**\n * The Autocomplete cell validator.\n *\n * @private\n * @param {*} value Value of edited cell.\n * @param {Function} callback Callback called with validation result.\n */\n\nexport function autocompleteValidator(value, callback) {\n var valueToValidate = value;\n\n if (valueToValidate === null || valueToValidate === void 0) {\n valueToValidate = '';\n }\n\n if (this.allowEmpty && valueToValidate === '') {\n callback(true);\n return;\n }\n\n if (this.strict && this.source) {\n if (typeof this.source === 'function') {\n this.source(valueToValidate, process(valueToValidate, callback));\n } else {\n process(valueToValidate, callback)(this.source);\n }\n } else {\n callback(true);\n }\n}\nautocompleteValidator.VALIDATOR_TYPE = VALIDATOR_TYPE;\n/**\n * Function responsible for validation of autocomplete value.\n *\n * @param {*} value Value of edited cell.\n * @param {Function} callback Callback called with validation result.\n * @returns {Function}\n */\n\nfunction process(value, callback) {\n var originalVal = value;\n return function (source) {\n var found = false;\n\n for (var s = 0, slen = source.length; s < slen; s++) {\n if (originalVal === source[s]) {\n found = true; // perfect match\n\n break;\n }\n }\n\n callback(found);\n };\n}","import \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.search.js\";\nimport moment from 'moment';\nimport { getEditorInstance } from \"../../editors/registry.mjs\";\nimport { EDITOR_TYPE as DATE_EDITOR_TYPE } from \"../../editors/dateEditor/index.mjs\";\nimport { getNormalizedDate } from \"../../helpers/date.mjs\";\nexport var VALIDATOR_TYPE = 'date';\n/**\n * The Date cell validator.\n *\n * @private\n * @param {*} value Value of edited cell.\n * @param {Function} callback Callback called with validation result.\n */\n\nexport function dateValidator(value, callback) {\n var dateEditor = getEditorInstance(DATE_EDITOR_TYPE, this.instance);\n var valueToValidate = value;\n var valid = true;\n\n if (valueToValidate === null || valueToValidate === void 0) {\n valueToValidate = '';\n }\n\n var isValidFormat = moment(valueToValidate, this.dateFormat || dateEditor.defaultDateFormat, true).isValid();\n var isValidDate = moment(new Date(valueToValidate)).isValid() || isValidFormat;\n\n if (this.allowEmpty && valueToValidate === '') {\n isValidDate = true;\n isValidFormat = true;\n }\n\n if (!isValidDate) {\n valid = false;\n }\n\n if (!isValidDate && isValidFormat) {\n valid = true;\n }\n\n if (isValidDate && !isValidFormat) {\n if (this.correctFormat === true) {\n // if format correction is enabled\n var correctedValue = correctFormat(valueToValidate, this.dateFormat);\n var row = this.instance.toVisualRow(this.row);\n var column = this.instance.toVisualColumn(this.col);\n this.instance.setDataAtCell(row, column, correctedValue, 'dateValidator');\n valid = true;\n } else {\n valid = false;\n }\n }\n\n callback(valid);\n}\ndateValidator.VALIDATOR_TYPE = VALIDATOR_TYPE;\n/**\n * Format the given string using moment.js' format feature.\n *\n * @param {string} value The value to format.\n * @param {string} dateFormat The date pattern to format to.\n * @returns {string}\n */\n\nexport function correctFormat(value, dateFormat) {\n var dateFromDate = moment(getNormalizedDate(value));\n var dateFromMoment = moment(value, dateFormat);\n var isAlphanumeric = value.search(/[A-z]/g) > -1;\n var date;\n\n if (dateFromDate.isValid() && dateFromDate.format('x') === dateFromMoment.format('x') || !dateFromMoment.isValid() || isAlphanumeric) {\n date = dateFromDate;\n } else {\n date = dateFromMoment;\n }\n\n return date.format(dateFormat);\n}","import { isNumeric } from \"../../helpers/number.mjs\";\nexport var VALIDATOR_TYPE = 'numeric';\n/**\n * The Numeric cell validator.\n *\n * @private\n * @param {*} value Value of edited cell.\n * @param {Function} callback Callback called with validation result.\n */\n\nexport function numericValidator(value, callback) {\n var valueToValidate = value;\n\n if (valueToValidate === null || valueToValidate === void 0) {\n valueToValidate = '';\n }\n\n if (this.allowEmpty && valueToValidate === '') {\n callback(true);\n } else if (valueToValidate === '') {\n callback(false);\n } else {\n callback(isNumeric(value));\n }\n}\nnumericValidator.VALIDATOR_TYPE = VALIDATOR_TYPE;","import moment from 'moment'; // Formats which are correctly parsed to time (supported by momentjs)\n\nvar STRICT_FORMATS = ['YYYY-MM-DDTHH:mm:ss.SSSZ', 'X', // Unix timestamp\n'x' // Unix ms timestamp\n];\nexport var VALIDATOR_TYPE = 'time';\n/**\n * The Time cell validator.\n *\n * @private\n * @param {*} value Value of edited cell.\n * @param {Function} callback Callback called with validation result.\n */\n\nexport function timeValidator(value, callback) {\n var timeFormat = this.timeFormat || 'h:mm:ss a';\n var valid = true;\n var valueToValidate = value;\n\n if (valueToValidate === null) {\n valueToValidate = '';\n }\n\n valueToValidate = /^\\d{3,}$/.test(valueToValidate) ? parseInt(valueToValidate, 10) : valueToValidate;\n var twoDigitValue = /^\\d{1,2}$/.test(valueToValidate);\n\n if (twoDigitValue) {\n valueToValidate += ':00';\n }\n\n var date = moment(valueToValidate, STRICT_FORMATS, true).isValid() ? moment(valueToValidate) : moment(valueToValidate, timeFormat);\n var isValidTime = date.isValid(); // is it in the specified format\n\n var isValidFormat = moment(valueToValidate, timeFormat, true).isValid() && !twoDigitValue;\n\n if (this.allowEmpty && valueToValidate === '') {\n isValidTime = true;\n isValidFormat = true;\n }\n\n if (!isValidTime) {\n valid = false;\n }\n\n if (!isValidTime && isValidFormat) {\n valid = true;\n }\n\n if (isValidTime && !isValidFormat) {\n if (this.correctFormat === true) {\n // if format correction is enabled\n var correctedValue = date.format(timeFormat);\n var row = this.instance.toVisualRow(this.row);\n var column = this.instance.toVisualColumn(this.col);\n this.instance.setDataAtCell(row, column, correctedValue, 'timeValidator');\n valid = true;\n } else {\n valid = false;\n }\n }\n\n callback(valid);\n}\ntimeValidator.VALIDATOR_TYPE = VALIDATOR_TYPE;","import { AutocompleteEditor } from \"../../editors/autocompleteEditor/index.mjs\";\nimport { autocompleteRenderer } from \"../../renderers/autocompleteRenderer/index.mjs\";\nimport { autocompleteValidator } from \"../../validators/autocompleteValidator/index.mjs\";\nexport var CELL_TYPE = 'autocomplete';\nexport var AutocompleteCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: AutocompleteEditor,\n renderer: autocompleteRenderer,\n validator: autocompleteValidator\n};","import { CheckboxEditor } from \"../../editors/checkboxEditor/index.mjs\";\nimport { checkboxRenderer } from \"../../renderers/checkboxRenderer/index.mjs\";\nexport var CELL_TYPE = 'checkbox';\nexport var CheckboxCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: CheckboxEditor,\n renderer: checkboxRenderer\n};","import { DateEditor } from \"../../editors/dateEditor/index.mjs\";\nimport { autocompleteRenderer } from \"../../renderers/autocompleteRenderer/index.mjs\";\nimport { dateValidator } from \"../../validators/dateValidator/index.mjs\";\nexport var CELL_TYPE = 'date';\nexport var DateCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: DateEditor,\n // displays small gray arrow on right side of the cell\n renderer: autocompleteRenderer,\n validator: dateValidator\n};","import { DropdownEditor } from \"../../editors/dropdownEditor/index.mjs\";\nimport { autocompleteRenderer } from \"../../renderers/autocompleteRenderer/index.mjs\";\nimport { autocompleteValidator } from \"../../validators/autocompleteValidator/index.mjs\";\nexport var CELL_TYPE = 'dropdown';\nexport var DropdownCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: DropdownEditor,\n // displays small gray arrow on right side of the cell\n renderer: autocompleteRenderer,\n validator: autocompleteValidator\n};","import { HandsontableEditor } from \"../../editors/handsontableEditor/index.mjs\";\nimport { autocompleteRenderer } from \"../../renderers/autocompleteRenderer/index.mjs\";\nexport var CELL_TYPE = 'handsontable';\nexport var HandsontableCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: HandsontableEditor,\n // displays small gray arrow on right side of the cell\n renderer: autocompleteRenderer\n};","import { NumericEditor } from \"../../editors/numericEditor/index.mjs\";\nimport { numericRenderer } from \"../../renderers/numericRenderer/index.mjs\";\nimport { numericValidator } from \"../../validators/numericValidator/index.mjs\";\nexport var CELL_TYPE = 'numeric';\nexport var NumericCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: NumericEditor,\n renderer: numericRenderer,\n validator: numericValidator,\n dataType: 'number'\n};","import { PasswordEditor } from \"../../editors/passwordEditor/index.mjs\";\nimport { passwordRenderer } from \"../../renderers/passwordRenderer/index.mjs\";\nexport var CELL_TYPE = 'password';\nexport var PasswordCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: PasswordEditor,\n renderer: passwordRenderer,\n copyable: false\n};","import { TextEditor } from \"../../editors/textEditor/index.mjs\";\nimport { textRenderer } from \"../../renderers/textRenderer/index.mjs\";\nimport { timeValidator } from \"../../validators/timeValidator/index.mjs\";\nexport var CELL_TYPE = 'time';\nexport var TimeCellType = {\n CELL_TYPE: CELL_TYPE,\n editor: TextEditor,\n // displays small gray arrow on right side of the cell\n renderer: textRenderer,\n validator: timeValidator\n};","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { defineGetter, objectEach } from \"../../helpers/object.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { getPluginsNames, hasPlugin } from \"../registry.mjs\";\nimport { hasCellType } from \"../../cellTypes/registry.mjs\";\nimport { hasEditor } from \"../../editors/registry.mjs\";\nimport { hasRenderer } from \"../../renderers/registry.mjs\";\nimport { hasValidator } from \"../../validators/registry.mjs\";\nvar DEPS_TYPE_CHECKERS = new Map([['plugin', hasPlugin], ['cell-type', hasCellType], ['editor', hasEditor], ['renderer', hasRenderer], ['validator', hasValidator]]);\nexport var PLUGIN_KEY = 'base';\nvar privatePool = new WeakMap();\nvar missingDependeciesMsgs = [];\nvar initializedPlugins = null;\n/**\n * @util\n */\n\nexport var BasePlugin = /*#__PURE__*/function () {\n /**\n * @param {object} hotInstance Handsontable instance.\n */\n function BasePlugin(hotInstance) {\n var _this = this;\n\n _classCallCheck(this, BasePlugin);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n defineGetter(this, 'hot', hotInstance, {\n writable: false\n });\n privatePool.set(this, {\n hooks: {}\n });\n initializedPlugins = null;\n this.pluginName = null;\n this.pluginsInitializedCallbacks = [];\n this.isPluginsReady = false;\n this.enabled = false;\n this.initialized = false;\n this.hot.addHook('afterPluginsInitialized', function () {\n return _this.onAfterPluginsInitialized();\n });\n this.hot.addHook('afterUpdateSettings', function (newSettings) {\n return _this.onUpdateSettings(newSettings);\n });\n this.hot.addHook('beforeInit', function () {\n return _this.init();\n });\n }\n\n _createClass(BasePlugin, [{\n key: \"init\",\n value: function init() {\n var _this2 = this;\n\n this.pluginName = this.hot.getPluginName(this);\n var pluginDeps = this.constructor.PLUGIN_DEPS;\n var dependecies = Array.isArray(pluginDeps) ? pluginDeps : [];\n\n if (dependecies.length > 0) {\n var missingDependencies = [];\n dependecies.forEach(function (dependency) {\n var _dependency$split = dependency.split(':'),\n _dependency$split2 = _slicedToArray(_dependency$split, 2),\n type = _dependency$split2[0],\n moduleName = _dependency$split2[1];\n\n if (!DEPS_TYPE_CHECKERS.has(type)) {\n throw new Error(\"Unknown plugin dependency type \\\"\".concat(type, \"\\\" was found.\"));\n }\n\n if (!DEPS_TYPE_CHECKERS.get(type)(moduleName)) {\n missingDependencies.push(\" - \".concat(moduleName, \" (\").concat(type, \")\"));\n }\n });\n\n if (missingDependencies.length > 0) {\n var errorMsg = [\"The \".concat(this.pluginName, \" plugin requires the following modules:\\n\"), \"\".concat(missingDependencies.join('\\n'), \"\\n\")].join('');\n missingDependeciesMsgs.push(errorMsg);\n }\n }\n\n if (!initializedPlugins) {\n initializedPlugins = getPluginsNames();\n } // Workaround for the UndoRedo plugin which, currently doesn't follow the plugin architecture.\n // Without this line the `callOnPluginsReady` callback won't be triggered after all plugin\n // initialization.\n\n\n if (initializedPlugins.indexOf('UndoRedo') >= 0) {\n initializedPlugins.splice(initializedPlugins.indexOf('UndoRedo'), 1);\n }\n\n if (initializedPlugins.indexOf(this.pluginName) >= 0) {\n initializedPlugins.splice(initializedPlugins.indexOf(this.pluginName), 1);\n }\n\n this.hot.addHookOnce('afterPluginsInitialized', function () {\n if (_this2.isEnabled && _this2.isEnabled()) {\n _this2.enablePlugin();\n }\n });\n var isAllPluginsAreInitialized = initializedPlugins.length === 0;\n\n if (isAllPluginsAreInitialized) {\n if (missingDependeciesMsgs.length > 0) {\n var _errorMsg = [\"\".concat(missingDependeciesMsgs.join('\\n'), \"\\n\"), 'You have to import and register them manually.'].join('');\n\n throw new Error(_errorMsg);\n }\n\n this.hot.runHooks('afterPluginsInitialized');\n }\n\n this.initialized = true;\n }\n /**\n * Enable plugin for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n this.enabled = true;\n }\n /**\n * Disable plugin for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n if (this.eventManager) {\n this.eventManager.clear();\n }\n\n this.clearHooks();\n this.enabled = false;\n }\n /**\n * Add listener to plugin hooks system.\n *\n * @param {string} name The hook name.\n * @param {Function} callback The listener function to add.\n */\n\n }, {\n key: \"addHook\",\n value: function addHook(name, callback) {\n privatePool.get(this).hooks[name] = privatePool.get(this).hooks[name] || [];\n var hooks = privatePool.get(this).hooks[name];\n this.hot.addHook(name, callback);\n hooks.push(callback);\n privatePool.get(this).hooks[name] = hooks;\n }\n /**\n * Remove all hooks listeners by hook name.\n *\n * @param {string} name The hook name.\n */\n\n }, {\n key: \"removeHooks\",\n value: function removeHooks(name) {\n var _this3 = this;\n\n arrayEach(privatePool.get(this).hooks[name] || [], function (callback) {\n _this3.hot.removeHook(name, callback);\n });\n }\n /**\n * Clear all hooks.\n */\n\n }, {\n key: \"clearHooks\",\n value: function clearHooks() {\n var _this4 = this;\n\n var hooks = privatePool.get(this).hooks;\n objectEach(hooks, function (callbacks, name) {\n return _this4.removeHooks(name);\n });\n hooks.length = 0;\n }\n /**\n * Register function which will be immediately called after all plugins initialized.\n *\n * @param {Function} callback The listener function to call.\n */\n\n }, {\n key: \"callOnPluginsReady\",\n value: function callOnPluginsReady(callback) {\n if (this.isPluginsReady) {\n callback();\n } else {\n this.pluginsInitializedCallbacks.push(callback);\n }\n }\n /**\n * On after plugins initialized listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterPluginsInitialized\",\n value: function onAfterPluginsInitialized() {\n arrayEach(this.pluginsInitializedCallbacks, function (callback) {\n return callback();\n });\n this.pluginsInitializedCallbacks.length = 0;\n this.isPluginsReady = true;\n }\n /**\n * On update settings listener.\n *\n * @private\n */\n\n }, {\n key: \"onUpdateSettings\",\n value: function onUpdateSettings() {\n if (this.isEnabled) {\n if (this.enabled && !this.isEnabled()) {\n this.disablePlugin();\n }\n\n if (!this.enabled && this.isEnabled()) {\n this.enablePlugin();\n }\n\n if (this.enabled && this.isEnabled()) {\n this.updatePlugin();\n }\n }\n }\n /**\n * Updates the plugin to use the latest options you have specified.\n *\n * @private\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {}\n /**\n * Destroy plugin.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this5 = this;\n\n if (this.eventManager) {\n this.eventManager.destroy();\n }\n\n this.clearHooks();\n objectEach(this, function (value, property) {\n if (property !== 'hot') {\n _this5[property] = null;\n }\n });\n delete this.t;\n delete this.hot;\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }]);\n\n return BasePlugin;\n}();","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { isObject } from \"./../helpers/object.mjs\";\nimport { rangeEach } from \"./../helpers/number.mjs\";\nimport { stringify } from \"./../helpers/mixed.mjs\";\n/**\n * @class SamplesGenerator\n * @util\n */\n\nvar SamplesGenerator = /*#__PURE__*/function () {\n function SamplesGenerator(dataFactory) {\n _classCallCheck(this, SamplesGenerator);\n /**\n * Samples prepared for calculations.\n *\n * @type {Map}\n * @default {null}\n */\n\n\n this.samples = null;\n /**\n * Function which give the data to collect samples.\n *\n * @type {Function}\n */\n\n this.dataFactory = dataFactory;\n /**\n * Custom number of samples to take of each value length.\n *\n * @type {number}\n * @default {null}\n */\n\n this.customSampleCount = null;\n /**\n * `true` if duplicate samples collection should be allowed, `false` otherwise.\n *\n * @type {boolean}\n * @default {false}\n */\n\n this.allowDuplicates = false;\n }\n /**\n * Get the sample count for this instance.\n *\n * @returns {number}\n */\n\n\n _createClass(SamplesGenerator, [{\n key: \"getSampleCount\",\n value: function getSampleCount() {\n if (this.customSampleCount) {\n return this.customSampleCount;\n }\n\n return SamplesGenerator.SAMPLE_COUNT;\n }\n /**\n * Set the sample count.\n *\n * @param {number} sampleCount Number of samples to be collected.\n */\n\n }, {\n key: \"setSampleCount\",\n value: function setSampleCount(sampleCount) {\n this.customSampleCount = sampleCount;\n }\n /**\n * Set if the generator should accept duplicate values.\n *\n * @param {boolean} allowDuplicates `true` to allow duplicate values.\n */\n\n }, {\n key: \"setAllowDuplicates\",\n value: function setAllowDuplicates(allowDuplicates) {\n this.allowDuplicates = allowDuplicates;\n }\n /**\n * Generate samples for row. You can control which area should be sampled by passing `rowRange` object and `colRange` object.\n *\n * @param {object|number} rowRange The rows range to generate the samples.\n * @param {object} colRange The column range to generate the samples.\n * @returns {object}\n */\n\n }, {\n key: \"generateRowSamples\",\n value: function generateRowSamples(rowRange, colRange) {\n return this.generateSamples('row', colRange, rowRange);\n }\n /**\n * Generate samples for column. You can control which area should be sampled by passing `colRange` object and `rowRange` object.\n *\n * @param {object} colRange Column index.\n * @param {object} rowRange Column index.\n * @returns {object}\n */\n\n }, {\n key: \"generateColumnSamples\",\n value: function generateColumnSamples(colRange, rowRange) {\n return this.generateSamples('col', rowRange, colRange);\n }\n /**\n * Generate collection of samples.\n *\n * @param {string} type Type to generate. Can be `col` or `row`.\n * @param {object} range The range to generate the samples.\n * @param {object|number} specifierRange The range to generate the samples.\n * @returns {Map}\n */\n\n }, {\n key: \"generateSamples\",\n value: function generateSamples(type, range, specifierRange) {\n var _this = this;\n\n var samples = new Map();\n\n var _ref = typeof specifierRange === 'number' ? {\n from: specifierRange,\n to: specifierRange\n } : specifierRange,\n from = _ref.from,\n to = _ref.to;\n\n rangeEach(from, to, function (index) {\n var sample = _this.generateSample(type, range, index);\n\n samples.set(index, sample);\n });\n return samples;\n }\n /**\n * Generate sample for specified type (`row` or `col`).\n *\n * @param {string} type Samples type `row` or `col`.\n * @param {object} range The range to generate the samples.\n * @param {number} specifierValue The range to generate the samples.\n * @returns {Map}\n */\n\n }, {\n key: \"generateSample\",\n value: function generateSample(type, range, specifierValue) {\n var _this2 = this;\n\n if (type !== 'row' && type !== 'col') {\n throw new Error('Unsupported sample type');\n }\n\n var samples = new Map();\n var computedKey = type === 'row' ? 'col' : 'row';\n var sampledValues = [];\n rangeEach(range.from, range.to, function (index) {\n var _ref2 = type === 'row' ? _this2.dataFactory(specifierValue, index) : _this2.dataFactory(index, specifierValue),\n value = _ref2.value,\n bundleCountSeed = _ref2.bundleCountSeed;\n\n var hasCustomBundleSeed = bundleCountSeed > 0;\n var length;\n\n if (isObject(value)) {\n length = Object.keys(value).length;\n } else if (Array.isArray(value)) {\n length = value.length;\n } else {\n length = stringify(value).length;\n }\n\n if (hasCustomBundleSeed) {\n length += bundleCountSeed;\n }\n\n if (!samples.has(length)) {\n samples.set(length, {\n needed: _this2.getSampleCount(),\n strings: []\n });\n }\n\n var sample = samples.get(length);\n\n if (sample.needed) {\n var duplicate = sampledValues.indexOf(value) > -1;\n\n if (!duplicate || _this2.allowDuplicates || hasCustomBundleSeed) {\n sample.strings.push(_defineProperty({\n value: value\n }, computedKey, index));\n sampledValues.push(value);\n sample.needed -= 1;\n }\n }\n });\n return samples;\n }\n }], [{\n key: \"SAMPLE_COUNT\",\n get:\n /**\n * Number of samples to take of each value length.\n *\n * @type {number}\n */\n function get() {\n return 3;\n }\n }]);\n\n return SamplesGenerator;\n}();\n\nexport default SamplesGenerator;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { arrayEach, arrayFilter, arrayReduce, arrayMap } from \"../../helpers/array.mjs\";\nimport { cancelAnimationFrame, requestAnimationFrame } from \"../../helpers/feature.mjs\";\nimport GhostTable from \"../../utils/ghostTable.mjs\";\nimport { isObject, hasOwnProperty } from \"../../helpers/object.mjs\";\nimport { valueAccordingPercent, rangeEach } from \"../../helpers/number.mjs\";\nimport SamplesGenerator from \"../../utils/samplesGenerator.mjs\";\nimport { isPercentValue } from \"../../helpers/string.mjs\";\nimport { ViewportColumnsCalculator } from \"../../3rdparty/walkontable/src/index.mjs\";\nimport { PhysicalIndexToValueMap as IndexToValueMap } from \"../../translations/index.mjs\";\nexport var PLUGIN_KEY = 'autoColumnSize';\nexport var PLUGIN_PRIORITY = 10;\nvar privatePool = new WeakMap();\nvar COLUMN_SIZE_MAP_NAME = 'autoColumnSize';\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @plugin AutoColumnSize\n * @class AutoColumnSize\n *\n * @description\n * This plugin allows to set column widths based on their widest cells.\n *\n * By default, the plugin is declared as `undefined`, which makes it enabled (same as if it was declared as `true`).\n * Enabling this plugin may decrease the overall table performance, as it needs to calculate the widths of all cells to\n * resize the columns accordingly.\n * If you experience problems with the performance, try turning this feature off and declaring the column widths manually.\n *\n * Column width calculations are divided into sync and async part. Each of this parts has their own advantages and\n * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous\n * operations don't block the browser UI.\n *\n * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value to a config object:\n * ```js\n * // as a number (300 columns in sync, rest async)\n * autoColumnSize: {syncLimit: 300},.\n *\n * // as a string (percent)\n * autoColumnSize: {syncLimit: '40%'},\n * ```\n *\n * To configure this plugin see {@link Options#autoColumnSize}.\n *\n * @example\n * ```js\n * const hot = new Handsontable(document.getElementById('example'), {\n * data: getData(),\n * autoColumnSize: true\n * });\n * // Access to plugin instance:\n * const plugin = hot.getPlugin('autoColumnSize');\n *\n * plugin.getColumnWidth(4);\n *\n * if (plugin.isEnabled()) {\n * // code...\n * }\n * ```\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nexport var AutoColumnSize = /*#__PURE__*/function (_BasePlugin) {\n _inherits(AutoColumnSize, _BasePlugin);\n\n var _super = _createSuper(AutoColumnSize);\n\n function AutoColumnSize(hotInstance) {\n var _this;\n\n _classCallCheck(this, AutoColumnSize);\n\n _this = _super.call(this, hotInstance);\n privatePool.set(_assertThisInitialized(_this), {\n /**\n * Cached column header names. It is used to diff current column headers with previous state and detect which\n * columns width should be updated.\n *\n * @private\n * @type {Array}\n */\n cachedColumnHeaders: []\n });\n /**\n * Instance of {@link GhostTable} for rows and columns size calculations.\n *\n * @private\n * @type {GhostTable}\n */\n\n _this.ghostTable = new GhostTable(_this.hot);\n /**\n * Instance of {@link SamplesGenerator} for generating samples necessary for columns width calculations.\n *\n * @private\n * @type {SamplesGenerator}\n */\n\n _this.samplesGenerator = new SamplesGenerator(function (row, column) {\n var cellMeta = _this.hot.getCellMeta(row, column);\n\n var cellValue = '';\n\n if (!cellMeta.spanned) {\n cellValue = _this.hot.getDataAtCell(row, column);\n }\n\n var bundleCountSeed = 0;\n\n if (cellMeta.label) {\n var _cellMeta$label = cellMeta.label,\n labelValue = _cellMeta$label.value,\n labelProperty = _cellMeta$label.property;\n var labelText = '';\n\n if (labelValue) {\n labelText = typeof labelValue === 'function' ? labelValue(row, column, _this.hot.colToProp(column), cellValue) : labelValue;\n } else if (labelProperty) {\n var labelData = _this.hot.getDataAtRowProp(row, labelProperty);\n\n labelText = labelData !== null ? labelData : '';\n }\n\n bundleCountSeed = labelText.length;\n }\n\n return {\n value: cellValue,\n bundleCountSeed: bundleCountSeed\n };\n });\n /**\n * `true` only if the first calculation was performed.\n *\n * @private\n * @type {boolean}\n */\n\n _this.firstCalculation = true;\n /**\n * `true` if the size calculation is in progress.\n *\n * @type {boolean}\n */\n\n _this.inProgress = false;\n /**\n * Number of already measured columns (we already know their sizes).\n *\n * @type {number}\n */\n\n _this.measuredColumns = 0;\n /**\n * PhysicalIndexToValueMap to keep and track widths for physical column indexes.\n *\n * @private\n * @type {PhysicalIndexToValueMap}\n */\n\n _this.columnWidthsMap = new IndexToValueMap();\n\n _this.hot.columnIndexMapper.registerMap(COLUMN_SIZE_MAP_NAME, _this.columnWidthsMap); // Leave the listener active to allow auto-sizing the columns when the plugin is disabled.\n // This is necesseary for width recalculation for resize handler doubleclick (ManualColumnResize).\n\n\n _this.addHook('beforeColumnResize', function (size, column, isDblClick) {\n return _this.onBeforeColumnResize(size, column, isDblClick);\n });\n\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link AutoColumnSize#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(AutoColumnSize, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return this.hot.getSettings()[PLUGIN_KEY] !== false && !this.hot.getSettings().colWidths;\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var setting = this.hot.getSettings()[PLUGIN_KEY];\n\n if (setting && setting.useHeaders !== null && setting.useHeaders !== void 0) {\n this.ghostTable.setSetting('useHeaders', setting.useHeaders);\n }\n\n this.setSamplingOptions();\n this.addHook('afterLoadData', function () {\n return _this2.onAfterLoadData();\n });\n this.addHook('beforeChange', function (changes) {\n return _this2.onBeforeChange(changes);\n });\n this.addHook('beforeRender', function (force) {\n return _this2.onBeforeRender(force);\n });\n this.addHook('modifyColWidth', function (width, col) {\n return _this2.getColumnWidth(col, width);\n });\n this.addHook('afterInit', function () {\n return _this2.onAfterInit();\n });\n\n _get(_getPrototypeOf(AutoColumnSize.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n var changedColumns = this.findColumnsWhereHeaderWasChanged();\n\n if (changedColumns.length) {\n this.clearCache(changedColumns);\n this.calculateVisibleColumnsWidth();\n }\n\n _get(_getPrototypeOf(AutoColumnSize.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n var _this3 = this;\n\n _get(_getPrototypeOf(AutoColumnSize.prototype), \"disablePlugin\", this).call(this); // Leave the listener active to allow auto-sizing the columns when the plugin is disabled.\n // This is necesseary for width recalculation for resize handler doubleclick (ManualColumnResize).\n\n\n this.addHook('beforeColumnResize', function (size, column, isDblClick) {\n return _this3.onBeforeColumnResize(size, column, isDblClick);\n });\n }\n /**\n * Calculates visible columns width.\n */\n\n }, {\n key: \"calculateVisibleColumnsWidth\",\n value: function calculateVisibleColumnsWidth() {\n var rowsCount = this.hot.countRows(); // Keep last column widths unchanged for situation when all rows was deleted or trimmed (pro #6)\n\n if (!rowsCount) {\n return;\n }\n\n var force = this.hot.renderCall;\n var firstVisibleColumn = this.getFirstVisibleColumn();\n var lastVisibleColumn = this.getLastVisibleColumn();\n\n if (firstVisibleColumn === -1 || lastVisibleColumn === -1) {\n return;\n }\n\n this.calculateColumnsWidth({\n from: firstVisibleColumn,\n to: lastVisibleColumn\n }, void 0, force);\n }\n /**\n * Calculates a columns width.\n *\n * @param {number|object} colRange Visual column index or an object with `from` and `to` visual indexes as a range.\n * @param {number|object} rowRange Visual row index or an object with `from` and `to` visual indexes as a range.\n * @param {boolean} [force=false] If `true` the calculation will be processed regardless of whether the width exists in the cache.\n */\n\n }, {\n key: \"calculateColumnsWidth\",\n value: function calculateColumnsWidth() {\n var _this4 = this;\n\n var colRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n from: 0,\n to: this.hot.countCols() - 1\n };\n var rowRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n from: 0,\n to: this.hot.countRows() - 1\n };\n var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // eslint-disable-line max-len\n\n var columnsRange = typeof colRange === 'number' ? {\n from: colRange,\n to: colRange\n } : colRange;\n var rowsRange = typeof rowRange === 'number' ? {\n from: rowRange,\n to: rowRange\n } : rowRange;\n rangeEach(columnsRange.from, columnsRange.to, function (visualColumn) {\n var physicalColumn = _this4.hot.toPhysicalColumn(visualColumn);\n\n if (physicalColumn === null) {\n physicalColumn = visualColumn;\n }\n\n if (force || _this4.columnWidthsMap.getValueAtIndex(physicalColumn) === null && !_this4.hot._getColWidthFromSettings(physicalColumn)) {\n var samples = _this4.samplesGenerator.generateColumnSamples(visualColumn, rowsRange);\n\n arrayEach(samples, function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n column = _ref2[0],\n sample = _ref2[1];\n\n return _this4.ghostTable.addColumn(column, sample);\n });\n }\n });\n\n if (this.ghostTable.columns.length) {\n this.hot.batchExecution(function () {\n _this4.ghostTable.getWidths(function (visualColumn, width) {\n var physicalColumn = _this4.hot.toPhysicalColumn(visualColumn);\n\n _this4.columnWidthsMap.setValueAtIndex(physicalColumn, width);\n });\n }, true);\n this.measuredColumns = columnsRange.to + 1;\n this.ghostTable.clean();\n }\n }\n /**\n * Calculates all columns width. The calculated column will be cached in the {@link AutoColumnSize#widths} property.\n * To retrieve width for specified column use {@link AutoColumnSize#getColumnWidth} method.\n *\n * @param {object|number} rowRange Row index or an object with `from` and `to` properties which define row range.\n */\n\n }, {\n key: \"calculateAllColumnsWidth\",\n value: function calculateAllColumnsWidth() {\n var _this5 = this;\n\n var rowRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n from: 0,\n to: this.hot.countRows() - 1\n };\n var current = 0;\n var length = this.hot.countCols() - 1;\n var timer = null;\n this.inProgress = true;\n\n var loop = function loop() {\n // When hot was destroyed after calculating finished cancel frame\n if (!_this5.hot) {\n cancelAnimationFrame(timer);\n _this5.inProgress = false;\n return;\n }\n\n _this5.calculateColumnsWidth({\n from: current,\n to: Math.min(current + AutoColumnSize.CALCULATION_STEP, length)\n }, rowRange);\n\n current = current + AutoColumnSize.CALCULATION_STEP + 1;\n\n if (current < length) {\n timer = requestAnimationFrame(loop);\n } else {\n cancelAnimationFrame(timer);\n _this5.inProgress = false; // @TODO Should call once per render cycle, currently fired separately in different plugins\n\n _this5.hot.view.adjustElementsSize();\n }\n };\n\n var syncLimit = this.getSyncCalculationLimit(); // sync\n\n if (this.firstCalculation && syncLimit >= 0) {\n this.calculateColumnsWidth({\n from: 0,\n to: syncLimit\n }, rowRange);\n this.firstCalculation = false;\n current = syncLimit + 1;\n } // async\n\n\n if (current < length) {\n loop();\n } else {\n this.inProgress = false;\n }\n }\n /**\n * Sets the sampling options.\n *\n * @private\n */\n\n }, {\n key: \"setSamplingOptions\",\n value: function setSamplingOptions() {\n var setting = this.hot.getSettings()[PLUGIN_KEY];\n var samplingRatio = setting && hasOwnProperty(setting, 'samplingRatio') ? setting.samplingRatio : void 0;\n var allowSampleDuplicates = setting && hasOwnProperty(setting, 'allowSampleDuplicates') ? setting.allowSampleDuplicates : void 0;\n\n if (samplingRatio && !isNaN(samplingRatio)) {\n this.samplesGenerator.setSampleCount(parseInt(samplingRatio, 10));\n }\n\n if (allowSampleDuplicates) {\n this.samplesGenerator.setAllowDuplicates(allowSampleDuplicates);\n }\n }\n /**\n * Recalculates all columns width (overwrite cache values).\n */\n\n }, {\n key: \"recalculateAllColumnsWidth\",\n value: function recalculateAllColumnsWidth() {\n if (this.hot.view && this.hot.view.wt.wtTable.isVisible()) {\n this.clearCache();\n this.calculateAllColumnsWidth();\n }\n }\n /**\n * Gets value which tells how many columns should be calculated synchronously (rest of the columns will be calculated\n * asynchronously). The limit is calculated based on `syncLimit` set to `autoColumnSize` option (see {@link Options#autoColumnSize}).\n *\n * @returns {number}\n */\n\n }, {\n key: \"getSyncCalculationLimit\",\n value: function getSyncCalculationLimit() {\n var settings = this.hot.getSettings()[PLUGIN_KEY];\n /* eslint-disable no-bitwise */\n\n var limit = AutoColumnSize.SYNC_CALCULATION_LIMIT;\n var colsLimit = this.hot.countCols() - 1;\n\n if (isObject(settings)) {\n limit = settings.syncLimit;\n\n if (isPercentValue(limit)) {\n limit = valueAccordingPercent(colsLimit, limit);\n } else {\n // Force to Number\n limit >>= 0;\n }\n }\n\n return Math.min(limit, colsLimit);\n }\n /**\n * Gets the calculated column width.\n *\n * @param {number} column Visual column index.\n * @param {number} [defaultWidth] Default column width. It will be picked up if no calculated width found.\n * @param {boolean} [keepMinimum=true] If `true` then returned value won't be smaller then 50 (default column width).\n * @returns {number}\n */\n\n }, {\n key: \"getColumnWidth\",\n value: function getColumnWidth(column) {\n var defaultWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : void 0;\n var keepMinimum = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var width = defaultWidth;\n\n if (width === void 0) {\n width = this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(column));\n\n if (keepMinimum && typeof width === 'number') {\n width = Math.max(width, ViewportColumnsCalculator.DEFAULT_WIDTH);\n }\n }\n\n return width;\n }\n /**\n * Gets the first visible column.\n *\n * @returns {number} Returns visual column index, -1 if table is not rendered or if there are no columns to base the the calculations on.\n */\n\n }, {\n key: \"getFirstVisibleColumn\",\n value: function getFirstVisibleColumn() {\n var wot = this.hot.view.wt;\n\n if (wot.wtViewport.columnsVisibleCalculator) {\n // Fist fully visible column is stored as renderable index.\n var firstFullyVisibleColumn = wot.wtTable.getFirstVisibleColumn();\n\n if (firstFullyVisibleColumn !== -1) {\n return this.hot.columnIndexMapper.getVisualFromRenderableIndex(firstFullyVisibleColumn);\n }\n }\n\n if (wot.wtViewport.columnsRenderCalculator) {\n var firstRenderedColumn = wot.wtTable.getFirstRenderedColumn(); // There are no rendered column.\n\n if (firstRenderedColumn !== -1) {\n return this.hot.columnIndexMapper.getVisualFromRenderableIndex(firstRenderedColumn);\n }\n }\n\n return -1;\n }\n /**\n * Gets the last visible column.\n *\n * @returns {number} Returns visual column index or -1 if table is not rendered.\n */\n\n }, {\n key: \"getLastVisibleColumn\",\n value: function getLastVisibleColumn() {\n var wot = this.hot.view.wt;\n\n if (wot.wtViewport.columnsVisibleCalculator) {\n // Last fully visible column is stored as renderable index.\n var lastFullyVisibleColumn = wot.wtTable.getLastVisibleColumn();\n\n if (lastFullyVisibleColumn !== -1) {\n return this.hot.columnIndexMapper.getVisualFromRenderableIndex(lastFullyVisibleColumn);\n }\n }\n\n if (wot.wtViewport.columnsRenderCalculator) {\n // Last fully visible column is stored as renderable index.\n var lastRenderedColumn = wot.wtTable.getLastRenderedColumn(); // There are no rendered columns.\n\n if (lastRenderedColumn !== -1) {\n return this.hot.columnIndexMapper.getVisualFromRenderableIndex(lastRenderedColumn);\n }\n }\n\n return -1;\n }\n /**\n * Collects all columns which titles has been changed in comparison to the previous state.\n *\n * @private\n * @returns {Array} It returns an array of physical column indexes.\n */\n\n }, {\n key: \"findColumnsWhereHeaderWasChanged\",\n value: function findColumnsWhereHeaderWasChanged() {\n var columnHeaders = this.hot.getColHeader();\n\n var _privatePool$get = privatePool.get(this),\n cachedColumnHeaders = _privatePool$get.cachedColumnHeaders;\n\n var changedColumns = arrayReduce(columnHeaders, function (acc, columnTitle, physicalColumn) {\n var cachedColumnsLength = cachedColumnHeaders.length;\n\n if (cachedColumnsLength - 1 < physicalColumn || cachedColumnHeaders[physicalColumn] !== columnTitle) {\n acc.push(physicalColumn);\n }\n\n if (cachedColumnsLength - 1 < physicalColumn) {\n cachedColumnHeaders.push(columnTitle);\n } else {\n cachedColumnHeaders[physicalColumn] = columnTitle;\n }\n\n return acc;\n }, []);\n return changedColumns;\n }\n /**\n * Clears cache of calculated column widths. If you want to clear only selected columns pass an array with their indexes.\n * Otherwise whole cache will be cleared.\n *\n * @param {number[]} [columns] List of physical column indexes to clear.\n */\n\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n var _this6 = this;\n\n var columns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n if (columns.length) {\n this.hot.batchExecution(function () {\n arrayEach(columns, function (physicalIndex) {\n _this6.columnWidthsMap.setValueAtIndex(physicalIndex, null);\n });\n }, true);\n } else {\n this.columnWidthsMap.clear();\n }\n }\n /**\n * Checks if all widths were calculated. If not then return `true` (need recalculate).\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isNeedRecalculate\",\n value: function isNeedRecalculate() {\n return !!arrayFilter(this.columnWidthsMap.getValues().slice(0, this.measuredColumns), function (item) {\n return item === null;\n }).length;\n }\n /**\n * On before render listener.\n *\n * @private\n */\n\n }, {\n key: \"onBeforeRender\",\n value: function onBeforeRender() {\n this.calculateVisibleColumnsWidth();\n\n if (this.isNeedRecalculate() && !this.inProgress) {\n this.calculateAllColumnsWidth();\n }\n }\n /**\n * On after load data listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData() {\n var _this7 = this;\n\n if (this.hot.view) {\n this.recalculateAllColumnsWidth();\n } else {\n // first load - initialization\n setTimeout(function () {\n if (_this7.hot) {\n _this7.recalculateAllColumnsWidth();\n }\n }, 0);\n }\n }\n /**\n * On before change listener.\n *\n * @private\n * @param {Array} changes An array of modified data.\n */\n\n }, {\n key: \"onBeforeChange\",\n value: function onBeforeChange(changes) {\n var _this8 = this;\n\n var changedColumns = arrayMap(changes, function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n columnProperty = _ref4[1];\n\n return _this8.hot.toPhysicalColumn(_this8.hot.propToCol(columnProperty));\n });\n this.clearCache(Array.from(new Set(changedColumns)));\n }\n /**\n * On before column resize listener.\n *\n * @private\n * @param {number} size Calculated new column width.\n * @param {number} column Visual index of the resized column.\n * @param {boolean} isDblClick Flag that determines whether there was a double-click.\n * @returns {number}\n */\n\n }, {\n key: \"onBeforeColumnResize\",\n value: function onBeforeColumnResize(size, column, isDblClick) {\n var newSize = size;\n\n if (isDblClick) {\n this.calculateColumnsWidth(column, void 0, true);\n newSize = this.getColumnWidth(column, void 0, false);\n }\n\n return newSize;\n }\n /**\n * On after Handsontable init fill plugin with all necessary values.\n *\n * @private\n */\n\n }, {\n key: \"onAfterInit\",\n value: function onAfterInit() {\n privatePool.get(this).cachedColumnHeaders = this.hot.getColHeader();\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.columnIndexMapper.unregisterMap(COLUMN_SIZE_MAP_NAME);\n this.ghostTable.clean();\n\n _get(_getPrototypeOf(AutoColumnSize.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }, {\n key: \"CALCULATION_STEP\",\n get: function get() {\n return 50;\n }\n }, {\n key: \"SYNC_CALCULATION_LIMIT\",\n get: function get() {\n return 50;\n }\n }]);\n\n return AutoColumnSize;\n}(BasePlugin);","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport { isObject } from \"../../helpers/object.mjs\";\nimport { isDefined } from \"../../helpers/mixed.mjs\";\nimport { CellCoords } from \"../../3rdparty/walkontable/src/index.mjs\";\nexport var DIRECTIONS = {\n horizontal: 'horizontal',\n vertical: 'vertical'\n};\n/**\n * Get deltas array.\n *\n * @param {CellCoords} start The point in the grid where the selection starts.\n * @param {CellCoords} end The point in the grid where the selection ends.\n * @param {Array} data The chunk of the data which belongs to the selected box.\n * @param {string} direction The selection direction.\n * @returns {Array}\n */\n\nexport function getDeltas(start, end, data, direction) {\n var rowsLength = data.length;\n var columnsLength = data ? data[0].length : 0;\n var deltas = [];\n var diffRow = end.row - start.row;\n var diffCol = end.col - start.col;\n\n if (['down', 'up'].indexOf(direction) !== -1) {\n var arr = [];\n\n for (var col = 0; col < diffCol; col++) {\n var startValue = parseInt(data[0][col], 10);\n var endValue = parseInt(data[rowsLength - 1][col], 10);\n var delta = (direction === 'down' ? endValue - startValue : startValue - endValue) / (rowsLength - 1) || 0;\n arr.push(delta);\n }\n\n deltas.push(arr);\n }\n\n if (['right', 'left'].indexOf(direction) !== -1) {\n for (var row = 0; row < diffRow; row++) {\n var _startValue = parseInt(data[row][0], 10);\n\n var _endValue = parseInt(data[row][columnsLength - 1], 10);\n\n var _delta = (direction === 'right' ? _endValue - _startValue : _startValue - _endValue) / (columnsLength - 1) || 0;\n\n deltas.push([_delta]);\n }\n }\n\n return deltas;\n}\n/**\n * Get direction between positions and cords of selections difference (drag area).\n *\n * @param {Array} startSelection The coordinates where the selection starts.\n * @param {Array} endSelection The coordinates where the selection ends.\n * @returns {{direction: string, start: CellCoords, end: CellCoords}}\n */\n\nexport function getDragDirectionAndRange(startSelection, endSelection) {\n var startOfDragCoords;\n var endOfDragCoords;\n var directionOfDrag;\n\n if (endSelection[0] === startSelection[0] && endSelection[1] < startSelection[1]) {\n directionOfDrag = 'left';\n startOfDragCoords = new CellCoords(endSelection[0], endSelection[1]);\n endOfDragCoords = new CellCoords(endSelection[2], startSelection[1] - 1);\n } else if (endSelection[2] === startSelection[2] && endSelection[0] === startSelection[0] && endSelection[3] > startSelection[3]) {\n directionOfDrag = 'right';\n startOfDragCoords = new CellCoords(endSelection[0], startSelection[3] + 1);\n endOfDragCoords = new CellCoords(endSelection[2], endSelection[3]);\n } else if (endSelection[0] < startSelection[0] && endSelection[1] === startSelection[1]) {\n directionOfDrag = 'up';\n startOfDragCoords = new CellCoords(endSelection[0], endSelection[1]);\n endOfDragCoords = new CellCoords(startSelection[0] - 1, endSelection[3]);\n } else if (endSelection[2] > startSelection[2] && endSelection[1] === startSelection[1]) {\n directionOfDrag = 'down';\n startOfDragCoords = new CellCoords(startSelection[2] + 1, endSelection[1]);\n endOfDragCoords = new CellCoords(endSelection[2], endSelection[3]);\n }\n\n if (startOfDragCoords) {\n startOfDragCoords.normalize();\n }\n\n if (endOfDragCoords) {\n endOfDragCoords.normalize();\n }\n\n return {\n directionOfDrag: directionOfDrag,\n startOfDragCoords: startOfDragCoords,\n endOfDragCoords: endOfDragCoords\n };\n}\n/**\n * Get mapped FillHandle setting containing information about\n * allowed FillHandle directions and if allowed is automatic insertion of rows on drag.\n *\n * @param {boolean|object} fillHandle Property of Handsontable settings.\n * @returns {{directions: Array, autoInsertRow: boolean}} Object allowing access to information\n * about FillHandle in more useful way.\n */\n\nexport function getMappedFillHandleSetting(fillHandle) {\n var mappedSettings = {};\n\n if (fillHandle === true) {\n mappedSettings.directions = Object.keys(DIRECTIONS);\n mappedSettings.autoInsertRow = true;\n } else if (isObject(fillHandle)) {\n if (isDefined(fillHandle.autoInsertRow)) {\n // autoInsertRow for horizontal direction will be always false\n if (fillHandle.direction === DIRECTIONS.horizontal) {\n mappedSettings.autoInsertRow = false;\n } else {\n mappedSettings.autoInsertRow = fillHandle.autoInsertRow;\n }\n } else {\n mappedSettings.autoInsertRow = false;\n }\n\n if (isDefined(fillHandle.direction)) {\n mappedSettings.directions = [fillHandle.direction];\n } else {\n mappedSettings.directions = Object.keys(DIRECTIONS);\n }\n } else if (typeof fillHandle === 'string') {\n mappedSettings.directions = [fillHandle];\n mappedSettings.autoInsertRow = true;\n } else {\n mappedSettings.directions = [];\n mappedSettings.autoInsertRow = false;\n }\n\n return mappedSettings;\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.string.includes.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { offset, outerHeight, outerWidth } from \"../../helpers/dom/element.mjs\";\nimport { arrayEach, arrayMap } from \"../../helpers/array.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { CellCoords } from \"../../3rdparty/walkontable/src/index.mjs\";\nimport { getDeltas, getDragDirectionAndRange, DIRECTIONS, getMappedFillHandleSetting } from \"./utils.mjs\";\nHooks.getSingleton().register('modifyAutofillRange');\nHooks.getSingleton().register('beforeAutofill');\nHooks.getSingleton().register('afterAutofill');\nexport var PLUGIN_KEY = 'autofill';\nexport var PLUGIN_PRIORITY = 20;\nvar INSERT_ROW_ALTER_ACTION_NAME = 'insert_row';\nvar INTERVAL_FOR_ADDING_ROW = 200;\n/**\n * This plugin provides \"drag-down\" and \"copy-down\" functionalities, both operated using the small square in the right\n * bottom of the cell selection.\n *\n * \"Drag-down\" expands the value of the selected cells to the neighbouring cells when you drag the small\n * square in the corner.\n *\n * \"Copy-down\" copies the value of the selection to all empty cells below when you double click the small square.\n *\n * @class Autofill\n * @plugin Autofill\n */\n\nexport var Autofill = /*#__PURE__*/function (_BasePlugin) {\n _inherits(Autofill, _BasePlugin);\n\n var _super = _createSuper(Autofill);\n\n function Autofill(hotInstance) {\n var _this;\n\n _classCallCheck(this, Autofill);\n\n _this = _super.call(this, hotInstance);\n /**\n * Event manager instance.\n *\n * @private\n * @type {EventManager}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Specifies if adding new row started.\n *\n * @private\n * @type {boolean}\n */\n\n _this.addingStarted = false;\n /**\n * Specifies if there was mouse down on the cell corner.\n *\n * @private\n * @type {boolean}\n */\n\n _this.mouseDownOnCellCorner = false;\n /**\n * Specifies if mouse was dragged outside Handsontable.\n *\n * @private\n * @type {boolean}\n */\n\n _this.mouseDragOutside = false;\n /**\n * Specifies how many cell levels were dragged using the handle.\n *\n * @private\n * @type {boolean}\n */\n\n _this.handleDraggedCells = 0;\n /**\n * Specifies allowed directions of drag (`'horizontal'` or '`vertical`').\n *\n * @private\n * @type {string[]}\n */\n\n _this.directions = [];\n /**\n * Specifies if can insert new rows if needed.\n *\n * @type {boolean}\n */\n\n _this.autoInsertRow = false;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the Handsontable settings.\n *\n * @returns {boolean}\n */\n\n\n _createClass(Autofill, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return this.hot.getSettings().fillHandle;\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.mapSettings();\n this.registerEvents();\n this.addHook('afterOnCellCornerMouseDown', function (event) {\n return _this2.onAfterCellCornerMouseDown(event);\n });\n this.addHook('afterOnCellCornerDblClick', function (event) {\n return _this2.onCellCornerDblClick(event);\n });\n this.addHook('beforeOnCellMouseOver', function (event, coords) {\n return _this2.onBeforeCellMouseOver(coords);\n });\n\n _get(_getPrototypeOf(Autofill.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(Autofill.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.clearMappedSettings();\n\n _get(_getPrototypeOf(Autofill.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Gets selection data.\n *\n * @private\n * @returns {object[]} Ranges Array of objects with properties `startRow`, `startCol`, `endRow` and `endCol`.\n */\n\n }, {\n key: \"getSelectionData\",\n value: function getSelectionData() {\n var _this3 = this;\n\n var selection = this.hot.getSelectedRangeLast();\n\n var _selection$getTopLeft = selection.getTopLeftCorner(),\n startRow = _selection$getTopLeft.row,\n startCol = _selection$getTopLeft.col;\n\n var _selection$getBottomR = selection.getBottomRightCorner(),\n endRow = _selection$getBottomR.row,\n endCol = _selection$getBottomR.col;\n\n var copyableRanges = this.hot.runHooks('modifyCopyableRange', [{\n startRow: startRow,\n startCol: startCol,\n endRow: endRow,\n endCol: endCol\n }]);\n var copyableRows = [];\n var copyableColumns = [];\n var data = [];\n arrayEach(copyableRanges, function (range) {\n for (var visualRow = range.startRow; visualRow <= range.endRow; visualRow += 1) {\n if (copyableRows.indexOf(visualRow) === -1) {\n copyableRows.push(visualRow);\n }\n }\n\n for (var visualColumn = range.startCol; visualColumn <= range.endCol; visualColumn += 1) {\n if (copyableColumns.indexOf(visualColumn) === -1) {\n copyableColumns.push(visualColumn);\n }\n }\n });\n arrayEach(copyableRows, function (row) {\n var rowSet = [];\n arrayEach(copyableColumns, function (column) {\n rowSet.push(_this3.hot.getCopyableData(row, column));\n });\n data.push(rowSet);\n });\n return data;\n }\n /**\n * Try to apply fill values to the area in fill border, omitting the selection border.\n *\n * @private\n * @returns {boolean} Reports if fill was applied.\n *\n * @fires Hooks#modifyAutofillRange\n * @fires Hooks#beforeAutofill\n * @fires Hooks#afterAutofill\n */\n\n }, {\n key: \"fillIn\",\n value: function fillIn() {\n if (this.hot.selection.highlight.getFill().isEmpty()) {\n return false;\n } // Fill area may starts or ends with invisible cell. There won't be any information about it as highlighted\n // selection store just renderable indexes (It's part of Walkontable). I extrapolate where the start or/and\n // the end is.\n\n\n var _this$hot$selection$h = this.hot.selection.highlight.getFill().getVisualCorners(),\n _this$hot$selection$h2 = _slicedToArray(_this$hot$selection$h, 4),\n fillStartRow = _this$hot$selection$h2[0],\n fillStartColumn = _this$hot$selection$h2[1],\n fillEndRow = _this$hot$selection$h2[2],\n fillEndColumn = _this$hot$selection$h2[3];\n\n var selectionRangeLast = this.hot.getSelectedRangeLast();\n var topLeftCorner = selectionRangeLast.getTopLeftCorner();\n var bottomRightCorner = selectionRangeLast.getBottomRightCorner();\n var cornersOfSelectionAndDragAreas = [Math.min(topLeftCorner.row, fillStartRow), Math.min(topLeftCorner.col, fillStartColumn), Math.max(bottomRightCorner.row, fillEndRow), Math.max(bottomRightCorner.col, fillEndColumn)];\n this.resetSelectionOfDraggedArea();\n var cornersOfSelectedCells = [topLeftCorner.row, topLeftCorner.col, bottomRightCorner.row, bottomRightCorner.col];\n cornersOfSelectionAndDragAreas = this.hot.runHooks('modifyAutofillRange', cornersOfSelectionAndDragAreas, cornersOfSelectedCells);\n\n var _getDragDirectionAndR = getDragDirectionAndRange(cornersOfSelectedCells, cornersOfSelectionAndDragAreas),\n directionOfDrag = _getDragDirectionAndR.directionOfDrag,\n startOfDragCoords = _getDragDirectionAndR.startOfDragCoords,\n endOfDragCoords = _getDragDirectionAndR.endOfDragCoords;\n\n if (startOfDragCoords && startOfDragCoords.row > -1 && startOfDragCoords.col > -1) {\n var selectionData = this.getSelectionData();\n var beforeAutofillHook = this.hot.runHooks('beforeAutofill', startOfDragCoords, endOfDragCoords, selectionData);\n\n if (beforeAutofillHook === false) {\n this.hot.selection.highlight.getFill().clear();\n this.hot.render();\n return false;\n }\n\n var deltas = getDeltas(startOfDragCoords, endOfDragCoords, selectionData, directionOfDrag);\n var fillData = selectionData;\n\n if (['up', 'left'].indexOf(directionOfDrag) > -1) {\n fillData = [];\n var dragLength = null;\n var fillOffset = null;\n\n if (directionOfDrag === 'up') {\n dragLength = endOfDragCoords.row - startOfDragCoords.row + 1;\n fillOffset = dragLength % selectionData.length;\n\n for (var i = 0; i < dragLength; i++) {\n fillData.push(selectionData[(i + (selectionData.length - fillOffset)) % selectionData.length]);\n }\n } else {\n dragLength = endOfDragCoords.col - startOfDragCoords.col + 1;\n fillOffset = dragLength % selectionData[0].length;\n\n for (var _i2 = 0; _i2 < selectionData.length; _i2++) {\n fillData.push([]);\n\n for (var j = 0; j < dragLength; j++) {\n fillData[_i2].push(selectionData[_i2][(j + (selectionData[_i2].length - fillOffset)) % selectionData[_i2].length]);\n }\n }\n }\n }\n\n this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, \"\".concat(this.pluginName, \".fill\"), null, directionOfDrag, deltas);\n this.setSelection(cornersOfSelectionAndDragAreas);\n this.hot.runHooks('afterAutofill', startOfDragCoords, endOfDragCoords, selectionData);\n } else {\n // reset to avoid some range bug\n this.hot._refreshBorders();\n }\n\n return true;\n }\n /**\n * Reduces the selection area if the handle was dragged outside of the table or on headers.\n *\n * @private\n * @param {CellCoords} coords Indexes of selection corners.\n * @returns {CellCoords}\n */\n\n }, {\n key: \"reduceSelectionAreaIfNeeded\",\n value: function reduceSelectionAreaIfNeeded(coords) {\n if (coords.row < 0) {\n coords.row = 0;\n }\n\n if (coords.col < 0) {\n coords.col = 0;\n }\n\n return coords;\n }\n /**\n * Gets the coordinates of the drag & drop borders.\n *\n * @private\n * @param {CellCoords} coordsOfSelection `CellCoords` coord object.\n * @returns {CellCoords}\n */\n\n }, {\n key: \"getCoordsOfDragAndDropBorders\",\n value: function getCoordsOfDragAndDropBorders(coordsOfSelection) {\n var currentSelection = this.hot.getSelectedRangeLast();\n var bottomRightCorner = currentSelection.getBottomRightCorner();\n var coords = coordsOfSelection;\n\n if (this.directions.includes(DIRECTIONS.vertical) && this.directions.includes(DIRECTIONS.horizontal)) {\n var topLeftCorner = currentSelection.getTopLeftCorner();\n\n if (bottomRightCorner.col <= coordsOfSelection.col || topLeftCorner.col >= coordsOfSelection.col) {\n coords = new CellCoords(bottomRightCorner.row, coordsOfSelection.col);\n }\n\n if (bottomRightCorner.row < coordsOfSelection.row || topLeftCorner.row > coordsOfSelection.row) {\n coords = new CellCoords(coordsOfSelection.row, bottomRightCorner.col);\n }\n } else if (this.directions.includes(DIRECTIONS.vertical)) {\n coords = new CellCoords(coordsOfSelection.row, bottomRightCorner.col);\n } else if (this.directions.includes(DIRECTIONS.horizontal)) {\n coords = new CellCoords(bottomRightCorner.row, coordsOfSelection.col);\n } else {\n // wrong direction\n return;\n }\n\n return this.reduceSelectionAreaIfNeeded(coords);\n }\n /**\n * Show the fill border.\n *\n * @private\n * @param {CellCoords} coordsOfSelection `CellCoords` coord object.\n */\n\n }, {\n key: \"showBorder\",\n value: function showBorder(coordsOfSelection) {\n var coordsOfDragAndDropBorders = this.getCoordsOfDragAndDropBorders(coordsOfSelection);\n\n if (coordsOfDragAndDropBorders) {\n this.redrawBorders(coordsOfDragAndDropBorders);\n }\n }\n /**\n * Add new row.\n *\n * @private\n */\n\n }, {\n key: \"addRow\",\n value: function addRow() {\n var _this4 = this;\n\n this.hot._registerTimeout(function () {\n _this4.hot.alter(INSERT_ROW_ALTER_ACTION_NAME, void 0, 1, \"\".concat(_this4.pluginName, \".fill\"));\n\n _this4.addingStarted = false;\n }, INTERVAL_FOR_ADDING_ROW);\n }\n /**\n * Add new rows if they are needed to continue auto-filling values.\n *\n * @private\n */\n\n }, {\n key: \"addNewRowIfNeeded\",\n value: function addNewRowIfNeeded() {\n if (!this.hot.selection.highlight.getFill().isEmpty() && this.addingStarted === false && this.autoInsertRow) {\n var cornersOfSelectedCells = this.hot.getSelectedLast();\n var cornersOfSelectedDragArea = this.hot.selection.highlight.getFill().getVisualCorners();\n var nrOfTableRows = this.hot.countRows();\n\n if (cornersOfSelectedCells[2] < nrOfTableRows - 1 && cornersOfSelectedDragArea[2] === nrOfTableRows - 1) {\n this.addingStarted = true;\n this.addRow();\n }\n }\n }\n /**\n * Get index of last adjacent filled in row.\n *\n * @private\n * @param {Array} cornersOfSelectedCells Indexes of selection corners.\n * @returns {number} Gives number greater than or equal to zero when selection adjacent can be applied.\n * Or -1 when selection adjacent can't be applied.\n */\n\n }, {\n key: \"getIndexOfLastAdjacentFilledInRow\",\n value: function getIndexOfLastAdjacentFilledInRow(cornersOfSelectedCells) {\n var data = this.hot.getData();\n var nrOfTableRows = this.hot.countRows();\n var lastFilledInRowIndex;\n\n for (var rowIndex = cornersOfSelectedCells[2] + 1; rowIndex < nrOfTableRows; rowIndex++) {\n for (var columnIndex = cornersOfSelectedCells[1]; columnIndex <= cornersOfSelectedCells[3]; columnIndex++) {\n var dataInCell = data[rowIndex][columnIndex];\n\n if (dataInCell) {\n return -1;\n }\n }\n\n var dataInNextLeftCell = data[rowIndex][cornersOfSelectedCells[1] - 1];\n var dataInNextRightCell = data[rowIndex][cornersOfSelectedCells[3] + 1];\n\n if (!!dataInNextLeftCell || !!dataInNextRightCell) {\n lastFilledInRowIndex = rowIndex;\n }\n }\n\n return lastFilledInRowIndex;\n }\n /**\n * Adds a selection from the start area to the specific row index.\n *\n * @private\n * @param {Array} selectStartArea Selection area from which we start to create more comprehensive selection.\n * @param {number} rowIndex The row index into the selection will be added.\n */\n\n }, {\n key: \"addSelectionFromStartAreaToSpecificRowIndex\",\n value: function addSelectionFromStartAreaToSpecificRowIndex(selectStartArea, rowIndex) {\n this.hot.selection.highlight.getFill().clear().add(new CellCoords(selectStartArea[0], selectStartArea[1])).add(new CellCoords(rowIndex, selectStartArea[3])).commit();\n }\n /**\n * Sets selection based on passed corners.\n *\n * @private\n * @param {Array} cornersOfArea An array witch defines selection.\n */\n\n }, {\n key: \"setSelection\",\n value: function setSelection(cornersOfArea) {\n var _this$hot;\n\n (_this$hot = this.hot).selectCell.apply(_this$hot, _toConsumableArray(arrayMap(cornersOfArea, function (index) {\n return Math.max(index, 0);\n })).concat([false, false]));\n }\n /**\n * Try to select cells down to the last row in the left column and then returns if selection was applied.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"selectAdjacent\",\n value: function selectAdjacent() {\n var cornersOfSelectedCells = this.hot.getSelectedLast();\n var lastFilledInRowIndex = this.getIndexOfLastAdjacentFilledInRow(cornersOfSelectedCells);\n\n if (lastFilledInRowIndex === -1 || lastFilledInRowIndex === void 0) {\n return false;\n }\n\n this.addSelectionFromStartAreaToSpecificRowIndex(cornersOfSelectedCells, lastFilledInRowIndex);\n return true;\n }\n /**\n * Resets selection of dragged area.\n *\n * @private\n */\n\n }, {\n key: \"resetSelectionOfDraggedArea\",\n value: function resetSelectionOfDraggedArea() {\n this.handleDraggedCells = 0;\n this.hot.selection.highlight.getFill().clear();\n }\n /**\n * Redraws borders.\n *\n * @private\n * @param {CellCoords} coords `CellCoords` coord object.\n */\n\n }, {\n key: \"redrawBorders\",\n value: function redrawBorders(coords) {\n this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(coords).commit();\n this.hot.view.render();\n }\n /**\n * Get if mouse was dragged outside.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n * @returns {boolean}\n */\n\n }, {\n key: \"getIfMouseWasDraggedOutside\",\n value: function getIfMouseWasDraggedOutside(event) {\n var documentElement = this.hot.rootDocument.documentElement;\n var tableBottom = offset(this.hot.table).top - (this.hot.rootWindow.pageYOffset || documentElement.scrollTop) + outerHeight(this.hot.table);\n var tableRight = offset(this.hot.table).left - (this.hot.rootWindow.pageXOffset || documentElement.scrollLeft) + outerWidth(this.hot.table);\n return event.clientY > tableBottom && event.clientX <= tableRight;\n }\n /**\n * Bind the events used by the plugin.\n *\n * @private\n */\n\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this5 = this;\n\n var documentElement = this.hot.rootDocument.documentElement;\n this.eventManager.addEventListener(documentElement, 'mouseup', function () {\n return _this5.onMouseUp();\n });\n this.eventManager.addEventListener(documentElement, 'mousemove', function (event) {\n return _this5.onMouseMove(event);\n });\n }\n /**\n * On cell corner double click callback.\n *\n * @private\n */\n\n }, {\n key: \"onCellCornerDblClick\",\n value: function onCellCornerDblClick() {\n var selectionApplied = this.selectAdjacent();\n\n if (selectionApplied) {\n this.fillIn();\n }\n }\n /**\n * On after cell corner mouse down listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterCellCornerMouseDown\",\n value: function onAfterCellCornerMouseDown() {\n this.handleDraggedCells = 1;\n this.mouseDownOnCellCorner = true;\n }\n /**\n * On before cell mouse over listener.\n *\n * @private\n * @param {CellCoords} coords `CellCoords` coord object.\n */\n\n }, {\n key: \"onBeforeCellMouseOver\",\n value: function onBeforeCellMouseOver(coords) {\n if (this.mouseDownOnCellCorner && !this.hot.view.isMouseDown() && this.handleDraggedCells) {\n this.handleDraggedCells += 1;\n this.showBorder(coords);\n this.addNewRowIfNeeded();\n }\n }\n /**\n * On mouse up listener.\n *\n * @private\n */\n\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp() {\n if (this.handleDraggedCells) {\n if (this.handleDraggedCells > 1) {\n this.fillIn();\n }\n\n this.handleDraggedCells = 0;\n this.mouseDownOnCellCorner = false;\n }\n }\n /**\n * On mouse move listener.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n */\n\n }, {\n key: \"onMouseMove\",\n value: function onMouseMove(event) {\n var mouseWasDraggedOutside = this.getIfMouseWasDraggedOutside(event);\n\n if (this.addingStarted === false && this.handleDraggedCells > 0 && mouseWasDraggedOutside) {\n this.mouseDragOutside = true;\n this.addingStarted = true;\n } else {\n this.mouseDragOutside = false;\n }\n\n if (this.mouseDragOutside && this.autoInsertRow) {\n this.addRow();\n }\n }\n /**\n * Clears mapped settings.\n *\n * @private\n */\n\n }, {\n key: \"clearMappedSettings\",\n value: function clearMappedSettings() {\n this.directions.length = 0;\n this.autoInsertRow = false;\n }\n /**\n * Map settings.\n *\n * @private\n */\n\n }, {\n key: \"mapSettings\",\n value: function mapSettings() {\n var mappedSettings = getMappedFillHandleSetting(this.hot.getSettings().fillHandle);\n this.directions = mappedSettings.directions;\n this.autoInsertRow = mappedSettings.autoInsertRow;\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(Autofill.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return Autofill;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { arrayEach, arrayFilter } from \"../../helpers/array.mjs\";\nimport { cancelAnimationFrame, requestAnimationFrame } from \"../../helpers/feature.mjs\";\nimport { isVisible } from \"../../helpers/dom/element.mjs\";\nimport GhostTable from \"../../utils/ghostTable.mjs\";\nimport { isObject, hasOwnProperty } from \"../../helpers/object.mjs\";\nimport { valueAccordingPercent, rangeEach } from \"../../helpers/number.mjs\";\nimport SamplesGenerator from \"../../utils/samplesGenerator.mjs\";\nimport { isPercentValue } from \"../../helpers/string.mjs\";\nimport { PhysicalIndexToValueMap as IndexToValueMap } from \"../../translations/index.mjs\";\nexport var PLUGIN_KEY = 'autoRowSize';\nexport var PLUGIN_PRIORITY = 40;\nvar ROW_WIDTHS_MAP_NAME = 'autoRowSize';\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @plugin AutoRowSize\n * @class AutoRowSize\n * @description\n * This plugin allows to set row heights based on their highest cells.\n *\n * By default, the plugin is declared as `undefined`, which makes it disabled (same as if it was declared as `false`).\n * Enabling this plugin may decrease the overall table performance, as it needs to calculate the heights of all cells to\n * resize the rows accordingly.\n * If you experience problems with the performance, try turning this feature off and declaring the row heights manually.\n *\n * Row height calculations are divided into sync and async part. Each of this parts has their own advantages and\n * disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous\n * operations don't block the browser UI.\n *\n * To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value to a config object:\n * ```js\n * // as a number (300 columns in sync, rest async)\n * autoRowSize: {syncLimit: 300},.\n *\n * // as a string (percent)\n * autoRowSize: {syncLimit: '40%'},.\n *\n * // allow sample duplication\n * autoRowSize: {syncLimit: '40%', allowSampleDuplicates: true},\n * ```\n *\n * You can also use the `allowSampleDuplicates` option to allow sampling duplicate values when calculating the row\n * height. __Note__, that this might have a negative impact on performance.\n *\n * To configure this plugin see {@link Options#autoRowSize}.\n *\n * @example\n *\n * ```js\n * const hot = new Handsontable(document.getElementById('example'), {\n * data: getData(),\n * autoRowSize: true\n * });\n * // Access to plugin instance:\n * const plugin = hot.getPlugin('autoRowSize');\n *\n * plugin.getRowHeight(4);\n *\n * if (plugin.isEnabled()) {\n * // code...\n * }\n * ```\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nexport var AutoRowSize = /*#__PURE__*/function (_BasePlugin) {\n _inherits(AutoRowSize, _BasePlugin);\n\n var _super = _createSuper(AutoRowSize);\n\n function AutoRowSize(hotInstance) {\n var _this;\n\n _classCallCheck(this, AutoRowSize);\n\n _this = _super.call(this, hotInstance);\n /**\n * PhysicalIndexToValueMap to keep and track heights for physical row indexes.\n *\n * @private\n * @type {PhysicalIndexToValueMap}\n */\n\n _this.rowHeightsMap = void 0;\n /**\n * Columns header's height cache.\n *\n * @private\n * @type {number}\n */\n\n _this.headerHeight = null;\n /**\n * Instance of {@link GhostTable} for rows and columns size calculations.\n *\n * @private\n * @type {GhostTable}\n */\n\n _this.ghostTable = new GhostTable(_this.hot);\n /**\n * Instance of {@link SamplesGenerator} for generating samples necessary for rows height calculations.\n *\n * @private\n * @type {SamplesGenerator}\n */\n\n _this.samplesGenerator = new SamplesGenerator(function (row, col) {\n var cellValue;\n\n if (row >= 0) {\n cellValue = _this.hot.getDataAtCell(row, col);\n } else if (row === -1) {\n cellValue = _this.hot.getColHeader(col);\n }\n\n return {\n value: cellValue\n };\n });\n /**\n * `true` if only the first calculation was performed.\n *\n * @private\n * @type {boolean}\n */\n\n _this.firstCalculation = true;\n /**\n * `true` if the size calculation is in progress.\n *\n * @type {boolean}\n */\n\n _this.inProgress = false;\n /**\n * Number of already measured rows (we already know their sizes).\n *\n * @type {number}\n */\n\n _this.measuredRows = 0;\n /**\n * PhysicalIndexToValueMap to keep and track heights for physical row indexes.\n *\n * @private\n * @type {PhysicalIndexToValueMap}\n */\n\n _this.rowHeightsMap = new IndexToValueMap();\n\n _this.hot.rowIndexMapper.registerMap(ROW_WIDTHS_MAP_NAME, _this.rowHeightsMap); // Leave the listener active to allow auto-sizing the rows when the plugin is disabled.\n // This is necesseary for height recalculation for resize handler doubleclick (ManualRowResize).\n\n\n _this.addHook('beforeRowResize', function (size, row, isDblClick) {\n return _this.onBeforeRowResize(size, row, isDblClick);\n });\n\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link AutoRowSize#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(AutoRowSize, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n var settings = this.hot.getSettings()[PLUGIN_KEY];\n return settings === true || isObject(settings);\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.setSamplingOptions();\n this.addHook('afterLoadData', function () {\n return _this2.onAfterLoadData();\n });\n this.addHook('beforeChange', function (changes) {\n return _this2.onBeforeChange(changes);\n });\n this.addHook('beforeColumnResize', function () {\n return _this2.recalculateAllRowsHeight();\n });\n this.addHook('beforeRender', function (force) {\n return _this2.onBeforeRender(force);\n });\n this.addHook('modifyRowHeight', function (height, row) {\n return _this2.getRowHeight(row, height);\n });\n this.addHook('modifyColumnHeaderHeight', function () {\n return _this2.getColumnHeaderHeight();\n });\n\n _get(_getPrototypeOf(AutoRowSize.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n var _this3 = this;\n\n this.headerHeight = null;\n\n _get(_getPrototypeOf(AutoRowSize.prototype), \"disablePlugin\", this).call(this); // Leave the listener active to allow auto-sizing the rows when the plugin is disabled.\n // This is necesseary for height recalculation for resize handler doubleclick (ManualRowResize).\n\n\n this.addHook('beforeRowResize', function (size, row, isDblClick) {\n return _this3.onBeforeRowResize(size, row, isDblClick);\n });\n }\n /**\n * Calculate a given rows height.\n *\n * @param {number|object} rowRange Row index or an object with `from` and `to` indexes as a range.\n * @param {number|object} colRange Column index or an object with `from` and `to` indexes as a range.\n * @param {boolean} [force=false] If `true` the calculation will be processed regardless of whether the width exists in the cache.\n */\n\n }, {\n key: \"calculateRowsHeight\",\n value: function calculateRowsHeight() {\n var _this4 = this;\n\n var rowRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n from: 0,\n to: this.hot.countRows() - 1\n };\n var colRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n from: 0,\n to: this.hot.countCols() - 1\n };\n var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // eslint-disable-line max-len\n\n var rowsRange = typeof rowRange === 'number' ? {\n from: rowRange,\n to: rowRange\n } : rowRange;\n var columnsRange = typeof colRange === 'number' ? {\n from: colRange,\n to: colRange\n } : colRange;\n\n if (this.hot.getColHeader(0) !== null) {\n var samples = this.samplesGenerator.generateRowSamples(-1, columnsRange);\n this.ghostTable.addColumnHeadersRow(samples.get(-1));\n }\n\n rangeEach(rowsRange.from, rowsRange.to, function (row) {\n // For rows we must calculate row height even when user had set height value manually.\n // We can shrink column but cannot shrink rows!\n if (force || _this4.rowHeightsMap.getValueAtIndex(row) === null) {\n var _samples = _this4.samplesGenerator.generateRowSamples(row, columnsRange);\n\n arrayEach(_samples, function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n rowIndex = _ref2[0],\n sample = _ref2[1];\n\n return _this4.ghostTable.addRow(rowIndex, sample);\n });\n }\n });\n\n if (this.ghostTable.rows.length) {\n this.hot.batchExecution(function () {\n _this4.ghostTable.getHeights(function (row, height) {\n if (row < 0) {\n _this4.headerHeight = height;\n } else {\n _this4.rowHeightsMap.setValueAtIndex(_this4.hot.toPhysicalRow(row), height);\n }\n });\n }, true);\n this.measuredRows = rowsRange.to + 1;\n this.ghostTable.clean();\n }\n }\n /**\n * Calculate all rows heights. The calculated row will be cached in the {@link AutoRowSize#heights} property.\n * To retrieve height for specified row use {@link AutoRowSize#getRowHeight} method.\n *\n * @param {object|number} colRange Row index or an object with `from` and `to` properties which define row range.\n */\n\n }, {\n key: \"calculateAllRowsHeight\",\n value: function calculateAllRowsHeight() {\n var _this5 = this;\n\n var colRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n from: 0,\n to: this.hot.countCols() - 1\n };\n var current = 0;\n var length = this.hot.countRows() - 1;\n var timer = null;\n this.inProgress = true;\n\n var loop = function loop() {\n // When hot was destroyed after calculating finished cancel frame\n if (!_this5.hot) {\n cancelAnimationFrame(timer);\n _this5.inProgress = false;\n return;\n }\n\n _this5.calculateRowsHeight({\n from: current,\n to: Math.min(current + AutoRowSize.CALCULATION_STEP, length)\n }, colRange);\n\n current = current + AutoRowSize.CALCULATION_STEP + 1;\n\n if (current < length) {\n timer = requestAnimationFrame(loop);\n } else {\n cancelAnimationFrame(timer);\n _this5.inProgress = false; // @TODO Should call once per render cycle, currently fired separately in different plugins\n\n _this5.hot.view.adjustElementsSize(true); // tmp\n\n\n if (_this5.hot.view.wt.wtOverlays.leftOverlay.needFullRender) {\n _this5.hot.view.wt.wtOverlays.leftOverlay.clone.draw();\n }\n }\n };\n\n var syncLimit = this.getSyncCalculationLimit(); // sync\n\n if (this.firstCalculation && syncLimit >= 0) {\n this.calculateRowsHeight({\n from: 0,\n to: syncLimit\n }, colRange);\n this.firstCalculation = false;\n current = syncLimit + 1;\n } // async\n\n\n if (current < length) {\n loop();\n } else {\n this.inProgress = false;\n this.hot.view.adjustElementsSize(false);\n }\n }\n /**\n * Sets the sampling options.\n *\n * @private\n */\n\n }, {\n key: \"setSamplingOptions\",\n value: function setSamplingOptions() {\n var setting = this.hot.getSettings()[PLUGIN_KEY];\n var samplingRatio = setting && hasOwnProperty(setting, 'samplingRatio') ? setting.samplingRatio : void 0;\n var allowSampleDuplicates = setting && hasOwnProperty(setting, 'allowSampleDuplicates') ? setting.allowSampleDuplicates : void 0;\n\n if (samplingRatio && !isNaN(samplingRatio)) {\n this.samplesGenerator.setSampleCount(parseInt(samplingRatio, 10));\n }\n\n if (allowSampleDuplicates) {\n this.samplesGenerator.setAllowDuplicates(allowSampleDuplicates);\n }\n }\n /**\n * Recalculates all rows height (overwrite cache values).\n */\n\n }, {\n key: \"recalculateAllRowsHeight\",\n value: function recalculateAllRowsHeight() {\n if (isVisible(this.hot.view.wt.wtTable.TABLE)) {\n this.clearCache();\n this.calculateAllRowsHeight();\n }\n }\n /**\n * Gets value which tells how many rows should be calculated synchronously (rest of the rows will be calculated\n * asynchronously). The limit is calculated based on `syncLimit` set to autoRowSize option (see {@link Options#autoRowSize}).\n *\n * @returns {number}\n */\n\n }, {\n key: \"getSyncCalculationLimit\",\n value: function getSyncCalculationLimit() {\n var settings = this.hot.getSettings()[PLUGIN_KEY];\n /* eslint-disable no-bitwise */\n\n var limit = AutoRowSize.SYNC_CALCULATION_LIMIT;\n var rowsLimit = this.hot.countRows() - 1;\n\n if (isObject(settings)) {\n limit = settings.syncLimit;\n\n if (isPercentValue(limit)) {\n limit = valueAccordingPercent(rowsLimit, limit);\n } else {\n // Force to Number\n limit >>= 0;\n }\n }\n\n return Math.min(limit, rowsLimit);\n }\n /**\n * Gets the calculated row height.\n *\n * @param {number} row Visual row index.\n * @param {number} [defaultHeight] Default row height. It will be picked up if no calculated height found.\n * @returns {number}\n */\n\n }, {\n key: \"getRowHeight\",\n value: function getRowHeight(row) {\n var defaultHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : void 0;\n var cachedHeight = row < 0 ? this.headerHeight : this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(row));\n var height = defaultHeight;\n\n if (cachedHeight !== null && cachedHeight > (defaultHeight || 0)) {\n height = cachedHeight;\n }\n\n return height;\n }\n /**\n * Get the calculated column header height.\n *\n * @returns {number|undefined}\n */\n\n }, {\n key: \"getColumnHeaderHeight\",\n value: function getColumnHeaderHeight() {\n return this.headerHeight;\n }\n /**\n * Get the first visible row.\n *\n * @returns {number} Returns row index, -1 if table is not rendered or if there are no rows to base the the calculations on.\n */\n\n }, {\n key: \"getFirstVisibleRow\",\n value: function getFirstVisibleRow() {\n var wot = this.hot.view.wt;\n\n if (wot.wtViewport.rowsVisibleCalculator) {\n return wot.wtTable.getFirstVisibleRow();\n }\n\n if (wot.wtViewport.rowsRenderCalculator) {\n return wot.wtTable.getFirstRenderedRow();\n }\n\n return -1;\n }\n /**\n * Gets the last visible row.\n *\n * @returns {number} Returns row index or -1 if table is not rendered.\n */\n\n }, {\n key: \"getLastVisibleRow\",\n value: function getLastVisibleRow() {\n var wot = this.hot.view.wt;\n\n if (wot.wtViewport.rowsVisibleCalculator) {\n return wot.wtTable.getLastVisibleRow();\n }\n\n if (wot.wtViewport.rowsRenderCalculator) {\n return wot.wtTable.getLastRenderedRow();\n }\n\n return -1;\n }\n /**\n * Clears cached heights.\n */\n\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.headerHeight = null;\n this.rowHeightsMap.init();\n }\n /**\n * Clears cache by range.\n *\n * @param {object|number} range Row index or an object with `from` and `to` properties which define row range.\n */\n\n }, {\n key: \"clearCacheByRange\",\n value: function clearCacheByRange(range) {\n var _this6 = this;\n\n var _ref3 = typeof range === 'number' ? {\n from: range,\n to: range\n } : range,\n from = _ref3.from,\n to = _ref3.to;\n\n this.hot.batchExecution(function () {\n rangeEach(Math.min(from, to), Math.max(from, to), function (row) {\n _this6.rowHeightsMap.setValueAtIndex(row, null);\n });\n }, true);\n }\n /**\n * Checks if all heights were calculated. If not then return `true` (need recalculate).\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isNeedRecalculate\",\n value: function isNeedRecalculate() {\n return !!arrayFilter(this.rowHeightsMap.getValues().slice(0, this.measuredRows), function (item) {\n return item === null;\n }).length;\n }\n /**\n * On before render listener.\n *\n * @private\n */\n\n }, {\n key: \"onBeforeRender\",\n value: function onBeforeRender() {\n var force = this.hot.renderCall;\n var fixedRowsBottom = this.hot.getSettings().fixedRowsBottom;\n var firstVisibleRow = this.getFirstVisibleRow();\n var lastVisibleRow = this.getLastVisibleRow();\n\n if (firstVisibleRow === -1 || lastVisibleRow === -1) {\n return;\n }\n\n this.calculateRowsHeight({\n from: firstVisibleRow,\n to: lastVisibleRow\n }, void 0, force); // Calculate rows height synchronously for bottom overlay\n\n if (fixedRowsBottom) {\n var totalRows = this.hot.countRows() - 1;\n this.calculateRowsHeight({\n from: totalRows - fixedRowsBottom,\n to: totalRows\n });\n }\n\n if (this.isNeedRecalculate() && !this.inProgress) {\n this.calculateAllRowsHeight();\n }\n }\n /**\n * On before row move listener.\n *\n * @private\n * @param {number} from Row index where was grabbed.\n * @param {number} to Destination row index.\n */\n\n }, {\n key: \"onBeforeRowMove\",\n value: function onBeforeRowMove(from, to) {\n this.clearCacheByRange({\n from: from,\n to: to\n });\n this.calculateAllRowsHeight();\n }\n /**\n * On before row resize listener.\n *\n * @private\n * @param {number} size The size of the current row index.\n * @param {number} row Current row index.\n * @param {boolean} isDblClick Indicates if the resize was triggered by doubleclick.\n * @returns {number}\n */\n\n }, {\n key: \"onBeforeRowResize\",\n value: function onBeforeRowResize(size, row, isDblClick) {\n var newSize = size;\n\n if (isDblClick) {\n this.calculateRowsHeight(row, void 0, true);\n newSize = this.getRowHeight(row);\n }\n\n return newSize;\n }\n /**\n * On after load data listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData() {\n var _this7 = this;\n\n if (this.hot.view) {\n this.recalculateAllRowsHeight();\n } else {\n // first load - initialization\n setTimeout(function () {\n if (_this7.hot) {\n _this7.recalculateAllRowsHeight();\n }\n }, 0);\n }\n }\n /**\n * On before change listener.\n *\n * @private\n * @param {Array} changes 2D array containing information about each of the edited cells.\n */\n\n }, {\n key: \"onBeforeChange\",\n value: function onBeforeChange(changes) {\n var range = null;\n\n if (changes.length === 1) {\n range = changes[0][0];\n } else if (changes.length > 1) {\n range = {\n from: changes[0][0],\n to: changes[changes.length - 1][0]\n };\n }\n\n if (range !== null) {\n this.clearCacheByRange(range);\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.rowIndexMapper.unregisterMap(ROW_WIDTHS_MAP_NAME);\n this.ghostTable.clean();\n\n _get(_getPrototypeOf(AutoRowSize.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }, {\n key: \"CALCULATION_STEP\",\n get: function get() {\n return 50;\n }\n }, {\n key: \"SYNC_CALCULATION_LIMIT\",\n get: function get() {\n return 500;\n }\n }]);\n\n return AutoRowSize;\n}(BasePlugin);","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { getDecreasedIndexes, getIncreasedIndexes } from \"./actionsOnIndexes.mjs\";\nimport { getListWithInsertedItems as sequenceStrategyInsert, getListWithRemovedItems as sequenceStrategyRemove } from \"./indexesSequence.mjs\";\nimport { getListWithInsertedItems as physicalStrategyInsert, getListWithRemovedItems as physicalStrategyRemove } from \"./physicallyIndexed.mjs\";\nvar alterStrategies = new Map([['indexesSequence', {\n getListWithInsertedItems: sequenceStrategyInsert,\n getListWithRemovedItems: sequenceStrategyRemove\n}], ['physicallyIndexed', {\n getListWithInsertedItems: physicalStrategyInsert,\n getListWithRemovedItems: physicalStrategyRemove\n}]]);\n\nvar alterUtilsFactory = function alterUtilsFactory(indexationStrategy) {\n if (alterStrategies.has(indexationStrategy) === false) {\n throw new Error(\"Alter strategy with ID '\".concat(indexationStrategy, \"' does not exist.\"));\n }\n\n return alterStrategies.get(indexationStrategy);\n};\n\nexport { getDecreasedIndexes, getIncreasedIndexes, alterUtilsFactory };","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { IndexMap, alterUtilsFactory, getDecreasedIndexes, getIncreasedIndexes } from \"../../../translations/index.mjs\";\n\nvar _alterUtilsFactory = alterUtilsFactory('physicallyIndexed'),\n getListWithInsertedItems = _alterUtilsFactory.getListWithInsertedItems,\n getListWithRemovedItems = _alterUtilsFactory.getListWithRemovedItems;\n/**\n * Map from physical index to another index.\n */\n\n\nvar LooseBindsMap = /*#__PURE__*/function (_IndexMap) {\n _inherits(LooseBindsMap, _IndexMap);\n\n var _super = _createSuper(LooseBindsMap);\n\n function LooseBindsMap() {\n _classCallCheck(this, LooseBindsMap);\n\n return _super.call(this, function (index) {\n return index;\n });\n }\n /**\n * Add values to list and reorganize.\n *\n * @private\n * @param {number} insertionIndex Position inside the list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n\n\n _createClass(LooseBindsMap, [{\n key: \"insert\",\n value: function insert(insertionIndex, insertedIndexes) {\n var listAfterUpdate = getIncreasedIndexes(this.indexedValues, insertedIndexes);\n this.indexedValues = getListWithInsertedItems(listAfterUpdate, insertionIndex, insertedIndexes, this.initValueOrFn);\n\n _get(_getPrototypeOf(LooseBindsMap.prototype), \"insert\", this).call(this, insertionIndex, insertedIndexes);\n }\n /**\n * Remove values from the list and reorganize.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n\n }, {\n key: \"remove\",\n value: function remove(removedIndexes) {\n var listAfterUpdate = getListWithRemovedItems(this.indexedValues, removedIndexes);\n this.indexedValues = getDecreasedIndexes(listAfterUpdate, removedIndexes);\n\n _get(_getPrototypeOf(LooseBindsMap.prototype), \"remove\", this).call(this, removedIndexes);\n }\n }]);\n\n return LooseBindsMap;\n}(IndexMap);\n\nexport default LooseBindsMap;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { IndexMap, alterUtilsFactory } from \"../../../translations/index.mjs\";\n\nvar _alterUtilsFactory = alterUtilsFactory('physicallyIndexed'),\n getListWithInsertedItems = _alterUtilsFactory.getListWithInsertedItems,\n getListWithRemovedItems = _alterUtilsFactory.getListWithRemovedItems;\n/**\n * Map from physical index to another index.\n */\n\n\nvar StrictBindsMap = /*#__PURE__*/function (_IndexMap) {\n _inherits(StrictBindsMap, _IndexMap);\n\n var _super = _createSuper(StrictBindsMap);\n\n function StrictBindsMap() {\n _classCallCheck(this, StrictBindsMap);\n\n return _super.call(this, function (index) {\n return index;\n });\n }\n /**\n * Add values to list and reorganize.\n *\n * @private\n * @param {number} insertionIndex Position inside the list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n\n\n _createClass(StrictBindsMap, [{\n key: \"insert\",\n value: function insert(insertionIndex, insertedIndexes) {\n var _this = this;\n\n this.indexedValues = getListWithInsertedItems(this.indexedValues, insertionIndex, insertedIndexes, function (_, ordinalNumber) {\n return _this.getNextValue(ordinalNumber);\n });\n\n _get(_getPrototypeOf(StrictBindsMap.prototype), \"insert\", this).call(this, insertionIndex, insertedIndexes);\n }\n /**\n * Remove values from the list and reorganize.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n\n }, {\n key: \"remove\",\n value: function remove(removedIndexes) {\n this.indexedValues = getListWithRemovedItems(this.indexedValues, removedIndexes);\n\n _get(_getPrototypeOf(StrictBindsMap.prototype), \"remove\", this).call(this, removedIndexes);\n }\n /**\n * Get next values, which should be greater than actual maximum value in the list.\n *\n * @param {number} ordinalNumber Position in the list.\n * @returns {number}\n */\n\n }, {\n key: \"getNextValue\",\n value: function getNextValue(ordinalNumber) {\n return Math.max.apply(Math, _toConsumableArray(this.getValues())) + 1 + ordinalNumber;\n }\n }]);\n\n return StrictBindsMap;\n}(IndexMap);\n\nexport default StrictBindsMap;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport LooseBindsMap from \"./maps/looseBindsMap.mjs\";\nimport StrictBindsMap from \"./maps/strictBindsMap.mjs\";\nexport var PLUGIN_KEY = 'bindRowsWithHeaders';\nexport var PLUGIN_PRIORITY = 210;\nvar DEFAULT_BIND = 'loose';\nvar bindTypeToMapStrategy = new Map([['loose', LooseBindsMap], ['strict', StrictBindsMap]]);\n/**\n * @plugin BindRowsWithHeaders\n *\n * @description\n * Plugin allows binding the table rows with their headers.\n *\n * If the plugin is enabled, the table row headers will \"stick\" to the rows, when they are hidden/moved. Basically, if\n * at the initialization row 0 has a header titled \"A\", it will have it no matter what you do with the table.\n *\n * @example\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * // enable plugin\n * bindRowsWithHeaders: true\n * });\n * ```\n */\n\nexport var BindRowsWithHeaders = /*#__PURE__*/function (_BasePlugin) {\n _inherits(BindRowsWithHeaders, _BasePlugin);\n\n var _super = _createSuper(BindRowsWithHeaders);\n\n function BindRowsWithHeaders(hotInstance) {\n var _this;\n\n _classCallCheck(this, BindRowsWithHeaders);\n\n _this = _super.call(this, hotInstance);\n /**\n * Plugin indexes cache.\n *\n * @private\n * @type {null|IndexMap}\n */\n\n _this.headerIndexes = null;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link BindRowsWithHeaders#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(BindRowsWithHeaders, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var bindType = this.hot.getSettings()[PLUGIN_KEY];\n\n if (typeof bindType !== 'string') {\n bindType = DEFAULT_BIND;\n }\n\n var MapStrategy = bindTypeToMapStrategy.get(bindType);\n this.headerIndexes = this.hot.rowIndexMapper.registerMap('bindRowsWithHeaders', new MapStrategy());\n this.addHook('modifyRowHeader', function (row) {\n return _this2.onModifyRowHeader(row);\n });\n\n _get(_getPrototypeOf(BindRowsWithHeaders.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.hot.rowIndexMapper.unregisterMap('bindRowsWithHeaders');\n\n _get(_getPrototypeOf(BindRowsWithHeaders.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * On modify row header listener.\n *\n * @private\n * @param {number} row Row index.\n * @returns {number}\n */\n\n }, {\n key: \"onModifyRowHeader\",\n value: function onModifyRowHeader(row) {\n return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(row));\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.rowIndexMapper.unregisterMap('bindRowsWithHeaders');\n\n _get(_getPrototypeOf(BindRowsWithHeaders.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return BindRowsWithHeaders;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n descriptor.value = value;\n }\n\n return value;\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { arrayEach, arrayFilter, arrayUnique } from \"../../helpers/array.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { warn } from \"../../helpers/console.mjs\";\nimport { addClass, hasClass, fastInnerText } from \"../../helpers/dom/element.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { stopImmediatePropagation } from \"../../helpers/dom/event.mjs\";\nimport { HidingMap } from \"../../translations/index.mjs\";\nexport var PLUGIN_KEY = 'collapsibleColumns';\nexport var PLUGIN_PRIORITY = 290;\nvar actionDictionary = new Map([['collapse', {\n hideColumn: true,\n beforeHook: 'beforeColumnCollapse',\n afterHook: 'afterColumnCollapse'\n}], ['expand', {\n hideColumn: false,\n beforeHook: 'beforeColumnExpand',\n afterHook: 'afterColumnExpand'\n}]]);\n/**\n * @plugin CollapsibleColumns\n *\n * @description\n * The {@link CollapsibleColumns} plugin allows collapsing of columns, covered by a header with the `colspan` property defined.\n *\n * Clicking the \"collapse/expand\" button collapses (or expands) all \"child\" headers except the first one.\n *\n * Setting the {@link Options#collapsibleColumns} property to `true` will display a \"collapse/expand\" button in every header\n * with a defined `colspan` property.\n *\n * To limit this functionality to a smaller group of headers, define the `collapsibleColumns` property as an array\n * of objects, as in the example below.\n *\n * @example\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: generateDataObj(),\n * colHeaders: true,\n * rowHeaders: true,\n * nestedHeaders: true,\n * // enable plugin\n * collapsibleColumns: true,\n * });\n *\n * // or\n * const hot = new Handsontable(container, {\n * data: generateDataObj(),\n * colHeaders: true,\n * rowHeaders: true,\n * nestedHeaders: true,\n * // enable and configure which columns can be collapsed\n * collapsibleColumns: [\n * {row: -4, col: 1, collapsible: true},\n * {row: -3, col: 5, collapsible: true}\n * ],\n * });\n * ```\n */\n\nvar _collapsedColumnsMap = new WeakMap();\n\nexport var CollapsibleColumns = /*#__PURE__*/function (_BasePlugin) {\n _inherits(CollapsibleColumns, _BasePlugin);\n\n var _super = _createSuper(CollapsibleColumns);\n\n function CollapsibleColumns() {\n var _this;\n\n _classCallCheck(this, CollapsibleColumns);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"nestedHeadersPlugin\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"eventManager\", new EventManager(_assertThisInitialized(_this)));\n\n _defineProperty(_assertThisInitialized(_this), \"headerStateManager\", null);\n\n _collapsedColumnsMap.set(_assertThisInitialized(_this), {\n writable: true,\n value: null\n });\n\n return _this;\n }\n\n _createClass(CollapsibleColumns, [{\n key: \"isEnabled\",\n value:\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link CollapsibleColumns#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var _this$hot$getSettings = this.hot.getSettings(),\n nestedHeaders = _this$hot$getSettings.nestedHeaders;\n\n if (!nestedHeaders) {\n warn('You need to configure the Nested Headers plugin in order to use collapsible headers.');\n }\n\n _classPrivateFieldSet(this, _collapsedColumnsMap, new HidingMap());\n\n this.hot.columnIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(this, _collapsedColumnsMap));\n this.nestedHeadersPlugin = this.hot.getPlugin('nestedHeaders');\n this.headerStateManager = this.nestedHeadersPlugin.getStateManager();\n this.addHook('init', function () {\n return _this2.onInit();\n });\n this.addHook('afterLoadData', function () {\n return _this2.onAfterLoadData.apply(_this2, arguments);\n });\n this.addHook('afterGetColHeader', function (col, TH) {\n return _this2.onAfterGetColHeader(col, TH);\n });\n this.addHook('beforeOnCellMouseDown', function (event, coords, TD) {\n return _this2.onBeforeOnCellMouseDown(event, coords, TD);\n });\n\n _get(_getPrototypeOf(CollapsibleColumns.prototype), \"enablePlugin\", this).call(this); // @TODO: Workaround for broken plugin initialization abstraction (#6806).\n\n\n this.updatePlugin();\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n // @TODO: Workaround for broken plugin initialization abstraction (#6806).\n if (!this.hot.view) {\n return;\n }\n\n if (!this.nestedHeadersPlugin.detectedOverlappedHeaders) {\n var _this$hot$getSettings2 = this.hot.getSettings(),\n collapsibleColumns = _this$hot$getSettings2.collapsibleColumns;\n\n if (typeof collapsibleColumns === 'boolean') {\n // Add `collapsible: true` attribute to all headers with colspan higher than 1.\n this.headerStateManager.mapState(function (headerSettings) {\n return {\n collapsible: headerSettings.origColspan > 1\n };\n });\n } else if (Array.isArray(collapsibleColumns)) {\n this.headerStateManager.mergeStateWith(collapsibleColumns);\n }\n }\n\n _get(_getPrototypeOf(CollapsibleColumns.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.hot.columnIndexMapper.unregisterMap(this.pluginName);\n\n _classPrivateFieldSet(this, _collapsedColumnsMap, null);\n\n this.nestedHeadersPlugin = null;\n this.clearButtons();\n\n _get(_getPrototypeOf(CollapsibleColumns.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Clears the expand/collapse buttons.\n *\n * @private\n */\n\n }, {\n key: \"clearButtons\",\n value: function clearButtons() {\n if (!this.hot.view) {\n return;\n }\n\n var headerLevels = this.hot.view.wt.getSetting('columnHeaders').length;\n var mainHeaders = this.hot.view.wt.wtTable.THEAD;\n var topHeaders = this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD;\n var topLeftCornerHeaders = this.hot.view.wt.wtOverlays.topLeftCornerOverlay ? this.hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.THEAD : null;\n\n var removeButton = function removeButton(button) {\n if (button) {\n button.parentNode.removeChild(button);\n }\n };\n\n rangeEach(0, headerLevels - 1, function (i) {\n var masterLevel = mainHeaders.childNodes[i];\n var topLevel = topHeaders.childNodes[i];\n var topLeftCornerLevel = topLeftCornerHeaders ? topLeftCornerHeaders.childNodes[i] : null;\n rangeEach(0, masterLevel.childNodes.length - 1, function (j) {\n var button = masterLevel.childNodes[j].querySelector('.collapsibleIndicator');\n removeButton(button);\n\n if (topLevel && topLevel.childNodes[j]) {\n button = topLevel.childNodes[j].querySelector('.collapsibleIndicator');\n removeButton(button);\n }\n\n if (topLeftCornerHeaders && topLeftCornerLevel && topLeftCornerLevel.childNodes[j]) {\n button = topLeftCornerLevel.childNodes[j].querySelector('.collapsibleIndicator');\n removeButton(button);\n }\n });\n }, true);\n }\n /**\n * Expands section at the provided coords.\n *\n * @param {object} coords Contains coordinates information. (`coords.row`, `coords.col`).\n */\n\n }, {\n key: \"expandSection\",\n value: function expandSection(coords) {\n this.toggleCollapsibleSection([coords], 'expand');\n }\n /**\n * Collapses section at the provided coords.\n *\n * @param {object} coords Contains coordinates information. (`coords.row`, `coords.col`).\n */\n\n }, {\n key: \"collapseSection\",\n value: function collapseSection(coords) {\n this.toggleCollapsibleSection([coords], 'collapse');\n }\n /**\n * Collapses or expand all collapsible sections, depending on the action parameter.\n *\n * @param {string} action 'collapse' or 'expand'.\n */\n\n }, {\n key: \"toggleAllCollapsibleSections\",\n value: function toggleAllCollapsibleSections(action) {\n var _this3 = this;\n\n var coords = this.headerStateManager.mapNodes(function (_ref) {\n var collapsible = _ref.collapsible,\n origColspan = _ref.origColspan,\n headerLevel = _ref.headerLevel,\n columnIndex = _ref.columnIndex;\n\n if (collapsible === true && origColspan > 1) {\n return {\n row: _this3.headerStateManager.levelToRowCoords(headerLevel),\n col: columnIndex\n };\n }\n });\n this.toggleCollapsibleSection(coords, action);\n }\n /**\n * Collapses all collapsible sections.\n */\n\n }, {\n key: \"collapseAll\",\n value: function collapseAll() {\n this.toggleAllCollapsibleSections('collapse');\n }\n /**\n * Expands all collapsible sections.\n */\n\n }, {\n key: \"expandAll\",\n value: function expandAll() {\n this.toggleAllCollapsibleSections('expand');\n }\n /**\n * Collapses/Expands a section.\n *\n * @param {Array} coords Array of coords - section coordinates.\n * @param {string} [action] Action definition ('collapse' or 'expand').\n * @fires Hooks#beforeColumnCollapse\n * @fires Hooks#beforeColumnExpand\n * @fires Hooks#afterColumnCollapse\n * @fires Hooks#afterColumnExpand\n */\n\n }, {\n key: \"toggleCollapsibleSection\",\n value: function toggleCollapsibleSection(coords, action) {\n var _this4 = this;\n\n if (!actionDictionary.has(action)) {\n throw new Error(\"Unsupported action is passed (\".concat(action, \").\"));\n }\n\n if (!Array.isArray(coords)) {\n return;\n } // Ignore coordinates which points to the cells range.\n\n\n var filteredCoords = arrayFilter(coords, function (_ref2) {\n var row = _ref2.row;\n return row < 0;\n });\n var isActionPossible = filteredCoords.length > 0;\n arrayEach(filteredCoords, function (_ref3) {\n var row = _ref3.row,\n column = _ref3.col;\n\n var _this4$headerStateMan = _this4.headerStateManager.getHeaderSettings(row, column),\n collapsible = _this4$headerStateMan.collapsible,\n isCollapsed = _this4$headerStateMan.isCollapsed;\n\n if (!collapsible || isCollapsed && action === 'collapse' || !isCollapsed && action === 'expand') {\n isActionPossible = false;\n return false;\n }\n });\n var nodeModRollbacks = [];\n var affectedColumnsIndexes = [];\n\n if (isActionPossible) {\n arrayEach(filteredCoords, function (_ref4) {\n var row = _ref4.row,\n column = _ref4.col;\n\n var _this4$headerStateMan2 = _this4.headerStateManager.triggerNodeModification(action, row, column),\n colspanCompensation = _this4$headerStateMan2.colspanCompensation,\n affectedColumns = _this4$headerStateMan2.affectedColumns,\n rollbackModification = _this4$headerStateMan2.rollbackModification;\n\n if (colspanCompensation > 0) {\n affectedColumnsIndexes.push.apply(affectedColumnsIndexes, _toConsumableArray(affectedColumns));\n nodeModRollbacks.push(rollbackModification);\n }\n });\n }\n\n var currentCollapsedColumns = this.getCollapsedColumns();\n var destinationCollapsedColumns = [];\n\n if (action === 'collapse') {\n destinationCollapsedColumns = arrayUnique([].concat(_toConsumableArray(currentCollapsedColumns), affectedColumnsIndexes));\n } else if (action === 'expand') {\n destinationCollapsedColumns = arrayFilter(currentCollapsedColumns, function (index) {\n return !affectedColumnsIndexes.includes(index);\n });\n }\n\n var actionTranslator = actionDictionary.get(action);\n var isActionAllowed = this.hot.runHooks(actionTranslator.beforeHook, currentCollapsedColumns, destinationCollapsedColumns, isActionPossible);\n\n if (isActionAllowed === false) {\n // Rollback all header nodes modification (collapse or expand).\n arrayEach(nodeModRollbacks, function (nodeModRollback) {\n nodeModRollback();\n });\n return;\n }\n\n this.hot.batchExecution(function () {\n arrayEach(affectedColumnsIndexes, function (visualColumn) {\n _classPrivateFieldGet(_this4, _collapsedColumnsMap).setValueAtIndex(_this4.hot.toPhysicalColumn(visualColumn), actionTranslator.hideColumn);\n });\n }, true);\n var isActionPerformed = this.getCollapsedColumns().length !== currentCollapsedColumns.length;\n this.hot.runHooks(actionTranslator.afterHook, currentCollapsedColumns, destinationCollapsedColumns, isActionPossible, isActionPerformed);\n this.hot.render();\n this.hot.view.adjustElementsSize(true);\n }\n /**\n * Gets an array of physical indexes of collapsed columns.\n *\n * @private\n * @returns {number[]}\n */\n\n }, {\n key: \"getCollapsedColumns\",\n value: function getCollapsedColumns() {\n return _classPrivateFieldGet(this, _collapsedColumnsMap).getHiddenIndexes();\n }\n /**\n * Generates the indicator element.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} column Column index.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"generateIndicator\",\n value: function generateIndicator(row, column) {\n var divEl = this.hot.rootDocument.createElement('div');\n var columnSettings = this.headerStateManager.getHeaderSettings(row, column);\n addClass(divEl, 'collapsibleIndicator');\n\n if (columnSettings.isCollapsed) {\n addClass(divEl, 'collapsed');\n fastInnerText(divEl, '+');\n } else {\n addClass(divEl, 'expanded');\n fastInnerText(divEl, '-');\n }\n\n return divEl;\n }\n /**\n * Adds the indicator to the headers.\n *\n * @private\n * @param {number} column Column index.\n * @param {HTMLElement} TH TH element.\n */\n\n }, {\n key: \"onAfterGetColHeader\",\n value: function onAfterGetColHeader(column, TH) {\n var TR = TH.parentNode;\n var THEAD = TR.parentNode;\n var row = -1 * THEAD.childNodes.length + Array.prototype.indexOf.call(THEAD.childNodes, TR);\n\n var _this$headerStateMana = this.headerStateManager.getHeaderSettings(row, column),\n collapsible = _this$headerStateMana.collapsible,\n origColspan = _this$headerStateMana.origColspan;\n\n if (collapsible && origColspan > 1 && column >= this.hot.getSettings().fixedColumnsLeft) {\n var button = this.generateIndicator(row, column);\n TH.querySelector('div:first-child').appendChild(button);\n }\n }\n /**\n * Indicator mouse event callback.\n *\n * @private\n * @param {object} event Mouse event.\n * @param {object} coords Event coordinates.\n */\n\n }, {\n key: \"onBeforeOnCellMouseDown\",\n value: function onBeforeOnCellMouseDown(event, coords) {\n if (hasClass(event.target, 'collapsibleIndicator')) {\n if (hasClass(event.target, 'expanded')) {\n this.eventManager.fireEvent(event.target, 'mouseup');\n this.toggleCollapsibleSection([coords], 'collapse');\n } else if (hasClass(event.target, 'collapsed')) {\n this.eventManager.fireEvent(event.target, 'mouseup');\n this.toggleCollapsibleSection([coords], 'expand');\n }\n\n stopImmediatePropagation(event);\n }\n }\n /**\n * Updates the plugin state after HoT initialization.\n *\n * @private\n */\n\n }, {\n key: \"onInit\",\n value: function onInit() {\n // @TODO: Workaround for broken plugin initialization abstraction (#6806).\n this.updatePlugin();\n }\n /**\n * Updates the plugin state after new dataset load.\n *\n * @private\n * @param {Array[]} sourceData Array of arrays or array of objects containing data.\n * @param {boolean} initialLoad Flag that determines whether the data has been loaded\n * during the initialization.\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData(sourceData, initialLoad) {\n if (!initialLoad) {\n this.updatePlugin();\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n _classPrivateFieldSet(this, _collapsedColumnsMap, null);\n\n this.hot.columnIndexMapper.unregisterMap(this.pluginName);\n\n _get(_getPrototypeOf(CollapsibleColumns.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }, {\n key: \"PLUGIN_DEPS\",\n get: function get() {\n return ['plugin:NestedHeaders'];\n }\n /**\n * Cached reference to the NestedHeaders plugin.\n *\n * @private\n * @type {NestedHeaders}\n */\n\n }]);\n\n return CollapsibleColumns;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport IndexMap from \"./indexMap.mjs\";\nimport { getListWithRemovedItems, getListWithInsertedItems } from \"./utils/physicallyIndexed.mjs\";\nimport { getListWithRemovedItems as getListWithoutIndexes } from \"./utils/indexesSequence.mjs\";\nimport { getDecreasedIndexes, getIncreasedIndexes } from \"./utils/actionsOnIndexes.mjs\";\nimport { isFunction } from \"../../helpers/function.mjs\";\n/**\n * Map for storing mappings from an physical index to a value. Those entries are linked and stored in a certain order.\n *\n * It does not update stored values on remove/add row or column action. Otherwise, order of entries is updated after\n * such changes.\n */\n\nvar LinkedPhysicalIndexToValueMap = /*#__PURE__*/function (_IndexMap) {\n _inherits(LinkedPhysicalIndexToValueMap, _IndexMap);\n\n var _super = _createSuper(LinkedPhysicalIndexToValueMap);\n\n function LinkedPhysicalIndexToValueMap() {\n var _this;\n\n _classCallCheck(this, LinkedPhysicalIndexToValueMap);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"orderOfIndexes\", []);\n\n return _this;\n }\n\n _createClass(LinkedPhysicalIndexToValueMap, [{\n key: \"getValues\",\n value:\n /**\n * Get full list of ordered values for particular indexes.\n *\n * @returns {Array}\n */\n function getValues() {\n var _this2 = this;\n\n return this.orderOfIndexes.map(function (physicalIndex) {\n return _this2.indexedValues[physicalIndex];\n });\n }\n /**\n * Set new values for particular indexes. Entries are linked and stored in a certain order.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @param {Array} values List of set values.\n */\n\n }, {\n key: \"setValues\",\n value: function setValues(values) {\n this.orderOfIndexes = _toConsumableArray(Array(values.length).keys());\n\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"setValues\", this).call(this, values);\n }\n /**\n * Set value at index and add it to the linked list of entries. Entries are stored in a certain order.\n *\n * Note: Value will be added at the end of the queue.\n *\n * @param {number} index The index.\n * @param {*} value The value to save.\n * @param {number} position Position to which entry will be added.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"setValueAtIndex\",\n value: function setValueAtIndex(index, value) {\n var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.orderOfIndexes.length;\n\n if (index < this.indexedValues.length) {\n this.indexedValues[index] = value;\n\n if (this.orderOfIndexes.includes(index) === false) {\n this.orderOfIndexes.splice(position, 0, index);\n }\n\n this.runLocalHooks('change');\n return true;\n }\n\n return false;\n }\n /**\n * Clear value for particular index.\n *\n * @param {number} physicalIndex Physical index.\n */\n\n }, {\n key: \"clearValue\",\n value: function clearValue(physicalIndex) {\n this.orderOfIndexes = getListWithoutIndexes(this.orderOfIndexes, [physicalIndex]);\n\n if (isFunction(this.initValueOrFn)) {\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"setValueAtIndex\", this).call(this, physicalIndex, this.initValueOrFn(physicalIndex));\n } else {\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"setValueAtIndex\", this).call(this, physicalIndex, this.initValueOrFn);\n }\n }\n /**\n * Get length of the index map.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLength\",\n value: function getLength() {\n return this.orderOfIndexes.length;\n }\n /**\n * Set default values for elements from `0` to `n`, where `n` is equal to the handled variable.\n *\n * Note: Please keep in mind that `change` hook triggered by the method may not update cache of a collection immediately.\n *\n * @private\n * @param {number} [length] Length of list.\n */\n\n }, {\n key: \"setDefaultValues\",\n value: function setDefaultValues() {\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.indexedValues.length;\n this.orderOfIndexes.length = 0;\n\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"setDefaultValues\", this).call(this, length);\n }\n /**\n * Add values to list and reorganize. It updates list of indexes related to ordered values.\n *\n * @private\n * @param {number} insertionIndex Position inside the list.\n * @param {Array} insertedIndexes List of inserted indexes.\n */\n\n }, {\n key: \"insert\",\n value: function insert(insertionIndex, insertedIndexes) {\n this.indexedValues = getListWithInsertedItems(this.indexedValues, insertionIndex, insertedIndexes, this.initValueOrFn);\n this.orderOfIndexes = getIncreasedIndexes(this.orderOfIndexes, insertedIndexes);\n\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"insert\", this).call(this, insertionIndex, insertedIndexes);\n }\n /**\n * Remove values from the list and reorganize. It updates list of indexes related to ordered values.\n *\n * @private\n * @param {Array} removedIndexes List of removed indexes.\n */\n\n }, {\n key: \"remove\",\n value: function remove(removedIndexes) {\n this.indexedValues = getListWithRemovedItems(this.indexedValues, removedIndexes);\n this.orderOfIndexes = getListWithoutIndexes(this.orderOfIndexes, removedIndexes);\n this.orderOfIndexes = getDecreasedIndexes(this.orderOfIndexes, removedIndexes);\n\n _get(_getPrototypeOf(LinkedPhysicalIndexToValueMap.prototype), \"remove\", this).call(this, removedIndexes);\n }\n /**\n * Get every entry containing index and value, respecting order of indexes.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getEntries\",\n value: function getEntries() {\n var _this3 = this;\n\n return this.orderOfIndexes.map(function (physicalIndex) {\n return [physicalIndex, _this3.getValueAtIndex(physicalIndex)];\n });\n }\n }]);\n\n return LinkedPhysicalIndexToValueMap;\n}(IndexMap);\n\nexport default LinkedPhysicalIndexToValueMap;","import \"core-js/modules/es.array.find-index.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.map.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { isObject, objectEach } from \"../../helpers/object.mjs\";\nimport { LinkedPhysicalIndexToValueMap as IndexToValueMap } from \"../../translations/index.mjs\";\nimport { isDefined } from \"../../helpers/mixed.mjs\";\nvar inheritedColumnProperties = ['sortEmptyCells', 'indicator', 'headerAction', 'compareFunctionFactory'];\nvar SORT_EMPTY_CELLS_DEFAULT = false;\nvar SHOW_SORT_INDICATOR_DEFAULT = true;\nvar HEADER_ACTION_DEFAULT = true;\n/**\n * Store and manages states of sorted columns.\n *\n * @class ColumnStatesManager\n * @plugin ColumnSorting\n */\n\nexport var ColumnStatesManager = /*#__PURE__*/function () {\n function ColumnStatesManager(hot, mapName) {\n _classCallCheck(this, ColumnStatesManager);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hot;\n /**\n * Index map storing sorting states for every column. ColumnStatesManager write and read to/from this element.\n *\n * @type {LinkedPhysicalIndexToValueMap}\n */\n\n this.sortingStates = new IndexToValueMap();\n /**\n * Determines whether we should sort empty cells.\n *\n * @type {boolean}\n */\n\n this.sortEmptyCells = SORT_EMPTY_CELLS_DEFAULT;\n /**\n * Determines whether indicator should be visible (for sorted columns).\n *\n * @type {boolean}\n */\n\n this.indicator = SHOW_SORT_INDICATOR_DEFAULT;\n /**\n * Determines whether click on the header perform sorting.\n *\n * @type {boolean}\n */\n\n this.headerAction = HEADER_ACTION_DEFAULT;\n /**\n * Determines compare function factory. Method get as parameters `sortOder` and `columnMeta` and return compare function.\n */\n\n this.compareFunctionFactory = void 0;\n /**\n * Name of map storing sorting states. Required for unique name (PR #7440 introduced it). It's needed as\n * both ColumnSorting and MultiColumnSorting plugins create state manager and as a consequence register maps.\n * Objects are destroyed in strange order as the updateSettings doesn't work well.\n */\n\n this.mapName = mapName;\n this.hot.columnIndexMapper.registerMap(mapName, this.sortingStates);\n }\n /**\n * Update column properties which affect the sorting result.\n *\n * **Note**: All column properties can be overwritten by [columns](https://handsontable.com/docs/Options.html#columns) option.\n *\n * @param {object} allSortSettings Column sorting plugin's configuration object.\n */\n\n\n _createClass(ColumnStatesManager, [{\n key: \"updateAllColumnsProperties\",\n value: function updateAllColumnsProperties(allSortSettings) {\n var _this = this;\n\n if (!isObject(allSortSettings)) {\n return;\n }\n\n objectEach(allSortSettings, function (newValue, propertyName) {\n if (inheritedColumnProperties.includes(propertyName)) {\n _this[propertyName] = newValue;\n }\n });\n }\n /**\n * Get all column properties which affect the sorting result.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getAllColumnsProperties\",\n value: function getAllColumnsProperties() {\n var columnProperties = {\n sortEmptyCells: this.sortEmptyCells,\n indicator: this.indicator,\n headerAction: this.headerAction\n };\n\n if (typeof this.compareFunctionFactory === 'function') {\n columnProperties.compareFunctionFactory = this.compareFunctionFactory;\n }\n\n return columnProperties;\n }\n /**\n * Get sort order of column.\n *\n * @param {number} searchedColumn Visual column index.\n * @returns {string|undefined} Sort order (`asc` for ascending, `desc` for descending and undefined for not sorted).\n */\n\n }, {\n key: \"getSortOrderOfColumn\",\n value: function getSortOrderOfColumn(searchedColumn) {\n var _this$sortingStates$g;\n\n return (_this$sortingStates$g = this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(searchedColumn))) === null || _this$sortingStates$g === void 0 ? void 0 : _this$sortingStates$g.sortOrder;\n }\n /**\n * Get order of particular column in the states queue.\n *\n * @param {number} column Visual column index.\n * @returns {number}\n */\n\n }, {\n key: \"getIndexOfColumnInSortQueue\",\n value: function getIndexOfColumnInSortQueue(column) {\n column = this.hot.toPhysicalColumn(column);\n return this.sortingStates.getEntries().findIndex(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n physicalColumn = _ref2[0];\n\n return physicalColumn === column;\n });\n }\n /**\n * Get number of sorted columns.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getNumberOfSortedColumns\",\n value: function getNumberOfSortedColumns() {\n return this.sortingStates.getLength();\n }\n /**\n * Get if list of sorted columns is empty.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isListOfSortedColumnsEmpty\",\n value: function isListOfSortedColumnsEmpty() {\n return this.getNumberOfSortedColumns() === 0;\n }\n /**\n * Get if particular column is sorted.\n *\n * @param {number} column Visual column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isColumnSorted\",\n value: function isColumnSorted(column) {\n return isObject(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(column)));\n }\n /**\n * Queue of sort states containing sorted columns and their orders (Array of objects containing `column` and `sortOrder` properties).\n *\n * **Note**: Please keep in mind that returned objects expose **visual** column index under the `column` key.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getSortStates\",\n value: function getSortStates() {\n var _this2 = this;\n\n if (this.sortingStates === null) {\n return [];\n }\n\n var sortingStatesQueue = this.sortingStates.getEntries();\n return sortingStatesQueue.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n physicalColumn = _ref4[0],\n value = _ref4[1];\n\n return _objectSpread({\n column: _this2.hot.toVisualColumn(physicalColumn)\n }, value);\n });\n }\n /**\n * Get sort state for particular column. Object contains `column` and `sortOrder` properties.\n *\n * **Note**: Please keep in mind that returned objects expose **visual** column index under the `column` key.\n *\n * @param {number} column Visual column index.\n * @returns {object|undefined}\n */\n\n }, {\n key: \"getColumnSortState\",\n value: function getColumnSortState(column) {\n var sortOrder = this.getSortOrderOfColumn(column);\n\n if (isDefined(sortOrder)) {\n return {\n column: column,\n sortOrder: sortOrder\n };\n }\n }\n /**\n * Set all column states.\n *\n * @param {Array} sortStates Sort states.\n */\n\n }, {\n key: \"setSortStates\",\n value: function setSortStates(sortStates) {\n this.sortingStates.clear();\n\n for (var i = 0; i < sortStates.length; i += 1) {\n this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(sortStates[i].column), {\n sortOrder: sortStates[i].sortOrder\n });\n }\n }\n /**\n * Destroy the state manager.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.columnIndexMapper.unregisterMap(this.mapName);\n this.sortingStates = null;\n }\n }]);\n\n return ColumnStatesManager;\n}();","import \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { isObject } from \"../../helpers/object.mjs\";\nimport { isRightClick } from \"../../helpers/dom/event.mjs\";\nexport var ASC_SORT_STATE = 'asc';\nexport var DESC_SORT_STATE = 'desc';\nexport var HEADER_SPAN_CLASS = 'colHeader';\n/**\n * Get if column state is valid.\n *\n * @param {number} columnState Particular column state.\n * @returns {boolean}\n */\n\nfunction isValidColumnState(columnState) {\n if (isObject(columnState) === false) {\n return false;\n }\n\n var column = columnState.column,\n sortOrder = columnState.sortOrder;\n return Number.isInteger(column) && [ASC_SORT_STATE, DESC_SORT_STATE].includes(sortOrder);\n}\n/**\n * Get if all sorted columns states are valid.\n *\n * @param {Array} sortStates The sort state collection.\n * @returns {boolean}\n */\n\n\nexport function areValidSortStates(sortStates) {\n if (sortStates.some(function (columnState) {\n return isValidColumnState(columnState) === false;\n })) {\n return false;\n }\n\n var sortedColumns = sortStates.map(function (_ref) {\n var column = _ref.column;\n return column;\n }); // Indexes occurs only once.\n\n return new Set(sortedColumns).size === sortedColumns.length;\n}\n/**\n * Get next sort order for particular column. The order sequence looks as follows: 'asc' -> 'desc' -> undefined -> 'asc'.\n *\n * @param {string|undefined} sortOrder Sort order (`asc` for ascending, `desc` for descending and undefined for not sorted).\n * @returns {string|undefined} Next sort order (`asc` for ascending, `desc` for descending and undefined for not sorted).\n */\n\nexport function getNextSortOrder(sortOrder) {\n if (sortOrder === DESC_SORT_STATE) {\n return;\n } else if (sortOrder === ASC_SORT_STATE) {\n return DESC_SORT_STATE;\n }\n\n return ASC_SORT_STATE;\n}\n/**\n * Get `span` DOM element inside `th` DOM element.\n *\n * @param {Element} TH Th HTML element.\n * @returns {Element | null}\n */\n\nexport function getHeaderSpanElement(TH) {\n var headerSpanElement = TH.querySelector(\".\".concat(HEADER_SPAN_CLASS));\n return headerSpanElement;\n}\n/**\n *\n * Get if handled header is first level column header.\n *\n * @param {number} column Visual column index.\n * @param {Element} TH Th HTML element.\n * @returns {boolean}\n */\n\nexport function isFirstLevelColumnHeader(column, TH) {\n if (column < 0 || !TH.parentNode) {\n return false;\n }\n\n var TRs = TH.parentNode.parentNode.childNodes;\n var headerLevel = Array.from(TRs).indexOf(TH.parentNode) - TRs.length;\n\n if (headerLevel !== -1) {\n return false;\n }\n\n return true;\n}\n/**\n * Get if header was clicked properly. Click on column header and NOT done by right click return `true`.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {Event} clickEvent Click event.\n * @returns {boolean}\n */\n\nexport function wasHeaderClickedProperly(row, column, clickEvent) {\n return row === -1 && column >= 0 && isRightClick(clickEvent) === false;\n}","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { isDefined } from \"../../helpers/mixed.mjs\";\nimport { ASC_SORT_STATE, DESC_SORT_STATE } from \"./utils.mjs\";\nvar HEADER_CLASS_ASC_SORT = 'ascending';\nvar HEADER_CLASS_DESC_SORT = 'descending';\nvar HEADER_CLASS_INDICATOR_DISABLED = 'indicatorDisabled';\nvar HEADER_SORT_CLASS = 'columnSorting';\nvar HEADER_ACTION_CLASS = 'sortAction';\nvar orderToCssClass = new Map([[ASC_SORT_STATE, HEADER_CLASS_ASC_SORT], [DESC_SORT_STATE, HEADER_CLASS_DESC_SORT]]);\n/**\n * Get CSS classes which should be added to particular column header.\n *\n * @param {object} columnStatesManager Instance of column state manager.\n * @param {number} column Visual column index.\n * @param {boolean} showSortIndicator Indicates if indicator should be shown for the particular column.\n * @param {boolean} headerAction Indicates if header click to sort should be possible.\n * @returns {Array} Array of CSS classes.\n */\n\nexport function getClassesToAdd(columnStatesManager, column, showSortIndicator, headerAction) {\n var cssClasses = [HEADER_SORT_CLASS];\n\n if (headerAction) {\n cssClasses.push(HEADER_ACTION_CLASS);\n }\n\n if (showSortIndicator === false) {\n cssClasses.push(HEADER_CLASS_INDICATOR_DISABLED);\n return cssClasses;\n }\n\n var columnOrder = columnStatesManager.getSortOrderOfColumn(column);\n\n if (isDefined(columnOrder)) {\n cssClasses.push(orderToCssClass.get(columnOrder));\n }\n\n return cssClasses;\n}\n/**\n * Get CSS classes which should be removed from column header.\n *\n * @returns {Array} Array of CSS classes.\n */\n\nexport function getClassesToRemove() {\n return Array.from(orderToCssClass.values()).concat(HEADER_ACTION_CLASS, HEADER_CLASS_INDICATOR_DISABLED, HEADER_SORT_CLASS);\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n/**\n * Refactored implementation of LinkedList (part of javascript-algorithms project) by Github users:\n * mgechev, AndriiHeonia, Microfed and Jakeh (part of javascript-algorithms project - all project contributors\n * at repository website).\n *\n * Link to repository: https://github.com/mgechev/javascript-algorithms.\n */\n\n/**\n * Linked list node.\n *\n * @class NodeStructure\n * @util\n */\n\n\nvar NodeStructure = function NodeStructure(data) {\n _classCallCheck(this, NodeStructure);\n /**\n * Data of the node.\n *\n * @member {object}\n */\n\n\n this.data = data;\n /**\n * Next node.\n *\n * @member {NodeStructure}\n */\n\n this.next = null;\n /**\n * Previous node.\n *\n * @member {NodeStructure}\n */\n\n this.prev = null;\n};\n/**\n * Linked list.\n *\n * @class LinkedList\n * @util\n */\n\n\nvar LinkedList = /*#__PURE__*/function () {\n function LinkedList() {\n _classCallCheck(this, LinkedList);\n\n this.first = null;\n this.last = null;\n }\n /**\n * Add data to the end of linked list.\n *\n * @param {object} data Data which should be added.\n */\n\n\n _createClass(LinkedList, [{\n key: \"push\",\n value: function push(data) {\n var node = new NodeStructure(data);\n\n if (this.first === null) {\n this.first = node;\n this.last = node;\n } else {\n var temp = this.last;\n this.last = node;\n node.prev = temp;\n temp.next = node;\n }\n }\n /**\n * Add data to the beginning of linked list.\n *\n * @param {object} data Data which should be added.\n */\n\n }, {\n key: \"unshift\",\n value: function unshift(data) {\n var node = new NodeStructure(data);\n\n if (this.first === null) {\n this.first = node;\n this.last = node;\n } else {\n var temp = this.first;\n this.first = node;\n node.next = temp;\n temp.prev = node;\n }\n }\n /**\n * In order traversal of the linked list.\n *\n * @param {Function} callback Callback which should be executed on each node.\n */\n\n }, {\n key: \"inorder\",\n value: function inorder(callback) {\n var temp = this.first;\n\n while (temp) {\n callback(temp);\n temp = temp.next;\n }\n }\n /**\n * Remove data from the linked list.\n *\n * @param {object} data Data which should be removed.\n * @returns {boolean} Returns true if data has been removed.\n */\n\n }, {\n key: \"remove\",\n value: function remove(data) {\n if (this.first === null) {\n return false;\n }\n\n var temp = this.first;\n var next;\n var prev;\n\n while (temp) {\n if (temp.data === data) {\n next = temp.next;\n prev = temp.prev;\n\n if (next) {\n next.prev = prev;\n }\n\n if (prev) {\n prev.next = next;\n }\n\n if (temp === this.first) {\n this.first = next;\n }\n\n if (temp === this.last) {\n this.last = prev;\n }\n\n return true;\n }\n\n temp = temp.next;\n }\n\n return false;\n }\n /**\n * Check if linked list contains cycle.\n *\n * @returns {boolean} Returns true if linked list contains cycle.\n */\n\n }, {\n key: \"hasCycle\",\n value: function hasCycle() {\n var fast = this.first;\n var slow = this.first;\n\n while (true) {\n if (fast === null) {\n return false;\n }\n\n fast = fast.next;\n\n if (fast === null) {\n return false;\n }\n\n fast = fast.next;\n slow = slow.next;\n\n if (fast === slow) {\n return true;\n }\n }\n }\n /**\n * Return last node from the linked list.\n *\n * @returns {NodeStructure} Last node.\n */\n\n }, {\n key: \"pop\",\n value: function pop() {\n if (this.last === null) {\n return null;\n }\n\n var temp = this.last;\n this.last = this.last.prev;\n return temp;\n }\n /**\n * Return first node from the linked list.\n *\n * @returns {NodeStructure} First node.\n */\n\n }, {\n key: \"shift\",\n value: function shift() {\n if (this.first === null) {\n return null;\n }\n\n var temp = this.first;\n this.first = this.first.next;\n return temp;\n }\n /**\n * Reverses the linked list recursively.\n */\n\n }, {\n key: \"recursiveReverse\",\n value: function recursiveReverse() {\n /**\n * @param {*} current The current value.\n * @param {*} next The next value.\n */\n function inverse(current, next) {\n if (!next) {\n return;\n }\n\n inverse(next, next.next);\n next.next = current;\n }\n\n if (!this.first) {\n return;\n }\n\n inverse(this.first, this.first.next);\n this.first.next = null;\n var temp = this.first;\n this.first = this.last;\n this.last = temp;\n }\n /**\n * Reverses the linked list iteratively.\n */\n\n }, {\n key: \"reverse\",\n value: function reverse() {\n if (!this.first || !this.first.next) {\n return;\n }\n\n var current = this.first.next;\n var prev = this.first;\n var temp;\n\n while (current) {\n temp = current.next;\n current.next = prev;\n prev.prev = current;\n prev = current;\n current = temp;\n }\n\n this.first.next = null;\n this.last.prev = null;\n temp = this.first;\n this.first = prev;\n this.last = temp;\n }\n }]);\n\n return LinkedList;\n}();\n\nexport { NodeStructure };\nexport default LinkedList;","import \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport LinkedList from \"../dataStructures/linkedList.mjs\";\n/**\n * Refactored implementation of mergeSort (part of javascript-algorithms project) by Github users:\n * mgechev, AndriiHeonia and lekkas (part of javascript-algorithms project - all project contributors\n * at repository website).\n *\n * Link to repository: https://github.com/mgechev/javascript-algorithms.\n */\n\n/**\n * Specifies a function that defines the sort order. The array is sorted according to each\n * character's Unicode code point value, according to the string conversion of each element.\n *\n * @param {*} a The first compared element.\n * @param {*} b The second compared element.\n * @returns {number}\n */\n\nvar defaultCompareFunction = function defaultCompareFunction(a, b) {\n // sort lexically\n var firstValue = a.toString();\n var secondValue = b.toString();\n\n if (firstValue === secondValue) {\n return 0;\n } else if (firstValue < secondValue) {\n return -1;\n }\n\n return 1;\n};\n/**\n * Mergesort method which is recursively called for sorting the input array.\n *\n * @param {Array} array The array which should be sorted.\n * @param {Function} compareFunction Compares two items in an array. If compareFunction is not supplied,\n * elements are sorted by converting them to strings and comparing strings in Unicode code point order.\n * @param {number} startIndex Left side of the subarray.\n * @param {number} endIndex Right side of the subarray.\n * @returns {Array} Array with sorted subarray.\n */\n\n\nexport default function mergeSort(array) {\n var compareFunction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCompareFunction;\n var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var endIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : array.length; // eslint-disable-line max-len\n\n if (Math.abs(endIndex - startIndex) <= 1) {\n return [];\n }\n\n var middleIndex = Math.ceil((startIndex + endIndex) / 2);\n mergeSort(array, compareFunction, startIndex, middleIndex);\n mergeSort(array, compareFunction, middleIndex, endIndex);\n return merge(array, compareFunction, startIndex, middleIndex, endIndex);\n}\n/**\n * Devides and sort merges two subarrays of given array.\n *\n * @param {Array} array The array which subarrays should be sorted.\n * @param {Function} compareFunction The function with comparision logic.\n * @param {number} startIndex The start of the first subarray.\n * This subarray is with end middle - 1.\n * @param {number} middleIndex The start of the second array.\n * @param {number} endIndex End - 1 is the end of the second array.\n * @returns {Array} The array with sorted subarray.\n */\n\nfunction merge(array, compareFunction, startIndex, middleIndex, endIndex) {\n var leftElements = new LinkedList();\n var rightElements = new LinkedList();\n var leftSize = middleIndex - startIndex;\n var rightSize = endIndex - middleIndex;\n var maxSize = Math.max(leftSize, rightSize);\n var size = endIndex - startIndex;\n\n for (var _i = 0; _i < maxSize; _i += 1) {\n if (_i < leftSize) {\n leftElements.push(array[startIndex + _i]);\n }\n\n if (_i < rightSize) {\n rightElements.push(array[middleIndex + _i]);\n }\n }\n\n var i = 0;\n\n while (i < size) {\n if (leftElements.first && rightElements.first) {\n if (compareFunction(leftElements.first.data, rightElements.first.data) > 0) {\n array[startIndex + i] = rightElements.shift().data;\n } else {\n array[startIndex + i] = leftElements.shift().data;\n }\n } else if (leftElements.first) {\n array[startIndex + i] = leftElements.shift().data;\n } else {\n array[startIndex + i] = rightElements.shift().data;\n }\n\n i += 1;\n }\n\n return array;\n}","import mergeSort from \"../../../utils/sortingAlgorithms/mergeSort.mjs\";\nimport { getRootComparator } from \"./registry.mjs\";\nexport var DO_NOT_SWAP = 0;\nexport var FIRST_BEFORE_SECOND = -1;\nexport var FIRST_AFTER_SECOND = 1;\n/**\n * @param {Array} indexesWithData The data to sort.\n * @param {string} rootComparatorId The comparator logic to use.\n * @param {Array} argsForRootComparator Additional arguments for comparator function.\n */\n\nexport function sort(indexesWithData, rootComparatorId) {\n var rootComparator = getRootComparator(rootComparatorId);\n\n for (var _len = arguments.length, argsForRootComparator = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n argsForRootComparator[_key - 2] = arguments[_key];\n }\n\n mergeSort(indexesWithData, rootComparator.apply(void 0, argsForRootComparator));\n}","import { isEmpty } from \"../../../helpers/mixed.mjs\";\nimport { DO_NOT_SWAP, FIRST_BEFORE_SECOND, FIRST_AFTER_SECOND } from \"../sortService/index.mjs\";\n/**\n * Default sorting compare function factory. Method get as parameters `sortOrder` and `columnMeta` and return compare function.\n *\n * @param {string} sortOrder Sort order (`asc` for ascending, `desc` for descending).\n * @param {object} columnMeta Column meta object.\n * @param {object} columnPluginSettings Plugin settings for the column.\n * @returns {Function} The compare function.\n */\n\nexport function compareFunctionFactory(sortOrder, columnMeta, columnPluginSettings) {\n return function (value, nextValue) {\n var sortEmptyCells = columnPluginSettings.sortEmptyCells;\n\n if (typeof value === 'string') {\n value = value.toLowerCase();\n }\n\n if (typeof nextValue === 'string') {\n nextValue = nextValue.toLowerCase();\n }\n\n if (value === nextValue) {\n return DO_NOT_SWAP;\n }\n\n if (isEmpty(value)) {\n if (isEmpty(nextValue)) {\n return DO_NOT_SWAP;\n } // Just fist value is empty and `sortEmptyCells` option was set\n\n\n if (sortEmptyCells) {\n return sortOrder === 'asc' ? FIRST_BEFORE_SECOND : FIRST_AFTER_SECOND;\n }\n\n return FIRST_AFTER_SECOND;\n }\n\n if (isEmpty(nextValue)) {\n // Just second value is empty and `sortEmptyCells` option was set\n if (sortEmptyCells) {\n return sortOrder === 'asc' ? FIRST_AFTER_SECOND : FIRST_BEFORE_SECOND;\n }\n\n return FIRST_BEFORE_SECOND;\n }\n\n if (isNaN(value) && !isNaN(nextValue)) {\n return sortOrder === 'asc' ? FIRST_AFTER_SECOND : FIRST_BEFORE_SECOND;\n } else if (!isNaN(value) && isNaN(nextValue)) {\n return sortOrder === 'asc' ? FIRST_BEFORE_SECOND : FIRST_AFTER_SECOND;\n } else if (!(isNaN(value) || isNaN(nextValue))) {\n value = parseFloat(value);\n nextValue = parseFloat(nextValue);\n }\n\n if (value < nextValue) {\n return sortOrder === 'asc' ? FIRST_BEFORE_SECOND : FIRST_AFTER_SECOND;\n }\n\n if (value > nextValue) {\n return sortOrder === 'asc' ? FIRST_AFTER_SECOND : FIRST_BEFORE_SECOND;\n }\n\n return DO_NOT_SWAP;\n };\n}\nexport var COLUMN_DATA_TYPE = 'default';","import moment from 'moment';\nimport { isEmpty } from \"../../../helpers/mixed.mjs\";\nimport { DO_NOT_SWAP, FIRST_BEFORE_SECOND, FIRST_AFTER_SECOND } from \"../sortService/index.mjs\";\n/**\n * Date sorting compare function factory. Method get as parameters `sortOrder` and `columnMeta` and return compare function.\n *\n * @param {string} sortOrder Sort order (`asc` for ascending, `desc` for descending).\n * @param {object} columnMeta Column meta object.\n * @param {object} columnPluginSettings Plugin settings for the column.\n * @returns {Function} The compare function.\n */\n\nexport function compareFunctionFactory(sortOrder, columnMeta, columnPluginSettings) {\n return function (value, nextValue) {\n var sortEmptyCells = columnPluginSettings.sortEmptyCells;\n\n if (value === nextValue) {\n return DO_NOT_SWAP;\n }\n\n if (isEmpty(value)) {\n if (isEmpty(nextValue)) {\n return DO_NOT_SWAP;\n } // Just fist value is empty and `sortEmptyCells` option was set\n\n\n if (sortEmptyCells) {\n return sortOrder === 'asc' ? FIRST_BEFORE_SECOND : FIRST_AFTER_SECOND;\n }\n\n return FIRST_AFTER_SECOND;\n }\n\n if (isEmpty(nextValue)) {\n // Just second value is empty and `sortEmptyCells` option was set\n if (sortEmptyCells) {\n return sortOrder === 'asc' ? FIRST_AFTER_SECOND : FIRST_BEFORE_SECOND;\n }\n\n return FIRST_BEFORE_SECOND;\n }\n\n var dateFormat = columnMeta.dateFormat;\n var firstDate = moment(value, dateFormat);\n var nextDate = moment(nextValue, dateFormat);\n\n if (!firstDate.isValid()) {\n return FIRST_AFTER_SECOND;\n }\n\n if (!nextDate.isValid()) {\n return FIRST_BEFORE_SECOND;\n }\n\n if (nextDate.isAfter(firstDate)) {\n return sortOrder === 'asc' ? FIRST_BEFORE_SECOND : FIRST_AFTER_SECOND;\n }\n\n if (nextDate.isBefore(firstDate)) {\n return sortOrder === 'asc' ? FIRST_AFTER_SECOND : FIRST_BEFORE_SECOND;\n }\n\n return DO_NOT_SWAP;\n };\n}\nexport var COLUMN_DATA_TYPE = 'date';","import { compareFunctionFactory as defaultSort, COLUMN_DATA_TYPE as DEFAULT_DATA_TYPE } from \"../sortFunction/default.mjs\";\nimport { compareFunctionFactory as numericSort, COLUMN_DATA_TYPE as NUMERIC_DATA_TYPE } from \"../sortFunction/numeric.mjs\";\nimport { compareFunctionFactory as dateSort, COLUMN_DATA_TYPE as DATE_DATA_TYPE } from \"../sortFunction/date.mjs\";\nimport staticRegister from \"../../../utils/staticRegister.mjs\";\n\nvar _staticRegister = staticRegister('sorting.compareFunctionFactory'),\n registerCompareFunctionFactory = _staticRegister.register,\n getGloballyCompareFunctionFactory = _staticRegister.getItem,\n hasGloballyCompareFunctionFactory = _staticRegister.hasItem;\n\nvar _staticRegister2 = staticRegister('sorting.mainSortComparator'),\n registerRootComparator = _staticRegister2.register,\n getRootComparator = _staticRegister2.getItem;\n/**\n * Gets sort function for the particular column basing on it's data type.\n *\n * @param {string} type The data type.\n * @returns {Function}\n */\n\n\nexport function getCompareFunctionFactory(type) {\n if (hasGloballyCompareFunctionFactory(type)) {\n return getGloballyCompareFunctionFactory(type);\n }\n\n return getGloballyCompareFunctionFactory(DEFAULT_DATA_TYPE);\n}\nregisterCompareFunctionFactory(NUMERIC_DATA_TYPE, numericSort);\nregisterCompareFunctionFactory(DATE_DATA_TYPE, dateSort);\nregisterCompareFunctionFactory(DEFAULT_DATA_TYPE, defaultSort);\nexport { registerRootComparator, getRootComparator };","import \"core-js/modules/es.array.slice.js\";\n\nfunction _toArray(arr) {\n return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport { getCompareFunctionFactory } from \"./sortService/index.mjs\";\n/**\n * Sort comparator handled by conventional sort algorithm.\n *\n * @param {Array} sortingOrders Sort orders (`asc` for ascending, `desc` for descending).\n * @param {Array} columnMetas Column meta objects.\n * @returns {Function}\n */\n\nexport function rootComparator(sortingOrders, columnMetas) {\n return function (rowIndexWithValues, nextRowIndexWithValues) {\n // We sort array of arrays. Single array is in form [rowIndex, ...values].\n // We compare just values, stored at second index of array.\n var _rowIndexWithValues = _toArray(rowIndexWithValues),\n values = _rowIndexWithValues.slice(1);\n\n var _nextRowIndexWithValu = _toArray(nextRowIndexWithValues),\n nextValues = _nextRowIndexWithValu.slice(1);\n\n return function getCompareResult(column) {\n var sortingOrder = sortingOrders[column];\n var columnMeta = columnMetas[column];\n var value = values[column];\n var nextValue = nextValues[column];\n var pluginSettings = columnMeta.columnSorting;\n var compareFunctionFactory = pluginSettings.compareFunctionFactory ? pluginSettings.compareFunctionFactory : getCompareFunctionFactory(columnMeta.type);\n var compareResult = compareFunctionFactory(sortingOrder, columnMeta, pluginSettings)(value, nextValue); // DIFF - MultiColumnSorting & ColumnSorting: removed iteration through next sorted columns.\n\n return compareResult;\n }(0);\n };\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.every.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass, removeClass } from \"../../helpers/dom/element.mjs\";\nimport { isUndefined, isDefined } from \"../../helpers/mixed.mjs\";\nimport { isObject } from \"../../helpers/object.mjs\";\nimport { isFunction } from \"../../helpers/function.mjs\";\nimport { arrayMap } from \"../../helpers/array.mjs\";\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { IndexesSequence, PhysicalIndexToValueMap as IndexToValueMap } from \"../../translations/index.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { isPressedCtrlKey } from \"../../utils/keyStateObserver.mjs\";\nimport { ColumnStatesManager } from \"./columnStatesManager.mjs\";\nimport { getNextSortOrder, areValidSortStates, getHeaderSpanElement, isFirstLevelColumnHeader, wasHeaderClickedProperly } from \"./utils.mjs\";\nimport { getClassesToRemove, getClassesToAdd } from \"./domHelpers.mjs\";\nimport { rootComparator } from \"./rootComparator.mjs\";\nimport { registerRootComparator, sort } from \"./sortService/index.mjs\";\nexport var PLUGIN_KEY = 'columnSorting';\nexport var PLUGIN_PRIORITY = 50;\nvar APPEND_COLUMN_CONFIG_STRATEGY = 'append';\nvar REPLACE_COLUMN_CONFIG_STRATEGY = 'replace';\nregisterRootComparator(PLUGIN_KEY, rootComparator);\nHooks.getSingleton().register('beforeColumnSort');\nHooks.getSingleton().register('afterColumnSort'); // DIFF - MultiColumnSorting & ColumnSorting: changed configuration documentation.\n\n/**\n * @plugin ColumnSorting\n *\n * @description\n * This plugin sorts the view by columns (but does not sort the data source!). To enable the plugin, set the\n * {@link Options#columnSorting} property to the correct value (see the examples below).\n *\n * @example\n * ```js\n * // as boolean\n * columnSorting: true\n *\n * // as an object with initial sort config (sort ascending for column at index 1)\n * columnSorting: {\n * initialConfig: {\n * column: 1,\n * sortOrder: 'asc'\n * }\n * }\n *\n * // as an object which define specific sorting options for all columns\n * columnSorting: {\n * sortEmptyCells: true, // true = the table sorts empty cells, false = the table moves all empty cells to the end of the table (by default)\n * indicator: true, // true = shows indicator for all columns (by default), false = don't show indicator for columns\n * headerAction: true, // true = allow to click on the headers to sort (by default), false = turn off possibility to click on the headers to sort\n * compareFunctionFactory: function(sortOrder, columnMeta) {\n * return function(value, nextValue) {\n * // Some value comparisons which will return -1, 0 or 1...\n * }\n * }\n * }\n *\n * // as an object passed to the `column` property, allows specifying a custom options for the desired column.\n * // please take a look at documentation of `column` property: https://handsontable.com/docs/Options.html#columns\n * columns: [{\n * columnSorting: {\n * indicator: false, // disable indicator for the first column,\n * sortEmptyCells: true,\n * headerAction: false, // clicks on the first column won't sort\n * compareFunctionFactory: function(sortOrder, columnMeta) {\n * return function(value, nextValue) {\n * return 0; // Custom compare function for the first column (don't sort)\n * }\n * }\n * }\n * }]```\n */\n\nexport var ColumnSorting = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ColumnSorting, _BasePlugin);\n\n var _super = _createSuper(ColumnSorting);\n\n function ColumnSorting(hotInstance) {\n var _this;\n\n _classCallCheck(this, ColumnSorting);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of column state manager.\n *\n * @private\n * @type {null|ColumnStatesManager}\n */\n\n _this.columnStatesManager = null;\n /**\n * Cached column properties from plugin like i.e. `indicator`, `headerAction`.\n *\n * @private\n * @type {null|PhysicalIndexToValueMap}\n */\n\n _this.columnMetaCache = null;\n /**\n * Main settings key designed for the plugin.\n *\n * @private\n * @type {string}\n */\n\n _this.pluginKey = PLUGIN_KEY;\n /**\n * Plugin indexes cache.\n *\n * @private\n * @type {null|IndexesSequence}\n */\n\n _this.indexesSequenceCache = null;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the Handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ColumnSorting#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ColumnSorting, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[this.pluginKey];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.columnStatesManager = new ColumnStatesManager(this.hot, \"\".concat(this.pluginKey, \".sortingStates\"));\n this.columnMetaCache = new IndexToValueMap(function (physicalIndex) {\n var visualIndex = _this2.hot.toVisualColumn(physicalIndex);\n\n if (visualIndex === null) {\n visualIndex = physicalIndex;\n }\n\n return _this2.getMergedPluginSettings(visualIndex);\n });\n this.hot.columnIndexMapper.registerMap(\"\".concat(this.pluginKey, \".columnMeta\"), this.columnMetaCache);\n this.addHook('afterGetColHeader', function (column, TH) {\n return _this2.onAfterGetColHeader(column, TH);\n });\n this.addHook('beforeOnCellMouseDown', function (event, coords, TD, controller) {\n return _this2.onBeforeOnCellMouseDown(event, coords, TD, controller);\n });\n this.addHook('afterOnCellMouseDown', function (event, target) {\n return _this2.onAfterOnCellMouseDown(event, target);\n });\n this.addHook('afterInit', function () {\n return _this2.loadOrSortBySettings();\n });\n this.addHook('afterLoadData', function (sourceData, initialLoad) {\n return _this2.onAfterLoadData(initialLoad);\n }); // TODO: Workaround? It should be refactored / described.\n\n if (this.hot.view) {\n this.loadOrSortBySettings();\n }\n\n _get(_getPrototypeOf(ColumnSorting.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n var _this3 = this;\n\n var clearColHeader = function clearColHeader(column, TH) {\n var headerSpanElement = getHeaderSpanElement(TH);\n\n if (isFirstLevelColumnHeader(column, TH) === false || headerSpanElement === null) {\n return;\n }\n\n _this3.updateHeaderClasses(headerSpanElement);\n }; // Changing header width and removing indicator.\n\n\n this.hot.addHook('afterGetColHeader', clearColHeader);\n this.hot.addHookOnce('afterRender', function () {\n _this3.hot.removeHook('afterGetColHeader', clearColHeader);\n });\n this.hot.batchExecution(function () {\n if (_this3.indexesSequenceCache !== null) {\n _this3.hot.rowIndexMapper.setIndexesSequence(_this3.indexesSequenceCache.getValues());\n\n _this3.hot.rowIndexMapper.unregisterMap(_this3.pluginKey);\n }\n }, true);\n this.hot.columnIndexMapper.unregisterMap(\"\".concat(this.pluginKey, \".columnMeta\"));\n this.columnStatesManager.destroy();\n this.columnMetaCache = null;\n this.columnStatesManager = null;\n\n _get(_getPrototypeOf(ColumnSorting.prototype), \"disablePlugin\", this).call(this);\n } // DIFF - MultiColumnSorting & ColumnSorting: changed function documentation.\n\n /**\n * Sorts the table by chosen columns and orders.\n *\n * @param {undefined|object} sortConfig Single column sort configuration. The configuration object contains `column` and `sortOrder` properties.\n * First of them contains visual column index, the second one contains sort order (`asc` for ascending, `desc` for descending).\n *\n * **Note**: Please keep in mind that every call of `sort` function set an entirely new sort order. Previous sort configs aren't preserved.\n *\n * @example\n * ```js\n * // sort ascending first visual column\n * hot.getPlugin('columnSorting').sort({ column: 0, sortOrder: 'asc' });\n * ```\n *\n * @fires Hooks#beforeColumnSort\n * @fires Hooks#afterColumnSort\n */\n\n }, {\n key: \"sort\",\n value: function sort(sortConfig) {\n var currentSortConfig = this.getSortConfig(); // We always pass configs defined as an array to `beforeColumnSort` and `afterColumnSort` hooks.\n\n var destinationSortConfigs = this.getNormalizedSortConfigs(sortConfig);\n var sortPossible = this.areValidSortConfigs(destinationSortConfigs);\n var allowSort = this.hot.runHooks('beforeColumnSort', currentSortConfig, destinationSortConfigs, sortPossible);\n\n if (allowSort === false) {\n return;\n }\n\n if (currentSortConfig.length === 0 && this.indexesSequenceCache === null) {\n this.indexesSequenceCache = this.hot.rowIndexMapper.registerMap(this.pluginKey, new IndexesSequence());\n this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence());\n }\n\n if (sortPossible) {\n this.columnStatesManager.setSortStates(destinationSortConfigs);\n this.sortByPresetSortStates(destinationSortConfigs);\n this.saveAllSortSettings(destinationSortConfigs);\n }\n\n this.hot.runHooks('afterColumnSort', currentSortConfig, sortPossible ? destinationSortConfigs : currentSortConfig, sortPossible);\n\n if (sortPossible) {\n this.hot.render(); // TODO: Workaround? This triggers fast redraw. One test won't pass after removal.\n // It should be refactored / described.\n\n this.hot.forceFullRender = false;\n this.hot.view.render();\n }\n }\n /**\n * Clear the sort performed on the table.\n */\n\n }, {\n key: \"clearSort\",\n value: function clearSort() {\n this.sort([]);\n }\n /**\n * Checks if the table is sorted (any column have to be sorted).\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isSorted\",\n value: function isSorted() {\n return this.enabled && !this.columnStatesManager.isListOfSortedColumnsEmpty();\n }\n /**\n * Get sort configuration for particular column or for all sorted columns. Objects contain `column` and `sortOrder` properties.\n *\n * **Note**: Please keep in mind that returned objects expose **visual** column index under the `column` key. They are handled by the `sort` function.\n *\n * @param {number} [column] Visual column index.\n * @returns {undefined|object|Array}\n */\n\n }, {\n key: \"getSortConfig\",\n value: function getSortConfig(column) {\n if (isDefined(column)) {\n return this.columnStatesManager.getColumnSortState(column);\n }\n\n return this.columnStatesManager.getSortStates();\n }\n /**\n * @description\n * Warn: Useful mainly for providing server side sort implementation (see in the example below). It doesn't sort the data set. It just sets sort configuration for all sorted columns.\n * Note: Please keep in mind that this method doesn't re-render the table.\n *\n * @example\n * ```js\n * beforeColumnSort: function(currentSortConfig, destinationSortConfigs) {\n * const columnSortPlugin = this.getPlugin('columnSorting');\n *\n * columnSortPlugin.setSortConfig(destinationSortConfigs);\n *\n * // const newData = ... // Calculated data set, ie. from an AJAX call.\n *\n * this.loadData(newData); // Load new data set and re-render the table.\n *\n * return false; // The blockade for the default sort action.\n * }```\n *\n * @param {undefined|object|Array} sortConfig Single column sort configuration or full sort configuration (for all sorted columns).\n * The configuration object contains `column` and `sortOrder` properties. First of them contains visual column index, the second one contains\n * sort order (`asc` for ascending, `desc` for descending).\n */\n\n }, {\n key: \"setSortConfig\",\n value: function setSortConfig(sortConfig) {\n // We always set configs defined as an array.\n var destinationSortConfigs = this.getNormalizedSortConfigs(sortConfig);\n\n if (this.areValidSortConfigs(destinationSortConfigs)) {\n this.columnStatesManager.setSortStates(destinationSortConfigs);\n }\n }\n /**\n * Get normalized sort configs.\n *\n * @private\n * @param {object|Array} [sortConfig=[]] Single column sort configuration or full sort configuration (for all sorted columns).\n * The configuration object contains `column` and `sortOrder` properties. First of them contains visual column index, the second one contains\n * sort order (`asc` for ascending, `desc` for descending).\n * @returns {Array}\n */\n\n }, {\n key: \"getNormalizedSortConfigs\",\n value: function getNormalizedSortConfigs() {\n var sortConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n if (Array.isArray(sortConfig)) {\n return sortConfig.slice(0, 1);\n }\n\n return [sortConfig];\n }\n /**\n * Get if sort configs are valid.\n *\n * @private\n * @param {Array} sortConfigs Sort configuration for all sorted columns. Objects contain `column` and `sortOrder` properties.\n * @returns {boolean}\n */\n\n }, {\n key: \"areValidSortConfigs\",\n value: function areValidSortConfigs(sortConfigs) {\n var numberOfColumns = this.hot.countCols(); // We don't translate visual indexes to physical indexes.\n\n return areValidSortStates(sortConfigs) && sortConfigs.every(function (_ref) {\n var column = _ref.column;\n return column <= numberOfColumns && column >= 0;\n });\n }\n /**\n * Saves all sorting settings. Saving works only when {@link Options#persistentState} option is enabled.\n *\n * @param {Array} sortConfigs Sort configuration for all sorted columns. Objects contain `column` and `sortOrder` properties.\n *\n * @private\n * @fires Hooks#persistentStateSave\n */\n\n }, {\n key: \"saveAllSortSettings\",\n value: function saveAllSortSettings(sortConfigs) {\n var _this4 = this;\n\n var allSortSettings = this.columnStatesManager.getAllColumnsProperties();\n\n var translateColumnToPhysical = function translateColumnToPhysical(_ref2) {\n var visualColumn = _ref2.column,\n restOfProperties = _objectWithoutProperties(_ref2, [\"column\"]);\n\n return _objectSpread({\n column: _this4.hot.toPhysicalColumn(visualColumn)\n }, restOfProperties);\n };\n\n allSortSettings.initialConfig = arrayMap(sortConfigs, translateColumnToPhysical);\n this.hot.runHooks('persistentStateSave', 'columnSorting', allSortSettings);\n }\n /**\n * Get all saved sorting settings. Loading works only when {@link Options#persistentState} option is enabled.\n *\n * @private\n * @returns {object} Previously saved sort settings.\n *\n * @fires Hooks#persistentStateLoad\n */\n\n }, {\n key: \"getAllSavedSortSettings\",\n value: function getAllSavedSortSettings() {\n var _this5 = this;\n\n var storedAllSortSettings = {};\n this.hot.runHooks('persistentStateLoad', 'columnSorting', storedAllSortSettings);\n var allSortSettings = storedAllSortSettings.value;\n\n var translateColumnToVisual = function translateColumnToVisual(_ref3) {\n var physicalColumn = _ref3.column,\n restOfProperties = _objectWithoutProperties(_ref3, [\"column\"]);\n\n return _objectSpread({\n column: _this5.hot.toVisualColumn(physicalColumn)\n }, restOfProperties);\n };\n\n if (isDefined(allSortSettings) && Array.isArray(allSortSettings.initialConfig)) {\n allSortSettings.initialConfig = arrayMap(allSortSettings.initialConfig, translateColumnToVisual);\n }\n\n return allSortSettings;\n }\n /**\n * Get next sort configuration for particular column. Object contain `column` and `sortOrder` properties.\n *\n * **Note**: Please keep in mind that returned object expose **visual** column index under the `column` key.\n *\n * @private\n * @param {number} column Visual column index.\n * @returns {undefined|object}\n */\n\n }, {\n key: \"getColumnNextConfig\",\n value: function getColumnNextConfig(column) {\n var sortOrder = this.columnStatesManager.getSortOrderOfColumn(column);\n\n if (isDefined(sortOrder)) {\n var nextSortOrder = getNextSortOrder(sortOrder);\n\n if (isDefined(nextSortOrder)) {\n return {\n column: column,\n sortOrder: nextSortOrder\n };\n }\n\n return;\n }\n\n var nrOfColumns = this.hot.countCols();\n\n if (Number.isInteger(column) && column >= 0 && column < nrOfColumns) {\n return {\n column: column,\n sortOrder: getNextSortOrder()\n };\n }\n }\n /**\n * Get sort configuration with \"next order\" for particular column.\n *\n * @private\n * @param {number} columnToChange Visual column index of column which order will be changed.\n * @param {string} strategyId ID of strategy. Possible values: 'append' and 'replace'. The first one\n * change order of particular column and change it's position in the sort queue to the last one. The second one\n * just change order of particular column.\n *\n * **Note**: Please keep in mind that returned objects expose **visual** column index under the `column` key.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getNextSortConfig\",\n value: function getNextSortConfig(columnToChange) {\n var strategyId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : APPEND_COLUMN_CONFIG_STRATEGY;\n var indexOfColumnToChange = this.columnStatesManager.getIndexOfColumnInSortQueue(columnToChange);\n var isColumnSorted = indexOfColumnToChange !== -1;\n var currentSortConfig = this.getSortConfig();\n var nextColumnConfig = this.getColumnNextConfig(columnToChange);\n\n if (isColumnSorted) {\n if (isUndefined(nextColumnConfig)) {\n return [].concat(_toConsumableArray(currentSortConfig.slice(0, indexOfColumnToChange)), _toConsumableArray(currentSortConfig.slice(indexOfColumnToChange + 1)));\n }\n\n if (strategyId === APPEND_COLUMN_CONFIG_STRATEGY) {\n return [].concat(_toConsumableArray(currentSortConfig.slice(0, indexOfColumnToChange)), _toConsumableArray(currentSortConfig.slice(indexOfColumnToChange + 1)), [nextColumnConfig]);\n } else if (strategyId === REPLACE_COLUMN_CONFIG_STRATEGY) {\n return [].concat(_toConsumableArray(currentSortConfig.slice(0, indexOfColumnToChange)), [nextColumnConfig], _toConsumableArray(currentSortConfig.slice(indexOfColumnToChange + 1)));\n }\n }\n\n if (isDefined(nextColumnConfig)) {\n return currentSortConfig.concat(nextColumnConfig);\n }\n\n return currentSortConfig;\n }\n /**\n * Get plugin's column config for the specified column index.\n *\n * @private\n * @param {object} columnConfig Configuration inside `columns` property for the specified column index.\n * @returns {object}\n */\n\n }, {\n key: \"getPluginColumnConfig\",\n value: function getPluginColumnConfig(columnConfig) {\n if (isObject(columnConfig)) {\n var pluginColumnConfig = columnConfig[this.pluginKey];\n\n if (isObject(pluginColumnConfig)) {\n return pluginColumnConfig;\n }\n }\n\n return {};\n }\n /**\n * Get plugin settings related properties, properly merged from cascade settings.\n *\n * @private\n * @param {number} column Visual column index.\n * @returns {object}\n */\n\n }, {\n key: \"getMergedPluginSettings\",\n value: function getMergedPluginSettings(column) {\n var pluginMainSettings = this.hot.getSettings()[this.pluginKey];\n var storedColumnProperties = this.columnStatesManager.getAllColumnsProperties();\n var cellMeta = this.hot.getCellMeta(0, column);\n var columnMeta = Object.getPrototypeOf(cellMeta);\n\n if (Array.isArray(columnMeta.columns)) {\n return Object.assign(storedColumnProperties, pluginMainSettings, this.getPluginColumnConfig(columnMeta.columns[column]));\n } else if (isFunction(columnMeta.columns)) {\n return Object.assign(storedColumnProperties, pluginMainSettings, this.getPluginColumnConfig(columnMeta.columns(column)));\n }\n\n return Object.assign(storedColumnProperties, pluginMainSettings);\n }\n /**\n * Get copy of settings for first cell in the column.\n *\n * @private\n * @param {number} column Visual column index.\n * @returns {object}\n */\n // TODO: Workaround. Inheriting of non-primitive cell meta values doesn't work. Instead of getting properties from column meta we call this function.\n // TODO: Remove test named: \"should not break the dataset when inserted new row\" (#5431).\n\n }, {\n key: \"getFirstCellSettings\",\n value: function getFirstCellSettings(column) {\n var cellMeta = this.hot.getCellMeta(0, column);\n var cellMetaCopy = Object.create(cellMeta);\n cellMetaCopy[this.pluginKey] = this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(column));\n return cellMetaCopy;\n }\n /**\n * Get number of rows which should be sorted.\n *\n * @private\n * @param {number} numberOfRows Total number of displayed rows.\n * @returns {number}\n */\n\n }, {\n key: \"getNumberOfRowsToSort\",\n value: function getNumberOfRowsToSort(numberOfRows) {\n var settings = this.hot.getSettings(); // `maxRows` option doesn't take into account `minSpareRows` option in this case.\n\n if (settings.maxRows <= numberOfRows) {\n return settings.maxRows;\n }\n\n return numberOfRows - settings.minSpareRows;\n }\n /**\n * Performs the sorting using a stable sort function basing on internal state of sorting.\n *\n * @param {Array} sortConfigs Sort configuration for all sorted columns. Objects contain `column` and `sortOrder` properties.\n * @private\n */\n\n }, {\n key: \"sortByPresetSortStates\",\n value: function sortByPresetSortStates(sortConfigs) {\n var _this6 = this;\n\n if (sortConfigs.length === 0) {\n this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());\n return;\n }\n\n var indexesWithData = [];\n var numberOfRows = this.hot.countRows();\n\n var getDataForSortedColumns = function getDataForSortedColumns(visualRowIndex) {\n return arrayMap(sortConfigs, function (sortConfig) {\n return _this6.hot.getDataAtCell(visualRowIndex, sortConfig.column);\n });\n };\n\n for (var visualRowIndex = 0; visualRowIndex < this.getNumberOfRowsToSort(numberOfRows); visualRowIndex += 1) {\n indexesWithData.push([this.hot.toPhysicalRow(visualRowIndex)].concat(getDataForSortedColumns(visualRowIndex)));\n }\n\n var indexesBefore = arrayMap(indexesWithData, function (indexWithData) {\n return indexWithData[0];\n });\n sort(indexesWithData, this.pluginKey, arrayMap(sortConfigs, function (sortConfig) {\n return sortConfig.sortOrder;\n }), arrayMap(sortConfigs, function (sortConfig) {\n return _this6.getFirstCellSettings(sortConfig.column);\n })); // Append spareRows\n\n for (var _visualRowIndex = indexesWithData.length; _visualRowIndex < numberOfRows; _visualRowIndex += 1) {\n indexesWithData.push([_visualRowIndex].concat(getDataForSortedColumns(_visualRowIndex)));\n }\n\n var indexesAfter = arrayMap(indexesWithData, function (indexWithData) {\n return indexWithData[0];\n });\n var indexMapping = new Map(arrayMap(indexesBefore, function (indexBefore, indexInsideArray) {\n return [indexBefore, indexesAfter[indexInsideArray]];\n }));\n var newIndexesSequence = arrayMap(this.hot.rowIndexMapper.getIndexesSequence(), function (physicalIndex) {\n if (indexMapping.has(physicalIndex)) {\n return indexMapping.get(physicalIndex);\n }\n\n return physicalIndex;\n });\n this.hot.rowIndexMapper.setIndexesSequence(newIndexesSequence);\n }\n /**\n * Load saved settings or sort by predefined plugin configuration.\n *\n * @private\n */\n\n }, {\n key: \"loadOrSortBySettings\",\n value: function loadOrSortBySettings() {\n var storedAllSortSettings = this.getAllSavedSortSettings();\n\n if (isObject(storedAllSortSettings)) {\n this.sortBySettings(storedAllSortSettings);\n } else {\n var allSortSettings = this.hot.getSettings()[this.pluginKey];\n this.sortBySettings(allSortSettings);\n }\n }\n /**\n * Sort the table by provided configuration.\n *\n * @private\n * @param {object} allSortSettings All sort config settings. Object may contain `initialConfig`, `indicator`,\n * `sortEmptyCells`, `headerAction` and `compareFunctionFactory` properties.\n */\n\n }, {\n key: \"sortBySettings\",\n value: function sortBySettings(allSortSettings) {\n if (isObject(allSortSettings)) {\n this.columnStatesManager.updateAllColumnsProperties(allSortSettings);\n var initialConfig = allSortSettings.initialConfig;\n\n if (Array.isArray(initialConfig) || isObject(initialConfig)) {\n this.sort(initialConfig);\n }\n } else {\n // Extra render for headers. Their width may change.\n this.hot.render();\n }\n }\n /**\n * Callback for the `onAfterGetColHeader` hook. Adds column sorting CSS classes.\n *\n * @private\n * @param {number} column Visual column index.\n * @param {Element} TH TH HTML element.\n */\n\n }, {\n key: \"onAfterGetColHeader\",\n value: function onAfterGetColHeader(column, TH) {\n var headerSpanElement = getHeaderSpanElement(TH);\n\n if (isFirstLevelColumnHeader(column, TH) === false || headerSpanElement === null) {\n return;\n }\n\n var pluginSettingsForColumn = this.getFirstCellSettings(column)[this.pluginKey];\n var showSortIndicator = pluginSettingsForColumn.indicator;\n var headerActionEnabled = pluginSettingsForColumn.headerAction;\n this.updateHeaderClasses(headerSpanElement, this.columnStatesManager, column, showSortIndicator, headerActionEnabled);\n }\n /**\n * Update header classes.\n *\n * @private\n * @param {HTMLElement} headerSpanElement Header span element.\n * @param {...*} args Extra arguments for helpers.\n */\n\n }, {\n key: \"updateHeaderClasses\",\n value: function updateHeaderClasses(headerSpanElement) {\n removeClass(headerSpanElement, getClassesToRemove(headerSpanElement));\n\n if (this.enabled !== false) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n addClass(headerSpanElement, getClassesToAdd.apply(void 0, args));\n }\n }\n /**\n * Overwriting base plugin's `onUpdateSettings` method. Please keep in mind that `onAfterUpdateSettings` isn't called\n * for `updateSettings` in specific situations.\n *\n * @private\n * @param {object} newSettings New settings object.\n */\n\n }, {\n key: \"onUpdateSettings\",\n value: function onUpdateSettings(newSettings) {\n _get(_getPrototypeOf(ColumnSorting.prototype), \"onUpdateSettings\", this).call(this);\n\n if (this.columnMetaCache !== null) {\n // Column meta cache base on settings, thus we should re-init the map.\n this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes());\n }\n\n if (isDefined(newSettings[this.pluginKey])) {\n this.sortBySettings(newSettings[this.pluginKey]);\n }\n }\n /**\n * Callback for the `afterLoadData` hook.\n *\n * @private\n * @param {boolean} initialLoad Flag that determines whether the data has been loaded during the initialization.\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData(initialLoad) {\n if (initialLoad === true) {\n // TODO: Workaround? It should be refactored / described.\n if (this.hot.view) {\n this.loadOrSortBySettings();\n }\n }\n }\n /**\n * Indicates if clickable header was clicked.\n *\n * @private\n * @param {MouseEvent} event The `mousedown` event.\n * @param {number} column Visual column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"wasClickableHeaderClicked\",\n value: function wasClickableHeaderClicked(event, column) {\n var pluginSettingsForColumn = this.getFirstCellSettings(column)[this.pluginKey];\n var headerActionEnabled = pluginSettingsForColumn.headerAction;\n return headerActionEnabled && event.target.nodeName === 'SPAN';\n }\n /**\n * Changes the behavior of selection / dragging.\n *\n * @private\n * @param {MouseEvent} event The `mousedown` event.\n * @param {CellCoords} coords Visual coordinates.\n * @param {HTMLElement} TD The cell element.\n * @param {object} blockCalculations A literal object which holds boolean values which controls\n * how the selection while selecting neighboring cells.\n */\n\n }, {\n key: \"onBeforeOnCellMouseDown\",\n value: function onBeforeOnCellMouseDown(event, coords, TD, blockCalculations) {\n if (wasHeaderClickedProperly(coords.row, coords.col, event) === false) {\n return;\n }\n\n if (this.wasClickableHeaderClicked(event, coords.col) && isPressedCtrlKey()) {\n blockCalculations.column = true;\n }\n }\n /**\n * Callback for the `onAfterOnCellMouseDown` hook.\n *\n * @private\n * @param {Event} event Event which are provided by hook.\n * @param {CellCoords} coords Visual coords of the selected cell.\n */\n\n }, {\n key: \"onAfterOnCellMouseDown\",\n value: function onAfterOnCellMouseDown(event, coords) {\n if (wasHeaderClickedProperly(coords.row, coords.col, event) === false) {\n return;\n }\n\n if (this.wasClickableHeaderClicked(event, coords.col)) {\n if (isPressedCtrlKey()) {\n this.hot.deselectCell();\n this.hot.selectColumns(coords.col);\n }\n\n this.sort(this.getColumnNextConfig(coords.col));\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this$columnStatesMan; // TODO: Probably not supported yet by ESLint: https://github.com/eslint/eslint/issues/11045\n // eslint-disable-next-line no-unused-expressions\n\n\n (_this$columnStatesMan = this.columnStatesManager) === null || _this$columnStatesMan === void 0 ? void 0 : _this$columnStatesMan.destroy();\n this.hot.rowIndexMapper.unregisterMap(this.pluginKey);\n this.hot.columnIndexMapper.unregisterMap(\"\".concat(this.pluginKey, \".columnMeta\"));\n\n _get(_getPrototypeOf(ColumnSorting.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ColumnSorting;\n}(BasePlugin);","import { isEmpty } from \"../../../helpers/mixed.mjs\";\nimport { DO_NOT_SWAP, FIRST_BEFORE_SECOND, FIRST_AFTER_SECOND } from \"../sortService/index.mjs\";\n/**\n * Numeric sorting compare function factory. Method get as parameters `sortOrder` and `columnMeta` and return compare function.\n *\n * @param {string} sortOrder Sort order (`asc` for ascending, `desc` for descending).\n * @param {object} columnMeta Column meta object.\n * @param {object} columnPluginSettings Plugin settings for the column.\n * @returns {Function} The compare function.\n */\n\nexport function compareFunctionFactory(sortOrder, columnMeta, columnPluginSettings) {\n return function (value, nextValue) {\n var parsedFirstValue = parseFloat(value);\n var parsedSecondValue = parseFloat(nextValue);\n var sortEmptyCells = columnPluginSettings.sortEmptyCells; // Watch out when changing this part of code! Check below returns 0 (as expected) when comparing empty string, null, undefined\n\n if (parsedFirstValue === parsedSecondValue || isNaN(parsedFirstValue) && isNaN(parsedSecondValue)) {\n return DO_NOT_SWAP;\n }\n\n if (sortEmptyCells) {\n if (isEmpty(value)) {\n return sortOrder === 'asc' ? FIRST_BEFORE_SECOND : FIRST_AFTER_SECOND;\n }\n\n if (isEmpty(nextValue)) {\n return sortOrder === 'asc' ? FIRST_AFTER_SECOND : FIRST_BEFORE_SECOND;\n }\n }\n\n if (isNaN(parsedFirstValue)) {\n return FIRST_AFTER_SECOND;\n }\n\n if (isNaN(parsedSecondValue)) {\n return FIRST_BEFORE_SECOND;\n }\n\n if (parsedFirstValue < parsedSecondValue) {\n return sortOrder === 'asc' ? FIRST_BEFORE_SECOND : FIRST_AFTER_SECOND;\n } else if (parsedFirstValue > parsedSecondValue) {\n return sortOrder === 'asc' ? FIRST_AFTER_SECOND : FIRST_BEFORE_SECOND;\n }\n\n return DO_NOT_SWAP;\n };\n}\nexport var COLUMN_DATA_TYPE = 'numeric';","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.number.to-fixed.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { warn } from \"../../helpers/console.mjs\";\n/**\n * Class used to make all endpoint-related operations.\n *\n * @class Endpoints\n * @plugin ColumnSummary\n */\n\nvar Endpoints = /*#__PURE__*/function () {\n function Endpoints(plugin, settings) {\n _classCallCheck(this, Endpoints);\n /**\n * The main plugin instance.\n */\n\n\n this.plugin = plugin;\n /**\n * Handsontable instance.\n *\n * @type {object}\n */\n\n this.hot = this.plugin.hot;\n /**\n * Array of declared plugin endpoints (calculation destination points).\n *\n * @type {Array}\n * @default {Array} Empty array.\n */\n\n this.endpoints = [];\n /**\n * The plugin settings, taken from Handsontable configuration.\n *\n * @type {object|Function}\n * @default null\n */\n\n this.settings = settings;\n /**\n * Settings type. Can be either 'array' or 'function.\n *\n * @type {string}\n * @default {'array'}\n */\n\n this.settingsType = 'array';\n /**\n * The current endpoint (calculation destination point) in question.\n *\n * @type {object}\n * @default null\n */\n\n this.currentEndpoint = null;\n /**\n * Array containing a list of changes to be applied.\n *\n * @private\n * @type {Array}\n * @default {[]}\n */\n\n this.cellsToSetCache = [];\n }\n /**\n * Get a single endpoint object.\n *\n * @param {number} index Index of the endpoint.\n * @returns {object}\n */\n\n\n _createClass(Endpoints, [{\n key: \"getEndpoint\",\n value: function getEndpoint(index) {\n if (this.settingsType === 'function') {\n return this.fillMissingEndpointData(this.settings)[index];\n }\n\n return this.endpoints[index];\n }\n /**\n * Get an array with all the endpoints.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getAllEndpoints\",\n value: function getAllEndpoints() {\n if (this.settingsType === 'function') {\n return this.fillMissingEndpointData(this.settings);\n }\n\n return this.endpoints;\n }\n /**\n * Used to fill the blanks in the endpoint data provided by a settings function.\n *\n * @private\n * @param {Function} func Function provided in the HOT settings.\n * @returns {Array} An array of endpoints.\n */\n\n }, {\n key: \"fillMissingEndpointData\",\n value: function fillMissingEndpointData(func) {\n return this.parseSettings(func.call(this));\n }\n /**\n * Parse plugin's settings.\n *\n * @param {Array} settings The settings array.\n * @returns {object[]}\n */\n\n }, {\n key: \"parseSettings\",\n value: function parseSettings(settings) {\n var _this = this;\n\n var endpointsArray = [];\n var settingsArray = settings;\n\n if (!settingsArray && typeof this.settings === 'function') {\n this.settingsType = 'function';\n return;\n }\n\n if (!settingsArray) {\n settingsArray = this.settings;\n }\n\n arrayEach(settingsArray, function (val) {\n var newEndpoint = {};\n\n _this.assignSetting(val, newEndpoint, 'ranges', [[0, _this.hot.countRows() - 1]]);\n\n _this.assignSetting(val, newEndpoint, 'reversedRowCoords', false);\n\n _this.assignSetting(val, newEndpoint, 'destinationRow', new Error(\"\\n You must provide a destination row for the Column Summary plugin in order to work properly!\\n \"));\n\n _this.assignSetting(val, newEndpoint, 'destinationColumn', new Error(\"\\n You must provide a destination column for the Column Summary plugin in order to work properly!\\n \"));\n\n _this.assignSetting(val, newEndpoint, 'sourceColumn', val.destinationColumn);\n\n _this.assignSetting(val, newEndpoint, 'type', 'sum');\n\n _this.assignSetting(val, newEndpoint, 'forceNumeric', false);\n\n _this.assignSetting(val, newEndpoint, 'suppressDataTypeErrors', true);\n\n _this.assignSetting(val, newEndpoint, 'suppressDataTypeErrors', true);\n\n _this.assignSetting(val, newEndpoint, 'customFunction', null);\n\n _this.assignSetting(val, newEndpoint, 'readOnly', true);\n\n _this.assignSetting(val, newEndpoint, 'roundFloat', false);\n\n endpointsArray.push(newEndpoint);\n });\n return endpointsArray;\n }\n /**\n * Setter for the internal setting objects.\n *\n * @param {object} settings Object with the settings.\n * @param {object} endpoint Contains information about the endpoint for the the calculation.\n * @param {string} name Settings name.\n * @param {object} defaultValue Default value for the settings.\n */\n\n }, {\n key: \"assignSetting\",\n value: function assignSetting(settings, endpoint, name, defaultValue) {\n if (name === 'ranges' && settings[name] === void 0) {\n endpoint[name] = defaultValue;\n return;\n } else if (name === 'ranges' && settings[name].length === 0) {\n return;\n }\n\n if (settings[name] === void 0) {\n if (defaultValue instanceof Error) {\n throw defaultValue;\n }\n\n endpoint[name] = defaultValue;\n } else {\n /* eslint-disable no-lonely-if */\n if (name === 'destinationRow' && endpoint.reversedRowCoords) {\n endpoint[name] = this.hot.countRows() - settings[name] - 1;\n } else {\n endpoint[name] = settings[name];\n }\n }\n }\n /**\n * Resets the endpoint setup before the structure alteration (like inserting or removing rows/columns). Used for settings provided as a function.\n *\n * @private\n * @param {string} action Type of the action performed.\n * @param {number} index Row/column index.\n * @param {number} number Number of rows/columns added/removed.\n */\n\n }, {\n key: \"resetSetupBeforeStructureAlteration\",\n value: function resetSetupBeforeStructureAlteration(action, index, number) {\n if (this.settingsType !== 'function') {\n return;\n }\n\n var type = action.indexOf('row') > -1 ? 'row' : 'col';\n var endpoints = this.getAllEndpoints();\n arrayEach(endpoints, function (val) {\n if (type === 'row' && val.destinationRow >= index) {\n if (action === 'insert_row') {\n val.alterRowOffset = number;\n } else if (action === 'remove_row') {\n val.alterRowOffset = -1 * number;\n }\n }\n\n if (type === 'col' && val.destinationColumn >= index) {\n if (action === 'insert_col') {\n val.alterColumnOffset = number;\n } else if (action === 'remove_col') {\n val.alterColumnOffset = -1 * number;\n }\n }\n });\n this.resetAllEndpoints(endpoints, false);\n }\n /**\n * AfterCreateRow/afterCreateRow/afterRemoveRow/afterRemoveCol hook callback. Reset and reenables the summary functionality\n * after changing the table structure.\n *\n * @private\n * @param {string} action Type of the action performed.\n * @param {number} index Row/column index.\n * @param {number} number Number of rows/columns added/removed.\n * @param {Array} [logicRows] Array of the logical indexes.\n * @param {string} [source] Source of change.\n * @param {boolean} [forceRefresh] `true` of the endpoints should refresh after completing the function.\n */\n\n }, {\n key: \"resetSetupAfterStructureAlteration\",\n value: function resetSetupAfterStructureAlteration(action, index, number, logicRows, source) {\n var _this2 = this;\n\n var forceRefresh = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n\n if (this.settingsType === 'function') {\n // We need to run it on a next avaiable hook, because the TrimRows' `afterCreateRow` hook triggers after this one,\n // and it needs to be run to properly calculate the endpoint value.\n var beforeRenderCallback = function beforeRenderCallback() {\n _this2.hot.removeHook('beforeRender', beforeRenderCallback);\n\n return _this2.refreshAllEndpoints();\n };\n\n this.hot.addHookOnce('beforeRender', beforeRenderCallback);\n return;\n }\n\n var type = action.indexOf('row') > -1 ? 'row' : 'col';\n var multiplier = action.indexOf('remove') > -1 ? -1 : 1;\n var endpoints = this.getAllEndpoints();\n var rowMoving = action.indexOf('move_row') === 0;\n var placeOfAlteration = index;\n arrayEach(endpoints, function (val) {\n if (type === 'row' && val.destinationRow >= placeOfAlteration) {\n val.alterRowOffset = multiplier * number;\n }\n\n if (type === 'col' && val.destinationColumn >= placeOfAlteration) {\n val.alterColumnOffset = multiplier * number;\n }\n });\n this.resetAllEndpoints(endpoints, !rowMoving);\n\n if (rowMoving) {\n arrayEach(endpoints, function (endpoint) {\n _this2.extendEndpointRanges(endpoint, placeOfAlteration, logicRows[0], logicRows.length);\n\n _this2.recreatePhysicalRanges(endpoint);\n\n _this2.clearOffsetInformation(endpoint);\n });\n } else {\n arrayEach(endpoints, function (endpoint) {\n _this2.shiftEndpointCoordinates(endpoint, placeOfAlteration);\n });\n }\n\n if (forceRefresh) {\n this.refreshAllEndpoints();\n }\n }\n /**\n * Clear the offset information from the endpoint object.\n *\n * @private\n * @param {object} endpoint And endpoint object.\n */\n\n }, {\n key: \"clearOffsetInformation\",\n value: function clearOffsetInformation(endpoint) {\n endpoint.alterRowOffset = void 0;\n endpoint.alterColumnOffset = void 0;\n }\n /**\n * Extend the row ranges for the provided endpoint.\n *\n * @private\n * @param {object} endpoint The endpoint object.\n * @param {number} placeOfAlteration Index of the row where the alteration takes place.\n * @param {number} previousPosition Previous endpoint result position.\n * @param {number} offset Offset generated by the alteration.\n */\n\n }, {\n key: \"extendEndpointRanges\",\n value: function extendEndpointRanges(endpoint, placeOfAlteration, previousPosition, offset) {\n arrayEach(endpoint.ranges, function (range) {\n // is a range, not a single row\n if (range[1]) {\n if (placeOfAlteration >= range[0] && placeOfAlteration <= range[1]) {\n if (previousPosition > range[1]) {\n range[1] += offset;\n } else if (previousPosition < range[0]) {\n range[0] -= offset;\n }\n } else if (previousPosition >= range[0] && previousPosition <= range[1]) {\n range[1] -= offset;\n\n if (placeOfAlteration <= range[0]) {\n range[0] += 1;\n range[1] += 1;\n }\n }\n }\n });\n }\n /**\n * Recreate the physical ranges for the provided endpoint. Used (for example) when a row gets moved and extends an existing range.\n *\n * @private\n * @param {object} endpoint An endpoint object.\n */\n\n }, {\n key: \"recreatePhysicalRanges\",\n value: function recreatePhysicalRanges(endpoint) {\n var _this3 = this;\n\n var ranges = endpoint.ranges;\n var newRanges = [];\n var allIndexes = [];\n arrayEach(ranges, function (range) {\n var newRange = [];\n\n if (range[1]) {\n for (var i = range[0]; i <= range[1]; i++) {\n newRange.push(_this3.hot.toPhysicalRow(i));\n }\n } else {\n newRange.push(_this3.hot.toPhysicalRow(range[0]));\n }\n\n allIndexes.push(newRange);\n });\n arrayEach(allIndexes, function (range) {\n var newRange = [];\n arrayEach(range, function (coord, index) {\n if (index === 0) {\n newRange.push(coord);\n } else if (range[index] !== range[index - 1] + 1) {\n newRange.push(range[index - 1]);\n newRanges.push(newRange);\n newRange = [];\n newRange.push(coord);\n }\n\n if (index === range.length - 1) {\n newRange.push(coord);\n newRanges.push(newRange);\n }\n });\n });\n endpoint.ranges = newRanges;\n }\n /**\n * Shifts the endpoint coordinates by the defined offset.\n *\n * @private\n * @param {object} endpoint Endpoint object.\n * @param {number} offsetStartIndex Index of the performed change (if the change is located after the endpoint, nothing about the endpoint has to be changed.\n */\n\n }, {\n key: \"shiftEndpointCoordinates\",\n value: function shiftEndpointCoordinates(endpoint, offsetStartIndex) {\n if (endpoint.alterRowOffset && endpoint.alterRowOffset !== 0) {\n endpoint.destinationRow += endpoint.alterRowOffset || 0;\n arrayEach(endpoint.ranges, function (element) {\n arrayEach(element, function (subElement, j) {\n if (subElement >= offsetStartIndex) {\n element[j] += endpoint.alterRowOffset || 0;\n }\n });\n });\n } else if (endpoint.alterColumnOffset && endpoint.alterColumnOffset !== 0) {\n endpoint.destinationColumn += endpoint.alterColumnOffset || 0;\n endpoint.sourceColumn += endpoint.alterColumnOffset || 0;\n }\n }\n /**\n * Resets (removes) the endpoints from the table.\n *\n * @param {Array} [endpoints] Array containing the endpoints.\n * @param {boolean} [useOffset=true] Use the cell offset value.\n */\n\n }, {\n key: \"resetAllEndpoints\",\n value: function resetAllEndpoints() {\n var _this4 = this;\n\n var endpoints = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAllEndpoints();\n var useOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var anyEndpointOutOfRange = endpoints.some(function (endpoint) {\n var alterRowOffset = endpoint.alterRowOffset || 0;\n var alterColOffset = endpoint.alterColumnOffset || 0;\n\n if (endpoint.destinationRow + alterRowOffset >= _this4.hot.countRows() || endpoint.destinationColumn + alterColOffset >= _this4.hot.countCols()) {\n return true;\n }\n\n return false;\n });\n\n if (anyEndpointOutOfRange) {\n return;\n }\n\n this.cellsToSetCache = [];\n arrayEach(endpoints, function (endpoint) {\n _this4.resetEndpointValue(endpoint, useOffset);\n });\n this.hot.setDataAtCell(this.cellsToSetCache, 'ColumnSummary.reset');\n this.cellsToSetCache = [];\n }\n /**\n * Calculate and refresh all defined endpoints.\n */\n\n }, {\n key: \"refreshAllEndpoints\",\n value: function refreshAllEndpoints() {\n var _this5 = this;\n\n this.cellsToSetCache = [];\n arrayEach(this.getAllEndpoints(), function (value) {\n _this5.currentEndpoint = value;\n\n _this5.plugin.calculate(value);\n\n _this5.setEndpointValue(value, 'init');\n });\n this.currentEndpoint = null;\n this.hot.setDataAtCell(this.cellsToSetCache, 'ColumnSummary.reset');\n this.cellsToSetCache = [];\n }\n /**\n * Calculate and refresh endpoints only in the changed columns.\n *\n * @param {Array} changes Array of changes from the `afterChange` hook.\n */\n\n }, {\n key: \"refreshChangedEndpoints\",\n value: function refreshChangedEndpoints(changes) {\n var _this6 = this;\n\n var needToRefresh = [];\n this.cellsToSetCache = [];\n arrayEach(changes, function (value, key, changesObj) {\n // if nothing changed, dont update anything\n if (\"\".concat(value[2] || '') === \"\".concat(value[3])) {\n return;\n }\n\n arrayEach(_this6.getAllEndpoints(), function (endpoint, j) {\n if (_this6.hot.propToCol(changesObj[key][1]) === endpoint.sourceColumn && needToRefresh.indexOf(j) === -1) {\n needToRefresh.push(j);\n }\n });\n });\n arrayEach(needToRefresh, function (value) {\n _this6.refreshEndpoint(_this6.getEndpoint(value));\n });\n this.hot.setDataAtCell(this.cellsToSetCache, 'ColumnSummary.reset');\n this.cellsToSetCache = [];\n }\n /**\n * Calculate and refresh a single endpoint.\n *\n * @param {object} endpoint Contains the endpoint information.\n */\n\n }, {\n key: \"refreshEndpoint\",\n value: function refreshEndpoint(endpoint) {\n this.currentEndpoint = endpoint;\n this.plugin.calculate(endpoint);\n this.setEndpointValue(endpoint);\n this.currentEndpoint = null;\n }\n /**\n * Reset the endpoint value.\n *\n * @param {object} endpoint Contains the endpoint information.\n * @param {boolean} [useOffset=true] Use the cell offset value.\n */\n\n }, {\n key: \"resetEndpointValue\",\n value: function resetEndpointValue(endpoint) {\n var useOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var alterRowOffset = endpoint.alterRowOffset || 0;\n var alterColOffset = endpoint.alterColumnOffset || 0;\n var _ref = [this.hot.toVisualRow(endpoint.destinationRow), this.hot.toVisualColumn(endpoint.destinationColumn)],\n visualRowIndex = _ref[0],\n visualColumnIndex = _ref[1];\n\n if (visualColumnIndex !== null && visualRowIndex !== null) {\n // Clear the meta on the \"old\" indexes\n var cellMeta = this.hot.getCellMeta(visualRowIndex, visualColumnIndex);\n cellMeta.readOnly = false;\n cellMeta.className = '';\n }\n\n this.cellsToSetCache.push([this.hot.toVisualRow(endpoint.destinationRow + (useOffset ? alterRowOffset : 0)), this.hot.toVisualColumn(endpoint.destinationColumn + (useOffset ? alterColOffset : 0)), '']);\n }\n /**\n * Set the endpoint value.\n *\n * @param {object} endpoint Contains the endpoint information.\n * @param {string} [source] Source of the call information.\n * @param {boolean} [render=false] `true` if it needs to render the table afterwards.\n */\n\n }, {\n key: \"setEndpointValue\",\n value: function setEndpointValue(endpoint, source) {\n var render = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // We'll need the reversed offset values, because cellMeta will be shifted AGAIN afterwards.\n\n var reverseRowOffset = -1 * endpoint.alterRowOffset || 0;\n var reverseColOffset = -1 * endpoint.alterColumnOffset || 0;\n var visualEndpointRowIndex = this.hot.toVisualRow(endpoint.destinationRow);\n\n if (endpoint.destinationRow >= this.hot.countRows() || endpoint.destinationColumn >= this.hot.countCols()) {\n this.throwOutOfBoundsWarning();\n return;\n }\n\n var destinationVisualRow = this.hot.toVisualRow(endpoint.destinationRow + reverseRowOffset);\n\n if (destinationVisualRow !== null) {\n var cellMeta = this.hot.getCellMeta(destinationVisualRow, endpoint.destinationColumn + reverseColOffset);\n\n if (source === 'init' || cellMeta.readOnly !== endpoint.readOnly) {\n cellMeta.readOnly = endpoint.readOnly;\n cellMeta.className = 'columnSummaryResult';\n }\n }\n\n if (endpoint.roundFloat && !isNaN(endpoint.result)) {\n endpoint.result = endpoint.result.toFixed(endpoint.roundFloat);\n }\n\n if (render) {\n this.hot.setDataAtCell(visualEndpointRowIndex, endpoint.destinationColumn, endpoint.result, 'ColumnSummary.set');\n } else {\n this.cellsToSetCache.push([visualEndpointRowIndex, endpoint.destinationColumn, endpoint.result]);\n }\n\n endpoint.alterRowOffset = void 0;\n endpoint.alterColumnOffset = void 0;\n }\n /**\n * Throw an error for the calculation range being out of boundaries.\n *\n * @private\n */\n\n }, {\n key: \"throwOutOfBoundsWarning\",\n value: function throwOutOfBoundsWarning() {\n warn('One of the Column Summary plugins\\' destination points you provided is beyond the table boundaries!');\n }\n }]);\n\n return Endpoints;\n}();\n\nexport default Endpoints;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.string.split.js\";\n\nvar _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { objectEach } from \"../../helpers/object.mjs\";\nimport Endpoints from \"./endpoints.mjs\";\nimport { toSingleLine } from \"../../helpers/templateLiteralTag.mjs\";\nexport var PLUGIN_KEY = 'columnSummary';\nexport var PLUGIN_PRIORITY = 220;\n/**\n * @plugin ColumnSummary\n *\n * @description\n * Allows making pre-defined calculations on the cell values and display the results within Handsontable.\n * [See the demo for more information](https://handsontable.com/docs/demo-summary-calculations.html).\n *\n * @example\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * colHeaders: true,\n * rowHeaders: true,\n * columnSummary: [\n * {\n * destinationRow: 4,\n * destinationColumn: 1,\n * type: 'min'\n * },\n * {\n * destinationRow: 0,\n * destinationColumn: 3,\n * reversedRowCoords: true,\n * type: 'max'\n * },\n * {\n * destinationRow: 4,\n * destinationColumn: 5,\n * type: 'sum',\n * forceNumeric: true\n * }\n * ]\n * });\n */\n\nexport var ColumnSummary = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ColumnSummary, _BasePlugin);\n\n var _super = _createSuper(ColumnSummary);\n\n function ColumnSummary(hotInstance) {\n var _this;\n\n _classCallCheck(this, ColumnSummary);\n\n _this = _super.call(this, hotInstance);\n /**\n * The Endpoints class instance. Used to make all endpoint-related operations.\n *\n * @private\n * @type {null|Endpoints}\n */\n\n _this.endpoints = null;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ColumnSummary#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ColumnSummary, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.settings = this.hot.getSettings()[PLUGIN_KEY];\n this.endpoints = new Endpoints(this, this.settings);\n this.addHook('afterInit', function () {\n return _this2.onAfterInit.apply(_this2, arguments);\n });\n this.addHook('afterChange', function () {\n return _this2.onAfterChange.apply(_this2, arguments);\n });\n this.addHook('beforeCreateRow', function (index, amount, source) {\n return _this2.endpoints.resetSetupBeforeStructureAlteration('insert_row', index, amount, null, source);\n }); // eslint-disable-line max-len\n\n this.addHook('beforeCreateCol', function (index, amount, source) {\n return _this2.endpoints.resetSetupBeforeStructureAlteration('insert_col', index, amount, null, source);\n }); // eslint-disable-line max-len\n\n this.addHook('beforeRemoveRow', function () {\n var _this2$endpoints;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_this2$endpoints = _this2.endpoints).resetSetupBeforeStructureAlteration.apply(_this2$endpoints, ['remove_row'].concat(args));\n });\n this.addHook('beforeRemoveCol', function () {\n var _this2$endpoints2;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return (_this2$endpoints2 = _this2.endpoints).resetSetupBeforeStructureAlteration.apply(_this2$endpoints2, ['remove_col'].concat(args));\n });\n this.addHook('afterCreateRow', function (index, amount, source) {\n return _this2.endpoints.resetSetupAfterStructureAlteration('insert_row', index, amount, null, source);\n }); // eslint-disable-line max-len\n\n this.addHook('afterCreateCol', function (index, amount, source) {\n return _this2.endpoints.resetSetupAfterStructureAlteration('insert_col', index, amount, null, source);\n }); // eslint-disable-line max-len\n\n this.addHook('afterRemoveRow', function () {\n var _this2$endpoints3;\n\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return (_this2$endpoints3 = _this2.endpoints).resetSetupAfterStructureAlteration.apply(_this2$endpoints3, ['remove_row'].concat(args));\n });\n this.addHook('afterRemoveCol', function () {\n var _this2$endpoints4;\n\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return (_this2$endpoints4 = _this2.endpoints).resetSetupAfterStructureAlteration.apply(_this2$endpoints4, ['remove_col'].concat(args));\n });\n this.addHook('afterRowMove', function () {\n return _this2.onAfterRowMove.apply(_this2, arguments);\n });\n\n _get(_getPrototypeOf(ColumnSummary.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.endpoints = null;\n this.settings = null;\n this.currentEndpoint = null;\n }\n /**\n * Calculates math for a single endpoint.\n *\n * @private\n * @param {object} endpoint Contains information about the endpoint.\n */\n\n }, {\n key: \"calculate\",\n value: function calculate(endpoint) {\n switch (endpoint.type.toLowerCase()) {\n case 'sum':\n endpoint.result = this.calculateSum(endpoint);\n break;\n\n case 'min':\n endpoint.result = this.calculateMinMax(endpoint, endpoint.type);\n break;\n\n case 'max':\n endpoint.result = this.calculateMinMax(endpoint, endpoint.type);\n break;\n\n case 'count':\n endpoint.result = this.countEntries(endpoint);\n break;\n\n case 'average':\n endpoint.result = this.calculateAverage(endpoint);\n break;\n\n case 'custom':\n endpoint.result = endpoint.customFunction.call(this, endpoint);\n break;\n\n default:\n break;\n }\n }\n /**\n * Calculates sum of the values contained in ranges provided in the plugin config.\n *\n * @private\n * @param {object} endpoint Contains the endpoint information.\n * @returns {number} Sum for the selected range.\n */\n\n }, {\n key: \"calculateSum\",\n value: function calculateSum(endpoint) {\n var _this3 = this;\n\n var sum = 0;\n objectEach(endpoint.ranges, function (range) {\n sum += _this3.getPartialSum(range, endpoint.sourceColumn);\n });\n return sum;\n }\n /**\n * Returns partial sum of values from a single row range.\n *\n * @private\n * @param {Array} rowRange Range for the sum.\n * @param {number} col Column index.\n * @returns {number} The partial sum.\n */\n\n }, {\n key: \"getPartialSum\",\n value: function getPartialSum(rowRange, col) {\n var sum = 0;\n var i = rowRange[1] || rowRange[0];\n var cellValue = null;\n var biggestDecimalPlacesCount = 0;\n\n do {\n cellValue = this.getCellValue(i, col) || 0;\n var decimalPlaces = (\"\".concat(cellValue).split('.')[1] || []).length || 1;\n\n if (decimalPlaces > biggestDecimalPlacesCount) {\n biggestDecimalPlacesCount = decimalPlaces;\n }\n\n sum += cellValue || 0;\n i -= 1;\n } while (i >= rowRange[0]); // Workaround for e.g. 802.2 + 1.1 = 803.3000000000001\n\n\n return Math.round(sum * Math.pow(10, biggestDecimalPlacesCount)) / Math.pow(10, biggestDecimalPlacesCount);\n }\n /**\n * Calculates the minimal value for the selected ranges.\n *\n * @private\n * @param {object} endpoint Contains the endpoint information.\n * @param {string} type `'min'` or `'max'`.\n * @returns {number} Min or Max value.\n */\n\n }, {\n key: \"calculateMinMax\",\n value: function calculateMinMax(endpoint, type) {\n var _this4 = this;\n\n var result = null;\n objectEach(endpoint.ranges, function (range) {\n var partialResult = _this4.getPartialMinMax(range, endpoint.sourceColumn, type);\n\n if (result === null && partialResult !== null) {\n result = partialResult;\n }\n\n if (partialResult !== null) {\n switch (type) {\n case 'min':\n result = Math.min(result, partialResult);\n break;\n\n case 'max':\n result = Math.max(result, partialResult);\n break;\n\n default:\n break;\n }\n }\n });\n return result === null ? 'Not enough data' : result;\n }\n /**\n * Returns a local minimum of the provided sub-range.\n *\n * @private\n * @param {Array} rowRange Range for the calculation.\n * @param {number} col Column index.\n * @param {string} type `'min'` or `'max'`.\n * @returns {number} Min or max value.\n */\n\n }, {\n key: \"getPartialMinMax\",\n value: function getPartialMinMax(rowRange, col, type) {\n var result = null;\n var i = rowRange[1] || rowRange[0];\n var cellValue;\n\n do {\n cellValue = this.getCellValue(i, col) || null;\n\n if (result === null) {\n result = cellValue;\n } else if (cellValue !== null) {\n switch (type) {\n case 'min':\n result = Math.min(result, cellValue);\n break;\n\n case 'max':\n result = Math.max(result, cellValue);\n break;\n\n default:\n break;\n }\n }\n\n i -= 1;\n } while (i >= rowRange[0]);\n\n return result;\n }\n /**\n * Counts empty cells in the provided row range.\n *\n * @private\n * @param {Array} rowRange Row range for the calculation.\n * @param {number} col Column index.\n * @returns {number} Empty cells count.\n */\n\n }, {\n key: \"countEmpty\",\n value: function countEmpty(rowRange, col) {\n var cellValue;\n var counter = 0;\n var i = rowRange[1] || rowRange[0];\n\n do {\n cellValue = this.getCellValue(i, col);\n\n if (!cellValue) {\n counter += 1;\n }\n\n i -= 1;\n } while (i >= rowRange[0]);\n\n return counter;\n }\n /**\n * Counts non-empty cells in the provided row range.\n *\n * @private\n * @param {object} endpoint Contains the endpoint information.\n * @returns {number} Entry count.\n */\n\n }, {\n key: \"countEntries\",\n value: function countEntries(endpoint) {\n var _this5 = this;\n\n var result = 0;\n var ranges = endpoint.ranges;\n objectEach(ranges, function (range) {\n var partial = range[1] === void 0 ? 1 : range[1] - range[0] + 1;\n\n var emptyCount = _this5.countEmpty(range, endpoint.sourceColumn);\n\n result += partial;\n result -= emptyCount;\n });\n return result;\n }\n /**\n * Calculates the average value from the cells in the range.\n *\n * @private\n * @param {object} endpoint Contains the endpoint information.\n * @returns {number} Avarage value.\n */\n\n }, {\n key: \"calculateAverage\",\n value: function calculateAverage(endpoint) {\n var sum = this.calculateSum(endpoint);\n var entriesCount = this.countEntries(endpoint);\n return sum / entriesCount;\n }\n /**\n * Returns a cell value, taking into consideration a basic validation.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} col Column index.\n * @returns {string} The cell value.\n */\n\n }, {\n key: \"getCellValue\",\n value: function getCellValue(row, col) {\n var visualRowIndex = this.hot.toVisualRow(row);\n var visualColumnIndex = this.hot.toVisualColumn(col);\n var cellValue = this.hot.getSourceDataAtCell(row, col);\n var cellClassName = '';\n\n if (visualRowIndex !== null && visualColumnIndex !== null) {\n cellClassName = this.hot.getCellMeta(visualRowIndex, visualColumnIndex).className || '';\n }\n\n if (cellClassName.indexOf('columnSummaryResult') > -1) {\n return null;\n }\n\n if (this.endpoints.currentEndpoint.forceNumeric) {\n if (typeof cellValue === 'string') {\n cellValue = cellValue.replace(/,/, '.');\n }\n\n cellValue = parseFloat(cellValue);\n }\n\n if (isNaN(cellValue)) {\n if (!this.endpoints.currentEndpoint.suppressDataTypeErrors) {\n throw new Error(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"ColumnSummary plugin: cell at (\", \", \", \") is not in a \\n numeric format. Cannot do the calculation.\"], [\"ColumnSummary plugin: cell at (\", \", \", \") is not in a\\\\x20\\n numeric format. Cannot do the calculation.\"])), row, col));\n }\n }\n\n return cellValue;\n }\n /**\n * `afterInit` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onAfterInit\",\n value: function onAfterInit() {\n this.endpoints.endpoints = this.endpoints.parseSettings();\n this.endpoints.refreshAllEndpoints(true);\n }\n /**\n * `afterChange` hook callback.\n *\n * @private\n * @param {Array} changes 2D array containing information about each of the edited cells.\n * @param {string} source The string that identifies source of changes.\n */\n\n }, {\n key: \"onAfterChange\",\n value: function onAfterChange(changes, source) {\n if (changes && source !== 'ColumnSummary.reset' && source !== 'ColumnSummary.set' && source !== 'loadData') {\n this.endpoints.refreshChangedEndpoints(changes);\n }\n }\n /**\n * `beforeRowMove` hook callback.\n *\n * @private\n * @param {Array} rows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/docs/demo-moving.html).\n */\n\n }, {\n key: \"onAfterRowMove\",\n value: function onAfterRowMove(rows, finalIndex) {\n this.endpoints.resetSetupBeforeStructureAlteration('move_row', rows[0], rows.length, rows, this.pluginName);\n this.endpoints.resetSetupAfterStructureAlteration('move_row', finalIndex, rows.length, rows, this.pluginName);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ColumnSummary;\n}(BasePlugin);","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { addClass } from \"../../helpers/dom/element.mjs\";\n/**\n * Comment editor for the Comments plugin.\n *\n * @class CommentEditor\n * @plugin Comments\n */\n\nvar CommentEditor = /*#__PURE__*/function () {\n function CommentEditor(rootDocument) {\n _classCallCheck(this, CommentEditor);\n\n this.container = null;\n this.rootDocument = rootDocument;\n this.editor = this.createEditor();\n this.editorStyle = this.editor.style;\n this.hidden = true;\n this.hide();\n }\n /**\n * Set position of the comments editor according to the provided x and y coordinates.\n *\n * @param {number} x X position (in pixels).\n * @param {number} y Y position (in pixels).\n */\n\n\n _createClass(CommentEditor, [{\n key: \"setPosition\",\n value: function setPosition(x, y) {\n this.editorStyle.left = \"\".concat(x, \"px\");\n this.editorStyle.top = \"\".concat(y, \"px\");\n }\n /**\n * Set the editor size according to the provided arguments.\n *\n * @param {number} width Width in pixels.\n * @param {number} height Height in pixels.\n */\n\n }, {\n key: \"setSize\",\n value: function setSize(width, height) {\n if (width && height) {\n var input = this.getInputElement();\n input.style.width = \"\".concat(width, \"px\");\n input.style.height = \"\".concat(height, \"px\");\n }\n }\n /**\n * Reset the editor size to its initial state.\n */\n\n }, {\n key: \"resetSize\",\n value: function resetSize() {\n var input = this.getInputElement();\n input.style.width = '';\n input.style.height = '';\n }\n /**\n * Set the read-only state for the comments editor.\n *\n * @param {boolean} state The new read only state.\n */\n\n }, {\n key: \"setReadOnlyState\",\n value: function setReadOnlyState(state) {\n var input = this.getInputElement();\n input.readOnly = state;\n }\n /**\n * Show the comments editor.\n */\n\n }, {\n key: \"show\",\n value: function show() {\n this.editorStyle.display = 'block';\n this.hidden = false;\n }\n /**\n * Hide the comments editor.\n */\n\n }, {\n key: \"hide\",\n value: function hide() {\n this.editorStyle.display = 'none';\n this.hidden = true;\n }\n /**\n * Checks if the editor is visible.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isVisible\",\n value: function isVisible() {\n return this.editorStyle.display === 'block';\n }\n /**\n * Set the comment value.\n *\n * @param {string} [value] The value to use.\n */\n\n }, {\n key: \"setValue\",\n value: function setValue() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var comment = value || '';\n this.getInputElement().value = comment;\n }\n /**\n * Get the comment value.\n *\n * @returns {string}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.getInputElement().value;\n }\n /**\n * Checks if the comment input element is focused.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isFocused\",\n value: function isFocused() {\n return this.rootDocument.activeElement === this.getInputElement();\n }\n /**\n * Focus the comments input element.\n */\n\n }, {\n key: \"focus\",\n value: function focus() {\n this.getInputElement().focus();\n }\n /**\n * Create the `textarea` to be used as a comments editor.\n *\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"createEditor\",\n value: function createEditor() {\n var editor = this.rootDocument.createElement('div');\n var textArea = this.rootDocument.createElement('textarea');\n this.container = this.rootDocument.querySelector(\".\".concat(CommentEditor.CLASS_EDITOR_CONTAINER));\n\n if (!this.container) {\n this.container = this.rootDocument.createElement('div');\n addClass(this.container, CommentEditor.CLASS_EDITOR_CONTAINER);\n this.rootDocument.body.appendChild(this.container);\n }\n\n addClass(editor, CommentEditor.CLASS_EDITOR);\n addClass(textArea, CommentEditor.CLASS_INPUT);\n editor.appendChild(textArea);\n this.container.appendChild(editor);\n return editor;\n }\n /**\n * Get the input element.\n *\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"getInputElement\",\n value: function getInputElement() {\n return this.editor.querySelector(\".\".concat(CommentEditor.CLASS_INPUT));\n }\n /**\n * Destroy the comments editor.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n var containerParentElement = this.container ? this.container.parentNode : null;\n this.editor.parentNode.removeChild(this.editor);\n this.editor = null;\n this.editorStyle = null;\n\n if (containerParentElement) {\n containerParentElement.removeChild(this.container);\n }\n }\n }], [{\n key: \"CLASS_EDITOR_CONTAINER\",\n get: function get() {\n return 'htCommentsContainer';\n }\n }, {\n key: \"CLASS_EDITOR\",\n get: function get() {\n return 'htComments';\n }\n }, {\n key: \"CLASS_INPUT\",\n get: function get() {\n return 'htCommentTextArea';\n }\n }, {\n key: \"CLASS_CELL\",\n get: function get() {\n return 'htCommentCell';\n }\n }]);\n\n return CommentEditor;\n}();\n\nexport default CommentEditor;","export var KEY = '---------';\n/**\n * @returns {object}\n */\n\nexport default function separatorItem() {\n return {\n name: KEY\n };\n}","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.reverse.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport { arrayEach, arrayMap } from \"../../helpers/array.mjs\";\nimport { hasClass } from \"../../helpers/dom/element.mjs\";\nimport { KEY as SEPARATOR } from \"./predefinedItems/separator.mjs\";\n/**\n * @param {CellRange[]} selRanges An array of the cell ranges.\n * @returns {object[]}\n */\n\nexport function normalizeSelection(selRanges) {\n return arrayMap(selRanges, function (range) {\n return {\n start: range.getTopLeftCorner(),\n end: range.getBottomRightCorner()\n };\n });\n}\n/**\n * @param {HTMLElement} cell The HTML cell element to check.\n * @returns {boolean}\n */\n\nexport function isSeparator(cell) {\n return hasClass(cell, 'htSeparator');\n}\n/**\n * @param {HTMLElement} cell The HTML cell element to check.\n * @returns {boolean}\n */\n\nexport function hasSubMenu(cell) {\n return hasClass(cell, 'htSubmenu');\n}\n/**\n * @param {HTMLElement} cell The HTML cell element to check.\n * @returns {boolean}\n */\n\nexport function isDisabled(cell) {\n return hasClass(cell, 'htDisabled');\n}\n/**\n * @param {HTMLElement} cell The HTML cell element to check.\n * @returns {boolean}\n */\n\nexport function isSelectionDisabled(cell) {\n return hasClass(cell, 'htSelectionDisabled');\n}\n/**\n * @param {Core} hot The Handsontable instance.\n * @returns {Array[]|null}\n */\n\nexport function getValidSelection(hot) {\n var selected = hot.getSelected();\n\n if (!selected) {\n return null;\n }\n\n if (selected[0] < 0) {\n return null;\n }\n\n return selected;\n}\n/**\n * @param {string} className The full element class name to process.\n * @param {string} alignment The slignment class name to compare with.\n * @returns {string}\n */\n\nexport function prepareVerticalAlignClass(className, alignment) {\n if (className.indexOf(alignment) !== -1) {\n return className;\n }\n\n var replacedClassName = className.replace('htTop', '').replace('htMiddle', '').replace('htBottom', '').replace(' ', '');\n return \"\".concat(replacedClassName, \" \").concat(alignment);\n}\n/**\n * @param {string} className The full element class name to process.\n * @param {string} alignment The slignment class name to compare with.\n * @returns {string}\n */\n\nexport function prepareHorizontalAlignClass(className, alignment) {\n if (className.indexOf(alignment) !== -1) {\n return className;\n }\n\n var replacedClassName = className.replace('htLeft', '').replace('htCenter', '').replace('htRight', '').replace('htJustify', '').replace(' ', '');\n return \"\".concat(replacedClassName, \" \").concat(alignment);\n}\n/**\n * @param {CellRange[]} ranges An array of the cell ranges.\n * @param {Function} callback The callback function.\n * @returns {object}\n */\n\nexport function getAlignmentClasses(ranges, callback) {\n var classes = {};\n arrayEach(ranges, function (range) {\n range.forAll(function (row, col) {\n // Alignment classes should only collected within cell ranges. We skip header coordinates.\n if (row >= 0 && col >= 0) {\n if (!classes[row]) {\n classes[row] = [];\n }\n\n classes[row][col] = callback(row, col);\n }\n });\n });\n return classes;\n}\n/**\n * @param {CellRange[]} ranges An array of the cell ranges.\n * @param {string} type The type of the alignment axis ('horizontal' or 'vertical').\n * @param {string} alignment CSS class name to add.\n * @param {Function} cellDescriptor The function which fetches the cell meta object based in passed coordinates.\n * @param {Function} propertySetter The function which contains logic for added/removed alignment.\n */\n\nexport function align(ranges, type, alignment, cellDescriptor, propertySetter) {\n arrayEach(ranges, function (range) {\n range.forAll(function (row, col) {\n // Alignment classes should only collected within cell ranges. We skip header coordinates.\n if (row >= 0 && col >= 0) {\n applyAlignClassName(row, col, type, alignment, cellDescriptor, propertySetter);\n }\n });\n });\n}\n/**\n * @param {number} row The visual row index.\n * @param {number} col The visual column index.\n * @param {string} type The type of the alignment axis ('horizontal' or 'vertical').\n * @param {string} alignment CSS class name to add.\n * @param {Function} cellDescriptor The function which fetches the cell meta object based in passed coordinates.\n * @param {Function} propertySetter The function which contains logic for added/removed alignment.\n */\n\nfunction applyAlignClassName(row, col, type, alignment, cellDescriptor, propertySetter) {\n var cellMeta = cellDescriptor(row, col);\n var className = alignment;\n\n if (cellMeta.className) {\n if (type === 'vertical') {\n className = prepareVerticalAlignClass(cellMeta.className, alignment);\n } else {\n className = prepareHorizontalAlignClass(cellMeta.className, alignment);\n }\n }\n\n propertySetter(row, col, 'className', className);\n}\n/**\n * @param {CellRange[]} ranges An array of the cell ranges.\n * @param {Function} comparator The comparator function.\n * @returns {boolean}\n */\n\n\nexport function checkSelectionConsistency(ranges, comparator) {\n var result = false;\n\n if (Array.isArray(ranges)) {\n arrayEach(ranges, function (range) {\n range.forAll(function (row, col) {\n // Selection consistency should only check within cell ranges. We skip header coordinates.\n if (row >= 0 && col >= 0 && comparator(row, col)) {\n result = true;\n return false;\n }\n });\n return result;\n });\n }\n\n return result;\n}\n/**\n * @param {string} label The label text.\n * @returns {string}\n */\n\nexport function markLabelAsSelected(label) {\n // workaround for https://github.com/handsontable/handsontable/issues/1946\n return \"\".concat(String.fromCharCode(10003), \" \").concat(label);\n}\n/**\n * @param {object} item The object which describes the context menu item properties.\n * @param {Core} instance The Handsontable instance.\n * @returns {boolean}\n */\n\nexport function isItemHidden(item, instance) {\n return !item.hidden || !(typeof item.hidden === 'function' && item.hidden.call(instance));\n}\n/**\n * @param {object[]} items The context menu items collection.\n * @param {string} separator The string which identifies the context menu separator item.\n * @returns {object[]}\n */\n\nfunction shiftSeparators(items, separator) {\n var result = items.slice(0);\n\n for (var i = 0; i < result.length;) {\n if (result[i].name === separator) {\n result.shift();\n } else {\n break;\n }\n }\n\n return result;\n}\n/**\n * @param {object[]} items The context menu items collection.\n * @param {string} separator The string which identifies the context menu separator item.\n * @returns {object[]}\n */\n\n\nfunction popSeparators(items, separator) {\n var result = items.slice(0);\n result.reverse();\n result = shiftSeparators(result, separator);\n result.reverse();\n return result;\n}\n/**\n * Removes duplicated menu separators from the context menu items collection.\n *\n * @param {object[]} items The context menu items collection.\n * @returns {object[]}\n */\n\n\nfunction removeDuplicatedSeparators(items) {\n var result = [];\n arrayEach(items, function (value, index) {\n if (index > 0) {\n if (result[result.length - 1].name !== value.name) {\n result.push(value);\n }\n } else {\n result.push(value);\n }\n });\n return result;\n}\n/**\n * Removes menu separators from the context menu items collection.\n *\n * @param {object[]} items The context menu items collection.\n * @param {string} separator The string which identifies the context menu separator item.\n * @returns {object[]}\n */\n\n\nexport function filterSeparators(items) {\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SEPARATOR;\n var result = items.slice(0);\n result = shiftSeparators(result, separator);\n result = popSeparators(result, separator);\n result = removeDuplicatedSeparators(result);\n return result;\n}","import \"core-js/modules/web.timers.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { debounce } from \"../../helpers/function.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nvar DEFAULT_DISPLAY_DELAY = 250;\nvar DEFAULT_HIDE_DELAY = 250;\n/**\n * Display switch for the Comments plugin. Manages the time of delayed displaying / hiding comments.\n *\n * @class DisplaySwitch\n * @plugin Comments\n */\n\nvar DisplaySwitch = /*#__PURE__*/function () {\n function DisplaySwitch(displayDelay) {\n _classCallCheck(this, DisplaySwitch);\n /**\n * Flag to determine if comment can be showed or hidden. State `true` mean that last performed action\n * was an attempt to show comment element. State `false` mean that it was attempt to hide comment element.\n *\n * @type {boolean}\n */\n\n\n this.wasLastActionShow = true;\n /**\n * Show comment after predefined delay. It keeps reference to immutable `debounce` function.\n *\n * @type {Function}\n */\n\n this.showDebounced = null;\n /**\n * Reference to timer, run by `setTimeout`, which is hiding comment.\n *\n * @type {number}\n */\n\n this.hidingTimer = null;\n this.updateDelay(displayDelay);\n }\n /**\n * Responsible for hiding comment after proper delay.\n */\n\n\n _createClass(DisplaySwitch, [{\n key: \"hide\",\n value: function hide() {\n var _this = this;\n\n this.wasLastActionShow = false;\n this.hidingTimer = setTimeout(function () {\n if (_this.wasLastActionShow === false) {\n _this.runLocalHooks('hide');\n }\n }, DEFAULT_HIDE_DELAY);\n }\n /**\n * Responsible for showing comment after proper delay.\n *\n * @param {object} range Coordinates of selected cell.\n */\n\n }, {\n key: \"show\",\n value: function show(range) {\n this.wasLastActionShow = true;\n this.showDebounced(range);\n }\n /**\n * Cancel hiding comment.\n */\n\n }, {\n key: \"cancelHiding\",\n value: function cancelHiding() {\n this.wasLastActionShow = true;\n clearTimeout(this.hidingTimer);\n this.hidingTimer = null;\n }\n /**\n * Update the switch settings.\n *\n * @param {number} displayDelay Delay of showing the comments (in milliseconds).\n */\n\n }, {\n key: \"updateDelay\",\n value: function updateDelay() {\n var _this2 = this;\n\n var displayDelay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_DISPLAY_DELAY;\n this.showDebounced = debounce(function (range) {\n if (_this2.wasLastActionShow) {\n _this2.runLocalHooks('show', range.from.row, range.from.col);\n }\n }, displayDelay);\n }\n /**\n * Destroy the switcher.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.clearLocalHooks();\n }\n }]);\n\n return DisplaySwitch;\n}();\n\nmixin(DisplaySwitch, localHooks);\nexport default DisplaySwitch;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass, closest, isChildOf, hasClass, offset, outerWidth, outerHeight } from \"../../helpers/dom/element.mjs\";\nimport { deepClone, deepExtend, isObject } from \"../../helpers/object.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { CellCoords } from \"../../3rdparty/walkontable/src/index.mjs\";\nimport { BasePlugin } from \"../base/index.mjs\";\nimport CommentEditor from \"./commentEditor.mjs\";\nimport { checkSelectionConsistency, markLabelAsSelected } from \"../contextMenu/utils.mjs\";\nimport DisplaySwitch from \"./displaySwitch.mjs\";\nimport * as C from \"../../i18n/constants.mjs\";\nexport var PLUGIN_KEY = 'comments';\nexport var PLUGIN_PRIORITY = 60;\nvar privatePool = new WeakMap();\nvar META_COMMENT = 'comment';\nvar META_COMMENT_VALUE = 'value';\nvar META_STYLE = 'style';\nvar META_READONLY = 'readOnly';\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @class Comments\n * @plugin Comments\n *\n * @description\n * This plugin allows setting and managing cell comments by either an option in the context menu or with the use of\n * the API.\n *\n * To enable the plugin, you'll need to set the comments property of the config object to `true`:\n * ```js\n * comments: true\n * ```\n *\n * or an object with extra predefined plugin config:\n *\n * ```js\n * comments: {\n * displayDelay: 1000\n * }\n * ```\n *\n * To add comments at the table initialization, define the `comment` property in the `cell` config array as in an example below.\n *\n * @example\n *\n * ```js\n * const hot = new Handsontable(document.getElementById('example'), {\n * data: getData(),\n * comments: true,\n * cell: [\n * {row: 1, col: 1, comment: {value: 'Foo'}},\n * {row: 2, col: 2, comment: {value: 'Bar'}}\n * ]\n * });\n *\n * // Access to the Comments plugin instance:\n * const commentsPlugin = hot.getPlugin('comments');\n *\n * // Manage comments programmatically:\n * commentsPlugin.setCommentAtCell(1, 6, 'Comment contents');\n * commentsPlugin.showAtCell(1, 6);\n * commentsPlugin.removeCommentAtCell(1, 6);\n *\n * // You can also set range once and use proper methods:\n * commentsPlugin.setRange({from: {row: 1, col: 6}});\n * commentsPlugin.setComment('Comment contents');\n * commentsPlugin.show();\n * commentsPlugin.removeComment();\n * ```\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nexport var Comments = /*#__PURE__*/function (_BasePlugin) {\n _inherits(Comments, _BasePlugin);\n\n var _super = _createSuper(Comments);\n\n function Comments(hotInstance) {\n var _this;\n\n _classCallCheck(this, Comments);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of {@link CommentEditor}.\n *\n * @private\n * @type {CommentEditor}\n */\n\n _this.editor = null;\n /**\n * Instance of {@link DisplaySwitch}.\n *\n * @private\n * @type {DisplaySwitch}\n */\n\n _this.displaySwitch = null;\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n\n _this.eventManager = null;\n /**\n * Current cell range, an object with `from` property, with `row` and `col` properties (e.q. `{from: {row: 1, col: 6}}`).\n *\n * @type {object}\n */\n\n _this.range = {};\n /**\n * @private\n * @type {boolean}\n */\n\n _this.mouseDown = false;\n /**\n * @private\n * @type {boolean}\n */\n\n _this.contextMenuEvent = false;\n /**\n * @private\n * @type {*}\n */\n\n _this.timer = null;\n privatePool.set(_assertThisInitialized(_this), {\n tempEditorDimensions: {},\n cellBelowCursor: null\n });\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link Comments#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(Comments, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n if (!this.editor) {\n this.editor = new CommentEditor(this.hot.rootDocument);\n }\n\n if (!this.eventManager) {\n this.eventManager = new EventManager(this);\n }\n\n if (!this.displaySwitch) {\n this.displaySwitch = new DisplaySwitch(this.getDisplayDelaySetting());\n }\n\n this.addHook('afterContextMenuDefaultOptions', function (options) {\n return _this2.addToContextMenu(options);\n });\n this.addHook('afterRenderer', function (TD, row, col, prop, value, cellProperties) {\n return _this2.onAfterRenderer(TD, cellProperties);\n });\n this.addHook('afterScrollHorizontally', function () {\n return _this2.hide();\n });\n this.addHook('afterScrollVertically', function () {\n return _this2.hide();\n });\n this.addHook('afterBeginEditing', function () {\n return _this2.onAfterBeginEditing();\n });\n this.displaySwitch.addLocalHook('hide', function () {\n return _this2.hide();\n });\n this.displaySwitch.addLocalHook('show', function (row, col) {\n return _this2.showAtCell(row, col);\n });\n this.registerListeners();\n\n _get(_getPrototypeOf(Comments.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(Comments.prototype), \"updatePlugin\", this).call(this);\n\n this.displaySwitch.updateDelay(this.getDisplayDelaySetting());\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n _get(_getPrototypeOf(Comments.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Registers all necessary DOM listeners.\n *\n * @private\n */\n\n }, {\n key: \"registerListeners\",\n value: function registerListeners() {\n var _this3 = this;\n\n var rootDocument = this.hot.rootDocument;\n this.eventManager.addEventListener(rootDocument, 'mouseover', function (event) {\n return _this3.onMouseOver(event);\n });\n this.eventManager.addEventListener(rootDocument, 'mousedown', function (event) {\n return _this3.onMouseDown(event);\n });\n this.eventManager.addEventListener(rootDocument, 'mouseup', function () {\n return _this3.onMouseUp();\n });\n this.eventManager.addEventListener(this.editor.getInputElement(), 'blur', function () {\n return _this3.onEditorBlur();\n });\n this.eventManager.addEventListener(this.editor.getInputElement(), 'mousedown', function (event) {\n return _this3.onEditorMouseDown(event);\n });\n this.eventManager.addEventListener(this.editor.getInputElement(), 'mouseup', function (event) {\n return _this3.onEditorMouseUp(event);\n });\n }\n /**\n * Sets the current cell range to be able to use general methods like {@link Comments#setComment}, {@link Comments#removeComment}, {@link Comments#show}.\n *\n * @param {object} range Object with `from` property, each with `row` and `col` properties.\n */\n\n }, {\n key: \"setRange\",\n value: function setRange(range) {\n this.range = range;\n }\n /**\n * Clears the currently selected cell.\n */\n\n }, {\n key: \"clearRange\",\n value: function clearRange() {\n this.range = {};\n }\n /**\n * Checks if the event target is a cell containing a comment.\n *\n * @private\n * @param {Event} event DOM event.\n * @returns {boolean}\n */\n\n }, {\n key: \"targetIsCellWithComment\",\n value: function targetIsCellWithComment(event) {\n var closestCell = closest(event.target, 'TD', 'TBODY');\n return !!(closestCell && hasClass(closestCell, 'htCommentCell') && closest(closestCell, [this.hot.rootElement]));\n }\n /**\n * Checks if the event target is a comment textarea.\n *\n * @private\n * @param {Event} event DOM event.\n * @returns {boolean}\n */\n\n }, {\n key: \"targetIsCommentTextArea\",\n value: function targetIsCommentTextArea(event) {\n return this.editor.getInputElement() === event.target;\n }\n /**\n * Sets a comment for a cell according to the previously set range (see {@link Comments#setRange}).\n *\n * @param {string} value Comment contents.\n */\n\n }, {\n key: \"setComment\",\n value: function setComment(value) {\n if (!this.range.from) {\n throw new Error('Before using this method, first set cell range (hot.getPlugin(\"comment\").setRange())');\n }\n\n var editorValue = this.editor.getValue();\n var comment = '';\n\n if (value !== null && value !== void 0) {\n comment = value;\n } else if (editorValue !== null && editorValue !== void 0) {\n comment = editorValue;\n }\n\n var row = this.range.from.row;\n var col = this.range.from.col;\n this.updateCommentMeta(row, col, _defineProperty({}, META_COMMENT_VALUE, comment));\n this.hot.render();\n }\n /**\n * Sets a comment for a specified cell.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} value Comment contents.\n */\n\n }, {\n key: \"setCommentAtCell\",\n value: function setCommentAtCell(row, column, value) {\n this.setRange({\n from: new CellCoords(row, column)\n });\n this.setComment(value);\n }\n /**\n * Removes a comment from a cell according to previously set range (see {@link Comments#setRange}).\n *\n * @param {boolean} [forceRender=true] If set to `true`, the table will be re-rendered at the end of the operation.\n */\n\n }, {\n key: \"removeComment\",\n value: function removeComment() {\n var forceRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (!this.range.from) {\n throw new Error('Before using this method, first set cell range (hot.getPlugin(\"comment\").setRange())');\n }\n\n this.hot.setCellMeta(this.range.from.row, this.range.from.col, META_COMMENT, void 0);\n\n if (forceRender) {\n this.hot.render();\n }\n\n this.hide();\n }\n /**\n * Removes a comment from a specified cell.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {boolean} [forceRender=true] If `true`, the table will be re-rendered at the end of the operation.\n */\n\n }, {\n key: \"removeCommentAtCell\",\n value: function removeCommentAtCell(row, column) {\n var forceRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n this.setRange({\n from: new CellCoords(row, column)\n });\n this.removeComment(forceRender);\n }\n /**\n * Gets comment from a cell according to previously set range (see {@link Comments#setRange}).\n *\n * @returns {string|undefined} Returns a content of the comment.\n */\n\n }, {\n key: \"getComment\",\n value: function getComment() {\n var row = this.range.from.row;\n var column = this.range.from.col;\n return this.getCommentMeta(row, column, META_COMMENT_VALUE);\n }\n /**\n * Gets comment from a cell at the provided coordinates.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @returns {string|undefined} Returns a content of the comment.\n */\n\n }, {\n key: \"getCommentAtCell\",\n value: function getCommentAtCell(row, column) {\n return this.getCommentMeta(row, column, META_COMMENT_VALUE);\n }\n /**\n * Shows the comment editor accordingly to the previously set range (see {@link Comments#setRange}).\n *\n * @returns {boolean} Returns `true` if comment editor was shown.\n */\n\n }, {\n key: \"show\",\n value: function show() {\n if (!this.range.from) {\n throw new Error('Before using this method, first set cell range (hot.getPlugin(\"comment\").setRange())');\n }\n\n var _this$range$from = this.range.from,\n row = _this$range$from.row,\n col = _this$range$from.col;\n\n if (row < 0 || row > this.hot.countSourceRows() - 1 || col < 0 || col > this.hot.countSourceCols() - 1) {\n return false;\n }\n\n var meta = this.hot.getCellMeta(this.range.from.row, this.range.from.col);\n this.refreshEditor(true);\n this.editor.setValue(meta[META_COMMENT] ? meta[META_COMMENT][META_COMMENT_VALUE] : null || '');\n\n if (this.editor.hidden) {\n this.editor.show();\n }\n\n return true;\n }\n /**\n * Shows comment editor according to cell coordinates.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @returns {boolean} Returns `true` if comment editor was shown.\n */\n\n }, {\n key: \"showAtCell\",\n value: function showAtCell(row, column) {\n this.setRange({\n from: new CellCoords(row, column)\n });\n return this.show();\n }\n /**\n * Hides the comment editor.\n */\n\n }, {\n key: \"hide\",\n value: function hide() {\n if (!this.editor.hidden) {\n this.editor.hide();\n }\n }\n /**\n * Refreshes comment editor position and styling.\n *\n * @param {boolean} [force=false] If `true` then recalculation will be forced.\n */\n\n }, {\n key: \"refreshEditor\",\n value: function refreshEditor() {\n var _renderableRow, _renderableColumn;\n\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!force && (!this.range.from || !this.editor.isVisible())) {\n return;\n }\n\n var _this$hot = this.hot,\n rowIndexMapper = _this$hot.rowIndexMapper,\n columnIndexMapper = _this$hot.columnIndexMapper;\n var _this$range$from2 = this.range.from,\n visualRow = _this$range$from2.row,\n visualColumn = _this$range$from2.col;\n var renderableRow = rowIndexMapper.getRenderableFromVisualIndex(visualRow);\n var renderableColumn = columnIndexMapper.getRenderableFromVisualIndex(visualColumn); // Used when the requested row is hidden, and the editor needs to be positioned on the previous row's coords.\n\n var targetingPreviousRow = renderableRow === null;\n\n if (renderableRow === null) {\n renderableRow = rowIndexMapper.getRenderableFromVisualIndex(rowIndexMapper.getFirstNotHiddenIndex(visualRow, -1));\n }\n\n if (renderableColumn === null) {\n renderableColumn = columnIndexMapper.getRenderableFromVisualIndex(columnIndexMapper.getFirstNotHiddenIndex(visualColumn, -1));\n }\n\n var isBeforeRenderedRows = renderableRow === null;\n var isBeforeRenderedColumns = renderableColumn === null;\n renderableRow = (_renderableRow = renderableRow) !== null && _renderableRow !== void 0 ? _renderableRow : 0;\n renderableColumn = (_renderableColumn = renderableColumn) !== null && _renderableColumn !== void 0 ? _renderableColumn : 0;\n var _this$hot2 = this.hot,\n rootWindow = _this$hot2.rootWindow,\n wt = _this$hot2.view.wt;\n var wtTable = wt.wtTable,\n wtOverlays = wt.wtOverlays,\n wtViewport = wt.wtViewport;\n var scrollableElement = wtOverlays.scrollableElement;\n var TD = wtTable.getCell({\n row: renderableRow,\n col: renderableColumn\n });\n var cellOffset = offset(TD);\n var lastColWidth = isBeforeRenderedColumns ? 0 : wtTable.getStretchedColumnWidth(renderableColumn);\n var lastRowHeight = targetingPreviousRow && !isBeforeRenderedRows ? outerHeight(TD) : 0;\n var cellTopOffset = cellOffset.top;\n var cellLeftOffset = cellOffset.left;\n\n if (wtViewport.hasVerticalScroll() && scrollableElement !== rootWindow) {\n cellTopOffset -= wtOverlays.topOverlay.getScrollPosition();\n }\n\n if (wtViewport.hasHorizontalScroll() && scrollableElement !== rootWindow) {\n cellLeftOffset -= wtOverlays.leftOverlay.getScrollPosition();\n }\n\n var x = cellLeftOffset + lastColWidth;\n var y = cellTopOffset + lastRowHeight;\n var commentStyle = this.getCommentMeta(visualRow, visualColumn, META_STYLE);\n var readOnly = this.getCommentMeta(visualRow, visualColumn, META_READONLY);\n\n if (commentStyle) {\n this.editor.setSize(commentStyle.width, commentStyle.height);\n } else {\n this.editor.resetSize();\n }\n\n this.editor.setReadOnlyState(readOnly);\n this.editor.setPosition(x, y);\n }\n /**\n * Checks if there is a comment for selected range.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"checkSelectionCommentsConsistency\",\n value: function checkSelectionCommentsConsistency() {\n var selected = this.hot.getSelectedRangeLast();\n\n if (!selected) {\n return false;\n }\n\n var hasComment = false;\n var cell = selected.getTopLeftCorner(); // IN EXCEL THERE IS COMMENT ONLY FOR TOP LEFT CELL IN SELECTION\n\n if (this.getCommentMeta(cell.row, cell.col, META_COMMENT_VALUE)) {\n hasComment = true;\n }\n\n return hasComment;\n }\n /**\n * Sets or update the comment-related cell meta.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {object} metaObject Object defining all the comment-related meta information.\n */\n\n }, {\n key: \"updateCommentMeta\",\n value: function updateCommentMeta(row, column, metaObject) {\n var oldComment = this.hot.getCellMeta(row, column)[META_COMMENT];\n var newComment;\n\n if (oldComment) {\n newComment = deepClone(oldComment);\n deepExtend(newComment, metaObject);\n } else {\n newComment = metaObject;\n }\n\n this.hot.setCellMeta(row, column, META_COMMENT, newComment);\n }\n /**\n * Gets the comment related meta information.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} property Cell meta property.\n * @returns {Mixed}\n */\n\n }, {\n key: \"getCommentMeta\",\n value: function getCommentMeta(row, column, property) {\n var cellMeta = this.hot.getCellMeta(row, column);\n\n if (!cellMeta[META_COMMENT]) {\n return void 0;\n }\n\n return cellMeta[META_COMMENT][property];\n }\n /**\n * `mousedown` event callback.\n *\n * @private\n * @param {MouseEvent} event The `mousedown` event.\n */\n\n }, {\n key: \"onMouseDown\",\n value: function onMouseDown(event) {\n this.mouseDown = true;\n\n if (!this.hot.view || !this.hot.view.wt) {\n return;\n }\n\n if (!this.contextMenuEvent && !this.targetIsCommentTextArea(event)) {\n var eventCell = closest(event.target, 'TD', 'TBODY');\n var coordinates = null;\n\n if (eventCell) {\n coordinates = this.hot.view.wt.wtTable.getCoords(eventCell);\n coordinates = {\n row: this.hot.rowIndexMapper.getVisualFromRenderableIndex(coordinates.row),\n col: this.hot.columnIndexMapper.getVisualFromRenderableIndex(coordinates.col)\n };\n }\n\n if (!eventCell || this.range.from && coordinates && (this.range.from.row !== coordinates.row || this.range.from.col !== coordinates.col)) {\n this.hide();\n }\n }\n\n this.contextMenuEvent = false;\n }\n /**\n * `mouseover` event callback.\n *\n * @private\n * @param {MouseEvent} event The `mouseover` event.\n */\n\n }, {\n key: \"onMouseOver\",\n value: function onMouseOver(event) {\n var priv = privatePool.get(this);\n var rootDocument = this.hot.rootDocument;\n priv.cellBelowCursor = rootDocument.elementFromPoint(event.clientX, event.clientY);\n\n if (this.mouseDown || this.editor.isFocused() || hasClass(event.target, 'wtBorder') || priv.cellBelowCursor !== event.target || !this.editor) {\n return;\n }\n\n if (this.targetIsCellWithComment(event)) {\n var coordinates = this.hot.view.wt.wtTable.getCoords(event.target);\n var range = {\n from: new CellCoords(this.hot.rowIndexMapper.getVisualFromRenderableIndex(coordinates.row), this.hot.columnIndexMapper.getVisualFromRenderableIndex(coordinates.col))\n };\n this.displaySwitch.show(range);\n } else if (isChildOf(event.target, rootDocument) && !this.targetIsCommentTextArea(event)) {\n this.displaySwitch.hide();\n }\n }\n /**\n * `mouseup` event callback.\n *\n * @private\n */\n\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp() {\n this.mouseDown = false;\n }\n /**\n * The `afterRenderer` hook callback.\n *\n * @private\n * @param {HTMLTableCellElement} TD The rendered `TD` element.\n * @param {object} cellProperties The rendered cell's property object.\n */\n\n }, {\n key: \"onAfterRenderer\",\n value: function onAfterRenderer(TD, cellProperties) {\n if (cellProperties[META_COMMENT] && cellProperties[META_COMMENT][META_COMMENT_VALUE]) {\n addClass(TD, cellProperties.commentedCellClassName);\n }\n }\n /**\n * `blur` event callback for the comment editor.\n *\n * @private\n */\n\n }, {\n key: \"onEditorBlur\",\n value: function onEditorBlur() {\n this.setComment();\n }\n /**\n * `mousedown` hook. Along with `onEditorMouseUp` used to simulate the textarea resizing event.\n *\n * @private\n * @param {MouseEvent} event The `mousedown` event.\n */\n\n }, {\n key: \"onEditorMouseDown\",\n value: function onEditorMouseDown(event) {\n var priv = privatePool.get(this);\n priv.tempEditorDimensions = {\n width: outerWidth(event.target),\n height: outerHeight(event.target)\n };\n }\n /**\n * `mouseup` hook. Along with `onEditorMouseDown` used to simulate the textarea resizing event.\n *\n * @private\n * @param {MouseEvent} event The `mouseup` event.\n */\n\n }, {\n key: \"onEditorMouseUp\",\n value: function onEditorMouseUp(event) {\n var priv = privatePool.get(this);\n var currentWidth = outerWidth(event.target);\n var currentHeight = outerHeight(event.target);\n\n if (currentWidth !== priv.tempEditorDimensions.width + 1 || currentHeight !== priv.tempEditorDimensions.height + 2) {\n this.updateCommentMeta(this.range.from.row, this.range.from.col, _defineProperty({}, META_STYLE, {\n width: currentWidth,\n height: currentHeight\n }));\n }\n }\n /**\n * Context Menu's \"Add comment\" callback. Results in showing the comment editor.\n *\n * @private\n */\n\n }, {\n key: \"onContextMenuAddComment\",\n value: function onContextMenuAddComment() {\n var _this4 = this;\n\n this.displaySwitch.cancelHiding();\n var coords = this.hot.getSelectedRangeLast();\n this.contextMenuEvent = true;\n this.setRange({\n from: coords.highlight\n });\n this.show();\n setTimeout(function () {\n if (_this4.hot) {\n _this4.hot.deselectCell();\n\n _this4.editor.focus();\n }\n }, 10);\n }\n /**\n * Context Menu's \"remove comment\" callback.\n *\n * @private\n */\n\n }, {\n key: \"onContextMenuRemoveComment\",\n value: function onContextMenuRemoveComment() {\n var _this5 = this;\n\n var coords = this.hot.getSelectedRangeLast();\n this.contextMenuEvent = true;\n coords.forAll(function (row, column) {\n if (row >= 0 && column >= 0) {\n _this5.removeCommentAtCell(row, column, false);\n }\n });\n this.hot.render();\n }\n /**\n * Context Menu's \"make comment read-only\" callback.\n *\n * @private\n */\n\n }, {\n key: \"onContextMenuMakeReadOnly\",\n value: function onContextMenuMakeReadOnly() {\n var _this6 = this;\n\n var coords = this.hot.getSelectedRangeLast();\n this.contextMenuEvent = true;\n coords.forAll(function (row, column) {\n if (row >= 0 && column >= 0) {\n var currentState = !!_this6.getCommentMeta(row, column, META_READONLY);\n\n _this6.updateCommentMeta(row, column, _defineProperty({}, META_READONLY, !currentState));\n }\n });\n }\n /**\n * Add Comments plugin options to the Context Menu.\n *\n * @private\n * @param {object} defaultOptions The menu options.\n */\n\n }, {\n key: \"addToContextMenu\",\n value: function addToContextMenu(defaultOptions) {\n var _this7 = this;\n\n var isThereAnyCellRendered = function isThereAnyCellRendered() {\n return _this7.hot.rowIndexMapper.getRenderableIndexesLength() > 0 && _this7.hot.columnIndexMapper.getRenderableIndexesLength() > 0;\n };\n\n defaultOptions.items.push({\n name: '---------'\n }, {\n key: 'commentsAddEdit',\n name: function name() {\n if (_this7.checkSelectionCommentsConsistency()) {\n return _this7.hot.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_EDIT_COMMENT);\n }\n\n return _this7.hot.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ADD_COMMENT);\n },\n callback: function callback() {\n return _this7.onContextMenuAddComment();\n },\n disabled: function disabled() {\n if (!isThereAnyCellRendered()) {\n return true;\n }\n\n return !(_this7.hot.getSelectedLast() && !_this7.hot.selection.isSelectedByCorner());\n }\n }, {\n key: 'commentsRemove',\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_COMMENT);\n },\n callback: function callback() {\n return _this7.onContextMenuRemoveComment();\n },\n disabled: function disabled() {\n if (!isThereAnyCellRendered()) {\n return true;\n }\n\n return !(_this7.hot.getSelectedLast() && !_this7.hot.selection.isSelectedByCorner());\n }\n }, {\n key: 'commentsReadOnly',\n name: function name() {\n var _this8 = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);\n var hasProperty = checkSelectionConsistency(this.getSelectedRangeLast(), function (row, col) {\n var readOnlyProperty = _this8.getCellMeta(row, col)[META_COMMENT];\n\n if (readOnlyProperty) {\n readOnlyProperty = readOnlyProperty[META_READONLY];\n }\n\n if (readOnlyProperty) {\n return true;\n }\n });\n\n if (hasProperty) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n return _this7.onContextMenuMakeReadOnly();\n },\n disabled: function disabled() {\n if (!isThereAnyCellRendered()) {\n return true;\n }\n\n return !(_this7.hot.getSelectedLast() && !_this7.hot.selection.isSelectedByCorner()) || !_this7.checkSelectionCommentsConsistency();\n }\n });\n }\n /**\n * Get `displayDelay` setting of comment plugin.\n *\n * @private\n * @returns {number|undefined}\n */\n\n }, {\n key: \"getDisplayDelaySetting\",\n value: function getDisplayDelaySetting() {\n var commentSetting = this.hot.getSettings()[PLUGIN_KEY];\n\n if (isObject(commentSetting)) {\n return commentSetting.displayDelay;\n }\n\n return void 0;\n }\n /**\n * `afterBeginEditing` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onAfterBeginEditing\",\n value: function onAfterBeginEditing() {\n this.hide();\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.editor) {\n this.editor.destroy();\n }\n\n if (this.displaySwitch) {\n this.displaySwitch.destroy();\n }\n\n _get(_getPrototypeOf(Comments.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return Comments;\n}(BasePlugin);","import \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.split.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { hasOwnProperty } from \"../../helpers/object.mjs\";\n/**\n * Command executor for ContextMenu.\n *\n * @class CommandExecutor\n * @plugin ContextMenu\n */\n\nvar CommandExecutor = /*#__PURE__*/function () {\n function CommandExecutor(hotInstance) {\n _classCallCheck(this, CommandExecutor);\n\n this.hot = hotInstance;\n this.commands = {};\n this.commonCallback = null;\n }\n /**\n * Register command.\n *\n * @param {string} name Command name.\n * @param {object} commandDescriptor Command descriptor object with properties like `key` (command id),\n * `callback` (task to execute), `name` (command name), `disabled` (command availability).\n */\n\n\n _createClass(CommandExecutor, [{\n key: \"registerCommand\",\n value: function registerCommand(name, commandDescriptor) {\n this.commands[name] = commandDescriptor;\n }\n /**\n * Set common callback which will be trigger on every executed command.\n *\n * @param {Function} callback Function which will be fired on every command execute.\n */\n\n }, {\n key: \"setCommonCallback\",\n value: function setCommonCallback(callback) {\n this.commonCallback = callback;\n }\n /**\n * Execute command by its name.\n *\n * @param {string} commandName Command id.\n * @param {*} params Arguments passed to command task.\n */\n\n }, {\n key: \"execute\",\n value: function execute(commandName) {\n var _this = this;\n\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n\n var commandSplit = commandName.split(':');\n var commandNamePrimary = commandSplit[0];\n var subCommandName = commandSplit.length === 2 ? commandSplit[1] : null;\n var command = this.commands[commandNamePrimary];\n\n if (!command) {\n throw new Error(\"Menu command '\".concat(commandNamePrimary, \"' not exists.\"));\n }\n\n if (subCommandName && command.submenu) {\n command = findSubCommand(subCommandName, command.submenu.items);\n }\n\n if (command.disabled === true) {\n return;\n }\n\n if (typeof command.disabled === 'function' && command.disabled.call(this.hot) === true) {\n return;\n }\n\n if (hasOwnProperty(command, 'submenu')) {\n return;\n }\n\n var callbacks = [];\n\n if (typeof command.callback === 'function') {\n callbacks.push(command.callback);\n }\n\n if (typeof this.commonCallback === 'function') {\n callbacks.push(this.commonCallback);\n }\n\n params.unshift(commandSplit.join(':'));\n arrayEach(callbacks, function (callback) {\n return callback.apply(_this.hot, params);\n });\n }\n }]);\n\n return CommandExecutor;\n}();\n/**\n * @param {string} subCommandName The subcommand name.\n * @param {string[]} subCommands The collection of the commands.\n * @returns {boolean}\n */\n\n\nfunction findSubCommand(subCommandName, subCommands) {\n var command;\n arrayEach(subCommands, function (cmd) {\n var cmds = cmd.key ? cmd.key.split(':') : null;\n\n if (Array.isArray(cmds) && cmds[1] === subCommandName) {\n command = cmd;\n return false;\n }\n });\n return command;\n}\n\nexport default CommandExecutor;","import \"core-js/modules/es.array.index-of.js\";\nimport { align, getAlignmentClasses, checkSelectionConsistency, markLabelAsSelected } from \"../utils.mjs\";\nimport { KEY as SEPARATOR } from \"./separator.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'alignment';\n/**\n * @returns {object}\n */\n\nexport default function alignmentItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT);\n },\n disabled: function disabled() {\n if (this.countRows() === 0 || this.countCols() === 0) {\n return true;\n }\n\n return !(this.getSelectedRange() && !this.selection.isSelectedByCorner());\n },\n submenu: {\n items: [{\n key: \"\".concat(KEY, \":left\"),\n name: function name() {\n var _this = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);\n var hasClass = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {\n var className = _this.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htLeft') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n var _this2 = this;\n\n var selectedRange = this.getSelectedRange();\n var stateBefore = getAlignmentClasses(selectedRange, function (row, col) {\n return _this2.getCellMeta(row, col).className;\n });\n var type = 'horizontal';\n var alignment = 'htLeft';\n this.runHooks('beforeCellAlignment', stateBefore, selectedRange, type, alignment);\n align(selectedRange, type, alignment, function (row, col) {\n return _this2.getCellMeta(row, col);\n }, function (row, col, key, value) {\n return _this2.setCellMeta(row, col, key, value);\n });\n this.render();\n },\n disabled: false\n }, {\n key: \"\".concat(KEY, \":center\"),\n name: function name() {\n var _this3 = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);\n var hasClass = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {\n var className = _this3.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htCenter') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n var _this4 = this;\n\n var selectedRange = this.getSelectedRange();\n var stateBefore = getAlignmentClasses(selectedRange, function (row, col) {\n return _this4.getCellMeta(row, col).className;\n });\n var type = 'horizontal';\n var alignment = 'htCenter';\n this.runHooks('beforeCellAlignment', stateBefore, selectedRange, type, alignment);\n align(selectedRange, type, alignment, function (row, col) {\n return _this4.getCellMeta(row, col);\n }, function (row, col, key, value) {\n return _this4.setCellMeta(row, col, key, value);\n });\n this.render();\n },\n disabled: false\n }, {\n key: \"\".concat(KEY, \":right\"),\n name: function name() {\n var _this5 = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);\n var hasClass = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {\n var className = _this5.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htRight') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n var _this6 = this;\n\n var selectedRange = this.getSelectedRange();\n var stateBefore = getAlignmentClasses(selectedRange, function (row, col) {\n return _this6.getCellMeta(row, col).className;\n });\n var type = 'horizontal';\n var alignment = 'htRight';\n this.runHooks('beforeCellAlignment', stateBefore, selectedRange, type, alignment);\n align(selectedRange, type, alignment, function (row, col) {\n return _this6.getCellMeta(row, col);\n }, function (row, col, key, value) {\n return _this6.setCellMeta(row, col, key, value);\n });\n this.render();\n },\n disabled: false\n }, {\n key: \"\".concat(KEY, \":justify\"),\n name: function name() {\n var _this7 = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);\n var hasClass = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {\n var className = _this7.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htJustify') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n var _this8 = this;\n\n var selectedRange = this.getSelectedRange();\n var stateBefore = getAlignmentClasses(selectedRange, function (row, col) {\n return _this8.getCellMeta(row, col).className;\n });\n var type = 'horizontal';\n var alignment = 'htJustify';\n this.runHooks('beforeCellAlignment', stateBefore, selectedRange, type, alignment);\n align(selectedRange, type, alignment, function (row, col) {\n return _this8.getCellMeta(row, col);\n }, function (row, col, key, value) {\n return _this8.setCellMeta(row, col, key, value);\n });\n this.render();\n },\n disabled: false\n }, {\n name: SEPARATOR\n }, {\n key: \"\".concat(KEY, \":top\"),\n name: function name() {\n var _this9 = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);\n var hasClass = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {\n var className = _this9.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htTop') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n var _this10 = this;\n\n var selectedRange = this.getSelectedRange();\n var stateBefore = getAlignmentClasses(selectedRange, function (row, col) {\n return _this10.getCellMeta(row, col).className;\n });\n var type = 'vertical';\n var alignment = 'htTop';\n this.runHooks('beforeCellAlignment', stateBefore, selectedRange, type, alignment);\n align(selectedRange, type, alignment, function (row, col) {\n return _this10.getCellMeta(row, col);\n }, function (row, col, key, value) {\n return _this10.setCellMeta(row, col, key, value);\n });\n this.render();\n },\n disabled: false\n }, {\n key: \"\".concat(KEY, \":middle\"),\n name: function name() {\n var _this11 = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);\n var hasClass = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {\n var className = _this11.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htMiddle') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n var _this12 = this;\n\n var selectedRange = this.getSelectedRange();\n var stateBefore = getAlignmentClasses(selectedRange, function (row, col) {\n return _this12.getCellMeta(row, col).className;\n });\n var type = 'vertical';\n var alignment = 'htMiddle';\n this.runHooks('beforeCellAlignment', stateBefore, selectedRange, type, alignment);\n align(selectedRange, type, alignment, function (row, col) {\n return _this12.getCellMeta(row, col);\n }, function (row, col, key, value) {\n return _this12.setCellMeta(row, col, key, value);\n });\n this.render();\n },\n disabled: false\n }, {\n key: \"\".concat(KEY, \":bottom\"),\n name: function name() {\n var _this13 = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);\n var hasClass = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {\n var className = _this13.getCellMeta(row, col).className;\n\n if (className && className.indexOf('htBottom') !== -1) {\n return true;\n }\n });\n\n if (hasClass) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n var _this14 = this;\n\n var selectedRange = this.getSelectedRange();\n var stateBefore = getAlignmentClasses(selectedRange, function (row, col) {\n return _this14.getCellMeta(row, col).className;\n });\n var type = 'vertical';\n var alignment = 'htBottom';\n this.runHooks('beforeCellAlignment', stateBefore, selectedRange, type, alignment);\n align(selectedRange, type, alignment, function (row, col) {\n return _this14.getCellMeta(row, col);\n }, function (row, col, key, value) {\n return _this14.setCellMeta(row, col, key, value);\n });\n this.render();\n },\n disabled: false\n }]\n }\n };\n}","import { getValidSelection } from \"../utils.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'clear_column';\n/**\n * @returns {object}\n */\n\nexport default function clearColumnItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_CLEAR_COLUMN);\n },\n callback: function callback(key, selection) {\n var startColumn = selection[0].start.col;\n var endColumn = selection[0].end.col;\n\n if (this.countRows()) {\n this.populateFromArray(0, startColumn, [[null]], Math.max(selection[0].start.row, selection[0].end.row), endColumn, 'ContextMenu.clearColumn');\n }\n },\n disabled: function disabled() {\n var selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n\n return !this.selection.isSelectedByColumnHeader();\n }\n };\n}","import { getValidSelection } from \"../utils.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'col_left';\n/**\n * @returns {object}\n */\n\nexport default function columnLeftItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_INSERT_LEFT);\n },\n callback: function callback(key, normalizedSelection) {\n var isSelectedByCorner = this.selection.isSelectedByCorner();\n var columnLeft = 0;\n\n if (!isSelectedByCorner) {\n var latestSelection = normalizedSelection[Math.max(normalizedSelection.length - 1, 0)];\n columnLeft = latestSelection.start.col;\n }\n\n this.alter('insert_col', columnLeft, 1, 'ContextMenu.columnLeft');\n\n if (isSelectedByCorner) {\n this.selectAll();\n }\n },\n disabled: function disabled() {\n if (!this.isColumnModificationAllowed()) {\n return true;\n }\n\n var selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n\n if (this.selection.isSelectedByCorner()) {\n var totalColumns = this.countCols(); // Enable \"Insert column left\" only when there is at least one column.\n\n return totalColumns === 0;\n }\n\n return this.selection.isSelectedByRowHeader() || this.countCols() >= this.getSettings().maxCols;\n },\n hidden: function hidden() {\n return !this.getSettings().allowInsertColumn;\n }\n };\n}","import { getValidSelection } from \"../utils.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { isDefined } from \"../../../helpers/mixed.mjs\";\nexport var KEY = 'col_right';\n/**\n * @returns {object}\n */\n\nexport default function columnRightItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_INSERT_RIGHT);\n },\n callback: function callback(key, normalizedSelection) {\n var isSelectedByCorner = this.selection.isSelectedByCorner();\n var columnRight = 0;\n\n if (isSelectedByCorner) {\n columnRight = this.countCols();\n } else {\n var _latestSelection$end;\n\n var latestSelection = normalizedSelection[Math.max(normalizedSelection.length - 1, 0)];\n var selectedColumn = latestSelection === null || latestSelection === void 0 ? void 0 : (_latestSelection$end = latestSelection.end) === null || _latestSelection$end === void 0 ? void 0 : _latestSelection$end.col; // If there is no selection we have clicked on the corner and there is no data.\n\n columnRight = isDefined(selectedColumn) ? selectedColumn + 1 : 0;\n }\n\n this.alter('insert_col', columnRight, 1, 'ContextMenu.columnRight');\n\n if (isSelectedByCorner) {\n this.selectAll();\n }\n },\n disabled: function disabled() {\n if (!this.isColumnModificationAllowed()) {\n return true;\n }\n\n var selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n\n if (this.selection.isSelectedByCorner()) {\n // Enable \"Insert column right\" always when the menu is triggered by corner click.\n return false;\n }\n\n return this.selection.isSelectedByRowHeader() || this.countCols() >= this.getSettings().maxCols;\n },\n hidden: function hidden() {\n return !this.getSettings().allowInsertColumn;\n }\n };\n}","import { checkSelectionConsistency, markLabelAsSelected } from \"../utils.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'make_read_only';\n/**\n * @returns {object}\n */\n\nexport default function readOnlyItem() {\n return {\n key: KEY,\n name: function name() {\n var _this = this;\n\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY);\n var atLeastOneReadOnly = checkSelectionConsistency(this.getSelectedRange(), function (row, col) {\n return _this.getCellMeta(row, col).readOnly;\n });\n\n if (atLeastOneReadOnly) {\n label = markLabelAsSelected(label);\n }\n\n return label;\n },\n callback: function callback() {\n var _this2 = this;\n\n var ranges = this.getSelectedRange();\n var atLeastOneReadOnly = checkSelectionConsistency(ranges, function (row, col) {\n return _this2.getCellMeta(row, col).readOnly;\n });\n arrayEach(ranges, function (range) {\n range.forAll(function (row, col) {\n if (row >= 0 && col >= 0) {\n _this2.setCellMeta(row, col, 'readOnly', !atLeastOneReadOnly);\n }\n });\n });\n this.render();\n },\n disabled: function disabled() {\n if (this.selection.isSelectedByCorner()) {\n return true;\n }\n\n if (this.countRows() === 0 || this.countCols() === 0) {\n return true;\n }\n\n if (!this.getSelectedRange() || this.getSelectedRange().length === 0) {\n return true;\n }\n\n return false;\n }\n };\n}","import * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'redo';\n/**\n * @returns {object}\n */\n\nexport default function redoItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REDO);\n },\n callback: function callback() {\n this.redo();\n },\n hidden: function hidden() {\n var undoRedo = this.getPlugin('undoRedo');\n return !undoRedo || !undoRedo.isEnabled();\n },\n disabled: function disabled() {\n return !this.getPlugin('undoRedo').isRedoAvailable();\n }\n };\n}","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport { getValidSelection } from \"../utils.mjs\";\nimport { transformSelectionToColumnDistance } from \"../../../selection/utils.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'remove_col';\n/**\n * @returns {object}\n */\n\nexport default function removeColumnItem() {\n return {\n key: KEY,\n name: function name() {\n var selection = this.getSelected();\n var pluralForm = 0;\n\n if (selection) {\n if (selection.length > 1) {\n pluralForm = 1;\n } else {\n var _selection$ = _slicedToArray(selection[0], 4),\n fromColumn = _selection$[1],\n toColumn = _selection$[3];\n\n if (fromColumn - toColumn !== 0) {\n pluralForm = 1;\n }\n }\n }\n\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_COLUMN, pluralForm);\n },\n callback: function callback() {\n this.alter('remove_col', transformSelectionToColumnDistance(this.getSelected()), null, 'ContextMenu.removeColumn');\n },\n disabled: function disabled() {\n if (!this.isColumnModificationAllowed()) {\n return true;\n }\n\n var selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n\n var totalColumns = this.countCols();\n\n if (this.selection.isSelectedByCorner()) {\n // Enable \"Remove column\" only when there is at least one column.\n return totalColumns === 0;\n }\n\n return this.selection.isSelectedByRowHeader() || totalColumns === 0;\n },\n hidden: function hidden() {\n return !this.getSettings().allowRemoveColumn;\n }\n };\n}","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport { getValidSelection } from \"../utils.mjs\";\nimport { transformSelectionToRowDistance } from \"../../../selection/utils.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'remove_row';\n/**\n * @returns {object}\n */\n\nexport default function removeRowItem() {\n return {\n key: KEY,\n name: function name() {\n var selection = this.getSelected();\n var pluralForm = 0;\n\n if (selection) {\n if (selection.length > 1) {\n pluralForm = 1;\n } else {\n var _selection$ = _slicedToArray(selection[0], 3),\n fromRow = _selection$[0],\n toRow = _selection$[2];\n\n if (fromRow - toRow !== 0) {\n pluralForm = 1;\n }\n }\n }\n\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_ROW, pluralForm);\n },\n callback: function callback() {\n // TODO: Please keep in mind that below `1` may be improper. The table's way of work, before change `f1747b3912ea3b21fe423fd102ca94c87db81379` was restored.\n // There is still problem when removing more than one row.\n this.alter('remove_row', transformSelectionToRowDistance(this.getSelected()), 1, 'ContextMenu.removeRow');\n },\n disabled: function disabled() {\n var selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n\n var totalRows = this.countRows();\n\n if (this.selection.isSelectedByCorner()) {\n // Enable \"Remove row\" only when there is at least one row.\n return totalRows === 0;\n }\n\n return this.selection.isSelectedByColumnHeader() || totalRows === 0;\n },\n hidden: function hidden() {\n return !this.getSettings().allowRemoveRow;\n }\n };\n}","import { getValidSelection } from \"../utils.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'row_above';\n/**\n * @returns {object}\n */\n\nexport default function rowAboveItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ROW_ABOVE);\n },\n callback: function callback(key, normalizedSelection) {\n var isSelectedByCorner = this.selection.isSelectedByCorner();\n var rowAbove = 0;\n\n if (!isSelectedByCorner) {\n var latestSelection = normalizedSelection[Math.max(normalizedSelection.length - 1, 0)];\n rowAbove = latestSelection.start.row;\n }\n\n this.alter('insert_row', rowAbove, 1, 'ContextMenu.rowAbove');\n\n if (isSelectedByCorner) {\n this.selectAll();\n }\n },\n disabled: function disabled() {\n var selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n\n if (this.selection.isSelectedByCorner()) {\n var totalRows = this.countRows(); // Enable \"Insert row above\" only when there is at least one row.\n\n return totalRows === 0;\n }\n\n return this.selection.isSelectedByColumnHeader() || this.countRows() >= this.getSettings().maxRows;\n },\n hidden: function hidden() {\n return !this.getSettings().allowInsertRow;\n }\n };\n}","import { getValidSelection } from \"../utils.mjs\";\nimport { isDefined } from \"../../../helpers/mixed.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'row_below';\n/**\n * @returns {object}\n */\n\nexport default function rowBelowItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ROW_BELOW);\n },\n callback: function callback(key, normalizedSelection) {\n var isSelectedByCorner = this.selection.isSelectedByCorner();\n var rowBelow = 0;\n\n if (isSelectedByCorner) {\n rowBelow = this.countRows();\n } else {\n var _latestSelection$end;\n\n var latestSelection = normalizedSelection[Math.max(normalizedSelection.length - 1, 0)];\n var selectedRow = latestSelection === null || latestSelection === void 0 ? void 0 : (_latestSelection$end = latestSelection.end) === null || _latestSelection$end === void 0 ? void 0 : _latestSelection$end.row; // If there is no selection we have clicked on the corner and there is no data.\n\n rowBelow = isDefined(selectedRow) ? selectedRow + 1 : 0;\n }\n\n this.alter('insert_row', rowBelow, 1, 'ContextMenu.rowBelow');\n\n if (isSelectedByCorner) {\n this.selectAll();\n }\n },\n disabled: function disabled() {\n var selected = getValidSelection(this);\n\n if (!selected) {\n return true;\n }\n\n if (this.selection.isSelectedByCorner()) {\n // Enable \"Insert row below\" always when the menu is triggered by corner click.\n return false;\n }\n\n return this.selection.isSelectedByColumnHeader() || this.countRows() >= this.getSettings().maxRows;\n },\n hidden: function hidden() {\n return !this.getSettings().allowInsertRow;\n }\n };\n}","import { CONTEXTMENU_ITEMS_NO_ITEMS } from \"../../../i18n/constants.mjs\";\nexport var KEY = 'no_items';\n/**\n * @returns {object}\n */\n\nexport default function noItemsItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(CONTEXTMENU_ITEMS_NO_ITEMS);\n },\n disabled: true,\n isCommand: false\n };\n}","import * as C from \"../../../i18n/constants.mjs\";\nexport var KEY = 'undo';\n/**\n * @returns {object}\n */\n\nexport default function undoItem() {\n return {\n key: KEY,\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_UNDO);\n },\n callback: function callback() {\n this.undo();\n },\n hidden: function hidden() {\n var undoRedo = this.getPlugin('undoRedo');\n return !undoRedo || !undoRedo.isEnabled();\n },\n disabled: function disabled() {\n return !this.getPlugin('undoRedo').isUndoAvailable();\n }\n };\n}","import \"core-js/modules/es.array.index-of.js\";\n\nvar _predefinedItems2;\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport { objectEach } from \"../../helpers/object.mjs\";\nimport alignmentItem, { KEY as ALIGNMENT } from \"./predefinedItems/alignment.mjs\";\nimport clearColumnItem, { KEY as CLEAR_COLUMN } from \"./predefinedItems/clearColumn.mjs\";\nimport columnLeftItem, { KEY as COLUMN_LEFT } from \"./predefinedItems/columnLeft.mjs\";\nimport columnRightItem, { KEY as COLUMN_RIGHT } from \"./predefinedItems/columnRight.mjs\";\nimport readOnlyItem, { KEY as READ_ONLY } from \"./predefinedItems/readOnly.mjs\";\nimport redoItem, { KEY as REDO } from \"./predefinedItems/redo.mjs\";\nimport removeColumnItem, { KEY as REMOVE_COLUMN } from \"./predefinedItems/removeColumn.mjs\";\nimport removeRowItem, { KEY as REMOVE_ROW } from \"./predefinedItems/removeRow.mjs\";\nimport rowAboveItem, { KEY as ROW_ABOVE } from \"./predefinedItems/rowAbove.mjs\";\nimport rowBelowItem, { KEY as ROW_BELOW } from \"./predefinedItems/rowBelow.mjs\";\nimport separatorItem, { KEY as SEPARATOR } from \"./predefinedItems/separator.mjs\";\nimport noItemsItem, { KEY as NO_ITEMS } from \"./predefinedItems/noItems.mjs\";\nimport undoItem, { KEY as UNDO } from \"./predefinedItems/undo.mjs\";\nexport { KEY as ALIGNMENT } from \"./predefinedItems/alignment.mjs\";\nexport { KEY as CLEAR_COLUMN } from \"./predefinedItems/clearColumn.mjs\";\nexport { KEY as COLUMN_LEFT } from \"./predefinedItems/columnLeft.mjs\";\nexport { KEY as COLUMN_RIGHT } from \"./predefinedItems/columnRight.mjs\";\nexport { KEY as READ_ONLY } from \"./predefinedItems/readOnly.mjs\";\nexport { KEY as REDO } from \"./predefinedItems/redo.mjs\";\nexport { KEY as REMOVE_COLUMN } from \"./predefinedItems/removeColumn.mjs\";\nexport { KEY as REMOVE_ROW } from \"./predefinedItems/removeRow.mjs\";\nexport { KEY as ROW_ABOVE } from \"./predefinedItems/rowAbove.mjs\";\nexport { KEY as ROW_BELOW } from \"./predefinedItems/rowBelow.mjs\";\nexport { KEY as SEPARATOR } from \"./predefinedItems/separator.mjs\";\nexport { KEY as NO_ITEMS } from \"./predefinedItems/noItems.mjs\";\nexport { KEY as UNDO } from \"./predefinedItems/undo.mjs\";\nexport var ITEMS = [ROW_ABOVE, ROW_BELOW, COLUMN_LEFT, COLUMN_RIGHT, CLEAR_COLUMN, REMOVE_ROW, REMOVE_COLUMN, UNDO, REDO, READ_ONLY, ALIGNMENT, SEPARATOR, NO_ITEMS];\n\nvar _predefinedItems = (_predefinedItems2 = {}, _defineProperty(_predefinedItems2, SEPARATOR, separatorItem), _defineProperty(_predefinedItems2, NO_ITEMS, noItemsItem), _defineProperty(_predefinedItems2, ROW_ABOVE, rowAboveItem), _defineProperty(_predefinedItems2, ROW_BELOW, rowBelowItem), _defineProperty(_predefinedItems2, COLUMN_LEFT, columnLeftItem), _defineProperty(_predefinedItems2, COLUMN_RIGHT, columnRightItem), _defineProperty(_predefinedItems2, CLEAR_COLUMN, clearColumnItem), _defineProperty(_predefinedItems2, REMOVE_ROW, removeRowItem), _defineProperty(_predefinedItems2, REMOVE_COLUMN, removeColumnItem), _defineProperty(_predefinedItems2, UNDO, undoItem), _defineProperty(_predefinedItems2, REDO, redoItem), _defineProperty(_predefinedItems2, READ_ONLY, readOnlyItem), _defineProperty(_predefinedItems2, ALIGNMENT, alignmentItem), _predefinedItems2);\n/**\n * Gets new object with all predefined menu items.\n *\n * @returns {object}\n */\n\n\nexport function predefinedItems() {\n var items = {};\n objectEach(_predefinedItems, function (itemFactory, key) {\n items[key] = itemFactory();\n });\n return items;\n}\n/**\n * Add new predefined menu item to the collection.\n *\n * @param {string} key Menu command id.\n * @param {object} item Object command descriptor.\n */\n\nexport function addItem(key, item) {\n if (ITEMS.indexOf(key) === -1) {\n _predefinedItems[key] = item;\n }\n}","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.function.name.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { objectEach, isObject, extend } from \"../../helpers/object.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { SEPARATOR, ITEMS, predefinedItems } from \"./predefinedItems.mjs\";\n/**\n * Predefined items class factory for menu items.\n *\n * @class ItemsFactory\n * @plugin ContextMenu\n */\n\nvar ItemsFactory = /*#__PURE__*/function () {\n function ItemsFactory(hotInstance) {\n var orderPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n _classCallCheck(this, ItemsFactory);\n\n this.hot = hotInstance;\n this.predefinedItems = predefinedItems();\n this.defaultOrderPattern = orderPattern;\n }\n /**\n * Set predefined items.\n *\n * @param {Array} predefinedItemsCollection Array of predefined items.\n */\n\n\n _createClass(ItemsFactory, [{\n key: \"setPredefinedItems\",\n value: function setPredefinedItems(predefinedItemsCollection) {\n var _this = this;\n\n var items = {};\n this.defaultOrderPattern.length = 0;\n objectEach(predefinedItemsCollection, function (value, key) {\n var menuItemKey = '';\n\n if (value.name === SEPARATOR) {\n items[SEPARATOR] = value;\n menuItemKey = SEPARATOR; // Menu item added as a property to array\n } else if (isNaN(parseInt(key, 10))) {\n value.key = value.key === void 0 ? key : value.key;\n items[key] = value;\n menuItemKey = value.key;\n } else {\n items[value.key] = value;\n menuItemKey = value.key;\n }\n\n _this.defaultOrderPattern.push(menuItemKey);\n });\n this.predefinedItems = items;\n }\n /**\n * Get all menu items based on pattern.\n *\n * @param {Array|object|boolean} pattern Pattern which you can define by displaying menu items order. If `true` default\n * pattern will be used.\n * @returns {Array}\n */\n\n }, {\n key: \"getItems\",\n value: function getItems() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n return _getItems(pattern, this.defaultOrderPattern, this.predefinedItems);\n }\n }]);\n\n return ItemsFactory;\n}();\n/**\n * @param {object[]} itemsPattern The user defined menu items collection.\n * @param {object[]} defaultPattern The menu default items collection.\n * @param {object} items Additional options.\n * @returns {object[]} Returns parsed and merged menu items collection ready to render.\n */\n\n\nfunction _getItems() {\n var itemsPattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var defaultPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var items = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var result = [];\n var pattern = itemsPattern;\n\n if (pattern && pattern.items) {\n pattern = pattern.items;\n } else if (!Array.isArray(pattern)) {\n pattern = defaultPattern;\n }\n\n if (isObject(pattern)) {\n objectEach(pattern, function (value, key) {\n var item = items[typeof value === 'string' ? value : key];\n\n if (!item) {\n item = value;\n }\n\n if (isObject(value)) {\n extend(item, value);\n } else if (typeof item === 'string') {\n item = {\n name: item\n };\n }\n\n if (item.key === void 0) {\n item.key = key;\n }\n\n result.push(item);\n });\n } else {\n arrayEach(pattern, function (name, key) {\n var item = items[name]; // Item deleted from settings `allowInsertRow: false` etc.\n\n if (!item && ITEMS.indexOf(name) >= 0) {\n return;\n }\n\n if (!item) {\n item = {\n name: name,\n key: \"\".concat(key)\n };\n }\n\n if (isObject(name)) {\n extend(item, name);\n }\n\n if (item.key === void 0) {\n item.key = key;\n }\n\n result.push(item);\n });\n }\n\n return result;\n}\n\nexport default ItemsFactory;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { getWindowScrollLeft, getWindowScrollTop } from \"../../helpers/dom/element.mjs\";\n/**\n * Helper class for checking if element will fit at the desired side of cursor.\n *\n * @class Cursor\n * @plugin ContextMenu\n */\n\nvar Cursor = /*#__PURE__*/function () {\n function Cursor(object, rootWindow) {\n _classCallCheck(this, Cursor);\n\n var windowScrollTop = getWindowScrollTop(rootWindow);\n var windowScrollLeft = getWindowScrollLeft(rootWindow);\n var top;\n var topRelative;\n var left;\n var leftRelative;\n var cellHeight;\n var cellWidth;\n this.rootWindow = rootWindow;\n this.type = this.getSourceType(object);\n\n if (this.type === 'literal') {\n top = parseInt(object.top, 10);\n left = parseInt(object.left, 10);\n cellHeight = object.height || 0;\n cellWidth = object.width || 0;\n topRelative = top;\n leftRelative = left;\n top += windowScrollTop;\n left += windowScrollLeft;\n } else if (this.type === 'event') {\n top = parseInt(object.pageY, 10);\n left = parseInt(object.pageX, 10);\n cellHeight = object.target.clientHeight;\n cellWidth = object.target.clientWidth;\n topRelative = top - windowScrollTop;\n leftRelative = left - windowScrollLeft;\n }\n\n this.top = top;\n this.topRelative = topRelative;\n this.left = left;\n this.leftRelative = leftRelative;\n this.scrollTop = windowScrollTop;\n this.scrollLeft = windowScrollLeft;\n this.cellHeight = cellHeight;\n this.cellWidth = cellWidth;\n }\n /**\n * Get source type name.\n *\n * @param {*} object Event or Object with coordinates.\n * @returns {string} Returns one of this values: `'literal'`, `'event'`.\n */\n\n\n _createClass(Cursor, [{\n key: \"getSourceType\",\n value: function getSourceType(object) {\n var type = 'literal';\n\n if (object instanceof Event) {\n type = 'event';\n }\n\n return type;\n }\n /**\n * Checks if element can be placed above the cursor.\n *\n * @param {HTMLElement} element Element to check if it's size will fit above the cursor.\n * @returns {boolean}\n */\n\n }, {\n key: \"fitsAbove\",\n value: function fitsAbove(element) {\n return this.topRelative >= element.offsetHeight;\n }\n /**\n * Checks if element can be placed below the cursor.\n *\n * @param {HTMLElement} element Element to check if it's size will fit below the cursor.\n * @param {number} [viewportHeight] The viewport height.\n * @returns {boolean}\n */\n\n }, {\n key: \"fitsBelow\",\n value: function fitsBelow(element) {\n var viewportHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rootWindow.innerHeight;\n return this.topRelative + element.offsetHeight <= viewportHeight;\n }\n /**\n * Checks if element can be placed on the right of the cursor.\n *\n * @param {HTMLElement} element Element to check if it's size will fit on the right of the cursor.\n * @param {number} [viewportWidth] The viewport width.\n * @returns {boolean}\n */\n\n }, {\n key: \"fitsOnRight\",\n value: function fitsOnRight(element) {\n var viewportWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.rootWindow.innerWidth;\n return this.leftRelative + this.cellWidth + element.offsetWidth <= viewportWidth;\n }\n /**\n * Checks if element can be placed on the left on the cursor.\n *\n * @param {HTMLElement} element Element to check if it's size will fit on the left of the cursor.\n * @returns {boolean}\n */\n\n }, {\n key: \"fitsOnLeft\",\n value: function fitsOnLeft(element) {\n return this.leftRelative >= element.offsetWidth;\n }\n }]);\n\n return Cursor;\n}();\n\nexport default Cursor;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.constructor.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.replace.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport Cursor from \"./cursor.mjs\";\nimport { SEPARATOR, NO_ITEMS, predefinedItems } from \"./predefinedItems.mjs\";\nimport { filterSeparators, hasSubMenu, isDisabled, isItemHidden, isSeparator, isSelectionDisabled, normalizeSelection } from \"./utils.mjs\";\nimport Core from \"../../core.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { arrayEach, arrayFilter, arrayReduce } from \"../../helpers/array.mjs\";\nimport { isWindowsOS } from \"../../helpers/browser.mjs\";\nimport { addClass, empty, fastInnerHTML, getScrollbarWidth, isChildOf, isInput, removeClass, getParentWindow, hasClass } from \"../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation, isRightClick } from \"../../helpers/dom/event.mjs\";\nimport { debounce, isFunction } from \"../../helpers/function.mjs\";\nimport { isUndefined, isDefined } from \"../../helpers/mixed.mjs\";\nimport { mixin, hasOwnProperty } from \"../../helpers/object.mjs\";\nimport { KEY_CODES } from \"../../helpers/unicode.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nvar MIN_WIDTH = 215;\n/**\n * @class Menu\n * @plugin ContextMenu\n */\n\nvar Menu = /*#__PURE__*/function () {\n function Menu(hotInstance, options) {\n _classCallCheck(this, Menu);\n\n this.hot = hotInstance;\n this.options = options || {\n parent: null,\n name: null,\n className: '',\n keepInViewport: true,\n standalone: false,\n minWidth: MIN_WIDTH,\n container: this.hot.rootDocument.documentElement\n };\n this.eventManager = new EventManager(this);\n this.container = this.createContainer(this.options.name);\n this.hotMenu = null;\n this.hotSubMenus = {};\n this.parentMenu = this.options.parent || null;\n this.menuItems = null;\n this.origOutsideClickDeselects = null;\n this.keyEvent = false;\n this.offset = {\n above: 0,\n below: 0,\n left: 0,\n right: 0\n };\n this._afterScrollCallback = null;\n this.registerEvents();\n }\n /**\n * Register event listeners.\n *\n * @private\n */\n\n\n _createClass(Menu, [{\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this = this;\n\n var frame = this.hot.rootWindow;\n\n while (frame) {\n this.eventManager.addEventListener(frame.document, 'mousedown', function (event) {\n return _this.onDocumentMouseDown(event);\n });\n this.eventManager.addEventListener(frame.document, 'contextmenu', function (event) {\n return _this.onDocumentContextMenu(event);\n });\n frame = getParentWindow(frame);\n }\n }\n /**\n * Set array of objects which defines menu items.\n *\n * @param {Array} menuItems Menu items to display.\n */\n\n }, {\n key: \"setMenuItems\",\n value: function setMenuItems(menuItems) {\n this.menuItems = menuItems;\n }\n /**\n * Returns currently selected menu item. Returns `null` if no item was selected.\n *\n * @returns {object|null}\n */\n\n }, {\n key: \"getSelectedItem\",\n value: function getSelectedItem() {\n return this.hasSelectedItem() ? this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]) : null;\n }\n /**\n * Checks if the menu has selected (highlighted) any item from the menu list.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"hasSelectedItem\",\n value: function hasSelectedItem() {\n return Array.isArray(this.hotMenu.getSelectedLast());\n }\n /**\n * Set offset menu position for specified area (`above`, `below`, `left` or `right`).\n *\n * @param {string} area Specified area name (`above`, `below`, `left` or `right`).\n * @param {number} offset Offset value.\n */\n\n }, {\n key: \"setOffset\",\n value: function setOffset(area) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n this.offset[area] = offset;\n }\n /**\n * Check if menu is using as sub-menu.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isSubMenu\",\n value: function isSubMenu() {\n return this.parentMenu !== null;\n }\n /**\n * Open menu.\n *\n * @fires Hooks#beforeContextMenuShow\n * @fires Hooks#afterContextMenuShow\n */\n\n }, {\n key: \"open\",\n value: function open() {\n var _this2 = this;\n\n this.runLocalHooks('beforeOpen');\n this.container.removeAttribute('style');\n this.container.style.display = 'block';\n var delayedOpenSubMenu = debounce(function (row) {\n return _this2.openSubMenu(row);\n }, 300);\n var minWidthOfMenu = this.options.minWidth || MIN_WIDTH;\n var noItemsDefined = false;\n var filteredItems = arrayFilter(this.menuItems, function (item) {\n if (item.key === NO_ITEMS) {\n noItemsDefined = true;\n }\n\n return isItemHidden(item, _this2.hot);\n });\n\n if (filteredItems.length < 1 && !noItemsDefined) {\n filteredItems.push(predefinedItems()[NO_ITEMS]);\n } else if (filteredItems.length === 0) {\n return;\n }\n\n filteredItems = filterSeparators(filteredItems, SEPARATOR);\n var shouldAutoCloseMenu = false;\n var settings = {\n data: filteredItems,\n colHeaders: false,\n autoColumnSize: true,\n autoWrapRow: false,\n modifyColWidth: function modifyColWidth(width) {\n if (isDefined(width) && width < minWidthOfMenu) {\n return minWidthOfMenu;\n }\n\n return width;\n },\n autoRowSize: false,\n readOnly: true,\n editor: false,\n copyPaste: false,\n maxCols: 1,\n columns: [{\n data: 'name',\n renderer: function renderer(hot, TD, row, col, prop, value) {\n return _this2.menuItemRenderer(hot, TD, row, col, prop, value);\n }\n }],\n renderAllRows: true,\n fragmentSelection: false,\n outsideClickDeselects: false,\n disableVisualSelection: 'area',\n beforeKeyDown: function beforeKeyDown(event) {\n return _this2.onBeforeKeyDown(event);\n },\n afterOnCellMouseOver: function afterOnCellMouseOver(event, coords) {\n if (_this2.isAllSubMenusClosed()) {\n delayedOpenSubMenu(coords.row);\n } else {\n _this2.openSubMenu(coords.row);\n }\n },\n rowHeights: function rowHeights(row) {\n return filteredItems[row].name === SEPARATOR ? 1 : 23;\n },\n afterOnCellContextMenu: function afterOnCellContextMenu(event) {\n event.preventDefault(); // On the Windows platform, the \"contextmenu\" is triggered after the \"mouseup\" so that's\n // why the closing menu is here. (#6507#issuecomment-582392301).\n\n if (isWindowsOS() && shouldAutoCloseMenu && _this2.hasSelectedItem()) {\n _this2.close(true);\n }\n },\n beforeOnCellMouseUp: function beforeOnCellMouseUp(event) {\n if (_this2.hasSelectedItem()) {\n shouldAutoCloseMenu = !_this2.isCommandPassive(_this2.getSelectedItem());\n\n _this2.executeCommand(event);\n }\n },\n afterOnCellMouseUp: function afterOnCellMouseUp(event) {\n // If the code runs on the other platform than Windows, the \"mouseup\" is triggered\n // after the \"contextmenu\". So then \"mouseup\" closes the menu. Otherwise, the closing\n // menu responsibility is forwarded to \"afterOnCellContextMenu\" callback (#6507#issuecomment-582392301).\n if ((!isWindowsOS() || !isRightClick(event)) && shouldAutoCloseMenu && _this2.hasSelectedItem()) {\n _this2.close(true);\n }\n },\n afterUnlisten: function afterUnlisten() {\n // Restore menu focus, fix for `this.instance.unlisten();` call in the tableView.js@260 file.\n // This prevents losing table responsiveness for keyboard events when filter select menu is closed (#6497).\n if (!_this2.hasSelectedItem() && _this2.isOpened()) {\n _this2.hotMenu.listen();\n }\n }\n };\n this.origOutsideClickDeselects = this.hot.getSettings().outsideClickDeselects;\n this.hot.getSettings().outsideClickDeselects = false;\n this.hotMenu = new Core(this.container, settings);\n this.hotMenu.addHook('afterInit', function () {\n return _this2.onAfterInit();\n });\n this.hotMenu.addHook('afterSelection', function () {\n return _this2.onAfterSelection.apply(_this2, arguments);\n });\n this.hotMenu.init();\n this.hotMenu.listen();\n this.blockMainTableCallbacks();\n this.runLocalHooks('afterOpen');\n }\n /**\n * Close menu.\n *\n * @param {boolean} [closeParent=false] If `true` try to close parent menu if exists.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n var closeParent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!this.isOpened()) {\n return;\n }\n\n if (closeParent && this.parentMenu) {\n this.parentMenu.close();\n } else {\n this.closeAllSubMenus();\n this.container.style.display = 'none';\n this.releaseMainTableCallbacks();\n this.hotMenu.destroy();\n this.hotMenu = null;\n this.hot.getSettings().outsideClickDeselects = this.origOutsideClickDeselects;\n this.runLocalHooks('afterClose');\n\n if (this.parentMenu) {\n this.parentMenu.hotMenu.listen();\n }\n }\n }\n /**\n * Open sub menu at the provided row index.\n *\n * @param {number} row Row index.\n * @returns {Menu|boolean} Returns created menu or `false` if no one menu was created.\n */\n\n }, {\n key: \"openSubMenu\",\n value: function openSubMenu(row) {\n if (!this.hotMenu) {\n return false;\n }\n\n var cell = this.hotMenu.getCell(row, 0);\n this.closeAllSubMenus();\n\n if (!cell || !hasSubMenu(cell)) {\n return false;\n }\n\n var dataItem = this.hotMenu.getSourceDataAtRow(row);\n var subMenu = new Menu(this.hot, {\n parent: this,\n name: dataItem.name,\n className: this.options.className,\n keepInViewport: true,\n container: this.options.container\n });\n subMenu.setMenuItems(dataItem.submenu.items);\n subMenu.open();\n subMenu.setPosition(cell.getBoundingClientRect());\n this.hotSubMenus[dataItem.key] = subMenu;\n return subMenu;\n }\n /**\n * Close sub menu at row index.\n *\n * @param {number} row Row index.\n */\n\n }, {\n key: \"closeSubMenu\",\n value: function closeSubMenu(row) {\n var dataItem = this.hotMenu.getSourceDataAtRow(row);\n var menus = this.hotSubMenus[dataItem.key];\n\n if (menus) {\n menus.destroy();\n delete this.hotSubMenus[dataItem.key];\n }\n }\n /**\n * Close all opened sub menus.\n */\n\n }, {\n key: \"closeAllSubMenus\",\n value: function closeAllSubMenus() {\n var _this3 = this;\n\n arrayEach(this.hotMenu.getData(), function (value, row) {\n return _this3.closeSubMenu(row);\n });\n }\n /**\n * Checks if all created and opened sub menus are closed.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isAllSubMenusClosed\",\n value: function isAllSubMenusClosed() {\n return Object.keys(this.hotSubMenus).length === 0;\n }\n /**\n * Destroy instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n var menuContainerParentElement = this.container.parentNode;\n this.clearLocalHooks();\n this.close();\n this.parentMenu = null;\n this.eventManager.destroy();\n\n if (menuContainerParentElement) {\n menuContainerParentElement.removeChild(this.container);\n }\n }\n /**\n * Checks if menu was opened.\n *\n * @returns {boolean} Returns `true` if menu was opened.\n */\n\n }, {\n key: \"isOpened\",\n value: function isOpened() {\n return this.hotMenu !== null;\n }\n /**\n * Execute menu command.\n *\n * @param {Event} [event] The mouse event object.\n */\n\n }, {\n key: \"executeCommand\",\n value: function executeCommand(event) {\n if (!this.isOpened() || !this.hasSelectedItem()) {\n return;\n }\n\n var selectedItem = this.getSelectedItem();\n this.runLocalHooks('select', selectedItem, event);\n\n if (this.isCommandPassive(selectedItem)) {\n return;\n }\n\n var selRanges = this.hot.getSelectedRange();\n var normalizedSelection = selRanges ? normalizeSelection(selRanges) : [];\n this.runLocalHooks('executeCommand', selectedItem.key, normalizedSelection, event);\n\n if (this.isSubMenu()) {\n this.parentMenu.runLocalHooks('executeCommand', selectedItem.key, normalizedSelection, event);\n }\n }\n /**\n * Checks if the passed command is passive or not. The command is passive when it's marked as\n * disabled, the descriptor object contains `isCommand` property set to `false`, command\n * is a separator, or the item is recognized as submenu. For passive items the menu is not\n * closed automatically after the user trigger the command through the UI.\n *\n * @param {object} commandDescriptor Selected menu item from the menu data source.\n * @returns {boolean}\n */\n\n }, {\n key: \"isCommandPassive\",\n value: function isCommandPassive(commandDescriptor) {\n var isCommand = commandDescriptor.isCommand,\n commandName = commandDescriptor.name,\n disabled = commandDescriptor.disabled,\n submenu = commandDescriptor.submenu;\n var isItemDisabled = disabled === true || typeof disabled === 'function' && disabled.call(this.hot) === true;\n return isCommand === false || commandName === SEPARATOR || isItemDisabled === true || submenu;\n }\n /**\n * Set menu position based on dom event or based on literal object.\n *\n * @param {Event|object} coords Event or literal Object with coordinates.\n */\n\n }, {\n key: \"setPosition\",\n value: function setPosition(coords) {\n var cursor = new Cursor(coords, this.container.ownerDocument.defaultView);\n\n if (this.options.keepInViewport) {\n if (cursor.fitsBelow(this.container)) {\n this.setPositionBelowCursor(cursor);\n } else if (cursor.fitsAbove(this.container)) {\n this.setPositionAboveCursor(cursor);\n } else {\n this.setPositionBelowCursor(cursor);\n }\n\n if (cursor.fitsOnRight(this.container)) {\n this.setPositionOnRightOfCursor(cursor);\n } else {\n this.setPositionOnLeftOfCursor(cursor);\n }\n } else {\n this.setPositionBelowCursor(cursor);\n this.setPositionOnRightOfCursor(cursor);\n }\n }\n /**\n * Set menu position above cursor object.\n *\n * @param {Cursor} cursor `Cursor` object.\n */\n\n }, {\n key: \"setPositionAboveCursor\",\n value: function setPositionAboveCursor(cursor) {\n var top = this.offset.above + cursor.top - this.container.offsetHeight;\n\n if (this.isSubMenu()) {\n top = cursor.top + cursor.cellHeight - this.container.offsetHeight + 3;\n }\n\n this.container.style.top = \"\".concat(top, \"px\");\n }\n /**\n * Set menu position below cursor object.\n *\n * @param {Cursor} cursor `Cursor` object.\n */\n\n }, {\n key: \"setPositionBelowCursor\",\n value: function setPositionBelowCursor(cursor) {\n var top = this.offset.below + cursor.top + 1;\n\n if (this.isSubMenu()) {\n top = cursor.top - 1;\n }\n\n this.container.style.top = \"\".concat(top, \"px\");\n }\n /**\n * Set menu position on the right of cursor object.\n *\n * @param {Cursor} cursor `Cursor` object.\n */\n\n }, {\n key: \"setPositionOnRightOfCursor\",\n value: function setPositionOnRightOfCursor(cursor) {\n var left;\n\n if (this.isSubMenu()) {\n left = 1 + cursor.left + cursor.cellWidth;\n } else {\n left = this.offset.right + 1 + cursor.left;\n }\n\n this.container.style.left = \"\".concat(left, \"px\");\n }\n /**\n * Set menu position on the left of cursor object.\n *\n * @param {Cursor} cursor `Cursor` object.\n */\n\n }, {\n key: \"setPositionOnLeftOfCursor\",\n value: function setPositionOnLeftOfCursor(cursor) {\n var scrollbarWidth = getScrollbarWidth(this.hot.rootDocument);\n var left = this.offset.left + cursor.left - this.container.offsetWidth + scrollbarWidth + 4;\n this.container.style.left = \"\".concat(left, \"px\");\n }\n /**\n * Select first cell in opened menu.\n */\n\n }, {\n key: \"selectFirstCell\",\n value: function selectFirstCell() {\n var cell = this.hotMenu.getCell(0, 0);\n\n if (isSeparator(cell) || isDisabled(cell) || isSelectionDisabled(cell)) {\n this.selectNextCell(0, 0);\n } else {\n this.hotMenu.selectCell(0, 0);\n }\n }\n /**\n * Select last cell in opened menu.\n */\n\n }, {\n key: \"selectLastCell\",\n value: function selectLastCell() {\n var lastRow = this.hotMenu.countRows() - 1;\n var cell = this.hotMenu.getCell(lastRow, 0);\n\n if (isSeparator(cell) || isDisabled(cell) || isSelectionDisabled(cell)) {\n this.selectPrevCell(lastRow, 0);\n } else {\n this.hotMenu.selectCell(lastRow, 0);\n }\n }\n /**\n * Select next cell in opened menu.\n *\n * @param {number} row Row index.\n * @param {number} col Column index.\n */\n\n }, {\n key: \"selectNextCell\",\n value: function selectNextCell(row, col) {\n var nextRow = row + 1;\n var cell = nextRow < this.hotMenu.countRows() ? this.hotMenu.getCell(nextRow, col) : null;\n\n if (!cell) {\n return;\n }\n\n if (isSeparator(cell) || isDisabled(cell) || isSelectionDisabled(cell)) {\n this.selectNextCell(nextRow, col);\n } else {\n this.hotMenu.selectCell(nextRow, col);\n }\n }\n /**\n * Select previous cell in opened menu.\n *\n * @param {number} row Row index.\n * @param {number} col Column index.\n */\n\n }, {\n key: \"selectPrevCell\",\n value: function selectPrevCell(row, col) {\n var prevRow = row - 1;\n var cell = prevRow >= 0 ? this.hotMenu.getCell(prevRow, col) : null;\n\n if (!cell) {\n return;\n }\n\n if (isSeparator(cell) || isDisabled(cell) || isSelectionDisabled(cell)) {\n this.selectPrevCell(prevRow, col);\n } else {\n this.hotMenu.selectCell(prevRow, col);\n }\n }\n /**\n * Menu item renderer.\n *\n * @private\n * @param {Core} hot The Handsontable instance.\n * @param {HTMLCellElement} TD The rendered cell element.\n * @param {number} row The visual index.\n * @param {number} col The visual index.\n * @param {string} prop The column property if used.\n * @param {string} value The cell value.\n */\n\n }, {\n key: \"menuItemRenderer\",\n value: function menuItemRenderer(hot, TD, row, col, prop, value) {\n var _this4 = this;\n\n var item = hot.getSourceDataAtRow(row);\n var wrapper = this.hot.rootDocument.createElement('div');\n\n var isSubMenu = function isSubMenu(itemToTest) {\n return hasOwnProperty(itemToTest, 'submenu');\n };\n\n var itemIsSeparator = function itemIsSeparator(itemToTest) {\n return new RegExp(SEPARATOR, 'i').test(itemToTest.name);\n };\n\n var itemIsDisabled = function itemIsDisabled(itemToTest) {\n return itemToTest.disabled === true || typeof itemToTest.disabled === 'function' && itemToTest.disabled.call(_this4.hot) === true;\n };\n\n var itemIsSelectionDisabled = function itemIsSelectionDisabled(itemToTest) {\n return itemToTest.disableSelection;\n };\n\n var itemValue = value;\n\n if (typeof itemValue === 'function') {\n itemValue = itemValue.call(this.hot);\n }\n\n empty(TD);\n addClass(wrapper, 'htItemWrapper');\n TD.appendChild(wrapper);\n\n if (itemIsSeparator(item)) {\n addClass(TD, 'htSeparator');\n } else if (typeof item.renderer === 'function') {\n addClass(TD, 'htCustomMenuRenderer');\n TD.appendChild(item.renderer(hot, wrapper, row, col, prop, itemValue));\n } else {\n fastInnerHTML(wrapper, itemValue);\n }\n\n if (itemIsDisabled(item)) {\n addClass(TD, 'htDisabled');\n this.eventManager.addEventListener(TD, 'mouseenter', function () {\n return hot.deselectCell();\n });\n } else if (itemIsSelectionDisabled(item)) {\n addClass(TD, 'htSelectionDisabled');\n this.eventManager.addEventListener(TD, 'mouseenter', function () {\n return hot.deselectCell();\n });\n } else if (isSubMenu(item)) {\n addClass(TD, 'htSubmenu');\n\n if (itemIsSelectionDisabled(item)) {\n this.eventManager.addEventListener(TD, 'mouseenter', function () {\n return hot.deselectCell();\n });\n } else {\n this.eventManager.addEventListener(TD, 'mouseenter', function () {\n return hot.selectCell(row, col, void 0, void 0, false, false);\n });\n }\n } else {\n removeClass(TD, ['htSubmenu', 'htDisabled']);\n\n if (itemIsSelectionDisabled(item)) {\n this.eventManager.addEventListener(TD, 'mouseenter', function () {\n return hot.deselectCell();\n });\n } else {\n this.eventManager.addEventListener(TD, 'mouseenter', function () {\n return hot.selectCell(row, col, void 0, void 0, false, false);\n });\n }\n }\n }\n /**\n * Create container/wrapper for handsontable.\n *\n * @private\n * @param {string} [name] Class name.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"createContainer\",\n value: function createContainer() {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var doc = this.options.container.ownerDocument;\n var className = name;\n var container;\n\n if (className) {\n if (isFunction(className)) {\n className = className.call(this.hot);\n\n if (className === null || isUndefined(className)) {\n className = '';\n } else {\n className = className.toString();\n }\n }\n\n className = className.replace(/[^A-z0-9]/g, '_');\n className = \"\".concat(this.options.className, \"Sub_\").concat(className);\n container = doc.querySelector(\".\".concat(this.options.className, \".\").concat(className));\n }\n\n if (!container) {\n container = doc.createElement('div');\n addClass(container, \"htMenu \".concat(this.options.className));\n\n if (className) {\n addClass(container, className);\n }\n\n this.options.container.appendChild(container);\n }\n\n return container;\n }\n /**\n * @private\n */\n\n }, {\n key: \"blockMainTableCallbacks\",\n value: function blockMainTableCallbacks() {\n this._afterScrollCallback = function () {};\n\n this.hot.addHook('afterScrollVertically', this._afterScrollCallback);\n this.hot.addHook('afterScrollHorizontally', this._afterScrollCallback);\n }\n /**\n * @private\n */\n\n }, {\n key: \"releaseMainTableCallbacks\",\n value: function releaseMainTableCallbacks() {\n if (this._afterScrollCallback) {\n this.hot.removeHook('afterScrollVertically', this._afterScrollCallback);\n this.hot.removeHook('afterScrollHorizontally', this._afterScrollCallback);\n this._afterScrollCallback = null;\n }\n }\n /**\n * On before key down listener.\n *\n * @private\n * @param {Event} event The keyaboard event object.\n */\n\n }, {\n key: \"onBeforeKeyDown\",\n value: function onBeforeKeyDown(event) {\n // For input elements, prevent event propagation. It allows entering text into an input\n // element freely - without steeling the key events from the menu module (#6506, #6549).\n if (isInput(event.target) && this.container.contains(event.target)) {\n stopImmediatePropagation(event);\n return;\n }\n\n var selection = this.hotMenu.getSelectedLast();\n var stopEvent = false;\n this.keyEvent = true;\n\n switch (event.keyCode) {\n case KEY_CODES.ESCAPE:\n this.close();\n stopEvent = true;\n break;\n\n case KEY_CODES.ENTER:\n if (selection) {\n if (this.hotMenu.getSourceDataAtRow(selection[0]).submenu) {\n stopEvent = true;\n } else {\n this.executeCommand(event);\n this.close(true);\n }\n }\n\n break;\n\n case KEY_CODES.ARROW_DOWN:\n if (selection) {\n this.selectNextCell(selection[0], selection[1]);\n } else {\n this.selectFirstCell();\n }\n\n stopEvent = true;\n break;\n\n case KEY_CODES.ARROW_UP:\n if (selection) {\n this.selectPrevCell(selection[0], selection[1]);\n } else {\n this.selectLastCell();\n }\n\n stopEvent = true;\n break;\n\n case KEY_CODES.ARROW_RIGHT:\n if (selection) {\n var menu = this.openSubMenu(selection[0]);\n\n if (menu) {\n menu.selectFirstCell();\n }\n }\n\n stopEvent = true;\n break;\n\n case KEY_CODES.ARROW_LEFT:\n if (selection && this.isSubMenu()) {\n this.close();\n\n if (this.parentMenu) {\n this.parentMenu.hotMenu.listen();\n }\n\n stopEvent = true;\n }\n\n break;\n\n default:\n break;\n }\n\n if (stopEvent) {\n event.preventDefault();\n stopImmediatePropagation(event);\n }\n\n this.keyEvent = false;\n }\n /**\n * On after init listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterInit\",\n value: function onAfterInit() {\n var wtTable = this.hotMenu.view.wt.wtTable;\n var data = this.hotMenu.getSettings().data;\n var hiderStyle = wtTable.hider.style;\n var holderStyle = wtTable.holder.style;\n var currentHiderWidth = parseInt(hiderStyle.width, 10);\n var realHeight = arrayReduce(data, function (accumulator, value) {\n return accumulator + (value.name === SEPARATOR ? 1 : 26);\n }, 0); // Additional 3px to menu's size because of additional border around its `table.htCore`.\n\n holderStyle.width = \"\".concat(currentHiderWidth + 3, \"px\");\n holderStyle.height = \"\".concat(realHeight + 3, \"px\");\n hiderStyle.height = holderStyle.height;\n }\n /**\n * On after selection listener.\n *\n * @param {number} r Selection start row index.\n * @param {number} c Selection start column index.\n * @param {number} r2 Selection end row index.\n * @param {number} c2 Selection end column index.\n * @param {object} preventScrolling Object with `value` property where its value change will be observed.\n */\n\n }, {\n key: \"onAfterSelection\",\n value: function onAfterSelection(r, c, r2, c2, preventScrolling) {\n if (this.keyEvent === false) {\n preventScrolling.value = true;\n }\n }\n /**\n * Document mouse down listener.\n *\n * @private\n * @param {Event} event The mouse event object.\n */\n\n }, {\n key: \"onDocumentMouseDown\",\n value: function onDocumentMouseDown(event) {\n if (!this.isOpened()) {\n return;\n } // Close menu when clicked element is not belongs to menu itself\n\n\n if (this.options.standalone && this.hotMenu && !isChildOf(event.target, this.hotMenu.rootElement)) {\n this.close(true); // Automatically close menu when clicked element is not belongs to menu or submenu (not necessarily to itself)\n } else if ((this.isAllSubMenusClosed() || this.isSubMenu()) && !isChildOf(event.target, '.htMenu') && (isChildOf(event.target, this.container.ownerDocument) || isChildOf(event.target, this.hot.rootDocument))) {\n this.close(true);\n }\n }\n /**\n * Document's contextmenu listener.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n\n }, {\n key: \"onDocumentContextMenu\",\n value: function onDocumentContextMenu(event) {\n if (!this.isOpened()) {\n return;\n }\n\n if (hasClass(event.target, 'htCore') && isChildOf(event.target, this.hotMenu.rootElement)) {\n event.preventDefault();\n }\n }\n }]);\n\n return Menu;\n}();\n\nmixin(Menu, localHooks);\nexport default Menu;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport CommandExecutor from \"./commandExecutor.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport ItemsFactory from \"./itemsFactory.mjs\";\nimport Menu from \"./menu.mjs\";\nimport { getWindowScrollLeft, getWindowScrollTop, hasClass } from \"../../helpers/dom/element.mjs\";\nimport { ROW_ABOVE, ROW_BELOW, COLUMN_LEFT, COLUMN_RIGHT, REMOVE_ROW, REMOVE_COLUMN, UNDO, REDO, READ_ONLY, ALIGNMENT, SEPARATOR } from \"./predefinedItems.mjs\";\nexport var PLUGIN_KEY = 'contextMenu';\nexport var PLUGIN_PRIORITY = 70;\nHooks.getSingleton().register('afterContextMenuDefaultOptions');\nHooks.getSingleton().register('beforeContextMenuShow');\nHooks.getSingleton().register('afterContextMenuShow');\nHooks.getSingleton().register('afterContextMenuHide');\nHooks.getSingleton().register('afterContextMenuExecute');\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @class ContextMenu\n * @description\n * This plugin creates the Handsontable Context Menu. It allows to create a new row or column at any place in the\n * grid among [other features](https://handsontable.com/docs/demo-context-menu.html).\n * Possible values:\n * * `true` (to enable default options),\n * * `false` (to disable completely)\n * * `{ uiContainer: containerDomElement }` (to declare a container for all of the Context Menu's dom elements to be placed in).\n *\n * or array of any available strings:\n * * `'row_above'`\n * * `'row_below'`\n * * `'col_left'`\n * * `'col_right'`\n * * `'remove_row'`\n * * `'remove_col'`\n * * `'undo'`\n * * `'redo'`\n * * `'make_read_only'`\n * * `'alignment'`\n * * `'---------'` (menu item separator)\n * * `'borders'` (with {@link Options#customBorders} turned on)\n * * `'commentsAddEdit'` (with {@link Options#comments} turned on)\n * * `'commentsRemove'` (with {@link Options#comments} turned on).\n *\n * See [the context menu demo](https://handsontable.com/docs/demo-context-menu.html) for examples.\n *\n * @example\n * ```js\n * // as a boolean\n * contextMenu: true\n * // as a array\n * contextMenu: ['row_above', 'row_below', '---------', 'undo', 'redo']\n * ```\n *\n * @plugin ContextMenu\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nexport var ContextMenu = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ContextMenu, _BasePlugin);\n\n var _super = _createSuper(ContextMenu);\n\n function ContextMenu(hotInstance) {\n var _this;\n\n _classCallCheck(this, ContextMenu);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Instance of {@link CommandExecutor}.\n *\n * @private\n * @type {CommandExecutor}\n */\n\n _this.commandExecutor = new CommandExecutor(_this.hot);\n /**\n * Instance of {@link ItemsFactory}.\n *\n * @private\n * @type {ItemsFactory}\n */\n\n _this.itemsFactory = null;\n /**\n * Instance of {@link Menu}.\n *\n * @private\n * @type {Menu}\n */\n\n _this.menu = null;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ContextMenu#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ContextMenu, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var settings = this.hot.getSettings()[PLUGIN_KEY];\n\n if (typeof settings.callback === 'function') {\n this.commandExecutor.setCommonCallback(settings.callback);\n }\n\n this.menu = new Menu(this.hot, {\n className: 'htContextMenu',\n keepInViewport: true,\n container: settings.uiContainer || this.hot.rootDocument.body\n });\n this.menu.addLocalHook('beforeOpen', function () {\n return _this2.onMenuBeforeOpen();\n });\n this.menu.addLocalHook('afterOpen', function () {\n return _this2.onMenuAfterOpen();\n });\n this.menu.addLocalHook('afterClose', function () {\n return _this2.onMenuAfterClose();\n });\n this.menu.addLocalHook('executeCommand', function () {\n var _this2$executeCommand;\n\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n\n return (_this2$executeCommand = _this2.executeCommand).call.apply(_this2$executeCommand, [_this2].concat(params));\n });\n this.addHook('afterOnCellContextMenu', function (event) {\n return _this2.onAfterOnCellContextMenu(event);\n });\n\n _get(_getPrototypeOf(ContextMenu.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(ContextMenu.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.close();\n\n if (this.menu) {\n this.menu.destroy();\n this.menu = null;\n }\n\n _get(_getPrototypeOf(ContextMenu.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Opens menu and re-position it based on the passed coordinates.\n *\n * @param {Event} event The mouse event object.\n */\n\n }, {\n key: \"open\",\n value: function open(event) {\n if (!this.menu) {\n return;\n }\n\n this.prepareMenuItems();\n this.menu.open();\n\n if (!this.menu.isOpened()) {\n return;\n }\n\n var offsetTop = 0;\n var offsetLeft = 0;\n\n if (this.hot.rootDocument !== this.menu.container.ownerDocument) {\n var frameElement = this.hot.rootWindow.frameElement;\n\n var _frameElement$getBoun = frameElement.getBoundingClientRect(),\n top = _frameElement$getBoun.top,\n left = _frameElement$getBoun.left;\n\n offsetTop = top - getWindowScrollTop(event.view);\n offsetLeft = left - getWindowScrollLeft(event.view);\n } else {\n offsetTop = -1 * getWindowScrollTop(this.menu.hotMenu.rootWindow);\n offsetLeft = -1 * getWindowScrollLeft(this.menu.hotMenu.rootWindow);\n }\n\n this.menu.setPosition({\n top: parseInt(event.pageY, 10) + offsetTop,\n left: parseInt(event.pageX, 10) + offsetLeft\n });\n }\n /**\n * Closes the menu.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n if (!this.menu) {\n return;\n }\n\n this.menu.close();\n this.itemsFactory = null;\n }\n /**\n * Execute context menu command.\n *\n * You can execute all predefined commands:\n * * `'row_above'` - Insert row above\n * * `'row_below'` - Insert row below\n * * `'col_left'` - Insert column left\n * * `'col_right'` - Insert column right\n * * `'clear_column'` - Clear selected column\n * * `'remove_row'` - Remove row\n * * `'remove_col'` - Remove column\n * * `'undo'` - Undo last action\n * * `'redo'` - Redo last action\n * * `'make_read_only'` - Make cell read only\n * * `'alignment:left'` - Alignment to the left\n * * `'alignment:top'` - Alignment to the top\n * * `'alignment:right'` - Alignment to the right\n * * `'alignment:bottom'` - Alignment to the bottom\n * * `'alignment:middle'` - Alignment to the middle\n * * `'alignment:center'` - Alignment to the center (justify).\n *\n * Or you can execute command registered in settings where `key` is your command name.\n *\n * @param {string} commandName The command name to be executed.\n * @param {*} params Additional paramteres passed to command executor module.\n */\n\n }, {\n key: \"executeCommand\",\n value: function executeCommand(commandName) {\n var _this$commandExecutor;\n\n if (this.itemsFactory === null) {\n this.prepareMenuItems();\n }\n\n for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n params[_key2 - 1] = arguments[_key2];\n }\n\n (_this$commandExecutor = this.commandExecutor).execute.apply(_this$commandExecutor, [commandName].concat(params));\n }\n /**\n * Prepares available contextMenu's items list and registers them in commandExecutor.\n *\n * @private\n * @fires Hooks#afterContextMenuDefaultOptions\n * @fires Hooks#beforeContextMenuSetItems\n */\n\n }, {\n key: \"prepareMenuItems\",\n value: function prepareMenuItems() {\n var _this3 = this;\n\n this.itemsFactory = new ItemsFactory(this.hot, ContextMenu.DEFAULT_ITEMS);\n var settings = this.hot.getSettings()[PLUGIN_KEY];\n var predefinedItems = {\n items: this.itemsFactory.getItems(settings)\n };\n this.hot.runHooks('afterContextMenuDefaultOptions', predefinedItems);\n this.itemsFactory.setPredefinedItems(predefinedItems.items);\n var menuItems = this.itemsFactory.getItems(settings);\n this.hot.runHooks('beforeContextMenuSetItems', menuItems);\n this.menu.setMenuItems(menuItems); // Register all commands. Predefined and added by user or by plugins\n\n arrayEach(menuItems, function (command) {\n return _this3.commandExecutor.registerCommand(command.key, command);\n });\n }\n /**\n * On contextmenu listener.\n *\n * @private\n * @param {Event} event The mouse event object.\n */\n\n }, {\n key: \"onAfterOnCellContextMenu\",\n value: function onAfterOnCellContextMenu(event) {\n var settings = this.hot.getSettings();\n var showRowHeaders = settings.rowHeaders;\n var showColHeaders = settings.colHeaders;\n /**\n * @param {HTMLElement} element The element to validate.\n * @returns {boolean}\n */\n\n function isValidElement(element) {\n return element.nodeName === 'TD' || element.parentNode.nodeName === 'TD';\n }\n\n var element = event.target;\n this.close();\n\n if (hasClass(element, 'handsontableInput')) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (!(showRowHeaders || showColHeaders)) {\n if (!isValidElement(element) && !(hasClass(element, 'current') && hasClass(element, 'wtBorder'))) {\n return;\n }\n }\n\n this.open(event);\n }\n /**\n * On menu before open listener.\n *\n * @private\n */\n\n }, {\n key: \"onMenuBeforeOpen\",\n value: function onMenuBeforeOpen() {\n this.hot.runHooks('beforeContextMenuShow', this);\n }\n /**\n * On menu after open listener.\n *\n * @private\n */\n\n }, {\n key: \"onMenuAfterOpen\",\n value: function onMenuAfterOpen() {\n this.hot.runHooks('afterContextMenuShow', this);\n }\n /**\n * On menu after close listener.\n *\n * @private\n */\n\n }, {\n key: \"onMenuAfterClose\",\n value: function onMenuAfterClose() {\n this.hot.listen();\n this.hot.runHooks('afterContextMenuHide', this);\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.close();\n\n if (this.menu) {\n this.menu.destroy();\n }\n\n _get(_getPrototypeOf(ContextMenu.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }, {\n key: \"PLUGIN_DEPS\",\n get: function get() {\n return ['plugin:AutoColumnSize'];\n }\n /**\n * Context menu default items order when `contextMenu` options is set as `true`.\n *\n * @returns {string[]}\n */\n\n }, {\n key: \"DEFAULT_ITEMS\",\n get: function get() {\n return [ROW_ABOVE, ROW_BELOW, SEPARATOR, COLUMN_LEFT, COLUMN_RIGHT, SEPARATOR, REMOVE_ROW, REMOVE_COLUMN, SEPARATOR, UNDO, REDO, SEPARATOR, READ_ONLY, SEPARATOR, ALIGNMENT];\n }\n }]);\n\n return ContextMenu;\n}(BasePlugin);\nContextMenu.SEPARATOR = {\n name: SEPARATOR\n};","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar ClipboardData = /*#__PURE__*/function () {\n function ClipboardData() {\n _classCallCheck(this, ClipboardData);\n\n this.data = {};\n }\n\n _createClass(ClipboardData, [{\n key: \"setData\",\n value: function setData(type, value) {\n this.data[type] = value;\n }\n }, {\n key: \"getData\",\n value: function getData(type) {\n return this.data[type] || void 0;\n }\n }]);\n\n return ClipboardData;\n}();\n\nexport { ClipboardData as default };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nimport ClipboardData from \"./clipboardData.mjs\";\n\nvar PasteEvent = function PasteEvent() {\n _classCallCheck(this, PasteEvent);\n\n this.clipboardData = new ClipboardData();\n};\n\nexport { PasteEvent as default };","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/es.weak-set.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport EventManager from \"../../eventManager.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport { isMobileBrowser } from \"../../helpers/browser.mjs\";\nimport { selectElementIfAllowed } from \"../../helpers/dom/element.mjs\";\n/**\n * @class FocusableWrapper\n *\n * @plugin CopyPaste\n */\n\nvar FocusableWrapper = /*#__PURE__*/function () {\n function FocusableWrapper(container) {\n _classCallCheck(this, FocusableWrapper);\n\n this.rootDocument = container.defaultView ? container : container.ownerDocument;\n /**\n * The main/operational focusable element.\n *\n * @type {HTMLElement}\n */\n\n this.mainElement = null;\n /**\n * Instance of EventManager.\n *\n * @type {EventManager}\n */\n\n this.eventManager = new EventManager(this);\n /**\n * An object for tracking information about event listeners attached to the focusable element.\n *\n * @type {WeakSet}\n */\n\n this.listenersCount = new WeakSet();\n /**\n * Parent for an focusable element.\n *\n * @type {HTMLElement}\n */\n\n this.container = container;\n }\n /**\n * Switch to the secondary focusable element. Used when no any main focusable element is provided.\n */\n\n\n _createClass(FocusableWrapper, [{\n key: \"useSecondaryElement\",\n value: function useSecondaryElement() {\n var el = createOrGetSecondaryElement(this.container);\n\n if (!this.listenersCount.has(el)) {\n this.listenersCount.add(el);\n forwardEventsToLocalHooks(this.eventManager, el, this);\n }\n\n this.mainElement = el;\n }\n /**\n * Switch to the main focusable element.\n *\n * @param {HTMLElement} element The DOM element.\n */\n\n }, {\n key: \"setFocusableElement\",\n value: function setFocusableElement(element) {\n if (!this.listenersCount.has(element)) {\n this.listenersCount.add(element);\n forwardEventsToLocalHooks(this.eventManager, element, this);\n }\n\n this.mainElement = element;\n }\n /**\n * Get currently set focusable element.\n *\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"getFocusableElement\",\n value: function getFocusableElement() {\n return this.mainElement;\n }\n /**\n * Set focus to the focusable element.\n */\n\n }, {\n key: \"focus\",\n value: function focus() {\n // Add an empty space to texarea. It is necessary for safari to enable \"copy\" command from menu bar.\n this.mainElement.value = ' ';\n\n if (!isMobileBrowser()) {\n selectElementIfAllowed(this.mainElement);\n }\n }\n }]);\n\n return FocusableWrapper;\n}();\n\nmixin(FocusableWrapper, localHooks);\nvar refCounter = new WeakMap();\n/**\n * Create and return the FocusableWrapper instance.\n *\n * @param {HTMLElement} container The container element, holder for focusable elements.\n * @returns {FocusableWrapper}\n */\n\nfunction createElement(container) {\n var focusableWrapper = new FocusableWrapper(container);\n var counter = refCounter.get(container);\n counter = isNaN(counter) ? 0 : counter;\n refCounter.set(container, counter + 1);\n return focusableWrapper;\n}\n/**\n * Deactivate the FocusableWrapper instance.\n *\n * @param {FocusableWrapper} wrapper The instance of the FocusableWrapper class.\n */\n\n\nfunction deactivateElement(wrapper) {\n wrapper.eventManager.clear();\n}\n\nvar runLocalHooks = function runLocalHooks(eventName, subject) {\n return function (event) {\n return subject.runLocalHooks(eventName, event);\n };\n};\n/**\n * Register copy/cut/paste events and forward their actions to the subject local hooks system.\n *\n * @param {EventManager} eventManager The instance of the EventManager class.\n * @param {HTMLElement} element The element on which the listeners are mounted.\n * @param {FocusableWrapper} subject The subject object for local hooks.\n */\n\n\nfunction forwardEventsToLocalHooks(eventManager, element, subject) {\n eventManager.addEventListener(element, 'copy', runLocalHooks('copy', subject));\n eventManager.addEventListener(element, 'cut', runLocalHooks('cut', subject));\n eventManager.addEventListener(element, 'paste', runLocalHooks('paste', subject));\n}\n\nvar secondaryElements = new WeakMap();\n/**\n * Create and attach newly created focusable element to the DOM.\n *\n * @param {HTMLElement} container The container element, holder for focusable elements.\n * @returns {HTMLElement}\n */\n\nfunction createOrGetSecondaryElement(container) {\n var secondaryElement = secondaryElements.get(container);\n\n if (secondaryElement) {\n if (!secondaryElement.parentElement) {\n container.appendChild(secondaryElement);\n }\n\n return secondaryElement;\n }\n\n var doc = container.defaultView ? container : container.ownerDocument;\n var element = doc.createElement('textarea');\n secondaryElements.set(container, element);\n element.setAttribute('data-hot-input', ''); // Makes the element recognizable by Hot as its own component's element.\n\n element.className = 'HandsontableCopyPaste';\n element.tabIndex = -1;\n element.autocomplete = 'off';\n element.wrap = 'hard';\n element.value = ' ';\n container.appendChild(element);\n return element;\n}\n/**\n * Destroy the FocusableWrapper instance.\n *\n * @param {FocusableWrapper} wrapper The instance of the FocusableWrapper class.\n */\n\n\nfunction destroyElement(wrapper) {\n if (!(wrapper instanceof FocusableWrapper)) {\n return;\n }\n\n var counter = refCounter.get(wrapper.container);\n counter = isNaN(counter) ? 0 : counter;\n\n if (counter > 0) {\n counter -= 1;\n }\n\n deactivateElement(wrapper);\n\n if (counter <= 0) {\n counter = 0; // Detach secondary element from the DOM.\n\n var secondaryElement = secondaryElements.get(wrapper.container);\n\n if (secondaryElement && secondaryElement.parentNode) {\n secondaryElement.parentNode.removeChild(secondaryElement);\n secondaryElements.delete(wrapper.container);\n }\n\n wrapper.mainElement = null;\n }\n\n refCounter.set(wrapper.container, counter);\n}\n\nexport { createElement, deactivateElement, destroyElement };","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { stringify, parse } from \"../../3rdparty/SheetClip/index.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { sanitize } from \"../../helpers/string.mjs\";\nimport { getSelectionText } from \"../../helpers/dom/element.mjs\";\nimport copyItem from \"./contextMenuItem/copy.mjs\";\nimport cutItem from \"./contextMenuItem/cut.mjs\";\nimport PasteEvent from \"./pasteEvent.mjs\";\nimport { createElement, destroyElement } from \"./focusableElement.mjs\";\nimport { _dataToHTML, htmlToGridSettings } from \"../../utils/parseTable.mjs\";\nHooks.getSingleton().register('afterCopyLimit');\nHooks.getSingleton().register('modifyCopyableRange');\nHooks.getSingleton().register('beforeCut');\nHooks.getSingleton().register('afterCut');\nHooks.getSingleton().register('beforePaste');\nHooks.getSingleton().register('afterPaste');\nHooks.getSingleton().register('beforeCopy');\nHooks.getSingleton().register('afterCopy');\nexport var PLUGIN_KEY = 'copyPaste';\nexport var PLUGIN_PRIORITY = 80;\nvar ROWS_LIMIT = 1000;\nvar COLUMNS_LIMIT = 1000;\nvar privatePool = new WeakMap();\nvar META_HEAD = [' ', ''].join('');\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @description\n * This plugin enables the copy/paste functionality in the Handsontable. The functionality works for API, Context Menu,\n * using keyboard shortcuts and menu bar from the browser.\n * Possible values:\n * * `true` (to enable default options),\n * * `false` (to disable completely).\n *\n * or an object with values:\n * * `'columnsLimit'` (see {@link CopyPaste#columnsLimit})\n * * `'rowsLimit'` (see {@link CopyPaste#rowsLimit})\n * * `'pasteMode'` (see {@link CopyPaste#pasteMode})\n * * `'uiContainer'` (see {@link CopyPaste#uiContainer}).\n *\n * See [the copy/paste demo](https://handsontable.com/docs/demo-copy-paste.html) for examples.\n *\n * @example\n * ```js\n * // Enables the plugin with default values\n * copyPaste: true,\n * // Enables the plugin with custom values\n * copyPaste: {\n * columnsLimit: 25,\n * rowsLimit: 50,\n * pasteMode: 'shift_down',\n * uiContainer: document.body,\n * },\n * ```\n * @class CopyPaste\n * @plugin CopyPaste\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nexport var CopyPaste = /*#__PURE__*/function (_BasePlugin) {\n _inherits(CopyPaste, _BasePlugin);\n\n var _super = _createSuper(CopyPaste);\n\n function CopyPaste(hotInstance) {\n var _this;\n\n _classCallCheck(this, CopyPaste);\n\n _this = _super.call(this, hotInstance);\n /**\n * Maximum number of columns than can be copied to clipboard using CTRL + C .\n *\n * @type {number}\n * @default 1000\n */\n\n _this.columnsLimit = COLUMNS_LIMIT;\n /**\n * Ranges of the cells coordinates, which should be used to copy/cut/paste actions.\n *\n * @private\n * @type {Array}\n */\n\n _this.copyableRanges = [];\n /**\n * Provides focusable element to support IME and copy/paste/cut actions.\n *\n * @type {FocusableWrapper}\n */\n\n _this.focusableElement = void 0;\n /**\n * Defines paste (CTRL + V ) behavior.\n * * Default value `\"overwrite\"` will paste clipboard value over current selection.\n * * When set to `\"shift_down\"`, clipboard data will be pasted in place of current selection, while all selected cells are moved down.\n * * When set to `\"shift_right\"`, clipboard data will be pasted in place of current selection, while all selected cells are moved right.\n *\n * @type {string}\n * @default 'overwrite'\n */\n\n _this.pasteMode = 'overwrite';\n /**\n * Maximum number of rows than can be copied to clipboard using CTRL + C .\n *\n * @type {number}\n * @default 1000\n */\n\n _this.rowsLimit = ROWS_LIMIT;\n /**\n * UI container for the secondary focusable element.\n *\n * @type {HTMLElement}\n */\n\n _this.uiContainer = _this.hot.rootDocument.body;\n privatePool.set(_assertThisInitialized(_this), {\n isTriggeredByCopy: false,\n isTriggeredByCut: false,\n isBeginEditing: false,\n isFragmentSelectionEnabled: false\n });\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link CopyPaste#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(CopyPaste, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var _this$hot$getSettings = this.hot.getSettings(),\n settings = _this$hot$getSettings[PLUGIN_KEY],\n fragmentSelection = _this$hot$getSettings.fragmentSelection;\n\n var priv = privatePool.get(this);\n priv.isFragmentSelectionEnabled = !!fragmentSelection;\n\n if (_typeof(settings) === 'object') {\n this.pasteMode = settings.pasteMode || this.pasteMode;\n this.rowsLimit = isNaN(settings.rowsLimit) ? this.rowsLimit : settings.rowsLimit;\n this.columnsLimit = isNaN(settings.columnsLimit) ? this.columnsLimit : settings.columnsLimit;\n this.uiContainer = settings.uiContainer || this.uiContainer;\n }\n\n this.addHook('afterContextMenuDefaultOptions', function (options) {\n return _this2.onAfterContextMenuDefaultOptions(options);\n });\n this.addHook('afterOnCellMouseUp', function () {\n return _this2.onAfterOnCellMouseUp();\n });\n this.addHook('afterSelectionEnd', function () {\n return _this2.onAfterSelectionEnd();\n });\n this.addHook('beforeKeyDown', function () {\n return _this2.onBeforeKeyDown();\n });\n this.focusableElement = createElement(this.uiContainer);\n this.focusableElement.addLocalHook('copy', function (event) {\n return _this2.onCopy(event);\n }).addLocalHook('cut', function (event) {\n return _this2.onCut(event);\n }).addLocalHook('paste', function (event) {\n return _this2.onPaste(event);\n });\n\n _get(_getPrototypeOf(CopyPaste.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n this.getOrCreateFocusableElement();\n\n _get(_getPrototypeOf(CopyPaste.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n if (this.focusableElement) {\n destroyElement(this.focusableElement);\n }\n\n _get(_getPrototypeOf(CopyPaste.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Copies the selected cell into the clipboard.\n */\n\n }, {\n key: \"copy\",\n value: function copy() {\n var priv = privatePool.get(this);\n priv.isTriggeredByCopy = true;\n this.getOrCreateFocusableElement();\n this.focusableElement.focus();\n this.hot.rootDocument.execCommand('copy');\n }\n /**\n * Cuts the selected cell into the clipboard.\n */\n\n }, {\n key: \"cut\",\n value: function cut() {\n var priv = privatePool.get(this);\n priv.isTriggeredByCut = true;\n this.getOrCreateFocusableElement();\n this.focusableElement.focus();\n this.hot.rootDocument.execCommand('cut');\n }\n /**\n * Creates copyable text releated to range objects.\n *\n * @param {object[]} ranges Array of objects with properties `startRow`, `endRow`, `startCol` and `endCol`.\n * @returns {string} Returns string which will be copied into clipboard.\n */\n\n }, {\n key: \"getRangedCopyableData\",\n value: function getRangedCopyableData(ranges) {\n var _this3 = this;\n\n var dataSet = [];\n var copyableRows = [];\n var copyableColumns = []; // Count all copyable rows and columns\n\n arrayEach(ranges, function (range) {\n rangeEach(range.startRow, range.endRow, function (row) {\n if (copyableRows.indexOf(row) === -1) {\n copyableRows.push(row);\n }\n });\n rangeEach(range.startCol, range.endCol, function (column) {\n if (copyableColumns.indexOf(column) === -1) {\n copyableColumns.push(column);\n }\n });\n }); // Concat all rows and columns data defined in ranges into one copyable string\n\n arrayEach(copyableRows, function (row) {\n var rowSet = [];\n arrayEach(copyableColumns, function (column) {\n rowSet.push(_this3.hot.getCopyableData(row, column));\n });\n dataSet.push(rowSet);\n });\n return stringify(dataSet);\n }\n /**\n * Creates copyable text releated to range objects.\n *\n * @param {object[]} ranges Array of objects with properties `startRow`, `startCol`, `endRow` and `endCol`.\n * @returns {Array[]} Returns array of arrays which will be copied into clipboard.\n */\n\n }, {\n key: \"getRangedData\",\n value: function getRangedData(ranges) {\n var _this4 = this;\n\n var dataSet = [];\n var copyableRows = [];\n var copyableColumns = []; // Count all copyable rows and columns\n\n arrayEach(ranges, function (range) {\n rangeEach(range.startRow, range.endRow, function (row) {\n if (copyableRows.indexOf(row) === -1) {\n copyableRows.push(row);\n }\n });\n rangeEach(range.startCol, range.endCol, function (column) {\n if (copyableColumns.indexOf(column) === -1) {\n copyableColumns.push(column);\n }\n });\n }); // Concat all rows and columns data defined in ranges into one copyable string\n\n arrayEach(copyableRows, function (row) {\n var rowSet = [];\n arrayEach(copyableColumns, function (column) {\n rowSet.push(_this4.hot.getCopyableData(row, column));\n });\n dataSet.push(rowSet);\n });\n return dataSet;\n }\n /**\n * Simulates the paste action.\n *\n * @param {string} pastableText Value as raw string to paste.\n * @param {string} [pastableHtml=''] Value as HTML to paste.\n */\n\n }, {\n key: \"paste\",\n value: function paste() {\n var pastableText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var pastableHtml = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pastableText;\n\n if (!pastableText && !pastableHtml) {\n return;\n }\n\n var pasteData = new PasteEvent();\n\n if (pastableText) {\n pasteData.clipboardData.setData('text/plain', pastableText);\n }\n\n if (pastableHtml) {\n pasteData.clipboardData.setData('text/html', pastableHtml);\n }\n\n this.getOrCreateFocusableElement();\n this.onPaste(pasteData);\n }\n /**\n * Prepares copyable text from the cells selection in the invisible textarea.\n */\n\n }, {\n key: \"setCopyableText\",\n value: function setCopyableText() {\n var selRange = this.hot.getSelectedRangeLast();\n\n if (!selRange) {\n return;\n }\n\n var topLeft = selRange.getTopLeftCorner();\n var bottomRight = selRange.getBottomRightCorner();\n var startRow = topLeft.row;\n var startCol = topLeft.col;\n var endRow = bottomRight.row;\n var endCol = bottomRight.col;\n var finalEndRow = Math.min(endRow, startRow + this.rowsLimit - 1);\n var finalEndCol = Math.min(endCol, startCol + this.columnsLimit - 1);\n this.copyableRanges.length = 0;\n this.copyableRanges.push({\n startRow: startRow,\n startCol: startCol,\n endRow: finalEndRow,\n endCol: finalEndCol\n });\n this.copyableRanges = this.hot.runHooks('modifyCopyableRange', this.copyableRanges);\n\n if (endRow !== finalEndRow || endCol !== finalEndCol) {\n this.hot.runHooks('afterCopyLimit', endRow - startRow + 1, endCol - startCol + 1, this.rowsLimit, this.columnsLimit);\n }\n }\n /**\n * Force focus on editable element.\n *\n * @private\n */\n\n }, {\n key: \"getOrCreateFocusableElement\",\n value: function getOrCreateFocusableElement() {\n var editor = this.hot.getActiveEditor();\n var editableElement = editor ? editor.TEXTAREA : void 0;\n\n if (editableElement) {\n this.focusableElement.setFocusableElement(editableElement);\n } else {\n this.focusableElement.useSecondaryElement();\n }\n }\n /**\n * Verifies if editor exists and is open.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"isEditorOpened\",\n value: function isEditorOpened() {\n var editor = this.hot.getActiveEditor();\n return editor && editor.isOpened();\n }\n /**\n * Prepares new values to populate them into datasource.\n *\n * @private\n * @param {Array} inputArray An array of the data to populate.\n * @param {Array} [selection] The selection which indicates from what position the data will be populated.\n * @returns {Array} Range coordinates after populate data.\n */\n\n }, {\n key: \"populateValues\",\n value: function populateValues(inputArray) {\n var selection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.hot.getSelectedRangeLast();\n\n if (!inputArray.length) {\n return;\n }\n\n var populatedRowsLength = inputArray.length;\n var populatedColumnsLength = inputArray[0].length;\n var newRows = [];\n\n var _selection$getTopLeft = selection.getTopLeftCorner(),\n startRow = _selection$getTopLeft.row,\n startColumn = _selection$getTopLeft.col;\n\n var _selection$getBottomR = selection.getBottomRightCorner(),\n endRowFromSelection = _selection$getBottomR.row,\n endColumnFromSelection = _selection$getBottomR.col;\n\n var visualRowForPopulatedData = startRow;\n var visualColumnForPopulatedData = startColumn;\n var lastVisualRow = startRow;\n var lastVisualColumn = startColumn; // We try to populate just all copied data or repeat copied data within a selection. Please keep in mind that we\n // don't know whether populated data is bigger than selection on start as there are some cells for which values\n // should be not inserted (it's known right after getting cell meta).\n\n while (newRows.length < populatedRowsLength || visualRowForPopulatedData <= endRowFromSelection) {\n var _this$hot$getCellMeta = this.hot.getCellMeta(visualRowForPopulatedData, startColumn),\n skipRowOnPaste = _this$hot$getCellMeta.skipRowOnPaste,\n visualRow = _this$hot$getCellMeta.visualRow;\n\n visualRowForPopulatedData = visualRow + 1;\n\n if (skipRowOnPaste === true) {\n /* eslint-disable no-continue */\n continue;\n }\n\n lastVisualRow = visualRow;\n visualColumnForPopulatedData = startColumn;\n var newRow = [];\n var insertedRow = newRows.length % populatedRowsLength;\n\n while (newRow.length < populatedColumnsLength || visualColumnForPopulatedData <= endColumnFromSelection) {\n var _this$hot$getCellMeta2 = this.hot.getCellMeta(startRow, visualColumnForPopulatedData),\n skipColumnOnPaste = _this$hot$getCellMeta2.skipColumnOnPaste,\n visualCol = _this$hot$getCellMeta2.visualCol;\n\n visualColumnForPopulatedData = visualCol + 1;\n\n if (skipColumnOnPaste === true) {\n /* eslint-disable no-continue */\n continue;\n }\n\n lastVisualColumn = visualCol;\n var insertedColumn = newRow.length % populatedColumnsLength;\n newRow.push(inputArray[insertedRow][insertedColumn]);\n }\n\n newRows.push(newRow);\n }\n\n this.hot.populateFromArray(startRow, startColumn, newRows, void 0, void 0, 'CopyPaste.paste', this.pasteMode);\n return [startRow, startColumn, lastVisualRow, lastVisualColumn];\n }\n /**\n * `copy` event callback on textarea element.\n *\n * @param {Event} event ClipboardEvent.\n * @private\n */\n\n }, {\n key: \"onCopy\",\n value: function onCopy(event) {\n var priv = privatePool.get(this);\n\n if (!this.hot.isListening() && !priv.isTriggeredByCopy || this.isEditorOpened()) {\n return;\n }\n\n this.setCopyableText();\n priv.isTriggeredByCopy = false;\n var rangedData = this.getRangedData(this.copyableRanges);\n var allowCopying = !!this.hot.runHooks('beforeCopy', rangedData, this.copyableRanges);\n\n if (allowCopying) {\n var textPlain = stringify(rangedData);\n\n if (event && event.clipboardData) {\n var textHTML = _dataToHTML(rangedData, this.hot.rootDocument);\n\n event.clipboardData.setData('text/plain', textPlain);\n event.clipboardData.setData('text/html', [META_HEAD, textHTML].join(''));\n } else if (typeof ClipboardEvent === 'undefined') {\n this.hot.rootWindow.clipboardData.setData('Text', textPlain);\n }\n\n this.hot.runHooks('afterCopy', rangedData, this.copyableRanges);\n }\n\n event.preventDefault();\n }\n /**\n * `cut` event callback on textarea element.\n *\n * @param {Event} event ClipboardEvent.\n * @private\n */\n\n }, {\n key: \"onCut\",\n value: function onCut(event) {\n var priv = privatePool.get(this);\n\n if (!this.hot.isListening() && !priv.isTriggeredByCut || this.isEditorOpened()) {\n return;\n }\n\n this.setCopyableText();\n priv.isTriggeredByCut = false;\n var rangedData = this.getRangedData(this.copyableRanges);\n var allowCuttingOut = !!this.hot.runHooks('beforeCut', rangedData, this.copyableRanges);\n\n if (allowCuttingOut) {\n var textPlain = stringify(rangedData);\n\n if (event && event.clipboardData) {\n var textHTML = _dataToHTML(rangedData, this.hot.rootDocument);\n\n event.clipboardData.setData('text/plain', textPlain);\n event.clipboardData.setData('text/html', [META_HEAD, textHTML].join(''));\n } else if (typeof ClipboardEvent === 'undefined') {\n this.hot.rootWindow.clipboardData.setData('Text', textPlain);\n }\n\n this.hot.emptySelectedCells('CopyPaste.cut');\n this.hot.runHooks('afterCut', rangedData, this.copyableRanges);\n }\n\n event.preventDefault();\n }\n /**\n * `paste` event callback on textarea element.\n *\n * @param {Event} event ClipboardEvent or pseudo ClipboardEvent, if paste was called manually.\n * @private\n */\n\n }, {\n key: \"onPaste\",\n value: function onPaste(event) {\n if (!this.hot.isListening() || this.isEditorOpened()) {\n return;\n }\n\n if (event && event.preventDefault) {\n event.preventDefault();\n }\n\n var pastedData;\n\n if (event && typeof event.clipboardData !== 'undefined') {\n var textHTML = sanitize(event.clipboardData.getData('text/html'), {\n ADD_TAGS: ['meta'],\n ADD_ATTR: ['content'],\n FORCE_BODY: true\n });\n\n if (textHTML && /( 1) {\n return true;\n }\n\n return false;\n },\n hidden: false\n };\n}","import * as C from \"../../../i18n/constants.mjs\";\n/**\n * @param {CopyPaste} copyPastePlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function cutItem(copyPastePlugin) {\n return {\n key: 'cut',\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_CUT);\n },\n callback: function callback() {\n copyPastePlugin.cut();\n },\n disabled: function disabled() {\n if (this.countRows() === 0 || this.countCols() === 0) {\n return true;\n }\n\n var selected = this.getSelected(); // Disable for no selection or for non-contiquous selection.\n\n if (!selected || selected.length > 1) {\n return true;\n }\n\n return false;\n },\n hidden: false\n };\n}","import \"core-js/modules/es.array.concat.js\";\nimport { hasOwnProperty, isObject } from \"../../helpers/object.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\n/**\n * Create separated id for borders for each cell.\n *\n * @param {number} row Visual row index.\n * @param {number} col Visual column index.\n * @returns {string}\n */\n\nexport function createId(row, col) {\n return \"border_row\".concat(row, \"col\").concat(col);\n}\n/**\n * Create default single border for each position (top/right/bottom/left).\n *\n * @returns {object} `{{width: number, color: string}}`.\n */\n\nexport function createDefaultCustomBorder() {\n return {\n width: 1,\n color: '#000'\n };\n}\n/**\n * Create default object for empty border.\n *\n * @returns {object} `{{hide: boolean}}`.\n */\n\nexport function createSingleEmptyBorder() {\n return {\n hide: true\n };\n}\n/**\n * Create default Handsontable border object.\n *\n * @returns {object} `{{width: number, color: string, cornerVisible: boolean}}`.\n */\n\nexport function createDefaultHtBorder() {\n return {\n width: 1,\n color: '#000',\n cornerVisible: false\n };\n}\n/**\n * Prepare empty border for each cell with all custom borders hidden.\n *\n * @param {number} row Visual row index.\n * @param {number} col Visual column index.\n * @returns {object} Returns border configuration containing visual indexes. Example of an object defining it:\n * `{{id: *, border: *, row: *, col: *, top: {hide: boolean}, right: {hide: boolean}, bottom: {hide: boolean}, left: {hide: boolean}}}`.\n */\n\nexport function createEmptyBorders(row, col) {\n return {\n id: createId(row, col),\n border: createDefaultHtBorder(),\n row: row,\n col: col,\n top: createSingleEmptyBorder(),\n right: createSingleEmptyBorder(),\n bottom: createSingleEmptyBorder(),\n left: createSingleEmptyBorder()\n };\n}\n/**\n * @param {object} defaultBorder The default border object.\n * @param {object} customBorder The border object with custom settings.\n * @returns {object}\n */\n\nexport function extendDefaultBorder(defaultBorder, customBorder) {\n if (hasOwnProperty(customBorder, 'border')) {\n defaultBorder.border = customBorder.border;\n }\n\n if (hasOwnProperty(customBorder, 'top')) {\n if (customBorder.top) {\n if (!isObject(customBorder.top)) {\n customBorder.top = createDefaultCustomBorder();\n }\n\n defaultBorder.top = customBorder.top;\n } else {\n customBorder.top = createSingleEmptyBorder();\n defaultBorder.top = customBorder.top;\n }\n }\n\n if (hasOwnProperty(customBorder, 'right')) {\n if (customBorder.right) {\n if (!isObject(customBorder.right)) {\n customBorder.right = createDefaultCustomBorder();\n }\n\n defaultBorder.right = customBorder.right;\n } else {\n customBorder.right = createSingleEmptyBorder();\n defaultBorder.right = customBorder.right;\n }\n }\n\n if (hasOwnProperty(customBorder, 'bottom')) {\n if (customBorder.bottom) {\n if (!isObject(customBorder.bottom)) {\n customBorder.bottom = createDefaultCustomBorder();\n }\n\n defaultBorder.bottom = customBorder.bottom;\n } else {\n customBorder.bottom = createSingleEmptyBorder();\n defaultBorder.bottom = customBorder.bottom;\n }\n }\n\n if (hasOwnProperty(customBorder, 'left')) {\n if (customBorder.left) {\n if (!isObject(customBorder.left)) {\n customBorder.left = createDefaultCustomBorder();\n }\n\n defaultBorder.left = customBorder.left;\n } else {\n customBorder.left = createSingleEmptyBorder();\n defaultBorder.left = customBorder.left;\n }\n }\n\n return defaultBorder;\n}\n/**\n * Check if selection has border.\n *\n * @param {Core} hot The Handsontable instance.\n * @param {string} [direction] If set ('left' or 'top') then only the specified border side will be checked.\n * @returns {boolean}\n */\n\nexport function checkSelectionBorders(hot, direction) {\n var atLeastOneHasBorder = false;\n arrayEach(hot.getSelectedRange(), function (range) {\n range.forAll(function (r, c) {\n if (r < 0 || c < 0) {\n return;\n }\n\n var metaBorders = hot.getCellMeta(r, c).borders;\n\n if (metaBorders) {\n if (direction) {\n if (!hasOwnProperty(metaBorders[direction], 'hide') || metaBorders[direction].hide === false) {\n atLeastOneHasBorder = true;\n return false; // breaks forAll\n }\n } else {\n atLeastOneHasBorder = true;\n return false; // breaks forAll\n }\n }\n });\n });\n return atLeastOneHasBorder;\n}\n/**\n * Mark label in contextMenu as selected.\n *\n * @param {string} label The label text.\n * @returns {string}\n */\n\nexport function markSelected(label) {\n return \"\".concat(String.fromCharCode(10003), \" \").concat(label); // workaround for https://github.com/handsontable/handsontable/issues/1946\n}","import * as C from \"../../../i18n/constants.mjs\";\nimport { checkSelectionBorders, markSelected } from \"../utils.mjs\";\n/**\n * @param {CustomBorders} customBordersPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function right(customBordersPlugin) {\n return {\n key: 'borders:right',\n name: function name() {\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS_RIGHT);\n var hasBorder = checkSelectionBorders(this, 'right');\n\n if (hasBorder) {\n label = markSelected(label);\n }\n\n return label;\n },\n callback: function callback(key, selected) {\n var hasBorder = checkSelectionBorders(this, 'right');\n customBordersPlugin.prepareBorder(selected, 'right', hasBorder);\n }\n };\n}","import * as C from \"../../../i18n/constants.mjs\";\nimport { checkSelectionBorders, markSelected } from \"../utils.mjs\";\n/**\n * @param {CustomBorders} customBordersPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function bottom(customBordersPlugin) {\n return {\n key: 'borders:bottom',\n name: function name() {\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);\n var hasBorder = checkSelectionBorders(this, 'bottom');\n\n if (hasBorder) {\n label = markSelected(label);\n }\n\n return label;\n },\n callback: function callback(key, selected) {\n var hasBorder = checkSelectionBorders(this, 'bottom');\n customBordersPlugin.prepareBorder(selected, 'bottom', hasBorder);\n }\n };\n}","import * as C from \"../../../i18n/constants.mjs\";\nimport { checkSelectionBorders, markSelected } from \"../utils.mjs\";\n/**\n * @param {CustomBorders} customBordersPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function left(customBordersPlugin) {\n return {\n key: 'borders:left',\n name: function name() {\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS_LEFT);\n var hasBorder = checkSelectionBorders(this, 'left');\n\n if (hasBorder) {\n label = markSelected(label);\n }\n\n return label;\n },\n callback: function callback(key, selected) {\n var hasBorder = checkSelectionBorders(this, 'left');\n customBordersPlugin.prepareBorder(selected, 'left', hasBorder);\n }\n };\n}","import * as C from \"../../../i18n/constants.mjs\";\nimport { checkSelectionBorders } from \"../utils.mjs\";\n/**\n * @param {CustomBorders} customBordersPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function noBorders(customBordersPlugin) {\n return {\n key: 'borders:no_borders',\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_BORDERS);\n },\n callback: function callback(key, selected) {\n customBordersPlugin.prepareBorder(selected, 'noBorders');\n },\n disabled: function disabled() {\n return !checkSelectionBorders(this);\n }\n };\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.object.assign.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.values.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { hasOwnProperty, objectEach } from \"../../helpers/object.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { arrayEach, arrayReduce, arrayMap } from \"../../helpers/array.mjs\";\nimport { CellRange, CellCoords } from \"../../3rdparty/walkontable/src/index.mjs\";\nimport * as C from \"../../i18n/constants.mjs\";\nimport { bottom, left, noBorders, right, top } from \"./contextMenuItem/index.mjs\";\nimport { createId, createDefaultCustomBorder, createSingleEmptyBorder, createEmptyBorders, extendDefaultBorder } from \"./utils.mjs\";\nimport { detectSelectionType, normalizeSelectionFactory } from \"../../selection/index.mjs\";\nexport var PLUGIN_KEY = 'customBorders';\nexport var PLUGIN_PRIORITY = 90;\n/**\n * @class CustomBorders\n * @plugin CustomBorders\n *\n * @description\n * This plugin enables an option to apply custom borders through the context menu (configurable with context menu key\n * `borders`).\n *\n * To initialize Handsontable with predefined custom borders, provide cell coordinates and border styles in a form\n * of an array.\n *\n * See [Custom Borders](https://handsontable.com/docs/demo-customizing-borders.html) demo for more examples.\n *\n * @example\n * ```js\n * customBorders: [\n * {\n * range: {\n * from: {\n * row: 1,\n * col: 1\n * },\n * to: {\n * row: 3,\n * col: 4\n * },\n * },\n * left: {},\n * right: {},\n * top: {},\n * bottom: {},\n * },\n * ],\n *\n * // or\n * customBorders: [\n * { row: 2,\n * col: 2,\n * left: {\n * width: 2,\n * color: 'red',\n * },\n * right: {\n * width: 1,\n * color: 'green',\n * },\n * top: '',\n * bottom: '',\n * }\n * ],\n * ```\n */\n\nexport var CustomBorders = /*#__PURE__*/function (_BasePlugin) {\n _inherits(CustomBorders, _BasePlugin);\n\n var _super = _createSuper(CustomBorders);\n\n function CustomBorders(hotInstance) {\n var _this;\n\n _classCallCheck(this, CustomBorders);\n\n _this = _super.call(this, hotInstance);\n /**\n * Saved borders.\n *\n * @private\n * @type {Array}\n */\n\n _this.savedBorders = [];\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link CustomBorders#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(CustomBorders, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.addHook('afterContextMenuDefaultOptions', function (options) {\n return _this2.onAfterContextMenuDefaultOptions(options);\n });\n this.addHook('init', function () {\n return _this2.onAfterInit();\n });\n\n _get(_getPrototypeOf(CustomBorders.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.hideBorders();\n\n _get(_getPrototypeOf(CustomBorders.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n this.changeBorderSettings();\n\n _get(_getPrototypeOf(CustomBorders.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Set custom borders.\n *\n * @example\n * ```js\n * const customBordersPlugin = hot.getPlugin('customBorders');\n *\n * // Using an array of arrays (produced by `.getSelected()` method).\n * customBordersPlugin.setBorders([[1, 1, 2, 2], [6, 2, 0, 2]], {left: {width: 2, color: 'blue'}});\n *\n * // Using an array of CellRange objects (produced by `.getSelectedRange()` method).\n * // Selecting a cell range.\n * hot.selectCell(0, 0, 2, 2);\n * // Returning selected cells' range with the getSelectedRange method.\n * customBordersPlugin.setBorders(hot.getSelectedRange(), {left: {hide: false, width: 2, color: 'blue'}});\n * ```\n *\n * @param {Array[]|CellRange[]} selectionRanges Array of selection ranges.\n * @param {object} borderObject Object with `top`, `right`, `bottom` and `left` properties.\n */\n\n }, {\n key: \"setBorders\",\n value: function setBorders(selectionRanges, borderObject) {\n var _this3 = this;\n\n var defaultBorderKeys = ['top', 'right', 'bottom', 'left'];\n var borderKeys = borderObject ? Object.keys(borderObject) : defaultBorderKeys;\n var selectionType = detectSelectionType(selectionRanges);\n var selectionSchemaNormalizer = normalizeSelectionFactory(selectionType);\n arrayEach(selectionRanges, function (selection) {\n var _selectionSchemaNorma = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma2 = _slicedToArray(_selectionSchemaNorma, 4),\n rowStart = _selectionSchemaNorma2[0],\n columnStart = _selectionSchemaNorma2[1],\n rowEnd = _selectionSchemaNorma2[2],\n columnEnd = _selectionSchemaNorma2[3];\n\n var _loop = function _loop(row) {\n var _loop2 = function _loop2(col) {\n arrayEach(borderKeys, function (borderKey) {\n _this3.prepareBorderFromCustomAdded(row, col, borderObject, borderKey);\n });\n };\n\n for (var col = columnStart; col <= columnEnd; col += 1) {\n _loop2(col);\n }\n };\n\n for (var row = rowStart; row <= rowEnd; row += 1) {\n _loop(row);\n }\n });\n /*\n The line below triggers a re-render of Handsontable. This will be a \"fastDraw\"\n render, because that is the default for the TableView class.\n The re-render is needed for borders on cells that did not have a border before.\n The way this call works is that it calls Table.refreshSelections, which calls\n Selection.getBorder, which creates a new instance of Border.\n Seems wise to keep this single-direction flow of creating new Borders\n */\n\n this.hot.view.render();\n }\n /**\n * Get custom borders.\n *\n * @example\n * ```js\n * const customBordersPlugin = hot.getPlugin('customBorders');\n *\n * // Using an array of arrays (produced by `.getSelected()` method).\n * customBordersPlugin.getBorders([[1, 1, 2, 2], [6, 2, 0, 2]]);\n * // Using an array of CellRange objects (produced by `.getSelectedRange()` method).\n * customBordersPlugin.getBorders(hot.getSelectedRange());\n * // Using without param - return all customBorders.\n * customBordersPlugin.getBorders();\n * ```\n *\n * @param {Array[]|CellRange[]} selectionRanges Array of selection ranges.\n * @returns {object[]} Returns array of border objects.\n */\n\n }, {\n key: \"getBorders\",\n value: function getBorders(selectionRanges) {\n var _this4 = this;\n\n if (!Array.isArray(selectionRanges)) {\n return this.savedBorders;\n }\n\n var selectionType = detectSelectionType(selectionRanges);\n var selectionSchemaNormalizer = normalizeSelectionFactory(selectionType);\n var selectedBorders = [];\n arrayEach(selectionRanges, function (selection) {\n var _selectionSchemaNorma3 = selectionSchemaNormalizer(selection),\n _selectionSchemaNorma4 = _slicedToArray(_selectionSchemaNorma3, 4),\n rowStart = _selectionSchemaNorma4[0],\n columnStart = _selectionSchemaNorma4[1],\n rowEnd = _selectionSchemaNorma4[2],\n columnEnd = _selectionSchemaNorma4[3];\n\n var _loop3 = function _loop3(row) {\n var _loop4 = function _loop4(col) {\n arrayEach(_this4.savedBorders, function (border) {\n if (border.row === row && border.col === col) {\n selectedBorders.push(border);\n }\n });\n };\n\n for (var col = columnStart; col <= columnEnd; col += 1) {\n _loop4(col);\n }\n };\n\n for (var row = rowStart; row <= rowEnd; row += 1) {\n _loop3(row);\n }\n });\n return selectedBorders;\n }\n /**\n * Clear custom borders.\n *\n * @example\n * ```js\n * const customBordersPlugin = hot.getPlugin('customBorders');\n *\n * // Using an array of arrays (produced by `.getSelected()` method).\n * customBordersPlugin.clearBorders([[1, 1, 2, 2], [6, 2, 0, 2]]);\n * // Using an array of CellRange objects (produced by `.getSelectedRange()` method).\n * customBordersPlugin.clearBorders(hot.getSelectedRange());\n * // Using without param - clear all customBorders.\n * customBordersPlugin.clearBorders();\n * ```\n *\n * @param {Array[]|CellRange[]} selectionRanges Array of selection ranges.\n */\n\n }, {\n key: \"clearBorders\",\n value: function clearBorders(selectionRanges) {\n var _this5 = this;\n\n if (selectionRanges) {\n this.setBorders(selectionRanges);\n } else {\n arrayEach(this.savedBorders, function (border) {\n _this5.clearBordersFromSelectionSettings(border.id);\n\n _this5.clearNullCellRange();\n\n _this5.hot.removeCellMeta(border.row, border.col, 'borders');\n });\n this.savedBorders.length = 0;\n }\n }\n /**\n * Insert WalkontableSelection instance into Walkontable settings.\n *\n * @private\n * @param {object} border Object with `row` and `col`, `left`, `right`, `top` and `bottom`, `id` and `border` ({Object} with `color`, `width` and `cornerVisible` property) properties.\n * @param {string} place Coordinate where add/remove border - `top`, `bottom`, `left`, `right`.\n */\n\n }, {\n key: \"insertBorderIntoSettings\",\n value: function insertBorderIntoSettings(border, place) {\n var hasSavedBorders = this.checkSavedBorders(border);\n\n if (!hasSavedBorders) {\n this.savedBorders.push(border);\n }\n\n var visualCellRange = new CellRange(new CellCoords(border.row, border.col));\n var hasCustomSelections = this.checkCustomSelections(border, visualCellRange, place);\n\n if (!hasCustomSelections) {\n this.hot.selection.highlight.addCustomSelection({\n border: border,\n visualCellRange: visualCellRange\n });\n }\n }\n /**\n * Prepare borders from setting (single cell).\n *\n * @private\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {object} borderDescriptor Object with `row` and `col`, `left`, `right`, `top` and `bottom` properties.\n * @param {string} place Coordinate where add/remove border - `top`, `bottom`, `left`, `right`.\n */\n\n }, {\n key: \"prepareBorderFromCustomAdded\",\n value: function prepareBorderFromCustomAdded(row, column, borderDescriptor, place) {\n var nrOfRows = this.hot.countRows();\n var nrOfColumns = this.hot.countCols();\n\n if (row >= nrOfRows || column >= nrOfColumns) {\n return;\n }\n\n var border = createEmptyBorders(row, column);\n\n if (borderDescriptor) {\n border = extendDefaultBorder(border, borderDescriptor);\n arrayEach(this.hot.selection.highlight.customSelections, function (customSelection) {\n if (border.id === customSelection.settings.id) {\n Object.assign(customSelection.settings, borderDescriptor);\n border.id = customSelection.settings.id;\n border.left = customSelection.settings.left;\n border.right = customSelection.settings.right;\n border.top = customSelection.settings.top;\n border.bottom = customSelection.settings.bottom;\n return false; // breaks forAll\n }\n });\n }\n\n this.hot.setCellMeta(row, column, 'borders', border);\n this.insertBorderIntoSettings(border, place);\n }\n /**\n * Prepare borders from setting (object).\n *\n * @private\n * @param {object} rowDecriptor Object with `range`, `left`, `right`, `top` and `bottom` properties.\n */\n\n }, {\n key: \"prepareBorderFromCustomAddedRange\",\n value: function prepareBorderFromCustomAddedRange(rowDecriptor) {\n var _this6 = this;\n\n var range = rowDecriptor.range;\n var lastRowIndex = Math.min(range.to.row, this.hot.countRows() - 1);\n var lastColumnIndex = Math.min(range.to.col, this.hot.countCols() - 1);\n rangeEach(range.from.row, lastRowIndex, function (rowIndex) {\n rangeEach(range.from.col, lastColumnIndex, function (colIndex) {\n var border = createEmptyBorders(rowIndex, colIndex);\n var add = 0;\n\n if (rowIndex === range.from.row) {\n if (hasOwnProperty(rowDecriptor, 'top')) {\n add += 1;\n border.top = rowDecriptor.top;\n }\n } // Please keep in mind that `range.to.row` may be beyond the table boundaries. The border won't be rendered.\n\n\n if (rowIndex === range.to.row) {\n if (hasOwnProperty(rowDecriptor, 'bottom')) {\n add += 1;\n border.bottom = rowDecriptor.bottom;\n }\n }\n\n if (colIndex === range.from.col) {\n if (hasOwnProperty(rowDecriptor, 'left')) {\n add += 1;\n border.left = rowDecriptor.left;\n }\n } // Please keep in mind that `range.to.col` may be beyond the table boundaries. The border won't be rendered.\n\n\n if (colIndex === range.to.col) {\n if (hasOwnProperty(rowDecriptor, 'right')) {\n add += 1;\n border.right = rowDecriptor.right;\n }\n }\n\n if (add > 0) {\n _this6.hot.setCellMeta(rowIndex, colIndex, 'borders', border);\n\n _this6.insertBorderIntoSettings(border);\n } else {// TODO sometimes it enters here. Why?\n }\n });\n });\n }\n /**\n * Remove border (triggered from context menu).\n *\n * @private\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n */\n\n }, {\n key: \"removeAllBorders\",\n value: function removeAllBorders(row, column) {\n var borderId = createId(row, column);\n this.spliceBorder(borderId);\n this.clearBordersFromSelectionSettings(borderId);\n this.clearNullCellRange();\n this.hot.removeCellMeta(row, column, 'borders');\n }\n /**\n * Set borders for each cell re. To border position.\n *\n * @private\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {string} place Coordinate where add/remove border - `top`, `bottom`, `left`, `right` and `noBorders`.\n * @param {boolean} remove True when remove borders, and false when add borders.\n */\n\n }, {\n key: \"setBorder\",\n value: function setBorder(row, column, place, remove) {\n var bordersMeta = this.hot.getCellMeta(row, column).borders;\n\n if (!bordersMeta || bordersMeta.border === void 0) {\n bordersMeta = createEmptyBorders(row, column);\n }\n\n if (remove) {\n bordersMeta[place] = createSingleEmptyBorder();\n var hideCount = this.countHide(bordersMeta);\n\n if (hideCount === 4) {\n this.removeAllBorders(row, column);\n } else {\n var customSelectionsChecker = this.checkCustomSelectionsFromContextMenu(bordersMeta, place, remove);\n\n if (!customSelectionsChecker) {\n this.insertBorderIntoSettings(bordersMeta);\n }\n\n this.hot.setCellMeta(row, column, 'borders', bordersMeta);\n }\n } else {\n bordersMeta[place] = createDefaultCustomBorder();\n\n var _customSelectionsChecker = this.checkCustomSelectionsFromContextMenu(bordersMeta, place, remove);\n\n if (!_customSelectionsChecker) {\n this.insertBorderIntoSettings(bordersMeta);\n }\n\n this.hot.setCellMeta(row, column, 'borders', bordersMeta);\n }\n }\n /**\n * Prepare borders based on cell and border position.\n *\n * @private\n * @param {CellRange[]} selected An array of CellRange objects.\n * @param {string} place Coordinate where add/remove border - `top`, `bottom`, `left`, `right` and `noBorders`.\n * @param {boolean} remove True when remove borders, and false when add borders.\n */\n\n }, {\n key: \"prepareBorder\",\n value: function prepareBorder(selected, place, remove) {\n var _this7 = this;\n\n arrayEach(selected, function (_ref) {\n var start = _ref.start,\n end = _ref.end;\n\n if (start.row === end.row && start.col === end.col) {\n if (place === 'noBorders') {\n _this7.removeAllBorders(start.row, start.col);\n } else {\n _this7.setBorder(start.row, start.col, place, remove);\n }\n } else {\n switch (place) {\n case 'noBorders':\n rangeEach(start.col, end.col, function (colIndex) {\n rangeEach(start.row, end.row, function (rowIndex) {\n _this7.removeAllBorders(rowIndex, colIndex);\n });\n });\n break;\n\n case 'top':\n rangeEach(start.col, end.col, function (topCol) {\n _this7.setBorder(start.row, topCol, place, remove);\n });\n break;\n\n case 'right':\n rangeEach(start.row, end.row, function (rowRight) {\n _this7.setBorder(rowRight, end.col, place, remove);\n });\n break;\n\n case 'bottom':\n rangeEach(start.col, end.col, function (bottomCol) {\n _this7.setBorder(end.row, bottomCol, place, remove);\n });\n break;\n\n case 'left':\n rangeEach(start.row, end.row, function (rowLeft) {\n _this7.setBorder(rowLeft, start.col, place, remove);\n });\n break;\n\n default:\n break;\n }\n }\n });\n }\n /**\n * Create borders from settings.\n *\n * @private\n * @param {Array} customBorders Object with `row` and `col`, `left`, `right`, `top` and `bottom` properties.\n */\n\n }, {\n key: \"createCustomBorders\",\n value: function createCustomBorders(customBorders) {\n var _this8 = this;\n\n arrayEach(customBorders, function (customBorder) {\n if (customBorder.range) {\n _this8.prepareBorderFromCustomAddedRange(customBorder);\n } else {\n _this8.prepareBorderFromCustomAdded(customBorder.row, customBorder.col, customBorder);\n }\n });\n }\n /**\n * Count hide property in border object.\n *\n * @private\n * @param {object} border Object with `row` and `col`, `left`, `right`, `top` and `bottom`, `id` and `border` ({Object} with `color`, `width` and `cornerVisible` property) properties.\n * @returns {Array}\n */\n\n }, {\n key: \"countHide\",\n value: function countHide(border) {\n var values = Object.values(border);\n return arrayReduce(values, function (accumulator, value) {\n var result = accumulator;\n\n if (value.hide) {\n result += 1;\n }\n\n return result;\n }, 0);\n }\n /**\n * Clear borders settings from custom selections.\n *\n * @private\n * @param {string} borderId Border id name as string.\n */\n\n }, {\n key: \"clearBordersFromSelectionSettings\",\n value: function clearBordersFromSelectionSettings(borderId) {\n var index = arrayMap(this.hot.selection.highlight.customSelections, function (customSelection) {\n return customSelection.settings.id;\n }).indexOf(borderId);\n\n if (index > -1) {\n this.hot.selection.highlight.customSelections[index].clear();\n }\n }\n /**\n * Clear cellRange with null value.\n *\n * @private\n */\n\n }, {\n key: \"clearNullCellRange\",\n value: function clearNullCellRange() {\n var _this9 = this;\n\n arrayEach(this.hot.selection.highlight.customSelections, function (customSelection, index) {\n if (customSelection.cellRange === null) {\n _this9.hot.selection.highlight.customSelections[index].destroy();\n\n _this9.hot.selection.highlight.customSelections.splice(index, 1);\n\n return false; // breaks forAll\n }\n });\n }\n /**\n * Hide custom borders.\n *\n * @private\n */\n\n }, {\n key: \"hideBorders\",\n value: function hideBorders() {\n var _this10 = this;\n\n arrayEach(this.savedBorders, function (border) {\n _this10.clearBordersFromSelectionSettings(border.id);\n\n _this10.clearNullCellRange();\n });\n }\n /**\n * Splice border from savedBorders.\n *\n * @private\n * @param {string} borderId Border id name as string.\n */\n\n }, {\n key: \"spliceBorder\",\n value: function spliceBorder(borderId) {\n var index = arrayMap(this.savedBorders, function (border) {\n return border.id;\n }).indexOf(borderId);\n\n if (index > -1) {\n this.savedBorders.splice(index, 1);\n }\n }\n /**\n * Check if an border already exists in the savedBorders array, and if true update border in savedBorders.\n *\n * @private\n * @param {object} border Object with `row` and `col`, `left`, `right`, `top` and `bottom`, `id` and `border` ({Object} with `color`, `width` and `cornerVisible` property) properties.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"checkSavedBorders\",\n value: function checkSavedBorders(border) {\n var _this11 = this;\n\n var check = false;\n var hideCount = this.countHide(border);\n\n if (hideCount === 4) {\n this.spliceBorder(border.id);\n check = true;\n } else {\n arrayEach(this.savedBorders, function (savedBorder, index) {\n if (border.id === savedBorder.id) {\n _this11.savedBorders[index] = border;\n check = true;\n return false; // breaks forAll\n }\n });\n }\n\n return check;\n }\n /**\n * Check if an border already exists in the customSelections, and if true call toggleHiddenClass method.\n *\n * @private\n * @param {object} border Object with `row` and `col`, `left`, `right`, `top` and `bottom`, `id` and `border` ({Object} with `color`, `width` and `cornerVisible` property) properties.\n * @param {string} place Coordinate where add/remove border - `top`, `bottom`, `left`, `right` and `noBorders`.\n * @param {boolean} remove True when remove borders, and false when add borders.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"checkCustomSelectionsFromContextMenu\",\n value: function checkCustomSelectionsFromContextMenu(border, place, remove) {\n var check = false;\n arrayEach(this.hot.selection.highlight.customSelections, function (customSelection) {\n if (border.id === customSelection.settings.id) {\n objectEach(customSelection.instanceBorders, function (borderObject) {\n borderObject.toggleHiddenClass(place, remove); // TODO this also bad?\n });\n check = true;\n return false; // breaks forAll\n }\n });\n return check;\n }\n /**\n * Check if an border already exists in the customSelections, and if true reset cellRange.\n *\n * @private\n * @param {object} border Object with `row` and `col`, `left`, `right`, `top` and `bottom`, `id` and `border` ({Object} with `color`, `width` and `cornerVisible` property) properties.\n * @param {CellRange} cellRange The selection range to check.\n * @param {string} place Coordinate where add/remove border - `top`, `bottom`, `left`, `right`.\n * @returns {boolean}\n */\n\n }, {\n key: \"checkCustomSelections\",\n value: function checkCustomSelections(border, cellRange, place) {\n var hideCount = this.countHide(border);\n var check = false;\n\n if (hideCount === 4) {\n this.removeAllBorders(border.row, border.col);\n check = true;\n } else {\n arrayEach(this.hot.selection.highlight.customSelections, function (customSelection) {\n if (border.id === customSelection.settings.id) {\n customSelection.visualCellRange = cellRange;\n customSelection.commit();\n\n if (place) {\n objectEach(customSelection.instanceBorders, function (borderObject) {\n borderObject.changeBorderStyle(place, border);\n });\n }\n\n check = true;\n return false; // breaks forAll\n }\n });\n }\n\n return check;\n }\n /**\n * Change borders from settings.\n *\n * @private\n */\n\n }, {\n key: \"changeBorderSettings\",\n value: function changeBorderSettings() {\n var customBorders = this.hot.getSettings()[PLUGIN_KEY];\n\n if (Array.isArray(customBorders)) {\n if (!customBorders.length) {\n this.savedBorders = customBorders;\n }\n\n this.createCustomBorders(customBorders);\n } else if (customBorders !== void 0) {\n this.createCustomBorders(this.savedBorders);\n }\n }\n /**\n * Add border options to context menu.\n *\n * @private\n * @param {object} defaultOptions Context menu items.\n */\n\n }, {\n key: \"onAfterContextMenuDefaultOptions\",\n value: function onAfterContextMenuDefaultOptions(defaultOptions) {\n if (!this.hot.getSettings()[PLUGIN_KEY]) {\n return;\n }\n\n defaultOptions.items.push({\n name: '---------'\n }, {\n key: 'borders',\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS);\n },\n disabled: function disabled() {\n return this.selection.isSelectedByCorner();\n },\n submenu: {\n items: [top(this), right(this), bottom(this), left(this), noBorders(this)]\n }\n });\n }\n /**\n * `afterInit` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onAfterInit\",\n value: function onAfterInit() {\n this.changeBorderSettings();\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(CustomBorders.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return CustomBorders;\n}(BasePlugin);","import * as C from \"../../../i18n/constants.mjs\";\nimport { checkSelectionBorders, markSelected } from \"../utils.mjs\";\n/**\n * @param {CustomBorders} customBordersPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function top(customBordersPlugin) {\n return {\n key: 'borders:top',\n name: function name() {\n var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS_TOP);\n var hasBorder = checkSelectionBorders(this, 'top');\n\n if (hasBorder) {\n label = markSelected(label);\n }\n\n return label;\n },\n callback: function callback(key, selected) {\n var hasBorder = checkSelectionBorders(this, 'top');\n customBordersPlugin.prepareBorder(selected, 'top', hasBorder);\n }\n };\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { isRightClick } from \"../../helpers/dom/event.mjs\";\nimport { getParentWindow } from \"../../helpers/dom/element.mjs\";\nexport var PLUGIN_KEY = 'dragToScroll';\nexport var PLUGIN_PRIORITY = 100;\n/**\n * @description\n * Plugin used to scroll Handsontable by selecting a cell and dragging outside of the visible viewport.\n *\n *\n * @class DragToScroll\n * @plugin DragToScroll\n */\n\nexport var DragToScroll = /*#__PURE__*/function (_BasePlugin) {\n _inherits(DragToScroll, _BasePlugin);\n\n var _super = _createSuper(DragToScroll);\n\n function DragToScroll(hotInstance) {\n var _this;\n\n _classCallCheck(this, DragToScroll);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Size of an element and its position relative to the viewport,\n * e.g. {bottom: 449, height: 441, left: 8, right: 814, top: 8, width: 806, x: 8, y:8}.\n *\n * @type {DOMRect}\n */\n\n _this.boundaries = null;\n /**\n * Callback function.\n *\n * @private\n * @type {Function}\n */\n\n _this.callback = null;\n /**\n * Flag indicates mouseDown/mouseUp.\n *\n * @private\n * @type {boolean}\n */\n\n _this.listening = false;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link DragToScroll#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(DragToScroll, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.addHook('afterOnCellMouseDown', function (event) {\n return _this2.setupListening(event);\n });\n this.addHook('afterOnCellCornerMouseDown', function (event) {\n return _this2.setupListening(event);\n });\n this.registerEvents();\n\n _get(_getPrototypeOf(DragToScroll.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(DragToScroll.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.unregisterEvents();\n\n _get(_getPrototypeOf(DragToScroll.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Sets the value of the visible element.\n *\n * @param {DOMRect} boundaries An object with coordinates compatible with DOMRect.\n */\n\n }, {\n key: \"setBoundaries\",\n value: function setBoundaries(boundaries) {\n this.boundaries = boundaries;\n }\n /**\n * Changes callback function.\n *\n * @param {Function} callback The callback function.\n */\n\n }, {\n key: \"setCallback\",\n value: function setCallback(callback) {\n this.callback = callback;\n }\n /**\n * Checks if the mouse position (X, Y) is outside of the viewport and fires a callback with calculated X an Y diffs\n * between passed boundaries.\n *\n * @param {number} x Mouse X coordinate to check.\n * @param {number} y Mouse Y coordinate to check.\n */\n\n }, {\n key: \"check\",\n value: function check(x, y) {\n var diffX = 0;\n var diffY = 0;\n\n if (y < this.boundaries.top) {\n // y is less than top\n diffY = y - this.boundaries.top;\n } else if (y > this.boundaries.bottom) {\n // y is more than bottom\n diffY = y - this.boundaries.bottom;\n }\n\n if (x < this.boundaries.left) {\n // x is less than left\n diffX = x - this.boundaries.left;\n } else if (x > this.boundaries.right) {\n // x is more than right\n diffX = x - this.boundaries.right;\n }\n\n this.callback(diffX, diffY);\n }\n /**\n * Enables listening on `mousemove` event.\n *\n * @private\n */\n\n }, {\n key: \"listen\",\n value: function listen() {\n this.listening = true;\n }\n /**\n * Disables listening on `mousemove` event.\n *\n * @private\n */\n\n }, {\n key: \"unlisten\",\n value: function unlisten() {\n this.listening = false;\n }\n /**\n * Returns current state of listening.\n *\n * @private\n * @returns {boolean}\n */\n\n }, {\n key: \"isListening\",\n value: function isListening() {\n return this.listening;\n }\n /**\n * Registers dom listeners.\n *\n * @private\n */\n\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this3 = this;\n\n var rootWindow = this.hot.rootWindow;\n var frame = rootWindow;\n\n while (frame) {\n this.eventManager.addEventListener(frame.document, 'contextmenu', function () {\n return _this3.unlisten();\n });\n this.eventManager.addEventListener(frame.document, 'mouseup', function () {\n return _this3.unlisten();\n });\n this.eventManager.addEventListener(frame.document, 'mousemove', function (event) {\n return _this3.onMouseMove(event);\n });\n frame = getParentWindow(frame);\n }\n }\n /**\n * Unbinds the events used by the plugin.\n *\n * @private\n */\n\n }, {\n key: \"unregisterEvents\",\n value: function unregisterEvents() {\n this.eventManager.clear();\n }\n /**\n * On after on cell/cellCorner mouse down listener.\n *\n * @private\n * @param {MouseEvent} event The mouse event object.\n */\n\n }, {\n key: \"setupListening\",\n value: function setupListening(event) {\n if (isRightClick(event)) {\n return;\n }\n\n var scrollHandler = this.hot.view.wt.wtTable.holder; // native scroll\n\n if (scrollHandler === this.hot.rootWindow) {\n // not much we can do currently\n return;\n }\n\n this.setBoundaries(scrollHandler.getBoundingClientRect());\n this.setCallback(function (scrollX, scrollY) {\n if (scrollX < 0) {\n scrollHandler.scrollLeft -= 50;\n } else if (scrollX > 0) {\n scrollHandler.scrollLeft += 50;\n }\n\n if (scrollY < 0) {\n scrollHandler.scrollTop -= 20;\n } else if (scrollY > 0) {\n scrollHandler.scrollTop += 20;\n }\n });\n this.listen();\n }\n /**\n * 'mouseMove' event callback.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n */\n\n }, {\n key: \"onMouseMove\",\n value: function onMouseMove(event) {\n if (!this.isListening()) {\n return;\n }\n\n this.check(event.clientX, event.clientY);\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(DragToScroll.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return DragToScroll;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.index-of.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport CommandExecutor from \"../contextMenu/commandExecutor.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { hasClass } from \"../../helpers/dom/element.mjs\";\nimport ItemsFactory from \"../contextMenu/itemsFactory.mjs\";\nimport Menu from \"../contextMenu/menu.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { COLUMN_LEFT, COLUMN_RIGHT, REMOVE_COLUMN, CLEAR_COLUMN, READ_ONLY, ALIGNMENT, SEPARATOR } from \"../contextMenu/predefinedItems.mjs\";\nHooks.getSingleton().register('afterDropdownMenuDefaultOptions');\nHooks.getSingleton().register('beforeDropdownMenuShow');\nHooks.getSingleton().register('afterDropdownMenuShow');\nHooks.getSingleton().register('afterDropdownMenuHide');\nHooks.getSingleton().register('afterDropdownMenuExecute');\nexport var PLUGIN_KEY = 'dropdownMenu';\nexport var PLUGIN_PRIORITY = 230;\nvar BUTTON_CLASS_NAME = 'changeType';\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @class DropdownMenu\n * @plugin DropdownMenu\n *\n * @description\n * This plugin creates the Handsontable Dropdown Menu. It allows to create a new row or column at any place in the grid\n * among [other features](https://handsontable.com/docs/demo-context-menu.html).\n * Possible values:\n * * `true` (to enable default options),\n * * `false` (to disable completely).\n *\n * or array of any available strings:\n * * `[\"row_above\", \"row_below\", \"col_left\", \"col_right\",\n * \"remove_row\", \"remove_col\", \"---------\", \"undo\", \"redo\"]`.\n *\n * See [the dropdown menu demo](https://handsontable.com/docs/demo-dropdown-menu.html) for examples.\n *\n * @example\n * ```\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: data,\n * colHeaders: true,\n * // enable dropdown menu\n * dropdownMenu: true\n * });\n *\n * // or\n * const hot = new Handsontable(container, {\n * data: data,\n * colHeaders: true,\n * // enable and configure dropdown menu\n * dropdownMenu: ['remove_col', '---------', 'make_read_only', 'alignment']\n * });\n * ```\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nexport var DropdownMenu = /*#__PURE__*/function (_BasePlugin) {\n _inherits(DropdownMenu, _BasePlugin);\n\n var _super = _createSuper(DropdownMenu);\n\n function DropdownMenu(hotInstance) {\n var _this;\n\n _classCallCheck(this, DropdownMenu);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Instance of {@link CommandExecutor}.\n *\n * @private\n * @type {CommandExecutor}\n */\n\n _this.commandExecutor = new CommandExecutor(_this.hot);\n /**\n * Instance of {@link ItemsFactory}.\n *\n * @private\n * @type {ItemsFactory}\n */\n\n _this.itemsFactory = null;\n /**\n * Instance of {@link Menu}.\n *\n * @private\n * @type {Menu}\n */\n\n _this.menu = null; // One listener for enable/disable functionality\n\n _this.hot.addHook('afterGetColHeader', function (col, TH) {\n return _this.onAfterGetColHeader(col, TH);\n });\n\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link DropdownMenu#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(DropdownMenu, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n *\n * @fires Hooks#afterDropdownMenuDefaultOptions\n * @fires Hooks#beforeDropdownMenuSetItems\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.itemsFactory = new ItemsFactory(this.hot, DropdownMenu.DEFAULT_ITEMS);\n var settings = this.hot.getSettings()[PLUGIN_KEY];\n var predefinedItems = {\n items: this.itemsFactory.getItems(settings)\n };\n this.registerEvents();\n\n if (typeof settings.callback === 'function') {\n this.commandExecutor.setCommonCallback(settings.callback);\n }\n\n _get(_getPrototypeOf(DropdownMenu.prototype), \"enablePlugin\", this).call(this);\n\n this.callOnPluginsReady(function () {\n _this2.hot.runHooks('afterDropdownMenuDefaultOptions', predefinedItems);\n\n _this2.itemsFactory.setPredefinedItems(predefinedItems.items);\n\n var menuItems = _this2.itemsFactory.getItems(settings);\n\n if (_this2.menu) {\n _this2.menu.destroy();\n }\n\n _this2.menu = new Menu(_this2.hot, {\n className: 'htDropdownMenu',\n keepInViewport: true,\n container: settings.uiContainer || _this2.hot.rootDocument.body\n });\n\n _this2.hot.runHooks('beforeDropdownMenuSetItems', menuItems);\n\n _this2.menu.setMenuItems(menuItems);\n\n _this2.menu.addLocalHook('beforeOpen', function () {\n return _this2.onMenuBeforeOpen();\n });\n\n _this2.menu.addLocalHook('afterOpen', function () {\n return _this2.onMenuAfterOpen();\n });\n\n _this2.menu.addLocalHook('afterClose', function () {\n return _this2.onMenuAfterClose();\n });\n\n _this2.menu.addLocalHook('executeCommand', function () {\n var _this2$executeCommand;\n\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n\n return (_this2$executeCommand = _this2.executeCommand).call.apply(_this2$executeCommand, [_this2].concat(params));\n }); // Register all commands. Predefined and added by user or by plugins\n\n\n arrayEach(menuItems, function (command) {\n return _this2.commandExecutor.registerCommand(command.key, command);\n });\n });\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(DropdownMenu.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.close();\n\n if (this.menu) {\n this.menu.destroy();\n }\n\n _get(_getPrototypeOf(DropdownMenu.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Registers the DOM listeners.\n *\n * @private\n */\n\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this3 = this;\n\n this.eventManager.addEventListener(this.hot.rootElement, 'click', function (event) {\n return _this3.onTableClick(event);\n });\n }\n /**\n * Opens menu and re-position it based on the passed coordinates.\n *\n * @param {object|Event} position An object with `pageX` and `pageY` properties which contains values relative to\n * the top left of the fully rendered content area in the browser or with `clientX`\n * and `clientY` properties which contains values relative to the upper left edge\n * of the content area (the viewport) of the browser window. This object is structurally\n * compatible with native mouse event so it can be used either.\n * @fires Hooks#beforeDropdownMenuShow\n * @fires Hooks#afterDropdownMenuShow\n */\n\n }, {\n key: \"open\",\n value: function open(position) {\n if (!this.menu) {\n return;\n }\n\n this.menu.open();\n\n if (position.width) {\n this.menu.setOffset('left', position.width);\n }\n\n this.menu.setPosition(position);\n }\n /**\n * Closes dropdown menu.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n if (!this.menu) {\n return;\n }\n\n this.menu.close();\n }\n /**\n * Executes context menu command.\n *\n * You can execute all predefined commands:\n * * `'row_above'` - Insert row above\n * * `'row_below'` - Insert row below\n * * `'col_left'` - Insert column left\n * * `'col_right'` - Insert column right\n * * `'clear_column'` - Clear selected column\n * * `'remove_row'` - Remove row\n * * `'remove_col'` - Remove column\n * * `'undo'` - Undo last action\n * * `'redo'` - Redo last action\n * * `'make_read_only'` - Make cell read only\n * * `'alignment:left'` - Alignment to the left\n * * `'alignment:top'` - Alignment to the top\n * * `'alignment:right'` - Alignment to the right\n * * `'alignment:bottom'` - Alignment to the bottom\n * * `'alignment:middle'` - Alignment to the middle\n * * `'alignment:center'` - Alignment to the center (justify).\n *\n * Or you can execute command registered in settings where `key` is your command name.\n *\n * @param {string} commandName Command name to execute.\n * @param {*} params Additional parameters passed to the command executor.\n */\n\n }, {\n key: \"executeCommand\",\n value: function executeCommand(commandName) {\n var _this$commandExecutor;\n\n for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n params[_key2 - 1] = arguments[_key2];\n }\n\n (_this$commandExecutor = this.commandExecutor).execute.apply(_this$commandExecutor, [commandName].concat(params));\n }\n /**\n * Turns on / off listening on dropdown menu.\n *\n * @private\n * @param {boolean} listen Turn on listening when value is set to true, otherwise turn it off.\n */\n\n }, {\n key: \"setListening\",\n value: function setListening() {\n var listen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (this.menu.isOpened()) {\n if (listen) {\n this.menu.hotMenu.listen();\n } else {\n this.menu.hotMenu.unlisten();\n }\n }\n }\n /**\n * Table click listener.\n *\n * @private\n * @param {Event} event The mouse event object.\n */\n\n }, {\n key: \"onTableClick\",\n value: function onTableClick(event) {\n event.stopPropagation();\n\n if (hasClass(event.target, BUTTON_CLASS_NAME) && !this.menu.isOpened()) {\n var offsetTop = 0;\n var offsetLeft = 0;\n\n if (this.hot.rootDocument !== this.menu.container.ownerDocument) {\n var frameElement = this.hot.rootWindow.frameElement;\n\n var _frameElement$getBoun = frameElement.getBoundingClientRect(),\n top = _frameElement$getBoun.top,\n left = _frameElement$getBoun.left;\n\n offsetTop = top;\n offsetLeft = left;\n }\n\n var rect = event.target.getBoundingClientRect();\n this.open({\n left: rect.left + offsetLeft,\n top: rect.top + event.target.offsetHeight + 3 + offsetTop,\n width: rect.width,\n height: rect.height\n });\n }\n }\n /**\n * On after get column header listener.\n *\n * @private\n * @param {number} col Visual column index.\n * @param {HTMLTableCellElement} TH Header's TH element.\n */\n\n }, {\n key: \"onAfterGetColHeader\",\n value: function onAfterGetColHeader(col, TH) {\n // Corner or a higher-level header\n var headerRow = TH.parentNode;\n\n if (!headerRow) {\n return;\n }\n\n var headerRowList = headerRow.parentNode.childNodes;\n var level = Array.prototype.indexOf.call(headerRowList, headerRow);\n\n if (col < 0 || level !== headerRowList.length - 1) {\n return;\n }\n\n var existingButton = TH.querySelector(\".\".concat(BUTTON_CLASS_NAME)); // Plugin enabled and buttons already exists, return.\n\n if (this.enabled && existingButton) {\n return;\n } // Plugin disabled and buttons still exists, so remove them.\n\n\n if (!this.enabled) {\n if (existingButton) {\n existingButton.parentNode.removeChild(existingButton);\n }\n\n return;\n }\n\n var button = this.hot.rootDocument.createElement('button');\n button.className = BUTTON_CLASS_NAME; // prevent page reload on button click\n\n button.onclick = function () {\n return false;\n };\n\n TH.firstChild.insertBefore(button, TH.firstChild.firstChild);\n }\n /**\n * On menu before open listener.\n *\n * @private\n * @fires Hooks#beforeDropdownMenuShow\n */\n\n }, {\n key: \"onMenuBeforeOpen\",\n value: function onMenuBeforeOpen() {\n this.hot.runHooks('beforeDropdownMenuShow', this);\n }\n /**\n * On menu after open listener.\n *\n * @private\n * @fires Hooks#afterDropdownMenuShow\n */\n\n }, {\n key: \"onMenuAfterOpen\",\n value: function onMenuAfterOpen() {\n this.hot.runHooks('afterDropdownMenuShow', this);\n }\n /**\n * On menu after close listener.\n *\n * @private\n * @fires Hooks#afterDropdownMenuHide\n */\n\n }, {\n key: \"onMenuAfterClose\",\n value: function onMenuAfterClose() {\n this.hot.listen();\n this.hot.runHooks('afterDropdownMenuHide', this);\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.close();\n\n if (this.menu) {\n this.menu.destroy();\n }\n\n _get(_getPrototypeOf(DropdownMenu.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }, {\n key: \"PLUGIN_DEPS\",\n get: function get() {\n return ['plugin:AutoColumnSize'];\n }\n /**\n * Default menu items order when `dropdownMenu` is enabled by setting the config item to `true`.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"DEFAULT_ITEMS\",\n get: function get() {\n return [COLUMN_LEFT, COLUMN_RIGHT, SEPARATOR, REMOVE_COLUMN, SEPARATOR, CLEAR_COLUMN, SEPARATOR, READ_ONLY, SEPARATOR, ALIGNMENT];\n }\n }]);\n\n return DropdownMenu;\n}(BasePlugin);\nDropdownMenu.SEPARATOR = {\n name: SEPARATOR\n};","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { rangeEach } from \"../../helpers/number.mjs\"; // Waiting for jshint >=2.9.0 where they added support for destructing\n// jshint ignore: start\n\n/**\n * @plugin ExportFile\n * @private\n */\n\nvar DataProvider = /*#__PURE__*/function () {\n function DataProvider(hotInstance) {\n _classCallCheck(this, DataProvider);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hotInstance;\n /**\n * Format type class options.\n *\n * @type {object}\n */\n\n this.options = {};\n }\n /**\n * Set options for data provider.\n *\n * @param {object} options Object with specified options.\n */\n\n\n _createClass(DataProvider, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n this.options = options;\n }\n /**\n * Get table data based on provided settings to the class constructor.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getData\",\n value: function getData() {\n var _this = this;\n\n var _this$_getDataRange = this._getDataRange(),\n startRow = _this$_getDataRange.startRow,\n startCol = _this$_getDataRange.startCol,\n endRow = _this$_getDataRange.endRow,\n endCol = _this$_getDataRange.endCol;\n\n var options = this.options;\n var data = [];\n rangeEach(startRow, endRow, function (rowIndex) {\n var row = [];\n\n if (!options.exportHiddenRows && _this._isHiddenRow(rowIndex)) {\n return;\n }\n\n rangeEach(startCol, endCol, function (colIndex) {\n if (!options.exportHiddenColumns && _this._isHiddenColumn(colIndex)) {\n return;\n }\n\n row.push(_this.hot.getDataAtCell(rowIndex, colIndex));\n });\n data.push(row);\n });\n return data;\n }\n /**\n * Gets list of row headers.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getRowHeaders\",\n value: function getRowHeaders() {\n var _this2 = this;\n\n var headers = [];\n\n if (this.options.rowHeaders) {\n var _this$_getDataRange2 = this._getDataRange(),\n startRow = _this$_getDataRange2.startRow,\n endRow = _this$_getDataRange2.endRow;\n\n var rowHeaders = this.hot.getRowHeader();\n rangeEach(startRow, endRow, function (row) {\n if (!_this2.options.exportHiddenRows && _this2._isHiddenRow(row)) {\n return;\n }\n\n headers.push(rowHeaders[row]);\n });\n }\n\n return headers;\n }\n /**\n * Gets list of columns headers.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getColumnHeaders\",\n value: function getColumnHeaders() {\n var _this3 = this;\n\n var headers = [];\n\n if (this.options.columnHeaders) {\n var _this$_getDataRange3 = this._getDataRange(),\n startCol = _this$_getDataRange3.startCol,\n endCol = _this$_getDataRange3.endCol;\n\n var colHeaders = this.hot.getColHeader();\n rangeEach(startCol, endCol, function (column) {\n if (!_this3.options.exportHiddenColumns && _this3._isHiddenColumn(column)) {\n return;\n }\n\n headers.push(colHeaders[column]);\n });\n }\n\n return headers;\n }\n /**\n * Get data range object based on settings provided in the class constructor.\n *\n * @private\n * @returns {object} Returns object with keys `startRow`, `startCol`, `endRow` and `endCol`.\n */\n\n }, {\n key: \"_getDataRange\",\n value: function _getDataRange() {\n var cols = this.hot.countCols() - 1;\n var rows = this.hot.countRows() - 1;\n\n var _this$options$range = _slicedToArray(this.options.range, 4),\n _this$options$range$ = _this$options$range[0],\n startRow = _this$options$range$ === void 0 ? 0 : _this$options$range$,\n _this$options$range$2 = _this$options$range[1],\n startCol = _this$options$range$2 === void 0 ? 0 : _this$options$range$2,\n _this$options$range$3 = _this$options$range[2],\n endRow = _this$options$range$3 === void 0 ? rows : _this$options$range$3,\n _this$options$range$4 = _this$options$range[3],\n endCol = _this$options$range$4 === void 0 ? cols : _this$options$range$4;\n\n startRow = Math.max(startRow, 0);\n startCol = Math.max(startCol, 0);\n endRow = Math.min(endRow, rows);\n endCol = Math.min(endCol, cols);\n return {\n startRow: startRow,\n startCol: startCol,\n endRow: endRow,\n endCol: endCol\n };\n }\n /**\n * Check if row at specified row index is hidden.\n *\n * @private\n * @param {number} row Row index.\n * @returns {boolean}\n */\n\n }, {\n key: \"_isHiddenRow\",\n value: function _isHiddenRow(row) {\n return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(row));\n }\n /**\n * Check if column at specified column index is hidden.\n *\n * @private\n * @param {number} column Visual column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"_isHiddenColumn\",\n value: function _isHiddenColumn(column) {\n return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(column));\n }\n }]);\n\n return DataProvider;\n}();\n\nexport default DataProvider;","import \"core-js/modules/es.string.pad-start.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { extend, clone } from \"../../../helpers/object.mjs\";\nimport { substitute } from \"../../../helpers/string.mjs\";\n/**\n * @plugin ExportFile\n * @private\n */\n\nvar BaseType = /*#__PURE__*/function () {\n function BaseType(dataProvider, options) {\n _classCallCheck(this, BaseType);\n /**\n * Data provider.\n *\n * @type {DataProvider}\n */\n\n\n this.dataProvider = dataProvider;\n /**\n * Format type class options.\n *\n * @type {object}\n */\n\n this.options = this._mergeOptions(options);\n this.dataProvider.setOptions(this.options);\n }\n /**\n * Merge options provided by users with defaults.\n *\n * @param {object} options An object with options to merge with.\n * @returns {object} Returns new options object.\n */\n\n\n _createClass(BaseType, [{\n key: \"_mergeOptions\",\n value: function _mergeOptions(options) {\n var _options = clone(this.constructor.DEFAULT_OPTIONS);\n\n var date = new Date();\n _options = extend(clone(BaseType.DEFAULT_OPTIONS), _options);\n _options = extend(_options, options);\n _options.filename = substitute(_options.filename, {\n YYYY: date.getFullYear(),\n MM: \"\".concat(date.getMonth() + 1).padStart(2, '0'),\n DD: \"\".concat(date.getDate()).padStart(2, '0')\n });\n return _options;\n }\n }], [{\n key: \"DEFAULT_OPTIONS\",\n get:\n /**\n * Default options.\n *\n * @returns {object}\n */\n function get() {\n return {\n mimeType: 'text/plain',\n fileExtension: 'txt',\n filename: 'Handsontable [YYYY]-[MM]-[DD]',\n encoding: 'utf-8',\n bom: false,\n columnHeaders: false,\n rowHeaders: false,\n exportHiddenColumns: false,\n exportHiddenRows: false,\n range: []\n };\n }\n }]);\n\n return BaseType;\n}();\n\nexport default BaseType;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.regexp.constructor.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.replace.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { arrayEach, arrayMap } from \"../../../helpers/array.mjs\";\nimport { stringify } from \"../../../helpers/mixed.mjs\";\nimport BaseType from \"./_base.mjs\";\nvar CHAR_CARRIAGE_RETURN = String.fromCharCode(13);\nvar CHAR_DOUBLE_QUOTES = String.fromCharCode(34);\nvar CHAR_LINE_FEED = String.fromCharCode(10);\n/**\n * @plugin ExportFile\n * @private\n */\n\nvar Csv = /*#__PURE__*/function (_BaseType) {\n _inherits(Csv, _BaseType);\n\n var _super = _createSuper(Csv);\n\n function Csv() {\n _classCallCheck(this, Csv);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Csv, [{\n key: \"export\",\n value:\n /**\n * Create string body in desired format.\n *\n * @returns {string}\n */\n function _export() {\n var _this = this;\n\n var options = this.options;\n var data = this.dataProvider.getData();\n var columnHeaders = this.dataProvider.getColumnHeaders();\n var hasColumnHeaders = columnHeaders.length > 0;\n var rowHeaders = this.dataProvider.getRowHeaders();\n var hasRowHeaders = rowHeaders.length > 0;\n var result = options.bom ? String.fromCharCode(0xFEFF) : '';\n\n if (hasColumnHeaders) {\n columnHeaders = arrayMap(columnHeaders, function (value) {\n return _this._escapeCell(value, true);\n });\n\n if (hasRowHeaders) {\n result += options.columnDelimiter;\n }\n\n result += columnHeaders.join(options.columnDelimiter);\n result += options.rowDelimiter;\n }\n\n arrayEach(data, function (value, index) {\n if (index > 0) {\n result += options.rowDelimiter;\n }\n\n if (hasRowHeaders) {\n result += _this._escapeCell(rowHeaders[index]) + options.columnDelimiter;\n }\n\n result += value.map(function (cellValue) {\n return _this._escapeCell(cellValue);\n }).join(options.columnDelimiter);\n });\n return result;\n }\n /**\n * Escape cell value.\n *\n * @param {*} value Cell value.\n * @param {boolean} [force=false] Indicates if cell value will be escaped forcefully.\n * @returns {string}\n */\n\n }, {\n key: \"_escapeCell\",\n value: function _escapeCell(value) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var escapedValue = stringify(value);\n\n if (escapedValue !== '' && (force || escapedValue.indexOf(CHAR_CARRIAGE_RETURN) >= 0 || escapedValue.indexOf(CHAR_DOUBLE_QUOTES) >= 0 || escapedValue.indexOf(CHAR_LINE_FEED) >= 0 || escapedValue.indexOf(this.options.columnDelimiter) >= 0)) {\n escapedValue = escapedValue.replace(new RegExp('\"', 'g'), '\"\"');\n escapedValue = \"\\\"\".concat(escapedValue, \"\\\"\");\n }\n\n return escapedValue;\n }\n }], [{\n key: \"DEFAULT_OPTIONS\",\n get:\n /**\n * Default options for exporting CSV format.\n *\n * @returns {object}\n */\n function get() {\n return {\n mimeType: 'text/csv',\n fileExtension: 'csv',\n bom: true,\n columnDelimiter: ',',\n rowDelimiter: '\\r\\n'\n };\n }\n }]);\n\n return Csv;\n}(BaseType);\n\nexport default Csv;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport Csv from \"./types/csv.mjs\";\nexport var TYPE_CSV = 'csv';\nexport var TYPE_EXCEL = 'excel'; // TODO\n\nexport var TYPE_PDF = 'pdf'; // TODO\n\nexport var EXPORT_TYPES = _defineProperty({}, TYPE_CSV, Csv);\n/**\n * @param {string} type The exporter type.\n * @param {DataProvider} dataProvider The data provider.\n * @param {object} options Constructor options for exporter class.\n * @returns {BaseType|null}\n */\n\nexport default function typeFactory(type, dataProvider, options) {\n if (typeof EXPORT_TYPES[type] === 'function') {\n return new EXPORT_TYPES[type](dataProvider, options);\n }\n\n return null;\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport DataProvider from \"./dataProvider.mjs\";\nimport typeFactory, { EXPORT_TYPES } from \"./typeFactory.mjs\";\nexport var PLUGIN_KEY = 'exportFile';\nexport var PLUGIN_PRIORITY = 240;\n/**\n * @plugin ExportFile\n *\n * @description\n * The plugin enables exporting table data to file. It allows to export data as a string, blob or a downloadable file in\n * CSV format.\n *\n * See [the export file demo](https://handsontable.com/docs/demo-export-file.html) for examples.\n *\n * @example\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData()\n * });\n *\n * // access to exportFile plugin instance\n * const exportPlugin = hot.getPlugin('exportFile');\n *\n * // export as a string\n * exportPlugin.exportAsString('csv');\n *\n * // export as a blob object\n * exportPlugin.exportAsBlob('csv');\n *\n * // export to downloadable file (named: MyFile.csv)\n * exportPlugin.downloadFile('csv', {filename: 'MyFile'});\n *\n * // export as a string (with specified data range):\n * exportPlugin.exportAsString('csv', {\n * exportHiddenRows: true, // default false\n * exportHiddenColumns: true, // default false\n * columnHeaders: true, // default false\n * rowHeaders: true, // default false\n * columnDelimiter: ';', // default ','\n * range: [1, 1, 6, 6] // [startRow, endRow, startColumn, endColumn]\n * });\n * ```\n */\n\nexport var ExportFile = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ExportFile, _BasePlugin);\n\n var _super = _createSuper(ExportFile);\n\n function ExportFile() {\n _classCallCheck(this, ExportFile);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ExportFile, [{\n key: \"isEnabled\",\n value:\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ExportFile#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n function isEnabled() {\n return true;\n }\n /**\n * @typedef ExportOptions\n * @memberof ExportFile\n * @type {object}\n * @property {boolean} [exportHiddenRows=false] Include hidden rows in the exported file.\n * @property {boolean} [exportHiddenColumns=false] Include hidden columns in the exported file.\n * @property {boolean} [columnHeaders=false] Include column headers in the exported file.\n * @property {boolean} [rowHeaders=false] Include row headers in the exported file.\n * @property {string} [columnDelimiter=','] Column delimiter.\n * @property {string} [range=[]] Cell range that will be exported to file.\n */\n\n /**\n * Exports table data as a string.\n *\n * @param {string} format Export format type eq. `'csv'`.\n * @param {ExportOptions} options Export options.\n * @returns {string}\n */\n\n }, {\n key: \"exportAsString\",\n value: function exportAsString(format) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this._createTypeFormatter(format, options).export();\n }\n /**\n * Exports table data as a blob object.\n *\n * @param {string} format Export format type eq. `'csv'`.\n * @param {ExportOptions} options Export options.\n * @returns {Blob}\n */\n\n }, {\n key: \"exportAsBlob\",\n value: function exportAsBlob(format) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this._createBlob(this._createTypeFormatter(format, options));\n }\n /**\n * Exports table data as a downloadable file.\n *\n * @param {string} format Export format type eq. `'csv'`.\n * @param {ExportOptions} options Export options.\n */\n\n }, {\n key: \"downloadFile\",\n value: function downloadFile(format) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _this$hot = this.hot,\n rootDocument = _this$hot.rootDocument,\n rootWindow = _this$hot.rootWindow;\n\n var formatter = this._createTypeFormatter(format, options);\n\n var blob = this._createBlob(formatter);\n\n var URL = rootWindow.URL || rootWindow.webkitURL;\n var a = rootDocument.createElement('a');\n var name = \"\".concat(formatter.options.filename, \".\").concat(formatter.options.fileExtension);\n\n if (a.download !== void 0) {\n var url = URL.createObjectURL(blob);\n a.style.display = 'none';\n a.setAttribute('href', url);\n a.setAttribute('download', name);\n rootDocument.body.appendChild(a);\n a.dispatchEvent(new MouseEvent('click'));\n rootDocument.body.removeChild(a);\n setTimeout(function () {\n URL.revokeObjectURL(url);\n }, 100);\n } else if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(blob, name);\n }\n }\n /**\n * Creates and returns class formatter for specified export type.\n *\n * @private\n * @param {string} format Export format type eq. `'csv'`.\n * @param {ExportOptions} options Export options.\n * @returns {BaseType}\n */\n\n }, {\n key: \"_createTypeFormatter\",\n value: function _createTypeFormatter(format) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!EXPORT_TYPES[format]) {\n throw new Error(\"Export format type \\\"\".concat(format, \"\\\" is not supported.\"));\n }\n\n return typeFactory(format, new DataProvider(this.hot), options);\n }\n /**\n * Creates blob object based on provided type formatter class.\n *\n * @private\n * @param {BaseType} typeFormatter The instance of the specyfic formatter/exporter.\n * @returns {Blob}\n */\n\n }, {\n key: \"_createBlob\",\n value: function _createBlob(typeFormatter) {\n var formatter = null;\n\n if (typeof Blob !== 'undefined') {\n formatter = new Blob([typeFormatter.export()], {\n type: \"\".concat(typeFormatter.options.mimeType, \";charset=\").concat(typeFormatter.options.encoding)\n });\n }\n\n return formatter;\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ExportFile;\n}(BasePlugin);","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { mixin } from \"../../../helpers/object.mjs\";\nimport localHooks from \"../../../mixins/localHooks.mjs\";\nimport { LinkedPhysicalIndexToValueMap as IndexToValueMap } from \"../../../translations/index.mjs\";\n/**\n * @plugin Filters\n * @class BaseComponent\n */\n\nvar BaseComponent = /*#__PURE__*/function () {\n function BaseComponent(hotInstance, _ref) {\n var id = _ref.id,\n _ref$stateless = _ref.stateless,\n stateless = _ref$stateless === void 0 ? true : _ref$stateless;\n\n _classCallCheck(this, BaseComponent);\n /**\n * The Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hotInstance;\n /**\n * The component uniq id.\n *\n * @type {string}\n */\n\n this.id = id;\n /**\n * List of registered component UI elements.\n *\n * @type {Array}\n */\n\n this.elements = [];\n /**\n * Flag which determines if element is hidden.\n *\n * @type {boolean}\n */\n\n this.hidden = false;\n /**\n * The component states id.\n *\n * @type {string}\n */\n\n this.stateId = \"Filters.component.\".concat(this.id);\n /**\n * Index map which stores component states for each column.\n *\n * @type {LinkedPhysicalIndexToValueMap|null}\n */\n\n this.state = stateless ? null : this.hot.columnIndexMapper.registerMap(this.stateId, new IndexToValueMap());\n }\n /**\n * Reset elements to its initial state.\n */\n\n\n _createClass(BaseComponent, [{\n key: \"reset\",\n value: function reset() {\n arrayEach(this.elements, function (ui) {\n return ui.reset();\n });\n }\n /**\n * Hide component.\n */\n\n }, {\n key: \"hide\",\n value: function hide() {\n this.hidden = true;\n }\n /**\n * Show component.\n */\n\n }, {\n key: \"show\",\n value: function show() {\n this.hidden = false;\n }\n /**\n * Check if component is hidden.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isHidden\",\n value: function isHidden() {\n return this.hot === null || this.hidden;\n }\n /**\n * Restores the component state from the given physical column index. The method\n * internally calls the `setState` method. The state then is individually processed\n * by each component.\n *\n * @param {number} physicalColumn The physical column index.\n */\n\n }, {\n key: \"restoreState\",\n value: function restoreState(physicalColumn) {\n if (this.state) {\n this.setState(this.state.getValueAtIndex(physicalColumn));\n }\n }\n /**\n * The custom logic for component state restoring.\n */\n\n }, {\n key: \"setState\",\n value: function setState() {\n throw new Error('The state setting logic is not implemented');\n }\n /**\n * Saves the component state to the given physical column index. The method\n * internally calls the `getState` method, which returns the current state of\n * the component.\n *\n * @param {number} physicalColumn The physical column index.\n */\n\n }, {\n key: \"saveState\",\n value: function saveState(physicalColumn) {\n if (this.state) {\n this.state.setValueAtIndex(physicalColumn, this.getState());\n }\n }\n /**\n * The custom logic for component state gathering (for stateful components).\n */\n\n }, {\n key: \"getState\",\n value: function getState() {\n throw new Error('The state gathering logic is not implemented');\n }\n /**\n * Destroy element.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.columnIndexMapper.unregisterMap(this.stateId);\n this.clearLocalHooks();\n arrayEach(this.elements, function (ui) {\n return ui.destroy();\n });\n this.state = null;\n this.elements = null;\n this.hot = null;\n }\n }]);\n\n return BaseComponent;\n}();\n\nmixin(BaseComponent, localHooks);\nexport default BaseComponent;","import \"core-js/modules/es.array.concat.js\";\nexport var conditions = {};\n/**\n * Get condition closure with pre-bound arguments.\n *\n * @param {string} name Condition name.\n * @param {Array} args Condition arguments.\n * @returns {Function}\n */\n\nexport function getCondition(name, args) {\n if (!conditions[name]) {\n throw Error(\"Filter condition \\\"\".concat(name, \"\\\" does not exist.\"));\n }\n\n var _conditions$name = conditions[name],\n condition = _conditions$name.condition,\n descriptor = _conditions$name.descriptor;\n var conditionArguments = args;\n\n if (descriptor.inputValuesDecorator) {\n conditionArguments = descriptor.inputValuesDecorator(conditionArguments);\n }\n\n return function (dataRow) {\n return condition.apply(dataRow.meta.instance, [].concat([dataRow], [conditionArguments]));\n };\n}\n/**\n * Get condition object descriptor which defines some additional informations about this condition.\n *\n * @param {string} name Condition name.\n * @returns {object}\n */\n\nexport function getConditionDescriptor(name) {\n if (!conditions[name]) {\n throw Error(\"Filter condition \\\"\".concat(name, \"\\\" does not exist.\"));\n }\n\n return conditions[name].descriptor;\n}\n/**\n * Condition registerer.\n *\n * @param {string} name Condition name.\n * @param {Function} condition Condition function.\n * @param {object} descriptor Condition descriptor.\n */\n\nexport function registerCondition(name, condition, descriptor) {\n descriptor.key = name;\n conditions[name] = {\n condition: condition,\n descriptor: descriptor\n };\n}","import * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'none';\n/**\n * @returns {boolean}\n */\n\nexport function condition() {\n return true;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_NONE,\n inputsCount: 0,\n showOperators: false\n});","import * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'empty';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @returns {boolean}\n */\n\nexport function condition(dataRow) {\n return dataRow.value === '' || dataRow.value === null || dataRow.value === void 0;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_EMPTY,\n inputsCount: 0,\n showOperators: true\n});","import * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition, getCondition } from \"../conditionRegisterer.mjs\";\nimport { CONDITION_NAME as CONDITION_EMPTY } from \"./empty.mjs\";\nexport var CONDITION_NAME = 'not_empty';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, inputValues) {\n return !getCondition(CONDITION_EMPTY, inputValues)(dataRow);\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_NOT_EMPTY,\n inputsCount: 0,\n showOperators: true\n});","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { stringify } from \"../../../helpers/mixed.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'eq';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n return stringify(dataRow.value).toLowerCase() === stringify(value);\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_EQUAL,\n inputsCount: 1,\n showOperators: true\n});","import * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition, getCondition } from \"../conditionRegisterer.mjs\";\nimport { CONDITION_NAME as CONDITION_EQUAL } from \"./equal.mjs\";\nexport var CONDITION_NAME = 'neq';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, inputValues) {\n return !getCondition(CONDITION_EQUAL, inputValues)(dataRow);\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_NOT_EQUAL,\n inputsCount: 1,\n showOperators: true\n});","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'gt';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n var conditionValue = value;\n\n if (dataRow.meta.type === 'numeric') {\n conditionValue = parseFloat(conditionValue, 10);\n }\n\n return dataRow.value > conditionValue;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_GREATER_THAN,\n inputsCount: 1,\n showOperators: true\n});","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'gte';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n var conditionValue = value;\n\n if (dataRow.meta.type === 'numeric') {\n conditionValue = parseFloat(conditionValue, 10);\n }\n\n return dataRow.value >= conditionValue;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,\n inputsCount: 1,\n showOperators: true\n});","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'lt';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n var conditionValue = value;\n\n if (dataRow.meta.type === 'numeric') {\n conditionValue = parseFloat(conditionValue, 10);\n }\n\n return dataRow.value < conditionValue;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_LESS_THAN,\n inputsCount: 1,\n showOperators: true\n});","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'lte';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n var conditionValue = value;\n\n if (dataRow.meta.type === 'numeric') {\n conditionValue = parseFloat(conditionValue, 10);\n }\n\n return dataRow.value <= conditionValue;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,\n inputsCount: 1,\n showOperators: true\n});","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport moment from 'moment';\nimport * as C from \"../../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'date_after';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n var date = moment(dataRow.value, dataRow.meta.dateFormat);\n var inputDate = moment(value, dataRow.meta.dateFormat);\n\n if (!date.isValid() || !inputDate.isValid()) {\n return false;\n }\n\n return date.diff(inputDate) >= 0;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_AFTER,\n inputsCount: 1,\n showOperators: true\n});","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport moment from 'moment';\nimport * as C from \"../../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'date_before';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n var date = moment(dataRow.value, dataRow.meta.dateFormat);\n var inputDate = moment(value, dataRow.meta.dateFormat);\n\n if (!date.isValid() || !inputDate.isValid()) {\n return false;\n }\n\n return date.diff(inputDate) <= 0;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_BEFORE,\n inputsCount: 1,\n showOperators: true\n});","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition, getCondition } from \"../conditionRegisterer.mjs\";\nimport { CONDITION_NAME as CONDITION_DATE_AFTER } from \"./date/after.mjs\";\nimport { CONDITION_NAME as CONDITION_DATE_BEFORE } from \"./date/before.mjs\";\nexport var CONDITION_NAME = 'between';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n from = _ref2[0],\n to = _ref2[1];\n\n var fromValue = from;\n var toValue = to;\n\n if (dataRow.meta.type === 'numeric') {\n var _from = parseFloat(fromValue, 10);\n\n var _to = parseFloat(toValue, 10);\n\n fromValue = Math.min(_from, _to);\n toValue = Math.max(_from, _to);\n } else if (dataRow.meta.type === 'date') {\n var dateBefore = getCondition(CONDITION_DATE_BEFORE, [toValue]);\n var dateAfter = getCondition(CONDITION_DATE_AFTER, [fromValue]);\n return dateBefore(dataRow) && dateAfter(dataRow);\n }\n\n return dataRow.value >= fromValue && dataRow.value <= toValue;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_BETWEEN,\n inputsCount: 2,\n showOperators: true\n});","import * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition, getCondition } from \"../conditionRegisterer.mjs\";\nimport { CONDITION_NAME as CONDITION_BETWEEN } from \"./between.mjs\";\nexport var CONDITION_NAME = 'not_between';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, inputValues) {\n return !getCondition(CONDITION_BETWEEN, inputValues)(dataRow);\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_NOT_BETWEEN,\n inputsCount: 2,\n showOperators: true\n});","import \"core-js/modules/es.string.starts-with.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { stringify } from \"../../../helpers/mixed.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'begins_with';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n return stringify(dataRow.value).toLowerCase().startsWith(stringify(value));\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_BEGINS_WITH,\n inputsCount: 1,\n showOperators: true\n});","import \"core-js/modules/es.string.ends-with.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { stringify } from \"../../../helpers/mixed.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'ends_with';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n return stringify(dataRow.value).toLowerCase().endsWith(stringify(value));\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_ENDS_WITH,\n inputsCount: 1,\n showOperators: true\n});","import \"core-js/modules/es.array.index-of.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { stringify } from \"../../../helpers/mixed.mjs\";\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'contains';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n return stringify(dataRow.value).toLowerCase().indexOf(stringify(value)) >= 0;\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_CONTAINS,\n inputsCount: 1,\n showOperators: true\n});","import * as C from \"../../../i18n/constants.mjs\";\nimport { registerCondition, getCondition } from \"../conditionRegisterer.mjs\";\nimport { CONDITION_NAME as CONDITION_CONTAINS } from \"./contains.mjs\";\nexport var CONDITION_NAME = 'not_contains';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, inputValues) {\n return !getCondition(CONDITION_CONTAINS, inputValues)(dataRow);\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_NOT_CONTAIN,\n inputsCount: 1,\n showOperators: true\n});","import moment from 'moment';\nimport * as C from \"../../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'date_tomorrow';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @returns {boolean}\n */\n\nexport function condition(dataRow) {\n var date = moment(dataRow.value, dataRow.meta.dateFormat);\n\n if (!date.isValid()) {\n return false;\n }\n\n return date.isSame(moment().subtract(-1, 'days').startOf('day'), 'd');\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_TOMORROW,\n inputsCount: 0\n});","import moment from 'moment';\nimport * as C from \"../../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'date_today';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @returns {boolean}\n */\n\nexport function condition(dataRow) {\n var date = moment(dataRow.value, dataRow.meta.dateFormat);\n\n if (!date.isValid()) {\n return false;\n }\n\n return date.isSame(moment().startOf('day'), 'd');\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_TODAY,\n inputsCount: 0\n});","import moment from 'moment';\nimport * as C from \"../../../../i18n/constants.mjs\";\nimport { registerCondition } from \"../../conditionRegisterer.mjs\";\nexport var CONDITION_NAME = 'date_yesterday';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @returns {boolean}\n */\n\nexport function condition(dataRow) {\n var date = moment(dataRow.value, dataRow.meta.dateFormat);\n\n if (!date.isValid()) {\n return false;\n }\n\n return date.isSame(moment().subtract(1, 'days').startOf('day'), 'd');\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: C.FILTERS_CONDITIONS_YESTERDAY,\n inputsCount: 0\n});","var _TYPES;\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport { clone } from \"../../helpers/object.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { SEPARATOR } from \"../contextMenu/predefinedItems.mjs\";\nimport { getConditionDescriptor } from \"./conditionRegisterer.mjs\";\nimport { CONDITION_NAME as CONDITION_NONE } from \"./condition/none.mjs\";\nimport { CONDITION_NAME as CONDITION_EMPTY } from \"./condition/empty.mjs\";\nimport { CONDITION_NAME as CONDITION_NOT_EMPTY } from \"./condition/notEmpty.mjs\";\nimport { CONDITION_NAME as CONDITION_EQUAL } from \"./condition/equal.mjs\";\nimport { CONDITION_NAME as CONDITION_NOT_EQUAL } from \"./condition/notEqual.mjs\";\nimport { CONDITION_NAME as CONDITION_GREATER_THAN } from \"./condition/greaterThan.mjs\";\nimport { CONDITION_NAME as CONDITION_GREATER_THAN_OR_EQUAL } from \"./condition/greaterThanOrEqual.mjs\";\nimport { CONDITION_NAME as CONDITION_LESS_THAN } from \"./condition/lessThan.mjs\";\nimport { CONDITION_NAME as CONDITION_LESS_THAN_OR_EQUAL } from \"./condition/lessThanOrEqual.mjs\";\nimport { CONDITION_NAME as CONDITION_BETWEEN } from \"./condition/between.mjs\";\nimport { CONDITION_NAME as CONDITION_NOT_BETWEEN } from \"./condition/notBetween.mjs\";\nimport { CONDITION_NAME as CONDITION_BEGINS_WITH } from \"./condition/beginsWith.mjs\";\nimport { CONDITION_NAME as CONDITION_ENDS_WITH } from \"./condition/endsWith.mjs\";\nimport { CONDITION_NAME as CONDITION_CONTAINS } from \"./condition/contains.mjs\";\nimport { CONDITION_NAME as CONDITION_NOT_CONTAINS } from \"./condition/notContains.mjs\";\nimport { CONDITION_NAME as CONDITION_DATE_BEFORE } from \"./condition/date/before.mjs\";\nimport { CONDITION_NAME as CONDITION_DATE_AFTER } from \"./condition/date/after.mjs\";\nimport { CONDITION_NAME as CONDITION_TOMORROW } from \"./condition/date/tomorrow.mjs\";\nimport { CONDITION_NAME as CONDITION_TODAY } from \"./condition/date/today.mjs\";\nimport { CONDITION_NAME as CONDITION_YESTERDAY } from \"./condition/date/yesterday.mjs\";\nimport { CONDITION_NAME as CONDITION_BY_VALUE } from \"./condition/byValue.mjs\";\nimport { CONDITION_NAME as CONDITION_TRUE } from \"./condition/true.mjs\";\nimport { CONDITION_NAME as CONDITION_FALSE } from \"./condition/false.mjs\";\nimport { OPERATION_ID as OPERATION_AND } from \"./logicalOperations/conjunction.mjs\";\nimport { OPERATION_ID as OPERATION_OR } from \"./logicalOperations/disjunction.mjs\";\nimport { OPERATION_ID as OPERATION_OR_THEN_VARIABLE } from \"./logicalOperations/disjunctionWithExtraCondition.mjs\";\nexport { CONDITION_NONE, CONDITION_EMPTY, CONDITION_NOT_EMPTY, CONDITION_EQUAL, CONDITION_NOT_EQUAL, CONDITION_GREATER_THAN, CONDITION_GREATER_THAN_OR_EQUAL, CONDITION_LESS_THAN, CONDITION_LESS_THAN_OR_EQUAL, CONDITION_BETWEEN, CONDITION_NOT_BETWEEN, CONDITION_BEGINS_WITH, CONDITION_ENDS_WITH, CONDITION_CONTAINS, CONDITION_NOT_CONTAINS, CONDITION_DATE_BEFORE, CONDITION_DATE_AFTER, CONDITION_TOMORROW, CONDITION_TODAY, CONDITION_YESTERDAY, CONDITION_BY_VALUE, CONDITION_TRUE, CONDITION_FALSE, OPERATION_AND, OPERATION_OR, OPERATION_OR_THEN_VARIABLE };\nexport var TYPE_NUMERIC = 'numeric';\nexport var TYPE_TEXT = 'text';\nexport var TYPE_DATE = 'date';\n/**\n * Default types and order for filter conditions.\n *\n * @type {object}\n */\n\nexport var TYPES = (_TYPES = {}, _defineProperty(_TYPES, TYPE_NUMERIC, [CONDITION_NONE, SEPARATOR, CONDITION_EMPTY, CONDITION_NOT_EMPTY, SEPARATOR, CONDITION_EQUAL, CONDITION_NOT_EQUAL, SEPARATOR, CONDITION_GREATER_THAN, CONDITION_GREATER_THAN_OR_EQUAL, CONDITION_LESS_THAN, CONDITION_LESS_THAN_OR_EQUAL, CONDITION_BETWEEN, CONDITION_NOT_BETWEEN]), _defineProperty(_TYPES, TYPE_TEXT, [CONDITION_NONE, SEPARATOR, CONDITION_EMPTY, CONDITION_NOT_EMPTY, SEPARATOR, CONDITION_EQUAL, CONDITION_NOT_EQUAL, SEPARATOR, CONDITION_BEGINS_WITH, CONDITION_ENDS_WITH, SEPARATOR, CONDITION_CONTAINS, CONDITION_NOT_CONTAINS]), _defineProperty(_TYPES, TYPE_DATE, [CONDITION_NONE, SEPARATOR, CONDITION_EMPTY, CONDITION_NOT_EMPTY, SEPARATOR, CONDITION_EQUAL, CONDITION_NOT_EQUAL, SEPARATOR, CONDITION_DATE_BEFORE, CONDITION_DATE_AFTER, CONDITION_BETWEEN, SEPARATOR, CONDITION_TOMORROW, CONDITION_TODAY, CONDITION_YESTERDAY]), _TYPES);\n/**\n * Get options list for conditional filter by data type (e.q: `'text'`, `'numeric'`, `'date'`).\n *\n * @param {string} type The data type.\n * @returns {object}\n */\n\nexport default function getOptionsList(type) {\n var items = [];\n var typeName = type;\n\n if (!TYPES[typeName]) {\n typeName = TYPE_TEXT;\n }\n\n arrayEach(TYPES[typeName], function (typeValue) {\n var option;\n\n if (typeValue === SEPARATOR) {\n option = {\n name: SEPARATOR\n };\n } else {\n option = clone(getConditionDescriptor(typeValue));\n }\n\n items.push(option);\n });\n return items;\n}","import \"core-js/modules/es.string.starts-with.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { clone, extend, mixin, objectEach } from \"../../../helpers/object.mjs\";\nimport localHooks from \"../../../mixins/localHooks.mjs\";\nimport EventManager from \"../../../eventManager.mjs\";\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nvar STATE_BUILT = 'built';\nvar STATE_BUILDING = 'building';\nvar EVENTS_TO_REGISTER = ['click', 'input', 'keydown', 'keypress', 'keyup', 'focus', 'blur', 'change'];\n/**\n * @class\n * @private\n */\n\nvar BaseUI = /*#__PURE__*/function () {\n function BaseUI(hotInstance, options) {\n _classCallCheck(this, BaseUI);\n /**\n * Instance of Handsontable.\n *\n * @type {Core}\n */\n\n\n this.hot = hotInstance;\n /**\n * Instance of EventManager.\n *\n * @type {EventManager}\n */\n\n this.eventManager = new EventManager(this);\n /**\n * List of element options.\n *\n * @type {object}\n */\n\n this.options = extend(BaseUI.DEFAULTS, options);\n /**\n * Build root DOM element.\n *\n * @type {Element}\n * @private\n */\n\n this._element = this.hot.rootDocument.createElement(this.options.wrapIt ? 'div' : this.options.tagName);\n /**\n * Flag which determines build state of element.\n *\n * @type {boolean}\n */\n\n this.buildState = false;\n }\n /**\n * Set the element value.\n *\n * @param {*} value Set the component value.\n */\n\n\n _createClass(BaseUI, [{\n key: \"setValue\",\n value: function setValue(value) {\n this.options.value = value;\n this.update();\n }\n /**\n * Get the element value.\n *\n * @returns {*}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.options.value;\n }\n /**\n * Get element as a DOM object.\n *\n * @returns {Element}\n */\n\n }, {\n key: \"element\",\n get: function get() {\n if (this.buildState === STATE_BUILDING) {\n return this._element;\n }\n\n if (this.buildState === STATE_BUILT) {\n this.update();\n return this._element;\n }\n\n this.buildState = STATE_BUILDING;\n this.build();\n this.buildState = STATE_BUILT;\n return this._element;\n }\n /**\n * Check if element was built (built whole DOM structure).\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isBuilt\",\n value: function isBuilt() {\n return this.buildState === STATE_BUILT;\n }\n /**\n * Translate value if it is possible. It's checked if value belongs to namespace of translated phrases.\n *\n * @param {*} value Value which will may be translated.\n * @returns {*} Translated value if translation was possible, original value otherwise.\n */\n\n }, {\n key: \"translateIfPossible\",\n value: function translateIfPossible(value) {\n if (typeof value === 'string' && value.startsWith(C.FILTERS_NAMESPACE)) {\n return this.hot.getTranslatedPhrase(value);\n }\n\n return value;\n }\n /**\n * Build DOM structure.\n */\n\n }, {\n key: \"build\",\n value: function build() {\n var _this = this;\n\n var registerEvent = function registerEvent(element, eventName) {\n _this.eventManager.addEventListener(element, eventName, function (event) {\n return _this.runLocalHooks(eventName, event, _this);\n });\n };\n\n if (!this.buildState) {\n this.buildState = STATE_BUILDING;\n }\n\n if (this.options.className) {\n addClass(this._element, this.options.className);\n }\n\n if (this.options.children.length) {\n arrayEach(this.options.children, function (element) {\n return _this._element.appendChild(element.element);\n });\n } else if (this.options.wrapIt) {\n var element = this.hot.rootDocument.createElement(this.options.tagName);\n objectEach(this.options, function (value, key) {\n if (element[key] !== void 0 && key !== 'className' && key !== 'tagName' && key !== 'children') {\n element[key] = _this.translateIfPossible(value);\n }\n });\n\n this._element.appendChild(element);\n\n arrayEach(EVENTS_TO_REGISTER, function (eventName) {\n return registerEvent(element, eventName);\n });\n } else {\n arrayEach(EVENTS_TO_REGISTER, function (eventName) {\n return registerEvent(_this._element, eventName);\n });\n }\n }\n /**\n * Update DOM structure.\n */\n\n }, {\n key: \"update\",\n value: function update() {}\n /**\n * Reset to initial state.\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n this.options.value = '';\n this.update();\n }\n /**\n * Show element.\n */\n\n }, {\n key: \"show\",\n value: function show() {\n this.element.style.display = '';\n }\n /**\n * Hide element.\n */\n\n }, {\n key: \"hide\",\n value: function hide() {\n this.element.style.display = 'none';\n }\n /**\n * Focus element.\n */\n\n }, {\n key: \"focus\",\n value: function focus() {}\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.eventManager.destroy();\n this.eventManager = null;\n this.hot = null;\n\n if (this._element.parentNode) {\n this._element.parentNode.removeChild(this._element);\n }\n\n this._element = null;\n }\n }], [{\n key: \"DEFAULTS\",\n get: function get() {\n return clone({\n className: '',\n value: '',\n tagName: 'div',\n children: [],\n wrapIt: true\n });\n }\n }]);\n\n return BaseUI;\n}();\n\nmixin(BaseUI, localHooks);\nexport default BaseUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nimport { clone, extend } from \"../../../helpers/object.mjs\";\nimport BaseUI from \"./_base.mjs\";\nvar privatePool = new WeakMap();\n/**\n * @class InputUI\n * @util\n */\n\nvar InputUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(InputUI, _BaseUI);\n\n var _super = _createSuper(InputUI);\n\n function InputUI(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, InputUI);\n\n _this = _super.call(this, hotInstance, extend(InputUI.DEFAULTS, options));\n privatePool.set(_assertThisInitialized(_this), {});\n\n _this.registerHooks();\n\n return _this;\n }\n /**\n * Register all necessary hooks.\n */\n\n\n _createClass(InputUI, [{\n key: \"registerHooks\",\n value: function registerHooks() {\n var _this2 = this;\n\n this.addLocalHook('click', function () {\n return _this2.onClick();\n });\n this.addLocalHook('keyup', function (event) {\n return _this2.onKeyup(event);\n });\n }\n /**\n * Build DOM structure.\n */\n\n }, {\n key: \"build\",\n value: function build() {\n _get(_getPrototypeOf(InputUI.prototype), \"build\", this).call(this);\n\n var priv = privatePool.get(this);\n var icon = this.hot.rootDocument.createElement('div');\n priv.input = this._element.firstChild;\n addClass(this._element, 'htUIInput');\n addClass(icon, 'htUIInputIcon');\n\n this._element.appendChild(icon);\n\n this.update();\n }\n /**\n * Update element.\n */\n\n }, {\n key: \"update\",\n value: function update() {\n if (!this.isBuilt()) {\n return;\n }\n\n var input = privatePool.get(this).input;\n input.type = this.options.type;\n input.placeholder = this.translateIfPossible(this.options.placeholder);\n input.value = this.translateIfPossible(this.options.value);\n }\n /**\n * Focus element.\n */\n\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.isBuilt()) {\n privatePool.get(this).input.focus();\n }\n }\n /**\n * OnClick listener.\n */\n\n }, {\n key: \"onClick\",\n value: function onClick() {}\n /**\n * OnKeyup listener.\n *\n * @param {Event} event The mouse event object.\n */\n\n }, {\n key: \"onKeyup\",\n value: function onKeyup(event) {\n this.options.value = event.target.value;\n }\n }], [{\n key: \"DEFAULTS\",\n get: function get() {\n return clone({\n placeholder: '',\n type: 'text',\n tagName: 'input'\n });\n }\n }]);\n\n return InputUI;\n}(BaseUI);\n\nexport default InputUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport Menu from \"../../../plugins/contextMenu/menu.mjs\";\nimport { clone, extend } from \"../../../helpers/object.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { SEPARATOR } from \"../../../plugins/contextMenu/predefinedItems.mjs\";\nimport BaseUI from \"./_base.mjs\";\nvar privatePool = new WeakMap();\n/**\n * @class SelectUI\n * @util\n */\n\nvar SelectUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(SelectUI, _BaseUI);\n\n var _super = _createSuper(SelectUI);\n\n function SelectUI(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, SelectUI);\n\n _this = _super.call(this, hotInstance, extend(SelectUI.DEFAULTS, options));\n privatePool.set(_assertThisInitialized(_this), {});\n /**\n * Instance of {@link Menu}.\n *\n * @type {Menu}\n */\n\n _this.menu = null;\n /**\n * List of available select options.\n *\n * @type {Array}\n */\n\n _this.items = [];\n\n _this.registerHooks();\n\n return _this;\n }\n /**\n * Register all necessary hooks.\n */\n\n\n _createClass(SelectUI, [{\n key: \"registerHooks\",\n value: function registerHooks() {\n var _this2 = this;\n\n this.addLocalHook('click', function () {\n return _this2.onClick();\n });\n }\n /**\n * Set options which can be selected in the list.\n *\n * @param {Array} items Array of objects with required keys `key` and `name`.\n */\n\n }, {\n key: \"setItems\",\n value: function setItems(items) {\n this.items = this.translateNames(items);\n\n if (this.menu) {\n this.menu.setMenuItems(this.items);\n }\n }\n /**\n * Translate names of menu items.\n *\n * @param {Array} items Array of objects with required keys `key` and `name`.\n * @returns {Array} Items with translated `name` keys.\n */\n\n }, {\n key: \"translateNames\",\n value: function translateNames(items) {\n var _this3 = this;\n\n arrayEach(items, function (item) {\n item.name = _this3.translateIfPossible(item.name);\n });\n return items;\n }\n /**\n * Build DOM structure.\n */\n\n }, {\n key: \"build\",\n value: function build() {\n var _this4 = this;\n\n _get(_getPrototypeOf(SelectUI.prototype), \"build\", this).call(this);\n\n this.menu = new Menu(this.hot, {\n className: 'htSelectUI htFiltersConditionsMenu',\n keepInViewport: false,\n standalone: true,\n container: this.options.menuContainer\n });\n this.menu.setMenuItems(this.items);\n var caption = new BaseUI(this.hot, {\n className: 'htUISelectCaption'\n });\n var dropdown = new BaseUI(this.hot, {\n className: 'htUISelectDropdown'\n });\n var priv = privatePool.get(this);\n priv.caption = caption;\n priv.captionElement = caption.element;\n priv.dropdown = dropdown;\n arrayEach([caption, dropdown], function (element) {\n return _this4._element.appendChild(element.element);\n });\n this.menu.addLocalHook('select', function (command) {\n return _this4.onMenuSelect(command);\n });\n this.menu.addLocalHook('afterClose', function () {\n return _this4.onMenuClosed();\n });\n this.update();\n }\n /**\n * Update DOM structure.\n */\n\n }, {\n key: \"update\",\n value: function update() {\n if (!this.isBuilt()) {\n return;\n }\n\n var conditionName;\n\n if (this.options.value) {\n conditionName = this.options.value.name;\n } else {\n conditionName = this.menu.hot.getTranslatedPhrase(C.FILTERS_CONDITIONS_NONE);\n }\n\n privatePool.get(this).captionElement.textContent = conditionName;\n\n _get(_getPrototypeOf(SelectUI.prototype), \"update\", this).call(this);\n }\n /**\n * Open select dropdown menu with available options.\n */\n\n }, {\n key: \"openOptions\",\n value: function openOptions() {\n var rect = this.element.getBoundingClientRect();\n\n if (this.menu) {\n this.menu.open();\n this.menu.setPosition({\n left: rect.left - 5,\n top: rect.top,\n width: rect.width,\n height: rect.height\n });\n }\n }\n /**\n * Close select dropdown menu.\n */\n\n }, {\n key: \"closeOptions\",\n value: function closeOptions() {\n if (this.menu) {\n this.menu.close();\n }\n }\n /**\n * On menu selected listener.\n *\n * @private\n * @param {object} command Selected item.\n */\n\n }, {\n key: \"onMenuSelect\",\n value: function onMenuSelect(command) {\n if (command.name !== SEPARATOR) {\n this.options.value = command;\n this.update();\n this.runLocalHooks('select', this.options.value);\n }\n }\n /**\n * On menu closed listener.\n *\n * @private\n */\n\n }, {\n key: \"onMenuClosed\",\n value: function onMenuClosed() {\n this.runLocalHooks('afterClose');\n }\n /**\n * On element click listener.\n *\n * @private\n */\n\n }, {\n key: \"onClick\",\n value: function onClick() {\n this.openOptions();\n }\n /**\n * Destroy instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.menu) {\n this.menu.destroy();\n this.menu = null;\n }\n\n var _privatePool$get = privatePool.get(this),\n caption = _privatePool$get.caption,\n dropdown = _privatePool$get.dropdown;\n\n if (caption) {\n caption.destroy();\n }\n\n if (dropdown) {\n dropdown.destroy();\n }\n\n _get(_getPrototypeOf(SelectUI.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"DEFAULTS\",\n get: function get() {\n return clone({\n className: 'htUISelect',\n wrapIt: false\n });\n }\n }]);\n\n return SelectUI;\n}(BaseUI);\n\nexport default SelectUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.string.starts-with.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation } from \"../../../helpers/dom/event.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { isKey } from \"../../../helpers/unicode.mjs\";\nimport { clone } from \"../../../helpers/object.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport BaseComponent from \"./_base.mjs\";\nimport getOptionsList, { CONDITION_NONE } from \"../constants.mjs\";\nimport InputUI from \"../ui/input.mjs\";\nimport SelectUI from \"../ui/select.mjs\";\nimport { getConditionDescriptor } from \"../conditionRegisterer.mjs\";\n/**\n * @class ConditionComponent\n * @plugin Filters\n */\n\nvar ConditionComponent = /*#__PURE__*/function (_BaseComponent) {\n _inherits(ConditionComponent, _BaseComponent);\n\n var _super = _createSuper(ConditionComponent);\n\n function ConditionComponent(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, ConditionComponent);\n\n _this = _super.call(this, hotInstance, {\n id: options.id,\n stateless: false\n });\n _this.name = options.name;\n _this.addSeparator = options.addSeparator;\n\n _this.elements.push(new SelectUI(_this.hot, {\n menuContainer: options.menuContainer\n }));\n\n _this.elements.push(new InputUI(_this.hot, {\n placeholder: C.FILTERS_BUTTONS_PLACEHOLDER_VALUE\n }));\n\n _this.elements.push(new InputUI(_this.hot, {\n placeholder: C.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE\n }));\n\n _this.registerHooks();\n\n return _this;\n }\n /**\n * Register all necessary hooks.\n *\n * @private\n */\n\n\n _createClass(ConditionComponent, [{\n key: \"registerHooks\",\n value: function registerHooks() {\n var _this2 = this;\n\n this.getSelectElement().addLocalHook('select', function (command) {\n return _this2.onConditionSelect(command);\n });\n this.getSelectElement().addLocalHook('afterClose', function () {\n return _this2.onSelectUIClosed();\n });\n arrayEach(this.getInputElements(), function (input) {\n input.addLocalHook('keydown', function (event) {\n return _this2.onInputKeyDown(event);\n });\n });\n }\n /**\n * Set state of the component.\n *\n * @param {object} value State to restore.\n */\n\n }, {\n key: \"setState\",\n value: function setState(value) {\n var _this3 = this;\n\n this.reset();\n\n if (!value) {\n return;\n }\n\n var copyOfCommand = clone(value.command);\n\n if (copyOfCommand.name.startsWith(C.FILTERS_CONDITIONS_NAMESPACE)) {\n copyOfCommand.name = this.hot.getTranslatedPhrase(copyOfCommand.name);\n }\n\n this.getSelectElement().setValue(copyOfCommand);\n arrayEach(value.args, function (arg, index) {\n if (index > copyOfCommand.inputsCount - 1) {\n return false;\n }\n\n var element = _this3.getInputElement(index);\n\n element.setValue(arg);\n element[copyOfCommand.inputsCount > index ? 'show' : 'hide']();\n\n if (!index) {\n setTimeout(function () {\n return element.focus();\n }, 10);\n }\n });\n }\n /**\n * Export state of the component (get selected filter and filter arguments).\n *\n * @returns {object} Returns object where `command` key keeps used condition filter and `args` key its arguments.\n */\n\n }, {\n key: \"getState\",\n value: function getState() {\n var command = this.getSelectElement().getValue() || getConditionDescriptor(CONDITION_NONE);\n var args = [];\n arrayEach(this.getInputElements(), function (element, index) {\n if (command.inputsCount > index) {\n args.push(element.getValue());\n }\n });\n return {\n command: command,\n args: args\n };\n }\n /**\n * Update state of component.\n *\n * @param {object} condition The condition object.\n * @param {object} condition.command The command object with condition name as `key` property.\n * @param {Array} condition.args An array of values to compare.\n * @param {number} column Physical column index.\n */\n\n }, {\n key: \"updateState\",\n value: function updateState(condition, column) {\n var command = condition ? getConditionDescriptor(condition.name) : getConditionDescriptor(CONDITION_NONE);\n this.state.setValueAtIndex(column, {\n command: command,\n args: condition ? condition.args : []\n });\n\n if (!condition) {\n arrayEach(this.getInputElements(), function (element) {\n return element.setValue(null);\n });\n }\n }\n /**\n * Get select element.\n *\n * @returns {SelectUI}\n */\n\n }, {\n key: \"getSelectElement\",\n value: function getSelectElement() {\n return this.elements.filter(function (element) {\n return element instanceof SelectUI;\n })[0];\n }\n /**\n * Get input element.\n *\n * @param {number} index Index an array of elements.\n * @returns {InputUI}\n */\n\n }, {\n key: \"getInputElement\",\n value: function getInputElement() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n return this.getInputElements()[index];\n }\n /**\n * Get input elements.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getInputElements\",\n value: function getInputElements() {\n return this.elements.filter(function (element) {\n return element instanceof InputUI;\n });\n }\n /**\n * Get menu object descriptor.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getMenuItemDescriptor\",\n value: function getMenuItemDescriptor() {\n var _this4 = this;\n\n return {\n key: this.id,\n name: this.name,\n isCommand: false,\n disableSelection: true,\n hidden: function hidden() {\n return _this4.isHidden();\n },\n renderer: function renderer(hot, wrapper, row, col, prop, value) {\n addClass(wrapper.parentNode, 'htFiltersMenuCondition');\n\n if (_this4.addSeparator) {\n addClass(wrapper.parentNode, 'border');\n }\n\n var label = _this4.hot.rootDocument.createElement('div');\n\n addClass(label, 'htFiltersMenuLabel');\n label.textContent = value;\n wrapper.appendChild(label);\n\n if (!wrapper.parentNode.hasAttribute('ghost-table')) {\n arrayEach(_this4.elements, function (ui) {\n return wrapper.appendChild(ui.element);\n });\n }\n\n return wrapper;\n }\n };\n }\n /**\n * Reset elements to their initial state.\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n var _this$hot;\n\n var lastSelectedColumn = this.hot.getPlugin('filters').getSelectedColumn();\n var visualIndex = lastSelectedColumn && lastSelectedColumn.visualIndex;\n\n var columnType = (_this$hot = this.hot).getDataType.apply(_this$hot, _toConsumableArray(this.hot.getSelectedLast() || [0, visualIndex]));\n\n var items = getOptionsList(columnType);\n arrayEach(this.getInputElements(), function (element) {\n return element.hide();\n });\n this.getSelectElement().setItems(items);\n\n _get(_getPrototypeOf(ConditionComponent.prototype), \"reset\", this).call(this); // Select element as default 'None'\n\n\n this.getSelectElement().setValue(items[0]);\n }\n /**\n * On condition select listener.\n *\n * @private\n * @param {object} command Menu item object (command).\n */\n\n }, {\n key: \"onConditionSelect\",\n value: function onConditionSelect(command) {\n arrayEach(this.getInputElements(), function (element, index) {\n element[command.inputsCount > index ? 'show' : 'hide']();\n\n if (index === 0) {\n setTimeout(function () {\n return element.focus();\n }, 10);\n }\n });\n this.runLocalHooks('change', command);\n }\n /**\n * On component SelectUI closed listener.\n *\n * @private\n */\n\n }, {\n key: \"onSelectUIClosed\",\n value: function onSelectUIClosed() {\n this.runLocalHooks('afterClose');\n }\n /**\n * Key down listener.\n *\n * @private\n * @param {Event} event The DOM event object.\n */\n\n }, {\n key: \"onInputKeyDown\",\n value: function onInputKeyDown(event) {\n if (isKey(event.keyCode, 'ENTER')) {\n this.runLocalHooks('accept');\n stopImmediatePropagation(event);\n } else if (isKey(event.keyCode, 'ESCAPE')) {\n this.runLocalHooks('cancel');\n stopImmediatePropagation(event);\n }\n }\n }]);\n\n return ConditionComponent;\n}(BaseComponent);\n\nexport default ConditionComponent;","import \"core-js/modules/es.function.name.js\";\nexport var operations = {};\n/**\n * Get operation closure with pre-bound arguments.\n *\n * @param {string} id Operator `id`.\n * @returns {Function}\n */\n\nexport function getOperationFunc(id) {\n if (!operations[id]) {\n throw Error(\"Operation with id \\\"\".concat(id, \"\\\" does not exist.\"));\n }\n\n var func = operations[id].func;\n return function (conditions, value) {\n return func(conditions, value);\n };\n}\n/**\n * Return name of operation which is displayed inside UI component, basing on it's `id`.\n *\n * @param {string} id `Id` of operation.\n * @returns {string}\n */\n\nexport function getOperationName(id) {\n return operations[id].name;\n}\n/**\n * Operator registerer.\n *\n * @param {string} id Operation `id`.\n * @param {string} name Operation name which is displayed inside UI component.\n * @param {Function} func Operation function.\n */\n\nexport function registerOperation(id, name, func) {\n operations[id] = {\n name: name,\n func: func\n };\n}","import \"core-js/modules/es.array.every.js\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { registerOperation } from \"../logicalOperationRegisterer.mjs\";\nexport var OPERATION_ID = 'conjunction';\nexport var SHORT_NAME_FOR_COMPONENT = C.FILTERS_LABELS_CONJUNCTION; // p AND q AND w AND x AND... === TRUE?\n\n/**\n * @param {Array} conditions An array with values to check.\n * @param {*} value The comparable value.\n * @returns {boolean}\n */\n\nexport function operationResult(conditions, value) {\n return conditions.every(function (condition) {\n return condition.func(value);\n });\n}\nregisterOperation(OPERATION_ID, SHORT_NAME_FOR_COMPONENT, operationResult);","import \"core-js/modules/es.array.some.js\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { registerOperation } from \"../logicalOperationRegisterer.mjs\";\nexport var OPERATION_ID = 'disjunction';\nexport var SHORT_NAME_FOR_COMPONENT = C.FILTERS_LABELS_DISJUNCTION; // (p OR q OR w OR x OR...) === TRUE?\n\n/**\n * @param {Array} conditions An array with values to check.\n * @param {*} value The comparable value.\n * @returns {boolean}\n */\n\nexport function operationResult(conditions, value) {\n return conditions.some(function (condition) {\n return condition.func(value);\n });\n}\nregisterOperation(OPERATION_ID, SHORT_NAME_FOR_COMPONENT, operationResult);","import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { registerOperation } from \"../logicalOperationRegisterer.mjs\";\nexport var OPERATION_ID = 'disjunctionWithExtraCondition';\nexport var SHORT_NAME_FOR_COMPONENT = C.FILTERS_LABELS_DISJUNCTION; // ((p OR q OR w OR x OR...) AND z) === TRUE?\n\n/**\n * @param {Array} conditions An array with values to check.\n * @param {*} value The comparable value.\n * @returns {boolean}\n */\n\nexport function operationResult(conditions, value) {\n if (conditions.length < 3) {\n throw Error('Operation doesn\\'t work on less then three conditions.');\n }\n\n return conditions.slice(0, conditions.length - 1).some(function (condition) {\n return condition.func(value);\n }) && conditions[conditions.length - 1].func(value);\n}\nregisterOperation(OPERATION_ID, SHORT_NAME_FOR_COMPONENT, operationResult);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { clone, extend } from \"../../../helpers/object.mjs\";\nimport BaseUI from \"./_base.mjs\";\nvar privatePool = new WeakMap();\n/**\n * @class RadioInputUI\n * @util\n */\n\nvar RadioInputUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(RadioInputUI, _BaseUI);\n\n var _super = _createSuper(RadioInputUI);\n\n function RadioInputUI(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, RadioInputUI);\n\n _this = _super.call(this, hotInstance, extend(RadioInputUI.DEFAULTS, options));\n privatePool.set(_assertThisInitialized(_this), {});\n return _this;\n }\n /**\n * Build DOM structure.\n */\n\n\n _createClass(RadioInputUI, [{\n key: \"build\",\n value: function build() {\n _get(_getPrototypeOf(RadioInputUI.prototype), \"build\", this).call(this);\n\n var priv = privatePool.get(this);\n priv.input = this._element.firstChild;\n var label = this.hot.rootDocument.createElement('label');\n label.textContent = this.translateIfPossible(this.options.label.textContent);\n label.htmlFor = this.translateIfPossible(this.options.label.htmlFor);\n priv.label = label;\n\n this._element.appendChild(label);\n\n this.update();\n }\n /**\n * Update element.\n */\n\n }, {\n key: \"update\",\n value: function update() {\n if (!this.isBuilt()) {\n return;\n }\n\n var priv = privatePool.get(this);\n priv.input.checked = this.options.checked;\n priv.label.textContent = this.translateIfPossible(this.options.label.textContent);\n }\n /**\n * Check if radio button is checked.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isChecked\",\n value: function isChecked() {\n return this.options.checked;\n }\n /**\n * Set input checked attribute.\n *\n * @param {boolean} value Set the component state.\n */\n\n }, {\n key: \"setChecked\",\n value: function setChecked() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.options.checked = value;\n this.update();\n }\n /**\n * Focus element.\n */\n\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.isBuilt()) {\n privatePool.get(this).input.focus();\n }\n }\n }], [{\n key: \"DEFAULTS\",\n get: function get() {\n return clone({\n type: 'radio',\n tagName: 'input',\n className: 'htUIRadio',\n label: {}\n });\n }\n }]);\n\n return RadioInputUI;\n}(BaseUI);\n\nexport default RadioInputUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.function.name.js\";\n\nvar _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { toSingleLine } from \"../../../helpers/templateLiteralTag.mjs\";\nimport BaseComponent from \"./_base.mjs\";\nimport { getOperationName } from \"../logicalOperationRegisterer.mjs\";\nimport { OPERATION_ID as OPERATION_AND } from \"../logicalOperations/conjunction.mjs\";\nimport { OPERATION_ID as OPERATION_OR } from \"../logicalOperations/disjunction.mjs\";\nimport { OPERATION_ID as OPERATION_OR_THEN_VARIABLE } from \"../logicalOperations/disjunctionWithExtraCondition.mjs\";\nimport RadioInputUI from \"../ui/radioInput.mjs\";\nvar SELECTED_AT_START_ELEMENT_INDEX = 0;\n/**\n * @class OperatorsComponent\n * @plugin Filters\n */\n\nvar OperatorsComponent = /*#__PURE__*/function (_BaseComponent) {\n _inherits(OperatorsComponent, _BaseComponent);\n\n var _super = _createSuper(OperatorsComponent);\n\n function OperatorsComponent(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, OperatorsComponent);\n\n _this = _super.call(this, hotInstance, {\n id: options.id,\n stateless: false\n });\n _this.name = options.name;\n\n _this.buildOperatorsElement();\n\n return _this;\n }\n /**\n * Get menu object descriptor.\n *\n * @returns {object}\n */\n\n\n _createClass(OperatorsComponent, [{\n key: \"getMenuItemDescriptor\",\n value: function getMenuItemDescriptor() {\n var _this2 = this;\n\n return {\n key: this.id,\n name: this.name,\n isCommand: false,\n disableSelection: true,\n hidden: function hidden() {\n return _this2.isHidden();\n },\n renderer: function renderer(hot, wrapper) {\n addClass(wrapper.parentNode, 'htFiltersMenuOperators');\n\n if (!wrapper.parentNode.hasAttribute('ghost-table')) {\n arrayEach(_this2.elements, function (ui) {\n return wrapper.appendChild(ui.element);\n });\n }\n\n return wrapper;\n }\n };\n }\n /**\n * Add RadioInputUI elements to component.\n *\n * @private\n */\n\n }, {\n key: \"buildOperatorsElement\",\n value: function buildOperatorsElement() {\n var _this3 = this;\n\n var operationKeys = [OPERATION_AND, OPERATION_OR];\n arrayEach(operationKeys, function (operation) {\n var radioInput = new RadioInputUI(_this3.hot, {\n name: 'operator',\n label: {\n htmlFor: operation,\n textContent: getOperationName(operation)\n },\n value: operation,\n checked: operation === operationKeys[SELECTED_AT_START_ELEMENT_INDEX],\n id: operation\n });\n radioInput.addLocalHook('change', function (event) {\n return _this3.onRadioInputChange(event);\n });\n\n _this3.elements.push(radioInput);\n });\n }\n /**\n * Set state of operators component to check radio input at specific `index`.\n *\n * @param {number} searchedIndex Index of radio input to check.\n */\n\n }, {\n key: \"setChecked\",\n value: function setChecked(searchedIndex) {\n if (this.elements.length < searchedIndex) {\n throw Error(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Radio button with index \", \" doesn't exist.\"])), searchedIndex));\n }\n\n arrayEach(this.elements, function (element, index) {\n element.setChecked(index === searchedIndex);\n });\n }\n /**\n * Get `id` of active operator.\n *\n * @returns {string}\n */\n\n }, {\n key: \"getActiveOperationId\",\n value: function getActiveOperationId() {\n var operationElement = this.elements.find(function (element) {\n return element instanceof RadioInputUI && element.isChecked();\n });\n\n if (operationElement) {\n return operationElement.getValue();\n }\n\n return OPERATION_AND;\n }\n /**\n * Export state of the component (get selected operator).\n *\n * @returns {string} Returns `id` of selected operator.\n */\n\n }, {\n key: \"getState\",\n value: function getState() {\n return this.getActiveOperationId();\n }\n /**\n * Set state of the component.\n *\n * @param {object} value State to restore.\n */\n\n }, {\n key: \"setState\",\n value: function setState(value) {\n this.reset();\n\n if (value && this.getActiveOperationId() !== value) {\n arrayEach(this.elements, function (element) {\n element.setChecked(element.getValue() === value);\n });\n }\n }\n /**\n * Update state of component.\n *\n * @param {string} [operationId='conjunction'] Id of selected operation.\n * @param {number} column Physical column index.\n */\n\n }, {\n key: \"updateState\",\n value: function updateState() {\n var operationId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : OPERATION_AND;\n var column = arguments.length > 1 ? arguments[1] : undefined;\n var selectedOperationId = operationId;\n\n if (selectedOperationId === OPERATION_OR_THEN_VARIABLE) {\n selectedOperationId = OPERATION_OR;\n }\n\n this.state.setValueAtIndex(column, selectedOperationId);\n }\n /**\n * Reset elements to their initial state.\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n this.setChecked(SELECTED_AT_START_ELEMENT_INDEX);\n }\n /**\n * OnChange listener.\n *\n * @private\n * @param {Event} event The DOM event object.\n */\n\n }, {\n key: \"onRadioInputChange\",\n value: function onRadioInputChange(event) {\n this.setState(event.target.value);\n }\n }]);\n\n return OperatorsComponent;\n}(BaseComponent);\n\nexport default OperatorsComponent;","import \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { getComparisonFunction } from \"../../helpers/feature.mjs\";\nimport { arrayUnique, arrayEach } from \"../../helpers/array.mjs\";\nvar sortCompare = getComparisonFunction();\n/**\n * Comparison function for sorting purposes.\n *\n * @param {*} a The first value to compare.\n * @param {*} b The second value to compare.\n * @returns {number} Returns number from -1 to 1.\n */\n\nexport function sortComparison(a, b) {\n if (typeof a === 'number' && typeof b === 'number') {\n return a - b;\n }\n\n return sortCompare(a, b);\n}\n/**\n * Convert raw value into visual value.\n *\n * @param {*} value The value to convert.\n * @param {string} defaultEmptyValue Default value for empty cells.\n * @returns {*}\n */\n\nexport function toVisualValue(value, defaultEmptyValue) {\n var visualValue = value;\n\n if (visualValue === '') {\n visualValue = \"(\".concat(defaultEmptyValue, \")\");\n }\n\n return visualValue;\n}\nvar SUPPORT_SET_CONSTRUCTOR = new Set([1]).has(1);\nvar SUPPORT_FAST_DEDUPE = SUPPORT_SET_CONSTRUCTOR && typeof Array.from === 'function';\n/**\n * Create an array assertion to compare if an element exists in that array (in a more efficient way than .indexOf).\n *\n * @param {Array} initialData Values to compare.\n * @returns {Function}\n */\n\nexport function createArrayAssertion(initialData) {\n var dataset = initialData;\n\n if (SUPPORT_SET_CONSTRUCTOR) {\n dataset = new Set(dataset);\n }\n\n return function (value) {\n var result;\n\n if (SUPPORT_SET_CONSTRUCTOR) {\n result = dataset.has(value);\n } else {\n /* eslint-disable no-bitwise */\n result = !!~dataset.indexOf(value);\n }\n\n return result;\n };\n}\n/**\n * Convert empty-ish values like null and undefined to an empty string.\n *\n * @param {*} value Value to check.\n * @returns {string}\n */\n\nexport function toEmptyString(value) {\n return value === null || value === void 0 ? '' : value;\n}\n/**\n * Unify column values (replace `null` and `undefined` values into empty string, unique values and sort them).\n *\n * @param {Array} values An array of values.\n * @returns {Array}\n */\n\nexport function unifyColumnValues(values) {\n var unifiedValues = values;\n\n if (SUPPORT_FAST_DEDUPE) {\n unifiedValues = Array.from(new Set(unifiedValues));\n } else {\n unifiedValues = arrayUnique(unifiedValues);\n }\n\n unifiedValues = unifiedValues.sort(function (a, b) {\n if (typeof a === 'number' && typeof b === 'number') {\n return a - b;\n }\n\n if (a === b) {\n return 0;\n }\n\n return a > b ? 1 : -1;\n });\n return unifiedValues;\n}\n/**\n * Intersect 'base' values with 'selected' values and return an array of object.\n *\n * @param {Array} base An array of base values.\n * @param {Array} selected An array of selected values.\n * @param {string} defaultEmptyValue Default value for empty cells.\n * @param {Function} [callback] A callback function which is invoked for every item in an array.\n * @returns {Array}\n */\n\nexport function intersectValues(base, selected, defaultEmptyValue, callback) {\n var result = [];\n var same = base === selected;\n var selectedItemsAssertion;\n\n if (!same) {\n selectedItemsAssertion = createArrayAssertion(selected);\n }\n\n arrayEach(base, function (value) {\n var checked = false;\n\n if (same || selectedItemsAssertion(value)) {\n checked = true;\n }\n\n var item = {\n checked: checked,\n value: value,\n visualValue: toVisualValue(value, defaultEmptyValue)\n };\n\n if (callback) {\n callback(item);\n }\n\n result.push(item);\n });\n return result;\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.string.link.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { clone, extend } from \"../../../helpers/object.mjs\";\nimport BaseUI from \"./_base.mjs\";\nvar privatePool = new WeakMap();\n/**\n * @class LinkUI\n * @util\n */\n\nvar LinkUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(LinkUI, _BaseUI);\n\n var _super = _createSuper(LinkUI);\n\n function LinkUI(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, LinkUI);\n\n _this = _super.call(this, hotInstance, extend(LinkUI.DEFAULTS, options));\n privatePool.set(_assertThisInitialized(_this), {});\n return _this;\n }\n /**\n * Build DOM structure.\n */\n\n\n _createClass(LinkUI, [{\n key: \"build\",\n value: function build() {\n _get(_getPrototypeOf(LinkUI.prototype), \"build\", this).call(this);\n\n var priv = privatePool.get(this);\n priv.link = this._element.firstChild;\n }\n /**\n * Update element.\n */\n\n }, {\n key: \"update\",\n value: function update() {\n if (!this.isBuilt()) {\n return;\n }\n\n privatePool.get(this).link.textContent = this.translateIfPossible(this.options.textContent);\n }\n }], [{\n key: \"DEFAULTS\",\n get: function get() {\n return clone({\n href: '#',\n tagName: 'a'\n });\n }\n }]);\n\n return LinkUI;\n}(BaseUI);\n\nexport default LinkUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass, getScrollbarWidth } from \"../../../helpers/dom/element.mjs\";\nimport { clone, extend } from \"../../../helpers/object.mjs\";\nimport { arrayFilter, arrayMap, arrayEach } from \"../../../helpers/array.mjs\";\nimport { isKey } from \"../../../helpers/unicode.mjs\";\nimport { partial } from \"../../../helpers/function.mjs\";\nimport { dataRowToChangesArray } from \"../../../helpers/data.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { stopImmediatePropagation } from \"../../../helpers/dom/event.mjs\";\nimport BaseUI from \"./_base.mjs\";\nimport InputUI from \"./input.mjs\";\nimport LinkUI from \"./link.mjs\";\nimport { createArrayAssertion } from \"../utils.mjs\";\nvar privatePool = new WeakMap();\n/**\n * @class MultipleSelectUI\n * @util\n */\n\nvar MultipleSelectUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(MultipleSelectUI, _BaseUI);\n\n var _super = _createSuper(MultipleSelectUI);\n\n function MultipleSelectUI(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, MultipleSelectUI);\n\n _this = _super.call(this, hotInstance, extend(MultipleSelectUI.DEFAULTS, options));\n privatePool.set(_assertThisInitialized(_this), {});\n /**\n * Input element.\n *\n * @type {InputUI}\n */\n\n _this.searchInput = new InputUI(_this.hot, {\n placeholder: C.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,\n className: 'htUIMultipleSelectSearch'\n });\n /**\n * \"Select all\" UI element.\n *\n * @type {BaseUI}\n */\n\n _this.selectAllUI = new LinkUI(_this.hot, {\n textContent: C.FILTERS_BUTTONS_SELECT_ALL,\n className: 'htUISelectAll'\n });\n /**\n * \"Clear\" UI element.\n *\n * @type {BaseUI}\n */\n\n _this.clearAllUI = new LinkUI(_this.hot, {\n textContent: C.FILTERS_BUTTONS_CLEAR,\n className: 'htUIClearAll'\n });\n /**\n * List of available select options.\n *\n * @type {Array}\n */\n\n _this.items = [];\n /**\n * Handsontable instance used as items list element.\n *\n * @type {Handsontable}\n */\n\n _this.itemsBox = null;\n\n _this.registerHooks();\n\n return _this;\n }\n /**\n * Register all necessary hooks.\n */\n\n\n _createClass(MultipleSelectUI, [{\n key: \"registerHooks\",\n value: function registerHooks() {\n var _this2 = this;\n\n this.searchInput.addLocalHook('keydown', function (event) {\n return _this2.onInputKeyDown(event);\n });\n this.searchInput.addLocalHook('input', function (event) {\n return _this2.onInput(event);\n });\n this.selectAllUI.addLocalHook('click', function (event) {\n return _this2.onSelectAllClick(event);\n });\n this.clearAllUI.addLocalHook('click', function (event) {\n return _this2.onClearAllClick(event);\n });\n }\n /**\n * Set available options.\n *\n * @param {Array} items Array of objects with `checked` and `label` property.\n */\n\n }, {\n key: \"setItems\",\n value: function setItems(items) {\n this.items = items;\n\n if (this.itemsBox) {\n this.itemsBox.loadData(this.items);\n }\n }\n /**\n * Get all available options.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getItems\",\n value: function getItems() {\n return _toConsumableArray(this.items);\n }\n /**\n * Get element value.\n *\n * @returns {Array} Array of selected values.\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n return itemsToValue(this.items);\n }\n /**\n * Check if all values listed in element are selected.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isSelectedAllValues\",\n value: function isSelectedAllValues() {\n return this.items.length === this.getValue().length;\n }\n /**\n * Build DOM structure.\n */\n\n }, {\n key: \"build\",\n value: function build() {\n var _this3 = this;\n\n _get(_getPrototypeOf(MultipleSelectUI.prototype), \"build\", this).call(this);\n\n var rootDocument = this.hot.rootDocument;\n var itemsBoxWrapper = rootDocument.createElement('div');\n var selectionControl = new BaseUI(this.hot, {\n className: 'htUISelectionControls',\n children: [this.selectAllUI, this.clearAllUI]\n });\n\n this._element.appendChild(this.searchInput.element);\n\n this._element.appendChild(selectionControl.element);\n\n this._element.appendChild(itemsBoxWrapper);\n\n var hotInitializer = function hotInitializer(wrapper) {\n if (!_this3._element) {\n return;\n }\n\n if (_this3.itemsBox) {\n _this3.itemsBox.destroy();\n }\n\n addClass(wrapper, 'htUIMultipleSelectHot'); // Construct and initialise a new Handsontable\n\n _this3.itemsBox = new _this3.hot.constructor(wrapper, {\n data: _this3.items,\n columns: [{\n data: 'checked',\n type: 'checkbox',\n label: {\n property: 'visualValue',\n position: 'after'\n }\n }],\n beforeRenderer: function beforeRenderer(TD, row, col, prop, value, cellProperties) {\n TD.title = cellProperties.instance.getDataAtRowProp(row, cellProperties.label.property);\n },\n maxCols: 1,\n autoWrapCol: true,\n height: 110,\n // Workaround for #151.\n colWidths: function colWidths() {\n return _this3.itemsBox.container.scrollWidth - getScrollbarWidth(rootDocument);\n },\n copyPaste: false,\n disableVisualSelection: 'area',\n fillHandle: false,\n fragmentSelection: 'cell',\n tabMoves: {\n row: 1,\n col: 0\n },\n beforeKeyDown: function beforeKeyDown(event) {\n return _this3.onItemsBoxBeforeKeyDown(event);\n }\n });\n\n _this3.itemsBox.init();\n };\n\n hotInitializer(itemsBoxWrapper);\n setTimeout(function () {\n return hotInitializer(itemsBoxWrapper);\n }, 100);\n }\n /**\n * Reset DOM structure.\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n this.searchInput.reset();\n this.selectAllUI.reset();\n this.clearAllUI.reset();\n }\n /**\n * Update DOM structure.\n */\n\n }, {\n key: \"update\",\n value: function update() {\n if (!this.isBuilt()) {\n return;\n }\n\n this.itemsBox.loadData(valueToItems(this.items, this.options.value));\n\n _get(_getPrototypeOf(MultipleSelectUI.prototype), \"update\", this).call(this);\n }\n /**\n * Destroy instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.itemsBox) {\n this.itemsBox.destroy();\n }\n\n this.searchInput.destroy();\n this.clearAllUI.destroy();\n this.selectAllUI.destroy();\n this.searchInput = null;\n this.clearAllUI = null;\n this.selectAllUI = null;\n this.itemsBox = null;\n this.items = null;\n\n _get(_getPrototypeOf(MultipleSelectUI.prototype), \"destroy\", this).call(this);\n }\n /**\n * 'input' event listener for input element.\n *\n * @private\n * @param {Event} event DOM event.\n */\n\n }, {\n key: \"onInput\",\n value: function onInput(event) {\n var value = event.target.value.toLowerCase();\n var filteredItems;\n\n if (value === '') {\n filteredItems = _toConsumableArray(this.items);\n } else {\n filteredItems = arrayFilter(this.items, function (item) {\n return \"\".concat(item.value).toLowerCase().indexOf(value) >= 0;\n });\n }\n\n this.itemsBox.loadData(filteredItems);\n }\n /**\n * 'keydown' event listener for input element.\n *\n * @private\n * @param {Event} event DOM event.\n */\n\n }, {\n key: \"onInputKeyDown\",\n value: function onInputKeyDown(event) {\n this.runLocalHooks('keydown', event, this);\n var isKeyCode = partial(isKey, event.keyCode);\n\n if (isKeyCode('ARROW_DOWN|TAB') && !this.itemsBox.isListening()) {\n stopImmediatePropagation(event);\n this.itemsBox.listen();\n this.itemsBox.selectCell(0, 0);\n }\n }\n /**\n * On before key down listener (internal Handsontable).\n *\n * @private\n * @param {Event} event DOM event.\n */\n\n }, {\n key: \"onItemsBoxBeforeKeyDown\",\n value: function onItemsBoxBeforeKeyDown(event) {\n var isKeyCode = partial(isKey, event.keyCode);\n\n if (isKeyCode('ESCAPE')) {\n this.runLocalHooks('keydown', event, this);\n } // for keys different than below, unfocus Handsontable and focus search input\n\n\n if (!isKeyCode('ARROW_UP|ARROW_DOWN|ARROW_LEFT|ARROW_RIGHT|TAB|SPACE|ENTER')) {\n stopImmediatePropagation(event);\n this.itemsBox.unlisten();\n this.itemsBox.deselectCell();\n this.searchInput.focus();\n }\n }\n /**\n * On click listener for \"Select all\" link.\n *\n * @private\n * @param {DOMEvent} event The mouse event object.\n */\n\n }, {\n key: \"onSelectAllClick\",\n value: function onSelectAllClick(event) {\n var changes = [];\n event.preventDefault();\n arrayEach(this.itemsBox.getSourceData(), function (row, rowIndex) {\n row.checked = true;\n changes.push(dataRowToChangesArray(row, rowIndex)[0]);\n });\n this.itemsBox.setSourceDataAtCell(changes);\n }\n /**\n * On click listener for \"Clear\" link.\n *\n * @private\n * @param {DOMEvent} event The mouse event object.\n */\n\n }, {\n key: \"onClearAllClick\",\n value: function onClearAllClick(event) {\n var changes = [];\n event.preventDefault();\n arrayEach(this.itemsBox.getSourceData(), function (row, rowIndex) {\n row.checked = false;\n changes.push(dataRowToChangesArray(row, rowIndex)[0]);\n });\n this.itemsBox.setSourceDataAtCell(changes);\n }\n }], [{\n key: \"DEFAULTS\",\n get: function get() {\n return clone({\n className: 'htUIMultipleSelect',\n value: []\n });\n }\n }]);\n\n return MultipleSelectUI;\n}(BaseUI);\n\nexport default MultipleSelectUI;\n/**\n * Pick up object items based on selected values.\n *\n * @param {Array} availableItems Base collection to compare values.\n * @param {Array} selectedValue Flat array with selected values.\n * @returns {Array}\n */\n\nfunction valueToItems(availableItems, selectedValue) {\n var arrayAssertion = createArrayAssertion(selectedValue);\n return arrayMap(availableItems, function (item) {\n item.checked = arrayAssertion(item.value);\n return item;\n });\n}\n/**\n * Convert all checked items into flat array.\n *\n * @param {Array} availableItems Base collection.\n * @returns {Array}\n */\n\n\nfunction itemsToValue(availableItems) {\n var items = [];\n arrayEach(availableItems, function (item) {\n if (item.checked) {\n items.push(item.value);\n }\n });\n return items;\n}","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport { registerCondition } from \"../conditionRegisterer.mjs\";\nimport { createArrayAssertion } from \"../utils.mjs\";\nexport var CONDITION_NAME = 'by_value';\n/**\n * @param {object} dataRow The object which holds and describes the single cell value.\n * @param {Array} inputValues An array of values to compare with.\n * @returns {boolean}\n */\n\nexport function condition(dataRow, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n value = _ref2[0];\n\n return value(dataRow.value);\n}\nregisterCondition(CONDITION_NAME, condition, {\n name: 'By value',\n inputsCount: 0,\n inputValuesDecorator: function inputValuesDecorator(_ref3) {\n var _ref4 = _slicedToArray(_ref3, 1),\n data = _ref4[0];\n\n return [createArrayAssertion(data)];\n },\n showOperators: false\n});","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.function.name.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nimport { stopImmediatePropagation } from \"../../../helpers/dom/event.mjs\";\nimport { arrayEach, arrayFilter, arrayMap } from \"../../../helpers/array.mjs\";\nimport { isKey } from \"../../../helpers/unicode.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport { unifyColumnValues, intersectValues, toEmptyString } from \"../utils.mjs\";\nimport BaseComponent from \"./_base.mjs\";\nimport MultipleSelectUI from \"../ui/multipleSelect.mjs\";\nimport { CONDITION_BY_VALUE, CONDITION_NONE } from \"../constants.mjs\";\nimport { getConditionDescriptor } from \"../conditionRegisterer.mjs\";\n/**\n * @class ValueComponent\n * @plugin Filters\n */\n\nvar ValueComponent = /*#__PURE__*/function (_BaseComponent) {\n _inherits(ValueComponent, _BaseComponent);\n\n var _super = _createSuper(ValueComponent);\n\n function ValueComponent(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, ValueComponent);\n\n _this = _super.call(this, hotInstance, {\n id: options.id,\n stateless: false\n });\n _this.name = options.name;\n\n _this.elements.push(new MultipleSelectUI(_this.hot));\n\n _this.registerHooks();\n\n return _this;\n }\n /**\n * Register all necessary hooks.\n *\n * @private\n */\n\n\n _createClass(ValueComponent, [{\n key: \"registerHooks\",\n value: function registerHooks() {\n var _this2 = this;\n\n this.getMultipleSelectElement().addLocalHook('keydown', function (event) {\n return _this2.onInputKeyDown(event);\n });\n }\n /**\n * Set state of the component.\n *\n * @param {object} value The component value.\n */\n\n }, {\n key: \"setState\",\n value: function setState(value) {\n this.reset();\n\n if (value && value.command.key === CONDITION_BY_VALUE) {\n var select = this.getMultipleSelectElement();\n select.setItems(value.itemsSnapshot);\n select.setValue(value.args[0]);\n }\n }\n /**\n * Export state of the component (get selected filter and filter arguments).\n *\n * @returns {object} Returns object where `command` key keeps used condition filter and `args` key its arguments.\n */\n\n }, {\n key: \"getState\",\n value: function getState() {\n var select = this.getMultipleSelectElement();\n var availableItems = select.getItems();\n return {\n command: {\n key: select.isSelectedAllValues() || !availableItems.length ? CONDITION_NONE : CONDITION_BY_VALUE\n },\n args: [select.getValue()],\n itemsSnapshot: availableItems\n };\n }\n /**\n * Update state of component.\n *\n * @param {object} stateInfo Information about state containing stack of edited column,\n * stack of dependent conditions, data factory and optional condition arguments change. It's described by object containing keys:\n * `editedConditionStack`, `dependentConditionStacks`, `visibleDataFactory` and `conditionArgsChange`.\n */\n\n }, {\n key: \"updateState\",\n value: function updateState(stateInfo) {\n var _this3 = this;\n\n var updateColumnState = function updateColumnState(physicalColumn, conditions, conditionArgsChange, filteredRowsFactory, conditionsStack) {\n var _arrayFilter = arrayFilter(conditions, function (condition) {\n return condition.name === CONDITION_BY_VALUE;\n }),\n _arrayFilter2 = _slicedToArray(_arrayFilter, 1),\n firstByValueCondition = _arrayFilter2[0];\n\n var state = {};\n\n var defaultBlankCellValue = _this3.hot.getTranslatedPhrase(C.FILTERS_VALUES_BLANK_CELLS);\n\n if (firstByValueCondition) {\n var rowValues = unifyColumnValues(arrayMap(filteredRowsFactory(physicalColumn, conditionsStack), function (row) {\n return row.value;\n }));\n\n if (conditionArgsChange) {\n firstByValueCondition.args[0] = conditionArgsChange;\n }\n\n var selectedValues = [];\n var itemsSnapshot = intersectValues(rowValues, firstByValueCondition.args[0], defaultBlankCellValue, function (item) {\n if (item.checked) {\n selectedValues.push(item.value);\n }\n });\n state.args = [selectedValues];\n state.command = getConditionDescriptor(CONDITION_BY_VALUE);\n state.itemsSnapshot = itemsSnapshot;\n } else {\n state.args = [];\n state.command = getConditionDescriptor(CONDITION_NONE);\n }\n\n _this3.state.setValueAtIndex(physicalColumn, state);\n };\n\n updateColumnState(stateInfo.editedConditionStack.column, stateInfo.editedConditionStack.conditions, stateInfo.conditionArgsChange, stateInfo.filteredRowsFactory); // Update the next \"by_value\" component (filter column conditions added after this condition).\n // Its list of values has to be updated. As the new values by default are unchecked,\n // the further component update is unnecessary.\n\n if (stateInfo.dependentConditionStacks.length) {\n updateColumnState(stateInfo.dependentConditionStacks[0].column, stateInfo.dependentConditionStacks[0].conditions, stateInfo.conditionArgsChange, stateInfo.filteredRowsFactory, stateInfo.editedConditionStack);\n }\n }\n /**\n * Get multiple select element.\n *\n * @returns {MultipleSelectUI}\n */\n\n }, {\n key: \"getMultipleSelectElement\",\n value: function getMultipleSelectElement() {\n return this.elements.filter(function (element) {\n return element instanceof MultipleSelectUI;\n })[0];\n }\n /**\n * Get object descriptor for menu item entry.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getMenuItemDescriptor\",\n value: function getMenuItemDescriptor() {\n var _this4 = this;\n\n return {\n key: this.id,\n name: this.name,\n isCommand: false,\n disableSelection: true,\n hidden: function hidden() {\n return _this4.isHidden();\n },\n renderer: function renderer(hot, wrapper, row, col, prop, value) {\n addClass(wrapper.parentNode, 'htFiltersMenuValue');\n\n var label = _this4.hot.rootDocument.createElement('div');\n\n addClass(label, 'htFiltersMenuLabel');\n label.textContent = value;\n wrapper.appendChild(label);\n\n if (!wrapper.parentNode.hasAttribute('ghost-table')) {\n arrayEach(_this4.elements, function (ui) {\n return wrapper.appendChild(ui.element);\n });\n }\n\n return wrapper;\n }\n };\n }\n /**\n * Reset elements to their initial state.\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n var defaultBlankCellValue = this.hot.getTranslatedPhrase(C.FILTERS_VALUES_BLANK_CELLS);\n var values = unifyColumnValues(this._getColumnVisibleValues());\n var items = intersectValues(values, values, defaultBlankCellValue);\n this.getMultipleSelectElement().setItems(items);\n\n _get(_getPrototypeOf(ValueComponent.prototype), \"reset\", this).call(this);\n\n this.getMultipleSelectElement().setValue(values);\n }\n /**\n * Key down listener.\n *\n * @private\n * @param {Event} event The DOM event object.\n */\n\n }, {\n key: \"onInputKeyDown\",\n value: function onInputKeyDown(event) {\n if (isKey(event.keyCode, 'ESCAPE')) {\n this.runLocalHooks('cancel');\n stopImmediatePropagation(event);\n }\n }\n /**\n * Get data for currently selected column.\n *\n * @returns {Array}\n * @private\n */\n\n }, {\n key: \"_getColumnVisibleValues\",\n value: function _getColumnVisibleValues() {\n var lastSelectedColumn = this.hot.getPlugin('filters').getSelectedColumn();\n var visualIndex = lastSelectedColumn && lastSelectedColumn.visualIndex;\n return arrayMap(this.hot.getDataAtCol(visualIndex), function (v) {\n return toEmptyString(v);\n });\n }\n }]);\n\n return ValueComponent;\n}(BaseComponent);\n\nexport default ValueComponent;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.function.name.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport BaseComponent from \"./_base.mjs\";\nimport InputUI from \"../ui/input.mjs\";\n/**\n * @class ActionBarComponent\n * @plugin Filters\n */\n\nvar ActionBarComponent = /*#__PURE__*/function (_BaseComponent) {\n _inherits(ActionBarComponent, _BaseComponent);\n\n var _super = _createSuper(ActionBarComponent);\n\n function ActionBarComponent(hotInstance, options) {\n var _this;\n\n _classCallCheck(this, ActionBarComponent);\n\n _this = _super.call(this, hotInstance, {\n id: options.id,\n stateless: true\n });\n _this.name = options.name;\n\n _this.elements.push(new InputUI(_this.hot, {\n type: 'button',\n value: C.FILTERS_BUTTONS_OK,\n className: 'htUIButton htUIButtonOK',\n identifier: ActionBarComponent.BUTTON_OK\n }));\n\n _this.elements.push(new InputUI(_this.hot, {\n type: 'button',\n value: C.FILTERS_BUTTONS_CANCEL,\n className: 'htUIButton htUIButtonCancel',\n identifier: ActionBarComponent.BUTTON_CANCEL\n }));\n\n _this.registerHooks();\n\n return _this;\n }\n /**\n * Register all necessary hooks.\n *\n * @private\n */\n\n\n _createClass(ActionBarComponent, [{\n key: \"registerHooks\",\n value: function registerHooks() {\n var _this2 = this;\n\n arrayEach(this.elements, function (element) {\n element.addLocalHook('click', function (event, button) {\n return _this2.onButtonClick(event, button);\n });\n });\n }\n /**\n * Get menu object descriptor.\n *\n * @returns {object}\n */\n\n }, {\n key: \"getMenuItemDescriptor\",\n value: function getMenuItemDescriptor() {\n var _this3 = this;\n\n return {\n key: this.id,\n name: this.name,\n isCommand: false,\n disableSelection: true,\n hidden: function hidden() {\n return _this3.isHidden();\n },\n renderer: function renderer(hot, wrapper) {\n addClass(wrapper.parentNode, 'htFiltersMenuActionBar');\n\n if (!wrapper.parentNode.hasAttribute('ghost-table')) {\n arrayEach(_this3.elements, function (ui) {\n return wrapper.appendChild(ui.element);\n });\n }\n\n return wrapper;\n }\n };\n }\n /**\n * Fire accept event.\n */\n\n }, {\n key: \"accept\",\n value: function accept() {\n this.runLocalHooks('accept');\n }\n /**\n * Fire cancel event.\n */\n\n }, {\n key: \"cancel\",\n value: function cancel() {\n this.runLocalHooks('cancel');\n }\n /**\n * On button click listener.\n *\n * @private\n * @param {Event} event DOM event.\n * @param {InputUI} button InputUI object.\n */\n\n }, {\n key: \"onButtonClick\",\n value: function onButtonClick(event, button) {\n if (button.options.identifier === ActionBarComponent.BUTTON_OK) {\n this.accept();\n } else {\n this.cancel();\n }\n }\n }], [{\n key: \"BUTTON_OK\",\n get: function get() {\n return 'ok';\n }\n }, {\n key: \"BUTTON_CANCEL\",\n get: function get() {\n return 'cancel';\n }\n }]);\n\n return ActionBarComponent;\n}(BaseComponent);\n\nexport default ActionBarComponent;","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.function.name.js\";\n\nvar _templateObject, _templateObject2;\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach, arrayMap, arrayReduce } from \"../../helpers/array.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport { toSingleLine } from \"../../helpers/templateLiteralTag.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nimport { getCondition } from \"./conditionRegisterer.mjs\";\nimport { OPERATION_ID as OPERATION_AND } from \"./logicalOperations/conjunction.mjs\";\nimport { operations, getOperationFunc } from \"./logicalOperationRegisterer.mjs\";\nimport { isUndefined } from \"../../helpers/mixed.mjs\";\nimport { LinkedPhysicalIndexToValueMap as IndexToValueMap } from \"../../translations/index.mjs\";\nvar MAP_NAME = 'ConditionCollection.filteringStates';\n/**\n * @class ConditionCollection\n * @plugin Filters\n */\n\nvar ConditionCollection = /*#__PURE__*/function () {\n function ConditionCollection(hot) {\n var isMapRegistrable = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n _classCallCheck(this, ConditionCollection);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hot;\n /**\n * Indicates whether the internal IndexMap should be registered or not. Generally,\n * registered Maps responds to the index changes. Within that collection, sometimes\n * this is not necessary.\n *\n * @type {boolean}\n */\n\n this.isMapRegistrable = isMapRegistrable;\n /**\n * Index map storing filtering states for every column. ConditionCollection write and read to/from this element.\n *\n * @type {LinkedPhysicalIndexToValueMap}\n */\n\n this.filteringStates = new IndexToValueMap();\n\n if (this.isMapRegistrable === true) {\n this.hot.columnIndexMapper.registerMap(MAP_NAME, this.filteringStates);\n } else {\n this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes());\n }\n }\n /**\n * Check if condition collection is empty (so no needed to filter data).\n *\n * @returns {boolean}\n */\n\n\n _createClass(ConditionCollection, [{\n key: \"isEmpty\",\n value: function isEmpty() {\n return this.getFilteredColumns().length === 0;\n }\n /**\n * Check if value is matched to the criteria of conditions chain.\n *\n * @param {object} value Object with `value` and `meta` keys.\n * @param {number} column The physical column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isMatch\",\n value: function isMatch(value, column) {\n var _stateForColumn$condi;\n\n var stateForColumn = this.filteringStates.getValueAtIndex(column);\n var conditions = (_stateForColumn$condi = stateForColumn === null || stateForColumn === void 0 ? void 0 : stateForColumn.conditions) !== null && _stateForColumn$condi !== void 0 ? _stateForColumn$condi : [];\n var operation = stateForColumn === null || stateForColumn === void 0 ? void 0 : stateForColumn.operation;\n return this.isMatchInConditions(conditions, value, operation);\n }\n /**\n * Check if the value is matches the conditions.\n *\n * @param {Array} conditions List of conditions.\n * @param {object} value Object with `value` and `meta` keys.\n * @param {string} [operationType='conjunction'] Type of conditions operation.\n * @returns {boolean}\n */\n\n }, {\n key: \"isMatchInConditions\",\n value: function isMatchInConditions(conditions, value) {\n var operationType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : OPERATION_AND;\n\n if (conditions.length) {\n return getOperationFunc(operationType)(conditions, value);\n }\n\n return true;\n }\n /**\n * Add condition to the collection.\n *\n * @param {number} column The physical column index.\n * @param {object} conditionDefinition Object with keys:\n * * `command` Object, Command object with condition name as `key` property.\n * * `args` Array, Condition arguments.\n * @param {string} [operation='conjunction'] Type of conditions operation.\n * @param {number} [position] Position to which condition will be added. When argument is undefined\n * the condition will be processed as the last condition.\n * @fires ConditionCollection#beforeAdd\n * @fires ConditionCollection#afterAdd\n */\n\n }, {\n key: \"addCondition\",\n value: function addCondition(column, conditionDefinition) {\n var operation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : OPERATION_AND;\n var position = arguments.length > 3 ? arguments[3] : undefined;\n var args = arrayMap(conditionDefinition.args, function (v) {\n return typeof v === 'string' ? v.toLowerCase() : v;\n });\n var name = conditionDefinition.name || conditionDefinition.command.key;\n this.runLocalHooks('beforeAdd', column);\n var columnType = this.getOperation(column);\n\n if (columnType) {\n if (columnType !== operation) {\n throw Error(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"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 \\\\`\", \"\\\\`\\\\x20\\n filter operation. Use \\\\`removeConditions\\\\` to clear the current conditions and then add new ones.\\\\x20\\n Mind that you cannot mix different types of operations (for instance, if you use \\\\`conjunction\\\\`,\\\\x20\\n use it consequently for a particular column).\"])), column, columnType));\n }\n } else if (isUndefined(operations[operation])) {\n throw new Error(toSingleLine(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"Unexpected operation named `\", \"`. Possible ones are \\n `disjunction` and `conjunction`.\"], [\"Unexpected operation named \\\\`\", \"\\\\`. Possible ones are\\\\x20\\n \\\\`disjunction\\\\` and \\\\`conjunction\\\\`.\"])), operation));\n }\n\n var conditionsForColumn = this.getConditions(column);\n\n if (conditionsForColumn.length === 0) {\n // Create first condition for particular column.\n this.filteringStates.setValueAtIndex(column, {\n operation: operation,\n conditions: [{\n name: name,\n args: args,\n func: getCondition(name, args)\n }]\n }, position);\n } else {\n // Add next condition for particular column (by reference).\n conditionsForColumn.push({\n name: name,\n args: args,\n func: getCondition(name, args)\n });\n }\n\n this.runLocalHooks('afterAdd', column);\n }\n /**\n * Get all added conditions from the collection at specified column index.\n *\n * @param {number} column The physical column index.\n * @returns {Array} Returns conditions collection as an array.\n */\n\n }, {\n key: \"getConditions\",\n value: function getConditions(column) {\n var _this$filteringStates, _this$filteringStates2;\n\n return (_this$filteringStates = (_this$filteringStates2 = this.filteringStates.getValueAtIndex(column)) === null || _this$filteringStates2 === void 0 ? void 0 : _this$filteringStates2.conditions) !== null && _this$filteringStates !== void 0 ? _this$filteringStates : [];\n }\n /**\n * Get operation for particular column.\n *\n * @param {number} column The physical column index.\n * @returns {string|undefined}\n */\n\n }, {\n key: \"getOperation\",\n value: function getOperation(column) {\n var _this$filteringStates3;\n\n return (_this$filteringStates3 = this.filteringStates.getValueAtIndex(column)) === null || _this$filteringStates3 === void 0 ? void 0 : _this$filteringStates3.operation;\n }\n /**\n * Get all filtered physical columns in the order in which actions are performed.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getFilteredColumns\",\n value: function getFilteredColumns() {\n return this.filteringStates.getEntries().map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n physicalColumn = _ref2[0];\n\n return physicalColumn;\n });\n }\n /**\n * Gets position in the filtering states stack for the specific column.\n *\n * @param {number} column The physical column index.\n * @returns {number} Returns -1 when the column doesn't exist in the stack.\n */\n\n }, {\n key: \"getColumnStackPosition\",\n value: function getColumnStackPosition(column) {\n return this.getFilteredColumns().indexOf(column);\n }\n /**\n * Export all previously added conditions.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"exportAllConditions\",\n value: function exportAllConditions() {\n return arrayReduce(this.filteringStates.getEntries(), function (allConditions, _ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n column = _ref4[0],\n _ref4$ = _ref4[1],\n operation = _ref4$.operation,\n conditions = _ref4$.conditions;\n\n allConditions.push({\n column: column,\n operation: operation,\n conditions: arrayMap(conditions, function (_ref5) {\n var name = _ref5.name,\n args = _ref5.args;\n return {\n name: name,\n args: args\n };\n })\n });\n return allConditions;\n }, []);\n }\n /**\n * Import conditions to the collection.\n *\n * @param {Array} conditions The collection of the conditions.\n */\n\n }, {\n key: \"importAllConditions\",\n value: function importAllConditions(conditions) {\n var _this = this;\n\n this.clean();\n arrayEach(conditions, function (stack) {\n arrayEach(stack.conditions, function (condition) {\n return _this.addCondition(stack.column, condition);\n });\n });\n }\n /**\n * Remove conditions at given column index.\n *\n * @param {number} column The physical column index.\n * @fires ConditionCollection#beforeRemove\n * @fires ConditionCollection#afterRemove\n */\n\n }, {\n key: \"removeConditions\",\n value: function removeConditions(column) {\n this.runLocalHooks('beforeRemove', column);\n this.filteringStates.clearValue(column);\n this.runLocalHooks('afterRemove', column);\n }\n /**\n * Clean all conditions collection and reset order stack.\n *\n * @fires ConditionCollection#beforeClean\n * @fires ConditionCollection#afterClean\n */\n\n }, {\n key: \"clean\",\n value: function clean() {\n this.runLocalHooks('beforeClean');\n this.filteringStates.clear();\n this.runLocalHooks('afterClean');\n }\n /**\n * Check if at least one condition was added at specified column index. And if second parameter is passed then additionally\n * check if condition exists under its name.\n *\n * @param {number} column The physical column index.\n * @param {string} [name] Condition name.\n * @returns {boolean}\n */\n\n }, {\n key: \"hasConditions\",\n value: function hasConditions(column, name) {\n var conditions = this.getConditions(column);\n\n if (name) {\n return conditions.some(function (condition) {\n return condition.name === name;\n });\n }\n\n return conditions.length > 0;\n }\n /**\n * Destroy object.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.isMapRegistrable) {\n this.hot.columnIndexMapper.unregisterMap(MAP_NAME);\n }\n\n this.filteringStates = null;\n this.clearLocalHooks();\n }\n }]);\n\n return ConditionCollection;\n}();\n\nmixin(ConditionCollection, localHooks);\nexport default ConditionCollection;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach } from \"../../helpers/array.mjs\";\n/**\n * @class DataFilter\n * @plugin Filters\n */\n\nvar DataFilter = /*#__PURE__*/function () {\n function DataFilter(conditionCollection) {\n var columnDataFactory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {\n return [];\n };\n\n _classCallCheck(this, DataFilter);\n /**\n * Reference to the instance of {ConditionCollection}.\n *\n * @type {ConditionCollection}\n */\n\n\n this.conditionCollection = conditionCollection;\n /**\n * Function which provide source data factory for specified column.\n *\n * @type {Function}\n */\n\n this.columnDataFactory = columnDataFactory;\n }\n /**\n * Filter data based on the conditions collection.\n *\n * @returns {Array}\n */\n\n\n _createClass(DataFilter, [{\n key: \"filter\",\n value: function filter() {\n var _this = this;\n\n var filteredData = [];\n arrayEach(this.conditionCollection.getFilteredColumns(), function (physicalColumn, index) {\n var columnData = _this.columnDataFactory(physicalColumn);\n\n if (index) {\n columnData = _this._getIntersectData(columnData, filteredData);\n }\n\n filteredData = _this.filterByColumn(physicalColumn, columnData);\n });\n return filteredData;\n }\n /**\n * Filter data based on specified physical column index.\n *\n * @param {number} column The physical column index.\n * @param {Array} [dataSource] Data source as array of objects with `value` and `meta` keys (e.g. `{value: 'foo', meta: {}}`).\n * @returns {Array} Returns filtered data.\n */\n\n }, {\n key: \"filterByColumn\",\n value: function filterByColumn(column) {\n var _this2 = this;\n\n var dataSource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var filteredData = [];\n arrayEach(dataSource, function (dataRow) {\n if (dataRow !== void 0 && _this2.conditionCollection.isMatch(dataRow, column)) {\n filteredData.push(dataRow);\n }\n });\n return filteredData;\n }\n /**\n * Intersect data.\n *\n * @private\n * @param {Array} data The data to intersect.\n * @param {Array} needles The collection intersected rows with the data.\n * @returns {Array}\n */\n\n }, {\n key: \"_getIntersectData\",\n value: function _getIntersectData(data, needles) {\n var result = [];\n arrayEach(needles, function (needleRow) {\n var row = needleRow.meta.visualRow;\n\n if (data[row] !== void 0) {\n result[row] = data[row];\n }\n });\n return result;\n }\n }]);\n\n return DataFilter;\n}();\n\nexport default DataFilter;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.slice.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach, arrayMap, arrayFilter } from \"../../helpers/array.mjs\";\nimport { mixin, objectEach } from \"../../helpers/object.mjs\";\nimport { curry } from \"../../helpers/function.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nimport ConditionCollection from \"./conditionCollection.mjs\";\nimport DataFilter from \"./dataFilter.mjs\";\nimport { createArrayAssertion } from \"./utils.mjs\";\n/**\n * Class which is designed for observing changes in condition collection. When condition is changed by user at specified\n * column it's necessary to update all conditions defined after this edited one.\n *\n * Object fires `update` hook for every column conditions change.\n *\n * @class ConditionUpdateObserver\n * @plugin Filters\n */\n\nvar ConditionUpdateObserver = /*#__PURE__*/function () {\n function ConditionUpdateObserver(hot, conditionCollection) {\n var _this = this;\n\n var columnDataFactory = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {\n return [];\n };\n\n _classCallCheck(this, ConditionUpdateObserver);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hot;\n /**\n * Reference to the instance of {@link ConditionCollection}.\n *\n * @type {ConditionCollection}\n */\n\n this.conditionCollection = conditionCollection;\n /**\n * Function which provide source data factory for specified column.\n *\n * @type {Function}\n */\n\n this.columnDataFactory = columnDataFactory;\n /**\n * Collected changes when grouping is enabled.\n *\n * @type {Array}\n * @default []\n */\n\n this.changes = [];\n /**\n * Flag which determines if grouping events is enabled.\n *\n * @type {boolean}\n */\n\n this.grouping = false;\n /**\n * The latest known position of edited conditions at specified column index.\n *\n * @type {number}\n * @default -1\n */\n\n this.latestEditedColumnPosition = -1;\n /**\n * The latest known order of conditions stack.\n *\n * @type {Array}\n */\n\n this.latestOrderStack = [];\n this.conditionCollection.addLocalHook('beforeRemove', function (column) {\n return _this._onConditionBeforeModify(column);\n });\n this.conditionCollection.addLocalHook('afterRemove', function (column) {\n return _this.updateStatesAtColumn(column);\n });\n this.conditionCollection.addLocalHook('afterAdd', function (column) {\n return _this.updateStatesAtColumn(column);\n });\n this.conditionCollection.addLocalHook('beforeClean', function () {\n return _this._onConditionBeforeClean();\n });\n this.conditionCollection.addLocalHook('afterClean', function () {\n return _this._onConditionAfterClean();\n });\n }\n /**\n * Enable grouping changes. Grouping is helpful in situations when a lot of conditions is added in one moment. Instead of\n * trigger `update` hook for every condition by adding/removing you can group this changes and call `flush` method to trigger\n * it once.\n */\n\n\n _createClass(ConditionUpdateObserver, [{\n key: \"groupChanges\",\n value: function groupChanges() {\n this.grouping = true;\n }\n /**\n * Flush all collected changes. This trigger `update` hook for every previously collected change from condition collection.\n */\n\n }, {\n key: \"flush\",\n value: function flush() {\n var _this2 = this;\n\n this.grouping = false;\n arrayEach(this.changes, function (column) {\n _this2.updateStatesAtColumn(column);\n });\n this.changes.length = 0;\n }\n /**\n * On before modify condition (add or remove from collection),.\n *\n * @param {number} column Column index.\n * @private\n */\n\n }, {\n key: \"_onConditionBeforeModify\",\n value: function _onConditionBeforeModify(column) {\n this.latestEditedColumnPosition = this.conditionCollection.getColumnStackPosition(column);\n }\n /**\n * Update all related states which should be changed after invoking changes applied to current column.\n *\n * @param {number} column The column index.\n * @param {object} conditionArgsChange Object describing condition changes which can be handled by filters on `update` hook.\n * It contains keys `conditionKey` and `conditionValue` which refers to change specified key of condition to specified value\n * based on referred keys.\n */\n\n }, {\n key: \"updateStatesAtColumn\",\n value: function updateStatesAtColumn(column, conditionArgsChange) {\n var _this3 = this;\n\n if (this.grouping) {\n if (this.changes.indexOf(column) === -1) {\n this.changes.push(column);\n }\n\n return;\n }\n\n var allConditions = this.conditionCollection.exportAllConditions();\n var editedColumnPosition = this.conditionCollection.getColumnStackPosition(column);\n\n if (editedColumnPosition === -1) {\n editedColumnPosition = this.latestEditedColumnPosition;\n } // Collection of all conditions defined before currently edited `column` (without edited one)\n\n\n var conditionsBefore = allConditions.slice(0, editedColumnPosition); // Collection of all conditions defined after currently edited `column` (with edited one)\n\n var conditionsAfter = allConditions.slice(editedColumnPosition); // Make sure that conditionAfter doesn't contain edited column conditions\n\n if (conditionsAfter.length && conditionsAfter[0].column === column) {\n conditionsAfter.shift();\n }\n\n var visibleDataFactory = curry(function (curriedConditionsBefore, curriedColumn) {\n var conditionsStack = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var splitConditionCollection = new ConditionCollection(_this3.hot, false);\n var curriedConditionsBeforeArray = [].concat(curriedConditionsBefore, conditionsStack); // Create new condition collection to determine what rows should be visible in \"filter by value\" box\n // in the next conditions in the chain\n\n splitConditionCollection.importAllConditions(curriedConditionsBeforeArray);\n\n var allRows = _this3.columnDataFactory(curriedColumn);\n\n var visibleRows;\n\n if (splitConditionCollection.isEmpty()) {\n visibleRows = allRows;\n } else {\n visibleRows = new DataFilter(splitConditionCollection, function (columnData) {\n return _this3.columnDataFactory(columnData);\n }).filter();\n }\n\n visibleRows = arrayMap(visibleRows, function (rowData) {\n return rowData.meta.visualRow;\n });\n var visibleRowsAssertion = createArrayAssertion(visibleRows);\n splitConditionCollection.destroy();\n return arrayFilter(allRows, function (rowData) {\n return visibleRowsAssertion(rowData.meta.visualRow);\n });\n })(conditionsBefore);\n var editedConditions = [].concat(this.conditionCollection.getConditions(column));\n this.runLocalHooks('update', {\n editedConditionStack: {\n column: column,\n conditions: editedConditions\n },\n dependentConditionStacks: conditionsAfter,\n filteredRowsFactory: visibleDataFactory,\n conditionArgsChange: conditionArgsChange\n });\n }\n /**\n * On before conditions clean listener.\n *\n * @private\n */\n\n }, {\n key: \"_onConditionBeforeClean\",\n value: function _onConditionBeforeClean() {\n this.latestOrderStack = this.conditionCollection.getFilteredColumns();\n }\n /**\n * On after conditions clean listener.\n *\n * @private\n */\n\n }, {\n key: \"_onConditionAfterClean\",\n value: function _onConditionAfterClean() {\n var _this4 = this;\n\n arrayEach(this.latestOrderStack, function (column) {\n _this4.updateStatesAtColumn(column);\n });\n }\n /**\n * Destroy instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this5 = this;\n\n this.clearLocalHooks();\n objectEach(this, function (value, property) {\n _this5[property] = null;\n });\n }\n }]);\n\n return ConditionUpdateObserver;\n}();\n\nmixin(ConditionUpdateObserver, localHooks);\nexport default ConditionUpdateObserver;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nvar _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { arrayEach, arrayMap } from \"../../helpers/array.mjs\";\nimport { toSingleLine } from \"../../helpers/templateLiteralTag.mjs\";\nimport { warn } from \"../../helpers/console.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { addClass, removeClass, closest } from \"../../helpers/dom/element.mjs\";\nimport { SEPARATOR } from \"../contextMenu/predefinedItems.mjs\";\nimport * as constants from \"../../i18n/constants.mjs\";\nimport ConditionComponent from \"./component/condition.mjs\";\nimport OperatorsComponent from \"./component/operators.mjs\";\nimport ValueComponent from \"./component/value.mjs\";\nimport ActionBarComponent from \"./component/actionBar.mjs\";\nimport ConditionCollection from \"./conditionCollection.mjs\";\nimport DataFilter from \"./dataFilter.mjs\";\nimport ConditionUpdateObserver from \"./conditionUpdateObserver.mjs\";\nimport { createArrayAssertion, toEmptyString, unifyColumnValues } from \"./utils.mjs\";\nimport { CONDITION_NONE, CONDITION_BY_VALUE, OPERATION_AND, OPERATION_OR, OPERATION_OR_THEN_VARIABLE } from \"./constants.mjs\";\nimport { TrimmingMap } from \"../../translations/index.mjs\";\nexport var PLUGIN_KEY = 'filters';\nexport var PLUGIN_PRIORITY = 250;\n/**\n * @plugin Filters\n *\n * @description\n * The plugin allows filtering the table data either by the built-in component or with the API.\n *\n * See [the filtering demo](https://handsontable.com/docs/demo-filtering.html) for examples.\n *\n * @example\n * ```\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * colHeaders: true,\n * rowHeaders: true,\n * dropdownMenu: true,\n * filters: true\n * });\n * ```\n */\n\nexport var Filters = /*#__PURE__*/function (_BasePlugin) {\n _inherits(Filters, _BasePlugin);\n\n var _super = _createSuper(Filters);\n\n function Filters(hotInstance) {\n var _this;\n\n _classCallCheck(this, Filters);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Instance of {@link DropdownMenu}.\n *\n * @private\n * @type {DropdownMenu}\n */\n\n _this.dropdownMenuPlugin = null;\n /**\n * Instance of {@link ConditionCollection}.\n *\n * @private\n * @type {ConditionCollection}\n */\n\n _this.conditionCollection = null;\n /**\n * Instance of {@link ConditionUpdateObserver}.\n *\n * @private\n * @type {ConditionUpdateObserver}\n */\n\n _this.conditionUpdateObserver = null;\n /**\n * Map, where key is component identifier and value represent `BaseComponent` element or it derivatives.\n *\n * @private\n * @type {Map}\n */\n\n _this.components = new Map([['filter_by_condition', null], ['filter_operators', null], ['filter_by_condition2', null], ['filter_by_value', null], ['filter_action_bar', null]]);\n /**\n * Object containing information about last selected column physical and visual index for added filter conditions.\n *\n * @private\n * @type {object}\n * @default null\n */\n\n _this.lastSelectedColumn = null;\n /**\n * Map of skipped rows by plugin.\n *\n * @private\n * @type {null|TrimmingMap}\n */\n\n _this.filtersRowsMap = null; // One listener for the enable/disable functionality\n\n _this.hot.addHook('afterGetColHeader', function (col, TH) {\n return _this.onAfterGetColHeader(col, TH);\n });\n\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link Filters#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(Filters, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n /* eslint-disable no-unneeded-ternary */\n return this.hot.getSettings()[PLUGIN_KEY] ? true : false;\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.filtersRowsMap = this.hot.rowIndexMapper.registerMap(this.pluginName, new TrimmingMap());\n this.dropdownMenuPlugin = this.hot.getPlugin('dropdownMenu');\n var dropdownSettings = this.hot.getSettings().dropdownMenu;\n var menuContainer = dropdownSettings && dropdownSettings.uiContainer || this.hot.rootDocument.body;\n\n var addConfirmationHooks = function addConfirmationHooks(component) {\n component.addLocalHook('accept', function () {\n return _this2.onActionBarSubmit('accept');\n });\n component.addLocalHook('cancel', function () {\n return _this2.onActionBarSubmit('cancel');\n });\n component.addLocalHook('change', function (command) {\n return _this2.onComponentChange(component, command);\n });\n return component;\n };\n\n var filterByConditionLabel = function filterByConditionLabel() {\n return \"\".concat(_this2.hot.getTranslatedPhrase(constants.FILTERS_DIVS_FILTER_BY_CONDITION), \":\");\n };\n\n var filterValueLabel = function filterValueLabel() {\n return \"\".concat(_this2.hot.getTranslatedPhrase(constants.FILTERS_DIVS_FILTER_BY_VALUE), \":\");\n };\n\n if (!this.components.get('filter_by_condition')) {\n var conditionComponent = new ConditionComponent(this.hot, {\n id: 'filter_by_condition',\n name: filterByConditionLabel,\n addSeparator: false,\n menuContainer: menuContainer\n });\n conditionComponent.addLocalHook('afterClose', function () {\n return _this2.onSelectUIClosed();\n });\n this.components.set('filter_by_condition', addConfirmationHooks(conditionComponent));\n }\n\n if (!this.components.get('filter_operators')) {\n this.components.set('filter_operators', new OperatorsComponent(this.hot, {\n id: 'filter_operators',\n name: 'Operators'\n }));\n }\n\n if (!this.components.get('filter_by_condition2')) {\n var _conditionComponent = new ConditionComponent(this.hot, {\n id: 'filter_by_condition2',\n name: '',\n addSeparator: true,\n menuContainer: menuContainer\n });\n\n _conditionComponent.addLocalHook('afterClose', function () {\n return _this2.onSelectUIClosed();\n });\n\n this.components.set('filter_by_condition2', addConfirmationHooks(_conditionComponent));\n }\n\n if (!this.components.get('filter_by_value')) {\n this.components.set('filter_by_value', addConfirmationHooks(new ValueComponent(this.hot, {\n id: 'filter_by_value',\n name: filterValueLabel\n })));\n }\n\n if (!this.components.get('filter_action_bar')) {\n this.components.set('filter_action_bar', addConfirmationHooks(new ActionBarComponent(this.hot, {\n id: 'filter_action_bar',\n name: 'Action bar'\n })));\n }\n\n if (!this.conditionCollection) {\n this.conditionCollection = new ConditionCollection(this.hot);\n }\n\n if (!this.conditionUpdateObserver) {\n this.conditionUpdateObserver = new ConditionUpdateObserver(this.hot, this.conditionCollection, function (physicalColumn) {\n return _this2.getDataMapAtColumn(physicalColumn);\n });\n this.conditionUpdateObserver.addLocalHook('update', function (conditionState) {\n return _this2.updateComponents(conditionState);\n });\n }\n\n this.components.forEach(function (component) {\n return component.show();\n });\n this.registerEvents();\n this.addHook('beforeDropdownMenuSetItems', function (items) {\n return _this2.onBeforeDropdownMenuSetItems(items);\n });\n this.addHook('afterDropdownMenuDefaultOptions', function (defaultOptions) {\n return _this2.onAfterDropdownMenuDefaultOptions(defaultOptions);\n });\n this.addHook('afterDropdownMenuShow', function () {\n return _this2.onAfterDropdownMenuShow();\n });\n this.addHook('afterDropdownMenuHide', function () {\n return _this2.onAfterDropdownMenuHide();\n });\n this.addHook('afterChange', function (changes) {\n return _this2.onAfterChange(changes);\n }); // Temp. solution (extending menu items bug in contextMenu/dropdownMenu)\n\n if (this.hot.getSettings().dropdownMenu && this.dropdownMenuPlugin) {\n this.dropdownMenuPlugin.disablePlugin();\n this.dropdownMenuPlugin.enablePlugin();\n }\n\n _get(_getPrototypeOf(Filters.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Registers the DOM listeners.\n *\n * @private\n */\n\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this3 = this;\n\n this.eventManager.addEventListener(this.hot.rootElement, 'click', function (event) {\n return _this3.onTableClick(event);\n });\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n var _this4 = this;\n\n if (this.enabled) {\n var _this$dropdownMenuPlu;\n\n if ((_this$dropdownMenuPlu = this.dropdownMenuPlugin) !== null && _this$dropdownMenuPlu !== void 0 && _this$dropdownMenuPlu.enabled) {\n this.dropdownMenuPlugin.menu.clearLocalHooks();\n }\n\n this.components.forEach(function (component, key) {\n component.destroy();\n\n _this4.components.set(key, null);\n });\n this.conditionCollection.destroy();\n this.conditionCollection = null;\n this.hot.rowIndexMapper.unregisterMap(this.pluginName);\n }\n\n _get(_getPrototypeOf(Filters.prototype), \"disablePlugin\", this).call(this);\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * @memberof Filters#\n * @function addCondition\n * @description\n * Adds condition to the conditions collection at specified column index.\n *\n * Possible predefined conditions:\n * * `begins_with` - Begins with\n * * `between` - Between\n * * `by_value` - By value\n * * `contains` - Contains\n * * `empty` - Empty\n * * `ends_with` - Ends with\n * * `eq` - Equal\n * * `gt` - Greater than\n * * `gte` - Greater than or equal\n * * `lt` - Less than\n * * `lte` - Less than or equal\n * * `none` - None (no filter)\n * * `not_between` - Not between\n * * `not_contains` - Not contains\n * * `not_empty` - Not empty\n * * `neq` - Not equal.\n *\n * Possible operations on collection of conditions:\n * * `conjunction` - [**Conjunction**](https://en.wikipedia.org/wiki/Logical_conjunction) on conditions collection (by default), i.e. for such operation: c1 AND c2 AND c3 AND c4 ... AND cn === TRUE, where c1 ... cn are conditions.\n * * `disjunction` - [**Disjunction**](https://en.wikipedia.org/wiki/Logical_disjunction) on conditions collection, i.e. for such operation: `c1 OR c2 OR c3 OR c4 ... OR cn` === TRUE, where c1, c2, c3, c4 ... cn are conditions.\n * * `disjunctionWithExtraCondition` - **Disjunction** on first `n - 1`\\* conditions from collection with an extra requirement computed from the last condition, i.e. for such operation: `c1 OR c2 OR c3 OR c4 ... OR cn-1 AND cn` === TRUE, where c1, c2, c3, c4 ... cn are conditions.\n *\n * \\* when `n` is collection size; it's used i.e. for one operation introduced from UI (when choosing from filter's drop-down menu two conditions with OR operator between them, mixed with choosing values from the multiple choice select)\n *\n * **Note**: Mind that you cannot mix different types of operations (for instance, if you use `conjunction`, use it consequently for a particular column).\n *\n * @example\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * filters: true\n * });\n *\n * // access to filters plugin instance\n * const filtersPlugin = hot.getPlugin('filters');\n *\n * // add filter \"Greater than\" 95 to column at index 1\n * filtersPlugin.addCondition(1, 'gt', [95]);\n * filtersPlugin.filter();\n *\n * // add filter \"By value\" to column at index 1\n * // in this case all value's that don't match will be filtered.\n * filtersPlugin.addCondition(1, 'by_value', [['ing', 'ed', 'as', 'on']]);\n * filtersPlugin.filter();\n *\n * // add filter \"Begins with\" with value \"de\" AND \"Not contains\" with value \"ing\"\n * filtersPlugin.addCondition(1, 'begins_with', ['de'], 'conjunction');\n * filtersPlugin.addCondition(1, 'not_contains', ['ing'], 'conjunction');\n * filtersPlugin.filter();\n *\n * // add filter \"Begins with\" with value \"de\" OR \"Not contains\" with value \"ing\"\n * filtersPlugin.addCondition(1, 'begins_with', ['de'], 'disjunction');\n * filtersPlugin.addCondition(1, 'not_contains', ['ing'], 'disjunction');\n * filtersPlugin.filter();\n * ```\n * @param {number} column Visual column index.\n * @param {string} name Condition short name.\n * @param {Array} args Condition arguments.\n * @param {string} [operationId=conjunction] `id` of operation which is performed on the column.\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"addCondition\",\n value: function addCondition(column, name, args) {\n var operationId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : OPERATION_AND;\n var physicalColumn = this.hot.toPhysicalColumn(column);\n this.conditionCollection.addCondition(physicalColumn, {\n command: {\n key: name\n },\n args: args\n }, operationId);\n }\n /**\n * Removes conditions at specified column index.\n *\n * @param {number} column Visual column index.\n */\n\n }, {\n key: \"removeConditions\",\n value: function removeConditions(column) {\n var physicalColumn = this.hot.toPhysicalColumn(column);\n this.conditionCollection.removeConditions(physicalColumn);\n }\n /**\n * Clears all conditions previously added to the collection for the specified column index or, if the column index\n * was not passed, clear the conditions for all columns.\n *\n * @param {number} [column] Visual column index.\n */\n\n }, {\n key: \"clearConditions\",\n value: function clearConditions(column) {\n if (column === void 0) {\n this.conditionCollection.clean();\n } else {\n var physicalColumn = this.hot.toPhysicalColumn(column);\n this.conditionCollection.removeConditions(physicalColumn);\n }\n }\n /**\n * Filters data based on added filter conditions.\n *\n * @fires Hooks#beforeFilter\n * @fires Hooks#afterFilter\n */\n\n }, {\n key: \"filter\",\n value: function filter() {\n var _this5 = this;\n\n var dataFilter = this._createDataFilter();\n\n var needToFilter = !this.conditionCollection.isEmpty();\n var visibleVisualRows = [];\n var conditions = this.conditionCollection.exportAllConditions();\n var allowFiltering = this.hot.runHooks('beforeFilter', conditions);\n\n if (allowFiltering !== false) {\n if (needToFilter) {\n var trimmedRows = [];\n this.hot.batchExecution(function () {\n _this5.filtersRowsMap.clear();\n\n visibleVisualRows = arrayMap(dataFilter.filter(), function (rowData) {\n return rowData.meta.visualRow;\n });\n var visibleVisualRowsAssertion = createArrayAssertion(visibleVisualRows);\n rangeEach(_this5.hot.countSourceRows() - 1, function (row) {\n if (!visibleVisualRowsAssertion(row)) {\n trimmedRows.push(row);\n }\n });\n arrayEach(trimmedRows, function (physicalRow) {\n _this5.filtersRowsMap.setValueAtIndex(physicalRow, true);\n });\n }, true);\n\n if (!visibleVisualRows.length) {\n this.hot.deselectCell();\n }\n } else {\n this.filtersRowsMap.clear();\n }\n }\n\n this.hot.runHooks('afterFilter', conditions);\n this.hot.view.adjustElementsSize(true);\n this.hot.render();\n this.clearColumnSelection();\n }\n /**\n * Gets last selected column index.\n *\n * @returns {object|null} Return `null` when column isn't selected otherwise\n * object containing information about selected column with keys `visualIndex` and `physicalIndex`.\n */\n\n }, {\n key: \"getSelectedColumn\",\n value: function getSelectedColumn() {\n return this.lastSelectedColumn;\n }\n /**\n * Clears column selection.\n *\n * @private\n */\n\n }, {\n key: \"clearColumnSelection\",\n value: function clearColumnSelection() {\n var _this$hot$getSelected;\n\n var coords = (_this$hot$getSelected = this.hot.getSelectedRangeLast()) === null || _this$hot$getSelected === void 0 ? void 0 : _this$hot$getSelected.getTopLeftCorner();\n\n if (coords !== void 0) {\n this.hot.selectCell(coords.row, coords.col);\n }\n }\n /**\n * Returns handsontable source data with cell meta based on current selection.\n *\n * @param {number} [column] The physical column index. By default column index accept the value of the selected column.\n * @returns {Array} Returns array of objects where keys as row index.\n */\n\n }, {\n key: \"getDataMapAtColumn\",\n value: function getDataMapAtColumn(column) {\n var _this6 = this;\n\n var visualIndex = this.hot.toVisualColumn(column);\n var data = [];\n arrayEach(this.hot.getSourceDataAtCol(visualIndex), function (value, rowIndex) {\n var _this6$hot$getCellMet = _this6.hot.getCellMeta(rowIndex, visualIndex),\n row = _this6$hot$getCellMet.row,\n col = _this6$hot$getCellMet.col,\n visualCol = _this6$hot$getCellMet.visualCol,\n visualRow = _this6$hot$getCellMet.visualRow,\n type = _this6$hot$getCellMet.type,\n instance = _this6$hot$getCellMet.instance,\n dateFormat = _this6$hot$getCellMet.dateFormat;\n\n data.push({\n meta: {\n row: row,\n col: col,\n visualCol: visualCol,\n visualRow: visualRow,\n type: type,\n instance: instance,\n dateFormat: dateFormat\n },\n value: toEmptyString(value)\n });\n });\n return data;\n }\n /**\n * `afterChange` listener.\n *\n * @private\n * @param {Array} changes Array of changes.\n */\n\n }, {\n key: \"onAfterChange\",\n value: function onAfterChange(changes) {\n var _this7 = this;\n\n if (changes) {\n arrayEach(changes, function (change) {\n var _change = _slicedToArray(change, 2),\n prop = _change[1];\n\n var columnIndex = _this7.hot.propToCol(prop);\n\n if (_this7.conditionCollection.hasConditions(columnIndex)) {\n _this7.updateValueComponentCondition(columnIndex);\n }\n });\n }\n }\n /**\n * Update condition of ValueComponent basing on handled changes.\n *\n * @private\n * @param {number} columnIndex Column index of handled ValueComponent condition.\n */\n\n }, {\n key: \"updateValueComponentCondition\",\n value: function updateValueComponentCondition(columnIndex) {\n var dataAtCol = this.hot.getDataAtCol(columnIndex);\n var selectedValues = unifyColumnValues(dataAtCol);\n this.conditionUpdateObserver.updateStatesAtColumn(columnIndex, selectedValues);\n }\n /**\n * Restores components to its saved state.\n *\n * @private\n * @param {Array} components List of components.\n */\n\n }, {\n key: \"restoreComponents\",\n value: function restoreComponents(components) {\n var _this$getSelectedColu;\n\n var physicalIndex = (_this$getSelectedColu = this.getSelectedColumn()) === null || _this$getSelectedColu === void 0 ? void 0 : _this$getSelectedColu.physicalIndex;\n components.forEach(function (component) {\n if (component.isHidden()) {\n return;\n }\n\n component.restoreState(physicalIndex);\n });\n this.updateDependentComponentsVisibility();\n }\n /**\n * After dropdown menu show listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterDropdownMenuShow\",\n value: function onAfterDropdownMenuShow() {\n this.restoreComponents(Array.from(this.components.values()));\n }\n /**\n * After dropdown menu hide listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterDropdownMenuHide\",\n value: function onAfterDropdownMenuHide() {\n this.components.get('filter_by_condition').getSelectElement().closeOptions();\n this.components.get('filter_by_condition2').getSelectElement().closeOptions();\n }\n /**\n * Before dropdown menu set menu items listener.\n *\n * @private\n */\n\n }, {\n key: \"onBeforeDropdownMenuSetItems\",\n value: function onBeforeDropdownMenuSetItems() {\n var _this8 = this;\n\n if (this.dropdownMenuPlugin) {\n this.dropdownMenuPlugin.menu.addLocalHook('afterOpen', function () {\n _this8.dropdownMenuPlugin.menu.hotMenu.updateSettings({\n hiddenRows: true\n });\n });\n }\n }\n /**\n * After dropdown menu default options listener.\n *\n * @private\n * @param {object} defaultOptions ContextMenu default item options.\n */\n\n }, {\n key: \"onAfterDropdownMenuDefaultOptions\",\n value: function onAfterDropdownMenuDefaultOptions(defaultOptions) {\n defaultOptions.items.push({\n name: SEPARATOR\n });\n this.components.forEach(function (component) {\n defaultOptions.items.push(component.getMenuItemDescriptor());\n });\n }\n /**\n * Get operation basing on number and type of arguments (where arguments are states of components).\n *\n * @param {string} suggestedOperation Operation which was chosen by user from UI.\n * @param {object} byConditionState1 State of first condition component.\n * @param {object} byConditionState2 State of second condition component.\n * @param {object} byValueState State of value component.\n * @private\n * @returns {string}\n */\n\n }, {\n key: \"getOperationBasedOnArguments\",\n value: function getOperationBasedOnArguments(suggestedOperation, byConditionState1, byConditionState2, byValueState) {\n var operation = suggestedOperation;\n\n if (operation === OPERATION_OR && byConditionState1.command.key !== CONDITION_NONE && byConditionState2.command.key !== CONDITION_NONE && byValueState.command.key !== CONDITION_NONE) {\n operation = OPERATION_OR_THEN_VARIABLE;\n } else if (byValueState.command.key !== CONDITION_NONE) {\n if (byConditionState1.command.key === CONDITION_NONE || byConditionState2.command.key === CONDITION_NONE) {\n operation = OPERATION_AND;\n }\n }\n\n return operation;\n }\n /**\n * On action bar submit listener.\n *\n * @private\n * @param {string} submitType The submit type.\n */\n\n }, {\n key: \"onActionBarSubmit\",\n value: function onActionBarSubmit(submitType) {\n if (submitType === 'accept') {\n var _this$getSelectedColu2;\n\n var physicalIndex = (_this$getSelectedColu2 = this.getSelectedColumn()) === null || _this$getSelectedColu2 === void 0 ? void 0 : _this$getSelectedColu2.physicalIndex;\n var byConditionState1 = this.components.get('filter_by_condition').getState();\n var byConditionState2 = this.components.get('filter_by_condition2').getState();\n var byValueState = this.components.get('filter_by_value').getState();\n var operation = this.getOperationBasedOnArguments(this.components.get('filter_operators').getActiveOperationId(), byConditionState1, byConditionState2, byValueState);\n this.conditionUpdateObserver.groupChanges();\n var columnStackPosition = this.conditionCollection.getColumnStackPosition(physicalIndex);\n\n if (columnStackPosition === -1) {\n columnStackPosition = void 0;\n }\n\n this.conditionCollection.removeConditions(physicalIndex);\n\n if (byConditionState1.command.key !== CONDITION_NONE) {\n this.conditionCollection.addCondition(physicalIndex, byConditionState1, operation, columnStackPosition);\n\n if (byConditionState2.command.key !== CONDITION_NONE) {\n this.conditionCollection.addCondition(physicalIndex, byConditionState2, operation, columnStackPosition);\n }\n }\n\n if (byValueState.command.key !== CONDITION_NONE) {\n this.conditionCollection.addCondition(physicalIndex, byValueState, operation, columnStackPosition);\n }\n\n this.conditionUpdateObserver.flush();\n this.components.forEach(function (component) {\n return component.saveState(physicalIndex);\n });\n this.filtersRowsMap.clear();\n this.filter();\n }\n\n if (this.dropdownMenuPlugin) {\n this.dropdownMenuPlugin.close();\n }\n }\n /**\n * On component change listener.\n *\n * @private\n * @param {BaseComponent} component Component inheriting BaseComponent.\n * @param {object} command Menu item object (command).\n */\n\n }, {\n key: \"onComponentChange\",\n value: function onComponentChange(component, command) {\n this.updateDependentComponentsVisibility();\n\n if (component.constructor === ConditionComponent && !command.inputsCount) {\n this.setListeningDropdownMenu();\n }\n }\n /**\n * On component SelectUI closed listener.\n *\n * @private\n */\n\n }, {\n key: \"onSelectUIClosed\",\n value: function onSelectUIClosed() {\n this.setListeningDropdownMenu();\n }\n /**\n * Listen to the keyboard input on document body and forward events to instance of Handsontable\n * created by DropdownMenu plugin.\n *\n * @private\n */\n\n }, {\n key: \"setListeningDropdownMenu\",\n value: function setListeningDropdownMenu() {\n if (this.dropdownMenuPlugin) {\n this.dropdownMenuPlugin.setListening();\n }\n }\n /**\n * Updates visibility of the some of the components based on the state of the parent component.\n *\n * @private\n */\n\n }, {\n key: \"updateDependentComponentsVisibility\",\n value: function updateDependentComponentsVisibility() {\n var component = this.components.get('filter_by_condition');\n\n var _component$getState = component.getState(),\n command = _component$getState.command;\n\n var componentsToShow = [this.components.get('filter_by_condition2'), this.components.get('filter_operators')];\n\n if (command.showOperators) {\n this.showComponents.apply(this, componentsToShow);\n } else {\n this.hideComponents.apply(this, componentsToShow);\n }\n }\n /**\n * On after get column header listener.\n *\n * @private\n * @param {number} col Visual column index.\n * @param {HTMLTableCellElement} TH Header's TH element.\n */\n\n }, {\n key: \"onAfterGetColHeader\",\n value: function onAfterGetColHeader(col, TH) {\n var physicalColumn = this.hot.toPhysicalColumn(col);\n\n if (this.enabled && this.conditionCollection.hasConditions(physicalColumn)) {\n addClass(TH, 'htFiltersActive');\n } else {\n removeClass(TH, 'htFiltersActive');\n }\n }\n /**\n * On table click listener.\n *\n * @private\n * @param {Event} event DOM Event.\n */\n\n }, {\n key: \"onTableClick\",\n value: function onTableClick(event) {\n var th = closest(event.target, 'TH');\n\n if (th) {\n var visualIndex = this.hot.getCoords(th).col;\n var physicalIndex = this.hot.toPhysicalColumn(visualIndex);\n this.lastSelectedColumn = {\n visualIndex: visualIndex,\n physicalIndex: physicalIndex\n };\n }\n }\n /**\n * Creates DataFilter instance based on condition collection.\n *\n * @private\n * @param {ConditionCollection} conditionCollection Condition collection object.\n * @returns {DataFilter}\n */\n\n }, {\n key: \"_createDataFilter\",\n value: function _createDataFilter() {\n var _this9 = this;\n\n var conditionCollection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.conditionCollection;\n return new DataFilter(conditionCollection, function (physicalColumn) {\n return _this9.getDataMapAtColumn(physicalColumn);\n });\n }\n /**\n * It updates the components state. The state is triggered by ConditionUpdateObserver, which\n * reacts to any condition added to the condition collection. It may be added through the UI\n * components or by API call.\n *\n * @private\n * @param {object} conditionsState An object with the state generated by UI components.\n */\n\n }, {\n key: \"updateComponents\",\n value: function updateComponents(conditionsState) {\n var _this$dropdownMenuPlu2;\n\n if (!((_this$dropdownMenuPlu2 = this.dropdownMenuPlugin) !== null && _this$dropdownMenuPlu2 !== void 0 && _this$dropdownMenuPlu2.enabled)) {\n return;\n }\n\n var _conditionsState$edit = conditionsState.editedConditionStack,\n conditions = _conditionsState$edit.conditions,\n column = _conditionsState$edit.column;\n var conditionsByValue = conditions.filter(function (condition) {\n return condition.name === CONDITION_BY_VALUE;\n });\n var conditionsWithoutByValue = conditions.filter(function (condition) {\n return condition.name !== CONDITION_BY_VALUE;\n });\n\n if (conditionsByValue.length >= 2 || conditionsWithoutByValue.length >= 3) {\n warn(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"The filter conditions have been applied properly, but couldn\\u2019t be displayed visually. \\n The overall amount of conditions exceed the capability of the dropdown menu. \\n For more details see the documentation.\"], [\"The filter conditions have been applied properly, but couldn\\u2019t be displayed visually.\\\\x20\\n The overall amount of conditions exceed the capability of the dropdown menu.\\\\x20\\n For more details see the documentation.\"]))));\n } else {\n var operationType = this.conditionCollection.getOperation(column);\n this.components.get('filter_by_condition').updateState(conditionsWithoutByValue[0], column);\n this.components.get('filter_by_condition2').updateState(conditionsWithoutByValue[1], column);\n this.components.get('filter_operators').updateState(operationType, column);\n this.components.get('filter_by_value').updateState(conditionsState);\n }\n }\n /**\n * Returns indexes of passed components inside list of `dropdownMenu` items.\n *\n * @private\n * @param {...BaseComponent} components List of components.\n * @returns {Array}\n */\n\n }, {\n key: \"getIndexesOfComponents\",\n value: function getIndexesOfComponents() {\n var indexes = [];\n\n if (!this.dropdownMenuPlugin) {\n return indexes;\n }\n\n var menu = this.dropdownMenuPlugin.menu;\n\n for (var _len = arguments.length, components = new Array(_len), _key = 0; _key < _len; _key++) {\n components[_key] = arguments[_key];\n }\n\n arrayEach(components, function (component) {\n arrayEach(menu.menuItems, function (item, index) {\n if (item.key === component.getMenuItemDescriptor().key) {\n indexes.push(index);\n }\n });\n });\n return indexes;\n }\n /**\n * Changes visibility of component.\n *\n * @private\n * @param {boolean} visible Determine if components should be visible.\n * @param {...BaseComponent} components List of components.\n */\n\n }, {\n key: \"changeComponentsVisibility\",\n value: function changeComponentsVisibility() {\n var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n if (!this.dropdownMenuPlugin) {\n return;\n }\n\n var menu = this.dropdownMenuPlugin.menu;\n var hotMenu = menu.hotMenu;\n var hiddenRows = hotMenu.getPlugin('hiddenRows');\n\n for (var _len2 = arguments.length, components = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n components[_key2 - 1] = arguments[_key2];\n }\n\n var indexes = this.getIndexesOfComponents.apply(this, components);\n\n if (visible) {\n hiddenRows.showRows(indexes);\n } else {\n hiddenRows.hideRows(indexes);\n }\n\n hotMenu.render();\n }\n /**\n * Hides components of filters `dropdownMenu`.\n *\n * @private\n * @param {...BaseComponent} components List of components.\n */\n\n }, {\n key: \"hideComponents\",\n value: function hideComponents() {\n for (var _len3 = arguments.length, components = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n components[_key3] = arguments[_key3];\n }\n\n this.changeComponentsVisibility.apply(this, [false].concat(components));\n }\n /**\n * Shows components of filters `dropdownMenu`.\n *\n * @private\n * @param {...BaseComponent} components List of components.\n */\n\n }, {\n key: \"showComponents\",\n value: function showComponents() {\n for (var _len4 = arguments.length, components = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n components[_key4] = arguments[_key4];\n }\n\n this.changeComponentsVisibility.apply(this, [true].concat(components));\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this10 = this;\n\n if (this.enabled) {\n this.components.forEach(function (component, key) {\n if (component !== null) {\n component.destroy();\n\n _this10.components.set(key, null);\n }\n });\n this.conditionCollection.destroy();\n this.conditionUpdateObserver.destroy();\n this.hot.rowIndexMapper.unregisterMap(this.pluginName);\n }\n\n _get(_getPrototypeOf(Filters.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }, {\n key: \"PLUGIN_DEPS\",\n get: function get() {\n return ['plugin:DropdownMenu', 'plugin:HiddenRows', 'cell-type:checkbox'];\n }\n }]);\n\n return Filters;\n}(BasePlugin);","import \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.string.replace.js\";\n/**\n * Check if provided expression is valid formula expression.\n *\n * @param {*} expression Expression to check.\n * @returns {boolean}\n */\n\nexport function isFormulaExpression(expression) {\n return typeof expression === 'string' && expression.length >= 2 && expression.charAt(0) === '=';\n}\n/**\n * Check if provided formula expression is escaped.\n *\n * @param {*} expression Expression to check.\n * @returns {boolean}\n */\n\nexport function isFormulaExpressionEscaped(expression) {\n return typeof expression === 'string' && expression.charAt(0) === '\\'' && expression.charAt(1) === '=';\n}\n/**\n * Replace escaped formula expression into valid string.\n *\n * @param {string} expression Expression to process.\n * @returns {string}\n */\n\nexport function unescapeFormulaExpression(expression) {\n return isFormulaExpressionEscaped(expression) ? expression.substr(1) : expression;\n}\n/**\n * Upper case formula expression.\n *\n * @param {string} expression Formula expression.\n * @returns {string}\n */\n\nexport function toUpperCaseFormula(expression) {\n var PATTERN = /(\\\\\"|\"(?:\\\\\"|[^\"])*\"|(\\+))|(\\\\'|'(?:\\\\'|[^'])*'|(\\+))/g;\n var strings = expression.match(PATTERN) || [];\n var index = -1;\n return expression.toUpperCase().replace(PATTERN, function () {\n index += 1;\n return strings[index];\n });\n}\n/**\n * Cell coordinates function factory.\n *\n * @param {string} axis An axis name (`row` or `column`) which default index will be applied to.\n * @param {number} defaultIndex Default index.\n * @returns {Function}\n */\n\nexport function cellCoordFactory(axis, defaultIndex) {\n return function (cell) {\n return {\n row: axis === 'row' ? defaultIndex : cell.row,\n column: axis === 'column' ? defaultIndex : cell.column\n };\n };\n}","var _errors;\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nexport var ERROR = 'ERROR';\nexport var ERROR_DIV_ZERO = 'DIV/0';\nexport var ERROR_NAME = 'NAME';\nexport var ERROR_NOT_AVAILABLE = 'N/A';\nexport var ERROR_NULL = 'NULL';\nexport var ERROR_NUM = 'NUM';\nexport var ERROR_REF = 'REF';\nexport var ERROR_VALUE = 'VALUE';\nvar errors = (_errors = {}, _defineProperty(_errors, ERROR, '#ERROR!'), _defineProperty(_errors, ERROR_DIV_ZERO, '#DIV/0!'), _defineProperty(_errors, ERROR_NAME, '#NAME?'), _defineProperty(_errors, ERROR_NOT_AVAILABLE, '#N/A'), _defineProperty(_errors, ERROR_NULL, '#NULL!'), _defineProperty(_errors, ERROR_NUM, '#NUM!'), _defineProperty(_errors, ERROR_REF, '#REF!'), _defineProperty(_errors, ERROR_VALUE, '#VALUE!'), _errors);\n/**\n * Return error type based on provided error id.\n *\n * @param {String} type Error type.\n * @returns {String|null} Returns error id.\n */\n\nexport default function error(type) {\n var result;\n type = (type + '').replace(/#|!|\\?/g, '');\n\n if (errors[type]) {\n result = errors[type];\n }\n\n return result ? result : null;\n}\n/**\n * Check if error type is strict valid with knows errors.\n *\n * @param {String} Error type.\n * @return {Boolean}\n */\n\nexport function isValidStrict(type) {\n var valid = false;\n\n for (var i in errors) {\n if (Object.prototype.hasOwnProperty.call(errors, i) && errors[i] === type) {\n valid = true;\n break;\n }\n }\n\n return valid;\n}","/**\n * Convert value into number.\n *\n * @param {String|Number} number\n * @returns {*}\n */\nexport function toNumber(number) {\n var result;\n\n if (typeof number === 'number') {\n result = number;\n } else if (typeof number === 'string') {\n result = number.indexOf('.') > -1 ? parseFloat(number) : parseInt(number, 10);\n }\n\n return result;\n}\n/**\n * Invert provided number.\n *\n * @param {Number} number\n * @returns {Number} Returns inverted number.\n */\n\nexport function invertNumber(number) {\n return -1 * toNumber(number);\n}","import { toNumber } from \"./../../helper/number.mjs\";\nimport { ERROR_VALUE } from \"./../../error.mjs\";\nexport var SYMBOL = '+';\nexport default function func(first) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n var result = rest.reduce(function (acc, value) {\n return acc + toNumber(value);\n }, toNumber(first));\n\n if (isNaN(result)) {\n throw Error(ERROR_VALUE);\n }\n\n return result;\n}\nfunc.SYMBOL = SYMBOL;","export var SYMBOL = '&';\nexport default function func() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n\n return params.reduce(function (acc, value) {\n return acc + value.toString();\n }, '');\n}\nfunc.SYMBOL = SYMBOL;","import { toNumber } from \"./../../helper/number.mjs\";\nimport { ERROR_DIV_ZERO, ERROR_VALUE } from \"./../../error.mjs\";\nexport var SYMBOL = '/';\nexport default function func(first) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n var result = rest.reduce(function (acc, value) {\n return acc / toNumber(value);\n }, toNumber(first));\n\n if (result === Infinity) {\n throw Error(ERROR_DIV_ZERO);\n }\n\n if (isNaN(result)) {\n throw Error(ERROR_VALUE);\n }\n\n return result;\n}\nfunc.SYMBOL = SYMBOL;","export var SYMBOL = '=';\nexport default function func(exp1, exp2) {\n return exp1 === exp2;\n}\nfunc.SYMBOL = SYMBOL;","import formulajs from '@handsontable/formulajs';\nimport SUPPORTED_FORMULAS from \"./../../supported-formulas.mjs\";\nimport { ERROR_NAME } from \"./../../error.mjs\";\nexport var SYMBOL = SUPPORTED_FORMULAS;\nexport default function func(symbol) {\n return function __formulaFunction() {\n symbol = symbol.toUpperCase();\n var symbolParts = symbol.split('.');\n var foundFormula = false;\n var result;\n\n if (symbolParts.length === 1) {\n if (formulajs[symbolParts[0]]) {\n foundFormula = true;\n result = formulajs[symbolParts[0]].apply(formulajs, arguments);\n }\n } else {\n var length = symbolParts.length;\n var index = 0;\n var nestedFormula = formulajs;\n\n while (index < length) {\n nestedFormula = nestedFormula[symbolParts[index]];\n index++;\n\n if (!nestedFormula) {\n nestedFormula = null;\n break;\n }\n }\n\n if (nestedFormula) {\n foundFormula = true;\n result = nestedFormula.apply(void 0, arguments);\n }\n }\n\n if (!foundFormula) {\n throw Error(ERROR_NAME);\n }\n\n return result;\n };\n}\nfunc.isFactory = true;\nfunc.SYMBOL = SYMBOL;","var SUPPORTED_FORMULAS = ['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'];\nexport default SUPPORTED_FORMULAS;","export var SYMBOL = '>';\nexport default function func(exp1, exp2) {\n return exp1 > exp2;\n}\nfunc.SYMBOL = SYMBOL;","export var SYMBOL = '>=';\nexport default function func(exp1, exp2) {\n return exp1 >= exp2;\n}\nfunc.SYMBOL = SYMBOL;","export var SYMBOL = '<';\nexport default function func(exp1, exp2) {\n return exp1 < exp2;\n}\nfunc.SYMBOL = SYMBOL;","export var SYMBOL = '<=';\nexport default function func(exp1, exp2) {\n return exp1 <= exp2;\n}\nfunc.SYMBOL = SYMBOL;","import { toNumber } from \"./../../helper/number.mjs\";\nimport { ERROR_VALUE } from \"./../../error.mjs\";\nexport var SYMBOL = '-';\nexport default function func(first) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n var result = rest.reduce(function (acc, value) {\n return acc - toNumber(value);\n }, toNumber(first));\n\n if (isNaN(result)) {\n throw Error(ERROR_VALUE);\n }\n\n return result;\n}\nfunc.SYMBOL = SYMBOL;","import { toNumber } from \"./../../helper/number.mjs\";\nimport { ERROR_VALUE } from \"./../../error.mjs\";\nexport var SYMBOL = '*';\nexport default function func(first) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n var result = rest.reduce(function (acc, value) {\n return acc * toNumber(value);\n }, toNumber(first));\n\n if (isNaN(result)) {\n throw Error(ERROR_VALUE);\n }\n\n return result;\n}\nfunc.SYMBOL = SYMBOL;","export var SYMBOL = '<>';\nexport default function func(exp1, exp2) {\n return exp1 !== exp2;\n}\nfunc.SYMBOL = SYMBOL;","import { toNumber } from \"./../../helper/number.mjs\";\nimport { ERROR_VALUE } from \"./../../error.mjs\";\nexport var SYMBOL = '^';\nexport default function func(exp1, exp2) {\n var result = Math.pow(toNumber(exp1), toNumber(exp2));\n\n if (isNaN(result)) {\n throw Error(ERROR_VALUE);\n }\n\n return result;\n}\nfunc.SYMBOL = SYMBOL;","function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n/* eslint-disable import/no-named-as-default-member */\n\n\nimport add from \"./operator/add.mjs\";\nimport ampersand from \"./operator/ampersand.mjs\";\nimport divide from \"./operator/divide.mjs\";\nimport equal from \"./operator/equal.mjs\";\nimport formulaFunction from \"./operator/formula-function.mjs\";\nimport greaterThan from \"./operator/greater-than.mjs\";\nimport greaterThanOrEqual from \"./operator/greater-than-or-equal.mjs\";\nimport lessThan from \"./operator/less-than.mjs\";\nimport lessThanOrEqual from \"./operator/less-than-or-equal.mjs\";\nimport minus from \"./operator/minus.mjs\";\nimport multiply from \"./operator/multiply.mjs\";\nimport notEqual from \"./operator/not-equal.mjs\";\nimport power from \"./operator/power.mjs\";\nimport { ERROR_NAME } from \"./../error.mjs\";\nvar availableOperators = Object.create(null);\n/**\n * Evaluate values by operator id.git\n *\n * @param {String} operator Operator id.\n * @param {Array} [params=[]] Arguments to evaluate.\n * @returns {*}\n */\n\nexport default function evaluateByOperator(operator) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n operator = operator.toUpperCase();\n\n if (!availableOperators[operator]) {\n throw Error(ERROR_NAME);\n }\n\n return availableOperators[operator].apply(availableOperators, _toConsumableArray(params));\n}\n/**\n * Register operator.\n *\n * @param {String|Array} symbol Symbol to register.\n * @param {Function} func Logic to register for this symbol.\n */\n\nexport function registerOperation(symbol, func) {\n if (!Array.isArray(symbol)) {\n symbol = [symbol.toUpperCase()];\n }\n\n symbol.forEach(function (s) {\n if (func.isFactory) {\n availableOperators[s] = func(s);\n } else {\n availableOperators[s] = func;\n }\n });\n}\nregisterOperation(add.SYMBOL, add);\nregisterOperation(ampersand.SYMBOL, ampersand);\nregisterOperation(divide.SYMBOL, divide);\nregisterOperation(equal.SYMBOL, equal);\nregisterOperation(power.SYMBOL, power);\nregisterOperation(formulaFunction.SYMBOL, formulaFunction);\nregisterOperation(greaterThan.SYMBOL, greaterThan);\nregisterOperation(greaterThanOrEqual.SYMBOL, greaterThanOrEqual);\nregisterOperation(lessThan.SYMBOL, lessThan);\nregisterOperation(lessThanOrEqual.SYMBOL, lessThanOrEqual);\nregisterOperation(multiply.SYMBOL, multiply);\nregisterOperation(notEqual.SYMBOL, notEqual);\nregisterOperation(minus.SYMBOL, minus);","/* parser generated by jison 0.4.18 */\n\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar o = function o(k, v, _o, l) {\n for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {\n ;\n }\n\n return _o;\n},\n $V0 = [1, 5],\n $V1 = [1, 8],\n $V2 = [1, 6],\n $V3 = [1, 7],\n $V4 = [1, 9],\n $V5 = [1, 14],\n $V6 = [1, 15],\n $V7 = [1, 16],\n $V8 = [1, 12],\n $V9 = [1, 13],\n $Va = [1, 17],\n $Vb = [1, 19],\n $Vc = [1, 20],\n $Vd = [1, 21],\n $Ve = [1, 22],\n $Vf = [1, 23],\n $Vg = [1, 24],\n $Vh = [1, 25],\n $Vi = [1, 26],\n $Vj = [1, 27],\n $Vk = [1, 28],\n $Vl = [5, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30],\n $Vm = [5, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30, 32],\n $Vn = [5, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30, 34],\n $Vo = [5, 10, 11, 13, 14, 15, 16, 17, 29, 30],\n $Vp = [5, 10, 13, 14, 15, 16, 29, 30],\n $Vq = [5, 10, 11, 13, 14, 15, 16, 17, 18, 19, 29, 30],\n $Vr = [13, 29, 30];\n\nvar parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"expressions\": 3,\n \"expression\": 4,\n \"EOF\": 5,\n \"variableSequence\": 6,\n \"number\": 7,\n \"STRING\": 8,\n \"&\": 9,\n \"=\": 10,\n \"+\": 11,\n \"(\": 12,\n \")\": 13,\n \"<\": 14,\n \">\": 15,\n \"NOT\": 16,\n \"-\": 17,\n \"*\": 18,\n \"/\": 19,\n \"^\": 20,\n \"FUNCTION\": 21,\n \"expseq\": 22,\n \"cell\": 23,\n \"ABSOLUTE_CELL\": 24,\n \"RELATIVE_CELL\": 25,\n \"MIXED_CELL\": 26,\n \":\": 27,\n \"ARRAY\": 28,\n \";\": 29,\n \",\": 30,\n \"VARIABLE\": 31,\n \"DECIMAL\": 32,\n \"NUMBER\": 33,\n \"%\": 34,\n \"ERROR\": 35,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 5: \"EOF\",\n 8: \"STRING\",\n 9: \"&\",\n 10: \"=\",\n 11: \"+\",\n 12: \"(\",\n 13: \")\",\n 14: \"<\",\n 15: \">\",\n 16: \"NOT\",\n 17: \"-\",\n 18: \"*\",\n 19: \"/\",\n 20: \"^\",\n 21: \"FUNCTION\",\n 24: \"ABSOLUTE_CELL\",\n 25: \"RELATIVE_CELL\",\n 26: \"MIXED_CELL\",\n 27: \":\",\n 28: \"ARRAY\",\n 29: \";\",\n 30: \",\",\n 31: \"VARIABLE\",\n 32: \"DECIMAL\",\n 33: \"NUMBER\",\n 34: \"%\",\n 35: \"ERROR\"\n },\n 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]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 1:\n return $$[$0 - 1];\n break;\n\n case 2:\n this.$ = yy.callVariable($$[$0][0]);\n break;\n\n case 3:\n this.$ = yy.toNumber($$[$0]);\n break;\n\n case 4:\n this.$ = yy.trimEdges($$[$0]);\n break;\n\n case 5:\n this.$ = yy.evaluateByOperator('&', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 6:\n this.$ = yy.evaluateByOperator('=', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 7:\n this.$ = yy.evaluateByOperator('+', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 8:\n this.$ = $$[$0 - 1];\n break;\n\n case 9:\n this.$ = yy.evaluateByOperator('<=', [$$[$0 - 3], $$[$0]]);\n break;\n\n case 10:\n this.$ = yy.evaluateByOperator('>=', [$$[$0 - 3], $$[$0]]);\n break;\n\n case 11:\n this.$ = yy.evaluateByOperator('<>', [$$[$0 - 3], $$[$0]]);\n break;\n\n case 12:\n this.$ = yy.evaluateByOperator('NOT', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 13:\n this.$ = yy.evaluateByOperator('>', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 14:\n this.$ = yy.evaluateByOperator('<', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 15:\n this.$ = yy.evaluateByOperator('-', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 16:\n this.$ = yy.evaluateByOperator('*', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 17:\n this.$ = yy.evaluateByOperator('/', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 18:\n this.$ = yy.evaluateByOperator('^', [$$[$0 - 2], $$[$0]]);\n break;\n\n case 19:\n var n1 = yy.invertNumber($$[$0]);\n this.$ = n1;\n\n if (isNaN(this.$)) {\n this.$ = 0;\n }\n\n break;\n\n case 20:\n var n1 = yy.toNumber($$[$0]);\n this.$ = n1;\n\n if (isNaN(this.$)) {\n this.$ = 0;\n }\n\n break;\n\n case 21:\n this.$ = yy.callFunction($$[$0 - 2]);\n break;\n\n case 22:\n this.$ = yy.callFunction($$[$0 - 3], $$[$0 - 1]);\n break;\n\n case 26:\n case 27:\n case 28:\n this.$ = yy.cellValue($$[$0]);\n break;\n\n case 29:\n case 30:\n case 31:\n case 32:\n case 33:\n case 34:\n case 35:\n case 36:\n case 37:\n this.$ = yy.rangeValue($$[$0 - 2], $$[$0]);\n break;\n\n case 38:\n case 42:\n this.$ = [$$[$0]];\n break;\n\n case 39:\n this.$ = yy.trimEdges(yytext).split(',');\n break;\n\n case 40:\n case 41:\n $$[$0 - 2].push($$[$0]);\n this.$ = $$[$0 - 2];\n break;\n\n case 43:\n this.$ = Array.isArray($$[$0 - 2]) ? $$[$0 - 2] : [$$[$0 - 2]];\n this.$.push($$[$0]);\n break;\n\n case 44:\n this.$ = $$[$0];\n break;\n\n case 45:\n this.$ = ($$[$0 - 2] + '.' + $$[$0]) * 1;\n break;\n\n case 46:\n this.$ = $$[$0 - 1] * 0.01;\n break;\n\n case 47:\n this.$ = yy.throwError($$[$0]);\n break;\n }\n },\n table: [{\n 2: 11,\n 3: 1,\n 4: 2,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 1: [3]\n }, {\n 5: [1, 18],\n 9: $Vb,\n 10: $Vc,\n 11: $Vd,\n 14: $Ve,\n 15: $Vf,\n 16: $Vg,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }, o($Vl, [2, 2], {\n 32: [1, 29]\n }), o($Vl, [2, 3], {\n 34: [1, 30]\n }), o($Vl, [2, 4]), {\n 2: 11,\n 4: 31,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 32,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 33,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 12: [1, 34]\n }, o($Vl, [2, 23]), o($Vl, [2, 24], {\n 2: 35,\n 35: $Va\n }), o($Vm, [2, 42]), o($Vn, [2, 44], {\n 32: [1, 36]\n }), o($Vl, [2, 26], {\n 27: [1, 37]\n }), o($Vl, [2, 27], {\n 27: [1, 38]\n }), o($Vl, [2, 28], {\n 27: [1, 39]\n }), o([5, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30, 35], [2, 47]), {\n 1: [2, 1]\n }, {\n 2: 11,\n 4: 40,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 41,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 42,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 45,\n 6: 3,\n 7: 4,\n 8: $V0,\n 10: [1, 43],\n 11: $V1,\n 12: $V2,\n 15: [1, 44],\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 47,\n 6: 3,\n 7: 4,\n 8: $V0,\n 10: [1, 46],\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 48,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 49,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 50,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 51,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 52,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 31: [1, 53]\n }, o($Vn, [2, 46]), {\n 9: $Vb,\n 10: $Vc,\n 11: $Vd,\n 13: [1, 54],\n 14: $Ve,\n 15: $Vf,\n 16: $Vg,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }, o($Vo, [2, 19], {\n 9: $Vb,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vo, [2, 20], {\n 9: $Vb,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), {\n 2: 11,\n 4: 57,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 13: [1, 55],\n 17: $V3,\n 21: $V4,\n 22: 56,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 28: [1, 58],\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, o($Vl, [2, 25]), {\n 33: [1, 59]\n }, {\n 24: [1, 60],\n 25: [1, 61],\n 26: [1, 62]\n }, {\n 24: [1, 63],\n 25: [1, 64],\n 26: [1, 65]\n }, {\n 24: [1, 66],\n 25: [1, 67],\n 26: [1, 68]\n }, o($Vl, [2, 5]), o([5, 10, 13, 29, 30], [2, 6], {\n 9: $Vb,\n 11: $Vd,\n 14: $Ve,\n 15: $Vf,\n 16: $Vg,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vo, [2, 7], {\n 9: $Vb,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), {\n 2: 11,\n 4: 69,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 70,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, o($Vp, [2, 14], {\n 9: $Vb,\n 11: $Vd,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), {\n 2: 11,\n 4: 71,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, o($Vp, [2, 13], {\n 9: $Vb,\n 11: $Vd,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o([5, 10, 13, 16, 29, 30], [2, 12], {\n 9: $Vb,\n 11: $Vd,\n 14: $Ve,\n 15: $Vf,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vo, [2, 15], {\n 9: $Vb,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vq, [2, 16], {\n 9: $Vb,\n 20: $Vk\n }), o($Vq, [2, 17], {\n 9: $Vb,\n 20: $Vk\n }), o([5, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30], [2, 18], {\n 9: $Vb\n }), o($Vm, [2, 43]), o($Vl, [2, 8]), o($Vl, [2, 21]), {\n 13: [1, 72],\n 29: [1, 73],\n 30: [1, 74]\n }, o($Vr, [2, 38], {\n 9: $Vb,\n 10: $Vc,\n 11: $Vd,\n 14: $Ve,\n 15: $Vf,\n 16: $Vg,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vr, [2, 39]), o($Vn, [2, 45]), o($Vl, [2, 29]), o($Vl, [2, 30]), o($Vl, [2, 31]), o($Vl, [2, 32]), o($Vl, [2, 33]), o($Vl, [2, 34]), o($Vl, [2, 35]), o($Vl, [2, 36]), o($Vl, [2, 37]), o($Vp, [2, 9], {\n 9: $Vb,\n 11: $Vd,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vp, [2, 11], {\n 9: $Vb,\n 11: $Vd,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vp, [2, 10], {\n 9: $Vb,\n 11: $Vd,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vl, [2, 22]), {\n 2: 11,\n 4: 75,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, {\n 2: 11,\n 4: 76,\n 6: 3,\n 7: 4,\n 8: $V0,\n 11: $V1,\n 12: $V2,\n 17: $V3,\n 21: $V4,\n 23: 10,\n 24: $V5,\n 25: $V6,\n 26: $V7,\n 31: $V8,\n 33: $V9,\n 35: $Va\n }, o($Vr, [2, 40], {\n 9: $Vb,\n 10: $Vc,\n 11: $Vd,\n 14: $Ve,\n 15: $Vf,\n 16: $Vg,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n }), o($Vr, [2, 41], {\n 9: $Vb,\n 10: $Vc,\n 11: $Vd,\n 14: $Ve,\n 15: $Vf,\n 16: $Vg,\n 17: $Vh,\n 18: $Vi,\n 19: $Vj,\n 20: $Vk\n })],\n defaultActions: {\n 18: [2, 1]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n // token stack\n vstack = [null],\n // semantic value stack\n lstack = [],\n // location stack\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1); //this.reductionCount = this.shiftCount = 0;\n\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n }; // copy state\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n var lex = function lex() {\n var token;\n token = lexer.lex() || EOF; // if token isn't its numeric value, convert\n\n if (typeof token !== 'number') {\n token = self.symbols_[token] || token;\n }\n\n return token;\n };\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n // retreive state number from top of stack\n state = stack[stack.length - 1]; // use default actions if available\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n } // read action for current state and first input\n\n\n action = table[state] && table[state][symbol];\n } // handle parse error\n\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n // Return the rule stack depth where the nearest error rule can be found.\n // Return FALSE when no error recovery rule was found.\n var locateNearestErrorRecoveryRule = function locateNearestErrorRecoveryRule(state) {\n var stack_probe = stack.length - 1;\n var depth = 0; // try to recover from error\n\n for (;;) {\n // check for error recovery rule in this state\n if (TERROR.toString() in table[state]) {\n return depth;\n }\n\n if (state === 0 || stack_probe < 2) {\n return false; // No suitable error recovery rule available.\n }\n\n stack_probe -= 2; // popStack(1): [symbol, action]\n\n state = stack[stack_probe];\n ++depth;\n }\n };\n\n var error_rule_depth;\n var errStr = '';\n\n if (!recovering) {\n // first see if there's any chance at hitting an error recovery rule:\n error_rule_depth = locateNearestErrorRecoveryRule(state); // Report error\n\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + \":\\n\" + lexer.showPosition() + \"\\nExpecting \" + expected.join(', ') + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected,\n recoverable: error_rule_depth !== false\n });\n } else if (preErrorSymbol !== EOF) {\n error_rule_depth = locateNearestErrorRecoveryRule(state);\n } // just recovered from another error\n\n\n if (recovering == 3) {\n if (symbol === EOF || preErrorSymbol === EOF) {\n throw new Error(errStr || 'Parsing halted while starting to recover from another error.');\n } // discard current lookahead and grab another\n\n\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n symbol = lex();\n } // try to recover from error\n\n\n if (error_rule_depth === false) {\n throw new Error(errStr || 'Parsing halted. No suitable error recovery rule available.');\n }\n\n popStack(error_rule_depth);\n preErrorSymbol = symbol == TERROR ? null : symbol; // save the lookahead token\n\n symbol = TERROR; // insert generic error symbol as new lookahead\n\n state = stack[stack.length - 1];\n action = table[state] && table[state][TERROR];\n recovering = 3; // allow 3 real symbols to be shifted before reporting a new error\n } // this shouldn't happen, unless resolve defaults are off\n\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n // shift\n //this.shiftCount++;\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]); // push state\n\n symbol = null;\n\n if (!preErrorSymbol) {\n // normal execution/no error\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n // error just occurred, resume old lookahead f/ before error\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n // reduce\n //this.reductionCount++;\n len = this.productions_[action[1]][1]; // perform semantic action\n\n yyval.$ = vstack[vstack.length - len]; // default to $$ = $1\n // default location, uses first token for firsts, last for lasts\n\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n } // pop off stack\n\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)\n\n vstack.push(yyval.$);\n lstack.push(yyval._$); // goto new state = table[STATE][NONTERMINAL]\n\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n // accept\n return true;\n }\n }\n\n return true;\n }\n};\n/* generated by jison-lex 0.3.4 */\n\nvar lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {},\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n /* skip whitespace */\n break;\n\n case 1:\n return 8;\n break;\n\n case 2:\n return 8;\n break;\n\n case 3:\n return 21;\n break;\n\n case 4:\n return 35;\n break;\n\n case 5:\n return 24;\n break;\n\n case 6:\n return 26;\n break;\n\n case 7:\n return 26;\n break;\n\n case 8:\n return 25;\n break;\n\n case 9:\n return 21;\n break;\n\n case 10:\n return 31;\n break;\n\n case 11:\n return 31;\n break;\n\n case 12:\n return 33;\n break;\n\n case 13:\n return 28;\n break;\n\n case 14:\n return 9;\n break;\n\n case 15:\n return ' ';\n break;\n\n case 16:\n return 32;\n break;\n\n case 17:\n return 27;\n break;\n\n case 18:\n return 29;\n break;\n\n case 19:\n return 30;\n break;\n\n case 20:\n return 18;\n break;\n\n case 21:\n return 19;\n break;\n\n case 22:\n return 17;\n break;\n\n case 23:\n return 11;\n break;\n\n case 24:\n return 20;\n break;\n\n case 25:\n return 12;\n break;\n\n case 26:\n return 13;\n break;\n\n case 27:\n return 15;\n break;\n\n case 28:\n return 14;\n break;\n\n case 29:\n return 16;\n break;\n\n case 30:\n return '\"';\n break;\n\n case 31:\n return \"'\";\n break;\n\n case 32:\n return \"!\";\n break;\n\n case 33:\n return 10;\n break;\n\n case 34:\n return 34;\n break;\n\n case 35:\n return '#';\n break;\n\n case 36:\n return 5;\n break;\n }\n },\n 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)/, /^(?:\")/, /^(?:')/, /^(?:!)/, /^(?:=)/, /^(?:%)/, /^(?:[#])/, /^(?:$)/],\n conditions: {\n \"INITIAL\": {\n \"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],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n}();\n\nparser.lexer = lexer;\nexport function Parser() {\n this.yy = {};\n}\nParser.prototype = parser;\nparser.Parser = Parser;","/* eslint-disable import/prefer-default-export */\n\n/**\n * Trim value by cutting character starting from the beginning and ending at the same time.\n *\n * @param {String} string String to trimming.\n * @param {Number} [margin=1] Number of character to cut.\n * @returns {String}\n */\nexport function trimEdges(string) {\n var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n string = string.substring(margin, string.length - margin);\n return string;\n}","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n/**\n * Convert row label to index.\n *\n * @param {String} label Row label (eq. '1', '5')\n * @returns {Number} Returns -1 if label is not recognized otherwise proper row index.\n */\n\n\nexport function rowLabelToIndex(label) {\n var result = parseInt(label, 10);\n\n if (isNaN(result)) {\n result = -1;\n } else {\n result = Math.max(result - 1, -1);\n }\n\n return result;\n}\n/**\n * Convert row index to label.\n *\n * @param {Number} row Row index.\n * @returns {String} Returns row label (eq. '1', '7').\n */\n\nexport function rowIndexToLabel(row) {\n var result = '';\n\n if (row >= 0) {\n result = \"\".concat(row + 1);\n }\n\n return result;\n}\nvar COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nvar COLUMN_LABEL_BASE_LENGTH = COLUMN_LABEL_BASE.length;\n/**\n * Convert column label to index.\n *\n * @param {String} label Column label (eq. 'ABB', 'CNQ')\n * @returns {Number} Returns -1 if label is not recognized otherwise proper column index.\n */\n\nexport function columnLabelToIndex(label) {\n var result = 0;\n\n if (typeof label === 'string') {\n label = label.toUpperCase();\n\n for (var i = 0, j = label.length - 1; i < label.length; i += 1, j -= 1) {\n result += Math.pow(COLUMN_LABEL_BASE_LENGTH, j) * (COLUMN_LABEL_BASE.indexOf(label[i]) + 1);\n }\n }\n\n --result;\n return result;\n}\n/**\n * Convert column index to label.\n *\n * @param {Number} column Column index.\n * @returns {String} Returns column label (eq. 'ABB', 'CNQ').\n */\n\nexport function columnIndexToLabel(column) {\n var result = '';\n\n while (column >= 0) {\n result = String.fromCharCode(column % COLUMN_LABEL_BASE_LENGTH + 97) + result;\n column = Math.floor(column / COLUMN_LABEL_BASE_LENGTH) - 1;\n }\n\n return result.toUpperCase();\n}\nvar LABEL_EXTRACT_REGEXP = /^([$])?([A-Za-z]+)([$])?([0-9]+)$/;\n/**\n * Extract cell coordinates.\n *\n * @param {String} label Cell coordinates (eq. 'A1', '$B6', '$N$98').\n * @returns {Array} Returns an array of objects.\n */\n\nexport function extractLabel(label) {\n if (typeof label !== 'string' || !LABEL_EXTRACT_REGEXP.test(label)) {\n return [];\n }\n\n var _label$toUpperCase$ma = label.toUpperCase().match(LABEL_EXTRACT_REGEXP),\n _label$toUpperCase$ma2 = _slicedToArray(_label$toUpperCase$ma, 5),\n columnAbs = _label$toUpperCase$ma2[1],\n column = _label$toUpperCase$ma2[2],\n rowAbs = _label$toUpperCase$ma2[3],\n row = _label$toUpperCase$ma2[4];\n\n return [{\n index: rowLabelToIndex(row),\n label: row,\n isAbsolute: rowAbs === '$'\n }, {\n index: columnLabelToIndex(column),\n label: column,\n isAbsolute: columnAbs === '$'\n }];\n}\n/**\n * Convert row and column indexes into cell label.\n *\n * @param {Object} row Object with `index` and `isAbsolute` properties.\n * @param {Object} column Object with `index` and `isAbsolute` properties.\n * @returns {String} Returns cell label.\n */\n\nexport function toLabel(row, column) {\n var rowLabel = (row.isAbsolute ? '$' : '') + rowIndexToLabel(row.index);\n var columnLabel = (column.isAbsolute ? '$' : '') + columnIndexToLabel(column.index);\n return columnLabel + rowLabel;\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport Emitter from 'tiny-emitter';\nimport evaluateByOperator from \"./evaluate-by-operator/evaluate-by-operator.mjs\";\nimport { Parser as GrammarParser } from \"./grammar-parser/grammar-parser.mjs\";\nimport { trimEdges } from \"./helper/string.mjs\";\nimport { toNumber, invertNumber } from \"./helper/number.mjs\";\nimport errorParser, { isValidStrict as isErrorValid, ERROR, ERROR_NAME } from \"./error.mjs\";\nimport { extractLabel, toLabel } from \"./helper/cell.mjs\";\n/**\n * @class Parser\n */\n\nvar Parser = /*#__PURE__*/function (_Emitter) {\n _inherits(Parser, _Emitter);\n\n var _super = _createSuper(Parser);\n\n function Parser() {\n var _this;\n\n _classCallCheck(this, Parser);\n\n _this = _super.call(this);\n _this.parser = new GrammarParser();\n _this.parser.yy = {\n toNumber: toNumber,\n trimEdges: trimEdges,\n invertNumber: invertNumber,\n throwError: function throwError(errorName) {\n return _this._throwError(errorName);\n },\n callVariable: function callVariable(variable) {\n return _this._callVariable(variable);\n },\n evaluateByOperator: evaluateByOperator,\n callFunction: function callFunction(name, params) {\n return _this._callFunction(name, params);\n },\n cellValue: function cellValue(value) {\n return _this._callCellValue(value);\n },\n rangeValue: function rangeValue(start, end) {\n return _this._callRangeValue(start, end);\n }\n };\n _this.variables = Object.create(null);\n _this.functions = Object.create(null);\n\n _this.setVariable('TRUE', true).setVariable('FALSE', false).setVariable('NULL', null);\n\n return _this;\n }\n /**\n * Parse formula expression.\n *\n * @param {String} expression to parse.\n * @return {*} Returns an object with tow properties `error` and `result`.\n */\n\n\n _createClass(Parser, [{\n key: \"parse\",\n value: function parse(expression) {\n var result = null;\n var error = null;\n\n try {\n if (expression === '') {\n result = '';\n } else {\n result = this.parser.parse(expression);\n }\n } catch (ex) {\n var message = errorParser(ex.message);\n\n if (message) {\n error = message;\n } else {\n error = errorParser(ERROR);\n }\n }\n\n if (result instanceof Error) {\n error = errorParser(result.message) || errorParser(ERROR);\n result = null;\n }\n\n return {\n error: error,\n result: result\n };\n }\n /**\n * Set predefined variable name which can be visible while parsing formula expression.\n *\n * @param {String} name Variable name.\n * @param {*} value Variable value.\n * @returns {Parser}\n */\n\n }, {\n key: \"setVariable\",\n value: function setVariable(name, value) {\n this.variables[name] = value;\n return this;\n }\n /**\n * Get variable name.\n *\n * @param {String} name Variable name.\n * @returns {*}\n */\n\n }, {\n key: \"getVariable\",\n value: function getVariable(name) {\n return this.variables[name];\n }\n /**\n * Retrieve variable value by its name.\n *\n * @param name Variable name.\n * @returns {*}\n * @private\n */\n\n }, {\n key: \"_callVariable\",\n value: function _callVariable(name) {\n var value = this.getVariable(name);\n this.emit('callVariable', name, function (newValue) {\n if (newValue !== void 0) {\n value = newValue;\n }\n });\n\n if (value === void 0) {\n throw Error(ERROR_NAME);\n }\n\n return value;\n }\n /**\n * Set custom function which can be visible while parsing formula expression.\n *\n * @param {String} name Custom function name.\n * @param {Function} fn Custom function.\n * @returns {Parser}\n */\n\n }, {\n key: \"setFunction\",\n value: function setFunction(name, fn) {\n this.functions[name] = fn;\n return this;\n }\n /**\n * Get custom function.\n *\n * @param {String} name Custom function name.\n * @returns {*}\n */\n\n }, {\n key: \"getFunction\",\n value: function getFunction(name) {\n return this.functions[name];\n }\n /**\n * Call function with provided params.\n *\n * @param name Function name.\n * @param params Function params.\n * @returns {*}\n * @private\n */\n\n }, {\n key: \"_callFunction\",\n value: function _callFunction(name) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var fn = this.getFunction(name);\n var value;\n\n if (fn) {\n value = fn(params);\n }\n\n this.emit('callFunction', name, params, function (newValue) {\n if (newValue !== void 0) {\n value = newValue;\n }\n });\n return value === void 0 ? evaluateByOperator(name, params) : value;\n }\n /**\n * Retrieve value by its label (`B3`, `B$3`, `B$3`, `$B$3`).\n *\n * @param {String} label Coordinates.\n * @returns {*}\n * @private\n */\n\n }, {\n key: \"_callCellValue\",\n value: function _callCellValue(label) {\n label = label.toUpperCase();\n\n var _extractLabel = extractLabel(label),\n _extractLabel2 = _slicedToArray(_extractLabel, 2),\n row = _extractLabel2[0],\n column = _extractLabel2[1];\n\n var value = void 0;\n this.emit('callCellValue', {\n label: label,\n row: row,\n column: column\n }, function (_value) {\n value = _value;\n });\n return value;\n }\n /**\n * Retrieve value by its label (`B3:A1`, `B$3:A1`, `B$3:$A1`, `$B$3:A$1`).\n *\n * @param {String} startLabel Coordinates of the first cell.\n * @param {String} endLabel Coordinates of the last cell.\n * @returns {Array} Returns an array of mixed values.\n * @private\n */\n\n }, {\n key: \"_callRangeValue\",\n value: function _callRangeValue(startLabel, endLabel) {\n startLabel = startLabel.toUpperCase();\n endLabel = endLabel.toUpperCase();\n\n var _extractLabel3 = extractLabel(startLabel),\n _extractLabel4 = _slicedToArray(_extractLabel3, 2),\n startRow = _extractLabel4[0],\n startColumn = _extractLabel4[1];\n\n var _extractLabel5 = extractLabel(endLabel),\n _extractLabel6 = _slicedToArray(_extractLabel5, 2),\n endRow = _extractLabel6[0],\n endColumn = _extractLabel6[1];\n\n var startCell = {};\n var endCell = {};\n\n if (startRow.index <= endRow.index) {\n startCell.row = startRow;\n endCell.row = endRow;\n } else {\n startCell.row = endRow;\n endCell.row = startRow;\n }\n\n if (startColumn.index <= endColumn.index) {\n startCell.column = startColumn;\n endCell.column = endColumn;\n } else {\n startCell.column = endColumn;\n endCell.column = startColumn;\n }\n\n startCell.label = toLabel(startCell.row, startCell.column);\n endCell.label = toLabel(endCell.row, endCell.column);\n var value = [];\n this.emit('callRangeValue', startCell, endCell, function () {\n var _value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n value = _value;\n });\n return value;\n }\n /**\n * Try to throw error by its name.\n *\n * @param {String} errorName Error name.\n * @returns {String}\n * @private\n */\n\n }, {\n key: \"_throwError\",\n value: function _throwError(errorName) {\n if (isErrorValid(errorName)) {\n throw Error(errorName);\n }\n\n throw Error(ERROR);\n }\n }]);\n\n return Parser;\n}(Emitter);\n\nexport default Parser;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { toLabel } from 'hot-formula-parser';\nimport { isObject } from \"../../../helpers/object.mjs\";\n/**\n * @class BaseCell\n * @util\n */\n\nvar BaseCell = /*#__PURE__*/function () {\n function BaseCell(row, column) {\n _classCallCheck(this, BaseCell);\n\n var rowObject = isObject(row);\n var columnObject = isObject(column);\n this._row = rowObject ? row.index : row;\n this.rowAbsolute = rowObject ? row.isAbsolute : true;\n this._column = columnObject ? column.index : column;\n this.columnAbsolute = columnObject ? column.isAbsolute : true;\n this.rowOffset = 0;\n this.columnOffset = 0; // TODO: Change syntax to es6 after upgrade tests to newer version of phantom and jasmine.\n\n Object.defineProperty(this, 'row', {\n get: function get() {\n return this.rowOffset + this._row;\n },\n set: function set(rowIndex) {\n this._row = rowIndex;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(this, 'column', {\n get: function get() {\n return this.columnOffset + this._column;\n },\n set: function set(columnIndex) {\n this._column = columnIndex;\n },\n enumerable: true,\n configurable: true\n });\n }\n /**\n * Translate cell coordinates.\n *\n * @param {number} rowOffset Row offset to move.\n * @param {number} columnOffset Column offset to move.\n */\n\n\n _createClass(BaseCell, [{\n key: \"translateTo\",\n value: function translateTo(rowOffset, columnOffset) {\n this.row = this.row + rowOffset;\n this.column = this.column + columnOffset;\n }\n /**\n * Check if cell is equal to provided one.\n *\n * @param {BaseCell} cell Cell object.\n * @returns {boolean}\n */\n\n }, {\n key: \"isEqual\",\n value: function isEqual(cell) {\n return cell.row === this.row && cell.column === this.column;\n }\n /**\n * Stringify object.\n *\n * @returns {string}\n */\n\n }, {\n key: \"toString\",\n value: function toString() {\n return toLabel({\n index: this.row,\n isAbsolute: this.rowAbsolute\n }, {\n index: this.column,\n isAbsolute: this.columnAbsolute\n });\n }\n }]);\n\n return BaseCell;\n}();\n\nexport default BaseCell;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { ERROR_REF } from 'hot-formula-parser';\nimport { arrayFilter } from \"../../../helpers/array.mjs\";\nimport BaseCell from \"./_base.mjs\";\nvar STATE_OUT_OFF_DATE = 1;\nvar STATE_COMPUTING = 2;\nvar STATE_UP_TO_DATE = 3;\nvar states = [STATE_OUT_OFF_DATE, STATE_COMPUTING, STATE_UP_TO_DATE];\n/**\n * Class responsible for wrapping formula expression. It contains calculated value of\n * the formula, an error if it has happened and cell references which indicates a relationship with regular\n * cells. This object uses physical cell coordinates.\n *\n * @class CellValue\n * @util\n */\n\nvar CellValue = /*#__PURE__*/function (_BaseCell) {\n _inherits(CellValue, _BaseCell);\n\n var _super = _createSuper(CellValue);\n\n function CellValue(row, column) {\n var _this;\n\n _classCallCheck(this, CellValue);\n\n _this = _super.call(this, row, column);\n /**\n * List of precedents cells.\n *\n * @type {Array}\n */\n\n _this.precedents = [];\n /**\n * Computed value.\n *\n * @type {*}\n */\n\n _this.value = null;\n /**\n * Error name.\n *\n * @type {string|null}\n */\n\n _this.error = null;\n /**\n * Indicates cell state.\n *\n * @type {string}\n */\n\n _this.state = CellValue.STATE_UP_TO_DATE;\n return _this;\n }\n /**\n * Set computed value.\n *\n * @param {*} value The calculated formula value.\n */\n\n\n _createClass(CellValue, [{\n key: \"setValue\",\n value: function setValue(value) {\n this.value = value;\n }\n /**\n * Get computed value.\n *\n * @returns {*}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.value;\n }\n /**\n * Set error message for this cell.\n *\n * @param {string} error Error name.\n */\n\n }, {\n key: \"setError\",\n value: function setError(error) {\n this.error = error;\n }\n /**\n * Get error name for this cell.\n *\n * @returns {string|null}\n */\n\n }, {\n key: \"getError\",\n value: function getError() {\n return this.error;\n }\n /**\n * Check if cell value is marked as error.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"hasError\",\n value: function hasError() {\n return this.error !== null;\n }\n /**\n * Set cell state.\n *\n * @param {number} state Cell state.\n */\n\n }, {\n key: \"setState\",\n value: function setState(state) {\n if (states.indexOf(state) === -1) {\n throw Error(\"Unrecognized state: \".concat(state));\n }\n\n this.state = state;\n }\n /**\n * Check cell state.\n *\n * @param {number} state The state to compare with.\n * @returns {boolean}\n */\n\n }, {\n key: \"isState\",\n value: function isState(state) {\n return this.state === state;\n }\n /**\n * Add precedent cell to the collection.\n *\n * @param {CellReference} cellReference Cell reference object.\n */\n\n }, {\n key: \"addPrecedent\",\n value: function addPrecedent(cellReference) {\n if (this.isEqual(cellReference)) {\n throw Error(ERROR_REF);\n }\n\n if (!this.hasPrecedent(cellReference)) {\n this.precedents.push(cellReference);\n }\n }\n /**\n * Remove precedent cell from the collection.\n *\n * @param {CellReference} cellReference Cell reference object.\n */\n\n }, {\n key: \"removePrecedent\",\n value: function removePrecedent(cellReference) {\n if (this.isEqual(cellReference)) {\n throw Error(ERROR_REF);\n }\n\n this.precedents = arrayFilter(this.precedents, function (cell) {\n return !cell.isEqual(cellReference);\n });\n }\n /**\n * Clear all precedent cells.\n */\n\n }, {\n key: \"clearPrecedents\",\n value: function clearPrecedents() {\n this.precedents.length = 0;\n }\n /**\n * Get precedent cells.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getPrecedents\",\n value: function getPrecedents() {\n return this.precedents;\n }\n /**\n * Check if cell value has precedents cells.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"hasPrecedents\",\n value: function hasPrecedents() {\n return this.precedents.length > 0;\n }\n /**\n * Check if cell reference is precedents this cell.\n *\n * @param {CellReference} cellReference Cell reference object.\n * @returns {boolean}\n */\n\n }, {\n key: \"hasPrecedent\",\n value: function hasPrecedent(cellReference) {\n return arrayFilter(this.precedents, function (cell) {\n return cell.isEqual(cellReference);\n }).length > 0;\n }\n }], [{\n key: \"STATE_OUT_OFF_DATE\",\n get:\n /**\n * Out of date state indicates cells ready for recomputing.\n *\n * @returns {number}\n */\n function get() {\n return 1; // PhantomJS crashes when we want to use constant above\n }\n /**\n * Computing state indicates cells under processing.\n *\n * @returns {number}\n */\n\n }, {\n key: \"STATE_COMPUTING\",\n get: function get() {\n return 2; // PhantomJS crashes when we want to use constant above\n }\n /**\n * Up to date state indicates cells with fresh computed value.\n *\n * @returns {number}\n */\n\n }, {\n key: \"STATE_UP_TO_DATE\",\n get: function get() {\n return 3; // PhantomJS crashes when we want to use constant above\n }\n }]);\n\n return CellValue;\n}(BaseCell);\n\nexport default CellValue;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.object.get-prototype-of.js\";\nimport \"core-js/modules/es.object.set-prototype-of.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { toLabel } from 'hot-formula-parser';\nimport BaseCell from \"./_base.mjs\";\n/**\n * Class which indicates formula expression precedents cells at specified cell\n * coordinates (CellValue). This object uses visual cell coordinates.\n *\n * @class CellReference\n * @util\n */\n\nvar CellReference = /*#__PURE__*/function (_BaseCell) {\n _inherits(CellReference, _BaseCell);\n\n var _super = _createSuper(CellReference);\n\n function CellReference() {\n _classCallCheck(this, CellReference);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(CellReference, [{\n key: \"toString\",\n value:\n /**\n * Stringify object.\n *\n * @returns {string}\n */\n function toString() {\n return toLabel({\n index: this.row,\n isAbsolute: false\n }, {\n index: this.column,\n isAbsolute: false\n });\n }\n }]);\n\n return CellReference;\n}(BaseCell);\n\nexport default CellReference;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.index-of.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach, arrayFilter, arrayReduce } from \"../../helpers/array.mjs\";\nimport CellValue from \"./cell/value.mjs\";\n/**\n * This component is responsible for storing all calculated cells which contain formula expressions (CellValue) and\n * register for all cell references (CellReference).\n *\n * CellValue is an object which represents a formula expression. It contains a calculated value of that formula,\n * an error if applied and cell references. Cell references are CellReference object instances which represent a cell\n * in a spreadsheet. One CellReference can be assigned to multiple CellValues as a precedent cell. Each cell\n * modification triggers a search through CellValues that are dependent of the CellReference. After\n * the match, the cells are marked as 'out of date'. In the next render cycle, all CellValues marked with\n * that state are recalculated.\n *\n * @class Matrix\n * @util\n */\n\nvar Matrix = /*#__PURE__*/function () {\n function Matrix(hot) {\n _classCallCheck(this, Matrix);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hot;\n /**\n * List of all cell values with theirs precedents.\n *\n * @type {Array}\n */\n\n this.data = [];\n /**\n * List of all created and registered cell references.\n *\n * @type {Array}\n */\n\n this.cellReferences = [];\n }\n /**\n * Get cell value at given row and column index.\n *\n * @param {number} row Physical row index.\n * @param {number} column Physical column index.\n * @returns {CellValue|null} Returns CellValue instance or `null` if cell not found.\n */\n\n\n _createClass(Matrix, [{\n key: \"getCellAt\",\n value: function getCellAt(row, column) {\n var result = null;\n arrayEach(this.data, function (cell) {\n if (cell.row === row && cell.column === column) {\n result = cell;\n return false;\n }\n });\n return result;\n }\n /**\n * Get all out of date cells.\n *\n * @returns {Array}\n */\n\n }, {\n key: \"getOutOfDateCells\",\n value: function getOutOfDateCells() {\n return arrayFilter(this.data, function (cell) {\n return cell.isState(CellValue.STATE_OUT_OFF_DATE);\n });\n }\n /**\n * Add cell value to the collection.\n *\n * @param {CellValue|object} cellValue Cell value object.\n */\n\n }, {\n key: \"add\",\n value: function add(cellValue) {\n if (!arrayFilter(this.data, function (cell) {\n return cell.isEqual(cellValue);\n }).length) {\n this.data.push(cellValue);\n }\n }\n /**\n * Remove cell value from the collection.\n *\n * @param {CellValue|object|Array} cellValue Cell value object.\n */\n\n }, {\n key: \"remove\",\n value: function remove(cellValue) {\n var isArray = Array.isArray(cellValue);\n\n var isEqual = function isEqual(cell, values) {\n var result = false;\n\n if (isArray) {\n arrayEach(values, function (value) {\n if (cell.isEqual(value)) {\n result = true;\n return false;\n }\n });\n } else {\n result = cell.isEqual(values);\n }\n\n return result;\n };\n\n this.data = arrayFilter(this.data, function (cell) {\n return !isEqual(cell, cellValue);\n });\n }\n /**\n * Get cell dependencies using visual coordinates.\n *\n * @param {object} cellCoord Visual cell coordinates object.\n * @returns {Array}\n */\n\n }, {\n key: \"getDependencies\",\n value: function getDependencies(cellCoord) {\n var _this = this;\n /* eslint-disable arrow-body-style */\n\n\n var getDependencies = function getDependencies(cell) {\n return arrayReduce(_this.data, function (acc, cellValue) {\n if (cellValue.hasPrecedent(cell) && acc.indexOf(cellValue) === -1) {\n acc.push(cellValue);\n }\n\n return acc;\n }, []);\n };\n\n var getTotalDependencies = function getTotalDependencies(cell) {\n var deps = getDependencies(cell);\n\n if (deps.length) {\n arrayEach(deps, function (cellValue) {\n if (cellValue.hasPrecedents()) {\n deps = deps.concat(getTotalDependencies({\n row: _this.hot.toVisualRow(cellValue.row),\n column: _this.hot.toVisualColumn(cellValue.column)\n }));\n }\n });\n }\n\n return deps;\n };\n\n return getTotalDependencies(cellCoord);\n }\n /**\n * Register cell reference to the collection.\n *\n * @param {CellReference|object} cellReference Cell reference object.\n */\n\n }, {\n key: \"registerCellRef\",\n value: function registerCellRef(cellReference) {\n if (!arrayFilter(this.cellReferences, function (cell) {\n return cell.isEqual(cellReference);\n }).length) {\n this.cellReferences.push(cellReference);\n }\n }\n /**\n * Remove cell references from the collection.\n *\n * @param {object} start Start visual coordinate.\n * @param {object} end End visual coordinate.\n * @returns {Array} Returns removed cell references.\n */\n\n }, {\n key: \"removeCellRefsAtRange\",\n value: function removeCellRefsAtRange(_ref, _ref2) {\n var startRow = _ref.row,\n startColumn = _ref.column;\n var endRow = _ref2.row,\n endColumn = _ref2.column;\n var removed = [];\n\n var rowMatch = function rowMatch(cell) {\n return startRow === void 0 ? true : cell.row >= startRow && cell.row <= endRow;\n };\n\n var colMatch = function colMatch(cell) {\n return startColumn === void 0 ? true : cell.column >= startColumn && cell.column <= endColumn;\n };\n\n this.cellReferences = arrayFilter(this.cellReferences, function (cell) {\n if (rowMatch(cell) && colMatch(cell)) {\n removed.push(cell);\n return false;\n }\n\n return true;\n });\n return removed;\n }\n /**\n * Reset matrix data.\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n this.data.length = 0;\n this.cellReferences.length = 0;\n }\n }]);\n\n return Matrix;\n}();\n\nexport default Matrix;","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.string.starts-with.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { toLabel as _toLabel, extractLabel, error, ERROR_REF } from 'hot-formula-parser';\nimport { arrayEach, arrayFilter } from \"../../helpers/array.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nimport { toUpperCaseFormula } from \"./utils.mjs\";\nvar BARE_CELL_STRICT_REGEX = /^\\$?[A-Z]+\\$?\\d+$/;\nvar BARE_CELL_REGEX = /\\$?[A-Z]+\\$?\\d+/;\nvar CELL_REGEX = /(?:[^0-9A-Z$: ]|^)\\s*(\\$?[A-Z]+\\$?\\d+)\\s*(?![0-9A-Z_: ])/g;\nvar RANGE_REGEX = /\\$?[A-Z]+\\$?\\d+\\s*:\\s*\\$?[A-Z]+\\$?\\d+/g;\nvar CELL_AND_RANGE_REGEX = /((?:[^0-9A-Z$: ]|^)\\s*(\\$?[A-Z]+\\$?\\d+)\\s*(?![0-9A-Z_: ]))|(\\$?[A-Z]+\\$?\\d+\\s*:\\s*\\$?[A-Z]+\\$?\\d+)/g; // eslint-disable-line max-len\n\n/**\n * Component adds an ability to parse and modify formula expressions. It is designed for translating cell\n * coordinates and cell ranges in any direction. By default, component translates only relative coordinates but this\n * behavior can be overwritten by passing custom modifier which controls translating process.\n *\n * @class ExpressionModifier\n * @util\n */\n\nvar ExpressionModifier = /*#__PURE__*/function () {\n function ExpressionModifier(expression) {\n _classCallCheck(this, ExpressionModifier);\n /**\n * Formula expression to modify.\n *\n * @type {string}\n */\n\n\n this.expression = '';\n /**\n * Extracted cells and cells ranges.\n *\n * @type {Array}\n */\n\n this.cells = [];\n /**\n * Function which can modify default behaviour of how cells and cell ranges will be translated.\n *\n * @type {null|Function}\n */\n\n this.customModifier = null;\n\n if (typeof expression === 'string') {\n this.setExpression(expression);\n }\n }\n /**\n * Set formula expression to modify.\n *\n * @param {string} expression Formula expression to process.\n * @returns {ExpressionModifier}\n */\n\n\n _createClass(ExpressionModifier, [{\n key: \"setExpression\",\n value: function setExpression(expression) {\n this.cells.length = 0;\n this.expression = toUpperCaseFormula(expression);\n\n this._extractCells();\n\n this._extractCellsRange();\n\n return this;\n }\n /**\n * Set function which can modify default behavior of how cells and cell ranges will be translated.\n * The passed function will be called with 4 arguments:\n * - cell, A cell object with structure\n * like this: {start: {row, column}, end: {row, column}, origLabel, type: 'cell|range', refError, toLabel: () => {}}\n * - axis, Type of currently processing axis ('row' or 'column')\n * - delta, Number as distance to translate. Can be positive or negative.\n * - startFromIndex, Base index which translation will be applied from.\n *\n * The function must return an array with 3 items, where:\n * [\n * deltaStart, Number as a delta to translate first part of coordinates.\n * DeltaEnd, Number as a delta to translate second part of coordinates (if cell range is modified).\n * RefError, Defines an error which refers to the situation when translated cell overcrossed the data boundary.\n * ].\n *\n *\n * @param {Function} customModifier Function with custom logic.\n */\n\n }, {\n key: \"useCustomModifier\",\n value: function useCustomModifier(customModifier) {\n this.customModifier = customModifier;\n }\n /**\n * Translate formula expression cells.\n *\n * @param {object} delta Distance to move in proper direction.\n * @param {object} [startFrom] Coordinates which translation will be applied from.\n * @returns {ExpressionModifier}\n */\n\n }, {\n key: \"translate\",\n value: function translate(_ref) {\n var _this = this;\n\n var deltaRow = _ref.row,\n deltaColumn = _ref.column;\n var startFrom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n arrayEach(this.cells, function (cell) {\n if (deltaRow !== null && deltaRow !== void 0) {\n _this._translateCell(cell, 'row', deltaRow, startFrom.row);\n }\n\n if (deltaColumn !== null && deltaColumn !== void 0) {\n _this._translateCell(cell, 'column', deltaColumn, startFrom.column);\n }\n });\n return this;\n }\n /**\n * Translate object into string representation.\n *\n * @returns {string}\n */\n\n }, {\n key: \"toString\",\n value: function toString() {\n var _this2 = this;\n\n var expression = this.expression.replace(CELL_AND_RANGE_REGEX, function (match, p1, p2) {\n var isSingleCell = match.indexOf(':') === -1;\n var result = match;\n var cellLabel = match;\n var translatedCellLabel = null;\n\n if (isSingleCell) {\n cellLabel = BARE_CELL_STRICT_REGEX.test(p1) ? p1 : p2;\n }\n\n var cell = _this2._searchCell(cellLabel);\n\n if (cell) {\n translatedCellLabel = cell.refError ? error(ERROR_REF) : cell.toLabel();\n\n if (isSingleCell) {\n result = match.replace(cellLabel, translatedCellLabel);\n } else {\n result = translatedCellLabel;\n }\n }\n\n return result;\n });\n\n if (!expression.startsWith('=')) {\n expression = \"=\".concat(expression);\n }\n\n return expression;\n }\n /**\n * Translate single cell.\n *\n * @param {object} cell Cell object.\n * @param {string} axis Axis to modify.\n * @param {number} delta Distance to move.\n * @param {number} [startFromIndex] Base index which translation will be applied from.\n * @private\n */\n\n }, {\n key: \"_translateCell\",\n value: function _translateCell(cell, axis, delta, startFromIndex) {\n var start = cell.start,\n end = cell.end;\n var startIndex = start[axis].index;\n var endIndex = end[axis].index;\n var deltaStart = delta;\n var deltaEnd = delta;\n var refError = false;\n\n if (this.customModifier) {\n var _this$customModifier = this.customModifier(cell, axis, delta, startFromIndex);\n\n var _this$customModifier2 = _slicedToArray(_this$customModifier, 3);\n\n deltaStart = _this$customModifier2[0];\n deltaEnd = _this$customModifier2[1];\n refError = _this$customModifier2[2];\n } else {\n // By default only relative cells are translated, if meets absolute reset deltas to 0\n if (start[axis].isAbsolute) {\n deltaStart = 0;\n }\n\n if (end[axis].isAbsolute) {\n deltaEnd = 0;\n }\n }\n\n if (deltaStart && !refError) {\n if (startIndex + deltaStart < 0) {\n refError = true;\n }\n\n start[axis].index = Math.max(startIndex + deltaStart, 0);\n }\n\n if (deltaEnd && !refError) {\n if (endIndex + deltaEnd < 0) {\n refError = true;\n }\n\n end[axis].index = Math.max(endIndex + deltaEnd, 0);\n }\n\n if (refError) {\n cell.refError = true;\n }\n }\n /**\n * Extract all cells from the formula expression.\n *\n * @private\n */\n\n }, {\n key: \"_extractCells\",\n value: function _extractCells() {\n var _this3 = this;\n\n var matches = this.expression.match(CELL_REGEX);\n\n if (!matches) {\n return;\n }\n\n arrayEach(matches, function (coord) {\n var cellCoords = coord.match(BARE_CELL_REGEX);\n\n if (!cellCoords) {\n return;\n }\n\n var _extractLabel = extractLabel(cellCoords[0]),\n _extractLabel2 = _slicedToArray(_extractLabel, 2),\n row = _extractLabel2[0],\n column = _extractLabel2[1];\n\n _this3.cells.push(_this3._createCell({\n row: row,\n column: column\n }, {\n row: row,\n column: column\n }, cellCoords[0]));\n });\n }\n /**\n * Extract all cells range from the formula expression.\n *\n * @private\n */\n\n }, {\n key: \"_extractCellsRange\",\n value: function _extractCellsRange() {\n var _this4 = this;\n\n var matches = this.expression.match(RANGE_REGEX);\n\n if (!matches) {\n return;\n }\n\n arrayEach(matches, function (match) {\n var _match$split = match.split(':'),\n _match$split2 = _slicedToArray(_match$split, 2),\n start = _match$split2[0],\n end = _match$split2[1];\n\n var _extractLabel3 = extractLabel(start),\n _extractLabel4 = _slicedToArray(_extractLabel3, 2),\n startRow = _extractLabel4[0],\n startColumn = _extractLabel4[1];\n\n var _extractLabel5 = extractLabel(end),\n _extractLabel6 = _slicedToArray(_extractLabel5, 2),\n endRow = _extractLabel6[0],\n endColumn = _extractLabel6[1];\n\n var startCell = {\n row: startRow,\n column: startColumn\n };\n var endCell = {\n row: endRow,\n column: endColumn\n };\n\n _this4.cells.push(_this4._createCell(startCell, endCell, match));\n });\n }\n /**\n * Search cell by its label.\n *\n * @param {string} label Cell label eq. `B4` or `$B$6`.\n * @returns {object|null}\n * @private\n */\n\n }, {\n key: \"_searchCell\",\n value: function _searchCell(label) {\n var _arrayFilter = arrayFilter(this.cells, function (cellMeta) {\n return cellMeta.origLabel === label;\n }),\n _arrayFilter2 = _slicedToArray(_arrayFilter, 1),\n cell = _arrayFilter2[0];\n\n return cell || null;\n }\n /**\n * Create object cell.\n *\n * @param {object} start Start coordinates (top-left).\n * @param {object} end End coordinates (bottom-right).\n * @param {string} label Original label name.\n * @returns {object}\n * @private\n */\n\n }, {\n key: \"_createCell\",\n value: function _createCell(start, end, label) {\n return {\n start: start,\n end: end,\n origLabel: label,\n type: label.indexOf(':') === -1 ? 'cell' : 'range',\n refError: false,\n toLabel: function toLabel() {\n var newLabel = _toLabel(this.start.row, this.start.column);\n\n if (this.type === 'range') {\n newLabel += \":\".concat(_toLabel(this.end.row, this.end.column));\n }\n\n return newLabel;\n }\n };\n }\n }]);\n\n return ExpressionModifier;\n}();\n\nmixin(ExpressionModifier, localHooks);\nexport default ExpressionModifier;","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { isFormulaExpression } from \"../utils.mjs\";\nimport CellValue from \"../cell/value.mjs\";\nimport ExpressionModifier from \"../expressionModifier.mjs\";\n/**\n * When \"column_sorting\" is triggered the following operations must be performed:\n *\n * - All formulas which contain cell coordinates must be updated and saved into source data - Column must be changed\n * (decreased or increased) depends on new target position - previous position.\n * - Mark all formulas which need update with \"STATE_OUT_OFF_DATE\" flag, so they can be recalculated after the operation.\n */\n\nexport var OPERATION_NAME = 'column_sorting';\nvar visualRows;\n/**\n * Collect all previous visual rows from CellValues.\n */\n\nexport function prepare() {\n var matrix = this.matrix,\n hot = this.hot;\n visualRows = new WeakMap();\n arrayEach(matrix.data, function (cell) {\n visualRows.set(cell, hot.toVisualRow(cell.row));\n });\n}\n/**\n * Translate all CellValues depends on previous position.\n */\n\nexport function operate() {\n var matrix = this.matrix,\n dataProvider = this.dataProvider,\n hot = this.hot;\n matrix.cellReferences.length = 0;\n arrayEach(matrix.data, function (cell) {\n cell.setState(CellValue.STATE_OUT_OFF_DATE);\n cell.clearPrecedents();\n var row = cell.row,\n column = cell.column;\n var value = dataProvider.getSourceDataAtCell(row, column);\n\n if (isFormulaExpression(value)) {\n var prevRow = visualRows.get(cell);\n var expModifier = new ExpressionModifier(value);\n expModifier.translate({\n row: hot.toVisualRow(row) - prevRow\n });\n dataProvider.updateSourceData(row, column, expModifier.toString());\n }\n });\n visualRows = null;\n}","import \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { cellCoordFactory, isFormulaExpression } from \"../utils.mjs\";\nimport CellValue from \"../cell/value.mjs\";\nimport ExpressionModifier from \"../expressionModifier.mjs\";\n/**\n * When \"inser_column\" is triggered the following operations must be performed:\n *\n * - All formulas which contain cell coordinates must be updated and saved into source data - Column must be increased\n * by \"amount\" of times (eq: D4 to E4, $F$5 to $G$5);\n * - Mark all formulas which need update with \"STATE_OUT_OFF_DATE\" flag, so they can be recalculated after the operation.\n */\n\nexport var OPERATION_NAME = 'insert_column';\n/**\n * Execute changes.\n *\n * @param {number} start Index column from which the operation starts.\n * @param {number} amount Count of columns to be inserted.\n * @param {boolean} [modifyFormula=true] If `true` all formula expressions will be modified according to the changes.\n * `false` value is used by UndoRedo plugin which saves snapshoots before alter\n * operation so it doesn't have to modify formulas if \"undo\" action was triggered.\n */\n\nexport function operate(start, amount) {\n var modifyFormula = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var matrix = this.matrix,\n dataProvider = this.dataProvider;\n var translate = [0, amount];\n arrayEach(matrix.cellReferences, function (cell) {\n if (cell.column >= start) {\n cell.translateTo.apply(cell, translate);\n }\n });\n arrayEach(matrix.data, function (cell) {\n var origRow = cell.row,\n origColumn = cell.column;\n\n if (cell.column >= start) {\n cell.translateTo.apply(cell, translate);\n cell.setState(CellValue.STATE_OUT_OFF_DATE);\n }\n\n if (modifyFormula) {\n var row = cell.row,\n column = cell.column;\n var value = dataProvider.getSourceDataAtCell(row, column);\n\n if (isFormulaExpression(value)) {\n var startCoord = cellCoordFactory('column', start);\n var expModifier = new ExpressionModifier(value);\n expModifier.useCustomModifier(customTranslateModifier);\n expModifier.translate({\n column: amount\n }, startCoord({\n row: origRow,\n column: origColumn\n }));\n dataProvider.updateSourceData(row, column, expModifier.toString());\n }\n }\n });\n}\n/**\n * @param {cellCoord} cell The cell coordinates.\n * @param {string} axis The axis defined as \"row\" or \"column\".\n * @param {number} delta The shift/delta betwen old and new position.\n * @param {number} startFromIndex The index from the operation was performed.\n * @returns {Array}\n */\n\nfunction customTranslateModifier(cell, axis, delta, startFromIndex) {\n var start = cell.start,\n end = cell.end;\n var startIndex = start[axis].index;\n var endIndex = end[axis].index;\n var deltaStart = delta;\n var deltaEnd = delta; // Do not translate cells above inserted row or on the left of inserted column\n\n if (startFromIndex > startIndex) {\n deltaStart = 0;\n }\n\n if (startFromIndex > endIndex) {\n deltaEnd = 0;\n }\n\n return [deltaStart, deltaEnd, false];\n}","import \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { cellCoordFactory, isFormulaExpression } from \"../utils.mjs\";\nimport CellValue from \"../cell/value.mjs\";\nimport ExpressionModifier from \"../expressionModifier.mjs\";\n/**\n * When \"insert_row\" is triggered the following operations must be performed:\n *\n * - All formulas which contain cell coordinates must be updated and saved into source data - Row must be increased\n * by \"amount\" of times (eq: D4 to D5, $F$5 to $F$6);\n * - Mark all formulas which need update with \"STATE_OUT_OFF_DATE\" flag, so they can be recalculated after the operation.\n */\n\nexport var OPERATION_NAME = 'insert_row';\n/**\n * Execute changes.\n *\n * @param {number} start Index row from which the operation starts.\n * @param {number} amount Count of rows to be inserted.\n * @param {boolean} [modifyFormula=true] If `true` all formula expressions will be modified according to the changes.\n * `false` value is used by UndoRedo plugin which saves snapshoots before alter\n * operation so it doesn't modify formulas if undo action is triggered.\n */\n\nexport function operate(start, amount) {\n var modifyFormula = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var matrix = this.matrix,\n dataProvider = this.dataProvider;\n var translate = [amount, 0];\n arrayEach(matrix.cellReferences, function (cell) {\n if (cell.row >= start) {\n cell.translateTo.apply(cell, translate);\n }\n });\n arrayEach(matrix.data, function (cell) {\n var origRow = cell.row,\n origColumn = cell.column;\n\n if (cell.row >= start) {\n cell.translateTo.apply(cell, translate);\n cell.setState(CellValue.STATE_OUT_OFF_DATE);\n }\n\n if (modifyFormula) {\n var row = cell.row,\n column = cell.column;\n var value = dataProvider.getSourceDataAtCell(row, column);\n\n if (isFormulaExpression(value)) {\n var startCoord = cellCoordFactory('row', start);\n var expModifier = new ExpressionModifier(value);\n expModifier.useCustomModifier(customTranslateModifier);\n expModifier.translate({\n row: amount\n }, startCoord({\n row: origRow,\n column: origColumn\n }));\n dataProvider.updateSourceData(row, column, expModifier.toString());\n }\n }\n });\n}\n/**\n * @param {cellCoord} cell The cell coordinates.\n * @param {string} axis The axis defined as \"row\" or \"column\".\n * @param {number} delta The shift/delta betwen old and new position.\n * @param {number} startFromIndex The index from the operation was performed.\n * @returns {Array}\n */\n\nfunction customTranslateModifier(cell, axis, delta, startFromIndex) {\n var start = cell.start,\n end = cell.end;\n var startIndex = start[axis].index;\n var endIndex = end[axis].index;\n var deltaStart = delta;\n var deltaEnd = delta; // Do not translate cells above inserted row or on the left of inserted column\n\n if (startFromIndex > startIndex) {\n deltaStart = 0;\n }\n\n if (startFromIndex > endIndex) {\n deltaEnd = 0;\n }\n\n return [deltaStart, deltaEnd, false];\n}","import \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { cellCoordFactory, isFormulaExpression } from \"../utils.mjs\";\nimport CellValue from \"../cell/value.mjs\";\nimport ExpressionModifier from \"../expressionModifier.mjs\";\n/**\n * When \"remove_column\" is triggered the following operations must be performed:\n *\n * - All formulas which contain cell coordinates must be updated and saved into source data - Column must be decreased\n * by \"amount\" of times (eq: D4 to C4, $F$5 to $E$5);\n * - Mark all formulas which need update with \"STATE_OUT_OFF_DATE\" flag, so they can be recalculated after the operation.\n */\n\nexport var OPERATION_NAME = 'remove_column';\n/**\n * Execute changes.\n *\n * @param {number} start Index column from which the operation starts.\n * @param {number} amount Count of columns to be removed.\n * @param {boolean} [modifyFormula=true] If `true` all formula expressions will be modified according to the changes.\n * `false` value is used by UndoRedo plugin which saves snapshoots before alter\n * operation so it doesn't modify formulas if undo action is triggered.\n */\n\nexport function operate(start, amount) {\n var modifyFormula = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var columnsAmount = -amount;\n var matrix = this.matrix,\n dataProvider = this.dataProvider,\n sheet = this.sheet;\n var translate = [0, columnsAmount];\n var indexOffset = Math.abs(columnsAmount) - 1;\n var removedCellRef = matrix.removeCellRefsAtRange({\n column: start\n }, {\n column: start + indexOffset\n });\n var toRemove = [];\n arrayEach(matrix.data, function (cell) {\n arrayEach(removedCellRef, function (cellRef) {\n if (!cell.hasPrecedent(cellRef)) {\n return;\n }\n\n cell.removePrecedent(cellRef);\n cell.setState(CellValue.STATE_OUT_OFF_DATE);\n arrayEach(sheet.getCellDependencies(cell.row, cell.column), function (cellValue) {\n cellValue.setState(CellValue.STATE_OUT_OFF_DATE);\n });\n });\n\n if (cell.column >= start && cell.column <= start + indexOffset) {\n toRemove.push(cell);\n }\n });\n matrix.remove(toRemove);\n arrayEach(matrix.cellReferences, function (cell) {\n if (cell.column >= start) {\n cell.translateTo.apply(cell, translate);\n }\n });\n arrayEach(matrix.data, function (cell) {\n var origRow = cell.row,\n origColumn = cell.column;\n\n if (cell.column >= start) {\n cell.translateTo.apply(cell, translate);\n cell.setState(CellValue.STATE_OUT_OFF_DATE);\n }\n\n if (modifyFormula) {\n var row = cell.row,\n column = cell.column;\n var value = dataProvider.getSourceDataAtCell(row, column);\n\n if (isFormulaExpression(value)) {\n var startCoord = cellCoordFactory('column', start);\n var expModifier = new ExpressionModifier(value);\n expModifier.useCustomModifier(customTranslateModifier);\n expModifier.translate({\n column: columnsAmount\n }, startCoord({\n row: origRow,\n column: origColumn\n }));\n dataProvider.updateSourceData(row, column, expModifier.toString());\n }\n }\n });\n}\n/**\n * @param {cellCoord} cell The cell coordinates.\n * @param {string} axis The axis defined as \"row\" or \"column\".\n * @param {number} delta The shift/delta betwen old and new position.\n * @param {number} startFromIndex The index from the operation was performed.\n * @returns {Array}\n */\n\nfunction customTranslateModifier(cell, axis, delta, startFromIndex) {\n var start = cell.start,\n end = cell.end,\n type = cell.type;\n var startIndex = start[axis].index;\n var endIndex = end[axis].index;\n var indexOffset = Math.abs(delta) - 1;\n var deltaStart = delta;\n var deltaEnd = delta;\n var refError = false; // Mark all cells as #REF! which refer to removed cells between startFromIndex and startFromIndex + delta\n\n if (startIndex >= startFromIndex && endIndex <= startFromIndex + indexOffset) {\n refError = true;\n } // Decrement all cells below startFromIndex\n\n\n if (!refError && type === 'cell') {\n if (startFromIndex >= startIndex) {\n deltaStart = 0;\n deltaEnd = 0;\n }\n }\n\n if (!refError && type === 'range') {\n if (startFromIndex >= startIndex) {\n deltaStart = 0;\n }\n\n if (startFromIndex > endIndex) {\n deltaEnd = 0;\n } else if (endIndex <= startFromIndex + indexOffset) {\n deltaEnd -= Math.min(endIndex - (startFromIndex + indexOffset), 0);\n }\n }\n\n if (startIndex + deltaStart < 0) {\n deltaStart -= startIndex + deltaStart;\n }\n\n return [deltaStart, deltaEnd, refError];\n}","import \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { cellCoordFactory, isFormulaExpression } from \"../utils.mjs\";\nimport CellValue from \"../cell/value.mjs\";\nimport ExpressionModifier from \"../expressionModifier.mjs\";\n/**\n * When \"remove_row\" is triggered the following operations must be performed:\n *\n * - All formulas which contain cell coordinates must be updated and saved into source data - Row must be decreased\n * by \"amount\" of times (eq: D4 to D3, $F$5 to $F$4);\n * - Mark all formulas which need update with \"STATE_OUT_OFF_DATE\" flag, so they can be recalculated after the operation.\n */\n\nexport var OPERATION_NAME = 'remove_row';\n/**\n * Execute changes.\n *\n * @param {number} start Index row from which the operation starts.\n * @param {number} amount Count of rows to be removed.\n * @param {boolean} [modifyFormula=true] If `true` all formula expressions will be modified according to the changes.\n * `false` value is used by UndoRedo plugin which saves snapshoots before alter\n * operation so it doesn't modify formulas if undo action is triggered.\n */\n\nexport function operate(start, amount) {\n var modifyFormula = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var rowsAmount = -amount;\n var matrix = this.matrix,\n dataProvider = this.dataProvider,\n sheet = this.sheet;\n var translate = [rowsAmount, 0];\n var indexOffset = Math.abs(rowsAmount) - 1;\n var removedCellRef = matrix.removeCellRefsAtRange({\n row: start\n }, {\n row: start + indexOffset\n });\n var toRemove = [];\n arrayEach(matrix.data, function (cell) {\n arrayEach(removedCellRef, function (cellRef) {\n if (!cell.hasPrecedent(cellRef)) {\n return;\n }\n\n cell.removePrecedent(cellRef);\n cell.setState(CellValue.STATE_OUT_OFF_DATE);\n arrayEach(sheet.getCellDependencies(cell.row, cell.column), function (cellValue) {\n cellValue.setState(CellValue.STATE_OUT_OFF_DATE);\n });\n });\n\n if (cell.row >= start && cell.row <= start + indexOffset) {\n toRemove.push(cell);\n }\n });\n matrix.remove(toRemove);\n arrayEach(matrix.cellReferences, function (cell) {\n if (cell.row >= start) {\n cell.translateTo.apply(cell, translate);\n }\n });\n arrayEach(matrix.data, function (cell) {\n var origRow = cell.row,\n origColumn = cell.column;\n\n if (cell.row >= start) {\n cell.translateTo.apply(cell, translate);\n cell.setState(CellValue.STATE_OUT_OFF_DATE);\n }\n\n if (modifyFormula) {\n var row = cell.row,\n column = cell.column;\n var value = dataProvider.getSourceDataAtCell(row, column);\n\n if (isFormulaExpression(value)) {\n var startCoord = cellCoordFactory('row', start);\n var expModifier = new ExpressionModifier(value);\n expModifier.useCustomModifier(customTranslateModifier);\n expModifier.translate({\n row: rowsAmount\n }, startCoord({\n row: origRow,\n column: origColumn\n }));\n dataProvider.updateSourceData(row, column, expModifier.toString());\n }\n }\n });\n}\n/**\n * @param {cellCoord} cell The cell coordinates.\n * @param {string} axis The axis defined as \"row\" or \"column\".\n * @param {number} delta The shift/delta betwen old and new position.\n * @param {number} startFromIndex The index from the operation was performed.\n * @returns {Array}\n */\n\nfunction customTranslateModifier(cell, axis, delta, startFromIndex) {\n var start = cell.start,\n end = cell.end,\n type = cell.type;\n var startIndex = start[axis].index;\n var endIndex = end[axis].index;\n var indexOffset = Math.abs(delta) - 1;\n var deltaStart = delta;\n var deltaEnd = delta;\n var refError = false; // Mark all cells as #REF! which refer to removed cells between startFromIndex and startFromIndex + delta\n\n if (startIndex >= startFromIndex && endIndex <= startFromIndex + indexOffset) {\n refError = true;\n } // Decrement all cells below startFromIndex\n\n\n if (!refError && type === 'cell') {\n if (startFromIndex >= startIndex) {\n deltaStart = 0;\n deltaEnd = 0;\n }\n }\n\n if (!refError && type === 'range') {\n if (startFromIndex >= startIndex) {\n deltaStart = 0;\n }\n\n if (startFromIndex > endIndex) {\n deltaEnd = 0;\n } else if (endIndex <= startFromIndex + indexOffset) {\n deltaEnd -= Math.min(endIndex - (startFromIndex + indexOffset), 0);\n }\n }\n\n if (startIndex + deltaStart < 0) {\n deltaStart -= startIndex + deltaStart;\n }\n\n return [deltaStart, deltaEnd, refError];\n}","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { mixin } from \"../../helpers/object.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nimport * as columnSorting from \"./alterOperation/columnSorting.mjs\";\nimport * as insertColumn from \"./alterOperation/insertColumn.mjs\";\nimport * as insertRow from \"./alterOperation/insertRow.mjs\";\nimport * as removeColumn from \"./alterOperation/removeColumn.mjs\";\nimport * as removeRow from \"./alterOperation/removeRow.mjs\";\nvar operations = new Map();\nregisterOperation(columnSorting.OPERATION_NAME, columnSorting);\nregisterOperation(insertColumn.OPERATION_NAME, insertColumn);\nregisterOperation(insertRow.OPERATION_NAME, insertRow);\nregisterOperation(removeColumn.OPERATION_NAME, removeColumn);\nregisterOperation(removeRow.OPERATION_NAME, removeRow);\n/**\n * Alter Manager is a service that is responsible for changing the formula expressions (especially cell coordinates)\n * based on specific alter operation applied into the table.\n *\n * For example, when a user adds a new row the algorithm that moves all the cells below the added row down by one row\n * should be triggered (eq: cell A5 become A6 etc).\n *\n * All alter operations are defined in the \"alterOperation/\" directory.\n *\n * @class AlterManager\n * @util\n */\n\nvar AlterManager = /*#__PURE__*/function () {\n function AlterManager(sheet) {\n _classCallCheck(this, AlterManager);\n /**\n * Instance of {@link Sheet}.\n *\n * @type {Sheet}\n */\n\n\n this.sheet = sheet;\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n this.hot = sheet.hot;\n /**\n * Instance of {@link DataProvider}.\n *\n * @type {DataProvider}\n */\n\n this.dataProvider = sheet.dataProvider;\n /**\n * Instance of {@link Matrix}.\n *\n * @type {Matrix}\n */\n\n this.matrix = sheet.matrix;\n }\n /**\n * Prepare to execute an alter algorithm. This preparation can be useful for collecting some variables and\n * states before specific algorithm will be executed.\n *\n * @param {string} action One of the action defined in alterOperation.\n * @param {*} args Arguments pass to alter operation.\n */\n\n\n _createClass(AlterManager, [{\n key: \"prepareAlter\",\n value: function prepareAlter(action) {\n if (!operations.has(action)) {\n throw Error(\"Alter operation \\\"\".concat(action, \"\\\" not exist.\"));\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n operations.get(action).prepare.apply(this, args);\n }\n /**\n * Trigger an alter algorithm and after executing code trigger local hook (\"afterAlter\").\n *\n * @param {string} action One of the action defined in alterOperation.\n * @param {*} args Arguments pass to alter operation.\n */\n\n }, {\n key: \"triggerAlter\",\n value: function triggerAlter(action) {\n if (!operations.has(action)) {\n throw Error(\"Alter operation \\\"\".concat(action, \"\\\" not exist.\"));\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n operations.get(action).operate.apply(this, args);\n this.runLocalHooks.apply(this, ['afterAlter'].concat(args));\n }\n /**\n * Destroy class.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.sheet = null;\n this.hot = null;\n this.dataProvider = null;\n this.matrix = null;\n }\n }]);\n\n return AlterManager;\n}();\n\nmixin(AlterManager, localHooks);\nexport default AlterManager;\n\nvar empty = function empty() {};\n/**\n * @param {string} name The ID of the operation to register.\n * @param {object} descriptor The object with `prepare` and `operate` methods which holds the operation logic.\n */\n\n\nexport function registerOperation(name, descriptor) {\n if (!operations.has(name)) {\n operations.set(name, {\n prepare: descriptor.prepare || empty,\n operate: descriptor.operate || empty\n });\n }\n}","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { Parser, ERROR_REF, error as isFormulaError } from 'hot-formula-parser';\nimport { arrayEach, arrayMap } from \"../../helpers/array.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport CellValue from \"./cell/value.mjs\";\nimport CellReference from \"./cell/reference.mjs\";\nimport { isFormulaExpression, toUpperCaseFormula } from \"./utils.mjs\";\nimport Matrix from \"./matrix.mjs\";\nimport AlterManager from \"./alterManager.mjs\";\nvar STATE_UP_TO_DATE = 1;\nvar STATE_NEED_REBUILD = 2;\nvar STATE_NEED_FULL_REBUILD = 3;\n/**\n * Sheet component responsible for whole spreadsheet calculations.\n *\n * @class Sheet\n * @util\n */\n\nvar Sheet = /*#__PURE__*/function () {\n function Sheet(hot, dataProvider) {\n var _this = this;\n\n _classCallCheck(this, Sheet);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hot;\n /**\n * Data provider for sheet calculations.\n *\n * @type {DataProvider}\n */\n\n this.dataProvider = dataProvider;\n /**\n * Instance of {@link https://github.com/handsontable/formula-parser}.\n *\n * @type {Parser}\n */\n\n this.parser = new Parser();\n /**\n * Instance of {@link Matrix}.\n *\n * @type {Matrix}\n */\n\n this.matrix = new Matrix(this.hot);\n /**\n * Instance of {@link AlterManager}.\n *\n * @type {AlterManager}\n */\n\n this.alterManager = new AlterManager(this);\n /**\n * Cell object which indicates which cell is currently processing.\n *\n * @private\n * @type {null}\n */\n\n this._processingCell = null;\n /**\n * State of the sheet.\n *\n * @type {number}\n * @private\n */\n\n this._state = STATE_NEED_FULL_REBUILD;\n this.parser.on('callCellValue', function () {\n return _this._onCallCellValue.apply(_this, arguments);\n });\n this.parser.on('callRangeValue', function () {\n return _this._onCallRangeValue.apply(_this, arguments);\n });\n this.alterManager.addLocalHook('afterAlter', function () {\n return _this._onAfterAlter.apply(_this, arguments);\n });\n }\n /**\n * Recalculate sheet.\n */\n\n\n _createClass(Sheet, [{\n key: \"recalculate\",\n value: function recalculate() {\n switch (this._state) {\n case STATE_NEED_FULL_REBUILD:\n this.recalculateFull();\n break;\n\n case STATE_NEED_REBUILD:\n this.recalculateOptimized();\n break;\n\n default:\n break;\n }\n }\n /**\n * Recalculate sheet using optimized methods (fast recalculation).\n */\n\n }, {\n key: \"recalculateOptimized\",\n value: function recalculateOptimized() {\n var _this2 = this;\n\n var cells = this.matrix.getOutOfDateCells();\n arrayEach(cells, function (cellValue) {\n var value = _this2.dataProvider.getSourceDataAtCell(cellValue.row, cellValue.column);\n\n if (isFormulaExpression(value)) {\n _this2.parseExpression(cellValue, value.substr(1));\n }\n });\n this._state = STATE_UP_TO_DATE;\n this.runLocalHooks('afterRecalculate', cells, 'optimized');\n }\n /**\n * Recalculate whole table by building dependencies from scratch (slow recalculation).\n */\n\n }, {\n key: \"recalculateFull\",\n value: function recalculateFull() {\n var _this3 = this;\n\n var cells = this.dataProvider.getSourceDataByRange();\n this.matrix.reset();\n arrayEach(cells, function (rowData, row) {\n arrayEach(rowData, function (value, column) {\n if (isFormulaExpression(value)) {\n _this3.parseExpression(new CellValue(row, column), value.substr(1));\n }\n });\n });\n this._state = STATE_UP_TO_DATE;\n this.runLocalHooks('afterRecalculate', cells, 'full');\n }\n /**\n * Set predefined variable name which can be visible while parsing formula expression.\n *\n * @param {string} name Variable name.\n * @param {*} value Variable value.\n */\n\n }, {\n key: \"setVariable\",\n value: function setVariable(name, value) {\n this.parser.setVariable(name, value);\n }\n /**\n * Get variable name.\n *\n * @param {string} name Variable name.\n * @returns {*}\n */\n\n }, {\n key: \"getVariable\",\n value: function getVariable(name) {\n return this.parser.getVariable(name);\n }\n /**\n * Apply changes to the sheet.\n *\n * @param {number} row Physical row index.\n * @param {number} column Physical column index.\n * @param {*} newValue Current cell value.\n */\n\n }, {\n key: \"applyChanges\",\n value: function applyChanges(row, column, newValue) {\n // Remove formula description for old expression\n // TODO: Move this to recalculate()\n this.matrix.remove({\n row: row,\n column: column\n }); // TODO: Move this to recalculate()\n\n if (isFormulaExpression(newValue)) {\n // ...and create new for new changed formula expression\n this.parseExpression(new CellValue(row, column), newValue.substr(1));\n }\n\n var deps = this.getCellDependencies(this.hot.toVisualRow(row), this.hot.toVisualColumn(column));\n arrayEach(deps, function (cellValue) {\n cellValue.setState(CellValue.STATE_OUT_OFF_DATE);\n });\n this._state = STATE_NEED_REBUILD;\n }\n /**\n * Parse and evaluate formula for provided cell.\n *\n * @param {CellValue|object} cellValue Cell value object.\n * @param {string} formula Value to evaluate.\n */\n\n }, {\n key: \"parseExpression\",\n value: function parseExpression(cellValue, formula) {\n cellValue.setState(CellValue.STATE_COMPUTING);\n this._processingCell = cellValue;\n\n var _this$parser$parse = this.parser.parse(toUpperCaseFormula(formula)),\n error = _this$parser$parse.error,\n result = _this$parser$parse.result;\n\n if (isFormulaExpression(result)) {\n this.parseExpression(cellValue, result.substr(1));\n } else {\n cellValue.setValue(result);\n cellValue.setError(error);\n cellValue.setState(CellValue.STATE_UP_TO_DATE);\n }\n\n this.matrix.add(cellValue);\n this._processingCell = null;\n }\n /**\n * Get cell value object at specified physical coordinates.\n *\n * @param {number} row Physical row index.\n * @param {number} column Physical column index.\n * @returns {CellValue|undefined}\n */\n\n }, {\n key: \"getCellAt\",\n value: function getCellAt(row, column) {\n return this.matrix.getCellAt(row, column);\n }\n /**\n * Get cell dependencies at specified physical coordinates.\n *\n * @param {number} row Physical row index.\n * @param {number} column Physical column index.\n * @returns {Array}\n */\n\n }, {\n key: \"getCellDependencies\",\n value: function getCellDependencies(row, column) {\n return this.matrix.getDependencies({\n row: row,\n column: column\n });\n }\n /**\n * Listener for parser cell value.\n *\n * @private\n * @param {object} cellCoords Cell coordinates.\n * @param {Function} done Function to call with valid cell value.\n */\n\n }, {\n key: \"_onCallCellValue\",\n value: function _onCallCellValue(_ref, done) {\n var row = _ref.row,\n column = _ref.column;\n var cell = new CellReference(row, column);\n\n if (!this.dataProvider.isInDataRange(cell.row, cell.column)) {\n throw Error(ERROR_REF);\n }\n\n this.matrix.registerCellRef(cell);\n\n this._processingCell.addPrecedent(cell);\n\n var cellValue = this.dataProvider.getRawDataAtCell(row.index, column.index);\n\n if (isFormulaError(cellValue)) {\n var computedCell = this.matrix.getCellAt(row.index, column.index);\n\n if (computedCell && computedCell.hasError()) {\n throw Error(cellValue);\n }\n }\n\n if (isFormulaExpression(cellValue)) {\n var _this$parser$parse2 = this.parser.parse(cellValue.substr(1)),\n error = _this$parser$parse2.error,\n result = _this$parser$parse2.result;\n\n if (error) {\n throw Error(error);\n }\n\n done(result);\n } else {\n done(cellValue);\n }\n }\n /**\n * Listener for parser cells (range) value.\n *\n * @private\n * @param {object} startCell Cell coordinates (top-left corner coordinate).\n * @param {object} endCell Cell coordinates (bottom-right corner coordinate).\n * @param {Function} done Function to call with valid cells values.\n */\n\n }, {\n key: \"_onCallRangeValue\",\n value: function _onCallRangeValue(_ref2, _ref3, done) {\n var _this4 = this;\n\n var startRow = _ref2.row,\n startColumn = _ref2.column;\n var endRow = _ref3.row,\n endColumn = _ref3.column;\n var cellValues = this.dataProvider.getRawDataByRange(startRow.index, startColumn.index, endRow.index, endColumn.index);\n\n var mapRowData = function mapRowData(rowData, rowIndex) {\n return arrayMap(rowData, function (cellData, columnIndex) {\n var rowCellCoord = startRow.index + rowIndex;\n var columnCellCoord = startColumn.index + columnIndex;\n var cell = new CellReference(rowCellCoord, columnCellCoord);\n\n if (!_this4.dataProvider.isInDataRange(cell.row, cell.column)) {\n throw Error(ERROR_REF);\n }\n\n _this4.matrix.registerCellRef(cell);\n\n _this4._processingCell.addPrecedent(cell);\n\n var newCellData = cellData;\n\n if (isFormulaError(newCellData)) {\n var computedCell = _this4.matrix.getCellAt(cell.row, cell.column);\n\n if (computedCell && computedCell.hasError()) {\n throw Error(newCellData);\n }\n }\n\n if (isFormulaExpression(newCellData)) {\n var _this4$parser$parse = _this4.parser.parse(newCellData.substr(1)),\n error = _this4$parser$parse.error,\n result = _this4$parser$parse.result;\n\n if (error) {\n throw Error(error);\n }\n\n newCellData = result;\n }\n\n return newCellData;\n });\n };\n\n var calculatedCellValues = arrayMap(cellValues, function (rowData, rowIndex) {\n return mapRowData(rowData, rowIndex);\n });\n done(calculatedCellValues);\n }\n /**\n * On after alter sheet listener.\n *\n * @private\n */\n\n }, {\n key: \"_onAfterAlter\",\n value: function _onAfterAlter() {\n this.recalculateOptimized();\n }\n /**\n * Destroy class.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot = null;\n this.dataProvider.destroy();\n this.dataProvider = null;\n this.alterManager.destroy();\n this.alterManager = null;\n this.parser = null;\n this.matrix.reset();\n this.matrix = null;\n }\n }]);\n\n return Sheet;\n}();\n\nmixin(Sheet, localHooks);\nexport default Sheet;","import \"core-js/modules/es.array.concat.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { hasOwnProperty } from \"../../helpers/object.mjs\";\n/**\n * Data class provider responsible for providing a set of range data types, necessary for calculating formulas.\n * Those methods strongly using hot.getData and hot.getSourceData methods with some changes. Data provider additionally\n * collects all changes added to the data source to make them available faster than by using\n * hot.getData and hot.getSourceData methods.\n *\n * @class DataProvider\n * @util\n */\n\nvar DataProvider = /*#__PURE__*/function () {\n function DataProvider(hot) {\n _classCallCheck(this, DataProvider);\n /**\n * Handsontable instance.\n *\n * @type {Core}\n */\n\n\n this.hot = hot;\n /**\n * Collected changes applied into editors or by calling public Handsontable API. This is require to provide\n * fresh data applied into spreadsheet before they will be available from the public API.\n *\n * @type {object}\n */\n\n this.changes = {};\n }\n /**\n * Collect all data changes applied to the Handsontable to make them available later.\n *\n * @param {number} row Physical row index.\n * @param {number} column Physical column index.\n * @param {*} value Value to store.\n */\n\n\n _createClass(DataProvider, [{\n key: \"collectChanges\",\n value: function collectChanges(row, column, value) {\n this.changes[this._coordId(row, column)] = value;\n }\n /**\n * Clear all collected changes.\n */\n\n }, {\n key: \"clearChanges\",\n value: function clearChanges() {\n this.changes = {};\n }\n /**\n * Check if provided coordinates match to the table range data.\n *\n * @param {number} visualRow Visual row index.\n * @param {number} visualColumn Visual row index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isInDataRange\",\n value: function isInDataRange(visualRow, visualColumn) {\n return visualRow >= 0 && visualRow < this.hot.countRows() && visualColumn >= 0 && visualColumn < this.hot.countCols();\n }\n /**\n * Get calculated data at specified cell.\n *\n * @param {number} visualRow Visual row index.\n * @param {number} visualColumn Visual column index.\n * @returns {*}\n */\n\n }, {\n key: \"getDataAtCell\",\n value: function getDataAtCell(visualRow, visualColumn) {\n var id = this._coordId(this.hot.toPhysicalRow(visualRow), this.hot.toPhysicalColumn(visualColumn));\n\n var result;\n\n if (hasOwnProperty(this.changes, id)) {\n result = this.changes[id];\n } else {\n result = this.hot.getDataAtCell(visualRow, visualColumn);\n }\n\n return result;\n }\n /**\n * Get calculated data at specified range.\n *\n * @param {number} [visualRow1] Visual row index.\n * @param {number} [visualColumn1] Visual column index.\n * @param {number} [visualRow2] Visual row index.\n * @param {number} [visualColumn2] Visual column index.\n * @returns {Array}\n */\n\n }, {\n key: \"getDataByRange\",\n value: function getDataByRange(visualRow1, visualColumn1, visualRow2, visualColumn2) {\n var _this = this;\n\n var result = this.hot.getData(visualRow1, visualColumn1, visualRow2, visualColumn2);\n arrayEach(result, function (rowData, rowIndex) {\n arrayEach(rowData, function (value, columnIndex) {\n var id = _this._coordId(_this.hot.toPhysicalRow(rowIndex + visualRow1), _this.hot.toPhysicalColumn(columnIndex + visualColumn1));\n\n if (hasOwnProperty(_this.changes, id)) {\n result[rowIndex][columnIndex] = _this.changes[id];\n }\n });\n });\n return result;\n }\n /**\n * Get source data at specified physical cell.\n *\n * @param {number} physicalRow Physical row index.\n * @param {number} physicalColumn Physical column index.\n * @returns {*}\n */\n\n }, {\n key: \"getSourceDataAtCell\",\n value: function getSourceDataAtCell(physicalRow, physicalColumn) {\n var id = this._coordId(physicalRow, physicalColumn);\n\n var result;\n\n if (hasOwnProperty(this.changes, id)) {\n result = this.changes[id];\n } else {\n result = this.hot.getSourceDataAtCell(physicalRow, physicalColumn);\n }\n\n return result;\n }\n /**\n * Get source data at specified physical range.\n *\n * @param {number} [physicalRow1] Physical row index.\n * @param {number} [physicalColumn1] Physical column index.\n * @param {number} [physicalRow2] Physical row index.\n * @param {number} [physicalColumn2] Physical column index.\n * @returns {Array}\n */\n\n }, {\n key: \"getSourceDataByRange\",\n value: function getSourceDataByRange(physicalRow1, physicalColumn1, physicalRow2, physicalColumn2) {\n return this.hot.getSourceDataArray(physicalRow1, physicalColumn1, physicalRow2, physicalColumn2);\n }\n /**\n * Get source data at specified visual cell.\n *\n * @param {number} visualRow Visual row index.\n * @param {number} visualColumn Visual column index.\n * @returns {*}\n */\n\n }, {\n key: \"getRawDataAtCell\",\n value: function getRawDataAtCell(visualRow, visualColumn) {\n return this.getSourceDataAtCell(this.hot.toPhysicalRow(visualRow), this.hot.toPhysicalColumn(visualColumn));\n }\n /**\n * Get source data at specified visual range.\n *\n * @param {number} [visualRow1] Visual row index.\n * @param {number} [visualColumn1] Visual column index.\n * @param {number} [visualRow2] Visual row index.\n * @param {number} [visualColumn2] Visual column index.\n * @returns {Array}\n */\n\n }, {\n key: \"getRawDataByRange\",\n value: function getRawDataByRange(visualRow1, visualColumn1, visualRow2, visualColumn2) {\n var _this2 = this;\n\n var data = [];\n rangeEach(visualRow1, visualRow2, function (visualRow) {\n var row = [];\n rangeEach(visualColumn1, visualColumn2, function (visualColumn) {\n var _ref = [_this2.hot.toPhysicalRow(visualRow), _this2.hot.toPhysicalColumn(visualColumn)],\n physicalRow = _ref[0],\n physicalColumn = _ref[1];\n\n var id = _this2._coordId(physicalRow, physicalColumn);\n\n if (hasOwnProperty(_this2.changes, id)) {\n row.push(_this2.changes[id]);\n } else {\n row.push(_this2.getSourceDataAtCell(physicalRow, physicalColumn));\n }\n });\n data.push(row);\n });\n return data;\n }\n /**\n * Update source data.\n *\n * @param {number} physicalRow Physical row index.\n * @param {number} physicalColumn Physical row index.\n * @param {*} value Value to update.\n */\n\n }, {\n key: \"updateSourceData\",\n value: function updateSourceData(physicalRow, physicalColumn, value) {\n this.hot.setSourceDataAtCell(physicalRow, this.hot.colToProp(physicalColumn), value);\n }\n /**\n * Generate cell coordinates id where the data changes will be stored.\n *\n * @param {number} row Row index.\n * @param {number} column Column index.\n * @returns {string}\n * @private\n */\n\n }, {\n key: \"_coordId\",\n value: function _coordId(row, column) {\n return \"\".concat(row, \":\").concat(column);\n }\n /**\n * Destroy class.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot = null;\n this.changes = null;\n }\n }]);\n\n return DataProvider;\n}();\n\nexport default DataProvider;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n/**\n * @class Stack\n * @util\n */\n\n\nvar Stack = /*#__PURE__*/function () {\n function Stack() {\n var initial = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n _classCallCheck(this, Stack);\n /**\n * Items collection.\n *\n * @type {Array}\n */\n\n\n this.items = initial;\n }\n /**\n * Add new item or items at the back of the stack.\n *\n * @param {*} items An item to add.\n */\n\n\n _createClass(Stack, [{\n key: \"push\",\n value: function push() {\n var _this$items;\n\n (_this$items = this.items).push.apply(_this$items, arguments);\n }\n /**\n * Remove the last element from the stack and returns it.\n *\n * @returns {*}\n */\n\n }, {\n key: \"pop\",\n value: function pop() {\n return this.items.pop();\n }\n /**\n * Return the last element from the stack (without modification stack).\n *\n * @returns {*}\n */\n\n }, {\n key: \"peek\",\n value: function peek() {\n return this.isEmpty() ? void 0 : this.items[this.items.length - 1];\n }\n /**\n * Check if the stack is empty.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n return !this.size();\n }\n /**\n * Return number of elements in the stack.\n *\n * @returns {number}\n */\n\n }, {\n key: \"size\",\n value: function size() {\n return this.items.length;\n }\n }]);\n\n return Stack;\n}();\n\nexport default Stack;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport Stack from \"../../utils/dataStructures/stack.mjs\";\nimport CellValue from \"./cell/value.mjs\";\n/**\n * This components is a simple workaround to make Undo/Redo functionality work.\n *\n * @class UndoRedoSnapshot\n * @util\n */\n\nvar UndoRedoSnapshot = /*#__PURE__*/function () {\n function UndoRedoSnapshot(sheet) {\n _classCallCheck(this, UndoRedoSnapshot);\n /**\n * Instance of {@link Sheet}.\n *\n * @type {Sheet}\n */\n\n\n this.sheet = sheet;\n /**\n * Stack instance for collecting undo/redo changes.\n *\n * @type {Stack}\n */\n\n this.stack = new Stack();\n }\n /**\n * Save snapshot for specified action.\n *\n * @param {string} axis Alter action which triggers snapshot.\n * @param {number} index Alter operation stared at.\n * @param {number} amount Amount of items to operate.\n */\n\n\n _createClass(UndoRedoSnapshot, [{\n key: \"save\",\n value: function save(axis, index, amount) {\n var _this$sheet = this.sheet,\n matrix = _this$sheet.matrix,\n dataProvider = _this$sheet.dataProvider;\n var changes = [];\n arrayEach(matrix.data, function (cellValue) {\n var row = cellValue.row,\n column = cellValue.column;\n\n if (cellValue[axis] < index || cellValue[axis] > index + (amount - 1)) {\n var value = dataProvider.getSourceDataAtCell(row, column);\n changes.push({\n row: row,\n column: column,\n value: value\n });\n }\n });\n this.stack.push({\n axis: axis,\n index: index,\n amount: amount,\n changes: changes\n });\n }\n /**\n * Restore state to the previous one.\n */\n\n }, {\n key: \"restore\",\n value: function restore() {\n var _this$sheet2 = this.sheet,\n matrix = _this$sheet2.matrix,\n dataProvider = _this$sheet2.dataProvider;\n\n var _this$stack$pop = this.stack.pop(),\n axis = _this$stack$pop.axis,\n index = _this$stack$pop.index,\n amount = _this$stack$pop.amount,\n changes = _this$stack$pop.changes;\n\n if (changes) {\n arrayEach(changes, function (change) {\n if (change[axis] > index + (amount - 1)) {\n change[axis] -= amount;\n }\n\n var row = change.row,\n column = change.column,\n value = change.value;\n var rawValue = dataProvider.getSourceDataAtCell(row, column);\n\n if (rawValue !== value) {\n dataProvider.updateSourceData(row, column, value);\n matrix.getCellAt(row, column).setState(CellValue.STATE_OUT_OFF_DATE);\n }\n });\n }\n }\n /**\n * Destroy class.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.sheet = null;\n this.stack = null;\n }\n }]);\n\n return UndoRedoSnapshot;\n}();\n\nexport default UndoRedoSnapshot;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { isObject, objectEach } from \"../../helpers/object.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { isFormulaExpression, toUpperCaseFormula, isFormulaExpressionEscaped, unescapeFormulaExpression } from \"./utils.mjs\";\nimport Sheet from \"./sheet.mjs\";\nimport DataProvider from \"./dataProvider.mjs\";\nimport UndoRedoSnapshot from \"./undoRedoSnapshot.mjs\";\nimport CellValue from \"./cell/value.mjs\";\nexport var PLUGIN_KEY = 'formulas';\nexport var PLUGIN_PRIORITY = 260;\n/**\n * The formulas plugin.\n *\n * @plugin Formulas\n */\n\nexport var Formulas = /*#__PURE__*/function (_BasePlugin) {\n _inherits(Formulas, _BasePlugin);\n\n var _super = _createSuper(Formulas);\n\n function Formulas(hotInstance) {\n var _this;\n\n _classCallCheck(this, Formulas);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of {@link EventManager}.\n *\n * @private\n * @type {EventManager}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Instance of {@link DataProvider}.\n *\n * @private\n * @type {DataProvider}\n */\n\n _this.dataProvider = new DataProvider(_this.hot);\n /**\n * Instance of {@link Sheet}.\n *\n * @private\n * @type {Sheet}\n */\n\n _this.sheet = new Sheet(_this.hot, _this.dataProvider);\n /**\n * Instance of {@link UndoRedoSnapshot}.\n *\n * @private\n * @type {UndoRedoSnapshot}\n */\n\n _this.undoRedoSnapshot = new UndoRedoSnapshot(_this.sheet);\n /**\n * Flag which indicates if table should be re-render after sheet recalculations.\n *\n * @type {boolean}\n * @default false\n * @private\n */\n\n _this._skipRendering = false;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link Formulas#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(Formulas, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n /* eslint-disable no-unneeded-ternary */\n return this.hot.getSettings()[PLUGIN_KEY] ? true : false;\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var settings = this.hot.getSettings()[PLUGIN_KEY];\n\n if (isObject(settings)) {\n if (isObject(settings.variables)) {\n objectEach(settings.variables, function (value, name) {\n return _this2.setVariable(name, value);\n });\n }\n }\n\n this.addHook('afterColumnSort', function () {\n return _this2.onAfterColumnSort.apply(_this2, arguments);\n });\n this.addHook('afterCreateCol', function () {\n return _this2.onAfterCreateCol.apply(_this2, arguments);\n });\n this.addHook('afterCreateRow', function () {\n return _this2.onAfterCreateRow.apply(_this2, arguments);\n });\n this.addHook('afterLoadData', function () {\n return _this2.onAfterLoadData();\n });\n this.addHook('afterRemoveCol', function () {\n return _this2.onAfterRemoveCol.apply(_this2, arguments);\n });\n this.addHook('afterRemoveRow', function () {\n return _this2.onAfterRemoveRow.apply(_this2, arguments);\n });\n this.addHook('afterSetDataAtCell', function () {\n return _this2.onAfterSetDataAtCell.apply(_this2, arguments);\n });\n this.addHook('afterSetDataAtRowProp', function () {\n return _this2.onAfterSetDataAtCell.apply(_this2, arguments);\n });\n this.addHook('beforeColumnSort', function () {\n return _this2.onBeforeColumnSort.apply(_this2, arguments);\n });\n this.addHook('beforeCreateCol', function () {\n return _this2.onBeforeCreateCol.apply(_this2, arguments);\n });\n this.addHook('beforeCreateRow', function () {\n return _this2.onBeforeCreateRow.apply(_this2, arguments);\n });\n this.addHook('beforeRemoveCol', function () {\n return _this2.onBeforeRemoveCol.apply(_this2, arguments);\n });\n this.addHook('beforeRemoveRow', function () {\n return _this2.onBeforeRemoveRow.apply(_this2, arguments);\n });\n this.addHook('beforeValidate', function () {\n return _this2.onBeforeValidate.apply(_this2, arguments);\n });\n this.addHook('beforeValueRender', function () {\n return _this2.onBeforeValueRender.apply(_this2, arguments);\n });\n this.addHook('modifyData', function () {\n return _this2.onModifyData.apply(_this2, arguments);\n });\n this.sheet.addLocalHook('afterRecalculate', function () {\n return _this2.onSheetAfterRecalculate.apply(_this2, arguments);\n });\n\n _get(_getPrototypeOf(Formulas.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n _get(_getPrototypeOf(Formulas.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Returns cell value (evaluated from formula expression) at specified cell coords.\n *\n * @param {number} row Row index.\n * @param {number} column Column index.\n * @returns {*}\n */\n\n }, {\n key: \"getCellValue\",\n value: function getCellValue(row, column) {\n var cell = this.sheet.getCellAt(row, column);\n return cell ? cell.getError() || cell.getValue() : void 0;\n }\n /**\n * Checks if there are any formula evaluations made under specific cell coords.\n *\n * @param {number} row Row index.\n * @param {number} column Column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"hasComputedCellValue\",\n value: function hasComputedCellValue(row, column) {\n return this.sheet.getCellAt(row, column) !== null;\n }\n /**\n * Recalculates all formulas (an algorithm will choose the best method of calculation).\n */\n\n }, {\n key: \"recalculate\",\n value: function recalculate() {\n this.sheet.recalculate();\n }\n /**\n * Recalculates all formulas (rebuild dependencies from scratch - slow approach).\n */\n\n }, {\n key: \"recalculateFull\",\n value: function recalculateFull() {\n this.sheet.recalculateFull();\n }\n /**\n * Recalculates all formulas (recalculate only changed cells - fast approach).\n */\n\n }, {\n key: \"recalculateOptimized\",\n value: function recalculateOptimized() {\n this.sheet.recalculateOptimized();\n }\n /**\n * Sets predefined variable name which can be visible while parsing formula expression.\n *\n * @param {string} name Variable name.\n * @param {*} value Variable value.\n */\n\n }, {\n key: \"setVariable\",\n value: function setVariable(name, value) {\n this.sheet.setVariable(name, value);\n }\n /**\n * Returns variable name.\n *\n * @param {string} name Variable name.\n * @returns {*}\n */\n\n }, {\n key: \"getVariable\",\n value: function getVariable(name) {\n return this.sheet.getVariable(name);\n }\n /**\n * Local hook listener for after sheet recalculation.\n *\n * @private\n * @param {Array} cells An array of recalculated/changed cells.\n */\n\n }, {\n key: \"onSheetAfterRecalculate\",\n value: function onSheetAfterRecalculate(cells) {\n if (this._skipRendering) {\n this._skipRendering = false;\n return;\n }\n\n var hot = this.hot;\n arrayEach(cells, function (cellValue) {\n if (cellValue instanceof CellValue) {\n var row = cellValue.row,\n column = cellValue.column;\n hot.validateCell(hot.getDataAtCell(row, column), hot.getCellMeta(row, column), function () {});\n }\n });\n hot.render();\n }\n /**\n * On modify row data listener. It overwrites raw values into calculated ones and force upper case all formula expressions.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} column Column index.\n * @param {object} valueHolder Value holder as an object to change value by reference.\n * @param {string} ioMode IO operation (`get` or `set`).\n */\n\n }, {\n key: \"onModifyData\",\n value: function onModifyData(row, column, valueHolder, ioMode) {\n if (ioMode === 'get' && this.hasComputedCellValue(row, column)) {\n valueHolder.value = this.getCellValue(row, column);\n } else if (ioMode === 'set' && isFormulaExpression(valueHolder.value)) {\n valueHolder.value = toUpperCaseFormula(valueHolder.value);\n }\n }\n /**\n * On before value render listener.\n *\n * @private\n * @param {*} value Value to render.\n * @returns {*}\n */\n\n }, {\n key: \"onBeforeValueRender\",\n value: function onBeforeValueRender(value) {\n var renderValue = value;\n\n if (isFormulaExpressionEscaped(renderValue)) {\n renderValue = unescapeFormulaExpression(renderValue);\n }\n\n return renderValue;\n }\n /**\n * On before validate listener.\n *\n * @private\n * @param {*} value Value to validate.\n * @param {number} row Row index.\n * @param {number} prop Column property.\n * @returns {*}\n */\n\n }, {\n key: \"onBeforeValidate\",\n value: function onBeforeValidate(value, row, prop) {\n var column = this.hot.propToCol(prop);\n var validateValue = value;\n\n if (this.hasComputedCellValue(row, column)) {\n validateValue = this.getCellValue(row, column);\n }\n\n return validateValue;\n }\n /**\n * `afterSetDataAtCell` listener.\n *\n * @private\n * @param {Array} changes Array of changes.\n * @param {string} [source] Source of changes.\n */\n\n }, {\n key: \"onAfterSetDataAtCell\",\n value: function onAfterSetDataAtCell(changes, source) {\n var _this3 = this;\n\n if (source === 'loadData') {\n return;\n }\n\n this.dataProvider.clearChanges();\n arrayEach(changes, function (_ref) {\n var _ref2 = _slicedToArray(_ref, 4),\n row = _ref2[0],\n column = _ref2[1],\n oldValue = _ref2[2],\n newValue = _ref2[3];\n\n var physicalColumn = _this3.hot.propToCol(column);\n\n var physicalRow = _this3.hot.toPhysicalRow(row);\n\n var value = newValue;\n\n if (isFormulaExpression(value)) {\n value = toUpperCaseFormula(value);\n }\n\n _this3.dataProvider.collectChanges(physicalRow, physicalColumn, value);\n\n if (oldValue !== value) {\n _this3.sheet.applyChanges(physicalRow, physicalColumn, value);\n }\n });\n this.recalculate();\n }\n /**\n * On before create row listener.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} amount An amount of removed rows.\n * @param {string} source Source of method call.\n */\n\n }, {\n key: \"onBeforeCreateRow\",\n value: function onBeforeCreateRow(row, amount, source) {\n if (source === 'UndoRedo.undo') {\n this.undoRedoSnapshot.restore();\n }\n }\n /**\n * On after create row listener.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} amount An amount of created rows.\n * @param {string} source Source of method call.\n */\n\n }, {\n key: \"onAfterCreateRow\",\n value: function onAfterCreateRow(row, amount, source) {\n this.sheet.alterManager.triggerAlter('insert_row', row, amount, source !== 'UndoRedo.undo');\n }\n /**\n * On before remove row listener.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} amount An amount of removed rows.\n */\n\n }, {\n key: \"onBeforeRemoveRow\",\n value: function onBeforeRemoveRow(row, amount) {\n this.undoRedoSnapshot.save('row', row, amount);\n }\n /**\n * On after remove row listener.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} amount An amount of removed rows.\n */\n\n }, {\n key: \"onAfterRemoveRow\",\n value: function onAfterRemoveRow(row, amount) {\n this.sheet.alterManager.triggerAlter('remove_row', row, amount);\n }\n /**\n * On before create column listener.\n *\n * @private\n * @param {number} column Column index.\n * @param {number} amount An amount of removed columns.\n * @param {string} source Source of method call.\n */\n\n }, {\n key: \"onBeforeCreateCol\",\n value: function onBeforeCreateCol(column, amount, source) {\n if (source === 'UndoRedo.undo') {\n this.undoRedoSnapshot.restore();\n }\n }\n /**\n * On after create column listener.\n *\n * @private\n * @param {number} column Column index.\n * @param {number} amount An amount of created columns.\n * @param {string} source Source of method call.\n */\n\n }, {\n key: \"onAfterCreateCol\",\n value: function onAfterCreateCol(column, amount, source) {\n this.sheet.alterManager.triggerAlter('insert_column', column, amount, source !== 'UndoRedo.undo');\n }\n /**\n * On before remove column listener.\n *\n * @private\n * @param {number} column Column index.\n * @param {number} amount An amount of removed columns.\n */\n\n }, {\n key: \"onBeforeRemoveCol\",\n value: function onBeforeRemoveCol(column, amount) {\n this.undoRedoSnapshot.save('column', column, amount);\n }\n /**\n * On after remove column listener.\n *\n * @private\n * @param {number} column Column index.\n * @param {number} amount An amount of created columns.\n */\n\n }, {\n key: \"onAfterRemoveCol\",\n value: function onAfterRemoveCol(column, amount) {\n this.sheet.alterManager.triggerAlter('remove_column', column, amount);\n }\n /**\n * On before column sorting listener.\n *\n * @private\n * @param {number} column Sorted column index.\n * @param {boolean} order Order type.\n */\n\n }, {\n key: \"onBeforeColumnSort\",\n value: function onBeforeColumnSort(column, order) {\n this.sheet.alterManager.prepareAlter('column_sorting', column, order);\n }\n /**\n * On after column sorting listener.\n *\n * @private\n * @param {number} column Sorted column index.\n * @param {boolean} order Order type.\n */\n\n }, {\n key: \"onAfterColumnSort\",\n value: function onAfterColumnSort(column, order) {\n this.sheet.alterManager.triggerAlter('column_sorting', column, order);\n }\n /**\n * On after load data listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData() {\n this._skipRendering = true;\n this.recalculateFull();\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.dataProvider.destroy();\n this.dataProvider = null;\n this.sheet.destroy();\n this.sheet = null;\n\n _get(_getPrototypeOf(Formulas.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return Formulas;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { outerWidth } from \"../../helpers/dom/element.mjs\";\nimport { warn } from \"../../helpers/console.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { BasePlugin } from \"../base/index.mjs\";\nexport var PLUGIN_KEY = 'headerTooltips';\nexport var PLUGIN_PRIORITY = 270;\nvar isDeprecationMessageShowed = false;\n/**\n * @plugin HeaderTooltips\n *\n * @deprecated This plugin is deprecated and will be removed in the next major release.\n * @description\n * Allows to add a tooltip to the table headers.\n *\n * Available options:\n * * the `rows` property defines if tooltips should be added to row headers,\n * * the `columns` property defines if tooltips should be added to column headers,\n * * the `onlyTrimmed` property defines if tooltips should be added only to headers, which content is trimmed by the header itself (the content being wider then the header).\n *\n * @example\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * // enable and configure header tooltips\n * headerTooltips: {\n * rows: true,\n * columns: true,\n * onlyTrimmed: false\n * }\n * });\n * ```\n */\n\nexport var HeaderTooltips = /*#__PURE__*/function (_BasePlugin) {\n _inherits(HeaderTooltips, _BasePlugin);\n\n var _super = _createSuper(HeaderTooltips);\n\n function HeaderTooltips(hotInstance) {\n var _this;\n\n _classCallCheck(this, HeaderTooltips);\n\n _this = _super.call(this, hotInstance);\n /**\n * Cached plugin settings.\n *\n * @private\n * @type {boolean|object}\n */\n\n _this.settings = null;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link HeaderTooltips#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(HeaderTooltips, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n if (!isDeprecationMessageShowed) {\n isDeprecationMessageShowed = true;\n warn('The Header Tooltips plugin is deprecated and will be removed in the next major release');\n }\n\n this.settings = this.hot.getSettings()[PLUGIN_KEY];\n this.parseSettings();\n this.addHook('afterGetColHeader', function (col, TH) {\n return _this2.onAfterGetHeader(col, TH);\n });\n this.addHook('afterGetRowHeader', function (col, TH) {\n return _this2.onAfterGetHeader(col, TH);\n });\n\n _get(_getPrototypeOf(HeaderTooltips.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.settings = null;\n this.clearTitleAttributes();\n\n _get(_getPrototypeOf(HeaderTooltips.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Parses the plugin settings.\n *\n * @private\n */\n\n }, {\n key: \"parseSettings\",\n value: function parseSettings() {\n if (typeof this.settings === 'boolean') {\n this.settings = {\n rows: true,\n columns: true,\n onlyTrimmed: false\n };\n }\n }\n /**\n * Clears the previously assigned title attributes.\n *\n * @private\n */\n\n }, {\n key: \"clearTitleAttributes\",\n value: function clearTitleAttributes() {\n var headerLevels = this.hot.view.wt.getSetting('columnHeaders').length;\n var mainHeaders = this.hot.view.wt.wtTable.THEAD;\n var topHeaders = this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD;\n var topLeftCornerOverlay = this.hot.view.wt.wtOverlays.topLeftCornerOverlay;\n var topLeftCornerHeaders = topLeftCornerOverlay ? topLeftCornerOverlay.clone.wtTable.THEAD : null;\n rangeEach(0, headerLevels - 1, function (i) {\n var masterLevel = mainHeaders.childNodes[i];\n var topLevel = topHeaders.childNodes[i];\n var topLeftCornerLevel = topLeftCornerHeaders ? topLeftCornerHeaders.childNodes[i] : null;\n rangeEach(0, masterLevel.childNodes.length - 1, function (j) {\n masterLevel.childNodes[j].removeAttribute('title');\n\n if (topLevel && topLevel.childNodes[j]) {\n topLevel.childNodes[j].removeAttribute('title');\n }\n\n if (topLeftCornerHeaders && topLeftCornerLevel && topLeftCornerLevel.childNodes[j]) {\n topLeftCornerLevel.childNodes[j].removeAttribute('title');\n }\n });\n }, true);\n }\n /**\n * Adds a tooltip to the headers.\n *\n * @private\n * @param {number} index Visual column index.\n * @param {HTMLElement} TH Header's TH element.\n */\n\n }, {\n key: \"onAfterGetHeader\",\n value: function onAfterGetHeader(index, TH) {\n var innerSpan = TH.querySelector('span');\n var isColHeader = TH.parentNode.parentNode.nodeName === 'THEAD';\n\n if (isColHeader && this.settings.columns || !isColHeader && this.settings.rows) {\n if (this.settings.onlyTrimmed) {\n if (outerWidth(innerSpan) >= outerWidth(TH) && outerWidth(innerSpan) !== 0) {\n TH.setAttribute('title', innerSpan.textContent);\n }\n } else {\n TH.setAttribute('title', innerSpan.textContent);\n }\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.settings = null;\n\n _get(_getPrototypeOf(HeaderTooltips.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return HeaderTooltips;\n}(BasePlugin);","import \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\n/**\n * @param {HiddenColumns} hiddenColumnsPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function hideColumnItem(hiddenColumnsPlugin) {\n return {\n key: 'hidden_columns_hide',\n name: function name() {\n var selection = this.getSelectedLast();\n var pluralForm = 0;\n\n if (Array.isArray(selection)) {\n var _selection = _slicedToArray(selection, 4),\n fromColumn = _selection[1],\n toColumn = _selection[3];\n\n if (fromColumn - toColumn !== 0) {\n pluralForm = 1;\n }\n }\n\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_HIDE_COLUMN, pluralForm);\n },\n callback: function callback() {\n var _this$getSelectedRang = this.getSelectedRangeLast(),\n from = _this$getSelectedRang.from,\n to = _this$getSelectedRang.to;\n\n var start = Math.max(Math.min(from.col, to.col), 0);\n var end = Math.max(from.col, to.col);\n var columnsToHide = [];\n\n for (var visualColumn = start; visualColumn <= end; visualColumn += 1) {\n columnsToHide.push(visualColumn);\n }\n\n var firstHiddenColumn = columnsToHide[0];\n var lastHiddenColumn = columnsToHide[columnsToHide.length - 1]; // Looking for a visual index on the right and then (when not found) on the left.\n\n var columnToSelect = this.columnIndexMapper.getFirstNotHiddenIndex(lastHiddenColumn + 1, 1, true, firstHiddenColumn - 1);\n hiddenColumnsPlugin.hideColumns(columnsToHide);\n\n if (Number.isInteger(columnToSelect) && columnToSelect >= 0) {\n this.selectColumns(columnToSelect);\n } else {\n this.deselectCell();\n }\n\n this.render();\n this.view.adjustElementsSize(true);\n },\n disabled: false,\n hidden: function hidden() {\n return !(this.selection.isSelectedByColumnHeader() || this.selection.isSelectedByCorner());\n }\n };\n}","import \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.string.includes.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nimport { arrayEach, arrayMap } from \"../../../helpers/array.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\n/**\n * @param {HiddenColumns} hiddenColumnsPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function showColumnItem(hiddenColumnsPlugin) {\n var columns = [];\n return {\n key: 'hidden_columns_show',\n name: function name() {\n var pluralForm = columns.length > 1 ? 1 : 0;\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_SHOW_COLUMN, pluralForm);\n },\n callback: function callback() {\n var _this$columnIndexMapp, _this$columnIndexMapp2;\n\n if (columns.length === 0) {\n return;\n }\n\n var startVisualColumn = columns[0];\n var endVisualColumn = columns[columns.length - 1]; // Add to the selection one more visual column on the left.\n\n startVisualColumn = (_this$columnIndexMapp = this.columnIndexMapper.getFirstNotHiddenIndex(startVisualColumn - 1, -1)) !== null && _this$columnIndexMapp !== void 0 ? _this$columnIndexMapp : 0; // Add to the selection one more visual column on the right.\n\n endVisualColumn = (_this$columnIndexMapp2 = this.columnIndexMapper.getFirstNotHiddenIndex(endVisualColumn + 1, 1)) !== null && _this$columnIndexMapp2 !== void 0 ? _this$columnIndexMapp2 : this.countCols() - 1;\n hiddenColumnsPlugin.showColumns(columns); // We render columns at first. It was needed for getting fixed columns.\n // Please take a look at #6864 for broader description.\n\n this.render();\n this.view.adjustElementsSize(true);\n var allColumnsSelected = endVisualColumn - startVisualColumn + 1 === this.countCols(); // When all headers needs to be selected then do nothing. The header selection is\n // automatically handled by corner click.\n\n if (!allColumnsSelected) {\n this.selectColumns(startVisualColumn, endVisualColumn);\n }\n },\n disabled: false,\n hidden: function hidden() {\n var _this = this;\n\n var hiddenPhysicalColumns = arrayMap(hiddenColumnsPlugin.getHiddenColumns(), function (visualColumnIndex) {\n return _this.toPhysicalColumn(visualColumnIndex);\n });\n\n if (!(this.selection.isSelectedByColumnHeader() || this.selection.isSelectedByCorner()) || hiddenPhysicalColumns.length < 1) {\n return true;\n }\n\n columns.length = 0;\n var selectedRangeLast = this.getSelectedRangeLast();\n var visualStartColumn = selectedRangeLast.getTopLeftCorner().col;\n var visualEndColumn = selectedRangeLast.getBottomRightCorner().col;\n var columnIndexMapper = this.columnIndexMapper;\n var renderableStartColumn = columnIndexMapper.getRenderableFromVisualIndex(visualStartColumn);\n var renderableEndColumn = columnIndexMapper.getRenderableFromVisualIndex(visualEndColumn);\n var notTrimmedColumnIndexes = columnIndexMapper.getNotTrimmedIndexes();\n var physicalColumnIndexes = [];\n\n if (visualStartColumn !== visualEndColumn) {\n var visualColumnsInRange = visualEndColumn - visualStartColumn + 1;\n var renderedColumnsInRange = renderableEndColumn - renderableStartColumn + 1; // Collect not trimmed columns if there are some hidden columns in the selection range.\n\n if (visualColumnsInRange > renderedColumnsInRange) {\n var physicalIndexesInRange = notTrimmedColumnIndexes.slice(visualStartColumn, visualEndColumn + 1);\n physicalColumnIndexes.push.apply(physicalColumnIndexes, _toConsumableArray(physicalIndexesInRange.filter(function (physicalIndex) {\n return hiddenPhysicalColumns.includes(physicalIndex);\n })));\n } // Handled column is the first rendered index and there are some visual indexes before it.\n\n } else if (renderableStartColumn === 0 && renderableStartColumn < visualStartColumn) {\n // not trimmed indexes -> array of mappings from visual (native array's index) to physical indexes (value).\n physicalColumnIndexes.push.apply(physicalColumnIndexes, _toConsumableArray(notTrimmedColumnIndexes.slice(0, visualStartColumn))); // physical indexes\n // When all columns are hidden and the context menu is triggered using top-left corner.\n } else if (renderableStartColumn === null) {\n // Show all hidden columns.\n physicalColumnIndexes.push.apply(physicalColumnIndexes, _toConsumableArray(notTrimmedColumnIndexes.slice(0, this.countCols())));\n } else {\n var lastVisualIndex = this.countCols() - 1;\n var lastRenderableIndex = columnIndexMapper.getRenderableFromVisualIndex(columnIndexMapper.getFirstNotHiddenIndex(lastVisualIndex, -1)); // Handled column is the last rendered index and there are some visual indexes after it.\n\n if (renderableEndColumn === lastRenderableIndex && lastVisualIndex > visualEndColumn) {\n physicalColumnIndexes.push.apply(physicalColumnIndexes, _toConsumableArray(notTrimmedColumnIndexes.slice(visualEndColumn + 1)));\n }\n }\n\n arrayEach(physicalColumnIndexes, function (physicalColumnIndex) {\n columns.push(_this.toVisualColumn(physicalColumnIndex));\n });\n return columns.length === 0;\n }\n };\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.every.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n descriptor.value = value;\n }\n\n return value;\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { addClass } from \"../../helpers/dom/element.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { arrayEach, arrayMap, arrayReduce } from \"../../helpers/array.mjs\";\nimport { isObject } from \"../../helpers/object.mjs\";\nimport { isUndefined } from \"../../helpers/mixed.mjs\";\nimport { SEPARATOR } from \"../contextMenu/predefinedItems.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport hideColumnItem from \"./contextMenuItem/hideColumn.mjs\";\nimport showColumnItem from \"./contextMenuItem/showColumn.mjs\";\nimport { HidingMap } from \"../../translations/index.mjs\";\nHooks.getSingleton().register('beforeHideColumns');\nHooks.getSingleton().register('afterHideColumns');\nHooks.getSingleton().register('beforeUnhideColumns');\nHooks.getSingleton().register('afterUnhideColumns');\nexport var PLUGIN_KEY = 'hiddenColumns';\nexport var PLUGIN_PRIORITY = 310;\n/**\n * @plugin HiddenColumns\n *\n * @description\n * Plugin allows to hide certain columns. The hiding is achieved by not rendering the columns. The plugin not modifies\n * the source data and do not participate in data transformation (the shape of data returned by `getData*` methods stays intact).\n *\n * Possible plugin settings:\n * * `copyPasteEnabled` as `Boolean` (default `true`)\n * * `columns` as `Array`\n * * `indicators` as `Boolean` (default `false`).\n *\n * @example\n *\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * hiddenColumns: {\n * copyPasteEnabled: true,\n * indicators: true,\n * columns: [1, 2, 5]\n * }\n * });\n *\n * // access to hiddenColumns plugin instance:\n * const hiddenColumnsPlugin = hot.getPlugin('hiddenColumns');\n *\n * // show single column\n * hiddenColumnsPlugin.showColumn(1);\n *\n * // show multiple columns\n * hiddenColumnsPlugin.showColumn(1, 2, 9);\n *\n * // or as an array\n * hiddenColumnsPlugin.showColumns([1, 2, 9]);\n *\n * // hide single column\n * hiddenColumnsPlugin.hideColumn(1);\n *\n * // hide multiple columns\n * hiddenColumnsPlugin.hideColumn(1, 2, 9);\n *\n * // or as an array\n * hiddenColumnsPlugin.hideColumns([1, 2, 9]);\n *\n * // rerender the table to see all changes\n * hot.render();\n * ```\n */\n\nvar _settings = new WeakMap();\n\nvar _hiddenColumnsMap = new WeakMap();\n\nexport var HiddenColumns = /*#__PURE__*/function (_BasePlugin) {\n _inherits(HiddenColumns, _BasePlugin);\n\n var _super = _createSuper(HiddenColumns);\n\n function HiddenColumns() {\n var _this;\n\n _classCallCheck(this, HiddenColumns);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _settings.set(_assertThisInitialized(_this), {\n writable: true,\n value: {}\n });\n\n _hiddenColumnsMap.set(_assertThisInitialized(_this), {\n writable: true,\n value: null\n });\n\n return _this;\n }\n\n _createClass(HiddenColumns, [{\n key: \"isEnabled\",\n value:\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link HiddenColumns#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var pluginSettings = this.hot.getSettings()[PLUGIN_KEY];\n\n if (isObject(pluginSettings)) {\n _classPrivateFieldSet(this, _settings, pluginSettings);\n\n if (isUndefined(pluginSettings.copyPasteEnabled)) {\n pluginSettings.copyPasteEnabled = true;\n }\n }\n\n _classPrivateFieldSet(this, _hiddenColumnsMap, new HidingMap());\n\n _classPrivateFieldGet(this, _hiddenColumnsMap).addLocalHook('init', function () {\n return _this2.onMapInit();\n });\n\n this.hot.columnIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(this, _hiddenColumnsMap));\n this.addHook('afterContextMenuDefaultOptions', function () {\n return _this2.onAfterContextMenuDefaultOptions.apply(_this2, arguments);\n });\n this.addHook('afterGetCellMeta', function (row, col, cellProperties) {\n return _this2.onAfterGetCellMeta(row, col, cellProperties);\n });\n this.addHook('modifyColWidth', function (width, col) {\n return _this2.onModifyColWidth(width, col);\n });\n this.addHook('afterGetColHeader', function () {\n return _this2.onAfterGetColHeader.apply(_this2, arguments);\n });\n this.addHook('modifyCopyableRange', function (ranges) {\n return _this2.onModifyCopyableRange(ranges);\n });\n\n _get(_getPrototypeOf(HiddenColumns.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(HiddenColumns.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.hot.columnIndexMapper.unregisterMap(this.pluginName);\n\n _classPrivateFieldSet(this, _settings, {});\n\n _get(_getPrototypeOf(HiddenColumns.prototype), \"disablePlugin\", this).call(this);\n\n this.resetCellsMeta();\n }\n /**\n * Shows the provided columns.\n *\n * @param {number[]} columns Array of visual column indexes.\n */\n\n }, {\n key: \"showColumns\",\n value: function showColumns(columns) {\n var _this3 = this;\n\n var currentHideConfig = this.getHiddenColumns();\n var isValidConfig = this.isValidConfig(columns);\n var destinationHideConfig = currentHideConfig;\n\n var hidingMapValues = _classPrivateFieldGet(this, _hiddenColumnsMap).getValues().slice();\n\n var isAnyColumnShowed = columns.length > 0;\n\n if (isValidConfig && isAnyColumnShowed) {\n var physicalColumns = columns.map(function (visualColumn) {\n return _this3.hot.toPhysicalColumn(visualColumn);\n }); // Preparing new values for hiding map.\n\n arrayEach(physicalColumns, function (physicalColumn) {\n hidingMapValues[physicalColumn] = false;\n }); // Preparing new hiding config.\n\n destinationHideConfig = arrayReduce(hidingMapValues, function (hiddenIndexes, isHidden, physicalIndex) {\n if (isHidden) {\n hiddenIndexes.push(_this3.hot.toVisualColumn(physicalIndex));\n }\n\n return hiddenIndexes;\n }, []);\n }\n\n var continueHiding = this.hot.runHooks('beforeUnhideColumns', currentHideConfig, destinationHideConfig, isValidConfig && isAnyColumnShowed);\n\n if (continueHiding === false) {\n return;\n }\n\n if (isValidConfig && isAnyColumnShowed) {\n _classPrivateFieldGet(this, _hiddenColumnsMap).setValues(hidingMapValues);\n } // @TODO Should call once per render cycle, currently fired separately in different plugins\n\n\n this.hot.view.adjustElementsSize();\n this.hot.runHooks('afterUnhideColumns', currentHideConfig, destinationHideConfig, isValidConfig && isAnyColumnShowed, isValidConfig && destinationHideConfig.length < currentHideConfig.length);\n }\n /**\n * Shows a single column.\n *\n * @param {...number} column Visual column index.\n */\n\n }, {\n key: \"showColumn\",\n value: function showColumn() {\n for (var _len2 = arguments.length, column = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n column[_key2] = arguments[_key2];\n }\n\n this.showColumns(column);\n }\n /**\n * Hides the columns provided in the array.\n *\n * @param {number[]} columns Array of visual column indexes.\n */\n\n }, {\n key: \"hideColumns\",\n value: function hideColumns(columns) {\n var _this4 = this;\n\n var currentHideConfig = this.getHiddenColumns();\n var isConfigValid = this.isValidConfig(columns);\n var destinationHideConfig = currentHideConfig;\n\n if (isConfigValid) {\n destinationHideConfig = Array.from(new Set(currentHideConfig.concat(columns)));\n }\n\n var continueHiding = this.hot.runHooks('beforeHideColumns', currentHideConfig, destinationHideConfig, isConfigValid);\n\n if (continueHiding === false) {\n return;\n }\n\n if (isConfigValid) {\n this.hot.batchExecution(function () {\n arrayEach(columns, function (visualColumn) {\n _classPrivateFieldGet(_this4, _hiddenColumnsMap).setValueAtIndex(_this4.hot.toPhysicalColumn(visualColumn), true);\n });\n }, true);\n }\n\n this.hot.runHooks('afterHideColumns', currentHideConfig, destinationHideConfig, isConfigValid, isConfigValid && destinationHideConfig.length > currentHideConfig.length);\n }\n /**\n * Hides a single column.\n *\n * @param {...number} column Visual column index.\n */\n\n }, {\n key: \"hideColumn\",\n value: function hideColumn() {\n for (var _len3 = arguments.length, column = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n column[_key3] = arguments[_key3];\n }\n\n this.hideColumns(column);\n }\n /**\n * Returns an array of visual indexes of hidden columns.\n *\n * @returns {number[]}\n */\n\n }, {\n key: \"getHiddenColumns\",\n value: function getHiddenColumns() {\n var _this5 = this;\n\n return arrayMap(_classPrivateFieldGet(this, _hiddenColumnsMap).getHiddenIndexes(), function (physicalColumnIndex) {\n return _this5.hot.toVisualColumn(physicalColumnIndex);\n });\n }\n /**\n * Checks if the provided column is hidden.\n *\n * @param {number} column Visual column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isHidden\",\n value: function isHidden(column) {\n return _classPrivateFieldGet(this, _hiddenColumnsMap).getValueAtIndex(this.hot.toPhysicalColumn(column)) || false;\n }\n /**\n * Get if trim config is valid. Check whether all of the provided column indexes are within the bounds of the table.\n *\n * @param {Array} hiddenColumns List of hidden column indexes.\n * @returns {boolean}\n */\n\n }, {\n key: \"isValidConfig\",\n value: function isValidConfig(hiddenColumns) {\n var nrOfColumns = this.hot.countCols();\n\n if (Array.isArray(hiddenColumns) && hiddenColumns.length > 0) {\n return hiddenColumns.every(function (visualColumn) {\n return Number.isInteger(visualColumn) && visualColumn >= 0 && visualColumn < nrOfColumns;\n });\n }\n\n return false;\n }\n /**\n * Reset all rendered cells meta.\n *\n * @private\n */\n\n }, {\n key: \"resetCellsMeta\",\n value: function resetCellsMeta() {\n arrayEach(this.hot.getCellsMeta(), function (meta) {\n if (meta) {\n meta.skipColumnOnPaste = false;\n }\n });\n }\n /**\n * Adds the additional column width for the hidden column indicators.\n *\n * @private\n * @param {number|undefined} width Column width.\n * @param {number} column Visual column index.\n * @returns {number}\n */\n\n }, {\n key: \"onModifyColWidth\",\n value: function onModifyColWidth(width, column) {\n // Hook is triggered internally only for the visible columns. Conditional will be handled for the API\n // calls of the `getColWidth` function on not visible indexes.\n if (this.isHidden(column)) {\n return 0;\n }\n\n if (_classPrivateFieldGet(this, _settings).indicators && (this.isHidden(column + 1) || this.isHidden(column - 1))) {\n // Add additional space for hidden column indicator.\n if (typeof width === 'number' && this.hot.hasColHeaders()) {\n return width + 15;\n }\n }\n }\n /**\n * Sets the copy-related cell meta.\n *\n * @private\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {object} cellProperties Object containing the cell properties.\n */\n\n }, {\n key: \"onAfterGetCellMeta\",\n value: function onAfterGetCellMeta(row, column, cellProperties) {\n if (_classPrivateFieldGet(this, _settings).copyPasteEnabled === false && this.isHidden(column)) {\n // Cell property handled by the `Autofill` and the `CopyPaste` plugins.\n cellProperties.skipColumnOnPaste = true;\n }\n\n if (this.isHidden(column - 1)) {\n cellProperties.className = cellProperties.className || '';\n\n if (cellProperties.className.indexOf('afterHiddenColumn') === -1) {\n cellProperties.className += ' afterHiddenColumn';\n }\n } else if (cellProperties.className) {\n var classArr = cellProperties.className.split(' ');\n\n if (classArr.length > 0) {\n var containAfterHiddenColumn = classArr.indexOf('afterHiddenColumn');\n\n if (containAfterHiddenColumn > -1) {\n classArr.splice(containAfterHiddenColumn, 1);\n }\n\n cellProperties.className = classArr.join(' ');\n }\n }\n }\n /**\n * Modifies the copyable range, accordingly to the provided config.\n *\n * @private\n * @param {Array} ranges An array of objects defining copyable cells.\n * @returns {Array}\n */\n\n }, {\n key: \"onModifyCopyableRange\",\n value: function onModifyCopyableRange(ranges) {\n var _this6 = this; // Ranges shouldn't be modified when `copyPasteEnabled` option is set to `true` (by default).\n\n\n if (_classPrivateFieldGet(this, _settings).copyPasteEnabled) {\n return ranges;\n }\n\n var newRanges = [];\n\n var pushRange = function pushRange(startRow, endRow, startCol, endCol) {\n newRanges.push({\n startRow: startRow,\n endRow: endRow,\n startCol: startCol,\n endCol: endCol\n });\n };\n\n arrayEach(ranges, function (range) {\n var isHidden = true;\n var rangeStart = 0;\n rangeEach(range.startCol, range.endCol, function (visualColumn) {\n if (_this6.isHidden(visualColumn)) {\n if (!isHidden) {\n pushRange(range.startRow, range.endRow, rangeStart, visualColumn - 1);\n }\n\n isHidden = true;\n } else {\n if (isHidden) {\n rangeStart = visualColumn;\n }\n\n if (visualColumn === range.endCol) {\n pushRange(range.startRow, range.endRow, rangeStart, visualColumn);\n }\n\n isHidden = false;\n }\n });\n });\n return newRanges;\n }\n /**\n * Adds the needed classes to the headers.\n *\n * @private\n * @param {number} column Visual column index.\n * @param {HTMLElement} TH Header's TH element.\n */\n\n }, {\n key: \"onAfterGetColHeader\",\n value: function onAfterGetColHeader(column, TH) {\n if (!_classPrivateFieldGet(this, _settings).indicators || column < 0) {\n return;\n }\n\n var classList = [];\n\n if (column >= 1 && this.isHidden(column - 1)) {\n classList.push('afterHiddenColumn');\n }\n\n if (column < this.hot.countCols() - 1 && this.isHidden(column + 1)) {\n classList.push('beforeHiddenColumn');\n }\n\n addClass(TH, classList);\n }\n /**\n * Add Show-hide columns to context menu.\n *\n * @private\n * @param {object} options An array of objects containing information about the pre-defined Context Menu items.\n */\n\n }, {\n key: \"onAfterContextMenuDefaultOptions\",\n value: function onAfterContextMenuDefaultOptions(options) {\n options.items.push({\n name: SEPARATOR\n }, hideColumnItem(this), showColumnItem(this));\n }\n /**\n * On map initialized hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onMapInit\",\n value: function onMapInit() {\n if (Array.isArray(_classPrivateFieldGet(this, _settings).columns)) {\n this.hideColumns(_classPrivateFieldGet(this, _settings).columns);\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.columnIndexMapper.unregisterMap(this.pluginName);\n\n _classPrivateFieldSet(this, _settings, null);\n\n _classPrivateFieldSet(this, _hiddenColumnsMap, null);\n\n _get(_getPrototypeOf(HiddenColumns.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n /**\n * Cached plugin settings.\n *\n * @private\n * @type {object}\n */\n\n }]);\n\n return HiddenColumns;\n}(BasePlugin);","import \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\n/**\n * @param {HiddenRows} hiddenRowsPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function hideRowItem(hiddenRowsPlugin) {\n return {\n key: 'hidden_rows_hide',\n name: function name() {\n var selection = this.getSelectedLast();\n var pluralForm = 0;\n\n if (Array.isArray(selection)) {\n var _selection = _slicedToArray(selection, 3),\n fromRow = _selection[0],\n toRow = _selection[2];\n\n if (fromRow - toRow !== 0) {\n pluralForm = 1;\n }\n }\n\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_HIDE_ROW, pluralForm);\n },\n callback: function callback() {\n var _this$getSelectedRang = this.getSelectedRangeLast(),\n from = _this$getSelectedRang.from,\n to = _this$getSelectedRang.to;\n\n var start = Math.max(Math.min(from.row, to.row), 0);\n var end = Math.max(from.row, to.row);\n var rowsToHide = [];\n\n for (var visualRow = start; visualRow <= end; visualRow += 1) {\n rowsToHide.push(visualRow);\n }\n\n var firstHiddenRow = rowsToHide[0];\n var lastHiddenRow = rowsToHide[rowsToHide.length - 1]; // Looking for a visual index on the top and then (when not found) on the bottom.\n\n var rowToSelect = this.rowIndexMapper.getFirstNotHiddenIndex(lastHiddenRow + 1, 1, true, firstHiddenRow - 1);\n hiddenRowsPlugin.hideRows(rowsToHide);\n\n if (Number.isInteger(rowToSelect) && rowToSelect >= 0) {\n this.selectRows(rowToSelect);\n } else {\n this.deselectCell();\n }\n\n this.render();\n this.view.adjustElementsSize(true);\n },\n disabled: false,\n hidden: function hidden() {\n return !(this.selection.isSelectedByRowHeader() || this.selection.isSelectedByCorner());\n }\n };\n}","import \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.string.includes.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nimport { arrayEach, arrayMap } from \"../../../helpers/array.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\n/**\n * @param {HiddenRows} hiddenRowsPlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function showRowItem(hiddenRowsPlugin) {\n var rows = [];\n return {\n key: 'hidden_rows_show',\n name: function name() {\n var pluralForm = rows.length > 1 ? 1 : 0;\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_SHOW_ROW, pluralForm);\n },\n callback: function callback() {\n var _this$rowIndexMapper$, _this$rowIndexMapper$2;\n\n if (rows.length === 0) {\n return;\n }\n\n var startVisualRow = rows[0];\n var endVisualRow = rows[rows.length - 1]; // Add to the selection one more visual row on the top.\n\n startVisualRow = (_this$rowIndexMapper$ = this.rowIndexMapper.getFirstNotHiddenIndex(startVisualRow - 1, -1)) !== null && _this$rowIndexMapper$ !== void 0 ? _this$rowIndexMapper$ : 0; // Add to the selection one more visual row on the bottom.\n\n endVisualRow = (_this$rowIndexMapper$2 = this.rowIndexMapper.getFirstNotHiddenIndex(endVisualRow + 1, 1)) !== null && _this$rowIndexMapper$2 !== void 0 ? _this$rowIndexMapper$2 : this.countRows() - 1;\n hiddenRowsPlugin.showRows(rows); // We render rows at first. It was needed for getting fixed rows.\n // Please take a look at #6864 for broader description.\n\n this.render();\n this.view.adjustElementsSize(true);\n var allRowsSelected = endVisualRow - startVisualRow + 1 === this.countRows(); // When all headers needs to be selected then do nothing. The header selection is\n // automatically handled by corner click.\n\n if (!allRowsSelected) {\n this.selectRows(startVisualRow, endVisualRow);\n }\n },\n disabled: false,\n hidden: function hidden() {\n var _this = this;\n\n var hiddenPhysicalRows = arrayMap(hiddenRowsPlugin.getHiddenRows(), function (visualRowIndex) {\n return _this.toPhysicalRow(visualRowIndex);\n });\n\n if (!(this.selection.isSelectedByRowHeader() || this.selection.isSelectedByCorner()) || hiddenPhysicalRows.length < 1) {\n return true;\n }\n\n rows.length = 0;\n var selectedRangeLast = this.getSelectedRangeLast();\n var visualStartRow = selectedRangeLast.getTopLeftCorner().row;\n var visualEndRow = selectedRangeLast.getBottomRightCorner().row;\n var rowIndexMapper = this.rowIndexMapper;\n var renderableStartRow = rowIndexMapper.getRenderableFromVisualIndex(visualStartRow);\n var renderableEndRow = rowIndexMapper.getRenderableFromVisualIndex(visualEndRow);\n var notTrimmedRowIndexes = rowIndexMapper.getNotTrimmedIndexes();\n var physicalRowIndexes = [];\n\n if (visualStartRow !== visualEndRow) {\n var visualRowsInRange = visualEndRow - visualStartRow + 1;\n var renderedRowsInRange = renderableEndRow - renderableStartRow + 1; // Collect not trimmed rows if there are some hidden rows in the selection range.\n\n if (visualRowsInRange > renderedRowsInRange) {\n var physicalIndexesInRange = notTrimmedRowIndexes.slice(visualStartRow, visualEndRow + 1);\n physicalRowIndexes.push.apply(physicalRowIndexes, _toConsumableArray(physicalIndexesInRange.filter(function (physicalIndex) {\n return hiddenPhysicalRows.includes(physicalIndex);\n })));\n } // Handled row is the first rendered index and there are some visual indexes before it.\n\n } else if (renderableStartRow === 0 && renderableStartRow < visualStartRow) {\n // not trimmed indexes -> array of mappings from visual (native array's index) to physical indexes (value).\n physicalRowIndexes.push.apply(physicalRowIndexes, _toConsumableArray(notTrimmedRowIndexes.slice(0, visualStartRow))); // physical indexes\n // When all rows are hidden and the context menu is triggered using top-left corner.\n } else if (renderableStartRow === null) {\n // Show all hidden rows.\n physicalRowIndexes.push.apply(physicalRowIndexes, _toConsumableArray(notTrimmedRowIndexes.slice(0, this.countRows())));\n } else {\n var lastVisualIndex = this.countRows() - 1;\n var lastRenderableIndex = rowIndexMapper.getRenderableFromVisualIndex(rowIndexMapper.getFirstNotHiddenIndex(lastVisualIndex, -1)); // Handled row is the last rendered index and there are some visual indexes after it.\n\n if (renderableEndRow === lastRenderableIndex && lastVisualIndex > visualEndRow) {\n physicalRowIndexes.push.apply(physicalRowIndexes, _toConsumableArray(notTrimmedRowIndexes.slice(visualEndRow + 1)));\n }\n }\n\n arrayEach(physicalRowIndexes, function (physicalRowIndex) {\n rows.push(_this.toVisualRow(physicalRowIndex));\n });\n return rows.length === 0;\n }\n };\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.every.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n descriptor.value = value;\n }\n\n return value;\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { addClass } from \"../../helpers/dom/element.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { arrayEach, arrayMap, arrayReduce } from \"../../helpers/array.mjs\";\nimport { isObject } from \"../../helpers/object.mjs\";\nimport { isUndefined } from \"../../helpers/mixed.mjs\";\nimport { SEPARATOR } from \"../contextMenu/predefinedItems.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport hideRowItem from \"./contextMenuItem/hideRow.mjs\";\nimport showRowItem from \"./contextMenuItem/showRow.mjs\";\nimport { HidingMap } from \"../../translations/index.mjs\";\nHooks.getSingleton().register('beforeHideRows');\nHooks.getSingleton().register('afterHideRows');\nHooks.getSingleton().register('beforeUnhideRows');\nHooks.getSingleton().register('afterUnhideRows');\nexport var PLUGIN_KEY = 'hiddenRows';\nexport var PLUGIN_PRIORITY = 320;\n/**\n * @plugin HiddenRows\n *\n * @description\n * Plugin allows to hide certain rows. The hiding is achieved by rendering the rows with height set as 0px.\n * The plugin not modifies the source data and do not participate in data transformation (the shape of data returned\n * by `getData*` methods stays intact).\n *\n * Possible plugin settings:\n * * `copyPasteEnabled` as `Boolean` (default `true`)\n * * `rows` as `Array`\n * * `indicators` as `Boolean` (default `false`).\n *\n * @example\n *\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * hiddenRows: {\n * copyPasteEnabled: true,\n * indicators: true,\n * rows: [1, 2, 5]\n * }\n * });\n *\n * // access to hiddenRows plugin instance\n * const hiddenRowsPlugin = hot.getPlugin('hiddenRows');\n *\n * // show single row\n * hiddenRowsPlugin.showRow(1);\n *\n * // show multiple rows\n * hiddenRowsPlugin.showRow(1, 2, 9);\n *\n * // or as an array\n * hiddenRowsPlugin.showRows([1, 2, 9]);\n *\n * // hide single row\n * hiddenRowsPlugin.hideRow(1);\n *\n * // hide multiple rows\n * hiddenRowsPlugin.hideRow(1, 2, 9);\n *\n * // or as an array\n * hiddenRowsPlugin.hideRows([1, 2, 9]);\n *\n * // rerender the table to see all changes\n * hot.render();\n * ```\n */\n\nvar _settings = new WeakMap();\n\nvar _hiddenRowsMap = new WeakMap();\n\nexport var HiddenRows = /*#__PURE__*/function (_BasePlugin) {\n _inherits(HiddenRows, _BasePlugin);\n\n var _super = _createSuper(HiddenRows);\n\n function HiddenRows() {\n var _this;\n\n _classCallCheck(this, HiddenRows);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _settings.set(_assertThisInitialized(_this), {\n writable: true,\n value: {}\n });\n\n _hiddenRowsMap.set(_assertThisInitialized(_this), {\n writable: true,\n value: null\n });\n\n return _this;\n }\n\n _createClass(HiddenRows, [{\n key: \"isEnabled\",\n value:\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link HiddenRows#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var pluginSettings = this.hot.getSettings()[PLUGIN_KEY];\n\n if (isObject(pluginSettings)) {\n _classPrivateFieldSet(this, _settings, pluginSettings);\n\n if (isUndefined(pluginSettings.copyPasteEnabled)) {\n pluginSettings.copyPasteEnabled = true;\n }\n }\n\n _classPrivateFieldSet(this, _hiddenRowsMap, new HidingMap());\n\n _classPrivateFieldGet(this, _hiddenRowsMap).addLocalHook('init', function () {\n return _this2.onMapInit();\n });\n\n this.hot.rowIndexMapper.registerMap(this.pluginName, _classPrivateFieldGet(this, _hiddenRowsMap));\n this.addHook('afterContextMenuDefaultOptions', function () {\n return _this2.onAfterContextMenuDefaultOptions.apply(_this2, arguments);\n });\n this.addHook('afterGetCellMeta', function (row, col, cellProperties) {\n return _this2.onAfterGetCellMeta(row, col, cellProperties);\n });\n this.addHook('modifyRowHeight', function (height, row) {\n return _this2.onModifyRowHeight(height, row);\n });\n this.addHook('afterGetRowHeader', function () {\n return _this2.onAfterGetRowHeader.apply(_this2, arguments);\n });\n this.addHook('modifyCopyableRange', function (ranges) {\n return _this2.onModifyCopyableRange(ranges);\n });\n\n _get(_getPrototypeOf(HiddenRows.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(HiddenRows.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.hot.rowIndexMapper.unregisterMap(this.pluginName);\n\n _classPrivateFieldSet(this, _settings, {});\n\n _get(_getPrototypeOf(HiddenRows.prototype), \"disablePlugin\", this).call(this);\n\n this.resetCellsMeta();\n }\n /**\n * Shows the rows provided in the array.\n *\n * @param {number[]} rows Array of visual row indexes.\n */\n\n }, {\n key: \"showRows\",\n value: function showRows(rows) {\n var _this3 = this;\n\n var currentHideConfig = this.getHiddenRows();\n var isValidConfig = this.isValidConfig(rows);\n var destinationHideConfig = currentHideConfig;\n\n var hidingMapValues = _classPrivateFieldGet(this, _hiddenRowsMap).getValues().slice();\n\n var isAnyRowShowed = rows.length > 0;\n\n if (isValidConfig && isAnyRowShowed) {\n var physicalRows = rows.map(function (visualRow) {\n return _this3.hot.toPhysicalRow(visualRow);\n }); // Preparing new values for hiding map.\n\n arrayEach(physicalRows, function (physicalRow) {\n hidingMapValues[physicalRow] = false;\n }); // Preparing new hiding config.\n\n destinationHideConfig = arrayReduce(hidingMapValues, function (hiddenIndexes, isHidden, physicalIndex) {\n if (isHidden) {\n hiddenIndexes.push(_this3.hot.toVisualRow(physicalIndex));\n }\n\n return hiddenIndexes;\n }, []);\n }\n\n var continueHiding = this.hot.runHooks('beforeUnhideRows', currentHideConfig, destinationHideConfig, isValidConfig && isAnyRowShowed);\n\n if (continueHiding === false) {\n return;\n }\n\n if (isValidConfig && isAnyRowShowed) {\n _classPrivateFieldGet(this, _hiddenRowsMap).setValues(hidingMapValues);\n }\n\n this.hot.runHooks('afterUnhideRows', currentHideConfig, destinationHideConfig, isValidConfig && isAnyRowShowed, isValidConfig && destinationHideConfig.length < currentHideConfig.length);\n }\n /**\n * Shows the row provided as row index (counting from 0).\n *\n * @param {...number} row Visual row index.\n */\n\n }, {\n key: \"showRow\",\n value: function showRow() {\n for (var _len2 = arguments.length, row = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n row[_key2] = arguments[_key2];\n }\n\n this.showRows(row);\n }\n /**\n * Hides the rows provided in the array.\n *\n * @param {number[]} rows Array of visual row indexes.\n */\n\n }, {\n key: \"hideRows\",\n value: function hideRows(rows) {\n var _this4 = this;\n\n var currentHideConfig = this.getHiddenRows();\n var isConfigValid = this.isValidConfig(rows);\n var destinationHideConfig = currentHideConfig;\n\n if (isConfigValid) {\n destinationHideConfig = Array.from(new Set(currentHideConfig.concat(rows)));\n }\n\n var continueHiding = this.hot.runHooks('beforeHideRows', currentHideConfig, destinationHideConfig, isConfigValid);\n\n if (continueHiding === false) {\n return;\n }\n\n if (isConfigValid) {\n this.hot.batchExecution(function () {\n arrayEach(rows, function (visualRow) {\n _classPrivateFieldGet(_this4, _hiddenRowsMap).setValueAtIndex(_this4.hot.toPhysicalRow(visualRow), true);\n });\n }, true);\n }\n\n this.hot.runHooks('afterHideRows', currentHideConfig, destinationHideConfig, isConfigValid, isConfigValid && destinationHideConfig.length > currentHideConfig.length);\n }\n /**\n * Hides the row provided as row index (counting from 0).\n *\n * @param {...number} row Visual row index.\n */\n\n }, {\n key: \"hideRow\",\n value: function hideRow() {\n for (var _len3 = arguments.length, row = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n row[_key3] = arguments[_key3];\n }\n\n this.hideRows(row);\n }\n /**\n * Returns an array of visual indexes of hidden rows.\n *\n * @returns {number[]}\n */\n\n }, {\n key: \"getHiddenRows\",\n value: function getHiddenRows() {\n var _this5 = this;\n\n return arrayMap(_classPrivateFieldGet(this, _hiddenRowsMap).getHiddenIndexes(), function (physicalRowIndex) {\n return _this5.hot.toVisualRow(physicalRowIndex);\n });\n }\n /**\n * Checks if the provided row is hidden.\n *\n * @param {number} row Visual row index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isHidden\",\n value: function isHidden(row) {\n return _classPrivateFieldGet(this, _hiddenRowsMap).getValueAtIndex(this.hot.toPhysicalRow(row)) || false;\n }\n /**\n * Checks whether all of the provided row indexes are within the bounds of the table.\n *\n * @param {Array} hiddenRows List of hidden visual row indexes.\n * @returns {boolean}\n */\n\n }, {\n key: \"isValidConfig\",\n value: function isValidConfig(hiddenRows) {\n var nrOfRows = this.hot.countRows();\n\n if (Array.isArray(hiddenRows) && hiddenRows.length > 0) {\n return hiddenRows.every(function (visualRow) {\n return Number.isInteger(visualRow) && visualRow >= 0 && visualRow < nrOfRows;\n });\n }\n\n return false;\n }\n /**\n * Resets all rendered cells meta.\n *\n * @private\n */\n\n }, {\n key: \"resetCellsMeta\",\n value: function resetCellsMeta() {\n arrayEach(this.hot.getCellsMeta(), function (meta) {\n if (meta) {\n meta.skipRowOnPaste = false;\n }\n });\n }\n /**\n * Adds the additional row height for the hidden row indicators.\n *\n * @private\n * @param {number|undefined} height Row height.\n * @param {number} row Visual row index.\n * @returns {number}\n */\n\n }, {\n key: \"onModifyRowHeight\",\n value: function onModifyRowHeight(height, row) {\n // Hook is triggered internally only for the visible rows. Conditional will be handled for the API\n // calls of the `getRowHeight` function on not visible indexes.\n if (this.isHidden(row)) {\n return 0;\n }\n\n return height;\n }\n /**\n * Sets the copy-related cell meta.\n *\n * @private\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @param {object} cellProperties Object containing the cell properties.\n */\n\n }, {\n key: \"onAfterGetCellMeta\",\n value: function onAfterGetCellMeta(row, column, cellProperties) {\n if (_classPrivateFieldGet(this, _settings).copyPasteEnabled === false && this.isHidden(row)) {\n // Cell property handled by the `Autofill` and the `CopyPaste` plugins.\n cellProperties.skipRowOnPaste = true;\n }\n\n if (this.isHidden(row - 1)) {\n cellProperties.className = cellProperties.className || '';\n\n if (cellProperties.className.indexOf('afterHiddenRow') === -1) {\n cellProperties.className += ' afterHiddenRow';\n }\n } else if (cellProperties.className) {\n var classArr = cellProperties.className.split(' ');\n\n if (classArr.length > 0) {\n var containAfterHiddenRow = classArr.indexOf('afterHiddenRow');\n\n if (containAfterHiddenRow > -1) {\n classArr.splice(containAfterHiddenRow, 1);\n }\n\n cellProperties.className = classArr.join(' ');\n }\n }\n }\n /**\n * Modifies the copyable range, accordingly to the provided config.\n *\n * @private\n * @param {Array} ranges An array of objects defining copyable cells.\n * @returns {Array}\n */\n\n }, {\n key: \"onModifyCopyableRange\",\n value: function onModifyCopyableRange(ranges) {\n var _this6 = this; // Ranges shouldn't be modified when `copyPasteEnabled` option is set to `true` (by default).\n\n\n if (_classPrivateFieldGet(this, _settings).copyPasteEnabled) {\n return ranges;\n }\n\n var newRanges = [];\n\n var pushRange = function pushRange(startRow, endRow, startCol, endCol) {\n newRanges.push({\n startRow: startRow,\n endRow: endRow,\n startCol: startCol,\n endCol: endCol\n });\n };\n\n arrayEach(ranges, function (range) {\n var isHidden = true;\n var rangeStart = 0;\n rangeEach(range.startRow, range.endRow, function (visualRow) {\n if (_this6.isHidden(visualRow)) {\n if (!isHidden) {\n pushRange(rangeStart, visualRow - 1, range.startCol, range.endCol);\n }\n\n isHidden = true;\n } else {\n if (isHidden) {\n rangeStart = visualRow;\n }\n\n if (visualRow === range.endRow) {\n pushRange(rangeStart, visualRow, range.startCol, range.endCol);\n }\n\n isHidden = false;\n }\n });\n });\n return newRanges;\n }\n /**\n * Adds the needed classes to the headers.\n *\n * @private\n * @param {number} row Visual row index.\n * @param {HTMLElement} TH Header's TH element.\n */\n\n }, {\n key: \"onAfterGetRowHeader\",\n value: function onAfterGetRowHeader(row, TH) {\n if (!_classPrivateFieldGet(this, _settings).indicators || row < 0) {\n return;\n }\n\n var classList = [];\n\n if (row >= 1 && this.isHidden(row - 1)) {\n classList.push('afterHiddenRow');\n }\n\n if (row < this.hot.countRows() - 1 && this.isHidden(row + 1)) {\n classList.push('beforeHiddenRow');\n }\n\n addClass(TH, classList);\n }\n /**\n * Add Show-hide rows to context menu.\n *\n * @private\n * @param {object} options An array of objects containing information about the pre-defined Context Menu items.\n */\n\n }, {\n key: \"onAfterContextMenuDefaultOptions\",\n value: function onAfterContextMenuDefaultOptions(options) {\n options.items.push({\n name: SEPARATOR\n }, hideRowItem(this), showRowItem(this));\n }\n /**\n * On map initialized hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onMapInit\",\n value: function onMapInit() {\n if (Array.isArray(_classPrivateFieldGet(this, _settings).rows)) {\n this.hideRows(_classPrivateFieldGet(this, _settings).rows);\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.rowIndexMapper.unregisterMap(this.pluginName);\n\n _classPrivateFieldSet(this, _settings, null);\n\n _classPrivateFieldSet(this, _hiddenRowsMap, null);\n\n _get(_getPrototypeOf(HiddenRows.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n /**\n * Cached settings from Handsontable settings.\n *\n * @private\n * @type {object}\n */\n\n }]);\n\n return HiddenRows;\n}(BasePlugin);","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\n/**\n * @param {ManualColumnFreeze} manualColumnFreezePlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function freezeColumnItem(manualColumnFreezePlugin) {\n return {\n key: 'freeze_column',\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_FREEZE_COLUMN);\n },\n callback: function callback(key, selected) {\n var _selected = _slicedToArray(selected, 1),\n selectedColumn = _selected[0].start.col;\n\n manualColumnFreezePlugin.freezeColumn(selectedColumn);\n this.render();\n this.view.adjustElementsSize(true);\n },\n hidden: function hidden() {\n var selection = this.getSelectedRange();\n var hide = false;\n\n if (selection === void 0) {\n hide = true;\n } else if (selection.length > 1) {\n hide = true;\n } else if (selection[0].from.col !== selection[0].to.col || selection[0].from.col <= this.getSettings().fixedColumnsLeft - 1) {\n hide = true;\n }\n\n return hide;\n }\n };\n}","function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport * as C from \"../../../i18n/constants.mjs\";\n/**\n * @param {ManualColumnFreeze} manualColumnFreezePlugin The plugin instance.\n * @returns {object}\n */\n\nexport default function unfreezeColumnItem(manualColumnFreezePlugin) {\n return {\n key: 'unfreeze_column',\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN);\n },\n callback: function callback(key, selected) {\n var _selected = _slicedToArray(selected, 1),\n selectedColumn = _selected[0].start.col;\n\n manualColumnFreezePlugin.unfreezeColumn(selectedColumn);\n this.render();\n this.view.adjustElementsSize(true);\n },\n hidden: function hidden() {\n var selection = this.getSelectedRange();\n var hide = false;\n\n if (selection === void 0) {\n hide = true;\n } else if (selection.length > 1) {\n hide = true;\n } else if (selection[0].from.col !== selection[0].to.col || selection[0].from.col >= this.getSettings().fixedColumnsLeft) {\n hide = true;\n }\n\n return hide;\n }\n };\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport freezeColumnItem from \"./contextMenuItem/freezeColumn.mjs\";\nimport unfreezeColumnItem from \"./contextMenuItem/unfreezeColumn.mjs\";\nexport var PLUGIN_KEY = 'manualColumnFreeze';\nexport var PLUGIN_PRIORITY = 110;\nvar privatePool = new WeakMap();\n/**\n * This plugin allows to manually \"freeze\" and \"unfreeze\" a column using an entry in the Context Menu or using API.\n * You can turn it on by setting a {@link Options#manualColumnFreeze} property to `true`.\n *\n * @example\n * ```js\n * // Enables the plugin\n * manualColumnFreeze: true,\n * ```\n *\n * @plugin ManualColumnFreeze\n */\n\nexport var ManualColumnFreeze = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ManualColumnFreeze, _BasePlugin);\n\n var _super = _createSuper(ManualColumnFreeze);\n\n function ManualColumnFreeze(hotInstance) {\n var _this;\n\n _classCallCheck(this, ManualColumnFreeze);\n\n _this = _super.call(this, hotInstance);\n privatePool.set(_assertThisInitialized(_this), {\n afterFirstUse: false\n });\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ManualColumnFreeze#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ManualColumnFreeze, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.addHook('afterContextMenuDefaultOptions', function (options) {\n return _this2.addContextMenuEntry(options);\n });\n this.addHook('beforeColumnMove', function (columns, finalIndex) {\n return _this2.onBeforeColumnMove(columns, finalIndex);\n });\n\n _get(_getPrototypeOf(ManualColumnFreeze.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n var priv = privatePool.get(this);\n priv.afterFirstUse = false;\n\n _get(_getPrototypeOf(ManualColumnFreeze.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(ManualColumnFreeze.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Freezes the given column (add it to fixed columns).\n *\n * @param {number} column Visual column index.\n */\n\n }, {\n key: \"freezeColumn\",\n value: function freezeColumn(column) {\n var priv = privatePool.get(this);\n var settings = this.hot.getSettings();\n\n if (!priv.afterFirstUse) {\n priv.afterFirstUse = true;\n }\n\n if (settings.fixedColumnsLeft === this.hot.countCols() || column <= settings.fixedColumnsLeft - 1) {\n return; // already fixed\n }\n\n this.hot.columnIndexMapper.moveIndexes(column, settings.fixedColumnsLeft);\n settings.fixedColumnsLeft += 1;\n }\n /**\n * Unfreezes the given column (remove it from fixed columns and bring to it's previous position).\n *\n * @param {number} column Visual column index.\n */\n\n }, {\n key: \"unfreezeColumn\",\n value: function unfreezeColumn(column) {\n var priv = privatePool.get(this);\n var settings = this.hot.getSettings();\n\n if (!priv.afterFirstUse) {\n priv.afterFirstUse = true;\n }\n\n if (settings.fixedColumnsLeft <= 0 || column > settings.fixedColumnsLeft - 1) {\n return; // not fixed\n }\n\n settings.fixedColumnsLeft -= 1;\n this.hot.columnIndexMapper.moveIndexes(column, settings.fixedColumnsLeft);\n }\n /**\n * Adds the manualColumnFreeze context menu entries.\n *\n * @private\n * @param {object} options Context menu options.\n */\n\n }, {\n key: \"addContextMenuEntry\",\n value: function addContextMenuEntry(options) {\n options.items.push({\n name: '---------'\n }, freezeColumnItem(this), unfreezeColumnItem(this));\n }\n /**\n * Prevents moving the columns from/to fixed area.\n *\n * @private\n * @param {Array} columns Array of visual column indexes to be moved.\n * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.\n * @returns {boolean|undefined}\n */\n\n }, {\n key: \"onBeforeColumnMove\",\n value: function onBeforeColumnMove(columns, finalIndex) {\n var priv = privatePool.get(this);\n\n if (priv.afterFirstUse) {\n var freezeLine = this.hot.getSettings().fixedColumnsLeft; // Moving any column before the \"freeze line\" isn't possible.\n\n if (finalIndex < freezeLine) {\n return false;\n } // Moving frozen column isn't possible.\n\n\n if (columns.some(function (column) {\n return column < freezeLine;\n })) {\n return false;\n }\n }\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ManualColumnFreeze;\n}(BasePlugin);","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { isNumeric } from \"../../../helpers/number.mjs\";\nvar STATE_INITIALIZED = 0;\nvar STATE_BUILT = 1;\nvar STATE_APPENDED = 2;\nvar UNIT = 'px';\n/**\n * @class\n * @private\n */\n\nvar BaseUI = /*#__PURE__*/function () {\n function BaseUI(hotInstance) {\n _classCallCheck(this, BaseUI);\n /**\n * Instance of Handsontable.\n *\n * @type {Core}\n */\n\n\n this.hot = hotInstance;\n /**\n * DOM element representing the ui element.\n *\n * @type {HTMLElement}\n * @private\n */\n\n this._element = null;\n /**\n * Flag which determines build state of element.\n *\n * @type {boolean}\n */\n\n this.state = STATE_INITIALIZED;\n }\n /**\n * Add created UI elements to table.\n *\n * @param {HTMLElement} wrapper Element which are parent for our UI element.\n */\n\n\n _createClass(BaseUI, [{\n key: \"appendTo\",\n value: function appendTo(wrapper) {\n wrapper.appendChild(this._element);\n this.state = STATE_APPENDED;\n }\n /**\n * Method for create UI element. Only create, without append to table.\n */\n\n }, {\n key: \"build\",\n value: function build() {\n if (this.state !== STATE_INITIALIZED) {\n return;\n }\n\n this._element = this.hot.rootDocument.createElement('div');\n this.state = STATE_BUILT;\n }\n /**\n * Method for remove UI element.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.isAppended()) {\n this._element.parentElement.removeChild(this._element);\n }\n\n this._element = null;\n this.state = STATE_INITIALIZED;\n }\n /**\n * Check if UI element are appended.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isAppended\",\n value: function isAppended() {\n return this.state === STATE_APPENDED;\n }\n /**\n * Check if UI element are built.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isBuilt\",\n value: function isBuilt() {\n return this.state >= STATE_BUILT;\n }\n /**\n * Setter for position.\n *\n * @param {number} top New top position of the element.\n * @param {number} left New left position of the element.\n */\n\n }, {\n key: \"setPosition\",\n value: function setPosition(top, left) {\n if (isNumeric(top)) {\n this._element.style.top = top + UNIT;\n }\n\n if (isNumeric(left)) {\n this._element.style.left = left + UNIT;\n }\n }\n /**\n * Getter for the element position.\n *\n * @returns {object} Object contains left and top position of the element.\n */\n\n }, {\n key: \"getPosition\",\n value: function getPosition() {\n return {\n top: this._element.style.top ? parseInt(this._element.style.top, 10) : 0,\n left: this._element.style.left ? parseInt(this._element.style.left, 10) : 0\n };\n }\n /**\n * Setter for the element size.\n *\n * @param {number} width New width of the element.\n * @param {number} height New height of the element.\n */\n\n }, {\n key: \"setSize\",\n value: function setSize(width, height) {\n if (isNumeric(width)) {\n this._element.style.width = width + UNIT;\n }\n\n if (isNumeric(height)) {\n this._element.style.height = height + UNIT;\n }\n }\n /**\n * Getter for the element position.\n *\n * @returns {object} Object contains height and width of the element.\n */\n\n }, {\n key: \"getSize\",\n value: function getSize() {\n return {\n width: this._element.style.width ? parseInt(this._element.style.width, 10) : 0,\n height: this._element.style.height ? parseInt(this._element.style.height, 10) : 0\n };\n }\n /**\n * Setter for the element offset. Offset means marginTop and marginLeft of the element.\n *\n * @param {number} top New margin top of the element.\n * @param {number} left New margin left of the element.\n */\n\n }, {\n key: \"setOffset\",\n value: function setOffset(top, left) {\n if (isNumeric(top)) {\n this._element.style.marginTop = top + UNIT;\n }\n\n if (isNumeric(left)) {\n this._element.style.marginLeft = left + UNIT;\n }\n }\n /**\n * Getter for the element offset.\n *\n * @returns {object} Object contains top and left offset of the element.\n */\n\n }, {\n key: \"getOffset\",\n value: function getOffset() {\n return {\n top: this._element.style.marginTop ? parseInt(this._element.style.marginTop, 10) : 0,\n left: this._element.style.marginLeft ? parseInt(this._element.style.marginLeft, 10) : 0\n };\n }\n }]);\n\n return BaseUI;\n}();\n\nexport default BaseUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport BaseUI from \"./_base.mjs\";\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nvar CSS_CLASSNAME = 'ht__manualColumnMove--backlight';\n/**\n * @class BacklightUI\n * @util\n */\n\nvar BacklightUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(BacklightUI, _BaseUI);\n\n var _super = _createSuper(BacklightUI);\n\n function BacklightUI() {\n _classCallCheck(this, BacklightUI);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(BacklightUI, [{\n key: \"build\",\n value:\n /**\n * Custom className on build process.\n */\n function build() {\n _get(_getPrototypeOf(BacklightUI.prototype), \"build\", this).call(this);\n\n addClass(this._element, CSS_CLASSNAME);\n }\n }]);\n\n return BacklightUI;\n}(BaseUI);\n\nexport default BacklightUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport BaseUI from \"./_base.mjs\";\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nvar CSS_CLASSNAME = 'ht__manualColumnMove--guideline';\n/**\n * @class GuidelineUI\n * @util\n */\n\nvar GuidelineUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(GuidelineUI, _BaseUI);\n\n var _super = _createSuper(GuidelineUI);\n\n function GuidelineUI() {\n _classCallCheck(this, GuidelineUI);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(GuidelineUI, [{\n key: \"build\",\n value:\n /**\n * Custom className on build process.\n */\n function build() {\n _get(_getPrototypeOf(GuidelineUI.prototype), \"build\", this).call(this);\n\n addClass(this._element, CSS_CLASSNAME);\n }\n }]);\n\n return GuidelineUI;\n}(BaseUI);\n\nexport default GuidelineUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { arrayReduce } from \"../../helpers/array.mjs\";\nimport { addClass, removeClass, offset, hasClass } from \"../../helpers/dom/element.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport BacklightUI from \"./ui/backlight.mjs\";\nimport GuidelineUI from \"./ui/guideline.mjs\";\nHooks.getSingleton().register('beforeColumnMove');\nHooks.getSingleton().register('afterColumnMove');\nexport var PLUGIN_KEY = 'manualColumnMove';\nexport var PLUGIN_PRIORITY = 120;\nvar privatePool = new WeakMap();\nvar CSS_PLUGIN = 'ht__manualColumnMove';\nvar CSS_SHOW_UI = 'show-ui';\nvar CSS_ON_MOVING = 'on-moving--columns';\nvar CSS_AFTER_SELECTION = 'after-selection--columns';\n/**\n * @plugin ManualColumnMove\n *\n * @description\n * This plugin allows to change columns order. To make columns order persistent the {@link Options#persistentState}\n * plugin should be enabled.\n *\n * API:\n * - `moveColumn` - move single column to the new position.\n * - `moveColumns` - move many columns (as an array of indexes) to the new position.\n * - `dragColumn` - drag single column to the new position.\n * - `dragColumns` - drag many columns (as an array of indexes) to the new position.\n *\n * [Documentation](/demo-moving.html#manualColumnMove) explain differences between drag and move actions. Please keep in mind that if you want apply visual changes,\n * you have to call manually the `render` method on the instance of Handsontable.\n *\n * The plugin creates additional components to make moving possibly using user interface:\n * - backlight - highlight of selected columns.\n * - guideline - line which shows where columns has been moved.\n *\n * @class ManualColumnMove\n * @plugin ManualColumnMove\n */\n\nexport var ManualColumnMove = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ManualColumnMove, _BasePlugin);\n\n var _super = _createSuper(ManualColumnMove);\n\n function ManualColumnMove(hotInstance) {\n var _this;\n\n _classCallCheck(this, ManualColumnMove);\n\n _this = _super.call(this, hotInstance);\n /**\n * Set up WeakMap of plugin to sharing private parameters;.\n */\n\n privatePool.set(_assertThisInitialized(_this), {\n columnsToMove: [],\n countCols: 0,\n fixedColumns: 0,\n pressed: void 0,\n target: {\n eventPageX: void 0,\n coords: void 0,\n TD: void 0,\n col: void 0\n },\n cachedDropIndex: void 0\n });\n /**\n * Event Manager object.\n *\n * @private\n * @type {object}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Backlight UI object.\n *\n * @private\n * @type {object}\n */\n\n _this.backlight = new BacklightUI(hotInstance);\n /**\n * Guideline UI object.\n *\n * @private\n * @type {object}\n */\n\n _this.guideline = new GuidelineUI(hotInstance);\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ManualColumnMove#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ManualColumnMove, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.addHook('beforeOnCellMouseDown', function (event, coords, TD, blockCalculations) {\n return _this2.onBeforeOnCellMouseDown(event, coords, TD, blockCalculations);\n });\n this.addHook('beforeOnCellMouseOver', function (event, coords, TD, blockCalculations) {\n return _this2.onBeforeOnCellMouseOver(event, coords, TD, blockCalculations);\n });\n this.addHook('afterScrollVertically', function () {\n return _this2.onAfterScrollVertically();\n });\n this.addHook('afterLoadData', function () {\n return _this2.onAfterLoadData();\n });\n this.buildPluginUI();\n this.registerEvents(); // TODO: move adding plugin classname to BasePlugin.\n\n addClass(this.hot.rootElement, CSS_PLUGIN);\n\n _get(_getPrototypeOf(ManualColumnMove.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n this.moveBySettingsOrLoad();\n\n _get(_getPrototypeOf(ManualColumnMove.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n removeClass(this.hot.rootElement, CSS_PLUGIN);\n this.unregisterEvents();\n this.backlight.destroy();\n this.guideline.destroy();\n\n _get(_getPrototypeOf(ManualColumnMove.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Moves a single column.\n *\n * @param {number} column Visual column index to be moved.\n * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/demo-moving.html#manualColumnMove).\n * @fires Hooks#beforeColumnMove\n * @fires Hooks#afterColumnMove\n * @returns {boolean}\n */\n\n }, {\n key: \"moveColumn\",\n value: function moveColumn(column, finalIndex) {\n return this.moveColumns([column], finalIndex);\n }\n /**\n * Moves a multiple columns.\n *\n * @param {Array} columns Array of visual column indexes to be moved.\n * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/demo-moving.html#manualColumnMove).\n * @fires Hooks#beforeColumnMove\n * @fires Hooks#afterColumnMove\n * @returns {boolean}\n */\n\n }, {\n key: \"moveColumns\",\n value: function moveColumns(columns, finalIndex) {\n var priv = privatePool.get(this);\n var dropIndex = priv.cachedDropIndex;\n var movePossible = this.isMovePossible(columns, finalIndex);\n var beforeMoveHook = this.hot.runHooks('beforeColumnMove', columns, finalIndex, dropIndex, movePossible);\n priv.cachedDropIndex = void 0;\n\n if (beforeMoveHook === false) {\n return;\n }\n\n if (movePossible) {\n this.hot.columnIndexMapper.moveIndexes(columns, finalIndex);\n }\n\n var movePerformed = movePossible && this.isColumnOrderChanged(columns, finalIndex);\n this.hot.runHooks('afterColumnMove', columns, finalIndex, dropIndex, movePossible, movePerformed);\n return movePerformed;\n }\n /**\n * Drag a single column to drop index position.\n *\n * @param {number} column Visual column index to be dragged.\n * @param {number} dropIndex Visual column index, being a drop index for the moved columns. Points to where we are going to drop the moved elements.\n * To check visualization of drop index please take a look at [documentation](/demo-moving.html#manualColumnMove).\n * @fires Hooks#beforeColumnMove\n * @fires Hooks#afterColumnMove\n * @returns {boolean}\n */\n\n }, {\n key: \"dragColumn\",\n value: function dragColumn(column, dropIndex) {\n return this.dragColumns([column], dropIndex);\n }\n /**\n * Drag multiple columns to drop index position.\n *\n * @param {Array} columns Array of visual column indexes to be dragged.\n * @param {number} dropIndex Visual column index, being a drop index for the moved columns. Points to where we are going to drop the moved elements.\n * To check visualization of drop index please take a look at [documentation](/demo-moving.html#manualColumnMove).\n * @fires Hooks#beforeColumnMove\n * @fires Hooks#afterColumnMove\n * @returns {boolean}\n */\n\n }, {\n key: \"dragColumns\",\n value: function dragColumns(columns, dropIndex) {\n var finalIndex = this.countFinalIndex(columns, dropIndex);\n var priv = privatePool.get(this);\n priv.cachedDropIndex = dropIndex;\n return this.moveColumns(columns, finalIndex);\n }\n /**\n * Indicates if it's possible to move columns to the desired position. Some of the actions aren't possible, i.e. You can’t move more than one element to the last position.\n *\n * @param {Array} movedColumns Array of visual column indexes to be moved.\n * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/demo-moving.html#manualColumnMove).\n * @returns {boolean}\n */\n\n }, {\n key: \"isMovePossible\",\n value: function isMovePossible(movedColumns, finalIndex) {\n var length = this.hot.columnIndexMapper.getNotTrimmedIndexesLength(); // An attempt to transfer more columns to start destination than is possible (only when moving from the top to the bottom).\n\n var tooHighDestinationIndex = movedColumns.length + finalIndex > length;\n var tooLowDestinationIndex = finalIndex < 0;\n var tooLowMovedColumnIndex = movedColumns.some(function (movedColumn) {\n return movedColumn < 0;\n });\n var tooHighMovedColumnIndex = movedColumns.some(function (movedColumn) {\n return movedColumn >= length;\n });\n\n if (tooHighDestinationIndex || tooLowDestinationIndex || tooLowMovedColumnIndex || tooHighMovedColumnIndex) {\n return false;\n }\n\n return true;\n }\n /**\n * Indicates if order of columns was changed.\n *\n * @private\n * @param {Array} movedColumns Array of visual column indexes to be moved.\n * @param {number} finalIndex Visual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/demo-moving.html#manualColumnMove).\n * @returns {boolean}\n */\n\n }, {\n key: \"isColumnOrderChanged\",\n value: function isColumnOrderChanged(movedColumns, finalIndex) {\n return movedColumns.some(function (column, nrOfMovedElement) {\n return column - nrOfMovedElement !== finalIndex;\n });\n }\n /**\n * Count the final column index from the drop index.\n *\n * @private\n * @param {Array} movedColumns Array of visual column indexes to be moved.\n * @param {number} dropIndex Visual column index, being a drop index for the moved columns.\n * @returns {number} Visual column index, being a start index for the moved columns.\n */\n\n }, {\n key: \"countFinalIndex\",\n value: function countFinalIndex(movedColumns, dropIndex) {\n var numberOfColumnsLowerThanDropIndex = arrayReduce(movedColumns, function (numberOfColumns, currentColumnIndex) {\n if (currentColumnIndex < dropIndex) {\n numberOfColumns += 1;\n }\n\n return numberOfColumns;\n }, 0);\n return dropIndex - numberOfColumnsLowerThanDropIndex;\n }\n /**\n * Gets the sum of the widths of columns in the provided range.\n *\n * @private\n * @param {number} fromColumn Visual column index.\n * @param {number} toColumn Visual column index.\n * @returns {number}\n */\n\n }, {\n key: \"getColumnsWidth\",\n value: function getColumnsWidth(fromColumn, toColumn) {\n var columnMapper = this.hot.columnIndexMapper;\n var columnsWidth = 0;\n\n for (var visualColumnIndex = fromColumn; visualColumnIndex <= toColumn; visualColumnIndex += 1) {\n // We can't use just `getColWidth` (even without indexes translation) as it doesn't return proper values\n // when column is stretched.\n var renderableIndex = columnMapper.getRenderableFromVisualIndex(visualColumnIndex);\n\n if (visualColumnIndex < 0) {\n columnsWidth += this.hot.view.wt.wtViewport.getRowHeaderWidth() || 0;\n } else if (renderableIndex !== null) {\n columnsWidth += this.hot.view.wt.wtTable.getStretchedColumnWidth(renderableIndex) || 0;\n }\n }\n\n return columnsWidth;\n }\n /**\n * Loads initial settings when persistent state is saved or when plugin was initialized as an array.\n *\n * @private\n */\n\n }, {\n key: \"moveBySettingsOrLoad\",\n value: function moveBySettingsOrLoad() {\n var pluginSettings = this.hot.getSettings()[PLUGIN_KEY];\n\n if (Array.isArray(pluginSettings)) {\n this.moveColumns(pluginSettings, 0);\n } else if (pluginSettings !== void 0) {\n var persistentState = this.persistentStateLoad();\n\n if (persistentState.length) {\n this.moveColumns(persistentState, 0);\n }\n }\n }\n /**\n * Checks if the provided column is in the fixedColumnsTop section.\n *\n * @private\n * @param {number} column Visual column index to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isFixedColumnsLeft\",\n value: function isFixedColumnsLeft(column) {\n return column < this.hot.getSettings().fixedColumnsLeft;\n }\n /**\n * Saves the manual column positions to the persistent state (the {@link Options#persistentState} option has to be enabled).\n *\n * @private\n * @fires Hooks#persistentStateSave\n */\n\n }, {\n key: \"persistentStateSave\",\n value: function persistentStateSave() {\n this.hot.runHooks('persistentStateSave', 'manualColumnMove', this.hot.columnIndexMapper.getIndexesSequence()); // The `PersistentState` plugin should be refactored.\n }\n /**\n * Loads the manual column positions from the persistent state (the {@link Options#persistentState} option has to be enabled).\n *\n * @private\n * @fires Hooks#persistentStateLoad\n * @returns {Array} Stored state.\n */\n\n }, {\n key: \"persistentStateLoad\",\n value: function persistentStateLoad() {\n var storedState = {};\n this.hot.runHooks('persistentStateLoad', 'manualColumnMove', storedState);\n return storedState.value ? storedState.value : [];\n }\n /**\n * Prepares an array of indexes based on actual selection.\n *\n * @private\n * @param {number} start The start index.\n * @param {number} end The end index.\n * @returns {Array}\n */\n\n }, {\n key: \"prepareColumnsToMoving\",\n value: function prepareColumnsToMoving(start, end) {\n var selectedColumns = [];\n rangeEach(start, end, function (i) {\n selectedColumns.push(i);\n });\n return selectedColumns;\n }\n /**\n * Update the UI visual position.\n *\n * @private\n */\n\n }, {\n key: \"refreshPositions\",\n value: function refreshPositions() {\n var priv = privatePool.get(this);\n var firstVisible = this.hot.view.wt.wtTable.getFirstVisibleColumn();\n var lastVisible = this.hot.view.wt.wtTable.getLastVisibleColumn();\n var wtTable = this.hot.view.wt.wtTable;\n var scrollableElement = this.hot.view.wt.wtOverlays.scrollableElement;\n var scrollLeft = typeof scrollableElement.scrollX === 'number' ? scrollableElement.scrollX : scrollableElement.scrollLeft;\n var tdOffsetLeft = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, priv.coords - 1);\n var mouseOffsetLeft = priv.target.eventPageX - (priv.rootElementOffset - (scrollableElement.scrollX === void 0 ? scrollLeft : 0)); // eslint-disable-line max-len\n\n var hiderWidth = wtTable.hider.offsetWidth;\n var tbodyOffsetLeft = wtTable.TBODY.offsetLeft;\n var backlightElemMarginLeft = this.backlight.getOffset().left;\n var backlightElemWidth = this.backlight.getSize().width;\n var rowHeaderWidth = 0;\n\n if (priv.rootElementOffset + wtTable.holder.offsetWidth + scrollLeft < priv.target.eventPageX) {\n if (priv.coords < priv.countCols) {\n priv.coords += 1;\n }\n }\n\n if (priv.hasRowHeaders) {\n rowHeaderWidth = this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth;\n }\n\n if (this.isFixedColumnsLeft(priv.coords)) {\n tdOffsetLeft += scrollLeft;\n }\n\n tdOffsetLeft += rowHeaderWidth;\n\n if (priv.coords < 0) {\n // if hover on rowHeader\n if (priv.fixedColumns > 0) {\n priv.target.col = 0;\n } else {\n priv.target.col = firstVisible > 0 ? firstVisible - 1 : firstVisible;\n }\n } else if (priv.target.TD.offsetWidth / 2 + tdOffsetLeft <= mouseOffsetLeft) {\n var newCoordsCol = priv.coords >= priv.countCols ? priv.countCols - 1 : priv.coords; // if hover on right part of TD\n\n priv.target.col = newCoordsCol + 1; // unfortunately first column is bigger than rest\n\n tdOffsetLeft += priv.target.TD.offsetWidth;\n\n if (priv.target.col > lastVisible && lastVisible < priv.countCols) {\n this.hot.scrollViewportTo(void 0, lastVisible + 1, void 0, true);\n }\n } else {\n // elsewhere on table\n priv.target.col = priv.coords;\n\n if (priv.target.col <= firstVisible && priv.target.col >= priv.fixedColumns && firstVisible > 0) {\n this.hot.scrollViewportTo(void 0, firstVisible - 1);\n }\n }\n\n if (priv.target.col <= firstVisible && priv.target.col >= priv.fixedColumns && firstVisible > 0) {\n this.hot.scrollViewportTo(void 0, firstVisible - 1);\n }\n\n var backlightLeft = mouseOffsetLeft;\n var guidelineLeft = tdOffsetLeft;\n\n if (mouseOffsetLeft + backlightElemWidth + backlightElemMarginLeft >= hiderWidth) {\n // prevent display backlight on the right side of the table\n backlightLeft = hiderWidth - backlightElemWidth - backlightElemMarginLeft;\n } else if (mouseOffsetLeft + backlightElemMarginLeft < tbodyOffsetLeft + rowHeaderWidth) {\n // prevent display backlight on the left side of the table\n backlightLeft = tbodyOffsetLeft + rowHeaderWidth + Math.abs(backlightElemMarginLeft);\n }\n\n if (tdOffsetLeft >= hiderWidth - 1) {\n // prevent display guideline outside the table\n guidelineLeft = hiderWidth - 1;\n } else if (guidelineLeft === 0) {\n // guideline has got `margin-left: -1px` as default\n guidelineLeft = 1;\n } else if (scrollableElement.scrollX !== void 0 && priv.coords < priv.fixedColumns) {\n guidelineLeft -= priv.rootElementOffset <= scrollableElement.scrollX ? priv.rootElementOffset : 0;\n }\n\n this.backlight.setPosition(null, backlightLeft);\n this.guideline.setPosition(null, guidelineLeft);\n }\n /**\n * Binds the events used by the plugin.\n *\n * @private\n */\n\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this3 = this;\n\n var documentElement = this.hot.rootDocument.documentElement;\n this.eventManager.addEventListener(documentElement, 'mousemove', function (event) {\n return _this3.onMouseMove(event);\n });\n this.eventManager.addEventListener(documentElement, 'mouseup', function () {\n return _this3.onMouseUp();\n });\n }\n /**\n * Unbinds the events used by the plugin.\n *\n * @private\n */\n\n }, {\n key: \"unregisterEvents\",\n value: function unregisterEvents() {\n this.eventManager.clear();\n }\n /**\n * Change the behavior of selection / dragging.\n *\n * @private\n * @param {MouseEvent} event `mousedown` event properties.\n * @param {CellCoords} coords Visual cell coordinates where was fired event.\n * @param {HTMLElement} TD Cell represented as HTMLElement.\n * @param {object} blockCalculations Object which contains information about blockCalculation for row, column or cells.\n */\n\n }, {\n key: \"onBeforeOnCellMouseDown\",\n value: function onBeforeOnCellMouseDown(event, coords, TD, blockCalculations) {\n var wtTable = this.hot.view.wt.wtTable;\n var isHeaderSelection = this.hot.selection.isSelectedByColumnHeader();\n var selection = this.hot.getSelectedRangeLast();\n var priv = privatePool.get(this); // This block action shouldn't be handled below.\n\n var isSortingElement = hasClass(event.target, 'sortAction');\n\n if (!selection || !isHeaderSelection || priv.pressed || event.button !== 0 || isSortingElement) {\n priv.pressed = false;\n priv.columnsToMove.length = 0;\n removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);\n return;\n }\n\n var guidelineIsNotReady = this.guideline.isBuilt() && !this.guideline.isAppended();\n var backlightIsNotReady = this.backlight.isBuilt() && !this.backlight.isAppended();\n\n if (guidelineIsNotReady && backlightIsNotReady) {\n this.guideline.appendTo(wtTable.hider);\n this.backlight.appendTo(wtTable.hider);\n }\n\n var from = selection.from,\n to = selection.to;\n var start = Math.min(from.col, to.col);\n var end = Math.max(from.col, to.col);\n\n if (coords.row < 0 && coords.col >= start && coords.col <= end) {\n blockCalculations.column = true;\n priv.pressed = true;\n priv.target.eventPageX = event.pageX;\n priv.coords = coords.col;\n priv.target.TD = TD;\n priv.target.col = coords.col;\n priv.columnsToMove = this.prepareColumnsToMoving(start, end);\n priv.hasRowHeaders = !!this.hot.getSettings().rowHeaders;\n priv.countCols = this.hot.countCols();\n priv.fixedColumns = this.hot.getSettings().fixedColumnsLeft;\n priv.rootElementOffset = offset(this.hot.rootElement).left;\n var countColumnsFrom = priv.hasRowHeaders ? -1 : 0;\n var topPos = wtTable.holder.scrollTop + wtTable.getColumnHeaderHeight(0) + 1;\n var fixedColumns = coords.col < priv.fixedColumns;\n var scrollableElement = this.hot.view.wt.wtOverlays.scrollableElement;\n var wrapperIsWindow = scrollableElement.scrollX ? scrollableElement.scrollX - priv.rootElementOffset : 0;\n var mouseOffset = event.offsetX - (fixedColumns ? wrapperIsWindow : 0);\n var leftOffset = Math.abs(this.getColumnsWidth(start, coords.col - 1) + mouseOffset);\n this.backlight.setPosition(topPos, this.getColumnsWidth(countColumnsFrom, start - 1) + leftOffset);\n this.backlight.setSize(this.getColumnsWidth(start, end), wtTable.hider.offsetHeight - topPos);\n this.backlight.setOffset(null, leftOffset * -1);\n addClass(this.hot.rootElement, CSS_ON_MOVING);\n } else {\n removeClass(this.hot.rootElement, CSS_AFTER_SELECTION);\n priv.pressed = false;\n priv.columnsToMove.length = 0;\n }\n }\n /**\n * 'mouseMove' event callback. Fired when pointer move on document.documentElement.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n */\n\n }, {\n key: \"onMouseMove\",\n value: function onMouseMove(event) {\n var priv = privatePool.get(this);\n\n if (!priv.pressed) {\n return;\n } // callback for browser which doesn't supports CSS pointer-event: none\n\n\n if (event.target === this.backlight.element) {\n var width = this.backlight.getSize().width;\n this.backlight.setSize(0);\n setTimeout(function () {\n this.backlight.setPosition(width);\n });\n }\n\n priv.target.eventPageX = event.pageX;\n this.refreshPositions();\n }\n /**\n * 'beforeOnCellMouseOver' hook callback. Fired when pointer was over cell.\n *\n * @private\n * @param {MouseEvent} event `mouseover` event properties.\n * @param {CellCoords} coords Visual cell coordinates where was fired event.\n * @param {HTMLElement} TD Cell represented as HTMLElement.\n * @param {object} blockCalculations Object which contains information about blockCalculation for column, column or cells.\n */\n\n }, {\n key: \"onBeforeOnCellMouseOver\",\n value: function onBeforeOnCellMouseOver(event, coords, TD, blockCalculations) {\n var selectedRange = this.hot.getSelectedRangeLast();\n var priv = privatePool.get(this);\n\n if (!selectedRange || !priv.pressed) {\n return;\n }\n\n if (priv.columnsToMove.indexOf(coords.col) > -1) {\n removeClass(this.hot.rootElement, CSS_SHOW_UI);\n } else {\n addClass(this.hot.rootElement, CSS_SHOW_UI);\n }\n\n blockCalculations.row = true;\n blockCalculations.column = true;\n blockCalculations.cell = true;\n priv.coords = coords.col;\n priv.target.TD = TD;\n }\n /**\n * `onMouseUp` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp() {\n var priv = privatePool.get(this);\n var target = priv.target.col;\n var columnsLen = priv.columnsToMove.length;\n priv.coords = void 0;\n priv.pressed = false;\n priv.backlightWidth = 0;\n removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI, CSS_AFTER_SELECTION]);\n\n if (this.hot.selection.isSelectedByColumnHeader()) {\n addClass(this.hot.rootElement, CSS_AFTER_SELECTION);\n }\n\n if (columnsLen < 1 || target === void 0) {\n return;\n }\n\n var firstMovedVisualColumn = priv.columnsToMove[0];\n var firstMovedPhysicalColumn = this.hot.toPhysicalColumn(firstMovedVisualColumn);\n var movePerformed = this.dragColumns(priv.columnsToMove, target);\n priv.columnsToMove.length = 0;\n\n if (movePerformed === true) {\n this.persistentStateSave();\n this.hot.render();\n this.hot.view.adjustElementsSize(true);\n var selectionStart = this.hot.toVisualColumn(firstMovedPhysicalColumn);\n var selectionEnd = selectionStart + columnsLen - 1;\n this.hot.selectColumns(selectionStart, selectionEnd);\n }\n }\n /**\n * `afterScrollHorizontally` hook callback. Fired the table was scrolled horizontally.\n *\n * @private\n */\n\n }, {\n key: \"onAfterScrollVertically\",\n value: function onAfterScrollVertically() {\n var wtTable = this.hot.view.wt.wtTable;\n var headerHeight = wtTable.getColumnHeaderHeight(0) + 1;\n var scrollTop = wtTable.holder.scrollTop;\n var posTop = headerHeight + scrollTop;\n this.backlight.setPosition(posTop);\n this.backlight.setSize(null, wtTable.hider.offsetHeight - posTop);\n }\n /**\n * Builds the plugin's UI.\n *\n * @private\n */\n\n }, {\n key: \"buildPluginUI\",\n value: function buildPluginUI() {\n this.backlight.build();\n this.guideline.build();\n }\n /**\n * Callback for the `afterLoadData` hook.\n *\n * @private\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData() {\n this.moveBySettingsOrLoad();\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.backlight.destroy();\n this.guideline.destroy();\n\n _get(_getPrototypeOf(ManualColumnMove.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ManualColumnMove;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { addClass, closest, hasClass, removeClass, outerHeight, isDetached } from \"../../helpers/dom/element.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { PhysicalIndexToValueMap as IndexToValueMap } from \"../../translations/index.mjs\"; // Developer note! Whenever you make a change in this file, make an analogous change in manualRowResize.js\n\nexport var PLUGIN_KEY = 'manualColumnResize';\nexport var PLUGIN_PRIORITY = 130;\nvar PERSISTENT_STATE_KEY = 'manualColumnWidths';\nvar privatePool = new WeakMap();\n/**\n * @description\n * This plugin allows to change columns width. To make columns width persistent the {@link Options#persistentState}\n * plugin should be enabled.\n *\n * The plugin creates additional components to make resizing possibly using user interface:\n * - handle - the draggable element that sets the desired width of the column.\n * - guide - the helper guide that shows the desired width as a vertical guide.\n *\n * @plugin ManualColumnResize\n */\n\nexport var ManualColumnResize = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ManualColumnResize, _BasePlugin);\n\n var _super = _createSuper(ManualColumnResize);\n\n function ManualColumnResize(hotInstance) {\n var _this;\n\n _classCallCheck(this, ManualColumnResize);\n\n _this = _super.call(this, hotInstance);\n var rootDocument = _this.hot.rootDocument;\n _this.currentTH = null;\n _this.currentCol = null;\n _this.selectedCols = [];\n _this.currentWidth = null;\n _this.newSize = null;\n _this.startY = null;\n _this.startWidth = null;\n _this.startOffset = null;\n _this.handle = rootDocument.createElement('DIV');\n _this.guide = rootDocument.createElement('DIV');\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n _this.pressed = null;\n _this.dblclick = 0;\n _this.autoresizeTimeout = null;\n /**\n * PhysicalIndexToValueMap to keep and track widths for physical column indexes.\n *\n * @private\n * @type {PhysicalIndexToValueMap}\n */\n\n _this.columnWidthsMap = void 0;\n /**\n * Private pool to save configuration from updateSettings.\n */\n\n privatePool.set(_assertThisInitialized(_this), {\n config: void 0\n });\n addClass(_this.handle, 'manualColumnResizer');\n addClass(_this.guide, 'manualColumnResizerGuide');\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ManualColumnResize#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ManualColumnResize, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.columnWidthsMap = new IndexToValueMap();\n this.columnWidthsMap.addLocalHook('init', function () {\n return _this2.onMapInit();\n });\n this.hot.columnIndexMapper.registerMap(this.pluginName, this.columnWidthsMap);\n this.addHook('modifyColWidth', function (width, col) {\n return _this2.onModifyColWidth(width, col);\n });\n this.addHook('beforeStretchingColumnWidth', function (stretchedWidth, column) {\n return _this2.onBeforeStretchingColumnWidth(stretchedWidth, column);\n });\n this.addHook('beforeColumnResize', function (newSize, column, isDoubleClick) {\n return _this2.onBeforeColumnResize(newSize, column, isDoubleClick);\n });\n this.bindEvents();\n\n _get(_getPrototypeOf(ManualColumnResize.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(ManualColumnResize.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n var priv = privatePool.get(this);\n priv.config = this.columnWidthsMap.getValues();\n this.hot.columnIndexMapper.unregisterMap(this.pluginName);\n\n _get(_getPrototypeOf(ManualColumnResize.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Saves the current sizes using the persistentState plugin (the {@link Options#persistentState} option has to be enabled).\n *\n * @fires Hooks#persistentStateSave\n */\n\n }, {\n key: \"saveManualColumnWidths\",\n value: function saveManualColumnWidths() {\n this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, this.columnWidthsMap.getValues());\n }\n /**\n * Loads the previously saved sizes using the persistentState plugin (the {@link Options#persistentState} option has to be enabled).\n *\n * @returns {Array}\n * @fires Hooks#persistentStateLoad\n */\n\n }, {\n key: \"loadManualColumnWidths\",\n value: function loadManualColumnWidths() {\n var storedState = {};\n this.hot.runHooks('persistentStateLoad', PERSISTENT_STATE_KEY, storedState);\n return storedState.value;\n }\n /**\n * Sets the new width for specified column index.\n *\n * @param {number} column Visual column index.\n * @param {number} width Column width (no less than 20px).\n * @returns {number} Returns new width.\n */\n\n }, {\n key: \"setManualSize\",\n value: function setManualSize(column, width) {\n var newWidth = Math.max(width, 20);\n var physicalColumn = this.hot.toPhysicalColumn(column);\n this.columnWidthsMap.setValueAtIndex(physicalColumn, newWidth);\n return newWidth;\n }\n /**\n * Clears the cache for the specified column index.\n *\n * @param {number} column Visual column index.\n */\n\n }, {\n key: \"clearManualSize\",\n value: function clearManualSize(column) {\n var physicalColumn = this.hot.toPhysicalColumn(column);\n this.columnWidthsMap.setValueAtIndex(physicalColumn, null);\n }\n /**\n * Callback to call on map's `init` local hook.\n *\n * @private\n */\n\n }, {\n key: \"onMapInit\",\n value: function onMapInit() {\n var _this3 = this;\n\n var priv = privatePool.get(this);\n var initialSetting = this.hot.getSettings()[PLUGIN_KEY];\n var loadedManualColumnWidths = this.loadManualColumnWidths();\n\n if (typeof loadedManualColumnWidths !== 'undefined') {\n this.hot.batchExecution(function () {\n loadedManualColumnWidths.forEach(function (width, physicalIndex) {\n _this3.columnWidthsMap.setValueAtIndex(physicalIndex, width);\n });\n }, true);\n } else if (Array.isArray(initialSetting)) {\n this.hot.batchExecution(function () {\n initialSetting.forEach(function (width, physicalIndex) {\n _this3.columnWidthsMap.setValueAtIndex(physicalIndex, width);\n });\n }, true);\n priv.config = initialSetting;\n } else if (initialSetting === true && Array.isArray(priv.config)) {\n this.hot.batchExecution(function () {\n priv.config.forEach(function (width, physicalIndex) {\n _this3.columnWidthsMap.setValueAtIndex(physicalIndex, width);\n });\n }, true);\n }\n }\n /**\n * Set the resize handle position.\n *\n * @private\n * @param {HTMLCellElement} TH TH HTML element.\n */\n\n }, {\n key: \"setupHandlePosition\",\n value: function setupHandlePosition(TH) {\n var _this4 = this;\n\n if (!TH.parentNode) {\n return;\n }\n\n this.currentTH = TH;\n var wt = this.hot.view.wt;\n var cellCoords = wt.wtTable.getCoords(this.currentTH);\n var col = cellCoords.col; // Ignore column headers.\n\n if (col < 0) {\n return;\n }\n\n var headerHeight = outerHeight(this.currentTH);\n var box = this.currentTH.getBoundingClientRect(); // Read \"fixedColumnsLeft\" through the Walkontable as in that context, the fixed columns\n // are modified (reduced by the number of hidden columns) by TableView module.\n\n var fixedColumn = col < wt.getSetting('fixedColumnsLeft');\n var relativeHeaderPosition;\n\n if (fixedColumn) {\n relativeHeaderPosition = wt.wtOverlays.topLeftCornerOverlay.getRelativeCellPosition(this.currentTH, cellCoords.row, cellCoords.col);\n } // If the TH is not a child of the top-left overlay, recalculate using\n // the top overlay - as this overlay contains the rest of the headers.\n\n\n if (!relativeHeaderPosition) {\n relativeHeaderPosition = wt.wtOverlays.topOverlay.getRelativeCellPosition(this.currentTH, cellCoords.row, cellCoords.col);\n }\n\n this.currentCol = this.hot.columnIndexMapper.getVisualFromRenderableIndex(col);\n this.selectedCols = [];\n var isFullColumnSelected = this.hot.selection.isSelectedByCorner() || this.hot.selection.isSelectedByColumnHeader();\n\n if (this.hot.selection.isSelected() && isFullColumnSelected) {\n var selectionRanges = this.hot.getSelectedRange();\n arrayEach(selectionRanges, function (selectionRange) {\n var fromColumn = selectionRange.getTopLeftCorner().col;\n var toColumn = selectionRange.getBottomRightCorner().col; // Add every selected column for resize action.\n\n rangeEach(fromColumn, toColumn, function (columnIndex) {\n if (!_this4.selectedCols.includes(columnIndex)) {\n _this4.selectedCols.push(columnIndex);\n }\n });\n });\n } // Resizing element beyond the current selection (also when there is no selection).\n\n\n if (!this.selectedCols.includes(this.currentCol)) {\n this.selectedCols = [this.currentCol];\n }\n\n this.startOffset = relativeHeaderPosition.left - 6;\n this.startWidth = parseInt(box.width, 10);\n this.handle.style.top = \"\".concat(relativeHeaderPosition.top, \"px\");\n this.handle.style.left = \"\".concat(this.startOffset + this.startWidth, \"px\");\n this.handle.style.height = \"\".concat(headerHeight, \"px\");\n this.hot.rootElement.appendChild(this.handle);\n }\n /**\n * Refresh the resize handle position.\n *\n * @private\n */\n\n }, {\n key: \"refreshHandlePosition\",\n value: function refreshHandlePosition() {\n this.handle.style.left = \"\".concat(this.startOffset + this.currentWidth, \"px\");\n }\n /**\n * Sets the resize guide position.\n *\n * @private\n */\n\n }, {\n key: \"setupGuidePosition\",\n value: function setupGuidePosition() {\n var handleHeight = parseInt(outerHeight(this.handle), 10);\n var handleBottomPosition = parseInt(this.handle.style.top, 10) + handleHeight;\n var maximumVisibleElementHeight = parseInt(this.hot.view.maximumVisibleElementHeight(0), 10);\n addClass(this.handle, 'active');\n addClass(this.guide, 'active');\n this.guide.style.top = \"\".concat(handleBottomPosition, \"px\");\n this.guide.style.left = this.handle.style.left;\n this.guide.style.height = \"\".concat(maximumVisibleElementHeight - handleHeight, \"px\");\n this.hot.rootElement.appendChild(this.guide);\n }\n /**\n * Refresh the resize guide position.\n *\n * @private\n */\n\n }, {\n key: \"refreshGuidePosition\",\n value: function refreshGuidePosition() {\n this.guide.style.left = this.handle.style.left;\n }\n /**\n * Hides both the resize handle and resize guide.\n *\n * @private\n */\n\n }, {\n key: \"hideHandleAndGuide\",\n value: function hideHandleAndGuide() {\n removeClass(this.handle, 'active');\n removeClass(this.guide, 'active');\n }\n /**\n * Checks if provided element is considered a column header.\n *\n * @private\n * @param {HTMLElement} element HTML element.\n * @returns {boolean}\n */\n\n }, {\n key: \"checkIfColumnHeader\",\n value: function checkIfColumnHeader(element) {\n return !!closest(element, ['THEAD'], this.hot.rootElement);\n }\n /**\n * Gets the TH element from the provided element.\n *\n * @private\n * @param {HTMLElement} element HTML element.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"getClosestTHParent\",\n value: function getClosestTHParent(element) {\n if (element.tagName !== 'TABLE') {\n if (element.tagName === 'TH') {\n return element;\n }\n\n return this.getClosestTHParent(element.parentNode);\n }\n\n return null;\n }\n /**\n * 'mouseover' event callback - set the handle position.\n *\n * @private\n * @param {MouseEvent} event The mouse event.\n */\n\n }, {\n key: \"onMouseOver\",\n value: function onMouseOver(event) {\n // Workaround for #6926 - if the `event.target` is temporarily detached, we can skip this callback and wait for\n // the next `onmouseover`.\n if (isDetached(event.target)) {\n return;\n }\n\n if (this.checkIfColumnHeader(event.target)) {\n var th = this.getClosestTHParent(event.target);\n\n if (!th) {\n return;\n }\n\n var colspan = th.getAttribute('colspan');\n\n if (th && (colspan === null || colspan === 1)) {\n if (!this.pressed) {\n this.setupHandlePosition(th);\n }\n }\n }\n }\n /**\n * Auto-size row after doubleclick - callback.\n *\n * @private\n * @fires Hooks#beforeColumnResize\n * @fires Hooks#afterColumnResize\n */\n\n }, {\n key: \"afterMouseDownTimeout\",\n value: function afterMouseDownTimeout() {\n var _this5 = this;\n\n var render = function render() {\n _this5.hot.forceFullRender = true;\n\n _this5.hot.view.render(); // updates all\n\n\n _this5.hot.view.adjustElementsSize(true);\n };\n\n var resize = function resize(column, forceRender) {\n var hookNewSize = _this5.hot.runHooks('beforeColumnResize', _this5.newSize, column, true);\n\n if (hookNewSize !== void 0) {\n _this5.newSize = hookNewSize;\n }\n\n if (_this5.hot.getSettings().stretchH === 'all') {\n _this5.clearManualSize(column);\n } else {\n _this5.setManualSize(column, _this5.newSize); // double click sets by auto row size plugin\n\n }\n\n _this5.saveManualColumnWidths();\n\n _this5.hot.runHooks('afterColumnResize', _this5.newSize, column, true);\n\n if (forceRender) {\n render();\n }\n };\n\n if (this.dblclick >= 2) {\n var selectedColsLength = this.selectedCols.length;\n\n if (selectedColsLength > 1) {\n arrayEach(this.selectedCols, function (selectedCol) {\n resize(selectedCol);\n });\n render();\n } else {\n arrayEach(this.selectedCols, function (selectedCol) {\n resize(selectedCol, true);\n });\n }\n }\n\n this.dblclick = 0;\n this.autoresizeTimeout = null;\n }\n /**\n * 'mousedown' event callback.\n *\n * @private\n * @param {MouseEvent} event The mouse event.\n */\n\n }, {\n key: \"onMouseDown\",\n value: function onMouseDown(event) {\n var _this6 = this;\n\n if (hasClass(event.target, 'manualColumnResizer')) {\n this.setupHandlePosition(this.currentTH);\n this.setupGuidePosition();\n this.pressed = true;\n\n if (this.autoresizeTimeout === null) {\n this.autoresizeTimeout = setTimeout(function () {\n return _this6.afterMouseDownTimeout();\n }, 500);\n\n this.hot._registerTimeout(this.autoresizeTimeout);\n }\n\n this.dblclick += 1;\n this.startX = event.pageX;\n this.newSize = this.startWidth;\n }\n }\n /**\n * 'mousemove' event callback - refresh the handle and guide positions, cache the new column width.\n *\n * @private\n * @param {MouseEvent} event The mouse event.\n */\n\n }, {\n key: \"onMouseMove\",\n value: function onMouseMove(event) {\n var _this7 = this;\n\n if (this.pressed) {\n this.currentWidth = this.startWidth + (event.pageX - this.startX);\n arrayEach(this.selectedCols, function (selectedCol) {\n _this7.newSize = _this7.setManualSize(selectedCol, _this7.currentWidth);\n });\n this.refreshHandlePosition();\n this.refreshGuidePosition();\n }\n }\n /**\n * 'mouseup' event callback - apply the column resizing.\n *\n * @private\n *\n * @fires Hooks#beforeColumnResize\n * @fires Hooks#afterColumnResize\n */\n\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp() {\n var _this8 = this;\n\n var render = function render() {\n _this8.hot.forceFullRender = true;\n\n _this8.hot.view.render(); // updates all\n\n\n _this8.hot.view.adjustElementsSize(true);\n };\n\n var resize = function resize(column, forceRender) {\n _this8.hot.runHooks('beforeColumnResize', _this8.newSize, column, false);\n\n if (forceRender) {\n render();\n }\n\n _this8.saveManualColumnWidths();\n\n _this8.hot.runHooks('afterColumnResize', _this8.newSize, column, false);\n };\n\n if (this.pressed) {\n this.hideHandleAndGuide();\n this.pressed = false;\n\n if (this.newSize !== this.startWidth) {\n var selectedColsLength = this.selectedCols.length;\n\n if (selectedColsLength > 1) {\n arrayEach(this.selectedCols, function (selectedCol) {\n resize(selectedCol);\n });\n render();\n } else {\n arrayEach(this.selectedCols, function (selectedCol) {\n resize(selectedCol, true);\n });\n }\n }\n\n this.setupHandlePosition(this.currentTH);\n }\n }\n /**\n * Binds the mouse events.\n *\n * @private\n */\n\n }, {\n key: \"bindEvents\",\n value: function bindEvents() {\n var _this9 = this;\n\n var _this$hot = this.hot,\n rootWindow = _this$hot.rootWindow,\n rootElement = _this$hot.rootElement;\n this.eventManager.addEventListener(rootElement, 'mouseover', function (e) {\n return _this9.onMouseOver(e);\n });\n this.eventManager.addEventListener(rootElement, 'mousedown', function (e) {\n return _this9.onMouseDown(e);\n });\n this.eventManager.addEventListener(rootWindow, 'mousemove', function (e) {\n return _this9.onMouseMove(e);\n });\n this.eventManager.addEventListener(rootWindow, 'mouseup', function () {\n return _this9.onMouseUp();\n });\n }\n /**\n * Modifies the provided column width, based on the plugin settings.\n *\n * @private\n * @param {number} width Column width.\n * @param {number} column Visual column index.\n * @returns {number}\n */\n\n }, {\n key: \"onModifyColWidth\",\n value: function onModifyColWidth(width, column) {\n var newWidth = width;\n\n if (this.enabled) {\n var physicalColumn = this.hot.toPhysicalColumn(column);\n var columnWidth = this.columnWidthsMap.getValueAtIndex(physicalColumn);\n\n if (this.hot.getSettings()[PLUGIN_KEY] && columnWidth) {\n newWidth = columnWidth;\n }\n }\n\n return newWidth;\n }\n /**\n * Modifies the provided column stretched width. This hook decides if specified column should be stretched or not.\n *\n * @private\n * @param {number} stretchedWidth Stretched width.\n * @param {number} column Visual column index.\n * @returns {number}\n */\n\n }, {\n key: \"onBeforeStretchingColumnWidth\",\n value: function onBeforeStretchingColumnWidth(stretchedWidth, column) {\n var width = this.columnWidthsMap.getValueAtIndex(column);\n\n if (width === null) {\n width = stretchedWidth;\n }\n\n return width;\n }\n /**\n * `beforeColumnResize` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onBeforeColumnResize\",\n value: function onBeforeColumnResize() {\n // clear the header height cache information\n this.hot.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked();\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.columnIndexMapper.unregisterMap(this.pluginName);\n\n _get(_getPrototypeOf(ManualColumnResize.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ManualColumnResize;\n}(BasePlugin);","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nvar STATE_INITIALIZED = 0;\nvar STATE_BUILT = 1;\nvar STATE_APPENDED = 2;\nvar UNIT = 'px';\n/**\n * @class\n * @private\n */\n\nvar BaseUI = /*#__PURE__*/function () {\n function BaseUI(hotInstance) {\n _classCallCheck(this, BaseUI);\n /**\n * Instance of Handsontable.\n *\n * @type {Core}\n */\n\n\n this.hot = hotInstance;\n /**\n * DOM element representing the ui element.\n *\n * @type {HTMLElement}\n * @private\n */\n\n this._element = null;\n /**\n * Flag which determines build state of element.\n *\n * @type {boolean}\n */\n\n this.state = STATE_INITIALIZED;\n }\n /**\n * Add created UI elements to table.\n *\n * @param {HTMLElement} wrapper Element which are parent for our UI element.\n */\n\n\n _createClass(BaseUI, [{\n key: \"appendTo\",\n value: function appendTo(wrapper) {\n wrapper.appendChild(this._element);\n this.state = STATE_APPENDED;\n }\n /**\n * Method for create UI element. Only create, without append to table.\n */\n\n }, {\n key: \"build\",\n value: function build() {\n if (this.state !== STATE_INITIALIZED) {\n return;\n }\n\n this._element = this.hot.rootDocument.createElement('div');\n this.state = STATE_BUILT;\n }\n /**\n * Method for remove UI element.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.isAppended()) {\n this._element.parentElement.removeChild(this._element);\n }\n\n this._element = null;\n this.state = STATE_INITIALIZED;\n }\n /**\n * Check if UI element are appended.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isAppended\",\n value: function isAppended() {\n return this.state === STATE_APPENDED;\n }\n /**\n * Check if UI element are built.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isBuilt\",\n value: function isBuilt() {\n return this.state >= STATE_BUILT;\n }\n /**\n * Setter for position.\n *\n * @param {number} top New top position of the element.\n * @param {number} left New left position of the element.\n */\n\n }, {\n key: \"setPosition\",\n value: function setPosition(top, left) {\n if (top !== void 0) {\n this._element.style.top = top + UNIT;\n }\n\n if (left !== void 0) {\n this._element.style.left = left + UNIT;\n }\n }\n /**\n * Getter for the element position.\n *\n * @returns {object} Object contains left and top position of the element.\n */\n\n }, {\n key: \"getPosition\",\n value: function getPosition() {\n return {\n top: this._element.style.top ? parseInt(this._element.style.top, 10) : 0,\n left: this._element.style.left ? parseInt(this._element.style.left, 10) : 0\n };\n }\n /**\n * Setter for the element size.\n *\n * @param {number} width New width of the element.\n * @param {number} height New height of the element.\n */\n\n }, {\n key: \"setSize\",\n value: function setSize(width, height) {\n if (width) {\n this._element.style.width = width + UNIT;\n }\n\n if (height) {\n this._element.style.height = height + UNIT;\n }\n }\n /**\n * Getter for the element position.\n *\n * @returns {object} Object contains height and width of the element.\n */\n\n }, {\n key: \"getSize\",\n value: function getSize() {\n return {\n width: this._element.style.width ? parseInt(this._element.style.width, 10) : 0,\n height: this._element.style.height ? parseInt(this._element.style.height, 10) : 0\n };\n }\n /**\n * Setter for the element offset. Offset means marginTop and marginLeft of the element.\n *\n * @param {number} top New margin top of the element.\n * @param {number} left New margin left of the element.\n */\n\n }, {\n key: \"setOffset\",\n value: function setOffset(top, left) {\n if (top) {\n this._element.style.marginTop = top + UNIT;\n }\n\n if (left) {\n this._element.style.marginLeft = left + UNIT;\n }\n }\n /**\n * Getter for the element offset.\n *\n * @returns {object} Object contains top and left offset of the element.\n */\n\n }, {\n key: \"getOffset\",\n value: function getOffset() {\n return {\n top: this._element.style.marginTop ? parseInt(this._element.style.marginTop, 10) : 0,\n left: this._element.style.marginLeft ? parseInt(this._element.style.marginLeft, 10) : 0\n };\n }\n }]);\n\n return BaseUI;\n}();\n\nexport default BaseUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport BaseUI from \"./_base.mjs\";\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nvar CSS_CLASSNAME = 'ht__manualRowMove--backlight';\n/**\n * @class BacklightUI\n * @util\n */\n\nvar BacklightUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(BacklightUI, _BaseUI);\n\n var _super = _createSuper(BacklightUI);\n\n function BacklightUI() {\n _classCallCheck(this, BacklightUI);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(BacklightUI, [{\n key: \"build\",\n value:\n /**\n * Custom className on build process.\n */\n function build() {\n _get(_getPrototypeOf(BacklightUI.prototype), \"build\", this).call(this);\n\n addClass(this._element, CSS_CLASSNAME);\n }\n }]);\n\n return BacklightUI;\n}(BaseUI);\n\nexport default BacklightUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport BaseUI from \"./_base.mjs\";\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nvar CSS_CLASSNAME = 'ht__manualRowMove--guideline';\n/**\n * @class GuidelineUI\n * @util\n */\n\nvar GuidelineUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(GuidelineUI, _BaseUI);\n\n var _super = _createSuper(GuidelineUI);\n\n function GuidelineUI() {\n _classCallCheck(this, GuidelineUI);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(GuidelineUI, [{\n key: \"build\",\n value:\n /**\n * Custom className on build process.\n */\n function build() {\n _get(_getPrototypeOf(GuidelineUI.prototype), \"build\", this).call(this);\n\n addClass(this._element, CSS_CLASSNAME);\n }\n }]);\n\n return GuidelineUI;\n}(BaseUI);\n\nexport default GuidelineUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { arrayReduce } from \"../../helpers/array.mjs\";\nimport { addClass, removeClass, offset } from \"../../helpers/dom/element.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport BacklightUI from \"./ui/backlight.mjs\";\nimport GuidelineUI from \"./ui/guideline.mjs\";\nHooks.getSingleton().register('beforeRowMove');\nHooks.getSingleton().register('afterRowMove');\nexport var PLUGIN_KEY = 'manualRowMove';\nexport var PLUGIN_PRIORITY = 140;\nvar privatePool = new WeakMap();\nvar CSS_PLUGIN = 'ht__manualRowMove';\nvar CSS_SHOW_UI = 'show-ui';\nvar CSS_ON_MOVING = 'on-moving--rows';\nvar CSS_AFTER_SELECTION = 'after-selection--rows';\n/**\n * @plugin ManualRowMove\n *\n * @description\n * This plugin allows to change rows order. To make rows order persistent the {@link Options#persistentState}\n * plugin should be enabled.\n *\n * API:\n * - `moveRow` - move single row to the new position.\n * - `moveRows` - move many rows (as an array of indexes) to the new position.\n * - `dragRow` - drag single row to the new position.\n * - `dragRows` - drag many rows (as an array of indexes) to the new position.\n *\n * [Documentation](/docs/demo-moving.html) explain differences between drag and move actions. Please keep in mind that if you want apply visual changes,\n * you have to call manually the `render` method on the instance of Handsontable.\n *\n * The plugin creates additional components to make moving possibly using user interface:\n * - backlight - highlight of selected rows.\n * - guideline - line which shows where rows has been moved.\n *\n * @class ManualRowMove\n * @plugin ManualRowMove\n */\n\nexport var ManualRowMove = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ManualRowMove, _BasePlugin);\n\n var _super = _createSuper(ManualRowMove);\n\n function ManualRowMove(hotInstance) {\n var _this;\n\n _classCallCheck(this, ManualRowMove);\n\n _this = _super.call(this, hotInstance);\n /**\n * Set up WeakMap of plugin to sharing private parameters;.\n */\n\n privatePool.set(_assertThisInitialized(_this), {\n rowsToMove: [],\n pressed: void 0,\n target: {\n eventPageY: void 0,\n coords: void 0,\n TD: void 0,\n row: void 0\n },\n cachedDropIndex: void 0\n });\n /**\n * Event Manager object.\n *\n * @private\n * @type {object}\n */\n\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n /**\n * Backlight UI object.\n *\n * @private\n * @type {object}\n */\n\n _this.backlight = new BacklightUI(hotInstance);\n /**\n * Guideline UI object.\n *\n * @private\n * @type {object}\n */\n\n _this.guideline = new GuidelineUI(hotInstance);\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ManualRowMove#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ManualRowMove, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.addHook('beforeOnCellMouseDown', function (event, coords, TD, blockCalculations) {\n return _this2.onBeforeOnCellMouseDown(event, coords, TD, blockCalculations);\n });\n this.addHook('beforeOnCellMouseOver', function (event, coords, TD, blockCalculations) {\n return _this2.onBeforeOnCellMouseOver(event, coords, TD, blockCalculations);\n });\n this.addHook('afterScrollHorizontally', function () {\n return _this2.onAfterScrollHorizontally();\n });\n this.addHook('afterLoadData', function () {\n return _this2.onAfterLoadData();\n });\n this.buildPluginUI();\n this.registerEvents(); // TODO: move adding plugin classname to BasePlugin.\n\n addClass(this.hot.rootElement, CSS_PLUGIN);\n\n _get(_getPrototypeOf(ManualRowMove.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n this.moveBySettingsOrLoad();\n\n _get(_getPrototypeOf(ManualRowMove.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n removeClass(this.hot.rootElement, CSS_PLUGIN);\n this.unregisterEvents();\n this.backlight.destroy();\n this.guideline.destroy();\n\n _get(_getPrototypeOf(ManualRowMove.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Moves a single row.\n *\n * @param {number} row Visual row index to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/docs/demo-moving.html).\n * @fires Hooks#beforeRowMove\n * @fires Hooks#afterRowMove\n * @returns {boolean}\n */\n\n }, {\n key: \"moveRow\",\n value: function moveRow(row, finalIndex) {\n return this.moveRows([row], finalIndex);\n }\n /**\n * Moves a multiple rows.\n *\n * @param {Array} rows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/docs/demo-moving.html).\n * @fires Hooks#beforeRowMove\n * @fires Hooks#afterRowMove\n * @returns {boolean}\n */\n\n }, {\n key: \"moveRows\",\n value: function moveRows(rows, finalIndex) {\n var priv = privatePool.get(this);\n var dropIndex = priv.cachedDropIndex;\n var movePossible = this.isMovePossible(rows, finalIndex);\n var beforeMoveHook = this.hot.runHooks('beforeRowMove', rows, finalIndex, dropIndex, movePossible);\n priv.cachedDropIndex = void 0;\n\n if (beforeMoveHook === false) {\n return;\n }\n\n if (movePossible) {\n this.hot.rowIndexMapper.moveIndexes(rows, finalIndex);\n }\n\n var movePerformed = movePossible && this.isRowOrderChanged(rows, finalIndex);\n this.hot.runHooks('afterRowMove', rows, finalIndex, dropIndex, movePossible, movePerformed);\n return movePerformed;\n }\n /**\n * Drag a single row to drop index position.\n *\n * @param {number} row Visual row index to be dragged.\n * @param {number} dropIndex Visual row index, being a drop index for the moved rows. Points to where we are going to drop the moved elements.\n * To check visualization of drop index please take a look at [documentation](/docs/demo-moving.html).\n * @fires Hooks#beforeRowMove\n * @fires Hooks#afterRowMove\n * @returns {boolean}\n */\n\n }, {\n key: \"dragRow\",\n value: function dragRow(row, dropIndex) {\n return this.dragRows([row], dropIndex);\n }\n /**\n * Drag multiple rows to drop index position.\n *\n * @param {Array} rows Array of visual row indexes to be dragged.\n * @param {number} dropIndex Visual row index, being a drop index for the moved rows. Points to where we are going to drop the moved elements.\n * To check visualization of drop index please take a look at [documentation](/docs/demo-moving.html).\n * @fires Hooks#beforeRowMove\n * @fires Hooks#afterRowMove\n * @returns {boolean}\n */\n\n }, {\n key: \"dragRows\",\n value: function dragRows(rows, dropIndex) {\n var finalIndex = this.countFinalIndex(rows, dropIndex);\n var priv = privatePool.get(this);\n priv.cachedDropIndex = dropIndex;\n return this.moveRows(rows, finalIndex);\n }\n /**\n * Indicates if it's possible to move rows to the desired position. Some of the actions aren't possible, i.e. You can’t move more than one element to the last position.\n *\n * @param {Array} movedRows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/docs/demo-moving.html).\n * @returns {boolean}\n */\n\n }, {\n key: \"isMovePossible\",\n value: function isMovePossible(movedRows, finalIndex) {\n var length = this.hot.rowIndexMapper.getNotTrimmedIndexesLength(); // An attempt to transfer more rows to start destination than is possible (only when moving from the top to the bottom).\n\n var tooHighDestinationIndex = movedRows.length + finalIndex > length;\n var tooLowDestinationIndex = finalIndex < 0;\n var tooLowMovedRowIndex = movedRows.some(function (movedRow) {\n return movedRow < 0;\n });\n var tooHighMovedRowIndex = movedRows.some(function (movedRow) {\n return movedRow >= length;\n });\n\n if (tooHighDestinationIndex || tooLowDestinationIndex || tooLowMovedRowIndex || tooHighMovedRowIndex) {\n return false;\n }\n\n return true;\n }\n /**\n * Indicates if order of rows was changed.\n *\n * @private\n * @param {Array} movedRows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action.\n * To check the visualization of the final index, please take a look at [documentation](/docs/demo-moving.html).\n * @returns {boolean}\n */\n\n }, {\n key: \"isRowOrderChanged\",\n value: function isRowOrderChanged(movedRows, finalIndex) {\n return movedRows.some(function (row, nrOfMovedElement) {\n return row - nrOfMovedElement !== finalIndex;\n });\n }\n /**\n * Count the final row index from the drop index.\n *\n * @private\n * @param {Array} movedRows Array of visual row indexes to be moved.\n * @param {number} dropIndex Visual row index, being a drop index for the moved rows.\n * @returns {number} Visual row index, being a start index for the moved rows.\n */\n\n }, {\n key: \"countFinalIndex\",\n value: function countFinalIndex(movedRows, dropIndex) {\n var numberOfRowsLowerThanDropIndex = arrayReduce(movedRows, function (numberOfRows, currentRowIndex) {\n if (currentRowIndex < dropIndex) {\n numberOfRows += 1;\n }\n\n return numberOfRows;\n }, 0);\n return dropIndex - numberOfRowsLowerThanDropIndex;\n }\n /**\n * Gets the sum of the heights of rows in the provided range.\n *\n * @private\n * @param {number} fromRow Visual row index.\n * @param {number} toRow Visual row index.\n * @returns {number}\n */\n\n }, {\n key: \"getRowsHeight\",\n value: function getRowsHeight(fromRow, toRow) {\n var rowMapper = this.hot.rowIndexMapper;\n var rowsHeight = 0;\n\n for (var visualRowIndex = fromRow; visualRowIndex <= toRow; visualRowIndex++) {\n var renderableIndex = rowMapper.getRenderableFromVisualIndex(visualRowIndex);\n\n if (renderableIndex !== null) {\n rowsHeight += this.hot.view.wt.wtTable.getRowHeight(renderableIndex) || 23;\n }\n }\n\n return rowsHeight;\n }\n /**\n * Loads initial settings when persistent state is saved or when plugin was initialized as an array.\n *\n * @private\n */\n\n }, {\n key: \"moveBySettingsOrLoad\",\n value: function moveBySettingsOrLoad() {\n var pluginSettings = this.hot.getSettings()[PLUGIN_KEY];\n\n if (Array.isArray(pluginSettings)) {\n this.moveRows(pluginSettings, 0);\n } else if (pluginSettings !== void 0) {\n var persistentState = this.persistentStateLoad();\n\n if (persistentState.length) {\n this.moveRows(persistentState, 0);\n }\n }\n }\n /**\n * Checks if the provided row is in the fixedRowsTop section.\n *\n * @private\n * @param {number} row Visual row index to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isFixedRowTop\",\n value: function isFixedRowTop(row) {\n return row < this.hot.getSettings().fixedRowsTop;\n }\n /**\n * Checks if the provided row is in the fixedRowsBottom section.\n *\n * @private\n * @param {number} row Visual row index to check.\n * @returns {boolean}\n */\n\n }, {\n key: \"isFixedRowBottom\",\n value: function isFixedRowBottom(row) {\n return row > this.hot.getSettings().fixedRowsBottom;\n }\n /**\n * Saves the manual row positions to the persistent state (the {@link Options#persistentState} option has to be enabled).\n *\n * @private\n * @fires Hooks#persistentStateSave\n */\n\n }, {\n key: \"persistentStateSave\",\n value: function persistentStateSave() {\n // The `PersistentState` plugin should be refactored.\n this.hot.runHooks('persistentStateSave', 'manualRowMove', this.hot.rowIndexMapper.getIndexesSequence());\n }\n /**\n * Loads the manual row positions from the persistent state (the {@link Options#persistentState} option has to be enabled).\n *\n * @private\n * @fires Hooks#persistentStateLoad\n * @returns {Array} Stored state.\n */\n\n }, {\n key: \"persistentStateLoad\",\n value: function persistentStateLoad() {\n var storedState = {};\n this.hot.runHooks('persistentStateLoad', 'manualRowMove', storedState);\n return storedState.value ? storedState.value : [];\n }\n /**\n * Prepares an array of indexes based on actual selection.\n *\n * @private\n * @returns {Array}\n */\n\n }, {\n key: \"prepareRowsToMoving\",\n value: function prepareRowsToMoving() {\n var selection = this.hot.getSelectedRangeLast();\n var selectedRows = [];\n\n if (!selection) {\n return selectedRows;\n }\n\n var from = selection.from,\n to = selection.to;\n var start = Math.min(from.row, to.row);\n var end = Math.max(from.row, to.row);\n rangeEach(start, end, function (i) {\n selectedRows.push(i);\n });\n return selectedRows;\n }\n /**\n * Update the UI visual position.\n *\n * @private\n */\n\n }, {\n key: \"refreshPositions\",\n value: function refreshPositions() {\n var priv = privatePool.get(this);\n var coords = priv.target.coords;\n var firstVisible = this.hot.view.wt.wtTable.getFirstVisibleRow();\n var lastVisible = this.hot.view.wt.wtTable.getLastVisibleRow();\n var fixedRows = this.hot.getSettings().fixedRowsTop;\n var countRows = this.hot.countRows();\n\n if (coords.row < fixedRows && firstVisible > 0) {\n this.hot.scrollViewportTo(firstVisible - 1);\n }\n\n if (coords.row >= lastVisible && lastVisible < countRows) {\n this.hot.scrollViewportTo(lastVisible + 1, undefined, true);\n }\n\n var wtTable = this.hot.view.wt.wtTable;\n var TD = priv.target.TD;\n var rootElementOffset = offset(this.hot.rootElement);\n var tdOffsetTop = this.hot.view.THEAD.offsetHeight + this.getRowsHeight(0, coords.row - 1);\n var mouseOffsetTop = priv.target.eventPageY - rootElementOffset.top + wtTable.holder.scrollTop;\n var hiderHeight = wtTable.hider.offsetHeight;\n var tbodyOffsetTop = wtTable.TBODY.offsetTop;\n var backlightElemMarginTop = this.backlight.getOffset().top;\n var backlightElemHeight = this.backlight.getSize().height;\n\n if (this.isFixedRowTop(coords.row)) {\n tdOffsetTop += wtTable.holder.scrollTop;\n } // todo: fixedRowsBottom\n // if (this.isFixedRowBottom(coords.row)) {\n //\n // }\n\n\n if (coords.row < 0) {\n // if hover on colHeader\n priv.target.row = firstVisible > 0 ? firstVisible - 1 : firstVisible;\n } else if (TD.offsetHeight / 2 + tdOffsetTop <= mouseOffsetTop) {\n // if hover on lower part of TD\n priv.target.row = coords.row + 1; // unfortunately first row is bigger than rest\n\n tdOffsetTop += coords.row === 0 ? TD.offsetHeight - 1 : TD.offsetHeight;\n } else {\n // elsewhere on table\n priv.target.row = coords.row;\n }\n\n var backlightTop = mouseOffsetTop;\n var guidelineTop = tdOffsetTop;\n\n if (mouseOffsetTop + backlightElemHeight + backlightElemMarginTop >= hiderHeight) {\n // prevent display backlight below table\n backlightTop = hiderHeight - backlightElemHeight - backlightElemMarginTop;\n } else if (mouseOffsetTop + backlightElemMarginTop < tbodyOffsetTop) {\n // prevent display above below table\n backlightTop = tbodyOffsetTop + Math.abs(backlightElemMarginTop);\n }\n\n if (tdOffsetTop >= hiderHeight - 1) {\n // prevent display guideline below table\n guidelineTop = hiderHeight - 1;\n }\n\n var topOverlayHeight = 0;\n\n if (this.hot.view.wt.wtOverlays.topOverlay) {\n topOverlayHeight = this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight;\n }\n\n if (coords.row >= fixedRows && guidelineTop - wtTable.holder.scrollTop < topOverlayHeight) {\n this.hot.scrollViewportTo(coords.row);\n }\n\n this.backlight.setPosition(backlightTop);\n this.guideline.setPosition(guidelineTop);\n }\n /**\n * Binds the events used by the plugin.\n *\n * @private\n */\n\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this3 = this;\n\n var documentElement = this.hot.rootDocument.documentElement;\n this.eventManager.addEventListener(documentElement, 'mousemove', function (event) {\n return _this3.onMouseMove(event);\n });\n this.eventManager.addEventListener(documentElement, 'mouseup', function () {\n return _this3.onMouseUp();\n });\n }\n /**\n * Unbinds the events used by the plugin.\n *\n * @private\n */\n\n }, {\n key: \"unregisterEvents\",\n value: function unregisterEvents() {\n this.eventManager.clear();\n }\n /**\n * Change the behavior of selection / dragging.\n *\n * @private\n * @param {MouseEvent} event `mousedown` event properties.\n * @param {CellCoords} coords Visual cell coordinates where was fired event.\n * @param {HTMLElement} TD Cell represented as HTMLElement.\n * @param {object} blockCalculations Object which contains information about blockCalculation for row, column or cells.\n */\n\n }, {\n key: \"onBeforeOnCellMouseDown\",\n value: function onBeforeOnCellMouseDown(event, coords, TD, blockCalculations) {\n var _this$hot$view$wt = this.hot.view.wt,\n wtTable = _this$hot$view$wt.wtTable,\n wtViewport = _this$hot$view$wt.wtViewport;\n var isHeaderSelection = this.hot.selection.isSelectedByRowHeader();\n var selection = this.hot.getSelectedRangeLast();\n var priv = privatePool.get(this);\n\n if (!selection || !isHeaderSelection || priv.pressed || event.button !== 0) {\n priv.pressed = false;\n priv.rowsToMove.length = 0;\n removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);\n return;\n }\n\n var guidelineIsNotReady = this.guideline.isBuilt() && !this.guideline.isAppended();\n var backlightIsNotReady = this.backlight.isBuilt() && !this.backlight.isAppended();\n\n if (guidelineIsNotReady && backlightIsNotReady) {\n this.guideline.appendTo(wtTable.hider);\n this.backlight.appendTo(wtTable.hider);\n }\n\n var from = selection.from,\n to = selection.to;\n var start = Math.min(from.row, to.row);\n var end = Math.max(from.row, to.row);\n\n if (coords.col < 0 && coords.row >= start && coords.row <= end) {\n blockCalculations.row = true;\n priv.pressed = true;\n priv.target.eventPageY = event.pageY;\n priv.target.coords = coords;\n priv.target.TD = TD;\n priv.rowsToMove = this.prepareRowsToMoving();\n var leftPos = wtTable.holder.scrollLeft + wtViewport.getRowHeaderWidth();\n this.backlight.setPosition(null, leftPos);\n this.backlight.setSize(wtTable.hider.offsetWidth - leftPos, this.getRowsHeight(start, end));\n this.backlight.setOffset((this.getRowsHeight(start, coords.row - 1) + event.offsetY) * -1, null);\n addClass(this.hot.rootElement, CSS_ON_MOVING);\n this.refreshPositions();\n } else {\n removeClass(this.hot.rootElement, CSS_AFTER_SELECTION);\n priv.pressed = false;\n priv.rowsToMove.length = 0;\n }\n }\n /**\n * 'mouseMove' event callback. Fired when pointer move on document.documentElement.\n *\n * @private\n * @param {MouseEvent} event `mousemove` event properties.\n */\n\n }, {\n key: \"onMouseMove\",\n value: function onMouseMove(event) {\n var priv = privatePool.get(this);\n\n if (!priv.pressed) {\n return;\n } // callback for browser which doesn't supports CSS pointer-event: none\n\n\n if (event.target === this.backlight.element) {\n var height = this.backlight.getSize().height;\n this.backlight.setSize(null, 0);\n setTimeout(function () {\n this.backlight.setPosition(null, height);\n });\n }\n\n priv.target.eventPageY = event.pageY;\n this.refreshPositions();\n }\n /**\n * 'beforeOnCellMouseOver' hook callback. Fired when pointer was over cell.\n *\n * @private\n * @param {MouseEvent} event `mouseover` event properties.\n * @param {CellCoords} coords Visual cell coordinates where was fired event.\n * @param {HTMLElement} TD Cell represented as HTMLElement.\n * @param {object} blockCalculations Object which contains information about blockCalculation for row, column or cells.\n */\n\n }, {\n key: \"onBeforeOnCellMouseOver\",\n value: function onBeforeOnCellMouseOver(event, coords, TD, blockCalculations) {\n var selectedRange = this.hot.getSelectedRangeLast();\n var priv = privatePool.get(this);\n\n if (!selectedRange || !priv.pressed) {\n return;\n }\n\n if (priv.rowsToMove.indexOf(coords.row) > -1) {\n removeClass(this.hot.rootElement, CSS_SHOW_UI);\n } else {\n addClass(this.hot.rootElement, CSS_SHOW_UI);\n }\n\n blockCalculations.row = true;\n blockCalculations.column = true;\n blockCalculations.cell = true;\n priv.target.coords = coords;\n priv.target.TD = TD;\n }\n /**\n * `onMouseUp` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp() {\n var priv = privatePool.get(this);\n var target = priv.target.row;\n var rowsLen = priv.rowsToMove.length;\n priv.pressed = false;\n priv.backlightHeight = 0;\n removeClass(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI, CSS_AFTER_SELECTION]);\n\n if (this.hot.selection.isSelectedByRowHeader()) {\n addClass(this.hot.rootElement, CSS_AFTER_SELECTION);\n }\n\n if (rowsLen < 1 || target === void 0) {\n return;\n }\n\n var firstMovedVisualRow = priv.rowsToMove[0];\n var firstMovedPhysicalRow = this.hot.toPhysicalRow(firstMovedVisualRow);\n var movePerformed = this.dragRows(priv.rowsToMove, target);\n priv.rowsToMove.length = 0;\n\n if (movePerformed === true) {\n this.persistentStateSave();\n this.hot.render();\n this.hot.view.adjustElementsSize(true);\n var selectionStart = this.hot.toVisualRow(firstMovedPhysicalRow);\n var selectionEnd = selectionStart + rowsLen - 1;\n this.hot.selectRows(selectionStart, selectionEnd);\n }\n }\n /**\n * `afterScrollHorizontally` hook callback. Fired the table was scrolled horizontally.\n *\n * @private\n */\n\n }, {\n key: \"onAfterScrollHorizontally\",\n value: function onAfterScrollHorizontally() {\n var wtTable = this.hot.view.wt.wtTable;\n var headerWidth = this.hot.view.wt.wtViewport.getRowHeaderWidth();\n var scrollLeft = wtTable.holder.scrollLeft;\n var posLeft = headerWidth + scrollLeft;\n this.backlight.setPosition(null, posLeft);\n this.backlight.setSize(wtTable.hider.offsetWidth - posLeft);\n }\n /**\n * Builds the plugin's UI.\n *\n * @private\n */\n\n }, {\n key: \"buildPluginUI\",\n value: function buildPluginUI() {\n this.backlight.build();\n this.guideline.build();\n }\n /**\n * Callback for the `afterLoadData` hook.\n *\n * @private\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData() {\n this.moveBySettingsOrLoad();\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.backlight.destroy();\n this.guideline.destroy();\n\n _get(_getPrototypeOf(ManualRowMove.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ManualRowMove;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { addClass, closest, hasClass, removeClass, outerWidth, isDetached } from \"../../helpers/dom/element.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { PhysicalIndexToValueMap as IndexToValueMap } from \"../../translations/index.mjs\";\nimport { ViewportRowsCalculator } from \"../../3rdparty/walkontable/src/index.mjs\"; // Developer note! Whenever you make a change in this file, make an analogous change in manualColumnResize.js\n\nexport var PLUGIN_KEY = 'manualRowResize';\nexport var PLUGIN_PRIORITY = 30;\nvar PERSISTENT_STATE_KEY = 'manualRowHeights';\nvar privatePool = new WeakMap();\n/**\n * @description\n * This plugin allows to change rows height. To make rows height persistent the {@link Options#persistentState}\n * plugin should be enabled.\n *\n * The plugin creates additional components to make resizing possibly using user interface:\n * - handle - the draggable element that sets the desired height of the row.\n * - guide - the helper guide that shows the desired height as a horizontal guide.\n *\n * @plugin ManualRowResize\n */\n\nexport var ManualRowResize = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ManualRowResize, _BasePlugin);\n\n var _super = _createSuper(ManualRowResize);\n\n function ManualRowResize(hotInstance) {\n var _this;\n\n _classCallCheck(this, ManualRowResize);\n\n _this = _super.call(this, hotInstance);\n var rootDocument = _this.hot.rootDocument;\n _this.currentTH = null;\n _this.currentRow = null;\n _this.selectedRows = [];\n _this.currentHeight = null;\n _this.newSize = null;\n _this.startY = null;\n _this.startHeight = null;\n _this.startOffset = null;\n _this.handle = rootDocument.createElement('DIV');\n _this.guide = rootDocument.createElement('DIV');\n _this.eventManager = new EventManager(_assertThisInitialized(_this));\n _this.pressed = null;\n _this.dblclick = 0;\n _this.autoresizeTimeout = null;\n /**\n * PhysicalIndexToValueMap to keep and track widths for physical row indexes.\n *\n * @private\n * @type {PhysicalIndexToValueMap}\n */\n\n _this.rowHeightsMap = void 0;\n /**\n * Private pool to save configuration from updateSettings.\n */\n\n privatePool.set(_assertThisInitialized(_this), {\n config: void 0\n });\n addClass(_this.handle, 'manualRowResizer');\n addClass(_this.guide, 'manualRowResizerGuide');\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ManualRowResize#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ManualRowResize, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.rowHeightsMap = new IndexToValueMap();\n this.rowHeightsMap.addLocalHook('init', function () {\n return _this2.onMapInit();\n });\n this.hot.rowIndexMapper.registerMap(this.pluginName, this.rowHeightsMap);\n this.addHook('modifyRowHeight', function (height, row) {\n return _this2.onModifyRowHeight(height, row);\n });\n this.bindEvents();\n\n _get(_getPrototypeOf(ManualRowResize.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(ManualRowResize.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n var priv = privatePool.get(this);\n priv.config = this.rowHeightsMap.getValues();\n this.hot.rowIndexMapper.unregisterMap(this.pluginName);\n\n _get(_getPrototypeOf(ManualRowResize.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Saves the current sizes using the persistentState plugin (the {@link Options#persistentState} option has to be\n * enabled).\n *\n * @fires Hooks#persistentStateSave\n */\n\n }, {\n key: \"saveManualRowHeights\",\n value: function saveManualRowHeights() {\n this.hot.runHooks('persistentStateSave', PERSISTENT_STATE_KEY, this.rowHeightsMap.getValues());\n }\n /**\n * Loads the previously saved sizes using the persistentState plugin (the {@link Options#persistentState} option\n * has be enabled).\n *\n * @returns {Array}\n * @fires Hooks#persistentStateLoad\n */\n\n }, {\n key: \"loadManualRowHeights\",\n value: function loadManualRowHeights() {\n var storedState = {};\n this.hot.runHooks('persistentStateLoad', PERSISTENT_STATE_KEY, storedState);\n return storedState.value;\n }\n /**\n * Sets the new height for specified row index.\n *\n * @param {number} row Visual row index.\n * @param {number} height Row height.\n * @returns {number} Returns new height.\n */\n\n }, {\n key: \"setManualSize\",\n value: function setManualSize(row, height) {\n var physicalRow = this.hot.toPhysicalRow(row);\n var newHeight = Math.max(height, ViewportRowsCalculator.DEFAULT_HEIGHT);\n this.rowHeightsMap.setValueAtIndex(physicalRow, newHeight);\n return newHeight;\n }\n /**\n * Sets the resize handle position.\n *\n * @private\n * @param {HTMLCellElement} TH TH HTML element.\n */\n\n }, {\n key: \"setupHandlePosition\",\n value: function setupHandlePosition(TH) {\n var _this3 = this;\n\n this.currentTH = TH;\n var view = this.hot.view;\n var wt = view.wt;\n var cellCoords = view.wt.wtTable.getCoords(this.currentTH);\n var row = cellCoords.row; // Ignore row headers.\n\n if (row < 0) {\n return;\n }\n\n var headerWidth = outerWidth(this.currentTH);\n var box = this.currentTH.getBoundingClientRect(); // Read \"fixedRowsTop\" and \"fixedRowsBottom\" through the Walkontable as in that context, the fixed\n // rows are modified (reduced by the number of hidden rows) by TableView module.\n\n var fixedRowTop = row < wt.getSetting('fixedRowsTop');\n var fixedRowBottom = row >= view.countNotHiddenRowIndexes(0, 1) - wt.getSetting('fixedRowsBottom');\n var relativeHeaderPosition;\n\n if (fixedRowTop) {\n relativeHeaderPosition = wt.wtOverlays.topLeftCornerOverlay.getRelativeCellPosition(this.currentTH, cellCoords.row, cellCoords.col);\n } else if (fixedRowBottom) {\n relativeHeaderPosition = wt.wtOverlays.bottomLeftCornerOverlay.getRelativeCellPosition(this.currentTH, cellCoords.row, cellCoords.col);\n } // If the TH is not a child of the top-left/bottom-left overlay, recalculate using\n // the left overlay - as this overlay contains the rest of the headers.\n\n\n if (!relativeHeaderPosition) {\n relativeHeaderPosition = wt.wtOverlays.leftOverlay.getRelativeCellPosition(this.currentTH, cellCoords.row, cellCoords.col);\n }\n\n this.currentRow = this.hot.rowIndexMapper.getVisualFromRenderableIndex(row);\n this.selectedRows = [];\n var isFullRowSelected = this.hot.selection.isSelectedByCorner() || this.hot.selection.isSelectedByRowHeader();\n\n if (this.hot.selection.isSelected() && isFullRowSelected) {\n var selectionRanges = this.hot.getSelectedRange();\n arrayEach(selectionRanges, function (selectionRange) {\n var fromRow = selectionRange.getTopLeftCorner().row;\n var toRow = selectionRange.getBottomLeftCorner().row; // Add every selected row for resize action.\n\n rangeEach(fromRow, toRow, function (rowIndex) {\n if (!_this3.selectedRows.includes(rowIndex)) {\n _this3.selectedRows.push(rowIndex);\n }\n });\n });\n } // Resizing element beyond the current selection (also when there is no selection).\n\n\n if (!this.selectedRows.includes(this.currentRow)) {\n this.selectedRows = [this.currentRow];\n }\n\n this.startOffset = relativeHeaderPosition.top - 6;\n this.startHeight = parseInt(box.height, 10);\n this.handle.style.top = \"\".concat(this.startOffset + this.startHeight, \"px\");\n this.handle.style.left = \"\".concat(relativeHeaderPosition.left, \"px\");\n this.handle.style.width = \"\".concat(headerWidth, \"px\");\n this.hot.rootElement.appendChild(this.handle);\n }\n /**\n * Refresh the resize handle position.\n *\n * @private\n */\n\n }, {\n key: \"refreshHandlePosition\",\n value: function refreshHandlePosition() {\n this.handle.style.top = \"\".concat(this.startOffset + this.currentHeight, \"px\");\n }\n /**\n * Sets the resize guide position.\n *\n * @private\n */\n\n }, {\n key: \"setupGuidePosition\",\n value: function setupGuidePosition() {\n var handleWidth = parseInt(outerWidth(this.handle), 10);\n var handleRightPosition = parseInt(this.handle.style.left, 10) + handleWidth;\n var maximumVisibleElementWidth = parseInt(this.hot.view.maximumVisibleElementWidth(0), 10);\n addClass(this.handle, 'active');\n addClass(this.guide, 'active');\n this.guide.style.top = this.handle.style.top;\n this.guide.style.left = \"\".concat(handleRightPosition, \"px\");\n this.guide.style.width = \"\".concat(maximumVisibleElementWidth - handleWidth, \"px\");\n this.hot.rootElement.appendChild(this.guide);\n }\n /**\n * Refresh the resize guide position.\n *\n * @private\n */\n\n }, {\n key: \"refreshGuidePosition\",\n value: function refreshGuidePosition() {\n this.guide.style.top = this.handle.style.top;\n }\n /**\n * Hides both the resize handle and resize guide.\n *\n * @private\n */\n\n }, {\n key: \"hideHandleAndGuide\",\n value: function hideHandleAndGuide() {\n removeClass(this.handle, 'active');\n removeClass(this.guide, 'active');\n }\n /**\n * Checks if provided element is considered as a row header.\n *\n * @private\n * @param {HTMLElement} element HTML element.\n * @returns {boolean}\n */\n\n }, {\n key: \"checkIfRowHeader\",\n value: function checkIfRowHeader(element) {\n var _element$parentNode, _element$parentNode$p;\n\n var thElement = closest(element, ['TH'], this.hot.rootElement);\n return thElement && ((_element$parentNode = element.parentNode) === null || _element$parentNode === void 0 ? void 0 : (_element$parentNode$p = _element$parentNode.parentNode) === null || _element$parentNode$p === void 0 ? void 0 : _element$parentNode$p.tagName) === 'TBODY';\n }\n /**\n * Gets the TH element from the provided element.\n *\n * @private\n * @param {HTMLElement} element HTML element.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"getClosestTHParent\",\n value: function getClosestTHParent(element) {\n if (element.tagName !== 'TABLE') {\n if (element.tagName === 'TH') {\n return element;\n }\n\n return this.getClosestTHParent(element.parentNode);\n }\n\n return null;\n }\n /**\n * Returns the actual height for the provided row index.\n *\n * @private\n * @param {number} row Visual row index.\n * @returns {number} Actual row height.\n */\n\n }, {\n key: \"getActualRowHeight\",\n value: function getActualRowHeight(row) {\n // TODO: this should utilize `this.hot.getRowHeight` after it's fixed and working properly.\n var walkontableHeight = this.hot.view.wt.wtTable.getRowHeight(row);\n\n if (walkontableHeight !== void 0 && this.newSize < walkontableHeight) {\n return walkontableHeight;\n }\n\n return this.newSize;\n }\n /**\n * 'mouseover' event callback - set the handle position.\n *\n * @private\n * @param {MouseEvent} event The mouse event.\n */\n\n }, {\n key: \"onMouseOver\",\n value: function onMouseOver(event) {\n // Workaround for #6926 - if the `event.target` is temporarily detached, we can skip this callback and wait for\n // the next `onmouseover`.\n if (isDetached(event.target)) {\n return;\n }\n\n if (this.checkIfRowHeader(event.target)) {\n var th = this.getClosestTHParent(event.target);\n\n if (th) {\n if (!this.pressed) {\n this.setupHandlePosition(th);\n }\n }\n }\n }\n /**\n * Auto-size row after doubleclick - callback.\n *\n * @private\n * @fires Hooks#beforeRowResize\n * @fires Hooks#afterRowResize\n */\n\n }, {\n key: \"afterMouseDownTimeout\",\n value: function afterMouseDownTimeout() {\n var _this4 = this;\n\n var render = function render() {\n _this4.hot.forceFullRender = true;\n\n _this4.hot.view.render(); // updates all\n\n\n _this4.hot.view.adjustElementsSize(true);\n };\n\n var resize = function resize(row, forceRender) {\n var hookNewSize = _this4.hot.runHooks('beforeRowResize', _this4.getActualRowHeight(row), row, true);\n\n if (hookNewSize !== void 0) {\n _this4.newSize = hookNewSize;\n }\n\n _this4.setManualSize(row, _this4.newSize); // double click sets auto row size\n\n\n _this4.hot.runHooks('afterRowResize', _this4.getActualRowHeight(row), row, true);\n\n if (forceRender) {\n render();\n }\n };\n\n if (this.dblclick >= 2) {\n var selectedRowsLength = this.selectedRows.length;\n\n if (selectedRowsLength > 1) {\n arrayEach(this.selectedRows, function (selectedRow) {\n resize(selectedRow);\n });\n render();\n } else {\n arrayEach(this.selectedRows, function (selectedRow) {\n resize(selectedRow, true);\n });\n }\n }\n\n this.dblclick = 0;\n this.autoresizeTimeout = null;\n }\n /**\n * 'mousedown' event callback.\n *\n * @private\n * @param {MouseEvent} event The mouse event.\n */\n\n }, {\n key: \"onMouseDown\",\n value: function onMouseDown(event) {\n var _this5 = this;\n\n if (hasClass(event.target, 'manualRowResizer')) {\n this.setupHandlePosition(this.currentTH);\n this.setupGuidePosition();\n this.pressed = true;\n\n if (this.autoresizeTimeout === null) {\n this.autoresizeTimeout = setTimeout(function () {\n return _this5.afterMouseDownTimeout();\n }, 500);\n\n this.hot._registerTimeout(this.autoresizeTimeout);\n }\n\n this.dblclick += 1;\n this.startY = event.pageY;\n this.newSize = this.startHeight;\n }\n }\n /**\n * 'mousemove' event callback - refresh the handle and guide positions, cache the new row height.\n *\n * @private\n * @param {MouseEvent} event The mouse event.\n */\n\n }, {\n key: \"onMouseMove\",\n value: function onMouseMove(event) {\n var _this6 = this;\n\n if (this.pressed) {\n this.currentHeight = this.startHeight + (event.pageY - this.startY);\n arrayEach(this.selectedRows, function (selectedRow) {\n _this6.newSize = _this6.setManualSize(selectedRow, _this6.currentHeight);\n });\n this.refreshHandlePosition();\n this.refreshGuidePosition();\n }\n }\n /**\n * 'mouseup' event callback - apply the row resizing.\n *\n * @private\n *\n * @fires Hooks#beforeRowResize\n * @fires Hooks#afterRowResize\n */\n\n }, {\n key: \"onMouseUp\",\n value: function onMouseUp() {\n var _this7 = this;\n\n var render = function render() {\n _this7.hot.forceFullRender = true;\n\n _this7.hot.view.render(); // updates all\n\n\n _this7.hot.view.adjustElementsSize(true);\n };\n\n var runHooks = function runHooks(row, forceRender) {\n _this7.hot.runHooks('beforeRowResize', _this7.getActualRowHeight(row), row, false);\n\n if (forceRender) {\n render();\n }\n\n _this7.saveManualRowHeights();\n\n _this7.hot.runHooks('afterRowResize', _this7.getActualRowHeight(row), row, false);\n };\n\n if (this.pressed) {\n this.hideHandleAndGuide();\n this.pressed = false;\n\n if (this.newSize !== this.startHeight) {\n var selectedRowsLength = this.selectedRows.length;\n\n if (selectedRowsLength > 1) {\n arrayEach(this.selectedRows, function (selectedRow) {\n runHooks(selectedRow);\n });\n render();\n } else {\n arrayEach(this.selectedRows, function (selectedRow) {\n runHooks(selectedRow, true);\n });\n }\n }\n\n this.setupHandlePosition(this.currentTH);\n }\n }\n /**\n * Binds the mouse events.\n *\n * @private\n */\n\n }, {\n key: \"bindEvents\",\n value: function bindEvents() {\n var _this8 = this;\n\n var _this$hot = this.hot,\n rootElement = _this$hot.rootElement,\n rootWindow = _this$hot.rootWindow;\n this.eventManager.addEventListener(rootElement, 'mouseover', function (e) {\n return _this8.onMouseOver(e);\n });\n this.eventManager.addEventListener(rootElement, 'mousedown', function (e) {\n return _this8.onMouseDown(e);\n });\n this.eventManager.addEventListener(rootWindow, 'mousemove', function (e) {\n return _this8.onMouseMove(e);\n });\n this.eventManager.addEventListener(rootWindow, 'mouseup', function () {\n return _this8.onMouseUp();\n });\n }\n /**\n * Modifies the provided row height, based on the plugin settings.\n *\n * @private\n * @param {number} height Row height.\n * @param {number} row Visual row index.\n * @returns {number}\n */\n\n }, {\n key: \"onModifyRowHeight\",\n value: function onModifyRowHeight(height, row) {\n var newHeight = height;\n\n if (this.enabled) {\n var physicalRow = this.hot.toPhysicalRow(row);\n var rowHeight = this.rowHeightsMap.getValueAtIndex(physicalRow);\n\n if (this.hot.getSettings()[PLUGIN_KEY] && rowHeight) {\n newHeight = rowHeight;\n }\n }\n\n return newHeight;\n }\n /**\n * Callback to call on map's `init` local hook.\n *\n * @private\n */\n\n }, {\n key: \"onMapInit\",\n value: function onMapInit() {\n var _this9 = this;\n\n var priv = privatePool.get(this);\n var initialSetting = this.hot.getSettings()[PLUGIN_KEY];\n var loadedManualRowHeights = this.loadManualRowHeights();\n this.hot.batchExecution(function () {\n if (typeof loadedManualRowHeights !== 'undefined') {\n loadedManualRowHeights.forEach(function (height, index) {\n _this9.rowHeightsMap.setValueAtIndex(index, height);\n });\n } else if (Array.isArray(initialSetting)) {\n initialSetting.forEach(function (height, index) {\n _this9.rowHeightsMap.setValueAtIndex(index, height);\n });\n priv.config = initialSetting;\n } else if (initialSetting === true && Array.isArray(priv.config)) {\n priv.config.forEach(function (height, index) {\n _this9.rowHeightsMap.setValueAtIndex(index, height);\n });\n }\n }, true);\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.rowIndexMapper.unregisterMap(this.pluginName);\n\n _get(_getPrototypeOf(ManualRowResize.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ManualRowResize;\n}(BasePlugin);","var _templateObject, _templateObject2, _templateObject3, _templateObject4;\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { CellCoords, CellRange } from \"../../3rdparty/walkontable/src/index.mjs\";\nimport { toSingleLine } from \"../../helpers/templateLiteralTag.mjs\";\n/**\n * The `MergedCellCoords` class represents a single merged cell.\n *\n * @class MergedCellCoords\n * @plugin MergeCells\n */\n\nvar MergedCellCoords = /*#__PURE__*/function () {\n function MergedCellCoords(row, column, rowspan, colspan) {\n _classCallCheck(this, MergedCellCoords);\n /**\n * The index of the topmost merged cell row.\n *\n * @type {number}\n */\n\n\n this.row = row;\n /**\n * The index of the leftmost column.\n *\n * @type {number}\n */\n\n this.col = column;\n /**\n * The `rowspan` value of the merged cell.\n *\n * @type {number}\n */\n\n this.rowspan = rowspan;\n /**\n * The `colspan` value of the merged cell.\n *\n * @type {number}\n */\n\n this.colspan = colspan;\n /**\n * `true` only if the merged cell is bound to be removed.\n *\n * @type {boolean}\n */\n\n this.removed = false;\n }\n /**\n * Get a warning message for when the declared merged cell data contains negative values.\n *\n * @param {object} newMergedCell Object containg information about the merged cells that was about to be added.\n * @returns {string}\n */\n\n\n _createClass(MergedCellCoords, [{\n key: \"normalize\",\n value:\n /**\n * Sanitize (prevent from going outside the boundaries) the merged cell.\n *\n * @param {Core} hotInstance The Handsontable instance.\n */\n function normalize(hotInstance) {\n var totalRows = hotInstance.countRows();\n var totalColumns = hotInstance.countCols();\n\n if (this.row < 0) {\n this.row = 0;\n } else if (this.row > totalRows - 1) {\n this.row = totalRows - 1;\n }\n\n if (this.col < 0) {\n this.col = 0;\n } else if (this.col > totalColumns - 1) {\n this.col = totalColumns - 1;\n }\n\n if (this.row + this.rowspan > totalRows - 1) {\n this.rowspan = totalRows - this.row;\n }\n\n if (this.col + this.colspan > totalColumns - 1) {\n this.colspan = totalColumns - this.col;\n }\n }\n /**\n * Returns `true` if the provided coordinates are inside the merged cell.\n *\n * @param {number} row The row index.\n * @param {number} column The column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"includes\",\n value: function includes(row, column) {\n return this.row <= row && this.col <= column && this.row + this.rowspan - 1 >= row && this.col + this.colspan - 1 >= column;\n }\n /**\n * Returns `true` if the provided `column` property is within the column span of the merged cell.\n *\n * @param {number} column The column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"includesHorizontally\",\n value: function includesHorizontally(column) {\n return this.col <= column && this.col + this.colspan - 1 >= column;\n }\n /**\n * Returns `true` if the provided `row` property is within the row span of the merged cell.\n *\n * @param {number} row Row index.\n * @returns {boolean}\n */\n\n }, {\n key: \"includesVertically\",\n value: function includesVertically(row) {\n return this.row <= row && this.row + this.rowspan - 1 >= row;\n }\n /**\n * Shift (and possibly resize, if needed) the merged cell.\n *\n * @param {Array} shiftVector 2-element array containing the information on the shifting in the `x` and `y` axis.\n * @param {number} indexOfChange Index of the preceding change.\n * @returns {boolean} Returns `false` if the whole merged cell was removed.\n */\n\n }, {\n key: \"shift\",\n value: function shift(shiftVector, indexOfChange) {\n var shiftValue = shiftVector[0] || shiftVector[1];\n var shiftedIndex = indexOfChange + Math.abs(shiftVector[0] || shiftVector[1]) - 1;\n var span = shiftVector[0] ? 'colspan' : 'rowspan';\n var index = shiftVector[0] ? 'col' : 'row';\n var changeStart = Math.min(indexOfChange, shiftedIndex);\n var changeEnd = Math.max(indexOfChange, shiftedIndex);\n var mergeStart = this[index];\n var mergeEnd = this[index] + this[span] - 1;\n\n if (mergeStart >= indexOfChange) {\n this[index] += shiftValue;\n } // adding rows/columns\n\n\n if (shiftValue > 0) {\n if (indexOfChange <= mergeEnd && indexOfChange > mergeStart) {\n this[span] += shiftValue;\n } // removing rows/columns\n\n } else if (shiftValue < 0) {\n // removing the whole merge\n if (changeStart <= mergeStart && changeEnd >= mergeEnd) {\n this.removed = true;\n return false; // removing the merge partially, including the beginning\n } else if (mergeStart >= changeStart && mergeStart <= changeEnd) {\n var removedOffset = changeEnd - mergeStart + 1;\n var preRemovedOffset = Math.abs(shiftValue) - removedOffset;\n this[index] -= preRemovedOffset + shiftValue;\n this[span] -= removedOffset; // removing the middle part of the merge\n } else if (mergeStart <= changeStart && mergeEnd >= changeEnd) {\n this[span] += shiftValue; // removing the end part of the merge\n } else if (mergeStart <= changeStart && mergeEnd >= changeStart && mergeEnd < changeEnd) {\n var removedPart = mergeEnd - changeStart + 1;\n this[span] -= removedPart;\n }\n }\n\n return true;\n }\n /**\n * Check if the second provided merged cell is \"farther\" in the provided direction.\n *\n * @param {MergedCellCoords} mergedCell The merged cell to check.\n * @param {string} direction Drag direction.\n * @returns {boolean|null} `true` if the second provided merged cell is \"farther\".\n */\n\n }, {\n key: \"isFarther\",\n value: function isFarther(mergedCell, direction) {\n if (!mergedCell) {\n return true;\n }\n\n if (direction === 'down') {\n return mergedCell.row + mergedCell.rowspan - 1 < this.row + this.rowspan - 1;\n } else if (direction === 'up') {\n return mergedCell.row > this.row;\n } else if (direction === 'right') {\n return mergedCell.col + mergedCell.colspan - 1 < this.col + this.colspan - 1;\n } else if (direction === 'left') {\n return mergedCell.col > this.col;\n }\n\n return null;\n }\n /**\n * Get the bottom row index of the merged cell.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLastRow\",\n value: function getLastRow() {\n return this.row + this.rowspan - 1;\n }\n /**\n * Get the rightmost column index of the merged cell.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLastColumn\",\n value: function getLastColumn() {\n return this.col + this.colspan - 1;\n }\n /**\n * Get the range coordinates of the merged cell.\n *\n * @returns {CellRange}\n */\n\n }, {\n key: \"getRange\",\n value: function getRange() {\n return new CellRange(new CellCoords(this.row, this.col), new CellCoords(this.row, this.col), new CellCoords(this.getLastRow(), this.getLastColumn()));\n }\n }], [{\n key: \"NEGATIVE_VALUES_WARNING\",\n value: function NEGATIVE_VALUES_WARNING(newMergedCell) {\n return toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"The merged cell declared with {row: \", \", col: \", \", \\n rowspan: \", \", colspan: \", \"} contains negative values, which is \\n not supported. It will not be added to the collection.\"], [\"The merged cell declared with {row: \", \", col: \", \",\\\\x20\\n rowspan: \", \", colspan: \", \"} contains negative values, which is\\\\x20\\n not supported. It will not be added to the collection.\"])), newMergedCell.row, newMergedCell.col, newMergedCell.rowspan, newMergedCell.colspan);\n }\n /**\n * Get a warning message for when the declared merged cell data contains values exceeding the table limits.\n *\n * @param {object} newMergedCell Object containg information about the merged cells that was about to be added.\n * @returns {string}\n */\n\n }, {\n key: \"IS_OUT_OF_BOUNDS_WARNING\",\n value: function IS_OUT_OF_BOUNDS_WARNING(newMergedCell) {\n return toSingleLine(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"The merged cell declared at [\", \", \", \"] is positioned \\n (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.\"], [\"The merged cell declared at [\", \", \", \"] is positioned\\\\x20\\n (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.\"])), newMergedCell.row, newMergedCell.col);\n }\n /**\n * Get a warning message for when the declared merged cell data represents a single cell.\n *\n * @param {object} newMergedCell Object containg information about the merged cells that was about to be added.\n * @returns {string}\n */\n\n }, {\n key: \"IS_SINGLE_CELL\",\n value: function IS_SINGLE_CELL(newMergedCell) {\n return toSingleLine(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral([\"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.\"], [\"The merged cell declared at [\", \", \", \"] has both \\\"rowspan\\\"\\\\x20\\n and \\\"colspan\\\" declared as \\\"1\\\", which makes it a single cell. It cannot be added to the collection.\"])), newMergedCell.row, newMergedCell.col);\n }\n /**\n * Get a warning message for when the declared merged cell data contains \"colspan\" or \"rowspan\", that equals 0.\n *\n * @param {object} newMergedCell Object containg information about the merged cells that was about to be added.\n * @returns {string}\n */\n\n }, {\n key: \"ZERO_SPAN_WARNING\",\n value: function ZERO_SPAN_WARNING(newMergedCell) {\n return toSingleLine(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([\"The merged cell declared at [\", \", \", \"] has \\\"rowspan\\\" \\n or \\\"colspan\\\" declared as \\\"0\\\", which is not supported. It cannot be added to the collection.\"], [\"The merged cell declared at [\", \", \", \"] has \\\"rowspan\\\"\\\\x20\\n or \\\"colspan\\\" declared as \\\"0\\\", which is not supported. It cannot be added to the collection.\"])), newMergedCell.row, newMergedCell.col);\n }\n /**\n * Check whether the values provided for a merged cell contain any negative values.\n *\n * @param {object} mergedCellInfo Object containing the `row`, `col`, `rowspan` and `colspan` properties.\n * @returns {boolean}\n */\n\n }, {\n key: \"containsNegativeValues\",\n value: function containsNegativeValues(mergedCellInfo) {\n return mergedCellInfo.row < 0 || mergedCellInfo.col < 0 || mergedCellInfo.rowspan < 0 || mergedCellInfo.colspan < 0;\n }\n /**\n * Check whether the provided merged cell information object represents a single cell.\n *\n * @private\n * @param {object} mergedCellInfo An object with `row`, `col`, `rowspan` and `colspan` properties.\n * @returns {boolean}\n */\n\n }, {\n key: \"isSingleCell\",\n value: function isSingleCell(mergedCellInfo) {\n return mergedCellInfo.colspan === 1 && mergedCellInfo.rowspan === 1;\n }\n /**\n * Check whether the provided merged cell information object contains a rowspan or colspan of 0.\n *\n * @private\n * @param {object} mergedCellInfo An object with `row`, `col`, `rowspan` and `colspan` properties.\n * @returns {boolean}\n */\n\n }, {\n key: \"containsZeroSpan\",\n value: function containsZeroSpan(mergedCellInfo) {\n return mergedCellInfo.colspan === 0 || mergedCellInfo.rowspan === 0;\n }\n /**\n * Check whether the provided merged cell object is to be declared out of bounds of the table.\n *\n * @param {object} mergeCell Object containing the `row`, `col`, `rowspan` and `colspan` properties.\n * @param {number} rowCount Number of rows in the table.\n * @param {number} columnCount Number of rows in the table.\n * @returns {boolean}\n */\n\n }, {\n key: \"isOutOfBounds\",\n value: function isOutOfBounds(mergeCell, rowCount, columnCount) {\n return mergeCell.row < 0 || mergeCell.col < 0 || mergeCell.row >= rowCount || mergeCell.row + mergeCell.rowspan - 1 >= rowCount || mergeCell.col >= columnCount || mergeCell.col + mergeCell.colspan - 1 >= columnCount;\n }\n }]);\n\n return MergedCellCoords;\n}();\n\nexport default MergedCellCoords;","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.splice.js\";\n\nvar _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport MergedCellCoords from \"./cellCoords.mjs\";\nimport { CellCoords, CellRange } from \"../../3rdparty/walkontable/src/index.mjs\";\nimport { rangeEach, rangeEachReverse } from \"../../helpers/number.mjs\";\nimport { warn } from \"../../helpers/console.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { applySpanProperties } from \"./utils.mjs\";\nimport { toSingleLine } from \"../../helpers/templateLiteralTag.mjs\";\n/**\n * Defines a container object for the merged cells.\n *\n * @class MergedCellsCollection\n * @plugin MergeCells\n */\n\nvar MergedCellsCollection = /*#__PURE__*/function () {\n function MergedCellsCollection(plugin) {\n _classCallCheck(this, MergedCellsCollection);\n /**\n * Reference to the Merge Cells plugin.\n *\n * @type {MergeCells}\n */\n\n\n this.plugin = plugin;\n /**\n * Array of merged cells.\n *\n * @type {Array}\n */\n\n this.mergedCells = [];\n /**\n * The Handsontable instance.\n *\n * @type {Handsontable}\n */\n\n this.hot = plugin.hot;\n }\n /**\n * Get a warning message for when the declared merged cell data overlaps already existing merged cells.\n *\n * @param {object} newMergedCell Object containg information about the merged cells that was about to be added.\n * @returns {string}\n */\n\n\n _createClass(MergedCellsCollection, [{\n key: \"get\",\n value:\n /**\n * Get a merged cell from the container, based on the provided arguments. You can provide either the \"starting coordinates\"\n * of a merged cell, or any coordinates from the body of the merged cell.\n *\n * @param {number} row Row index.\n * @param {number} column Column index.\n * @returns {MergedCellCoords|boolean} Returns a wanted merged cell on success and `false` on failure.\n */\n function get(row, column) {\n var mergedCells = this.mergedCells;\n var result = false;\n arrayEach(mergedCells, function (mergedCell) {\n if (mergedCell.row <= row && mergedCell.row + mergedCell.rowspan - 1 >= row && mergedCell.col <= column && mergedCell.col + mergedCell.colspan - 1 >= column) {\n result = mergedCell;\n return false;\n }\n\n return true;\n });\n return result;\n }\n /**\n * Get a merged cell containing the provided range.\n *\n * @param {CellRange|object} range The range to search merged cells for.\n * @returns {MergedCellCoords|boolean}\n */\n\n }, {\n key: \"getByRange\",\n value: function getByRange(range) {\n var mergedCells = this.mergedCells;\n var result = false;\n arrayEach(mergedCells, function (mergedCell) {\n if (mergedCell.row <= range.from.row && mergedCell.row + mergedCell.rowspan - 1 >= range.to.row && mergedCell.col <= range.from.col && mergedCell.col + mergedCell.colspan - 1 >= range.to.col) {\n result = mergedCell;\n return result;\n }\n\n return true;\n });\n return result;\n }\n /**\n * Get a merged cell contained in the provided range.\n *\n * @param {CellRange|object} range The range to search merged cells in.\n * @param {boolean} [countPartials=false] If set to `true`, all the merged cells overlapping the range will be taken into calculation.\n * @returns {Array|boolean} Array of found merged cells of `false` if none were found.\n */\n\n }, {\n key: \"getWithinRange\",\n value: function getWithinRange(range) {\n var countPartials = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var mergedCells = this.mergedCells;\n var foundMergedCells = [];\n var testedRange = range;\n\n if (!testedRange.includesRange) {\n var from = new CellCoords(testedRange.from.row, testedRange.from.col);\n var to = new CellCoords(testedRange.to.row, testedRange.to.col);\n testedRange = new CellRange(from, from, to);\n }\n\n arrayEach(mergedCells, function (mergedCell) {\n var mergedCellTopLeft = new CellCoords(mergedCell.row, mergedCell.col);\n var mergedCellBottomRight = new CellCoords(mergedCell.row + mergedCell.rowspan - 1, mergedCell.col + mergedCell.colspan - 1);\n var mergedCellRange = new CellRange(mergedCellTopLeft, mergedCellTopLeft, mergedCellBottomRight);\n\n if (countPartials) {\n if (testedRange.overlaps(mergedCellRange)) {\n foundMergedCells.push(mergedCell);\n }\n } else if (testedRange.includesRange(mergedCellRange)) {\n foundMergedCells.push(mergedCell);\n }\n });\n return foundMergedCells.length ? foundMergedCells : false;\n }\n /**\n * Add a merged cell to the container.\n *\n * @param {object} mergedCellInfo The merged cell information object. Has to contain `row`, `col`, `colspan` and `rowspan` properties.\n * @returns {MergedCellCoords|boolean} Returns the new merged cell on success and `false` on failure.\n */\n\n }, {\n key: \"add\",\n value: function add(mergedCellInfo) {\n var mergedCells = this.mergedCells;\n var row = mergedCellInfo.row;\n var column = mergedCellInfo.col;\n var rowspan = mergedCellInfo.rowspan;\n var colspan = mergedCellInfo.colspan;\n var newMergedCell = new MergedCellCoords(row, column, rowspan, colspan);\n var alreadyExists = this.get(row, column);\n var isOverlapping = this.isOverlapping(newMergedCell);\n\n if (!alreadyExists && !isOverlapping) {\n if (this.hot) {\n newMergedCell.normalize(this.hot);\n }\n\n mergedCells.push(newMergedCell);\n return newMergedCell;\n }\n\n warn(MergedCellsCollection.IS_OVERLAPPING_WARNING(newMergedCell));\n return false;\n }\n /**\n * Remove a merged cell from the container. You can provide either the \"starting coordinates\"\n * of a merged cell, or any coordinates from the body of the merged cell.\n *\n * @param {number} row Row index.\n * @param {number} column Column index.\n * @returns {MergedCellCoords|boolean} Returns the removed merged cell on success and `false` on failure.\n */\n\n }, {\n key: \"remove\",\n value: function remove(row, column) {\n var mergedCells = this.mergedCells;\n var wantedCollection = this.get(row, column);\n var wantedCollectionIndex = wantedCollection ? this.mergedCells.indexOf(wantedCollection) : null;\n\n if (wantedCollection && wantedCollectionIndex !== false) {\n mergedCells.splice(wantedCollectionIndex, 1);\n return wantedCollection;\n }\n\n return false;\n }\n /**\n * Clear all the merged cells.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n var _this = this;\n\n var mergedCells = this.mergedCells;\n var mergedCellParentsToClear = [];\n var hiddenCollectionElements = [];\n arrayEach(mergedCells, function (mergedCell) {\n var TD = _this.hot.getCell(mergedCell.row, mergedCell.col);\n\n if (TD) {\n mergedCellParentsToClear.push([TD, _this.get(mergedCell.row, mergedCell.col), mergedCell.row, mergedCell.col]);\n }\n });\n this.mergedCells.length = 0;\n arrayEach(mergedCellParentsToClear, function (mergedCell, i) {\n rangeEach(0, mergedCell.rowspan - 1, function (j) {\n rangeEach(0, mergedCell.colspan - 1, function (k) {\n if (k !== 0 || j !== 0) {\n var TD = _this.hot.getCell(mergedCell.row + j, mergedCell.col + k);\n\n if (TD) {\n hiddenCollectionElements.push([TD, null, null, null]);\n }\n }\n });\n });\n mergedCellParentsToClear[i][1] = null;\n });\n arrayEach(mergedCellParentsToClear, function (mergedCellParents) {\n applySpanProperties.apply(void 0, _toConsumableArray(mergedCellParents));\n });\n arrayEach(hiddenCollectionElements, function (hiddenCollectionElement) {\n applySpanProperties.apply(void 0, _toConsumableArray(hiddenCollectionElement));\n });\n }\n /**\n * Check if the provided merged cell overlaps with the others in the container.\n *\n * @param {MergedCellCoords} mergedCell The merged cell to check against all others in the container.\n * @returns {boolean} `true` if the provided merged cell overlaps with the others, `false` otherwise.\n */\n\n }, {\n key: \"isOverlapping\",\n value: function isOverlapping(mergedCell) {\n var mergedCellRange = new CellRange(new CellCoords(0, 0), new CellCoords(mergedCell.row, mergedCell.col), new CellCoords(mergedCell.row + mergedCell.rowspan - 1, mergedCell.col + mergedCell.colspan - 1));\n var result = false;\n arrayEach(this.mergedCells, function (col) {\n var currentRange = new CellRange(new CellCoords(0, 0), new CellCoords(col.row, col.col), new CellCoords(col.row + col.rowspan - 1, col.col + col.colspan - 1));\n\n if (currentRange.overlaps(mergedCellRange)) {\n result = true;\n return false;\n }\n\n return true;\n });\n return result;\n }\n /**\n * Check whether the provided row/col coordinates direct to a first not hidden cell within merge area.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isFirstRenderableMergedCell\",\n value: function isFirstRenderableMergedCell(row, column) {\n var mergeParent = this.get(row, column); // Return if row and column indexes are within merge area and if they are first rendered indexes within the area.\n\n return mergeParent && this.hot.rowIndexMapper.getFirstNotHiddenIndex(mergeParent.row, 1) === row && this.hot.columnIndexMapper.getFirstNotHiddenIndex(mergeParent.col, 1) === column;\n }\n /**\n * Get the first renderable coords of the merged cell at the provided coordinates.\n *\n * @param {number} row Visual row index.\n * @param {number} column Visual column index.\n * @returns {CellCoords} A `CellCoords` object with the coordinates to the first renderable cell within the\n * merged cell.\n */\n\n }, {\n key: \"getFirstRenderableCoords\",\n value: function getFirstRenderableCoords(row, column) {\n var mergeParent = this.get(row, column);\n\n if (!mergeParent || this.isFirstRenderableMergedCell(row, column)) {\n return new CellCoords(row, column);\n }\n\n var firstRenderableRow = this.hot.rowIndexMapper.getFirstNotHiddenIndex(mergeParent.row, 1);\n var firstRenderableColumn = this.hot.columnIndexMapper.getFirstNotHiddenIndex(mergeParent.col, 1);\n return new CellCoords(firstRenderableRow, firstRenderableColumn);\n }\n /**\n * Shift the merged cell in the direction and by an offset defined in the arguments.\n *\n * @param {string} direction `right`, `left`, `up` or `down`.\n * @param {number} index Index where the change, which caused the shifting took place.\n * @param {number} count Number of rows/columns added/removed in the preceding action.\n */\n\n }, {\n key: \"shiftCollections\",\n value: function shiftCollections(direction, index, count) {\n var _this2 = this;\n\n var shiftVector = [0, 0];\n\n switch (direction) {\n case 'right':\n shiftVector[0] += count;\n break;\n\n case 'left':\n shiftVector[0] -= count;\n break;\n\n case 'down':\n shiftVector[1] += count;\n break;\n\n case 'up':\n shiftVector[1] -= count;\n break;\n\n default:\n }\n\n arrayEach(this.mergedCells, function (currentMerge) {\n currentMerge.shift(shiftVector, index);\n });\n rangeEachReverse(this.mergedCells.length - 1, 0, function (i) {\n var currentMerge = _this2.mergedCells[i];\n\n if (currentMerge && currentMerge.removed) {\n _this2.mergedCells.splice(_this2.mergedCells.indexOf(currentMerge), 1);\n }\n });\n }\n }], [{\n key: \"IS_OVERLAPPING_WARNING\",\n value: function IS_OVERLAPPING_WARNING(newMergedCell) {\n return toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"The merged cell declared at [\", \", \", \"], overlaps \\n with the other declared merged cell. The overlapping merged cell was not added to the table, please \\n fix your setup.\"], [\"The merged cell declared at [\", \", \", \"], overlaps\\\\x20\\n with the other declared merged cell. The overlapping merged cell was not added to the table, please\\\\x20\\n fix your setup.\"])), newMergedCell.row, newMergedCell.col);\n }\n }]);\n\n return MergedCellsCollection;\n}();\n\nexport default MergedCellsCollection;","import \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\n/**\n * Apply the `colspan`/`rowspan` properties.\n *\n * @param {HTMLElement} TD The soon-to-be-modified cell.\n * @param {MergedCellCoords} mergedCellInfo The merged cell in question.\n * @param {number} row Row index.\n * @param {number} col Column index.\n */\n\nexport function applySpanProperties(TD, mergedCellInfo, row, col) {\n if (mergedCellInfo) {\n if (mergedCellInfo.row === row && mergedCellInfo.col === col) {\n TD.setAttribute('rowspan', mergedCellInfo.rowspan.toString());\n TD.setAttribute('colspan', mergedCellInfo.colspan.toString());\n } else {\n TD.removeAttribute('rowspan');\n TD.removeAttribute('colspan');\n TD.style.display = 'none';\n }\n } else {\n TD.removeAttribute('rowspan');\n TD.removeAttribute('colspan');\n TD.style.display = '';\n }\n}","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.slice.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { extend } from \"../../../helpers/object.mjs\";\nimport { CellCoords, CellRange } from \"../../../3rdparty/walkontable/src/index.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\n/**\n * Class responsible for all of the Autofill-related operations on merged cells.\n *\n * @class AutofillCalculations\n * @plugin MergeCells\n * @util\n */\n\nvar AutofillCalculations = /*#__PURE__*/function () {\n function AutofillCalculations(plugin) {\n _classCallCheck(this, AutofillCalculations);\n /**\n * Reference to the Merge Cells plugin.\n *\n * @type {MergeCells}\n */\n\n\n this.plugin = plugin;\n /**\n * Reference to the MergedCellsCollection class instance.\n *\n * @type {MergedCellsCollection}\n */\n\n this.mergedCellsCollection = this.plugin.mergedCellsCollection;\n /**\n * Cache of the currently processed autofill data.\n *\n * @private\n * @type {object}\n */\n\n this.currentFillData = null;\n }\n /**\n * Correct the provided selection area, so it's not selecting only a part of a merged cell.\n *\n * @param {Array} selectionArea The selection to correct.\n */\n\n\n _createClass(AutofillCalculations, [{\n key: \"correctSelectionAreaSize\",\n value: function correctSelectionAreaSize(selectionArea) {\n if (selectionArea[0] === selectionArea[2] && selectionArea[1] === selectionArea[3]) {\n var mergedCell = this.mergedCellsCollection.get(selectionArea[0], selectionArea[1]);\n\n if (mergedCell) {\n selectionArea[2] = selectionArea[0] + mergedCell.rowspan - 1;\n selectionArea[3] = selectionArea[1] + mergedCell.colspan - 1;\n }\n }\n }\n /**\n * Get the direction of the autofill process.\n *\n * @param {Array} selectionArea The selection area.\n * @param {Array} finalArea The final area (base + drag).\n * @returns {string} `up`, `down`, `left` or `right`.\n */\n\n }, {\n key: \"getDirection\",\n value: function getDirection(selectionArea, finalArea) {\n var direction = null;\n\n if (finalArea[0] === selectionArea[0] && finalArea[1] === selectionArea[1] && finalArea[3] === selectionArea[3]) {\n direction = 'down';\n } else if (finalArea[2] === selectionArea[2] && finalArea[1] === selectionArea[1] && finalArea[3] === selectionArea[3]) {\n direction = 'up';\n } else if (finalArea[1] === selectionArea[1] && finalArea[2] === selectionArea[2]) {\n direction = 'right';\n } else {\n direction = 'left';\n }\n\n return direction;\n }\n /**\n * Snap the drag area to the farthest merged cell, so it won't clip any of the merged cells.\n *\n * @param {Array} baseArea The base selected area.\n * @param {Array} dragArea The drag area.\n * @param {string} dragDirection The autofill drag direction.\n * @param {Array} foundMergedCells MergeCellCoords found in the base selection area.\n * @returns {Array} The new drag area.\n */\n\n }, {\n key: \"snapDragArea\",\n value: function snapDragArea(baseArea, dragArea, dragDirection, foundMergedCells) {\n var newDragArea = dragArea.slice(0);\n var fillSize = this.getAutofillSize(baseArea, dragArea, dragDirection);\n\n var _baseArea = _slicedToArray(baseArea, 4),\n baseAreaStartRow = _baseArea[0],\n baseAreaStartColumn = _baseArea[1],\n baseAreaEndRow = _baseArea[2],\n baseAreaEndColumn = _baseArea[3];\n\n var verticalDirection = ['up', 'down'].indexOf(dragDirection) > -1;\n var fullCycle = verticalDirection ? baseAreaEndRow - baseAreaStartRow + 1 : baseAreaEndColumn - baseAreaStartColumn + 1;\n var fulls = Math.floor(fillSize / fullCycle) * fullCycle;\n var partials = fillSize - fulls;\n var farthestCollection = this.getFarthestCollection(baseArea, dragArea, dragDirection, foundMergedCells);\n\n if (farthestCollection) {\n if (dragDirection === 'down') {\n var fill = farthestCollection.row + farthestCollection.rowspan - baseAreaStartRow - partials;\n var newLimit = newDragArea[2] + fill;\n\n if (newLimit >= this.plugin.hot.countRows()) {\n newDragArea[2] -= partials;\n } else {\n newDragArea[2] += partials ? fill : 0;\n }\n } else if (dragDirection === 'right') {\n var _fill = farthestCollection.col + farthestCollection.colspan - baseAreaStartColumn - partials;\n\n var _newLimit = newDragArea[3] + _fill;\n\n if (_newLimit >= this.plugin.hot.countCols()) {\n newDragArea[3] -= partials;\n } else {\n newDragArea[3] += partials ? _fill : 0;\n }\n } else if (dragDirection === 'up') {\n var _fill2 = baseAreaEndRow - partials - farthestCollection.row + 1;\n\n var _newLimit2 = newDragArea[0] + _fill2;\n\n if (_newLimit2 < 0) {\n newDragArea[0] += partials;\n } else {\n newDragArea[0] -= partials ? _fill2 : 0;\n }\n } else if (dragDirection === 'left') {\n var _fill3 = baseAreaEndColumn - partials - farthestCollection.col + 1;\n\n var _newLimit3 = newDragArea[1] + _fill3;\n\n if (_newLimit3 < 0) {\n newDragArea[1] += partials;\n } else {\n newDragArea[1] -= partials ? _fill3 : 0;\n }\n }\n }\n\n this.updateCurrentFillCache({\n baseArea: baseArea,\n dragDirection: dragDirection,\n foundMergedCells: foundMergedCells,\n fillSize: fillSize,\n dragArea: newDragArea,\n cycleLength: fullCycle\n });\n return newDragArea;\n }\n /**\n * Update the current fill cache with the provided object.\n *\n * @private\n * @param {object} updateObject The current filled object cache.\n */\n\n }, {\n key: \"updateCurrentFillCache\",\n value: function updateCurrentFillCache(updateObject) {\n if (!this.currentFillData) {\n this.currentFillData = {};\n }\n\n extend(this.currentFillData, updateObject);\n }\n /**\n * Get the \"length\" of the drag area.\n *\n * @private\n * @param {Array} baseArea The base selection area.\n * @param {Array} dragArea The drag area (containing the base area).\n * @param {string} direction The drag direction.\n * @returns {number|null} The \"length\" (height or width, depending on the direction) of the drag.\n */\n\n }, {\n key: \"getAutofillSize\",\n value: function getAutofillSize(baseArea, dragArea, direction) {\n var _baseArea2 = _slicedToArray(baseArea, 4),\n baseAreaStartRow = _baseArea2[0],\n baseAreaStartColumn = _baseArea2[1],\n baseAreaEndRow = _baseArea2[2],\n baseAreaEndColumn = _baseArea2[3];\n\n var _dragArea = _slicedToArray(dragArea, 4),\n dragAreaStartRow = _dragArea[0],\n dragAreaStartColumn = _dragArea[1],\n dragAreaEndRow = _dragArea[2],\n dragAreaEndColumn = _dragArea[3];\n\n switch (direction) {\n case 'up':\n return baseAreaStartRow - dragAreaStartRow;\n\n case 'down':\n return dragAreaEndRow - baseAreaEndRow;\n\n case 'left':\n return baseAreaStartColumn - dragAreaStartColumn;\n\n case 'right':\n return dragAreaEndColumn - baseAreaEndColumn;\n\n default:\n return null;\n }\n }\n /**\n * Trim the default drag area (containing the selection area) to the drag-only area.\n *\n * @private\n * @param {Array} baseArea The base selection area.\n * @param {Array} dragArea The base selection area extended by the drag area.\n * @param {string} direction Drag direction.\n * @returns {Array|null} Array representing the drag area coordinates.\n */\n\n }, {\n key: \"getDragArea\",\n value: function getDragArea(baseArea, dragArea, direction) {\n var _baseArea3 = _slicedToArray(baseArea, 4),\n baseAreaStartRow = _baseArea3[0],\n baseAreaStartColumn = _baseArea3[1],\n baseAreaEndRow = _baseArea3[2],\n baseAreaEndColumn = _baseArea3[3];\n\n var _dragArea2 = _slicedToArray(dragArea, 4),\n dragAreaStartRow = _dragArea2[0],\n dragAreaStartColumn = _dragArea2[1],\n dragAreaEndRow = _dragArea2[2],\n dragAreaEndColumn = _dragArea2[3];\n\n switch (direction) {\n case 'up':\n return [dragAreaStartRow, dragAreaStartColumn, baseAreaStartRow - 1, baseAreaEndColumn];\n\n case 'down':\n return [baseAreaEndRow + 1, baseAreaStartColumn, dragAreaEndRow, baseAreaEndColumn];\n\n case 'left':\n return [dragAreaStartRow, dragAreaStartColumn, baseAreaEndRow, baseAreaStartColumn - 1];\n\n case 'right':\n return [baseAreaStartRow, baseAreaEndColumn + 1, dragAreaEndRow, dragAreaEndColumn];\n\n default:\n return null;\n }\n }\n /**\n * Get the to-be-farthest merged cell in the newly filled area.\n *\n * @private\n * @param {Array} baseArea The base selection area.\n * @param {Array} dragArea The drag area (containing the base area).\n * @param {string} direction The drag direction.\n * @param {Array} mergedCellArray Array of the merged cells found in the base area.\n * @returns {MergedCellCoords|null}\n */\n\n }, {\n key: \"getFarthestCollection\",\n value: function getFarthestCollection(baseArea, dragArea, direction, mergedCellArray) {\n var _baseArea4 = _slicedToArray(baseArea, 4),\n baseAreaStartRow = _baseArea4[0],\n baseAreaStartColumn = _baseArea4[1],\n baseAreaEndRow = _baseArea4[2],\n baseAreaEndColumn = _baseArea4[3];\n\n var verticalDirection = ['up', 'down'].indexOf(direction) > -1;\n var baseEnd = verticalDirection ? baseAreaEndRow : baseAreaEndColumn;\n var baseStart = verticalDirection ? baseAreaStartRow : baseAreaStartColumn;\n var fillSize = this.getAutofillSize(baseArea, dragArea, direction);\n var fullCycle = verticalDirection ? baseAreaEndRow - baseAreaStartRow + 1 : baseAreaEndColumn - baseAreaStartColumn + 1;\n var fulls = Math.floor(fillSize / fullCycle) * fullCycle;\n var partials = fillSize - fulls;\n var inclusionFunctionName = null;\n var farthestCollection = null;\n var endOfDragRecreationIndex = null;\n\n switch (direction) {\n case 'up':\n inclusionFunctionName = 'includesVertically';\n endOfDragRecreationIndex = baseEnd - partials + 1;\n break;\n\n case 'left':\n inclusionFunctionName = 'includesHorizontally';\n endOfDragRecreationIndex = baseEnd - partials + 1;\n break;\n\n case 'down':\n inclusionFunctionName = 'includesVertically';\n endOfDragRecreationIndex = baseStart + partials - 1;\n break;\n\n case 'right':\n inclusionFunctionName = 'includesHorizontally';\n endOfDragRecreationIndex = baseStart + partials - 1;\n break;\n\n default:\n }\n\n arrayEach(mergedCellArray, function (currentCollection) {\n if (currentCollection[inclusionFunctionName](endOfDragRecreationIndex) && currentCollection.isFarther(farthestCollection, direction)) {\n farthestCollection = currentCollection;\n }\n });\n return farthestCollection;\n }\n /**\n * Recreate the merged cells after the autofill process.\n *\n * @param {Array} changes Changes made.\n */\n\n }, {\n key: \"recreateAfterDataPopulation\",\n value: function recreateAfterDataPopulation(changes) {\n if (!this.currentFillData) {\n return;\n }\n\n var fillRange = this.getRangeFromChanges(changes);\n var foundMergedCells = this.currentFillData.foundMergedCells;\n var dragDirection = this.currentFillData.dragDirection;\n\n var inBounds = function inBounds(current, offset) {\n switch (dragDirection) {\n case 'up':\n return current.row - offset >= fillRange.from.row;\n\n case 'down':\n return current.row + current.rowspan - 1 + offset <= fillRange.to.row;\n\n case 'left':\n return current.col - offset >= fillRange.from.column;\n\n case 'right':\n return current.col + current.colspan - 1 + offset <= fillRange.to.column;\n\n default:\n return null;\n }\n };\n\n var fillOffset = 0;\n var current = null;\n var multiplier = 1;\n\n do {\n for (var j = 0; j < foundMergedCells.length; j += 1) {\n current = foundMergedCells[j];\n fillOffset = multiplier * this.currentFillData.cycleLength;\n\n if (inBounds(current, fillOffset)) {\n switch (dragDirection) {\n case 'up':\n this.plugin.mergedCellsCollection.add({\n row: current.row - fillOffset,\n rowspan: current.rowspan,\n col: current.col,\n colspan: current.colspan\n });\n break;\n\n case 'down':\n this.plugin.mergedCellsCollection.add({\n row: current.row + fillOffset,\n rowspan: current.rowspan,\n col: current.col,\n colspan: current.colspan\n });\n break;\n\n case 'left':\n this.plugin.mergedCellsCollection.add({\n row: current.row,\n rowspan: current.rowspan,\n col: current.col - fillOffset,\n colspan: current.colspan\n });\n break;\n\n case 'right':\n this.plugin.mergedCellsCollection.add({\n row: current.row,\n rowspan: current.rowspan,\n col: current.col + fillOffset,\n colspan: current.colspan\n });\n break;\n\n default:\n }\n }\n\n if (j === foundMergedCells.length - 1) {\n multiplier += 1;\n }\n }\n } while (inBounds(current, fillOffset));\n\n this.currentFillData = null;\n this.plugin.hot.render();\n }\n /**\n * Get the drag range from the changes made.\n *\n * @private\n * @param {Array} changes The changes made.\n * @returns {object} Object with `from` and `to` properties, both containing `row` and `column` keys.\n */\n\n }, {\n key: \"getRangeFromChanges\",\n value: function getRangeFromChanges(changes) {\n var _this = this;\n\n var rows = {\n min: null,\n max: null\n };\n var columns = {\n min: null,\n max: null\n };\n arrayEach(changes, function (change) {\n var rowIndex = change[0];\n\n var columnIndex = _this.plugin.hot.propToCol(change[1]);\n\n if (rows.min === null || rowIndex < rows.min) {\n rows.min = rowIndex;\n }\n\n if (rows.max === null || rowIndex > rows.max) {\n rows.max = rowIndex;\n }\n\n if (columns.min === null || columnIndex < columns.min) {\n columns.min = columnIndex;\n }\n\n if (columns.max === null || columnIndex > columns.max) {\n columns.max = columnIndex;\n }\n });\n return {\n from: {\n row: rows.min,\n column: columns.min\n },\n to: {\n row: rows.max,\n column: columns.max\n }\n };\n }\n /**\n * Check if the drag area contains any merged cells.\n *\n * @param {Array} baseArea The base selection area.\n * @param {Array} fullArea The base area extended by the drag area.\n * @param {string} direction Drag direction.\n * @returns {boolean}\n */\n\n }, {\n key: \"dragAreaOverlapsCollections\",\n value: function dragAreaOverlapsCollections(baseArea, fullArea, direction) {\n var dragArea = this.getDragArea(baseArea, fullArea, direction);\n\n var _dragArea3 = _slicedToArray(dragArea, 4),\n dragAreaStartRow = _dragArea3[0],\n dragAreaStartColumn = _dragArea3[1],\n dragAreaEndRow = _dragArea3[2],\n dragAreaEndColumn = _dragArea3[3];\n\n var topLeft = new CellCoords(dragAreaStartRow, dragAreaStartColumn);\n var bottomRight = new CellCoords(dragAreaEndRow, dragAreaEndColumn);\n var dragRange = new CellRange(topLeft, topLeft, bottomRight);\n return !!this.mergedCellsCollection.getWithinRange(dragRange, true);\n }\n }]);\n\n return AutofillCalculations;\n}();\n\nexport default AutofillCalculations;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.string.includes.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { CellCoords, CellRange } from \"../../../3rdparty/walkontable/src/index.mjs\";\n/**\n * Class responsible for all of the Selection-related operations on merged cells.\n *\n * @class SelectionCalculations\n * @plugin MergeCells\n * @util\n */\n\nvar SelectionCalculations = /*#__PURE__*/function () {\n function SelectionCalculations(plugin) {\n _classCallCheck(this, SelectionCalculations);\n /**\n * Reference to the Merge Cells plugin.\n *\n * @type {MergeCells}\n */\n\n\n this.plugin = plugin;\n /**\n * Class name used for fully selected merged cells.\n *\n * @type {string}\n */\n\n this.fullySelectedMergedCellClassName = 'fullySelectedMergedCell';\n }\n /**\n * \"Snap\" the delta value according to defined merged cells. (In other words, compensate the rowspan -\n * e.g. Going up with `delta.row = -1` over a merged cell with `rowspan = 3`, `delta.row` should change to `-3`.).\n *\n * @param {object} delta The delta object containing `row` and `col` properties.\n * @param {CellRange} selectionRange The selection range.\n * @param {object} mergedCell A merged cell object.\n */\n\n\n _createClass(SelectionCalculations, [{\n key: \"snapDelta\",\n value: function snapDelta(delta, selectionRange, mergedCell) {\n var cellCoords = selectionRange.to;\n var newRow = cellCoords.row + delta.row;\n var newColumn = cellCoords.col + delta.col;\n\n if (delta.row) {\n this.jumpOverMergedCell(delta, mergedCell, newRow);\n } else if (delta.col) {\n this.jumpOverMergedCell(delta, mergedCell, newColumn);\n }\n }\n /**\n * \"Jump\" over the merged cell (compensate for the indexes within the merged cell to get past it).\n *\n * @private\n * @param {object} delta The delta object.\n * @param {MergedCellCoords} mergedCell The merge cell object.\n * @param {number} newIndex New row/column index, created with the delta.\n */\n\n }, {\n key: \"jumpOverMergedCell\",\n value: function jumpOverMergedCell(delta, mergedCell, newIndex) {\n var flatDelta = delta.row || delta.col;\n var includesIndex = null;\n var firstIndex = null;\n var lastIndex = null;\n\n if (delta.row) {\n includesIndex = mergedCell.includesVertically(newIndex);\n firstIndex = mergedCell.row;\n lastIndex = mergedCell.getLastRow();\n } else if (delta.col) {\n includesIndex = mergedCell.includesHorizontally(newIndex);\n firstIndex = mergedCell.col;\n lastIndex = mergedCell.getLastColumn();\n }\n\n if (flatDelta === 0) {\n return;\n } else if (flatDelta > 0) {\n if (includesIndex && newIndex !== firstIndex) {\n flatDelta += lastIndex - newIndex + 1;\n }\n } else if (includesIndex && newIndex !== lastIndex) {\n flatDelta -= newIndex - firstIndex + 1;\n }\n\n if (delta.row) {\n delta.row = flatDelta;\n } else if (delta.col) {\n delta.col = flatDelta;\n }\n }\n /**\n * Get a selection range with `to` property incremented by the provided delta.\n *\n * @param {CellRange} oldSelectionRange The base selection range.\n * @param {object} delta The delta object with `row` and `col` properties.\n * @returns {CellRange} A new `CellRange` object.\n */\n\n }, {\n key: \"getUpdatedSelectionRange\",\n value: function getUpdatedSelectionRange(oldSelectionRange, delta) {\n return new CellRange(oldSelectionRange.highlight, oldSelectionRange.from, new CellCoords(oldSelectionRange.to.row + delta.row, oldSelectionRange.to.col + delta.col));\n }\n /**\n * Generate an additional class name for the entirely-selected merged cells.\n *\n * @param {number} currentRow Visual row index of the currently processed cell.\n * @param {number} currentColumn Visual column index of the currently cell.\n * @param {Array} cornersOfSelection Array of the current selection in a form of `[startRow, startColumn, endRow, endColumn]`.\n * @param {number|undefined} layerLevel Number indicating which layer of selection is currently processed.\n * @returns {string|undefined} A `String`, which will act as an additional `className` to be added to the currently processed cell.\n */\n\n }, {\n key: \"getSelectedMergedCellClassName\",\n value: function getSelectedMergedCellClassName(currentRow, currentColumn, cornersOfSelection, layerLevel) {\n var startRow = Math.min(cornersOfSelection[0], cornersOfSelection[2]);\n var startColumn = Math.min(cornersOfSelection[1], cornersOfSelection[3]);\n var endRow = Math.max(cornersOfSelection[0], cornersOfSelection[2]);\n var endColumn = Math.max(cornersOfSelection[1], cornersOfSelection[3]);\n\n if (layerLevel === void 0) {\n return;\n }\n\n var isFirstRenderableMergedCell = this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(currentRow, currentColumn); // We add extra classes just to the first renderable merged cell.\n\n if (!isFirstRenderableMergedCell) {\n return;\n }\n\n var mergedCell = this.plugin.mergedCellsCollection.get(currentRow, currentColumn);\n\n if (!mergedCell) {\n return;\n }\n\n var mergeRowEnd = mergedCell.getLastRow();\n var mergeColumnEnd = mergedCell.getLastColumn();\n var fullMergeAreaWithinSelection = startRow <= mergedCell.row && startColumn <= mergedCell.col && endRow >= mergeRowEnd && endColumn >= mergeColumnEnd;\n\n if (fullMergeAreaWithinSelection) {\n return \"\".concat(this.fullySelectedMergedCellClassName, \"-\").concat(layerLevel);\n } else if (this.plugin.selectionCalculations.isMergeCellFullySelected(mergedCell, this.plugin.hot.getSelectedRange())) {\n // eslint-disable-line max-len\n return \"\".concat(this.fullySelectedMergedCellClassName, \"-multiple\");\n }\n }\n /**\n * Check if the provided merged cell is fully selected (by one or many layers of selection).\n *\n * @param {MergedCellCoords} mergedCell The merged cell to be processed.\n * @param {CellRange[]} selectionRangesArray Array of selection ranges.\n * @returns {boolean}\n */\n\n }, {\n key: \"isMergeCellFullySelected\",\n value: function isMergeCellFullySelected(mergedCell, selectionRangesArray) {\n var mergedCellIndividualCoords = [];\n\n if (!selectionRangesArray || !mergedCell) {\n return false;\n }\n\n for (var r = 0; r < mergedCell.rowspan; r += 1) {\n for (var c = 0; c < mergedCell.colspan; c += 1) {\n mergedCellIndividualCoords.push(new CellCoords(mergedCell.row + r, mergedCell.col + c));\n }\n }\n\n for (var i = 0; i < mergedCellIndividualCoords.length; i += 1) {\n var insideSelections = [];\n\n for (var s = 0; s < selectionRangesArray.length; s += 1) {\n insideSelections[s] = selectionRangesArray[s].includes(mergedCellIndividualCoords[i]);\n }\n\n if (!insideSelections.includes(true)) {\n return false;\n }\n }\n\n return true;\n }\n /**\n * Generate an array of the entirely-selected merged cells' class names.\n *\n * @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from all the cells in the table.\n */\n\n }, {\n key: \"getSelectedMergedCellClassNameToRemove\",\n value: function getSelectedMergedCellClassNameToRemove() {\n var classNames = [];\n\n for (var i = 0; i <= 7; i += 1) {\n classNames.push(\"\".concat(this.fullySelectedMergedCellClassName, \"-\").concat(i));\n }\n\n classNames.push(\"\".concat(this.fullySelectedMergedCellClassName, \"-multiple\"));\n return classNames;\n }\n }]);\n\n return SelectionCalculations;\n}();\n\nexport default SelectionCalculations;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { stopImmediatePropagation } from \"../../helpers/dom/event.mjs\";\nimport { CellCoords, CellRange } from \"../../3rdparty/walkontable/src/index.mjs\";\nimport MergedCellsCollection from \"./cellsCollection.mjs\";\nimport MergedCellCoords from \"./cellCoords.mjs\";\nimport AutofillCalculations from \"./calculations/autofill.mjs\";\nimport SelectionCalculations from \"./calculations/selection.mjs\";\nimport toggleMergeItem from \"./contextMenuItem/toggleMerge.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { isObject, clone } from \"../../helpers/object.mjs\";\nimport { warn } from \"../../helpers/console.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { applySpanProperties } from \"./utils.mjs\";\nHooks.getSingleton().register('beforeMergeCells');\nHooks.getSingleton().register('afterMergeCells');\nHooks.getSingleton().register('beforeUnmergeCells');\nHooks.getSingleton().register('afterUnmergeCells');\nexport var PLUGIN_KEY = 'mergeCells';\nexport var PLUGIN_PRIORITY = 150;\nvar privatePool = new WeakMap();\n/**\n * @plugin MergeCells\n *\n * @description\n * Plugin, which allows merging cells in the table (using the initial configuration, API or context menu).\n *\n * @example\n *\n * ```js\n * const hot = new Handsontable(document.getElementById('example'), {\n * data: getData(),\n * mergeCells: [\n * {row: 0, col: 3, rowspan: 3, colspan: 3},\n * {row: 2, col: 6, rowspan: 2, colspan: 2},\n * {row: 4, col: 8, rowspan: 3, colspan: 3}\n * ],\n * ```\n */\n\nexport var MergeCells = /*#__PURE__*/function (_BasePlugin) {\n _inherits(MergeCells, _BasePlugin);\n\n var _super = _createSuper(MergeCells);\n\n function MergeCells(hotInstance) {\n var _this;\n\n _classCallCheck(this, MergeCells);\n\n _this = _super.call(this, hotInstance);\n privatePool.set(_assertThisInitialized(_this), {\n lastDesiredCoords: null\n });\n /**\n * A container for all the merged cells.\n *\n * @private\n * @type {MergedCellsCollection}\n */\n\n _this.mergedCellsCollection = null;\n /**\n * Instance of the class responsible for all the autofill-related calculations.\n *\n * @private\n * @type {AutofillCalculations}\n */\n\n _this.autofillCalculations = null;\n /**\n * Instance of the class responsible for the selection-related calculations.\n *\n * @private\n * @type {SelectionCalculations}\n */\n\n _this.selectionCalculations = null;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link MergeCells#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(MergeCells, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.mergedCellsCollection = new MergedCellsCollection(this);\n this.autofillCalculations = new AutofillCalculations(this);\n this.selectionCalculations = new SelectionCalculations(this);\n this.addHook('afterInit', function () {\n return _this2.onAfterInit.apply(_this2, arguments);\n });\n this.addHook('beforeKeyDown', function () {\n return _this2.onBeforeKeyDown.apply(_this2, arguments);\n });\n this.addHook('modifyTransformStart', function () {\n return _this2.onModifyTransformStart.apply(_this2, arguments);\n });\n this.addHook('afterModifyTransformStart', function () {\n return _this2.onAfterModifyTransformStart.apply(_this2, arguments);\n });\n this.addHook('modifyTransformEnd', function () {\n return _this2.onModifyTransformEnd.apply(_this2, arguments);\n });\n this.addHook('modifyGetCellCoords', function () {\n return _this2.onModifyGetCellCoords.apply(_this2, arguments);\n });\n this.addHook('beforeSetRangeStart', function () {\n return _this2.onBeforeSetRangeStart.apply(_this2, arguments);\n });\n this.addHook('beforeSetRangeStartOnly', function () {\n return _this2.onBeforeSetRangeStart.apply(_this2, arguments);\n });\n this.addHook('beforeSetRangeEnd', function () {\n return _this2.onBeforeSetRangeEnd.apply(_this2, arguments);\n });\n this.addHook('afterIsMultipleSelection', function () {\n return _this2.onAfterIsMultipleSelection.apply(_this2, arguments);\n });\n this.addHook('afterRenderer', function () {\n return _this2.onAfterRenderer.apply(_this2, arguments);\n });\n this.addHook('afterContextMenuDefaultOptions', function () {\n return _this2.addMergeActionsToContextMenu.apply(_this2, arguments);\n });\n this.addHook('afterGetCellMeta', function () {\n return _this2.onAfterGetCellMeta.apply(_this2, arguments);\n });\n this.addHook('afterViewportRowCalculatorOverride', function () {\n return _this2.onAfterViewportRowCalculatorOverride.apply(_this2, arguments);\n });\n this.addHook('afterViewportColumnCalculatorOverride', function () {\n return _this2.onAfterViewportColumnCalculatorOverride.apply(_this2, arguments);\n });\n this.addHook('modifyAutofillRange', function () {\n return _this2.onModifyAutofillRange.apply(_this2, arguments);\n });\n this.addHook('afterCreateCol', function () {\n return _this2.onAfterCreateCol.apply(_this2, arguments);\n });\n this.addHook('afterRemoveCol', function () {\n return _this2.onAfterRemoveCol.apply(_this2, arguments);\n });\n this.addHook('afterCreateRow', function () {\n return _this2.onAfterCreateRow.apply(_this2, arguments);\n });\n this.addHook('afterRemoveRow', function () {\n return _this2.onAfterRemoveRow.apply(_this2, arguments);\n });\n this.addHook('afterChange', function () {\n return _this2.onAfterChange.apply(_this2, arguments);\n });\n this.addHook('beforeDrawBorders', function () {\n return _this2.onBeforeDrawAreaBorders.apply(_this2, arguments);\n });\n this.addHook('afterDrawSelection', function () {\n return _this2.onAfterDrawSelection.apply(_this2, arguments);\n });\n this.addHook('beforeRemoveCellClassNames', function () {\n return _this2.onBeforeRemoveCellClassNames.apply(_this2, arguments);\n });\n\n _get(_getPrototypeOf(MergeCells.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.clearCollections();\n this.hot.render();\n\n _get(_getPrototypeOf(MergeCells.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n var settings = this.hot.getSettings()[PLUGIN_KEY];\n this.disablePlugin();\n this.enablePlugin();\n this.generateFromSettings(settings);\n\n _get(_getPrototypeOf(MergeCells.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Validates a single setting object, represented by a single merged cell information object.\n *\n * @private\n * @param {object} setting An object with `row`, `col`, `rowspan` and `colspan` properties.\n * @returns {boolean}\n */\n\n }, {\n key: \"validateSetting\",\n value: function validateSetting(setting) {\n var valid = true;\n\n if (!setting) {\n return false;\n }\n\n if (MergedCellCoords.containsNegativeValues(setting)) {\n warn(MergedCellCoords.NEGATIVE_VALUES_WARNING(setting));\n valid = false;\n } else if (MergedCellCoords.isOutOfBounds(setting, this.hot.countRows(), this.hot.countCols())) {\n warn(MergedCellCoords.IS_OUT_OF_BOUNDS_WARNING(setting));\n valid = false;\n } else if (MergedCellCoords.isSingleCell(setting)) {\n warn(MergedCellCoords.IS_SINGLE_CELL(setting));\n valid = false;\n } else if (MergedCellCoords.containsZeroSpan(setting)) {\n warn(MergedCellCoords.ZERO_SPAN_WARNING(setting));\n valid = false;\n }\n\n return valid;\n }\n /**\n * Generates the merged cells from the settings provided to the plugin.\n *\n * @private\n * @param {Array|boolean} settings The settings provided to the plugin.\n */\n\n }, {\n key: \"generateFromSettings\",\n value: function generateFromSettings(settings) {\n var _this3 = this;\n\n if (Array.isArray(settings)) {\n var _this$hot;\n\n var populationArgumentsList = [];\n arrayEach(settings, function (setting) {\n if (!_this3.validateSetting(setting)) {\n return;\n }\n\n var highlight = new CellCoords(setting.row, setting.col);\n var rangeEnd = new CellCoords(setting.row + setting.rowspan - 1, setting.col + setting.colspan - 1);\n var mergeRange = new CellRange(highlight, highlight, rangeEnd);\n populationArgumentsList.push(_this3.mergeRange(mergeRange, true, true));\n }); // remove 'empty' setting objects, caused by improper merge range declarations\n\n populationArgumentsList = populationArgumentsList.filter(function (value) {\n return value !== true;\n });\n var bulkPopulationData = this.getBulkCollectionData(populationArgumentsList);\n\n (_this$hot = this.hot).populateFromArray.apply(_this$hot, _toConsumableArray(bulkPopulationData));\n }\n }\n /**\n * Generates a bulk set of all the data to be populated to fill the data \"under\" the added merged cells.\n *\n * @private\n * @param {Array} populationArgumentsList Array in a form of `[row, column, dataUnderCollection]`.\n * @returns {Array} Array in a form of `[row, column, dataOfAllCollections]`.\n */\n\n }, {\n key: \"getBulkCollectionData\",\n value: function getBulkCollectionData(populationArgumentsList) {\n var _this$hot2;\n\n var populationDataRange = this.getBulkCollectionDataRange(populationArgumentsList);\n\n var dataAtRange = (_this$hot2 = this.hot).getData.apply(_this$hot2, _toConsumableArray(populationDataRange));\n\n var newDataAtRange = dataAtRange.splice(0);\n arrayEach(populationArgumentsList, function (mergedCellArguments) {\n var _mergedCellArguments = _slicedToArray(mergedCellArguments, 3),\n mergedCellRowIndex = _mergedCellArguments[0],\n mergedCellColumnIndex = _mergedCellArguments[1],\n mergedCellData = _mergedCellArguments[2];\n\n arrayEach(mergedCellData, function (mergedCellRow, rowIndex) {\n arrayEach(mergedCellRow, function (mergedCellElement, columnIndex) {\n newDataAtRange[mergedCellRowIndex - populationDataRange[0] + rowIndex][mergedCellColumnIndex - populationDataRange[1] + columnIndex] = mergedCellElement; // eslint-disable-line max-len\n });\n });\n });\n return [populationDataRange[0], populationDataRange[1], newDataAtRange];\n }\n /**\n * Gets the range of combined data ranges provided in a form of an array of arrays ([row, column, dataUnderCollection]).\n *\n * @private\n * @param {Array} populationArgumentsList Array containing argument lists for the `populateFromArray` method - row, column and data for population.\n * @returns {Array[]} Start and end coordinates of the merged cell range. (in a form of [rowIndex, columnIndex]).\n */\n\n }, {\n key: \"getBulkCollectionDataRange\",\n value: function getBulkCollectionDataRange(populationArgumentsList) {\n var start = [0, 0];\n var end = [0, 0];\n var mergedCellRow = null;\n var mergedCellColumn = null;\n var mergedCellData = null;\n arrayEach(populationArgumentsList, function (mergedCellArguments) {\n mergedCellRow = mergedCellArguments[0];\n mergedCellColumn = mergedCellArguments[1];\n mergedCellData = mergedCellArguments[2];\n start[0] = Math.min(mergedCellRow, start[0]);\n start[1] = Math.min(mergedCellColumn, start[1]);\n end[0] = Math.max(mergedCellRow + mergedCellData.length - 1, end[0]);\n end[1] = Math.max(mergedCellColumn + mergedCellData[0].length - 1, end[1]);\n });\n return [].concat(start, end);\n }\n /**\n * Clears the merged cells from the merged cell container.\n */\n\n }, {\n key: \"clearCollections\",\n value: function clearCollections() {\n this.mergedCellsCollection.clear();\n }\n /**\n * Returns `true` if a range is mergeable.\n *\n * @private\n * @param {object} newMergedCellInfo Merged cell information object to test.\n * @param {boolean} [auto=false] `true` if triggered at initialization.\n * @returns {boolean}\n */\n\n }, {\n key: \"canMergeRange\",\n value: function canMergeRange(newMergedCellInfo) {\n var auto = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return auto ? true : this.validateSetting(newMergedCellInfo);\n }\n /**\n * Merge or unmerge, based on last selected range.\n *\n * @private\n */\n\n }, {\n key: \"toggleMergeOnSelection\",\n value: function toggleMergeOnSelection() {\n var currentRange = this.hot.getSelectedRangeLast();\n\n if (!currentRange) {\n return;\n }\n\n currentRange.setDirection('NW-SE');\n var from = currentRange.from,\n to = currentRange.to;\n this.toggleMerge(currentRange);\n this.hot.selectCell(from.row, from.col, to.row, to.col, false);\n }\n /**\n * Merges the selection provided as a cell range.\n *\n * @param {CellRange} [cellRange] Selection cell range.\n */\n\n }, {\n key: \"mergeSelection\",\n value: function mergeSelection() {\n var cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.getSelectedRangeLast();\n\n if (!cellRange) {\n return;\n }\n\n cellRange.setDirection('NW-SE');\n var from = cellRange.from,\n to = cellRange.to;\n this.unmergeRange(cellRange, true);\n this.mergeRange(cellRange);\n this.hot.selectCell(from.row, from.col, to.row, to.col, false);\n }\n /**\n * Unmerges the selection provided as a cell range.\n *\n * @param {CellRange} [cellRange] Selection cell range.\n */\n\n }, {\n key: \"unmergeSelection\",\n value: function unmergeSelection() {\n var cellRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hot.getSelectedRangeLast();\n\n if (!cellRange) {\n return;\n }\n\n var from = cellRange.from,\n to = cellRange.to;\n this.unmergeRange(cellRange, true);\n this.hot.selectCell(from.row, from.col, to.row, to.col, false);\n }\n /**\n * Merges cells in the provided cell range.\n *\n * @private\n * @param {CellRange} cellRange Cell range to merge.\n * @param {boolean} [auto=false] `true` if is called automatically, e.g. At initialization.\n * @param {boolean} [preventPopulation=false] `true`, if the method should not run `populateFromArray` at the end, but rather return its arguments.\n * @returns {Array|boolean} Returns an array of [row, column, dataUnderCollection] if preventPopulation is set to true. If the the merging process went successful, it returns `true`, otherwise - `false`.\n * @fires Hooks#beforeMergeCells\n * @fires Hooks#afterMergeCells\n */\n\n }, {\n key: \"mergeRange\",\n value: function mergeRange(cellRange) {\n var _this4 = this;\n\n var auto = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var preventPopulation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var topLeft = cellRange.getTopLeftCorner();\n var bottomRight = cellRange.getBottomRightCorner();\n var mergeParent = {\n row: topLeft.row,\n col: topLeft.col,\n rowspan: bottomRight.row - topLeft.row + 1,\n colspan: bottomRight.col - topLeft.col + 1\n };\n var clearedData = [];\n var populationInfo = null;\n\n if (!this.canMergeRange(mergeParent, auto)) {\n return false;\n }\n\n this.hot.runHooks('beforeMergeCells', cellRange, auto);\n rangeEach(0, mergeParent.rowspan - 1, function (i) {\n rangeEach(0, mergeParent.colspan - 1, function (j) {\n var clearedValue = null;\n\n if (!clearedData[i]) {\n clearedData[i] = [];\n }\n\n if (i === 0 && j === 0) {\n clearedValue = _this4.hot.getDataAtCell(mergeParent.row, mergeParent.col);\n } else {\n _this4.hot.setCellMeta(mergeParent.row + i, mergeParent.col + j, 'hidden', true);\n }\n\n clearedData[i][j] = clearedValue;\n });\n });\n this.hot.setCellMeta(mergeParent.row, mergeParent.col, 'spanned', true);\n var mergedCellAdded = this.mergedCellsCollection.add(mergeParent);\n\n if (mergedCellAdded) {\n if (preventPopulation) {\n populationInfo = [mergeParent.row, mergeParent.col, clearedData];\n } else {\n this.hot.populateFromArray(mergeParent.row, mergeParent.col, clearedData, void 0, void 0, this.pluginName);\n }\n\n this.hot.runHooks('afterMergeCells', cellRange, mergeParent, auto);\n return populationInfo;\n }\n\n return true;\n }\n /**\n * Unmerges the selection provided as a cell range. If no cell range is provided, it uses the current selection.\n *\n * @private\n * @param {CellRange} cellRange Selection cell range.\n * @param {boolean} [auto=false] `true` if called automatically by the plugin.\n *\n * @fires Hooks#beforeUnmergeCells\n * @fires Hooks#afterUnmergeCells\n */\n\n }, {\n key: \"unmergeRange\",\n value: function unmergeRange(cellRange) {\n var _this5 = this;\n\n var auto = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var mergedCells = this.mergedCellsCollection.getWithinRange(cellRange);\n\n if (!mergedCells) {\n return;\n }\n\n this.hot.runHooks('beforeUnmergeCells', cellRange, auto);\n arrayEach(mergedCells, function (currentCollection) {\n _this5.mergedCellsCollection.remove(currentCollection.row, currentCollection.col);\n\n rangeEach(0, currentCollection.rowspan - 1, function (i) {\n rangeEach(0, currentCollection.colspan - 1, function (j) {\n _this5.hot.removeCellMeta(currentCollection.row + i, currentCollection.col + j, 'hidden');\n });\n });\n\n _this5.hot.removeCellMeta(currentCollection.row, currentCollection.col, 'spanned');\n });\n this.hot.runHooks('afterUnmergeCells', cellRange, auto);\n this.hot.render();\n }\n /**\n * Merges or unmerges, based on the cell range provided as `cellRange`.\n *\n * @private\n * @param {CellRange} cellRange The cell range to merge or unmerged.\n */\n\n }, {\n key: \"toggleMerge\",\n value: function toggleMerge(cellRange) {\n var mergedCell = this.mergedCellsCollection.get(cellRange.from.row, cellRange.from.col);\n var mergedCellCoversWholeRange = mergedCell.row === cellRange.from.row && mergedCell.col === cellRange.from.col && mergedCell.row + mergedCell.rowspan - 1 === cellRange.to.row && mergedCell.col + mergedCell.colspan - 1 === cellRange.to.col;\n\n if (mergedCellCoversWholeRange) {\n this.unmergeRange(cellRange);\n } else {\n this.mergeSelection(cellRange);\n }\n }\n /**\n * Merges the specified range.\n *\n * @param {number} startRow Start row of the merged cell.\n * @param {number} startColumn Start column of the merged cell.\n * @param {number} endRow End row of the merged cell.\n * @param {number} endColumn End column of the merged cell.\n * @fires Hooks#beforeMergeCells\n * @fires Hooks#afterMergeCells\n */\n\n }, {\n key: \"merge\",\n value: function merge(startRow, startColumn, endRow, endColumn) {\n var start = new CellCoords(startRow, startColumn);\n var end = new CellCoords(endRow, endColumn);\n this.mergeRange(new CellRange(start, start, end));\n }\n /**\n * Unmerges the merged cell in the provided range.\n *\n * @param {number} startRow Start row of the merged cell.\n * @param {number} startColumn Start column of the merged cell.\n * @param {number} endRow End row of the merged cell.\n * @param {number} endColumn End column of the merged cell.\n * @fires Hooks#beforeUnmergeCells\n * @fires Hooks#afterUnmergeCells\n */\n\n }, {\n key: \"unmerge\",\n value: function unmerge(startRow, startColumn, endRow, endColumn) {\n var start = new CellCoords(startRow, startColumn);\n var end = new CellCoords(endRow, endColumn);\n this.unmergeRange(new CellRange(start, start, end));\n }\n /**\n * `afterInit` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onAfterInit\",\n value: function onAfterInit() {\n this.generateFromSettings(this.hot.getSettings()[PLUGIN_KEY]);\n this.hot.render();\n }\n /**\n * `beforeKeyDown` hook callback.\n *\n * @private\n * @param {KeyboardEvent} event The `keydown` event object.\n */\n\n }, {\n key: \"onBeforeKeyDown\",\n value: function onBeforeKeyDown(event) {\n var ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;\n\n if (ctrlDown && event.keyCode === 77) {\n // CTRL + M\n this.toggleMerge(this.hot.getSelectedRangeLast());\n this.hot.render();\n stopImmediatePropagation(event);\n }\n }\n /**\n * Modifies the information on whether the current selection contains multiple cells. The `afterIsMultipleSelection` hook callback.\n *\n * @private\n * @param {boolean} isMultiple Determines whether the current selection contains multiple cells.\n * @returns {boolean}\n */\n\n }, {\n key: \"onAfterIsMultipleSelection\",\n value: function onAfterIsMultipleSelection(isMultiple) {\n if (isMultiple) {\n var mergedCells = this.mergedCellsCollection.mergedCells;\n var selectionRange = this.hot.getSelectedRangeLast();\n\n for (var group = 0; group < mergedCells.length; group += 1) {\n if (selectionRange.from.row === mergedCells[group].row && selectionRange.from.col === mergedCells[group].col && selectionRange.to.row === mergedCells[group].row + mergedCells[group].rowspan - 1 && selectionRange.to.col === mergedCells[group].col + mergedCells[group].colspan - 1) {\n return false;\n }\n }\n }\n\n return isMultiple;\n }\n /**\n * `modifyTransformStart` hook callback.\n *\n * @private\n * @param {object} delta The transformation delta.\n */\n\n }, {\n key: \"onModifyTransformStart\",\n value: function onModifyTransformStart(delta) {\n var priv = privatePool.get(this);\n var currentlySelectedRange = this.hot.getSelectedRangeLast();\n var newDelta = {\n row: delta.row,\n col: delta.col\n };\n var nextPosition = null;\n var currentPosition = new CellCoords(currentlySelectedRange.highlight.row, currentlySelectedRange.highlight.col);\n var mergedParent = this.mergedCellsCollection.get(currentPosition.row, currentPosition.col);\n\n if (!priv.lastDesiredCoords) {\n priv.lastDesiredCoords = new CellCoords(null, null);\n }\n\n if (mergedParent) {\n // only merge selected\n var mergeTopLeft = new CellCoords(mergedParent.row, mergedParent.col);\n var mergeBottomRight = new CellCoords(mergedParent.row + mergedParent.rowspan - 1, mergedParent.col + mergedParent.colspan - 1);\n var mergeRange = new CellRange(mergeTopLeft, mergeTopLeft, mergeBottomRight);\n\n if (!mergeRange.includes(priv.lastDesiredCoords)) {\n priv.lastDesiredCoords = new CellCoords(null, null); // reset outdated version of lastDesiredCoords\n }\n\n newDelta.row = priv.lastDesiredCoords.row ? priv.lastDesiredCoords.row - currentPosition.row : newDelta.row;\n newDelta.col = priv.lastDesiredCoords.col ? priv.lastDesiredCoords.col - currentPosition.col : newDelta.col;\n\n if (delta.row > 0) {\n // moving down\n newDelta.row = mergedParent.row + mergedParent.rowspan - 1 - currentPosition.row + delta.row;\n } else if (delta.row < 0) {\n // moving up\n newDelta.row = currentPosition.row - mergedParent.row + delta.row;\n }\n\n if (delta.col > 0) {\n // moving right\n newDelta.col = mergedParent.col + mergedParent.colspan - 1 - currentPosition.col + delta.col;\n } else if (delta.col < 0) {\n // moving left\n newDelta.col = currentPosition.col - mergedParent.col + delta.col;\n }\n }\n\n nextPosition = new CellCoords(currentlySelectedRange.highlight.row + newDelta.row, currentlySelectedRange.highlight.col + newDelta.col);\n var nextPositionMergedCell = this.mergedCellsCollection.get(nextPosition.row, nextPosition.col);\n\n if (nextPositionMergedCell) {\n // skipping the invisible cells in the merge range\n var firstRenderableCoords = this.mergedCellsCollection.getFirstRenderableCoords(nextPositionMergedCell.row, nextPositionMergedCell.col);\n priv.lastDesiredCoords = nextPosition;\n newDelta = {\n row: firstRenderableCoords.row - currentPosition.row,\n col: firstRenderableCoords.col - currentPosition.col\n };\n }\n\n if (newDelta.row !== 0) {\n delta.row = newDelta.row;\n }\n\n if (newDelta.col !== 0) {\n delta.col = newDelta.col;\n }\n }\n /**\n * `modifyTransformEnd` hook callback. Needed to handle \"jumping over\" merged merged cells, while selecting.\n *\n * @private\n * @param {object} delta The transformation delta.\n */\n\n }, {\n key: \"onModifyTransformEnd\",\n value: function onModifyTransformEnd(delta) {\n var _this6 = this;\n\n var currentSelectionRange = this.hot.getSelectedRangeLast();\n var newDelta = clone(delta);\n var newSelectionRange = this.selectionCalculations.getUpdatedSelectionRange(currentSelectionRange, delta);\n var tempDelta = clone(newDelta);\n var mergedCellsWithinRange = this.mergedCellsCollection.getWithinRange(newSelectionRange, true);\n\n do {\n tempDelta = clone(newDelta);\n this.selectionCalculations.getUpdatedSelectionRange(currentSelectionRange, newDelta);\n arrayEach(mergedCellsWithinRange, function (mergedCell) {\n _this6.selectionCalculations.snapDelta(newDelta, currentSelectionRange, mergedCell);\n });\n } while (newDelta.row !== tempDelta.row || newDelta.col !== tempDelta.col);\n\n delta.row = newDelta.row;\n delta.col = newDelta.col;\n }\n /**\n * `modifyGetCellCoords` hook callback. Swaps the `getCell` coords with the merged parent coords.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} column Visual column index.\n * @returns {Array|undefined} Visual coordinates of the merge.\n */\n\n }, {\n key: \"onModifyGetCellCoords\",\n value: function onModifyGetCellCoords(row, column) {\n if (row < 0 || column < 0) {\n return;\n }\n\n var mergeParent = this.mergedCellsCollection.get(row, column);\n\n if (!mergeParent) {\n return;\n }\n\n var mergeRow = mergeParent.row,\n mergeColumn = mergeParent.col,\n colspan = mergeParent.colspan,\n rowspan = mergeParent.rowspan;\n return [// Most top-left merged cell coords.\n mergeRow, mergeColumn, // Most bottom-right merged cell coords.\n mergeRow + rowspan - 1, mergeColumn + colspan - 1];\n }\n /**\n * `afterContextMenuDefaultOptions` hook callback.\n *\n * @private\n * @param {object} defaultOptions The default context menu options.\n */\n\n }, {\n key: \"addMergeActionsToContextMenu\",\n value: function addMergeActionsToContextMenu(defaultOptions) {\n defaultOptions.items.push({\n name: '---------'\n }, toggleMergeItem(this));\n }\n /**\n * `afterRenderer` hook callback.\n *\n * @private\n * @param {HTMLElement} TD The cell to be modified.\n * @param {number} row Row index.\n * @param {number} col Visual column index.\n */\n\n }, {\n key: \"onAfterRenderer\",\n value: function onAfterRenderer(TD, row, col) {\n var mergedCell = this.mergedCellsCollection.get(row, col); // We shouldn't override data in the collection.\n\n var mergedCellCopy = isObject(mergedCell) ? clone(mergedCell) : void 0;\n\n if (isObject(mergedCellCopy)) {\n var _this$hot3 = this.hot,\n rowMapper = _this$hot3.rowIndexMapper,\n columnMapper = _this$hot3.columnIndexMapper;\n var mergeRow = mergedCellCopy.row,\n mergeColumn = mergedCellCopy.col,\n colspan = mergedCellCopy.colspan,\n rowspan = mergedCellCopy.rowspan;\n\n var _this$translateMerged = this.translateMergedCellToRenderable(mergeRow, rowspan, mergeColumn, colspan),\n _this$translateMerged2 = _slicedToArray(_this$translateMerged, 2),\n lastMergedRowIndex = _this$translateMerged2[0],\n lastMergedColumnIndex = _this$translateMerged2[1];\n\n var renderedRowIndex = rowMapper.getRenderableFromVisualIndex(row);\n var renderedColumnIndex = columnMapper.getRenderableFromVisualIndex(col);\n var maxRowSpan = lastMergedRowIndex - renderedRowIndex + 1; // Number of rendered columns.\n\n var maxColSpan = lastMergedColumnIndex - renderedColumnIndex + 1; // Number of rendered columns.\n // We just try to determine some values basing on the actual number of rendered indexes (some columns may be hidden).\n\n mergedCellCopy.row = rowMapper.getFirstNotHiddenIndex(mergedCellCopy.row, 1); // We just try to determine some values basing on the actual number of rendered indexes (some columns may be hidden).\n\n mergedCellCopy.col = columnMapper.getFirstNotHiddenIndex(mergedCellCopy.col, 1); // The `rowSpan` property for a `TD` element should be at most equal to number of rendered rows in the merge area.\n\n mergedCellCopy.rowspan = Math.min(mergedCellCopy.rowspan, maxRowSpan); // The `colSpan` property for a `TD` element should be at most equal to number of rendered columns in the merge area.\n\n mergedCellCopy.colspan = Math.min(mergedCellCopy.colspan, maxColSpan);\n }\n\n applySpanProperties(TD, mergedCellCopy, row, col);\n }\n /**\n * `beforeSetRangeStart` and `beforeSetRangeStartOnly` hook callback.\n * A selection within merge area should be rewritten to the start of merge area.\n *\n * @private\n * @param {object} coords Cell coords.\n */\n\n }, {\n key: \"onBeforeSetRangeStart\",\n value: function onBeforeSetRangeStart(coords) {\n // TODO: It is a workaround, but probably this hook may be needed. Every selection on the merge area\n // could set start point of the selection to the start of the merge area. However, logic inside `expandByRange` need\n // an initial start point. Click on the merge cell when there are some hidden indexes break the logic in some cases.\n // Please take a look at #7010 for more information. I'm not sure if selection directions are calculated properly\n // and what was idea for flipping direction inside `expandByRange` method.\n if (this.mergedCellsCollection.isFirstRenderableMergedCell(coords.row, coords.col)) {\n var mergeParent = this.mergedCellsCollection.get(coords.row, coords.col);\n var _ref = [mergeParent.row, mergeParent.col];\n coords.row = _ref[0];\n coords.col = _ref[1];\n }\n }\n /**\n * `beforeSetRangeEnd` hook callback.\n * While selecting cells with keyboard or mouse, make sure that rectangular area is expanded to the extent of the merged cell.\n *\n * Note: Please keep in mind that callback may modify both start and end range coordinates by the reference.\n *\n * @private\n * @param {object} coords Cell coords.\n */\n\n }, {\n key: \"onBeforeSetRangeEnd\",\n value: function onBeforeSetRangeEnd(coords) {\n var selRange = this.hot.getSelectedRangeLast();\n selRange.highlight = new CellCoords(selRange.highlight.row, selRange.highlight.col); // clone in case we will modify its reference\n\n selRange.to = coords;\n var rangeExpanded = false;\n\n if (this.hot.selection.isSelectedByColumnHeader() || this.hot.selection.isSelectedByRowHeader()) {\n return;\n }\n\n do {\n rangeExpanded = false;\n\n for (var i = 0; i < this.mergedCellsCollection.mergedCells.length; i += 1) {\n var cellInfo = this.mergedCellsCollection.mergedCells[i];\n var mergedCellRange = cellInfo.getRange();\n\n if (selRange.expandByRange(mergedCellRange)) {\n coords.row = selRange.to.row;\n coords.col = selRange.to.col;\n rangeExpanded = true;\n }\n }\n } while (rangeExpanded);\n }\n /**\n * The `afterGetCellMeta` hook callback.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} col Column index.\n * @param {object} cellProperties The cell properties object.\n */\n\n }, {\n key: \"onAfterGetCellMeta\",\n value: function onAfterGetCellMeta(row, col, cellProperties) {\n var mergeParent = this.mergedCellsCollection.get(row, col);\n\n if (mergeParent) {\n if (mergeParent.row !== row || mergeParent.col !== col) {\n cellProperties.copyable = false;\n } else {\n cellProperties.rowspan = mergeParent.rowspan;\n cellProperties.colspan = mergeParent.colspan;\n }\n }\n }\n /**\n * `afterViewportRowCalculatorOverride` hook callback.\n *\n * @private\n * @param {object} calc The row calculator object.\n */\n\n }, {\n key: \"onAfterViewportRowCalculatorOverride\",\n value: function onAfterViewportRowCalculatorOverride(calc) {\n var nrOfColumns = this.hot.countCols();\n this.modifyViewportRowStart(calc, nrOfColumns);\n this.modifyViewportRowEnd(calc, nrOfColumns);\n }\n /**\n * Modify viewport start when needed. We extend viewport when merged cells aren't fully visible.\n *\n * @private\n * @param {object} calc The row calculator object.\n * @param {number} nrOfColumns Number of visual columns.\n */\n\n }, {\n key: \"modifyViewportRowStart\",\n value: function modifyViewportRowStart(calc, nrOfColumns) {\n var rowMapper = this.hot.rowIndexMapper;\n var visualStartRow = rowMapper.getVisualFromRenderableIndex(calc.startRow);\n\n for (var visualColumnIndex = 0; visualColumnIndex < nrOfColumns; visualColumnIndex += 1) {\n var mergeParentForViewportStart = this.mergedCellsCollection.get(visualStartRow, visualColumnIndex);\n\n if (isObject(mergeParentForViewportStart)) {\n var renderableIndexAtMergeStart = rowMapper.getRenderableFromVisualIndex(rowMapper.getFirstNotHiddenIndex(mergeParentForViewportStart.row, 1)); // Merge start is out of the viewport (i.e. when we scrolled to the bottom and we can see just part of a merge).\n\n if (renderableIndexAtMergeStart < calc.startRow) {\n // We extend viewport when some rows have been merged.\n calc.startRow = renderableIndexAtMergeStart; // We are looking for next merges inside already extended viewport (starting again from row equal to 0).\n\n this.modifyViewportRowStart(calc, nrOfColumns); // recursively search upwards\n\n return; // Finish the current loop. Everything will be checked from the beginning by above recursion.\n }\n }\n }\n }\n /**\n * Modify viewport end when needed. We extend viewport when merged cells aren't fully visible.\n *\n * @private\n * @param {object} calc The row calculator object.\n * @param {number} nrOfColumns Number of visual columns.\n */\n\n }, {\n key: \"modifyViewportRowEnd\",\n value: function modifyViewportRowEnd(calc, nrOfColumns) {\n var rowMapper = this.hot.rowIndexMapper;\n var visualEndRow = rowMapper.getVisualFromRenderableIndex(calc.endRow);\n\n for (var visualColumnIndex = 0; visualColumnIndex < nrOfColumns; visualColumnIndex += 1) {\n var mergeParentForViewportEnd = this.mergedCellsCollection.get(visualEndRow, visualColumnIndex);\n\n if (isObject(mergeParentForViewportEnd)) {\n var mergeEnd = mergeParentForViewportEnd.row + mergeParentForViewportEnd.rowspan - 1;\n var renderableIndexAtMergeEnd = rowMapper.getRenderableFromVisualIndex(rowMapper.getFirstNotHiddenIndex(mergeEnd, -1)); // Merge end is out of the viewport.\n\n if (renderableIndexAtMergeEnd > calc.endRow) {\n // We extend the viewport when some rows have been merged.\n calc.endRow = renderableIndexAtMergeEnd; // We are looking for next merges inside already extended viewport (starting again from row equal to 0).\n\n this.modifyViewportRowEnd(calc, nrOfColumns); // recursively search upwards\n\n return; // Finish the current loop. Everything will be checked from the beginning by above recursion.\n }\n }\n }\n }\n /**\n * `afterViewportColumnCalculatorOverride` hook callback.\n *\n * @private\n * @param {object} calc The column calculator object.\n */\n\n }, {\n key: \"onAfterViewportColumnCalculatorOverride\",\n value: function onAfterViewportColumnCalculatorOverride(calc) {\n var nrOfRows = this.hot.countRows();\n this.modifyViewportColumnStart(calc, nrOfRows);\n this.modifyViewportColumnEnd(calc, nrOfRows);\n }\n /**\n * Modify viewport start when needed. We extend viewport when merged cells aren't fully visible.\n *\n * @private\n * @param {object} calc The column calculator object.\n * @param {number} nrOfRows Number of visual rows.\n */\n\n }, {\n key: \"modifyViewportColumnStart\",\n value: function modifyViewportColumnStart(calc, nrOfRows) {\n var columnMapper = this.hot.columnIndexMapper;\n var visualStartCol = columnMapper.getVisualFromRenderableIndex(calc.startColumn);\n\n for (var visualRowIndex = 0; visualRowIndex < nrOfRows; visualRowIndex += 1) {\n var mergeParentForViewportStart = this.mergedCellsCollection.get(visualRowIndex, visualStartCol);\n\n if (isObject(mergeParentForViewportStart)) {\n var renderableIndexAtMergeStart = columnMapper.getRenderableFromVisualIndex(columnMapper.getFirstNotHiddenIndex(mergeParentForViewportStart.col, 1)); // Merge start is out of the viewport (i.e. when we scrolled to the right and we can see just part of a merge).\n\n if (renderableIndexAtMergeStart < calc.startColumn) {\n // We extend viewport when some columns have been merged.\n calc.startColumn = renderableIndexAtMergeStart; // We are looking for next merges inside already extended viewport (starting again from column equal to 0).\n\n this.modifyViewportColumnStart(calc, nrOfRows); // recursively search upwards\n\n return; // Finish the current loop. Everything will be checked from the beginning by above recursion.\n }\n }\n }\n }\n /**\n * Modify viewport end when needed. We extend viewport when merged cells aren't fully visible.\n *\n * @private\n * @param {object} calc The column calculator object.\n * @param {number} nrOfRows Number of visual rows.\n */\n\n }, {\n key: \"modifyViewportColumnEnd\",\n value: function modifyViewportColumnEnd(calc, nrOfRows) {\n var columnMapper = this.hot.columnIndexMapper;\n var visualEndCol = columnMapper.getVisualFromRenderableIndex(calc.endColumn);\n\n for (var visualRowIndex = 0; visualRowIndex < nrOfRows; visualRowIndex += 1) {\n var mergeParentForViewportEnd = this.mergedCellsCollection.get(visualRowIndex, visualEndCol);\n\n if (isObject(mergeParentForViewportEnd)) {\n var mergeEnd = mergeParentForViewportEnd.col + mergeParentForViewportEnd.colspan - 1;\n var renderableIndexAtMergeEnd = columnMapper.getRenderableFromVisualIndex(columnMapper.getFirstNotHiddenIndex(mergeEnd, -1)); // Merge end is out of the viewport.\n\n if (renderableIndexAtMergeEnd > calc.endColumn) {\n // We extend the viewport when some columns have been merged.\n calc.endColumn = renderableIndexAtMergeEnd; // We are looking for next merges inside already extended viewport (starting again from column equal to 0).\n\n this.modifyViewportColumnEnd(calc, nrOfRows); // recursively search upwards\n\n return; // Finish the current loop. Everything will be checked from the beginning by above recursion.\n }\n }\n }\n }\n /**\n * Translates merged cell coordinates to renderable indexes.\n *\n * @private\n * @param {number} parentRow Visual row index.\n * @param {number} rowspan Rowspan which describes shift which will be applied to parent row\n * to calculate renderable index which points to the most bottom\n * index position. Pass rowspan as `0` to calculate the most top\n * index position.\n * @param {number} parentColumn Visual column index.\n * @param {number} colspan Colspan which describes shift which will be applied to parent column\n * to calculate renderable index which points to the most right\n * index position. Pass colspan as `0` to calculate the most left\n * index position.\n * @returns {number[]}\n */\n\n }, {\n key: \"translateMergedCellToRenderable\",\n value: function translateMergedCellToRenderable(parentRow, rowspan, parentColumn, colspan) {\n var _this$hot4 = this.hot,\n rowMapper = _this$hot4.rowIndexMapper,\n columnMapper = _this$hot4.columnIndexMapper;\n var firstNonHiddenRow;\n var firstNonHiddenColumn;\n\n if (rowspan === 0) {\n firstNonHiddenRow = rowMapper.getFirstNotHiddenIndex(parentRow, 1);\n } else {\n firstNonHiddenRow = rowMapper.getFirstNotHiddenIndex(parentRow + rowspan - 1, -1);\n }\n\n if (colspan === 0) {\n firstNonHiddenColumn = columnMapper.getFirstNotHiddenIndex(parentColumn, 1);\n } else {\n firstNonHiddenColumn = columnMapper.getFirstNotHiddenIndex(parentColumn + colspan - 1, -1);\n }\n\n var renderableRow = parentRow >= 0 ? rowMapper.getRenderableFromVisualIndex(firstNonHiddenRow) : parentRow;\n var renderableColumn = parentColumn >= 0 ? columnMapper.getRenderableFromVisualIndex(firstNonHiddenColumn) : parentColumn;\n return [renderableRow, renderableColumn];\n }\n /**\n * The `modifyAutofillRange` hook callback.\n *\n * @private\n * @param {Array} drag The drag area coordinates.\n * @param {Array} select The selection information.\n * @returns {Array} The new drag area.\n */\n\n }, {\n key: \"onModifyAutofillRange\",\n value: function onModifyAutofillRange(drag, select) {\n this.autofillCalculations.correctSelectionAreaSize(select);\n var dragDirection = this.autofillCalculations.getDirection(select, drag);\n var dragArea = drag;\n\n if (this.autofillCalculations.dragAreaOverlapsCollections(select, dragArea, dragDirection)) {\n dragArea = select;\n return dragArea;\n }\n\n var mergedCellsWithinSelectionArea = this.mergedCellsCollection.getWithinRange({\n from: {\n row: select[0],\n col: select[1]\n },\n to: {\n row: select[2],\n col: select[3]\n }\n });\n\n if (!mergedCellsWithinSelectionArea) {\n return dragArea;\n }\n\n dragArea = this.autofillCalculations.snapDragArea(select, dragArea, dragDirection, mergedCellsWithinSelectionArea);\n return dragArea;\n }\n /**\n * `afterCreateCol` hook callback.\n *\n * @private\n * @param {number} column Column index.\n * @param {number} count Number of created columns.\n */\n\n }, {\n key: \"onAfterCreateCol\",\n value: function onAfterCreateCol(column, count) {\n this.mergedCellsCollection.shiftCollections('right', column, count);\n }\n /**\n * `afterRemoveCol` hook callback.\n *\n * @private\n * @param {number} column Column index.\n * @param {number} count Number of removed columns.\n */\n\n }, {\n key: \"onAfterRemoveCol\",\n value: function onAfterRemoveCol(column, count) {\n this.mergedCellsCollection.shiftCollections('left', column, count);\n }\n /**\n * `afterCreateRow` hook callback.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} count Number of created rows.\n * @param {string} source Source of change.\n */\n\n }, {\n key: \"onAfterCreateRow\",\n value: function onAfterCreateRow(row, count, source) {\n if (source === 'auto') {\n return;\n }\n\n this.mergedCellsCollection.shiftCollections('down', row, count);\n }\n /**\n * `afterRemoveRow` hook callback.\n *\n * @private\n * @param {number} row Row index.\n * @param {number} count Number of removed rows.\n */\n\n }, {\n key: \"onAfterRemoveRow\",\n value: function onAfterRemoveRow(row, count) {\n this.mergedCellsCollection.shiftCollections('up', row, count);\n }\n /**\n * `afterChange` hook callback. Used to propagate merged cells after using Autofill.\n *\n * @private\n * @param {Array} changes The changes array.\n * @param {string} source Determines the source of the change.\n */\n\n }, {\n key: \"onAfterChange\",\n value: function onAfterChange(changes, source) {\n if (source !== 'Autofill.fill') {\n return;\n }\n\n this.autofillCalculations.recreateAfterDataPopulation(changes);\n }\n /**\n * `beforeDrawAreaBorders` hook callback.\n *\n * @private\n * @param {Array} corners Visual coordinates of the area corners.\n * @param {string} className Class name for the area.\n */\n\n }, {\n key: \"onBeforeDrawAreaBorders\",\n value: function onBeforeDrawAreaBorders(corners, className) {\n if (className && className === 'area') {\n var selectedRange = this.hot.getSelectedRangeLast();\n var mergedCellsWithinRange = this.mergedCellsCollection.getWithinRange(selectedRange);\n arrayEach(mergedCellsWithinRange, function (mergedCell) {\n if (selectedRange.getBottomRightCorner().row === mergedCell.getLastRow() && selectedRange.getBottomRightCorner().col === mergedCell.getLastColumn()) {\n corners[2] = mergedCell.row;\n corners[3] = mergedCell.col;\n }\n });\n }\n }\n /**\n * `afterModifyTransformStart` hook callback. Fixes a problem with navigating through merged cells at the edges of the table\n * with the ENTER/SHIFT+ENTER/TAB/SHIFT+TAB keys.\n *\n * @private\n * @param {CellCoords} coords Coordinates of the to-be-selected cell.\n * @param {number} rowTransformDir Row transformation direction (negative value = up, 0 = none, positive value = down).\n * @param {number} colTransformDir Column transformation direction (negative value = up, 0 = none, positive value = down).\n */\n\n }, {\n key: \"onAfterModifyTransformStart\",\n value: function onAfterModifyTransformStart(coords, rowTransformDir, colTransformDir) {\n if (!this.enabled) {\n return;\n }\n\n var mergedCellAtCoords = this.mergedCellsCollection.get(coords.row, coords.col);\n\n if (!mergedCellAtCoords) {\n return;\n }\n\n var goingDown = rowTransformDir > 0;\n var goingUp = rowTransformDir < 0;\n var goingLeft = colTransformDir < 0;\n var goingRight = colTransformDir > 0;\n var mergedCellOnBottomEdge = mergedCellAtCoords.row + mergedCellAtCoords.rowspan - 1 === this.hot.countRows() - 1;\n var mergedCellOnTopEdge = mergedCellAtCoords.row === 0;\n var mergedCellOnRightEdge = mergedCellAtCoords.col + mergedCellAtCoords.colspan - 1 === this.hot.countCols() - 1;\n var mergedCellOnLeftEdge = mergedCellAtCoords.col === 0;\n\n if (goingDown && mergedCellOnBottomEdge || goingUp && mergedCellOnTopEdge || goingRight && mergedCellOnRightEdge || goingLeft && mergedCellOnLeftEdge) {\n coords.row = mergedCellAtCoords.row;\n coords.col = mergedCellAtCoords.col;\n }\n }\n /**\n * `afterDrawSelection` hook callback. Used to add the additional class name for the entirely-selected merged cells.\n *\n * @private\n * @param {number} currentRow Visual row index of the currently processed cell.\n * @param {number} currentColumn Visual column index of the currently cell.\n * @param {Array} cornersOfSelection Array of the current selection in a form of `[startRow, startColumn, endRow, endColumn]`.\n * @param {number|undefined} layerLevel Number indicating which layer of selection is currently processed.\n * @returns {string|undefined} A `String`, which will act as an additional `className` to be added to the currently processed cell.\n */\n\n }, {\n key: \"onAfterDrawSelection\",\n value: function onAfterDrawSelection(currentRow, currentColumn, cornersOfSelection, layerLevel) {\n // Nothing's selected (hook might be triggered by the custom borders)\n if (!cornersOfSelection) {\n return;\n }\n\n return this.selectionCalculations.getSelectedMergedCellClassName(currentRow, currentColumn, cornersOfSelection, layerLevel);\n }\n /**\n * `beforeRemoveCellClassNames` hook callback. Used to remove additional class name from all cells in the table.\n *\n * @private\n * @returns {string[]} An `Array` of `String`s. Each of these strings will act like class names to be removed from all the cells in the table.\n */\n\n }, {\n key: \"onBeforeRemoveCellClassNames\",\n value: function onBeforeRemoveCellClassNames() {\n return this.selectionCalculations.getSelectedMergedCellClassNameToRemove();\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return MergeCells;\n}(BasePlugin);","var _templateObject;\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nimport { warn } from \"../../helpers/console.mjs\";\nimport { toSingleLine } from \"../../helpers/templateLiteralTag.mjs\";\n/**\n * Warn users about problems when using `columnSorting` and `multiColumnSorting` plugins simultaneously.\n */\n\nexport function warnAboutPluginsConflict() {\n warn(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Plugins `columnSorting` and `multiColumnSorting` should not be enabled simultaneously. \\n Only `multiColumnSorting` will work.\"], [\"Plugins \\\\`columnSorting\\\\` and \\\\`multiColumnSorting\\\\` should not be enabled simultaneously. \\n Only \\\\`multiColumnSorting\\\\` will work.\"]))));\n}","import * as C from \"../../../i18n/constants.mjs\";\nimport MergedCellCoords from \"../cellCoords.mjs\";\n/**\n * @param {*} plugin The plugin instance.\n * @returns {object}\n */\n\nexport default function toggleMergeItem(plugin) {\n return {\n key: 'mergeCells',\n name: function name() {\n var sel = this.getSelectedLast();\n\n if (sel) {\n var info = plugin.mergedCellsCollection.get(sel[0], sel[1]);\n\n if (info.row === sel[0] && info.col === sel[1] && info.row + info.rowspan - 1 === sel[2] && info.col + info.colspan - 1 === sel[3]) {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_UNMERGE_CELLS);\n }\n }\n\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_MERGE_CELLS);\n },\n callback: function callback() {\n plugin.toggleMergeOnSelection();\n },\n disabled: function disabled() {\n var sel = this.getSelectedLast();\n\n if (!sel) {\n return true;\n }\n\n var isSingleCell = MergedCellCoords.isSingleCell({\n row: sel[0],\n col: sel[1],\n rowspan: sel[2] - sel[0] + 1,\n colspan: sel[3] - sel[1] + 1\n });\n return isSingleCell || this.selection.isSelectedByCorner();\n },\n hidden: false\n };\n}","import \"core-js/modules/es.array.slice.js\";\n\nfunction _toArray(arr) {\n return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport { getCompareFunctionFactory, DO_NOT_SWAP } from \"../columnSorting/sortService/index.mjs\";\n/**\n * Sort comparator handled by conventional sort algorithm.\n *\n * @param {Array} sortingOrders Sort orders (`asc` for ascending, `desc` for descending).\n * @param {Array} columnMetas Column meta objects.\n * @returns {Function}\n */\n\nexport function rootComparator(sortingOrders, columnMetas) {\n return function (rowIndexWithValues, nextRowIndexWithValues) {\n // We sort array of arrays. Single array is in form [rowIndex, ...values].\n // We compare just values, stored at second index of array.\n var _rowIndexWithValues = _toArray(rowIndexWithValues),\n values = _rowIndexWithValues.slice(1);\n\n var _nextRowIndexWithValu = _toArray(nextRowIndexWithValues),\n nextValues = _nextRowIndexWithValu.slice(1);\n\n return function getCompareResult(column) {\n var sortingOrder = sortingOrders[column];\n var columnMeta = columnMetas[column];\n var value = values[column];\n var nextValue = nextValues[column];\n var pluginSettings = columnMeta.multiColumnSorting;\n var compareFunctionFactory = pluginSettings.compareFunctionFactory ? pluginSettings.compareFunctionFactory : getCompareFunctionFactory(columnMeta.type);\n var compareResult = compareFunctionFactory(sortingOrder, columnMeta, pluginSettings)(value, nextValue);\n\n if (compareResult === DO_NOT_SWAP) {\n var nextSortedColumn = column + 1;\n\n if (typeof columnMetas[nextSortedColumn] !== 'undefined') {\n return getCompareResult(nextSortedColumn);\n }\n }\n\n return compareResult;\n }(0);\n };\n}","import \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.regexp.constructor.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.split.js\";\nvar COLUMN_ORDER_PREFIX = 'sort';\n/**\n * Get CSS classes which should be added to particular column header.\n *\n * @param {object} columnStatesManager Instance of column state manager.\n * @param {number} column Visual column index.\n * @param {boolean} showSortIndicator Indicates if indicator should be shown for the particular column.\n * @returns {Array} Array of CSS classes.\n */\n\nexport function getClassesToAdd(columnStatesManager, column, showSortIndicator) {\n var cssClasses = [];\n\n if (showSortIndicator === false) {\n return cssClasses;\n }\n\n if (columnStatesManager.isColumnSorted(column) && columnStatesManager.getNumberOfSortedColumns() > 1) {\n cssClasses.push(\"\".concat(COLUMN_ORDER_PREFIX, \"-\").concat(columnStatesManager.getIndexOfColumnInSortQueue(column) + 1));\n }\n\n return cssClasses;\n}\n/**\n * Get CSS classes which should be removed from column header.\n *\n * @param {HTMLElement} htmlElement An element to process.\n * @returns {Array} Array of CSS classes.\n */\n\nexport function getClassesToRemove(htmlElement) {\n var cssClasses = htmlElement.className.split(' ');\n var sortSequenceRegExp = new RegExp(\"^\".concat(COLUMN_ORDER_PREFIX, \"-[0-9]{1,2}$\"));\n return cssClasses.filter(function (cssClass) {\n return sortSequenceRegExp.test(cssClass);\n });\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.sort.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { ColumnSorting } from \"../columnSorting/index.mjs\";\nimport { registerRootComparator } from \"../columnSorting/sortService/index.mjs\";\nimport { wasHeaderClickedProperly } from \"../columnSorting/utils.mjs\";\nimport { isPressedCtrlKey } from \"../../utils/keyStateObserver.mjs\";\nimport { addClass, removeClass } from \"../../helpers/dom/element.mjs\";\nimport { rootComparator } from \"./rootComparator.mjs\";\nimport { warnAboutPluginsConflict } from \"./utils.mjs\";\nimport { getClassesToAdd, getClassesToRemove } from \"./domHelpers.mjs\";\nexport var PLUGIN_KEY = 'multiColumnSorting';\nexport var PLUGIN_PRIORITY = 170;\nvar APPEND_COLUMN_CONFIG_STRATEGY = 'append';\nvar CONFLICTED_PLUGIN_KEY = 'columnSorting';\nregisterRootComparator(PLUGIN_KEY, rootComparator);\n/**\n * @plugin MultiColumnSorting\n *\n * @description\n * This plugin sorts the view by columns (but does not sort the data source!). To enable the plugin, set the\n * {@link Options#multiColumnSorting} property to the correct value (see the examples below).\n *\n * @example\n * ```js\n * // as boolean\n * multiColumnSorting: true\n *\n * // as an object with initial sort config (sort ascending for column at index 1 and then sort descending for column at index 0)\n * multiColumnSorting: {\n * initialConfig: [{\n * column: 1,\n * sortOrder: 'asc'\n * }, {\n * column: 0,\n * sortOrder: 'desc'\n * }]\n * }\n *\n * // as an object which define specific sorting options for all columns\n * multiColumnSorting: {\n * sortEmptyCells: true, // true = the table sorts empty cells, false = the table moves all empty cells to the end of the table (by default)\n * indicator: true, // true = shows indicator for all columns (by default), false = don't show indicator for columns\n * headerAction: true, // true = allow to click on the headers to sort (by default), false = turn off possibility to click on the headers to sort\n * compareFunctionFactory: function(sortOrder, columnMeta) {\n * return function(value, nextValue) {\n * // Some value comparisons which will return -1, 0 or 1...\n * }\n * }\n * }\n *\n * // as an object passed to the `column` property, allows specifying a custom options for the desired column.\n * // please take a look at documentation of `column` property: https://handsontable.com/docs/Options.html#columns\n * columns: [{\n * multiColumnSorting: {\n * indicator: false, // disable indicator for the first column,\n * sortEmptyCells: true,\n * headerAction: false, // clicks on the first column won't sort\n * compareFunctionFactory: function(sortOrder, columnMeta) {\n * return function(value, nextValue) {\n * return 0; // Custom compare function for the first column (don't sort)\n * }\n * }\n * }\n * }]```\n */\n\nexport var MultiColumnSorting = /*#__PURE__*/function (_ColumnSorting) {\n _inherits(MultiColumnSorting, _ColumnSorting);\n\n var _super = _createSuper(MultiColumnSorting);\n\n function MultiColumnSorting(hotInstance) {\n var _this;\n\n _classCallCheck(this, MultiColumnSorting);\n\n _this = _super.call(this, hotInstance);\n /**\n * Main settings key designed for the plugin.\n *\n * @private\n * @type {string}\n */\n\n _this.pluginKey = PLUGIN_KEY;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the Handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link MultiColumnSorting#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(MultiColumnSorting, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return _get(_getPrototypeOf(MultiColumnSorting.prototype), \"isEnabled\", this).call(this);\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n if (!this.enabled && this.hot.getSettings()[this.pluginKey] && this.hot.getSettings()[CONFLICTED_PLUGIN_KEY]) {\n warnAboutPluginsConflict();\n }\n\n _get(_getPrototypeOf(MultiColumnSorting.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n _get(_getPrototypeOf(MultiColumnSorting.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Sorts the table by chosen columns and orders.\n *\n * @param {undefined|object|Array} sortConfig Single column sort configuration or full sort configuration (for all sorted columns).\n * The configuration object contains `column` and `sortOrder` properties. First of them contains visual column index, the second one contains\n * sort order (`asc` for ascending, `desc` for descending).\n *\n * **Note**: Please keep in mind that every call of `sort` function set an entirely new sort order. Previous sort configs aren't preserved.\n *\n * @example\n * ```js\n * // sort ascending first visual column\n * hot.getPlugin('multiColumnSorting').sort({ column: 0, sortOrder: 'asc' });\n *\n * // sort first two visual column in the defined sequence\n * hot.getPlugin('multiColumnSorting').sort([{\n * column: 1, sortOrder: 'asc'\n * }, {\n * column: 0, sortOrder: 'desc'\n * }]);\n * ```\n *\n * @fires Hooks#beforeColumnSort\n * @fires Hooks#afterColumnSort\n */\n\n }, {\n key: \"sort\",\n value: function sort(sortConfig) {\n _get(_getPrototypeOf(MultiColumnSorting.prototype), \"sort\", this).call(this, sortConfig);\n }\n /**\n * Clear the sort performed on the table.\n */\n\n }, {\n key: \"clearSort\",\n value: function clearSort() {\n _get(_getPrototypeOf(MultiColumnSorting.prototype), \"clearSort\", this).call(this);\n }\n /**\n * Checks if the table is sorted (any column have to be sorted).\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isSorted\",\n value: function isSorted() {\n return _get(_getPrototypeOf(MultiColumnSorting.prototype), \"isSorted\", this).call(this);\n }\n /**\n * Get sort configuration for particular column or for all sorted columns. Objects contain `column` and `sortOrder` properties.\n *\n * **Note**: Please keep in mind that returned objects expose **visual** column index under the `column` key. They are handled by the `sort` function.\n *\n * @param {number} [column] Visual column index.\n * @returns {undefined|object|Array}\n */\n\n }, {\n key: \"getSortConfig\",\n value: function getSortConfig(column) {\n return _get(_getPrototypeOf(MultiColumnSorting.prototype), \"getSortConfig\", this).call(this, column);\n }\n /**\n * @description\n * Warn: Useful mainly for providing server side sort implementation (see in the example below). It doesn't sort the data set. It just sets sort configuration for all sorted columns.\n * Note: Please keep in mind that this method doesn't re-render the table.\n *\n * @example\n * ```js\n * beforeColumnSort: function(currentSortConfig, destinationSortConfigs) {\n * const columnSortPlugin = this.getPlugin('multiColumnSorting');\n *\n * columnSortPlugin.setSortConfig(destinationSortConfigs);\n *\n * // const newData = ... // Calculated data set, ie. from an AJAX call.\n *\n * this.loadData(newData); // Load new data set and re-render the table.\n *\n * return false; // The blockade for the default sort action.\n * }```\n *\n * @param {undefined|object|Array} sortConfig Single column sort configuration or full sort configuration (for all sorted columns).\n * The configuration object contains `column` and `sortOrder` properties. First of them contains visual column index, the second one contains\n * sort order (`asc` for ascending, `desc` for descending).\n */\n\n }, {\n key: \"setSortConfig\",\n value: function setSortConfig(sortConfig) {\n _get(_getPrototypeOf(MultiColumnSorting.prototype), \"setSortConfig\", this).call(this, sortConfig);\n }\n /**\n * Get normalized sort configs.\n *\n * @private\n * @param {object|Array} [sortConfig=[]] Single column sort configuration or full sort configuration (for all sorted columns).\n * The configuration object contains `column` and `sortOrder` properties. First of them contains visual column index, the second one contains\n * sort order (`asc` for ascending, `desc` for descending).\n * @returns {Array}\n */\n\n }, {\n key: \"getNormalizedSortConfigs\",\n value: function getNormalizedSortConfigs() {\n var sortConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n if (Array.isArray(sortConfig)) {\n return sortConfig;\n }\n\n return [sortConfig];\n }\n /**\n * Update header classes.\n *\n * @private\n * @param {HTMLElement} headerSpanElement Header span element.\n * @param {...*} args Extra arguments for helpers.\n */\n\n }, {\n key: \"updateHeaderClasses\",\n value: function updateHeaderClasses(headerSpanElement) {\n var _get2;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n (_get2 = _get(_getPrototypeOf(MultiColumnSorting.prototype), \"updateHeaderClasses\", this)).call.apply(_get2, [this, headerSpanElement].concat(args));\n\n removeClass(headerSpanElement, getClassesToRemove(headerSpanElement));\n\n if (this.enabled !== false) {\n addClass(headerSpanElement, getClassesToAdd.apply(void 0, args));\n }\n }\n /**\n * Overwriting base plugin's `onUpdateSettings` method. Please keep in mind that `onAfterUpdateSettings` isn't called\n * for `updateSettings` in specific situations.\n *\n * @private\n * @param {object} newSettings New settings object.\n */\n\n }, {\n key: \"onUpdateSettings\",\n value: function onUpdateSettings(newSettings) {\n if (this.hot.getSettings()[this.pluginKey] && this.hot.getSettings()[CONFLICTED_PLUGIN_KEY]) {\n warnAboutPluginsConflict();\n }\n\n _get(_getPrototypeOf(MultiColumnSorting.prototype), \"onUpdateSettings\", this).call(this, newSettings);\n }\n /**\n * Callback for the `onAfterOnCellMouseDown` hook.\n *\n * @private\n * @param {Event} event Event which are provided by hook.\n * @param {CellCoords} coords Visual coords of the selected cell.\n */\n\n }, {\n key: \"onAfterOnCellMouseDown\",\n value: function onAfterOnCellMouseDown(event, coords) {\n if (wasHeaderClickedProperly(coords.row, coords.col, event) === false) {\n return;\n }\n\n if (this.wasClickableHeaderClicked(event, coords.col)) {\n if (isPressedCtrlKey()) {\n this.hot.deselectCell();\n this.hot.selectColumns(coords.col);\n this.sort(this.getNextSortConfig(coords.col, APPEND_COLUMN_CONFIG_STRATEGY));\n } else {\n this.sort(this.getColumnNextConfig(coords.col));\n }\n }\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return MultiColumnSorting;\n}(ColumnSorting);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.splice.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { getWindowScrollTop, hasClass, getWindowScrollLeft } from \"../../helpers/dom/element.mjs\";\nimport { isMobileBrowser } from \"../../helpers/browser.mjs\";\nimport { BasePlugin } from \"../base/index.mjs\";\nimport EventManager from \"../../eventManager.mjs\";\nimport { CellCoords } from \"../../3rdparty/walkontable/src/index.mjs\";\nexport var PLUGIN_KEY = 'multipleSelectionHandles';\nexport var PLUGIN_PRIORITY = 160;\n/**\n * @private\n * @plugin MultipleSelectionHandles\n */\n\nexport var MultipleSelectionHandles = /*#__PURE__*/function (_BasePlugin) {\n _inherits(MultipleSelectionHandles, _BasePlugin);\n\n var _super = _createSuper(MultipleSelectionHandles);\n /**\n * @param {object} hotInstance The handsontable instance.\n */\n\n\n function MultipleSelectionHandles(hotInstance) {\n var _this2;\n\n _classCallCheck(this, MultipleSelectionHandles);\n\n _this2 = _super.call(this, hotInstance);\n /**\n * @type {Array}\n */\n\n _this2.dragged = [];\n /**\n * Instance of EventManager.\n *\n * @type {EventManager}\n */\n\n _this2.eventManager = null;\n /**\n * @type {null}\n */\n\n _this2.lastSetCell = null;\n return _this2;\n }\n /**\n * Check if the plugin is enabled in the handsontable settings.\n *\n * @returns {boolean}\n */\n\n\n _createClass(MultipleSelectionHandles, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return isMobileBrowser();\n }\n /**\n * Enable plugin for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n if (this.enabled) {\n return;\n }\n\n if (!this.eventManager) {\n this.eventManager = new EventManager(this);\n }\n\n this.registerListeners();\n\n _get(_getPrototypeOf(MultipleSelectionHandles.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Bind the touch events.\n *\n * @private\n */\n\n }, {\n key: \"registerListeners\",\n value: function registerListeners() {\n var _this3 = this;\n\n var _this = this;\n\n var rootElement = this.hot.rootElement;\n /**\n * @param {string} query Query for the position.\n * @returns {boolean}\n */\n\n function removeFromDragged(query) {\n if (_this.dragged.length === 1) {\n // clear array\n _this.dragged.splice(0, _this.dragged.length);\n\n return true;\n }\n\n var entryPosition = _this.dragged.indexOf(query);\n\n if (entryPosition === -1) {\n return false;\n } else if (entryPosition === 0) {\n _this.dragged = _this.dragged.slice(0, 1);\n } else if (entryPosition === 1) {\n _this.dragged = _this.dragged.slice(-1);\n }\n }\n\n this.eventManager.addEventListener(rootElement, 'touchstart', function (event) {\n var selectedRange;\n\n if (hasClass(event.target, 'topLeftSelectionHandle-HitArea')) {\n selectedRange = _this.hot.getSelectedRangeLast();\n\n _this.dragged.push('topLeft');\n\n _this.touchStartRange = {\n width: selectedRange.getWidth(),\n height: selectedRange.getHeight(),\n direction: selectedRange.getDirection()\n };\n event.preventDefault();\n return false;\n } else if (hasClass(event.target, 'bottomRightSelectionHandle-HitArea')) {\n selectedRange = _this.hot.getSelectedRangeLast();\n\n _this.dragged.push('bottomRight');\n\n _this.touchStartRange = {\n width: selectedRange.getWidth(),\n height: selectedRange.getHeight(),\n direction: selectedRange.getDirection()\n };\n event.preventDefault();\n return false;\n }\n });\n this.eventManager.addEventListener(rootElement, 'touchend', function (event) {\n if (hasClass(event.target, 'topLeftSelectionHandle-HitArea')) {\n removeFromDragged.call(_this, 'topLeft');\n _this.touchStartRange = void 0;\n event.preventDefault();\n return false;\n } else if (hasClass(event.target, 'bottomRightSelectionHandle-HitArea')) {\n removeFromDragged.call(_this, 'bottomRight');\n _this.touchStartRange = void 0;\n event.preventDefault();\n return false;\n }\n });\n this.eventManager.addEventListener(rootElement, 'touchmove', function (event) {\n var _this3$hot = _this3.hot,\n rootWindow = _this3$hot.rootWindow,\n rootDocument = _this3$hot.rootDocument;\n var scrollTop = getWindowScrollTop(rootWindow);\n var scrollLeft = getWindowScrollLeft(rootWindow);\n var targetCoords;\n var selectedRange;\n var rangeWidth;\n var rangeHeight;\n var rangeDirection;\n var newRangeCoords;\n\n if (_this.dragged.length === 0) {\n return;\n }\n\n var endTarget = rootDocument.elementFromPoint(event.touches[0].screenX - scrollLeft, event.touches[0].screenY - scrollTop);\n\n if (!endTarget || endTarget === _this.lastSetCell) {\n return;\n }\n\n if (endTarget.nodeName === 'TD' || endTarget.nodeName === 'TH') {\n targetCoords = _this.hot.getCoords(endTarget);\n\n if (targetCoords.col === -1) {\n targetCoords.col = 0;\n }\n\n selectedRange = _this.hot.getSelectedRangeLast();\n rangeWidth = selectedRange.getWidth();\n rangeHeight = selectedRange.getHeight();\n rangeDirection = selectedRange.getDirection();\n\n if (rangeWidth === 1 && rangeHeight === 1) {\n _this.hot.selection.setRangeEnd(targetCoords);\n }\n\n newRangeCoords = _this.getCurrentRangeCoords(selectedRange, targetCoords, _this.touchStartRange.direction, rangeDirection, _this.dragged[0]);\n\n if (newRangeCoords.start !== null) {\n _this.hot.selection.setRangeStart(newRangeCoords.start);\n }\n\n _this.hot.selection.setRangeEnd(newRangeCoords.end);\n\n _this.lastSetCell = endTarget;\n }\n\n event.preventDefault();\n });\n }\n }, {\n key: \"getCurrentRangeCoords\",\n value: function getCurrentRangeCoords(selectedRange, currentTouch, touchStartDirection, currentDirection, draggedHandle) {\n var topLeftCorner = selectedRange.getTopLeftCorner();\n var bottomRightCorner = selectedRange.getBottomRightCorner();\n var bottomLeftCorner = selectedRange.getBottomLeftCorner();\n var topRightCorner = selectedRange.getTopRightCorner();\n var newCoords = {\n start: null,\n end: null\n };\n\n switch (touchStartDirection) {\n case 'NE-SW':\n switch (currentDirection) {\n case 'NE-SW':\n case 'NW-SE':\n if (draggedHandle === 'topLeft') {\n newCoords = {\n start: new CellCoords(currentTouch.row, selectedRange.highlight.col),\n end: new CellCoords(bottomLeftCorner.row, currentTouch.col)\n };\n } else {\n newCoords = {\n start: new CellCoords(selectedRange.highlight.row, currentTouch.col),\n end: new CellCoords(currentTouch.row, topLeftCorner.col)\n };\n }\n\n break;\n\n case 'SE-NW':\n if (draggedHandle === 'bottomRight') {\n newCoords = {\n start: new CellCoords(bottomRightCorner.row, currentTouch.col),\n end: new CellCoords(currentTouch.row, topLeftCorner.col)\n };\n }\n\n break;\n\n default:\n break;\n }\n\n break;\n\n case 'NW-SE':\n switch (currentDirection) {\n case 'NE-SW':\n if (draggedHandle === 'topLeft') {\n newCoords = {\n start: currentTouch,\n end: bottomLeftCorner\n };\n } else {\n newCoords.end = currentTouch;\n }\n\n break;\n\n case 'NW-SE':\n if (draggedHandle === 'topLeft') {\n newCoords = {\n start: currentTouch,\n end: bottomRightCorner\n };\n } else {\n newCoords.end = currentTouch;\n }\n\n break;\n\n case 'SE-NW':\n if (draggedHandle === 'topLeft') {\n newCoords = {\n start: currentTouch,\n end: topLeftCorner\n };\n } else {\n newCoords.end = currentTouch;\n }\n\n break;\n\n case 'SW-NE':\n if (draggedHandle === 'topLeft') {\n newCoords = {\n start: currentTouch,\n end: topRightCorner\n };\n } else {\n newCoords.end = currentTouch;\n }\n\n break;\n\n default:\n break;\n }\n\n break;\n\n case 'SW-NE':\n switch (currentDirection) {\n case 'NW-SE':\n if (draggedHandle === 'bottomRight') {\n newCoords = {\n start: new CellCoords(currentTouch.row, topLeftCorner.col),\n end: new CellCoords(bottomLeftCorner.row, currentTouch.col)\n };\n } else {\n newCoords = {\n start: new CellCoords(topLeftCorner.row, currentTouch.col),\n end: new CellCoords(currentTouch.row, bottomRightCorner.col)\n };\n }\n\n break;\n // case 'NE-SW':\n //\n // break;\n\n case 'SW-NE':\n if (draggedHandle === 'topLeft') {\n newCoords = {\n start: new CellCoords(selectedRange.highlight.row, currentTouch.col),\n end: new CellCoords(currentTouch.row, bottomRightCorner.col)\n };\n } else {\n newCoords = {\n start: new CellCoords(currentTouch.row, topLeftCorner.col),\n end: new CellCoords(topLeftCorner.row, currentTouch.col)\n };\n }\n\n break;\n\n case 'SE-NW':\n if (draggedHandle === 'bottomRight') {\n newCoords = {\n start: new CellCoords(currentTouch.row, topRightCorner.col),\n end: new CellCoords(topLeftCorner.row, currentTouch.col)\n };\n } else if (draggedHandle === 'topLeft') {\n newCoords = {\n start: bottomLeftCorner,\n end: currentTouch\n };\n }\n\n break;\n\n default:\n break;\n }\n\n break;\n\n case 'SE-NW':\n switch (currentDirection) {\n case 'NW-SE':\n case 'NE-SW':\n case 'SW-NE':\n if (draggedHandle === 'topLeft') {\n newCoords.end = currentTouch;\n }\n\n break;\n\n case 'SE-NW':\n if (draggedHandle === 'topLeft') {\n newCoords.end = currentTouch;\n } else {\n newCoords = {\n start: currentTouch,\n end: topLeftCorner\n };\n }\n\n break;\n\n default:\n break;\n }\n\n break;\n\n default:\n break;\n }\n\n return newCoords;\n }\n /**\n * Check if user is currently dragging the handle.\n *\n * @returns {boolean} Dragging state.\n */\n\n }, {\n key: \"isDragged\",\n value: function isDragged() {\n return this.dragged.length > 0;\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return MultipleSelectionHandles;\n}(BasePlugin);","/**\n * Default properties for nested header settings.\n *\n * @type {object}\n */\nexport var HEADER_DEFAULT_SETTINGS = {\n /**\n * The name/label of the column header.\n *\n * @type {string}\n */\n label: '',\n\n /**\n * Current calculated colspan value of the rendered column header element.\n *\n * @type {number}\n */\n colspan: 1,\n\n /**\n * Original colspan value, set once while parsing user-defined nested header settings.\n *\n * @type {number}\n */\n origColspan: 1,\n\n /**\n * The flag which determines whether the node is collapsible (can be collpased/expanded).\n *\n * @type {boolean}\n */\n collapsible: false,\n\n /**\n * The flag which determines whether the node was collapsed.\n *\n * @type {boolean}\n */\n isCollapsed: false,\n\n /**\n * The flag which determines whether the column header should be rendered as hidden (display: none).\n *\n * @type {boolean}\n */\n isHidden: false,\n\n /**\n * The flag which determines whether the column header settings is accually not renderable. That kind\n * of objects are generated after colspaned header to fill an array to correct size.\n *\n * For example for header with colspan = 8 the 7 blank objects are generated to fil an array settings\n * to length = 8.\n *\n * @type {boolean}\n */\n isBlank: false\n};\n/**\n * List of properties which are configurable. That properties can be changed using public API.\n *\n * @type {string[]}\n */\n\nexport var HEADER_CONFIGURABLE_PROPS = ['label', 'collapsible'];","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.splice.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n\nimport { arrayEach, arrayMap } from \"../../../helpers/array.mjs\";\nimport { isObject } from \"../../../helpers/object.mjs\";\nimport { stringify } from \"../../../helpers/mixed.mjs\";\nimport { HEADER_DEFAULT_SETTINGS } from \"./constants.mjs\";\n/**\n * A function that normalizes user-defined settings into one predictable\n * structure. Currently, the developer can declare nested headers by passing\n * the following unstructured (and sometimes uncompleted) array.\n * [\n * [{ label: 'A1', colspan: 2 }],\n * [{ label: true }, 'B2', 4],\n * [],\n * ]\n *\n * The normalization process equalizes the length of columns to each header\n * layers to the same length and generates object settings with a common shape.\n * So the above mentioned example will be normalized into this:\n * [\n * [\n * { label: 'A1', colspan: 2, isHidden: false, ... },\n * { label: '', colspan: 1, isHidden: true, ... },\n * { label: '', colspan: 1, isHidden: false, ... },\n * ],\n * [\n * { label: 'true', colspan: 1, isHidden: false, ... },\n * { label: 'B2', colspan: 1, isHidden: false, ... },\n * { label: '4', colspan: 1, isHidden: false, ... },\n * ],\n * [\n * { label: '', colspan: 1, isHidden: false, ... },\n * { label: '', colspan: 1, isHidden: false, ... },\n * { label: '', colspan: 1, isHidden: false, ... },\n * ],\n * ]\n *\n * @param {Array[]} sourceSettings An array with defined nested headers settings.\n * @param {number} [columnsLimit=Infinity] A number of columns to which the structure\n * will be trimmed. While trimming the colspan\n * values are adjusted to preserve the original\n * structure.\n * @returns {Array[]}\n */\n\nexport function normalizeSettings(sourceSettings) {\n var columnsLimit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;\n var normalizedSettings = [];\n\n if (columnsLimit === 0) {\n return normalizedSettings;\n } // Normalize array items (header settings) into one shape - literal object with default props.\n\n\n arrayEach(sourceSettings, function (headersSettings) {\n var columns = [];\n var columnIndex = 0;\n normalizedSettings.push(columns);\n arrayEach(headersSettings, function (sourceHeaderSettings) {\n var headerSettings = _objectSpread({}, HEADER_DEFAULT_SETTINGS);\n\n if (isObject(sourceHeaderSettings)) {\n var label = sourceHeaderSettings.label,\n colspan = sourceHeaderSettings.colspan;\n headerSettings.label = stringify(label);\n\n if (typeof colspan === 'number' && colspan > 1) {\n headerSettings.colspan = colspan;\n headerSettings.origColspan = colspan;\n }\n } else {\n headerSettings.label = stringify(sourceHeaderSettings);\n }\n\n columnIndex += headerSettings.origColspan;\n var cancelProcessing = false;\n\n if (columnIndex >= columnsLimit) {\n // Adjust the colspan value to not overlap the columns limit.\n headerSettings.colspan = headerSettings.origColspan - (columnIndex - columnsLimit);\n headerSettings.origColspan = headerSettings.colspan;\n cancelProcessing = true;\n }\n\n columns.push(headerSettings);\n\n if (headerSettings.colspan > 1) {\n for (var i = 0; i < headerSettings.colspan - 1; i++) {\n columns.push(_objectSpread(_objectSpread({}, HEADER_DEFAULT_SETTINGS), {}, {\n isHidden: true,\n isBlank: true\n }));\n }\n }\n\n return !cancelProcessing;\n });\n });\n var columnsLength = Math.max.apply(Math, _toConsumableArray(arrayMap(normalizedSettings, function (headersSettings) {\n return headersSettings.length;\n }))); // Normalize the length of each header layer to the same columns length.\n\n arrayEach(normalizedSettings, function (headersSettings) {\n if (headersSettings.length < columnsLength) {\n var defaultSettings = arrayMap(new Array(columnsLength - headersSettings.length), function () {\n return _objectSpread({}, HEADER_DEFAULT_SETTINGS);\n });\n headersSettings.splice.apply(headersSettings, [headersSettings.length, 0].concat(_toConsumableArray(defaultSettings)));\n }\n });\n return normalizedSettings;\n}","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n descriptor.value = value;\n }\n\n return value;\n}\n\nimport { extend, isObject } from \"../../../helpers/object.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { normalizeSettings } from \"./settingsNormalizer.mjs\";\nimport { HEADER_CONFIGURABLE_PROPS } from \"./constants.mjs\";\n/**\n * The class manages and normalizes settings passed by the developer\n * into the nested headers plugin. The SourceSettings class is a\n * source of truth for tree builder (HeaderTree) module.\n *\n * @class SourceSettings\n * @plugin NestedHeaders\n */\n\nvar _data = new WeakMap();\n\nvar _dataLength = new WeakMap();\n\nvar _columnsLimit = new WeakMap();\n\nvar SourceSettings = /*#__PURE__*/function () {\n function SourceSettings() {\n _classCallCheck(this, SourceSettings);\n\n _data.set(this, {\n writable: true,\n value: []\n });\n\n _dataLength.set(this, {\n writable: true,\n value: 0\n });\n\n _columnsLimit.set(this, {\n writable: true,\n value: Infinity\n });\n }\n\n _createClass(SourceSettings, [{\n key: \"setColumnsLimit\",\n value:\n /**\n * Sets columns limit to the source settings will be trimmed. All headers which\n * overlap the column limit will be reduced to keep the structure solid.\n *\n * @param {number} columnsCount The number of columns to limit to.\n */\n function setColumnsLimit(columnsCount) {\n _classPrivateFieldSet(this, _columnsLimit, columnsCount);\n }\n /**\n * Sets a new nested header configuration.\n *\n * @param {Array[]} [nestedHeadersSettings=[]] The user-defined nested headers settings.\n */\n\n }, {\n key: \"setData\",\n value: function setData() {\n var nestedHeadersSettings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n _classPrivateFieldSet(this, _data, normalizeSettings(nestedHeadersSettings, _classPrivateFieldGet(this, _columnsLimit)));\n\n _classPrivateFieldSet(this, _dataLength, _classPrivateFieldGet(this, _data).length);\n }\n /**\n * Gets normalized source settings.\n *\n * @returns {Array[]}\n */\n\n }, {\n key: \"getData\",\n value: function getData() {\n return _classPrivateFieldGet(this, _data);\n }\n /**\n * Merges settings with current source settings.\n *\n * @param {object[]} additionalSettings An array of objects with `row`, `col` and additional\n * properties to merge with current source settings.\n */\n\n }, {\n key: \"mergeWith\",\n value: function mergeWith(additionalSettings) {\n var _this = this;\n\n arrayEach(additionalSettings, function (_ref) {\n var row = _ref.row,\n col = _ref.col,\n rest = _objectWithoutProperties(_ref, [\"row\", \"col\"]);\n\n var headerSettings = _this.getHeaderSettings(row, col);\n\n if (headerSettings !== null) {\n extend(headerSettings, rest, HEADER_CONFIGURABLE_PROPS);\n }\n });\n }\n /**\n * Maps the current state with a callback. For each source settings the callback function\n * is called. If the function returns value that value is merged with the source settings.\n *\n * @param {Function} callback A function that is called for every header settings.\n * Each time the callback is called, the returned value extends\n * header settings.\n */\n\n }, {\n key: \"map\",\n value: function map(callback) {\n arrayEach(_classPrivateFieldGet(this, _data), function (header) {\n arrayEach(header, function (headerSettings) {\n var propsToExtend = callback(_objectSpread({}, headerSettings));\n\n if (isObject(propsToExtend)) {\n extend(headerSettings, propsToExtend, HEADER_CONFIGURABLE_PROPS);\n }\n });\n });\n }\n /**\n * Gets source column header settings for a specified header. The returned\n * object contains information about the header label, its colspan length,\n * or if it is hidden in the header renderers.\n *\n * @param {number} headerLevel Header level (0 = most distant to the table).\n * @param {number} columnIndex A visual column index.\n * @returns {object|null}\n */\n\n }, {\n key: \"getHeaderSettings\",\n value: function getHeaderSettings(headerLevel, columnIndex) {\n var _headersSettings$colu;\n\n if (headerLevel >= _classPrivateFieldGet(this, _dataLength) || headerLevel < 0) {\n return null;\n }\n\n var headersSettings = _classPrivateFieldGet(this, _data)[headerLevel];\n\n if (columnIndex >= headersSettings.length) {\n return null;\n }\n\n return (_headersSettings$colu = headersSettings[columnIndex]) !== null && _headersSettings$colu !== void 0 ? _headersSettings$colu : null;\n }\n /**\n * Gets source of column headers settings for specified headers. If the retrieved column\n * settings overlap the range \"box\" determined by \"columnIndex\" and \"columnsLength\"\n * the exception will be thrown.\n *\n * @param {number} headerLevel Header level (0 = most distant to the table).\n * @param {number} columnIndex A visual column index from which the settings will be extracted.\n * @param {number} [columnsLength=1] The number of columns involved in the extraction of settings.\n * @returns {object}\n */\n\n }, {\n key: \"getHeadersSettings\",\n value: function getHeadersSettings(headerLevel, columnIndex) {\n var columnsLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var headersSettingsChunks = [];\n\n if (headerLevel >= _classPrivateFieldGet(this, _dataLength) || headerLevel < 0) {\n return headersSettingsChunks;\n }\n\n var headersSettings = _classPrivateFieldGet(this, _data)[headerLevel];\n\n var currentLength = 0;\n\n for (var i = columnIndex; i < headersSettings.length; i++) {\n var headerSettings = headersSettings[i];\n\n if (headerSettings.isHidden === true) {\n throw new Error('The first column settings cannot overlap the other header layers');\n }\n\n currentLength += headerSettings.colspan;\n headersSettingsChunks.push(headerSettings);\n\n if (headerSettings.colspan > 1) {\n i += headerSettings.colspan - 1;\n } // We met the current sum of the child colspans\n\n\n if (currentLength === columnsLength) {\n break;\n } // We exceeds the current sum of the child colspans, the last columns colspan overlaps the \"columnsLength\" length.\n\n\n if (currentLength > columnsLength) {\n throw new Error('The last column settings cannot overlap the other header layers');\n }\n }\n\n return headersSettingsChunks;\n }\n /**\n * Gets a total number of headers levels.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLayersCount\",\n value: function getLayersCount() {\n return _classPrivateFieldGet(this, _dataLength);\n }\n /**\n * Gets a total number of columns count.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getColumnsCount\",\n value: function getColumnsCount() {\n return _classPrivateFieldGet(this, _dataLength) > 0 ? _classPrivateFieldGet(this, _data)[0].length : 0;\n }\n /**\n * Clears the data.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n _classPrivateFieldSet(this, _data, []);\n\n _classPrivateFieldSet(this, _dataLength, 0);\n }\n }]);\n\n return SourceSettings;\n}();\n\nexport { SourceSettings as default };","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n/**\n * Depth-first pre-order strategy (https://en.wikipedia.org/wiki/Tree_traversal#Pre-order_(NLR)).\n *\n * @type {string}\n */\n\n\nexport var TRAVERSAL_DF_PRE = 'DF-pre-order';\n/**\n * @param {Function} callback A callback which will be called on each visited node.\n * @param {*} context A context to pass through.\n * @returns {boolean}\n */\n\nexport function depthFirstPreOrder(callback, context) {\n var continueTraverse = callback.call(context, this);\n\n for (var i = 0; i < this.childs.length; i++) {\n if (continueTraverse === false) {\n return false;\n }\n\n continueTraverse = depthFirstPreOrder.call(this.childs[i], callback, context);\n }\n\n return continueTraverse;\n}\n/**\n * Depth-first post-order strategy (https://en.wikipedia.org/wiki/Tree_traversal#Post-order_(NLR)).\n *\n * @type {string}\n */\n\nexport var TRAVERSAL_DF_POST = 'DF-post-order';\n/**\n * @param {Function} callback A callback which will be called on each visited node.\n * @param {*} context A context to pass through.\n * @returns {boolean}\n */\n\nfunction depthFirstPostOrder(callback, context) {\n for (var i = 0; i < this.childs.length; i++) {\n var continueTraverse = depthFirstPostOrder.call(this.childs[i], callback, context);\n\n if (continueTraverse === false) {\n return false;\n }\n }\n\n return callback.call(context, this);\n}\n/**\n * Breadth-first traversal strategy (https://en.wikipedia.org/wiki/Tree_traversal#Breadth-first_search_/_level_order).\n *\n * @type {string}\n */\n\n\nexport var TRAVERSAL_BF = 'BF';\n/**\n * @param {Function} callback A callback which will be called on each visited node.\n * @param {*} context A context to pass through.\n */\n\nfunction breadthFirst(callback, context) {\n var queue = [this];\n /**\n * Internal processor.\n */\n\n function process() {\n if (queue.length === 0) {\n return;\n }\n\n var node = queue.shift();\n queue.push.apply(queue, _toConsumableArray(node.childs));\n\n if (callback.call(context, node) !== false) {\n process();\n }\n }\n\n process();\n}\n/**\n * Default strategy for tree traversal.\n *\n * @type {string}\n */\n\n\nvar DEFAULT_TRAVERSAL_STRATEGY = TRAVERSAL_BF;\n/**\n * Collection of all available tree traversal strategies.\n *\n * @type {Map}\n */\n\nvar TRAVERSAL_STRATEGIES = new Map([[TRAVERSAL_DF_PRE, depthFirstPreOrder], [TRAVERSAL_DF_POST, depthFirstPostOrder], [TRAVERSAL_BF, breadthFirst]]);\n/**\n *\n */\n\nvar TreeNode = /*#__PURE__*/function () {\n /**\n * A tree data.\n *\n * @type {object}\n */\n\n /**\n * A parent node.\n *\n * @type {TreeNode}\n */\n\n /**\n * A tree leaves.\n *\n * @type {TreeNode[]}\n */\n function TreeNode(data) {\n _classCallCheck(this, TreeNode);\n\n _defineProperty(this, \"data\", {});\n\n _defineProperty(this, \"parent\", null);\n\n _defineProperty(this, \"childs\", []);\n\n this.data = data;\n }\n /**\n * Adds a node to tree leaves. Added node is linked with the parent node through \"parent\" property.\n *\n * @param {TreeNode} node A TreeNode to add.\n */\n\n\n _createClass(TreeNode, [{\n key: \"addChild\",\n value: function addChild(node) {\n node.parent = this;\n this.childs.push(node);\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * @memberof TreeNode#\n * @function cloneTree\n *\n * Clones a tree structure deeply.\n *\n * For example, for giving a tree structure:\n * .--(B1)--.\n * .-(C1) .-(C2)-.----.\n * (D1) (D2) (D3) (D4)\n *\n * Cloning a tree starting from C2 node creates a mirrored tree structure.\n * .-(C2')-.-----.\n * (D2') (D3') (D4')\n *\n * The cloned tree can be safely modified without affecting the original structure.\n * After modification, the clone can be merged with a tree using the \"replaceTreeWith\" method.\n *\n * @param {TreeNode} [nodeTree=this] A TreeNode to clone.\n * @returns {TreeNode}\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"cloneTree\",\n value: function cloneTree() {\n var nodeTree = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this;\n var clonedNode = new TreeNode(_objectSpread({}, nodeTree.data));\n\n for (var i = 0; i < nodeTree.childs.length; i++) {\n clonedNode.addChild(this.cloneTree(nodeTree.childs[i]));\n }\n\n return clonedNode;\n }\n /**\n * Replaces the current node with a passed tree structure.\n *\n * @param {TreeNode} nodeTree A TreeNode to replace with.\n */\n\n }, {\n key: \"replaceTreeWith\",\n value: function replaceTreeWith(nodeTree) {\n this.data = _objectSpread({}, nodeTree.data);\n this.childs = [];\n\n for (var i = 0; i < nodeTree.childs.length; i++) {\n this.addChild(nodeTree.childs[i]);\n }\n }\n /**\n * Traverses the tree structure through node childs. The walk down traversing supports\n * a three different strategies.\n * - Depth-first pre-order strategy (https://en.wikipedia.org/wiki/Tree_traversal#Pre-order_(NLR));\n * - Depth-first post-order strategy (https://en.wikipedia.org/wiki/Tree_traversal#Post-order_(NLR));\n * - Breadth-first traversal strategy (https://en.wikipedia.org/wiki/Tree_traversal#Breadth-first_search_/_level_order).\n *\n * @param {Function} callback The callback function which will be called for each node.\n * @param {string} [traversalStrategy=DEFAULT_TRAVERSAL_STRATEGY] Traversing strategy.\n */\n\n }, {\n key: \"walkDown\",\n value: function walkDown(callback) {\n var traversalStrategy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_TRAVERSAL_STRATEGY;\n\n if (!TRAVERSAL_STRATEGIES.has(traversalStrategy)) {\n throw new Error(\"Traversal strategy \\\"\".concat(traversalStrategy, \"\\\" does not exist\"));\n }\n\n TRAVERSAL_STRATEGIES.get(traversalStrategy).call(this, callback, this);\n }\n /**\n * Traverses the tree structure through node parents.\n *\n * @param {Function} callback The callback function which will be called for each node.\n */\n\n }, {\n key: \"walkUp\",\n value: function walkUp(callback) {\n var context = this;\n\n var process = function process(node) {\n var continueTraverse = callback.call(context, node);\n\n if (continueTraverse !== false && node.parent !== null) {\n process(node.parent);\n }\n };\n\n process(this);\n }\n }]);\n\n return TreeNode;\n}();\n\nexport { TreeNode as default };","import \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n descriptor.value = value;\n }\n\n return value;\n}\n\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport TreeNode from \"../../../utils/dataStructures/tree.mjs\";\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n/**\n * @class HeadersTree\n *\n * The header tree class keeps nested header settings in the tree\n * structure for easier node manipulation (e.q collapse or expand column).\n * That trees represent the current state of the nested headers. From the\n * trees, the matrix is generated for nested header renderers.\n *\n * The second role of the module is validation. While building the tree,\n * there is check whether the configuration contains overlapping\n * headers. If true, then the exception is thrown.\n *\n * The tree is static; it means that its column indexing never changes\n * even when a collapsing header is performed. The structure is based\n * on visual column indexes.\n *\n * For example, for that header configuration:\n * +----+----+----+----+----+\n * │ A1 │ A2 │\n * +----+----+----+----+----+\n * │ B1 │ B2 │ B3 │\n * +----+----+----+----+----+\n * │ C1 │ C2 │ C3 │ C4 │\n * +----+----+----+----+----+\n *\n * The tree structures look like:\n * (0) (4) // a visual column index\n * │ │\n * .------(A1)------. (A2)--.\n * .--(B1)--. (B2)--. (B3)--.\n * (C1) (C2) (C3) (C4)\n *\n * @plugin NestedHeaders\n */\n\n/* eslint-enable jsdoc/require-description-complete-sentence */\n\nvar _rootNodes = new WeakMap();\n\nvar _rootsIndex = new WeakMap();\n\nvar _sourceSettings = new WeakMap();\n\nvar HeadersTree = /*#__PURE__*/function () {\n /**\n * The collection of nested headers settings structured into trees. The root trees are stored\n * under the visual column index.\n *\n * @private\n * @type {Map}\n */\n\n /**\n * A map that translates the visual column indexes that intersect the range\n * defined by the header colspan width to the root index.\n *\n * @private\n * @type {Map}\n */\n\n /**\n * The instance of the SourceSettings class.\n *\n * @private\n * @type {SourceSettings}\n */\n function HeadersTree(sourceSettings) {\n _classCallCheck(this, HeadersTree);\n\n _rootNodes.set(this, {\n writable: true,\n value: new Map()\n });\n\n _rootsIndex.set(this, {\n writable: true,\n value: new Map()\n });\n\n _sourceSettings.set(this, {\n writable: true,\n value: null\n });\n\n _classPrivateFieldSet(this, _sourceSettings, sourceSettings);\n }\n /**\n * Gets an array of the all root nodes.\n *\n * @returns {TreeNode[]}\n */\n\n\n _createClass(HeadersTree, [{\n key: \"getRoots\",\n value: function getRoots() {\n return Array.from(_classPrivateFieldGet(this, _rootNodes).values());\n }\n /**\n * Gets a root node by specified visual column index.\n *\n * @param {number} columnIndex A visual column index.\n * @returns {TreeNode|undefined}\n */\n\n }, {\n key: \"getRootByColumn\",\n value: function getRootByColumn(columnIndex) {\n var node;\n\n if (_classPrivateFieldGet(this, _rootsIndex).has(columnIndex)) {\n node = _classPrivateFieldGet(this, _rootNodes).get(_classPrivateFieldGet(this, _rootsIndex).get(columnIndex));\n }\n\n return node;\n }\n /**\n * Gets a tree node by its position in the grid settings.\n *\n * @param {number} headerLevel Header level index (there is support only for positive values).\n * @param {number} columnIndex A visual column index.\n * @returns {TreeNode|undefined}\n */\n\n }, {\n key: \"getNode\",\n value: function getNode(headerLevel, columnIndex) {\n var rootNode = this.getRootByColumn(columnIndex);\n\n if (!rootNode) {\n return;\n } // Normalize the visual column index to a 0-based system for a specific \"box\" defined\n // by root node colspan width.\n\n\n var normColumnIndex = columnIndex - _classPrivateFieldGet(this, _rootsIndex).get(columnIndex);\n\n var columnCursor = 0;\n var treeNode; // Collect all parent nodes that depend on the collapsed node.\n\n rootNode.walkDown(function (node) {\n var _node$data = node.data,\n origColspan = _node$data.origColspan,\n nodeHeaderLevel = _node$data.headerLevel;\n\n if (headerLevel === nodeHeaderLevel) {\n if (normColumnIndex >= columnCursor && normColumnIndex <= columnCursor + origColspan - 1) {\n treeNode = node;\n return false; // Cancel tree traversing.\n }\n\n columnCursor += origColspan;\n }\n });\n return treeNode;\n }\n /**\n * Builds (or rebuilds if called again) root nodes indexes.\n */\n\n }, {\n key: \"rebuildTreeIndex\",\n value: function rebuildTreeIndex() {\n var _this = this;\n\n var columnIndex = 0;\n\n _classPrivateFieldGet(this, _rootsIndex).clear();\n\n arrayEach(_classPrivateFieldGet(this, _rootNodes), function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n colspan = _ref2[1].data.colspan; // Map tree range (colspan range/width) into visual column index of the root node.\n\n\n for (var i = columnIndex; i < columnIndex + colspan; i++) {\n _classPrivateFieldGet(_this, _rootsIndex).set(i, columnIndex);\n }\n\n columnIndex += colspan;\n });\n }\n /**\n * Builds trees based on SourceSettings class. Calling a method causes clearing the tree state built\n * from the previous call.\n */\n\n }, {\n key: \"buildTree\",\n value: function buildTree() {\n this.clear();\n\n var columnsCount = _classPrivateFieldGet(this, _sourceSettings).getColumnsCount();\n\n var columnIndex = 0;\n\n while (columnIndex < columnsCount) {\n var columnSettings = _classPrivateFieldGet(this, _sourceSettings).getHeaderSettings(0, columnIndex);\n\n var rootNode = new TreeNode();\n\n _classPrivateFieldGet(this, _rootNodes).set(columnIndex, rootNode);\n\n this.buildLeaves(rootNode, columnIndex, 0, columnSettings.origColspan);\n columnIndex += columnSettings.origColspan;\n }\n\n this.rebuildTreeIndex();\n }\n /**\n * Builds leaves for specified tree node.\n *\n * @param {TreeNode} parentNode A node to which the leaves applies.\n * @param {number} columnIndex A visual column index.\n * @param {number} headerLevel Currently processed header level.\n * @param {number} [extractionLength=1] Determines column extraction length for node children.\n */\n\n }, {\n key: \"buildLeaves\",\n value: function buildLeaves(parentNode, columnIndex, headerLevel) {\n var _this2 = this;\n\n var extractionLength = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n\n var columnsSettings = _classPrivateFieldGet(this, _sourceSettings).getHeadersSettings(headerLevel, columnIndex, extractionLength);\n\n headerLevel += 1;\n arrayEach(columnsSettings, function (columnSettings) {\n var nodeData = _objectSpread(_objectSpread({}, columnSettings), {}, {\n headerLevel: headerLevel - 1,\n columnIndex: columnIndex\n });\n\n var node;\n\n if (headerLevel === 1) {\n // fill the root node\n parentNode.data = nodeData;\n node = parentNode;\n } else {\n node = new TreeNode(nodeData);\n parentNode.addChild(node);\n }\n\n if (headerLevel < _classPrivateFieldGet(_this2, _sourceSettings).getLayersCount()) {\n _this2.buildLeaves(node, columnIndex, headerLevel, columnSettings.origColspan);\n }\n\n columnIndex += columnSettings.origColspan;\n });\n }\n /**\n * Clears the tree to the initial state.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n _classPrivateFieldGet(this, _rootNodes).clear();\n\n _classPrivateFieldGet(this, _rootsIndex).clear();\n }\n }]);\n\n return HeadersTree;\n}();\n\nexport { HeadersTree as default };","import \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nimport { arrayEach } from \"../../../helpers/array.mjs\";\n/**\n * The NodeModifiers module is responsible for the modification of a tree\n * structure in a way to achieve new column headers state.\n *\n * @class NodeModifiers\n * @plugin NestedHeaders\n */\n\nvar NodeModifiers = /*#__PURE__*/function () {\n function NodeModifiers() {\n _classCallCheck(this, NodeModifiers);\n }\n\n _createClass(NodeModifiers, [{\n key: \"collapseNode\",\n value:\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * @memberof NodeModifiers#\n * @function collapseNode\n * Collapsing a node is a process where the processing node is collapsed\n * to the colspan width of the first child. All node children, except the\n * first one, are hidden. To prevent losing a current state of node children\n * on the right, all nodes are cloned (and restored while expanding), and\n * only then original nodes are modified (hidden in this case).\n *\n * @param {TreeNode} nodeToProcess A tree node to process.\n * @returns {object} result Returns an object with properties:\n * - rollbackModification: The function that\n * rollbacks the tree to the previous state.\n * - affectedColumns: The list of the visual column\n * indexes which are affected. That list is passed\n * to the hiddens column logic.\n * - colspanCompensation: The number of colspan by\n * which the processed node colspan was reduced.\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n function collapseNode(nodeToProcess) {\n var _getFirstChildPropert,\n _this = this;\n\n var nodeData = nodeToProcess.data,\n nodeChilds = nodeToProcess.childs;\n\n if (nodeData.isCollapsed === true || nodeData.isHidden === true || nodeData.origColspan <= 1) {\n return {\n rollbackModification: function rollbackModification() {},\n affectedColumns: [],\n colspanCompensation: 0\n };\n }\n\n var isNodeReflected = isNodeReflectsFirstChildColspan(nodeToProcess);\n\n if (isNodeReflected) {\n return this.collapseNode(nodeChilds[0]);\n }\n\n nodeData.isCollapsed = true;\n var allLeavesExceptMostLeft = nodeChilds.slice(1);\n var affectedColumns = new Set();\n\n if (allLeavesExceptMostLeft.length > 0) {\n arrayEach(allLeavesExceptMostLeft, function (node) {\n traverseHiddenNodeColumnIndexes(node, function (nodeColumnIndex) {\n affectedColumns.add(nodeColumnIndex);\n }); // Clone the tree to preserve original tree state after header expanding.\n\n node.data.clonedTree = node.cloneTree(); // Hide all leaves except the first leaf on the left (on headers context hide all\n // headers on the right).\n\n node.walkDown(function (_ref) {\n var data = _ref.data;\n data.isHidden = true;\n });\n });\n } else {\n // Add column to \"affected\" started from 1. The header without children can not be\n // collapsed so the first have to be visible (untouched).\n for (var i = 1; i < nodeData.origColspan; i++) {\n affectedColumns.add(nodeData.columnIndex + i);\n }\n } // Calculate by how many colspan it needs to reduce the headings to match them to\n // the first child colspan width.\n\n\n var colspanCompensation = nodeData.colspan - ((_getFirstChildPropert = getFirstChildProperty(nodeToProcess, 'colspan')) !== null && _getFirstChildPropert !== void 0 ? _getFirstChildPropert : 1);\n nodeToProcess.walkUp(function (node) {\n var data = node.data;\n data.colspan -= colspanCompensation;\n\n if (data.colspan <= 1) {\n data.colspan = 1;\n data.isCollapsed = true;\n } else if (isNodeReflectsFirstChildColspan(node)) {\n data.isCollapsed = getFirstChildProperty(node, 'isCollapsed');\n }\n });\n return {\n rollbackModification: function rollbackModification() {\n return _this.expandNode(nodeToProcess);\n },\n affectedColumns: Array.from(affectedColumns),\n colspanCompensation: colspanCompensation\n };\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * @memberof NodeModifiers#\n * @function expandNode\n * Expanding a node is a process where the processing node is expanded to\n * its original colspan width. To restore an original state of all node\n * children on the right, the modified nodes are replaced with the cloned\n * nodes (they were cloned while collapsing).\n *\n * @param {TreeNode} nodeToProcess A tree node to process.\n * @returns {object} result Returns an object with properties:\n * - rollbackModification: The function that\n * rollbacks the tree to the previous state.\n * - affectedColumns: The list of the visual column\n * indexes which are affected. That list is passed\n * to the hiddens column logic.\n * - colspanCompensation: The number of colspan by\n * which the processed node colspan was increased.\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"expandNode\",\n value: function expandNode(nodeToProcess) {\n var _this2 = this;\n\n var nodeData = nodeToProcess.data,\n nodeChilds = nodeToProcess.childs;\n\n if (nodeData.isCollapsed === false || nodeData.isHidden === true || nodeData.origColspan <= 1) {\n return {\n rollbackModification: function rollbackModification() {},\n affectedColumns: [],\n colspanCompensation: 0\n };\n }\n\n var isNodeReflected = isNodeReflectsFirstChildColspan(nodeToProcess);\n\n if (isNodeReflected) {\n return this.expandNode(nodeChilds[0]);\n }\n\n nodeData.isCollapsed = false;\n var allLeavesExceptMostLeft = nodeChilds.slice(1);\n var affectedColumns = new Set();\n var colspanCompensation = 0;\n\n if (allLeavesExceptMostLeft.length > 0) {\n arrayEach(allLeavesExceptMostLeft, function (node) {\n // Restore original state of the collapsed headers.\n node.replaceTreeWith(node.data.clonedTree);\n node.data.clonedTree = null;\n var leafData = node.data; // Calculate by how many colspan it needs to increase the headings to match them to\n // the colspan width of all its children.\n\n colspanCompensation += leafData.colspan;\n traverseHiddenNodeColumnIndexes(node, function (nodeColumnIndex) {\n affectedColumns.add(nodeColumnIndex);\n });\n });\n } else {\n var colspan = nodeData.colspan,\n origColspan = nodeData.origColspan,\n columnIndex = nodeData.columnIndex; // In a case when the node doesn't have any children restore the colspan width to\n // its original state.\n\n colspanCompensation = origColspan - colspan; // Add column to \"affected\" started from 1. The header without children can not be\n // collapsed so the first column is already visible and we shouldn't touch it.\n\n for (var i = 1; i < origColspan; i++) {\n affectedColumns.add(columnIndex + i);\n }\n }\n\n nodeToProcess.walkUp(function (node) {\n var data = node.data;\n data.colspan += colspanCompensation;\n\n if (data.colspan >= data.origColspan) {\n data.colspan = data.origColspan;\n data.isCollapsed = false;\n } else if (isNodeReflectsFirstChildColspan(node)) {\n data.isCollapsed = getFirstChildProperty(node, 'isCollapsed');\n }\n });\n return {\n rollbackModification: function rollbackModification() {\n return _this2.collapseNode(nodeToProcess);\n },\n affectedColumns: Array.from(affectedColumns),\n colspanCompensation: colspanCompensation\n };\n }\n /**\n * An entry point for triggering a node modifiers. If the triggered action\n * does not exist the exception is thrown.\n *\n * @param {string} actionName An action name to trigger.\n * @param {TreeNode} nodeToProcess A tree node to process.\n * @returns {object}\n */\n\n }, {\n key: \"triggerAction\",\n value: function triggerAction(actionName, nodeToProcess) {\n if (!NodeModifiers.AVAILABLE_ACTIONS.includes(actionName)) {\n throw new Error(\"The node modifier action (\\\"\".concat(actionName, \"\\\") does not exist.\"));\n }\n\n return this[\"\".concat(actionName, \"Node\")](nodeToProcess);\n }\n }]);\n\n return NodeModifiers;\n}();\n/**\n * Traverses the tree nodes and calls a callback when no hidden node is found. The callback\n * is called with visual column index then.\n *\n * @param {TreeNode} node A tree node to traverse.\n * @param {Function} callback The callback function which will be called for each node.\n */\n\n\n_defineProperty(NodeModifiers, \"AVAILABLE_ACTIONS\", ['collapse', 'expand']);\n\nexport { NodeModifiers as default };\n\nfunction traverseHiddenNodeColumnIndexes(node, callback) {\n node.walkDown(function (_ref2) {\n var data = _ref2.data,\n childs = _ref2.childs;\n\n if (!data.isHidden) {\n callback(data.columnIndex);\n\n if (childs.length === 0) {\n for (var i = 1; i < data.colspan; i++) {\n callback(data.columnIndex + i);\n }\n }\n }\n });\n}\n/**\n * A tree helper for retrieving a data from the first child.\n *\n * @param {TreeNode} node A tree node to check.\n * @param {string} propertyName A name of the property whose value you want to get.\n * @returns {*}\n */\n\n\nfunction getFirstChildProperty(_ref3, propertyName) {\n var childs = _ref3.childs;\n\n if (childs.length === 0) {\n return;\n }\n\n return childs[0].data[propertyName];\n}\n/**\n * A tree helper which checks if passed node has the same original colspan as its\n * first child. In that case the node is treated as \"mirrored\" or \"reflected\" every\n * action performed on one of that nodes should be reflected to other \"mirrored\" node.\n *\n * In that case nodes A1 and A2 are \"refelcted\"\n * +----+----+----+----+\n * | A1 | B1 |\n * +----+----+----+----+\n * | A2 | B2 | B3 |\n * +----+----+----+----+.\n *\n * @param {TreeNode} node A tree node to check.\n * @returns {boolean}\n */\n\n\nfunction isNodeReflectsFirstChildColspan(node) {\n return getFirstChildProperty(node, 'origColspan') === node.data.origColspan;\n}","function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n/* eslint-disable jsdoc/require-description-complete-sentence */\n\n\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { HEADER_DEFAULT_SETTINGS } from \"./constants.mjs\";\n/**\n * A function that dump a tree structure into multidimensional array. That structure is\n * later processed by header renderers to modify TH elements to achieve a proper\n * DOM structure.\n *\n * That structure contains settings object for every TH element generated by Walkontable.\n * The matrix operates on visual column index.\n *\n * Output example:\n * [\n * [\n * { label: 'A1', colspan: 2, origColspan: 2, isHidden: false, ... },\n * { label: '', colspan: 1, origColspan: 1, isHidden: true, ... },\n * { label: '', colspan: 1, origColspan: 1, isHidden: false, ... },\n * ],\n * [\n * { label: 'true', colspan: 1, origColspan: 1, isHidden: false, ... },\n * { label: 'B2', colspan: 1, origColspan: 1, isHidden: false, ... },\n * { label: '4', colspan: 1, origColspan: 1, isHidden: false, ... },\n * ],\n * [\n * { label: '', colspan: 1, origColspan: 1, isHidden: false, ... },\n * { label: '', colspan: 1, origColspan: 1, isHidden: false, ... },\n * { label: '', colspan: 1, origColspan: 1, isHidden: false, ... },\n * ],\n * ]\n *\n * @param {TreeNode[]} headerRoots An array of root nodes.\n * @returns {Array[]}\n */\n\nexport function generateMatrix(headerRoots) {\n var matrix = [];\n arrayEach(headerRoots, function (rootNode) {\n rootNode.walkDown(function (node) {\n var _node$data = node.data,\n colspan = _node$data.colspan,\n origColspan = _node$data.origColspan,\n label = _node$data.label,\n isHidden = _node$data.isHidden,\n headerLevel = _node$data.headerLevel,\n collapsible = _node$data.collapsible,\n isCollapsed = _node$data.isCollapsed;\n var colspanHeaderLayer = createNestedArrayIfNecessary(matrix, headerLevel);\n colspanHeaderLayer.push({\n label: label,\n colspan: colspan,\n origColspan: origColspan,\n collapsible: collapsible,\n isCollapsed: isCollapsed,\n isHidden: isHidden,\n isBlank: false\n });\n\n if (origColspan > 1) {\n for (var i = 0; i < origColspan - 1; i++) {\n colspanHeaderLayer.push(_objectSpread(_objectSpread({}, HEADER_DEFAULT_SETTINGS), {}, {\n origColspan: origColspan,\n isHidden: true,\n isBlank: true\n }));\n }\n }\n });\n });\n return matrix;\n}\n/**\n * Internal helper which ensures that subarray exists under specified index.\n *\n * @param {Array[]} array An array to check.\n * @param {number} index An array index under the subarray should be checked.\n * @returns {Array}\n */\n\nfunction createNestedArrayIfNecessary(array, index) {\n var subArray;\n\n if (Array.isArray(array[index])) {\n subArray = array[index];\n } else {\n subArray = [];\n array[index] = subArray;\n }\n\n return subArray;\n}","import \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n descriptor.value = value;\n }\n\n return value;\n}\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nimport { arrayMap, arrayReduce } from \"../../../helpers/array.mjs\";\nimport SourceSettings from \"./sourceSettings.mjs\";\nimport HeadersTree from \"./headersTree.mjs\";\nimport NodeModifiers from \"./nodeModifiers.mjs\";\nimport { HEADER_DEFAULT_SETTINGS } from \"./constants.mjs\";\nimport { generateMatrix } from \"./matrixGenerator.mjs\";\n/**\n * The state manager is a source of truth for nested headers configuration.\n * The state generation process is divided into three stages.\n *\n * +---------------------+ 1. User-defined configuration normalization;\n * │ │ The source settings class normalizes and shares API for\n * │ SourceSettings │ raw settings passed by the developer. It is only consumed by\n * │ │ the header tree module.\n * +---------------------+\n * │\n * \\│/\n * +---------------------+ 2. Building a tree structure for validation and easier node manipulation;\n * │ │ The header tree generates a tree based on source settings for future\n * │ HeadersTree │ node manipulation (such as collapsible columns feature). While generating a tree\n * │ │ the source settings is checked to see if the configuration has overlapping headers.\n * +---------------------+ If `true` the colspan matrix generation is skipped, overlapped headers are not supported.\n * │\n * \\│/\n * +---------------------+ 3. Matrix generation;\n * │ │ Based on built trees the matrix generation is performed. That part of code\n * │ matrix generation │ generates an array structure similar to normalized data from the SourceSettings\n * │ │ but with the difference that this structure contains column settings which changed\n * +---------------------+ during runtime (after the tree manipulation) e.q after collapse or expand column.\n * That settings describes how the TH element should be modified (colspan attribute,\n * CSS classes, etc) for a specific column and layer level.\n *\n * @class StateManager\n * @plugin NestedHeaders\n */\n\nvar _sourceSettings = new WeakMap();\n\nvar _nodeModifiers = new WeakMap();\n\nvar _headersTree = new WeakMap();\n\nvar _stateMatrix = new WeakMap();\n\nvar StateManager = /*#__PURE__*/function () {\n function StateManager() {\n _classCallCheck(this, StateManager);\n\n _sourceSettings.set(this, {\n writable: true,\n value: new SourceSettings()\n });\n\n _nodeModifiers.set(this, {\n writable: true,\n value: new NodeModifiers()\n });\n\n _headersTree.set(this, {\n writable: true,\n value: new HeadersTree(_classPrivateFieldGet(this, _sourceSettings))\n });\n\n _stateMatrix.set(this, {\n writable: true,\n value: [[]]\n });\n }\n\n _createClass(StateManager, [{\n key: \"setState\",\n value:\n /**\n * Sets a new state for the nested headers plugin based on settings passed\n * directly to the plugin.\n *\n * @param {Array[]} nestedHeadersSettings The user-defined settings.\n * @returns {boolean} Returns `true` if the settings are processed correctly, `false` otherwise.\n */\n function setState(nestedHeadersSettings) {\n _classPrivateFieldGet(this, _sourceSettings).setData(nestedHeadersSettings);\n\n var hasError = false;\n\n try {\n _classPrivateFieldGet(this, _headersTree).buildTree();\n } catch (ex) {\n _classPrivateFieldGet(this, _headersTree).clear();\n\n _classPrivateFieldGet(this, _sourceSettings).clear();\n\n hasError = true;\n }\n\n _classPrivateFieldSet(this, _stateMatrix, generateMatrix(_classPrivateFieldGet(this, _headersTree).getRoots()));\n\n return hasError;\n }\n /**\n * Sets columns limit to the state will be trimmed. All headers (colspans) which\n * overlap the column limit will be reduced to keep the structure solid.\n *\n * @param {number} columnsCount The number of columns to limit to.\n */\n\n }, {\n key: \"setColumnsLimit\",\n value: function setColumnsLimit(columnsCount) {\n _classPrivateFieldGet(this, _sourceSettings).setColumnsLimit(columnsCount);\n }\n /**\n * Merges settings with current plugin state.\n *\n * By default only foreign keys are merged with source state and passed to the tree. But only\n * known keys are exported to matrix.\n *\n * @param {object[]} settings An array of objects to merge with the current source settings.\n * It is a requirement that every object has `row` and `col` properties\n * which points to the specific header settings object.\n */\n\n }, {\n key: \"mergeStateWith\",\n value: function mergeStateWith(settings) {\n var _this = this;\n\n var transformedSettings = arrayMap(settings, function (_ref) {\n var row = _ref.row,\n rest = _objectWithoutProperties(_ref, [\"row\"]);\n\n return _objectSpread({\n row: row < 0 ? _this.rowCoordsToLevel(row) : row\n }, rest);\n });\n\n _classPrivateFieldGet(this, _sourceSettings).mergeWith(transformedSettings);\n\n _classPrivateFieldGet(this, _headersTree).buildTree();\n\n _classPrivateFieldSet(this, _stateMatrix, generateMatrix(_classPrivateFieldGet(this, _headersTree).getRoots()));\n }\n /**\n * Maps the current state with a callback. For each header settings the callback function\n * is called. If the function returns value that value is merged with the state.\n *\n * By default only foreign keys are merged with source state and passed to the tree. But only\n * known keys are exported to matrix.\n *\n * @param {Function} callback A function that is called for every header source settings.\n * Each time the callback is called, the returned value extends\n * header settings.\n */\n\n }, {\n key: \"mapState\",\n value: function mapState(callback) {\n _classPrivateFieldGet(this, _sourceSettings).map(callback);\n\n _classPrivateFieldGet(this, _headersTree).buildTree();\n\n _classPrivateFieldSet(this, _stateMatrix, generateMatrix(_classPrivateFieldGet(this, _headersTree).getRoots()));\n }\n /**\n * Maps the current tree nodes with a callback. For each node the callback function\n * is called. If the function returns value that value is added to returned array.\n *\n * @param {Function} callback A function that is called for every tree node.\n * Each time the callback is called, the returned value is\n * added to returned array.\n * @returns {Array}\n */\n\n }, {\n key: \"mapNodes\",\n value: function mapNodes(callback) {\n return arrayReduce(_classPrivateFieldGet(this, _headersTree).getRoots(), function (acc, rootNode) {\n rootNode.walkDown(function (node) {\n var result = callback(node.data);\n\n if (result !== void 0) {\n acc.push(result);\n }\n });\n return acc;\n }, []);\n }\n /**\n * Triggers an action (it can be \"collapse\" or \"expand\") from the NodeModifiers module. The module\n * modifies a tree structure in such a way as to obtain the correct structure consistent with the\n * called action.\n *\n * @param {string} action An action name to trigger.\n * @param {number} headerLevel Header level index (there is support for negative and positive values).\n * @param {number} columnIndex A visual column index.\n * @returns {object|undefined}\n */\n\n }, {\n key: \"triggerNodeModification\",\n value: function triggerNodeModification(action, headerLevel, columnIndex) {\n if (headerLevel < 0) {\n headerLevel = this.rowCoordsToLevel(headerLevel);\n }\n\n var nodeToProcess = _classPrivateFieldGet(this, _headersTree).getNode(headerLevel, columnIndex);\n\n var actionResult;\n\n if (nodeToProcess) {\n actionResult = _classPrivateFieldGet(this, _nodeModifiers).triggerAction(action, nodeToProcess);\n\n _classPrivateFieldSet(this, _stateMatrix, generateMatrix(_classPrivateFieldGet(this, _headersTree).getRoots()));\n }\n\n return actionResult;\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * @memberof StateManager#\n * @function rowCoordsToLevel\n *\n * Translates row coordinates into header level. The row coordinates counts from -1 to -N\n * and describes headers counting from most closest to most distant from the table.\n * The header levels are counted from 0 to N where 0 describes most distant header\n * from the table.\n *\n * Row coords Header level\n * +--------------+\n * -3 │ A1 │ A1 │ 0\n * +--------------+\n * -2 │ B1 │ B2 │ B3 │ 1\n * +--------------+\n * -1 │ C1 │ C2 │ C3 │ 2\n * +==============+\n * │ │ │ │\n * +--------------+\n * │ │ │ │\n *\n * @param {number} rowIndex A visual row index.\n * @returns {number} Returns unsigned number.\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"rowCoordsToLevel\",\n value: function rowCoordsToLevel(rowIndex) {\n var layersCount = Math.max(this.getLayersCount(), 1);\n var highestPossibleLevel = layersCount - 1;\n var lowestPossibleLevel = 0;\n return Math.min(Math.max(rowIndex + layersCount, lowestPossibleLevel), highestPossibleLevel);\n }\n /* eslint-disable jsdoc/require-description-complete-sentence */\n\n /**\n * @memberof StateManager#\n * @function levelToRowCoords\n *\n * Translates header level into row coordinates. The row coordinates counts from -1 to -N\n * and describes headers counting from most closest to most distant from the table.\n * The header levels are counted from 0 to N where 0 describes most distant header\n * from the table.\n *\n * Header level Row coords\n * +--------------+\n * 0 │ A1 │ A1 │ -3\n * +--------------+\n * 1 │ B1 │ B2 │ B3 │ -2\n * +--------------+\n * 2 │ C1 │ C2 │ C3 │ -1\n * +==============+\n * │ │ │ │\n * +--------------+\n * │ │ │ │\n *\n * @param {number} headerLevel Header level index.\n * @returns {number} Returns negative number.\n */\n\n /* eslint-enable jsdoc/require-description-complete-sentence */\n\n }, {\n key: \"levelToRowCoords\",\n value: function levelToRowCoords(headerLevel) {\n var layersCount = Math.max(this.getLayersCount(), 1);\n var highestPossibleRow = -1;\n var lowestPossibleRow = -layersCount;\n return Math.min(Math.max(headerLevel - layersCount, lowestPossibleRow), highestPossibleRow);\n }\n /**\n * Gets column header settings for a specified column and header index. The returned object contains\n * all information necessary for header renderers. It contains header label, colspan length, or hidden\n * flag.\n *\n * @param {number} headerLevel Header level (there is support for negative and positive values).\n * @param {number} columnIndex A visual column index.\n * @returns {object}\n */\n\n }, {\n key: \"getHeaderSettings\",\n value: function getHeaderSettings(headerLevel, columnIndex) {\n var _classPrivateFieldGet2, _classPrivateFieldGet3;\n\n if (headerLevel < 0) {\n headerLevel = this.rowCoordsToLevel(headerLevel);\n }\n\n if (headerLevel >= this.getLayersCount()) {\n return _objectSpread({}, HEADER_DEFAULT_SETTINGS);\n }\n\n return (_classPrivateFieldGet2 = (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _stateMatrix)[headerLevel]) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3[columnIndex]) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : _objectSpread({}, HEADER_DEFAULT_SETTINGS);\n }\n /**\n * The method is helpful in cases where the column index targets in-between currently\n * collapsed column. In that case, the method returns the left-most column index\n * where the nested header begins.\n *\n * @param {number} headerLevel Header level (there is support for negative and positive values).\n * @param {number} columnIndex A visual column index.\n * @returns {number}\n */\n\n }, {\n key: \"findLeftMostColumnIndex\",\n value: function findLeftMostColumnIndex(headerLevel, columnIndex) {\n var _this$getHeaderSettin = this.getHeaderSettings(headerLevel, columnIndex),\n isBlank = _this$getHeaderSettin.isBlank;\n\n if (isBlank === false) {\n return columnIndex;\n }\n\n var stepBackColumn = columnIndex - 1;\n\n do {\n var _this$getHeaderSettin2 = this.getHeaderSettings(headerLevel, stepBackColumn),\n blank = _this$getHeaderSettin2.isBlank;\n\n if (blank === false) {\n break;\n }\n\n stepBackColumn -= 1;\n } while (columnIndex >= 0);\n\n return stepBackColumn;\n }\n /**\n * Gets a total number of headers levels.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getLayersCount\",\n value: function getLayersCount() {\n return _classPrivateFieldGet(this, _sourceSettings).getLayersCount();\n }\n /**\n * Gets a total number of columns count.\n *\n * @returns {number}\n */\n\n }, {\n key: \"getColumnsCount\",\n value: function getColumnsCount() {\n return _classPrivateFieldGet(this, _sourceSettings).getColumnsCount();\n }\n /**\n * Clears the column state manager to the initial state.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n _classPrivateFieldSet(this, _stateMatrix, []);\n\n _classPrivateFieldGet(this, _sourceSettings).clear();\n\n _classPrivateFieldGet(this, _headersTree).clear();\n }\n }]);\n\n return StateManager;\n}();\n\nexport { StateManager as default };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { fastInnerHTML } from \"../../../helpers/dom/element.mjs\";\nimport { clone } from \"../../../helpers/object.mjs\";\n\nvar GhostTable = /*#__PURE__*/function () {\n function GhostTable(plugin) {\n _classCallCheck(this, GhostTable);\n /**\n * Reference to NestedHeaders plugin.\n *\n * @type {NestedHeaders}\n */\n\n\n this.nestedHeaders = plugin;\n /**\n * Temporary element created to get minimal headers widths.\n *\n * @type {*}\n */\n\n this.container = void 0;\n /**\n * Cached the headers widths.\n *\n * @type {Array}\n */\n\n this.widthsCache = [];\n }\n /**\n * Build cache of the headers widths.\n *\n * @private\n */\n\n\n _createClass(GhostTable, [{\n key: \"buildWidthsMapper\",\n value: function buildWidthsMapper() {\n this.container = this.nestedHeaders.hot.rootDocument.createElement('div');\n this.buildGhostTable(this.container);\n this.nestedHeaders.hot.rootElement.appendChild(this.container);\n var columns = this.container.querySelectorAll('tr:last-of-type th');\n var maxColumns = columns.length;\n this.widthsCache.length = 0;\n\n for (var i = 0; i < maxColumns; i++) {\n this.widthsCache.push(columns[i].offsetWidth);\n }\n\n this.container.parentNode.removeChild(this.container);\n this.container = null;\n this.nestedHeaders.hot.render();\n }\n /**\n * Build temporary table for getting minimal columns widths.\n *\n * @private\n * @param {HTMLElement} container The element where the DOM nodes are injected.\n */\n\n }, {\n key: \"buildGhostTable\",\n value: function buildGhostTable(container) {\n var rootDocument = this.nestedHeaders.hot.rootDocument;\n var fragment = rootDocument.createDocumentFragment();\n var table = rootDocument.createElement('table');\n var lastRowColspan = false;\n var isDropdownEnabled = !!this.nestedHeaders.hot.getSettings().dropdownMenu;\n var maxRows = this.nestedHeaders.getLayersCount();\n var maxCols = this.nestedHeaders.hot.countCols();\n var lastRowIndex = maxRows - 1;\n\n for (var row = 0; row < maxRows; row++) {\n var tr = rootDocument.createElement('tr');\n lastRowColspan = false;\n\n for (var col = 0; col < maxCols; col++) {\n var td = rootDocument.createElement('th');\n var headerObj = clone(this.nestedHeaders.getHeaderSettings(row, col));\n\n if (headerObj && !headerObj.isHidden) {\n if (row === lastRowIndex) {\n if (headerObj.colspan > 1) {\n lastRowColspan = true;\n }\n\n if (isDropdownEnabled) {\n headerObj.label += ' ';\n }\n }\n\n fastInnerHTML(td, headerObj.label);\n td.colSpan = headerObj.colspan;\n tr.appendChild(td);\n }\n }\n\n table.appendChild(tr);\n } // We have to be sure the last row contains only the single columns.\n\n\n if (lastRowColspan) {\n {\n var _tr = rootDocument.createElement('tr');\n\n for (var _col = 0; _col < maxCols; _col++) {\n var _td = rootDocument.createElement('th');\n\n _tr.appendChild(_td);\n }\n\n table.appendChild(_tr);\n }\n }\n\n fragment.appendChild(table);\n container.appendChild(fragment);\n }\n /**\n * Clear the widths cache.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.container = null;\n this.widthsCache.length = 0;\n }\n }]);\n\n return GhostTable;\n}();\n\nexport default GhostTable;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.map.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nvar _templateObject, _templateObject2;\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n descriptor.value = value;\n }\n\n return value;\n}\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nimport { addClass, removeClass, fastInnerHTML, empty } from \"../../helpers/dom/element.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { toSingleLine } from \"../../helpers/templateLiteralTag.mjs\";\nimport { warn } from \"../../helpers/console.mjs\";\nimport { BasePlugin } from \"../base/index.mjs\";\nimport StateManager from \"./stateManager/index.mjs\";\nimport GhostTable from \"./utils/ghostTable.mjs\";\nexport var PLUGIN_KEY = 'nestedHeaders';\nexport var PLUGIN_PRIORITY = 280;\n/**\n * @plugin NestedHeaders\n * @description\n * The plugin allows to create a nested header structure, using the HTML's colspan attribute.\n *\n * To make any header wider (covering multiple table columns), it's corresponding configuration array element should be\n * provided as an object with `label` and `colspan` properties. The `label` property defines the header's label,\n * while the `colspan` property defines a number of columns that the header should cover.\n *\n * __Note__ that the plugin supports a *nested* structure, which means, any header cannot be wider than it's \"parent\". In\n * other words, headers cannot overlap each other.\n * @example\n *\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * nestedHeaders: [\n * ['A', {label: 'B', colspan: 8}, 'C'],\n * ['D', {label: 'E', colspan: 4}, {label: 'F', colspan: 4}, 'G'],\n * ['H', {label: 'I', colspan: 2}, {label: 'J', colspan: 2}, {label: 'K', colspan: 2}, {label: 'L', colspan: 2}, 'M'],\n * ['N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W']\n * ],\n * ```\n */\n\nvar _stateManager = new WeakMap();\n\nexport var NestedHeaders = /*#__PURE__*/function (_BasePlugin) {\n _inherits(NestedHeaders, _BasePlugin);\n\n var _super = _createSuper(NestedHeaders);\n\n function NestedHeaders() {\n var _this;\n\n _classCallCheck(this, NestedHeaders);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _stateManager.set(_assertThisInitialized(_this), {\n writable: true,\n value: new StateManager()\n });\n\n _defineProperty(_assertThisInitialized(_this), \"ghostTable\", new GhostTable(_assertThisInitialized(_this)));\n\n _defineProperty(_assertThisInitialized(_this), \"detectedOverlappedHeaders\", false);\n\n return _this;\n }\n\n _createClass(NestedHeaders, [{\n key: \"isEnabled\",\n value:\n /**\n * Check if plugin is enabled.\n *\n * @returns {boolean}\n */\n function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var _this$hot$getSettings = this.hot.getSettings(),\n nestedHeaders = _this$hot$getSettings.nestedHeaders;\n\n if (!Array.isArray(nestedHeaders) || !Array.isArray(nestedHeaders[0])) {\n warn(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Your Nested Headers plugin configuration is invalid. The settings has to be \\n passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]\"], [\"Your Nested Headers plugin configuration is invalid. The settings has to be\\\\x20\\n passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]\"]))));\n }\n\n this.addHook('init', function () {\n return _this2.onInit();\n });\n this.addHook('afterLoadData', function () {\n return _this2.onAfterLoadData.apply(_this2, arguments);\n });\n this.addHook('afterOnCellMouseDown', function (event, coords) {\n return _this2.onAfterOnCellMouseDown(event, coords);\n });\n this.addHook('beforeOnCellMouseOver', function (event, coords, TD, blockCalculations) {\n return _this2.onBeforeOnCellMouseOver(event, coords, TD, blockCalculations);\n });\n this.addHook('afterGetColumnHeaderRenderers', function (array) {\n return _this2.onAfterGetColumnHeaderRenderers(array);\n });\n this.addHook('modifyColWidth', function (width, column) {\n return _this2.onModifyColWidth(width, column);\n });\n this.addHook('afterViewportColumnCalculatorOverride', function (calc) {\n return _this2.onAfterViewportColumnCalculatorOverride(calc);\n });\n\n _get(_getPrototypeOf(NestedHeaders.prototype), \"enablePlugin\", this).call(this);\n\n this.updatePlugin(); // @TODO: Workaround for broken plugin initialization abstraction.\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n if (!this.hot.view) {\n // @TODO: Workaround for broken plugin initialization abstraction.\n return;\n }\n\n var _this$hot$getSettings2 = this.hot.getSettings(),\n nestedHeaders = _this$hot$getSettings2.nestedHeaders;\n\n _classPrivateFieldGet(this, _stateManager).setColumnsLimit(this.hot.countCols());\n\n if (Array.isArray(nestedHeaders)) {\n this.detectedOverlappedHeaders = _classPrivateFieldGet(this, _stateManager).setState(nestedHeaders);\n }\n\n if (this.detectedOverlappedHeaders) {\n warn(toSingleLine(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"Your Nested Headers plugin setup contains overlapping headers. This kind of configuration \\n is currently not supported.\"], [\"Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\\\\x20\\n is currently not supported.\"]))));\n }\n\n this.ghostTable.buildWidthsMapper();\n\n _get(_getPrototypeOf(NestedHeaders.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.clearColspans();\n\n _classPrivateFieldGet(this, _stateManager).clear();\n\n this.ghostTable.clear();\n\n _get(_getPrototypeOf(NestedHeaders.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Returns an instance of the internal state manager of the plugin.\n *\n * @private\n * @returns {StateManager}\n */\n\n }, {\n key: \"getStateManager\",\n value: function getStateManager() {\n return _classPrivateFieldGet(this, _stateManager);\n }\n /**\n * Gets a total number of headers levels.\n *\n * @private\n * @returns {number}\n */\n\n }, {\n key: \"getLayersCount\",\n value: function getLayersCount() {\n return _classPrivateFieldGet(this, _stateManager).getLayersCount();\n }\n /**\n * Gets column settings for a specified header. The returned object contains\n * information about the header label, its colspan length, or if it is hidden\n * in the header renderers.\n *\n * @private\n * @param {number} headerLevel Header level (0 = most distant to the table).\n * @param {number} columnIndex A visual column index.\n * @returns {object}\n */\n\n }, {\n key: \"getHeaderSettings\",\n value: function getHeaderSettings(headerLevel, columnIndex) {\n return _classPrivateFieldGet(this, _stateManager).getHeaderSettings(headerLevel, columnIndex);\n }\n /**\n * Gets HTML elements for specified visual column index and header level from\n * all overlays except master.\n *\n * @private\n * @param {number} columnIndex A visual column index.\n * @param {number} headerLevel Header level (0 = most distant to the table).\n * @returns {HTMLElement[]}\n */\n\n }, {\n key: \"getColumnHeaders\",\n value: function getColumnHeaders(columnIndex, headerLevel) {\n var wtOverlays = this.hot.view.wt.wtOverlays;\n var renderedColumnIndex = this.hot.columnIndexMapper.getRenderableFromVisualIndex(columnIndex);\n var headers = [];\n\n if (renderedColumnIndex !== null) {\n if (wtOverlays.topOverlay) {\n headers.push(wtOverlays.topOverlay.clone.wtTable.getColumnHeader(renderedColumnIndex, headerLevel));\n }\n\n if (wtOverlays.topLeftCornerOverlay) {\n headers.push(wtOverlays.topLeftCornerOverlay.clone.wtTable.getColumnHeader(renderedColumnIndex, headerLevel));\n }\n }\n\n return headers;\n }\n /**\n * Clear the colspans remaining after plugin usage.\n *\n * @private\n */\n\n }, {\n key: \"clearColspans\",\n value: function clearColspans() {\n if (!this.hot.view) {\n return;\n }\n\n var wt = this.hot.view.wt;\n var headerLevels = wt.getSetting('columnHeaders').length;\n var mainHeaders = wt.wtTable.THEAD;\n var topHeaders = wt.wtOverlays.topOverlay.clone.wtTable.THEAD;\n var topLeftCornerHeaders = wt.wtOverlays.topLeftCornerOverlay ? wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.THEAD : null;\n\n for (var i = 0; i < headerLevels; i++) {\n var masterLevel = mainHeaders.childNodes[i];\n\n if (!masterLevel) {\n break;\n }\n\n var topLevel = topHeaders.childNodes[i];\n var topLeftCornerLevel = topLeftCornerHeaders ? topLeftCornerHeaders.childNodes[i] : null;\n\n for (var j = 0, masterNodes = masterLevel.childNodes.length; j < masterNodes; j++) {\n masterLevel.childNodes[j].removeAttribute('colspan');\n removeClass(masterLevel.childNodes[j], 'hiddenHeader');\n\n if (topLevel && topLevel.childNodes[j]) {\n topLevel.childNodes[j].removeAttribute('colspan');\n removeClass(topLevel.childNodes[j], 'hiddenHeader');\n }\n\n if (topLeftCornerHeaders && topLeftCornerLevel && topLeftCornerLevel.childNodes[j]) {\n topLeftCornerLevel.childNodes[j].removeAttribute('colspan');\n removeClass(topLeftCornerLevel.childNodes[j], 'hiddenHeader');\n }\n }\n }\n }\n /**\n * Generates the appropriate header renderer for a header row.\n *\n * @private\n * @param {number} headerLevel The index of header level counting from the top (positive\n * values counting from 0 to N).\n * @returns {Function}\n * @fires Hooks#afterGetColHeader\n */\n\n }, {\n key: \"headerRendererFactory\",\n value: function headerRendererFactory(headerLevel) {\n var _this3 = this;\n\n var fixedColumnsLeft = this.hot.getSettings().fixedColumnsLeft || 0;\n return function (renderedColumnIndex, TH) {\n var _this3$hot = _this3.hot,\n rootDocument = _this3$hot.rootDocument,\n columnIndexMapper = _this3$hot.columnIndexMapper,\n view = _this3$hot.view;\n var visualColumnsIndex = columnIndexMapper.getVisualFromRenderableIndex(renderedColumnIndex);\n\n if (visualColumnsIndex === null) {\n visualColumnsIndex = renderedColumnIndex;\n }\n\n TH.removeAttribute('colspan');\n removeClass(TH, 'hiddenHeader');\n\n var _classPrivateFieldGet2 = _classPrivateFieldGet(_this3, _stateManager).getHeaderSettings(headerLevel, visualColumnsIndex),\n colspan = _classPrivateFieldGet2.colspan,\n label = _classPrivateFieldGet2.label,\n isHidden = _classPrivateFieldGet2.isHidden;\n\n if (isHidden === true) {\n addClass(TH, 'hiddenHeader');\n } else if (colspan > 1) {\n var _view$wt$wtOverlays$t, _view$wt$wtOverlays$l;\n\n var isTopLeftOverlay = (_view$wt$wtOverlays$t = view.wt.wtOverlays.topLeftCornerOverlay) === null || _view$wt$wtOverlays$t === void 0 ? void 0 : _view$wt$wtOverlays$t.clone.wtTable.THEAD.contains(TH);\n var isLeftOverlay = (_view$wt$wtOverlays$l = view.wt.wtOverlays.leftOverlay) === null || _view$wt$wtOverlays$l === void 0 ? void 0 : _view$wt$wtOverlays$l.clone.wtTable.THEAD.contains(TH); // Check if there is a fixed column enabled, if so then reduce colspan to fixed column width.\n\n var correctedColspan = isTopLeftOverlay || isLeftOverlay ? Math.min(colspan, fixedColumnsLeft - visualColumnsIndex) : colspan;\n\n if (correctedColspan > 1) {\n TH.setAttribute('colspan', correctedColspan);\n }\n }\n\n var divEl = rootDocument.createElement('div');\n var spanEl = rootDocument.createElement('span');\n addClass(divEl, 'relative');\n addClass(spanEl, 'colHeader');\n fastInnerHTML(spanEl, label);\n divEl.appendChild(spanEl);\n empty(TH);\n TH.appendChild(divEl);\n\n _this3.hot.runHooks('afterGetColHeader', visualColumnsIndex, TH);\n };\n }\n /**\n * Updates headers highlight in nested structure.\n *\n * @private\n */\n\n }, {\n key: \"updateHeadersHighlight\",\n value: function updateHeadersHighlight() {\n var _this4 = this;\n\n var hot = this.hot;\n var selection = hot.getSelectedRange();\n\n if (selection === void 0) {\n return;\n }\n\n var hotSettings = this.hot.getSettings();\n\n var classNameModifier = function classNameModifier(className) {\n return function (TH, modifier) {\n return function () {\n return TH ? modifier(TH, className) : null;\n };\n };\n };\n\n var highlightHeader = classNameModifier(hotSettings.currentHeaderClassName);\n var activeHeader = classNameModifier(hotSettings.activeHeaderClassName);\n var selectionByHeader = hot.selection.isSelectedByColumnHeader() || hot.selection.isSelectedByCorner();\n\n var layersCount = _classPrivateFieldGet(this, _stateManager).getLayersCount();\n\n var activeHeaderChanges = new Map();\n var highlightHeaderChanges = new Map();\n arrayEach(selection, function (selectionLayer) {\n var coordsFrom = selectionLayer.getTopLeftCorner();\n var coordsTo = selectionLayer.getTopRightCorner(); // If the beginning of the selection (columnFrom) starts in-between colspaned\n // header shift the columnFrom to the header position where it starts.\n\n var columnFrom = _classPrivateFieldGet(_this4, _stateManager).findLeftMostColumnIndex(-1, coordsFrom.col);\n\n var columnTo = coordsTo.col;\n var columnSelectionWidth = columnTo - columnFrom + 1;\n var columnCursor = 0;\n\n for (var column = columnFrom; column <= columnTo; column++) {\n var _loop = function _loop(level) {\n var _classPrivateFieldGet3 = _classPrivateFieldGet(_this4, _stateManager).getHeaderSettings(level, column),\n colspan = _classPrivateFieldGet3.colspan,\n isHidden = _classPrivateFieldGet3.isHidden;\n\n var isFirstLayer = level === layersCount - 1;\n var isOutOfRange = !isFirstLayer && columnCursor + colspan > columnSelectionWidth;\n\n var THs = _this4.getColumnHeaders(column, level);\n\n arrayEach(THs, function (TH) {\n if (isOutOfRange || isHidden) {\n // Reset CSS classes state (workaround for WoT issue which can not render that classes\n // for nested header structure properly).\n activeHeaderChanges.set(TH, activeHeader(TH, removeClass));\n highlightHeaderChanges.set(TH, highlightHeader(TH, removeClass));\n } else if (selectionByHeader) {\n activeHeaderChanges.set(TH, activeHeader(TH, addClass));\n highlightHeaderChanges.set(TH, highlightHeader(TH, addClass));\n } else if (isFirstLayer) {\n highlightHeaderChanges.set(TH, highlightHeader(TH, addClass));\n } else {\n highlightHeaderChanges.set(TH, highlightHeader(TH, removeClass));\n }\n });\n }; // Traverse header layers from bottom to top.\n\n\n for (var level = layersCount - 1; level > -1; level--) {\n _loop(level);\n }\n\n columnCursor += 1;\n }\n });\n arrayEach(activeHeaderChanges, function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n classModifer = _ref2[1];\n\n return void classModifer();\n });\n arrayEach(highlightHeaderChanges, function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n classModifer = _ref4[1];\n\n return void classModifer();\n });\n activeHeaderChanges.clear();\n highlightHeaderChanges.clear();\n }\n /**\n * Select all nested headers of clicked cell.\n *\n * @private\n * @param {MouseEvent} event Mouse event.\n * @param {CellCoords} coords Clicked cell coords.\n */\n\n }, {\n key: \"onAfterOnCellMouseDown\",\n value: function onAfterOnCellMouseDown(event, coords) {\n if (coords.row < 0) {\n var _classPrivateFieldGet4 = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(coords.row, coords.col),\n origColspan = _classPrivateFieldGet4.origColspan;\n\n if (origColspan > 1) {\n this.hot.selection.selectColumns(coords.col, coords.col + origColspan - 1);\n }\n }\n }\n /**\n * Make the header-selection properly select the nested headers.\n *\n * @private\n * @param {MouseEvent} event Mouse event.\n * @param {CellCoords} coords Clicked cell coords.\n * @param {HTMLElement} TD The cell element.\n * @param {object} blockCalculations An object which allows or disallows changing the selection for the particular axies.\n */\n\n }, {\n key: \"onBeforeOnCellMouseOver\",\n value: function onBeforeOnCellMouseOver(event, coords, TD, blockCalculations) {\n if (coords.row >= 0 || coords.col < 0 || !this.hot.view.isMouseDown()) {\n return;\n }\n\n var _this$hot$getSelected = this.hot.getSelectedRangeLast(),\n from = _this$hot$getSelected.from,\n to = _this$hot$getSelected.to;\n\n var _classPrivateFieldGet5 = _classPrivateFieldGet(this, _stateManager).getHeaderSettings(coords.row, coords.col),\n origColspan = _classPrivateFieldGet5.origColspan;\n\n var lastColIndex = coords.col + origColspan - 1;\n var changeDirection = false;\n\n if (from.col <= to.col) {\n if (coords.col < from.col && lastColIndex === to.col || coords.col < from.col && lastColIndex < from.col || coords.col < from.col && lastColIndex >= from.col && lastColIndex < to.col) {\n changeDirection = true;\n }\n } else if (coords.col < to.col && lastColIndex > from.col || coords.col > from.col || coords.col <= to.col && lastColIndex > from.col || coords.col > to.col && lastColIndex > from.col) {\n changeDirection = true;\n }\n\n if (changeDirection) {\n var _ref5 = [to.col, from.col];\n from.col = _ref5[0];\n to.col = _ref5[1];\n }\n\n if (origColspan > 1) {\n var _this$hot;\n\n blockCalculations.column = true;\n blockCalculations.cell = true;\n var columnRange = [];\n\n if (from.col === to.col) {\n if (lastColIndex <= from.col && coords.col < from.col) {\n columnRange.push(to.col, coords.col);\n } else {\n columnRange.push(coords.col < from.col ? coords.col : from.col, lastColIndex > to.col ? lastColIndex : to.col);\n }\n }\n\n if (from.col < to.col) {\n columnRange.push(coords.col < from.col ? coords.col : from.col, lastColIndex);\n }\n\n if (from.col > to.col) {\n columnRange.push(from.col, coords.col);\n }\n\n (_this$hot = this.hot).selectColumns.apply(_this$hot, columnRange);\n }\n }\n /**\n * `afterGetColumnHeader` hook callback - prepares the header structure.\n *\n * @private\n * @param {Array} renderersArray Array of renderers.\n */\n\n }, {\n key: \"onAfterGetColumnHeaderRenderers\",\n value: function onAfterGetColumnHeaderRenderers(renderersArray) {\n if (renderersArray) {\n renderersArray.length = 0;\n\n for (var headerLayer = 0; headerLayer < _classPrivateFieldGet(this, _stateManager).getLayersCount(); headerLayer++) {\n renderersArray.push(this.headerRendererFactory(headerLayer));\n }\n }\n\n this.updateHeadersHighlight();\n }\n /**\n * Make the renderer render the first nested column in its entirety.\n *\n * @private\n * @param {object} calc Viewport column calculator.\n */\n\n }, {\n key: \"onAfterViewportColumnCalculatorOverride\",\n value: function onAfterViewportColumnCalculatorOverride(calc) {\n var newStartColumn = calc.startColumn;\n\n for (var headerLayer = 0; headerLayer < _classPrivateFieldGet(this, _stateManager).getLayersCount(); headerLayer++) {\n var startColumn = _classPrivateFieldGet(this, _stateManager).findLeftMostColumnIndex(headerLayer, calc.startColumn);\n\n var renderedStartColumn = this.hot.columnIndexMapper.getRenderableFromVisualIndex(startColumn);\n\n if (renderedStartColumn < calc.startColumn) {\n newStartColumn = renderedStartColumn;\n break;\n }\n }\n\n calc.startColumn = newStartColumn;\n }\n /**\n * `modifyColWidth` hook callback - returns width from cache, when is greater than incoming from hook.\n *\n * @private\n * @param {number} width Width from hook.\n * @param {number} column Visual index of an column.\n * @returns {number}\n */\n\n }, {\n key: \"onModifyColWidth\",\n value: function onModifyColWidth(width, column) {\n var cachedWidth = this.ghostTable.widthsCache[column];\n return width > cachedWidth ? width : cachedWidth;\n }\n /**\n * Updates the plugin state after HoT initialization.\n *\n * @private\n */\n\n }, {\n key: \"onInit\",\n value: function onInit() {\n // @TODO: Workaround for broken plugin initialization abstraction.\n this.updatePlugin();\n }\n /**\n * Updates the plugin state after new dataset load.\n *\n * @private\n * @param {Array[]} sourceData Array of arrays or array of objects containing data.\n * @param {boolean} initialLoad Flag that determines whether the data has been loaded\n * during the initialization.\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData(sourceData, initialLoad) {\n if (!initialLoad) {\n this.updatePlugin();\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n _classPrivateFieldSet(this, _stateManager, null);\n\n _get(_getPrototypeOf(NestedHeaders.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n /**\n * @private\n * @type {StateManager}\n */\n\n }]);\n\n return NestedHeaders;\n}(BasePlugin);","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { rangeEach } from \"../../../helpers/number.mjs\";\nimport { objectEach } from \"../../../helpers/object.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\n/**\n * Class responsible for making data operations.\n *\n * @class\n * @private\n */\n\nvar DataManager = /*#__PURE__*/function () {\n function DataManager(nestedRowsPlugin, hotInstance) {\n _classCallCheck(this, DataManager);\n /**\n * Main Handsontable instance reference.\n *\n * @type {object}\n */\n\n\n this.hot = hotInstance;\n /**\n * Reference to the source data object.\n *\n * @type {Handsontable.CellValue[][]|Handsontable.RowObject[]}\n */\n\n this.data = null;\n /**\n * Reference to the NestedRows plugin.\n *\n * @type {object}\n */\n\n this.plugin = nestedRowsPlugin;\n /**\n * Map of row object parents.\n *\n * @type {WeakMap}\n */\n\n this.parentReference = new WeakMap();\n /**\n * Nested structure cache.\n *\n * @type {object}\n */\n\n this.cache = {\n levels: [],\n levelCount: 0,\n rows: [],\n nodeInfo: new WeakMap()\n };\n }\n /**\n * Set the data for the manager.\n *\n * @param {Handsontable.CellValue[][]|Handsontable.RowObject[]} data Data for the manager.\n */\n\n\n _createClass(DataManager, [{\n key: \"setData\",\n value: function setData(data) {\n this.data = data;\n }\n /**\n * Get the data cached in the manager.\n *\n * @returns {Handsontable.CellValue[][]|Handsontable.RowObject[]}\n */\n\n }, {\n key: \"getData\",\n value: function getData() {\n return this.data;\n }\n /**\n * Load the \"raw\" source data, without NestedRows' modifications.\n *\n * @returns {Handsontable.CellValue[][]|Handsontable.RowObject[]}\n */\n\n }, {\n key: \"getRawSourceData\",\n value: function getRawSourceData() {\n var rawSourceData = null;\n this.plugin.disableCoreAPIModifiers();\n rawSourceData = this.hot.getSourceData();\n this.plugin.enableCoreAPIModifiers();\n return rawSourceData;\n }\n /**\n * Update the Data Manager with new data and refresh cache.\n *\n * @param {Handsontable.CellValue[][]|Handsontable.RowObject[]} data Data for the manager.\n */\n\n }, {\n key: \"updateWithData\",\n value: function updateWithData(data) {\n this.setData(data);\n this.rewriteCache();\n }\n /**\n * Rewrite the nested structure cache.\n *\n * @private\n */\n\n }, {\n key: \"rewriteCache\",\n value: function rewriteCache() {\n var _this = this;\n\n this.cache = {\n levels: [],\n levelCount: 0,\n rows: [],\n nodeInfo: new WeakMap()\n };\n rangeEach(0, this.data.length - 1, function (i) {\n _this.cacheNode(_this.data[i], 0, null);\n });\n }\n /**\n * Cache a data node.\n *\n * @private\n * @param {object} node Node to cache.\n * @param {number} level Level of the node.\n * @param {object} parent Parent of the node.\n */\n\n }, {\n key: \"cacheNode\",\n value: function cacheNode(node, level, parent) {\n var _this2 = this;\n\n if (!this.cache.levels[level]) {\n this.cache.levels[level] = [];\n this.cache.levelCount += 1;\n }\n\n this.cache.levels[level].push(node);\n this.cache.rows.push(node);\n this.cache.nodeInfo.set(node, {\n parent: parent,\n row: this.cache.rows.length - 1,\n level: level\n });\n\n if (this.hasChildren(node)) {\n arrayEach(node.__children, function (elem) {\n _this2.cacheNode(elem, level + 1, node);\n });\n }\n }\n /**\n * Get the date for the provided visual row number.\n *\n * @param {number} row Row index.\n * @returns {object}\n */\n\n }, {\n key: \"getDataObject\",\n value: function getDataObject(row) {\n return row === null || row === void 0 ? null : this.cache.rows[row];\n }\n /**\n * Read the row tree in search for a specific row index or row object.\n *\n * @private\n * @param {object} parent The initial parent object.\n * @param {number} readCount Number of read nodes.\n * @param {number} neededIndex The row index we search for.\n * @param {object} neededObject The row object we search for.\n * @returns {number|object}\n */\n\n }, {\n key: \"readTreeNodes\",\n value: function readTreeNodes(parent, readCount, neededIndex, neededObject) {\n var _this3 = this;\n\n var rootLevel = false;\n var readNodesCount = readCount;\n\n if (isNaN(readNodesCount) && readNodesCount.end) {\n return readNodesCount;\n }\n\n var parentObj = parent;\n\n if (!parentObj) {\n parentObj = {\n __children: this.data\n };\n rootLevel = true;\n readNodesCount -= 1;\n }\n\n if (neededIndex !== null && neededIndex !== void 0 && readNodesCount === neededIndex) {\n return {\n result: parentObj,\n end: true\n };\n }\n\n if (neededObject !== null && neededObject !== void 0 && parentObj === neededObject) {\n return {\n result: readNodesCount,\n end: true\n };\n }\n\n readNodesCount += 1;\n\n if (parentObj.__children) {\n arrayEach(parentObj.__children, function (val) {\n _this3.parentReference.set(val, rootLevel ? null : parentObj);\n\n readNodesCount = _this3.readTreeNodes(val, readNodesCount, neededIndex, neededObject);\n\n if (isNaN(readNodesCount) && readNodesCount.end) {\n return false;\n }\n });\n }\n\n return readNodesCount;\n }\n /**\n * Mock a parent node.\n *\n * @private\n * @returns {*}\n */\n\n }, {\n key: \"mockParent\",\n value: function mockParent() {\n var fakeParent = this.mockNode();\n fakeParent.__children = this.data;\n return fakeParent;\n }\n /**\n * Mock a data node.\n *\n * @private\n * @returns {{}}\n */\n\n }, {\n key: \"mockNode\",\n value: function mockNode() {\n var fakeNode = {};\n objectEach(this.data[0], function (val, key) {\n fakeNode[key] = null;\n });\n return fakeNode;\n }\n /**\n * Get the row index for the provided row object.\n *\n * @param {object} rowObj The row object.\n * @returns {number} Row index.\n */\n\n }, {\n key: \"getRowIndex\",\n value: function getRowIndex(rowObj) {\n return rowObj === null || rowObj === void 0 ? null : this.cache.nodeInfo.get(rowObj).row;\n }\n /**\n * Get the index of the provided row index/row object within its parent.\n *\n * @param {number|object} row Row index / row object.\n * @returns {number}\n */\n\n }, {\n key: \"getRowIndexWithinParent\",\n value: function getRowIndexWithinParent(row) {\n var rowObj = null;\n\n if (isNaN(row)) {\n rowObj = row;\n } else {\n rowObj = this.getDataObject(row);\n }\n\n var parent = this.getRowParent(row);\n\n if (parent === null || parent === void 0) {\n return this.data.indexOf(rowObj);\n }\n\n return parent.__children.indexOf(rowObj);\n }\n /**\n * Count all rows (including all parents and children).\n *\n * @returns {number}\n */\n\n }, {\n key: \"countAllRows\",\n value: function countAllRows() {\n var rootNodeMock = {\n __children: this.data\n };\n return this.countChildren(rootNodeMock);\n }\n /**\n * Count children of the provided parent.\n *\n * @param {object|number} parent Parent node.\n * @returns {number} Children count.\n */\n\n }, {\n key: \"countChildren\",\n value: function countChildren(parent) {\n var _this4 = this;\n\n var rowCount = 0;\n var parentNode = parent;\n\n if (!isNaN(parentNode)) {\n parentNode = this.getDataObject(parentNode);\n }\n\n if (!parentNode || !parentNode.__children) {\n return 0;\n }\n\n arrayEach(parentNode.__children, function (elem) {\n rowCount += 1;\n\n if (elem.__children) {\n rowCount += _this4.countChildren(elem);\n }\n });\n return rowCount;\n }\n /**\n * Get the parent of the row at the provided index.\n *\n * @param {number|object} row Physical row index.\n * @returns {object}\n */\n\n }, {\n key: \"getRowParent\",\n value: function getRowParent(row) {\n var rowObject;\n\n if (isNaN(row)) {\n rowObject = row;\n } else {\n rowObject = this.getDataObject(row);\n }\n\n return this.getRowObjectParent(rowObject);\n }\n /**\n * Get the parent of the provided row object.\n *\n * @private\n * @param {object} rowObject The row object (tree node).\n * @returns {object|null}\n */\n\n }, {\n key: \"getRowObjectParent\",\n value: function getRowObjectParent(rowObject) {\n if (!rowObject || _typeof(rowObject) !== 'object') {\n return null;\n }\n\n return this.cache.nodeInfo.get(rowObject).parent;\n }\n /**\n * Get the nesting level for the row with the provided row index.\n *\n * @param {number} row Row index.\n * @returns {number|null} Row level or null, when row doesn't exist.\n */\n\n }, {\n key: \"getRowLevel\",\n value: function getRowLevel(row) {\n var rowObject = null;\n\n if (isNaN(row)) {\n rowObject = row;\n } else {\n rowObject = this.getDataObject(row);\n }\n\n return rowObject ? this.getRowObjectLevel(rowObject) : null;\n }\n /**\n * Get the nesting level for the row with the provided row index.\n *\n * @private\n * @param {object} rowObject Row object.\n * @returns {number} Row level.\n */\n\n }, {\n key: \"getRowObjectLevel\",\n value: function getRowObjectLevel(rowObject) {\n return rowObject === null || rowObject === void 0 ? null : this.cache.nodeInfo.get(rowObject).level;\n }\n /**\n * Check if the provided row/row element has children.\n *\n * @param {number|object} row Row number or row element.\n * @returns {boolean}\n */\n\n }, {\n key: \"hasChildren\",\n value: function hasChildren(row) {\n var rowObj = row;\n\n if (!isNaN(rowObj)) {\n rowObj = this.getDataObject(rowObj);\n }\n\n return !!(rowObj.__children && rowObj.__children.length);\n }\n /**\n * Returns `true` if the row at the provided index has a parent.\n *\n * @param {number} index Row index.\n * @returns {boolean} `true` if the row at the provided index has a parent, `false` otherwise.\n */\n\n }, {\n key: \"isChild\",\n value: function isChild(index) {\n return this.getRowParent(index) !== null;\n }\n /**\n * Return `true` of the row at the provided index is located at the topmost level.\n *\n * @param {number} index Row index.\n * @returns {boolean} `true` of the row at the provided index is located at the topmost level, `false` otherwise.\n */\n\n }, {\n key: \"isRowHighestLevel\",\n value: function isRowHighestLevel(index) {\n return !this.isChild(index);\n }\n /**\n * Return `true` if the provided row index / row object represents a parent in the nested structure.\n *\n * @param {number|object} row Row index / row object.\n * @returns {boolean} `true` if the row is a parent, `false` otherwise.\n */\n\n }, {\n key: \"isParent\",\n value: function isParent(row) {\n var _rowObj$__children;\n\n var rowObj = row;\n\n if (!isNaN(rowObj)) {\n rowObj = this.getDataObject(rowObj);\n }\n\n return rowObj && !!rowObj.__children && ((_rowObj$__children = rowObj.__children) === null || _rowObj$__children === void 0 ? void 0 : _rowObj$__children.length) !== 0;\n }\n /**\n * Add a child to the provided parent. It's optional to add a row object as the \"element\".\n *\n * @param {object} parent The parent row object.\n * @param {object} [element] The element to add as a child.\n */\n\n }, {\n key: \"addChild\",\n value: function addChild(parent, element) {\n var childElement = element;\n this.hot.runHooks('beforeAddChild', parent, childElement);\n var parentIndex = null;\n\n if (parent) {\n parentIndex = this.getRowIndex(parent);\n }\n\n this.hot.runHooks('beforeCreateRow', parentIndex + this.countChildren(parent) + 1, 1);\n var functionalParent = parent;\n\n if (!parent) {\n functionalParent = this.mockParent();\n }\n\n if (!functionalParent.__children) {\n functionalParent.__children = [];\n }\n\n if (!childElement) {\n childElement = this.mockNode();\n }\n\n functionalParent.__children.push(childElement);\n\n this.rewriteCache();\n var newRowIndex = this.getRowIndex(childElement);\n this.hot.rowIndexMapper.insertIndexes(newRowIndex, 1);\n this.hot.runHooks('afterCreateRow', newRowIndex, 1);\n this.hot.runHooks('afterAddChild', parent, childElement);\n }\n /**\n * Add a child node to the provided parent at a specified index.\n *\n * @param {object} parent Parent node.\n * @param {number} index Index to insert the child element at.\n * @param {object} [element] Element (node) to insert.\n */\n\n }, {\n key: \"addChildAtIndex\",\n value: function addChildAtIndex(parent, index, element) {\n var childElement = element;\n\n if (!childElement) {\n childElement = this.mockNode();\n }\n\n this.hot.runHooks('beforeAddChild', parent, childElement, index);\n\n if (parent) {\n this.hot.runHooks('beforeCreateRow', index, 1);\n\n parent.__children.splice(index, null, childElement);\n\n this.plugin.disableCoreAPIModifiers();\n this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(parent), '__children', parent.__children, 'NestedRows.addChildAtIndex');\n this.plugin.enableCoreAPIModifiers();\n this.hot.runHooks('afterCreateRow', index, 1);\n } else {\n this.plugin.disableCoreAPIModifiers();\n this.hot.alter('insert_row', index, 1, 'NestedRows.addChildAtIndex');\n this.plugin.enableCoreAPIModifiers();\n }\n\n this.updateWithData(this.getRawSourceData()); // Workaround for refreshing cache losing the reference to the mocked row.\n\n childElement = this.getDataObject(index);\n this.hot.runHooks('afterAddChild', parent, childElement, index);\n }\n /**\n * Add a sibling element at the specified index.\n *\n * @param {number} index New element sibling's index.\n * @param {('above'|'below')} where Direction in which the sibling is to be created.\n */\n\n }, {\n key: \"addSibling\",\n value: function addSibling(index) {\n var where = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'below';\n var translatedIndex = this.translateTrimmedRow(index);\n var parent = this.getRowParent(translatedIndex);\n var indexWithinParent = this.getRowIndexWithinParent(translatedIndex);\n\n switch (where) {\n case 'below':\n this.addChildAtIndex(parent, indexWithinParent + 1, null);\n break;\n\n case 'above':\n this.addChildAtIndex(parent, indexWithinParent, null);\n break;\n\n default:\n break;\n }\n }\n /**\n * Detach the provided element from its parent and add it right after it.\n *\n * @param {object|Array} elements Row object or an array of selected coordinates.\n * @param {boolean} [forceRender=true] If true (default), it triggers render after finished.\n */\n\n }, {\n key: \"detachFromParent\",\n value: function detachFromParent(elements) {\n var _this5 = this;\n\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var element = null;\n var rowObjects = [];\n\n if (Array.isArray(elements)) {\n rangeEach(elements[0], elements[2], function (i) {\n var translatedIndex = _this5.translateTrimmedRow(i);\n\n rowObjects.push(_this5.getDataObject(translatedIndex));\n });\n rangeEach(0, rowObjects.length - 2, function (i) {\n _this5.detachFromParent(rowObjects[i], false);\n });\n element = rowObjects[rowObjects.length - 1];\n } else {\n element = elements;\n }\n\n var childRowIndex = this.getRowIndex(element);\n var indexWithinParent = this.getRowIndexWithinParent(element);\n var parent = this.getRowParent(element);\n var grandparent = this.getRowParent(parent);\n var grandparentRowIndex = this.getRowIndex(grandparent);\n var movedElementRowIndex = null;\n this.hot.runHooks('beforeDetachChild', parent, element);\n\n if (indexWithinParent !== null && indexWithinParent !== void 0) {\n this.hot.runHooks('beforeRemoveRow', childRowIndex, 1, [childRowIndex], this.plugin.pluginName);\n\n parent.__children.splice(indexWithinParent, 1);\n\n this.rewriteCache();\n this.hot.runHooks('afterRemoveRow', childRowIndex, 1, [childRowIndex], this.plugin.pluginName);\n\n if (grandparent) {\n movedElementRowIndex = grandparentRowIndex + this.countChildren(grandparent);\n this.hot.runHooks('beforeCreateRow', movedElementRowIndex, 1, this.plugin.pluginName);\n\n grandparent.__children.push(element);\n } else {\n movedElementRowIndex = this.hot.countRows() + 1;\n this.hot.runHooks('beforeCreateRow', movedElementRowIndex, 1, this.plugin.pluginName);\n this.data.push(element);\n }\n }\n\n this.rewriteCache();\n this.hot.runHooks('afterCreateRow', movedElementRowIndex, 1, this.plugin.pluginName);\n this.hot.runHooks('afterDetachChild', parent, element);\n\n if (forceRender) {\n this.hot.render();\n }\n }\n /**\n * Filter the data by the `logicRows` array.\n *\n * @private\n * @param {number} index Index of the first row to remove.\n * @param {number} amount Number of elements to remove.\n * @param {Array} logicRows Array of indexes to remove.\n */\n\n }, {\n key: \"filterData\",\n value: function filterData(index, amount, logicRows) {\n var _this6 = this; // TODO: why are the first 2 arguments not used?\n\n\n var elementsToRemove = [];\n arrayEach(logicRows, function (elem) {\n elementsToRemove.push(_this6.getDataObject(elem));\n });\n arrayEach(elementsToRemove, function (elem) {\n var indexWithinParent = _this6.getRowIndexWithinParent(elem);\n\n var tempParent = _this6.getRowParent(elem);\n\n if (tempParent === null) {\n _this6.data.splice(indexWithinParent, 1);\n } else {\n tempParent.__children.splice(indexWithinParent, 1);\n }\n });\n this.rewriteCache();\n }\n /**\n * Used to splice the source data. Needed to properly modify the nested structure, which wouldn't work with the\n * default script.\n *\n * @private\n * @param {number} index Physical index of the element at the splice beginning.\n * @param {number} amount Number of elements to be removed.\n * @param {object[]} elements Array of row objects to add.\n */\n\n }, {\n key: \"spliceData\",\n value: function spliceData(index, amount, elements) {\n var previousElement = this.getDataObject(index - 1);\n var newRowParent = null;\n var indexWithinParent = index;\n\n if (previousElement && previousElement.__children && previousElement.__children.length === 0) {\n newRowParent = previousElement;\n indexWithinParent = 0;\n } else if (index < this.countAllRows()) {\n newRowParent = this.getRowParent(index);\n indexWithinParent = this.getRowIndexWithinParent(index);\n }\n\n if (newRowParent) {\n if (elements) {\n var _newRowParent$__child;\n\n (_newRowParent$__child = newRowParent.__children).splice.apply(_newRowParent$__child, [indexWithinParent, amount].concat(_toConsumableArray(elements)));\n } else {\n newRowParent.__children.splice(indexWithinParent, amount);\n }\n } else if (elements) {\n var _this$data;\n\n (_this$data = this.data).splice.apply(_this$data, [indexWithinParent, amount].concat(_toConsumableArray(elements)));\n } else {\n this.data.splice(indexWithinParent, amount);\n }\n\n this.rewriteCache();\n }\n /**\n * Update the `__children` key of the upmost parent of the provided row object.\n *\n * @private\n * @param {object} rowElement Row object.\n */\n\n }, {\n key: \"syncRowWithRawSource\",\n value: function syncRowWithRawSource(rowElement) {\n var upmostParent = rowElement;\n var tempParent = null;\n\n do {\n tempParent = this.getRowParent(tempParent);\n\n if (tempParent !== null) {\n upmostParent = tempParent;\n }\n } while (tempParent !== null);\n\n this.plugin.disableCoreAPIModifiers();\n this.hot.setSourceDataAtCell(this.getRowIndex(upmostParent), '__children', upmostParent.__children, 'NestedRows.syncRowWithRawSource');\n this.plugin.enableCoreAPIModifiers();\n }\n /* eslint-disable jsdoc/require-param */\n\n /**\n * Move a single row.\n *\n * @param {number} fromIndex Index of the row to be moved.\n * @param {number} toIndex Index of the destination.\n * @param {boolean} moveToCollapsed `true` if moving a row to a collapsed parent.\n * @param {boolean} moveToLastChild `true` if moving a row to be a last child of the new parent.\n */\n\n /* eslint-enable jsdoc/require-param */\n\n }, {\n key: \"moveRow\",\n value: function moveRow(fromIndex, toIndex, moveToCollapsed, moveToLastChild) {\n var moveToLastRow = toIndex === this.hot.countRows();\n var fromParent = this.getRowParent(fromIndex);\n var indexInFromParent = this.getRowIndexWithinParent(fromIndex);\n\n var elemToMove = fromParent.__children.slice(indexInFromParent, indexInFromParent + 1);\n\n var movingUp = fromIndex > toIndex;\n var toParent = moveToLastRow ? this.getRowParent(toIndex - 1) : this.getRowParent(toIndex);\n\n if (toParent === null || toParent === void 0) {\n toParent = this.getRowParent(toIndex - 1);\n }\n\n if (toParent === null || toParent === void 0) {\n toParent = this.getDataObject(toIndex - 1);\n }\n\n if (!toParent) {\n toParent = this.getDataObject(toIndex);\n toParent.__children = [];\n } else if (!toParent.__children) {\n toParent.__children = [];\n }\n\n var indexInTargetParent = moveToLastRow || moveToCollapsed || moveToLastChild ? toParent.__children.length : this.getRowIndexWithinParent(toIndex);\n var sameParent = fromParent === toParent;\n\n toParent.__children.splice(indexInTargetParent, 0, elemToMove[0]);\n\n fromParent.__children.splice(indexInFromParent + (movingUp && sameParent ? 1 : 0), 1); // Sync the changes in the cached data with the actual data stored in HOT.\n\n\n this.syncRowWithRawSource(fromParent);\n\n if (!sameParent) {\n this.syncRowWithRawSource(toParent);\n }\n }\n /**\n * Translate the visual row index to the physical index, taking into consideration the state of collapsed rows.\n *\n * @private\n * @param {number} row Row index.\n * @returns {number}\n */\n\n }, {\n key: \"translateTrimmedRow\",\n value: function translateTrimmedRow(row) {\n if (this.plugin.collapsingUI) {\n return this.plugin.collapsingUI.translateTrimmedRow(row);\n }\n\n return row;\n }\n /**\n * Translate the physical row index to the visual index, taking into consideration the state of collapsed rows.\n *\n * @private\n * @param {number} row Row index.\n * @returns {number}\n */\n\n }, {\n key: \"untranslateTrimmedRow\",\n value: function untranslateTrimmedRow(row) {\n if (this.plugin.collapsingUI) {\n return this.plugin.collapsingUI.untranslateTrimmedRow(row);\n }\n\n return row;\n }\n }]);\n\n return DataManager;\n}();\n\nexport default DataManager;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n/**\n * Base class for the Nested Rows' UI sub-classes.\n *\n * @class\n * @util\n * @private\n */\n\n\nvar BaseUI = function BaseUI(pluginInstance, hotInstance) {\n _classCallCheck(this, BaseUI);\n /**\n * Instance of Handsontable.\n *\n * @type {Core}\n */\n\n\n this.hot = hotInstance;\n /**\n * Reference to the main plugin instance.\n */\n\n this.plugin = pluginInstance;\n};\n\nexport default BaseUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { rangeEach } from \"../../../helpers/number.mjs\";\nimport { addClass } from \"../../../helpers/dom/element.mjs\";\nimport BaseUI from \"./_base.mjs\";\n/**\n * Class responsible for the UI in the Nested Rows' row headers.\n *\n * @class HeadersUI\n * @private\n * @util\n * @augments BaseUI\n */\n\nvar HeadersUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(HeadersUI, _BaseUI);\n\n var _super = _createSuper(HeadersUI);\n\n function HeadersUI(nestedRowsPlugin, hotInstance) {\n var _this;\n\n _classCallCheck(this, HeadersUI);\n\n _this = _super.call(this, nestedRowsPlugin, hotInstance);\n /**\n * Reference to the DataManager instance connected with the Nested Rows plugin.\n *\n * @type {DataManager}\n */\n\n _this.dataManager = _this.plugin.dataManager; // /**\n // * Level cache array.\n // *\n // * @type {Array}\n // */\n // this.levelCache = this.dataManager.cache.levels;\n\n /**\n * Reference to the CollapsingUI instance connected with the Nested Rows plugin.\n *\n * @type {CollapsingUI}\n */\n\n _this.collapsingUI = _this.plugin.collapsingUI;\n /**\n * Cache for the row headers width.\n *\n * @type {null|number}\n */\n\n _this.rowHeaderWidthCache = null;\n return _this;\n }\n /**\n * Append nesting indicators and buttons to the row headers.\n *\n * @private\n * @param {number} row Row index.\n * @param {HTMLElement} TH TH 3element.\n */\n\n\n _createClass(HeadersUI, [{\n key: \"appendLevelIndicators\",\n value: function appendLevelIndicators(row, TH) {\n var rowIndex = this.hot.toPhysicalRow(row);\n var rowLevel = this.dataManager.getRowLevel(rowIndex);\n var rowObject = this.dataManager.getDataObject(rowIndex);\n var innerDiv = TH.getElementsByTagName('DIV')[0];\n var innerSpan = innerDiv.querySelector('span.rowHeader');\n var previousIndicators = innerDiv.querySelectorAll('[class^=\"ht_nesting\"]');\n arrayEach(previousIndicators, function (elem) {\n if (elem) {\n innerDiv.removeChild(elem);\n }\n });\n addClass(TH, HeadersUI.CSS_CLASSES.indicatorContainer);\n\n if (rowLevel) {\n var rootDocument = this.hot.rootDocument;\n var initialContent = innerSpan.cloneNode(true);\n innerDiv.innerHTML = '';\n rangeEach(0, rowLevel - 1, function () {\n var levelIndicator = rootDocument.createElement('SPAN');\n addClass(levelIndicator, HeadersUI.CSS_CLASSES.emptyIndicator);\n innerDiv.appendChild(levelIndicator);\n });\n innerDiv.appendChild(initialContent);\n }\n\n if (this.dataManager.hasChildren(rowObject)) {\n var buttonsContainer = this.hot.rootDocument.createElement('DIV');\n addClass(TH, HeadersUI.CSS_CLASSES.parent);\n\n if (this.collapsingUI.areChildrenCollapsed(rowIndex)) {\n addClass(buttonsContainer, \"\".concat(HeadersUI.CSS_CLASSES.button, \" \").concat(HeadersUI.CSS_CLASSES.expandButton));\n } else {\n addClass(buttonsContainer, \"\".concat(HeadersUI.CSS_CLASSES.button, \" \").concat(HeadersUI.CSS_CLASSES.collapseButton));\n }\n\n innerDiv.appendChild(buttonsContainer);\n }\n }\n /**\n * Update the row header width according to number of levels in the dataset.\n *\n * @private\n * @param {number} deepestLevel Cached deepest level of nesting.\n */\n\n }, {\n key: \"updateRowHeaderWidth\",\n value: function updateRowHeaderWidth(deepestLevel) {\n var deepestLevelIndex = deepestLevel;\n\n if (!deepestLevelIndex) {\n deepestLevelIndex = this.dataManager.cache.levelCount;\n }\n\n this.rowHeaderWidthCache = Math.max(50, 11 + 10 * deepestLevelIndex + 25);\n this.hot.render();\n }\n }], [{\n key: \"CSS_CLASSES\",\n get:\n /**\n * CSS classes used in the row headers.\n *\n * @type {object}\n */\n function get() {\n return {\n indicatorContainer: 'ht_nestingLevels',\n parent: 'ht_nestingParent',\n indicator: 'ht_nestingLevel',\n emptyIndicator: 'ht_nestingLevel_empty',\n button: 'ht_nestingButton',\n expandButton: 'ht_nestingExpand',\n collapseButton: 'ht_nestingCollapse'\n };\n }\n }]);\n\n return HeadersUI;\n}(BaseUI);\n\nexport default HeadersUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.splice.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { stopImmediatePropagation } from \"../../../helpers/dom/event.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport { rangeEach } from \"../../../helpers/number.mjs\";\nimport { hasClass } from \"../../../helpers/dom/element.mjs\";\nimport BaseUI from \"./_base.mjs\";\nimport HeadersUI from \"./headers.mjs\";\n/**\n * Class responsible for the UI for collapsing and expanding groups.\n *\n * @class\n * @util\n * @private\n * @augments BaseUI\n */\n\nvar CollapsingUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(CollapsingUI, _BaseUI);\n\n var _super = _createSuper(CollapsingUI);\n\n function CollapsingUI(nestedRowsPlugin, hotInstance) {\n var _this;\n\n _classCallCheck(this, CollapsingUI);\n\n _this = _super.call(this, nestedRowsPlugin, hotInstance);\n /**\n * Reference to the TrimRows plugin.\n */\n\n _this.dataManager = _this.plugin.dataManager;\n _this.collapsedRows = [];\n _this.collapsedRowsStash = {\n stash: function stash() {\n var forceRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n _this.lastCollapsedRows = _this.collapsedRows.slice(0); // Workaround for wrong indexes being set in the trimRows plugin\n\n _this.expandMultipleChildren(_this.lastCollapsedRows, forceRender);\n },\n shiftStash: function shiftStash(baseIndex, targetIndex) {\n var delta = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (targetIndex === null || targetIndex === void 0) {\n targetIndex = Infinity;\n }\n\n arrayEach(_this.lastCollapsedRows, function (elem, i) {\n if (elem >= baseIndex && elem < targetIndex) {\n _this.lastCollapsedRows[i] = elem + delta;\n }\n });\n },\n applyStash: function applyStash() {\n var forceRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n _this.collapseMultipleChildren(_this.lastCollapsedRows, forceRender);\n\n _this.lastCollapsedRows = void 0;\n },\n trimStash: function trimStash(realElementIndex, amount) {\n rangeEach(realElementIndex, realElementIndex + amount - 1, function (i) {\n var indexOfElement = _this.lastCollapsedRows.indexOf(i);\n\n if (indexOfElement > -1) {\n _this.lastCollapsedRows.splice(indexOfElement, 1);\n }\n });\n }\n };\n return _this;\n }\n /**\n * Collapse the children of the row passed as an argument.\n *\n * @param {number|object} row The parent row.\n * @param {boolean} [forceRender=true] Whether to render the table after the function ends.\n * @param {boolean} [doTrimming=true] I determine whether collapsing should envolve trimming rows.\n * @returns {Array}\n */\n\n\n _createClass(CollapsingUI, [{\n key: \"collapseChildren\",\n value: function collapseChildren(row) {\n var _this2 = this;\n\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var doTrimming = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var rowsToCollapse = [];\n var rowObject = null;\n var rowIndex = null;\n var rowsToTrim = null;\n\n if (isNaN(row)) {\n rowObject = row;\n rowIndex = this.dataManager.getRowIndex(rowObject);\n } else {\n rowObject = this.dataManager.getDataObject(row);\n rowIndex = row;\n }\n\n if (this.dataManager.hasChildren(rowObject)) {\n arrayEach(rowObject.__children, function (elem) {\n rowsToCollapse.push(_this2.dataManager.getRowIndex(elem));\n });\n }\n\n rowsToTrim = this.collapseRows(rowsToCollapse, true, false);\n\n if (doTrimming) {\n this.trimRows(rowsToTrim);\n }\n\n if (forceRender) {\n this.renderAndAdjust();\n }\n\n if (this.collapsedRows.indexOf(rowIndex) === -1) {\n this.collapsedRows.push(rowIndex);\n }\n\n return rowsToTrim;\n }\n /**\n * Collapse multiple children.\n *\n * @param {Array} rows Rows to collapse (including their children).\n * @param {boolean} [forceRender=true] `true` if the table should be rendered after finishing the function.\n * @param {boolean} [doTrimming=true] I determine whether collapsing should envolve trimming rows.\n */\n\n }, {\n key: \"collapseMultipleChildren\",\n value: function collapseMultipleChildren(rows) {\n var _this3 = this;\n\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var doTrimming = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var rowsToTrim = [];\n arrayEach(rows, function (elem) {\n rowsToTrim.push.apply(rowsToTrim, _toConsumableArray(_this3.collapseChildren(elem, false, false)));\n });\n\n if (doTrimming) {\n this.trimRows(rowsToTrim);\n }\n\n if (forceRender) {\n this.renderAndAdjust();\n }\n }\n /**\n * Collapse a single row.\n *\n * @param {number} rowIndex Index of the row to collapse.\n * @param {boolean} [recursive=true] `true` if it should collapse the row's children.\n */\n\n }, {\n key: \"collapseRow\",\n value: function collapseRow(rowIndex) {\n var recursive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n this.collapseRows([rowIndex], recursive);\n }\n /**\n * Collapse multiple rows.\n *\n * @param {Array} rowIndexes Array of row indexes to collapse.\n * @param {boolean} [recursive=true] `true` if it should collapse the rows' children.\n * @param {boolean} [doTrimming=true] I determine whether collapsing should envolve trimming rows.\n * @returns {Array} Rows prepared for trimming (or trimmed, if doTrimming == true).\n */\n\n }, {\n key: \"collapseRows\",\n value: function collapseRows(rowIndexes) {\n var _this4 = this;\n\n var recursive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var doTrimming = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var rowsToTrim = [];\n arrayEach(rowIndexes, function (elem) {\n rowsToTrim.push(elem);\n\n if (recursive) {\n _this4.collapseChildRows(elem, rowsToTrim);\n }\n });\n\n if (doTrimming) {\n this.trimRows(rowsToTrim);\n }\n\n return rowsToTrim;\n }\n /**\n * Collapse child rows of the row at the provided index.\n *\n * @param {number} parentIndex Index of the parent node.\n * @param {Array} [rowsToTrim=[]] Array of rows to trim. Defaults to an empty array.\n * @param {boolean} [recursive] `true` if the collapsing process should be recursive.\n * @param {boolean} [doTrimming=true] I determine whether collapsing should envolve trimming rows.\n */\n\n }, {\n key: \"collapseChildRows\",\n value: function collapseChildRows(parentIndex) {\n var _this5 = this;\n\n var rowsToTrim = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var recursive = arguments.length > 2 ? arguments[2] : undefined;\n var doTrimming = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (this.dataManager.hasChildren(parentIndex)) {\n var parentObject = this.dataManager.getDataObject(parentIndex);\n arrayEach(parentObject.__children, function (elem) {\n var elemIndex = _this5.dataManager.getRowIndex(elem);\n\n rowsToTrim.push(elemIndex);\n\n _this5.collapseChildRows(elemIndex, rowsToTrim);\n });\n }\n\n if (doTrimming) {\n this.trimRows(rowsToTrim);\n }\n }\n /**\n * Expand a single row.\n *\n * @param {number} rowIndex Index of the row to expand.\n * @param {boolean} [recursive=true] `true` if it should expand the row's children recursively.\n */\n\n }, {\n key: \"expandRow\",\n value: function expandRow(rowIndex) {\n var recursive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n this.expandRows([rowIndex], recursive);\n }\n /**\n * Expand multiple rows.\n *\n * @param {Array} rowIndexes Array of indexes of the rows to expand.\n * @param {boolean} [recursive=true] `true` if it should expand the rows' children recursively.\n * @param {boolean} [doTrimming=true] I determine whether collapsing should envolve trimming rows.\n * @returns {Array} Array of row indexes to be untrimmed.\n */\n\n }, {\n key: \"expandRows\",\n value: function expandRows(rowIndexes) {\n var _this6 = this;\n\n var recursive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var doTrimming = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var rowsToUntrim = [];\n arrayEach(rowIndexes, function (elem) {\n rowsToUntrim.push(elem);\n\n if (recursive) {\n _this6.expandChildRows(elem, rowsToUntrim);\n }\n });\n\n if (doTrimming) {\n this.untrimRows(rowsToUntrim);\n }\n\n return rowsToUntrim;\n }\n /**\n * Expand child rows of the provided index.\n *\n * @param {number} parentIndex Index of the parent row.\n * @param {Array} [rowsToUntrim=[]] Array of the rows to be untrimmed.\n * @param {boolean} [recursive] `true` if it should expand the rows' children recursively.\n * @param {boolean} [doTrimming=false] I determine whether collapsing should envolve trimming rows.\n */\n\n }, {\n key: \"expandChildRows\",\n value: function expandChildRows(parentIndex) {\n var _this7 = this;\n\n var rowsToUntrim = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var recursive = arguments.length > 2 ? arguments[2] : undefined;\n var doTrimming = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (this.dataManager.hasChildren(parentIndex)) {\n var parentObject = this.dataManager.getDataObject(parentIndex);\n arrayEach(parentObject.__children, function (elem) {\n if (!_this7.isAnyParentCollapsed(elem)) {\n var elemIndex = _this7.dataManager.getRowIndex(elem);\n\n rowsToUntrim.push(elemIndex);\n\n _this7.expandChildRows(elemIndex, rowsToUntrim);\n }\n });\n }\n\n if (doTrimming) {\n this.untrimRows(rowsToUntrim);\n }\n }\n /**\n * Expand the children of the row passed as an argument.\n *\n * @param {number|object} row Parent row.\n * @param {boolean} [forceRender=true] Whether to render the table after the function ends.\n * @param {boolean} [doTrimming=true] If set to `true`, the trimming will be applied when the function finishes.\n * @returns {number[]}\n */\n\n }, {\n key: \"expandChildren\",\n value: function expandChildren(row) {\n var _this8 = this;\n\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var doTrimming = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var rowsToExpand = [];\n var rowObject = null;\n var rowIndex = null;\n var rowsToUntrim = null;\n\n if (isNaN(row)) {\n rowObject = row;\n rowIndex = this.dataManager.getRowIndex(row);\n } else {\n rowObject = this.dataManager.getDataObject(row);\n rowIndex = row;\n }\n\n this.collapsedRows.splice(this.collapsedRows.indexOf(rowIndex), 1);\n\n if (this.dataManager.hasChildren(rowObject)) {\n arrayEach(rowObject.__children, function (elem) {\n var childIndex = _this8.dataManager.getRowIndex(elem);\n\n rowsToExpand.push(childIndex);\n });\n }\n\n rowsToUntrim = this.expandRows(rowsToExpand, true, false);\n\n if (doTrimming) {\n this.untrimRows(rowsToUntrim);\n }\n\n if (forceRender) {\n this.renderAndAdjust();\n }\n\n return rowsToUntrim;\n }\n /**\n * Expand multiple rows' children.\n *\n * @param {Array} rows Array of rows which children are about to be expanded.\n * @param {boolean} [forceRender=true] `true` if the table should render after finishing the function.\n * @param {boolean} [doTrimming=true] `true` if the rows should be untrimmed after finishing the function.\n */\n\n }, {\n key: \"expandMultipleChildren\",\n value: function expandMultipleChildren(rows) {\n var _this9 = this;\n\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var doTrimming = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var rowsToUntrim = [];\n arrayEach(rows, function (elem) {\n rowsToUntrim.push.apply(rowsToUntrim, _toConsumableArray(_this9.expandChildren(elem, false, false)));\n });\n\n if (doTrimming) {\n this.untrimRows(rowsToUntrim);\n }\n\n if (forceRender) {\n this.renderAndAdjust();\n }\n }\n /**\n * Collapse all collapsable rows.\n */\n\n }, {\n key: \"collapseAll\",\n value: function collapseAll() {\n var _this10 = this;\n\n var data = this.dataManager.getData();\n var parentsToCollapse = [];\n arrayEach(data, function (elem) {\n if (_this10.dataManager.hasChildren(elem)) {\n parentsToCollapse.push(elem);\n }\n });\n this.collapseMultipleChildren(parentsToCollapse);\n this.renderAndAdjust();\n }\n /**\n * Expand all collapsable rows.\n */\n\n }, {\n key: \"expandAll\",\n value: function expandAll() {\n var _this11 = this;\n\n var data = this.dataManager.getData();\n var parentsToExpand = [];\n arrayEach(data, function (elem) {\n if (_this11.dataManager.hasChildren(elem)) {\n parentsToExpand.push(elem);\n }\n });\n this.expandMultipleChildren(parentsToExpand);\n this.renderAndAdjust();\n }\n /**\n * Trim rows.\n *\n * @param {Array} rows Physical row indexes.\n */\n\n }, {\n key: \"trimRows\",\n value: function trimRows(rows) {\n var _this12 = this;\n\n this.hot.batchExecution(function () {\n arrayEach(rows, function (physicalRow) {\n _this12.plugin.collapsedRowsMap.setValueAtIndex(physicalRow, true);\n });\n }, true);\n }\n /**\n * Untrim rows.\n *\n * @param {Array} rows Physical row indexes.\n */\n\n }, {\n key: \"untrimRows\",\n value: function untrimRows(rows) {\n var _this13 = this;\n\n this.hot.batchExecution(function () {\n arrayEach(rows, function (physicalRow) {\n _this13.plugin.collapsedRowsMap.setValueAtIndex(physicalRow, false);\n });\n }, true);\n }\n /**\n * Check if all child rows are collapsed.\n *\n * @private\n * @param {number|object|null} row The parent row. `null` for the top level.\n * @returns {boolean}\n */\n\n }, {\n key: \"areChildrenCollapsed\",\n value: function areChildrenCollapsed(row) {\n var _this14 = this;\n\n var rowObj = isNaN(row) ? row : this.dataManager.getDataObject(row);\n var allCollapsed = true; // Checking the children of the top-level \"parent\"\n\n if (rowObj === null) {\n rowObj = {\n __children: this.dataManager.data\n };\n }\n\n if (this.dataManager.hasChildren(rowObj)) {\n arrayEach(rowObj.__children, function (elem) {\n var rowIndex = _this14.dataManager.getRowIndex(elem);\n\n if (!_this14.plugin.collapsedRowsMap.getValueAtIndex(rowIndex)) {\n allCollapsed = false;\n return false;\n }\n });\n }\n\n return allCollapsed;\n }\n /**\n * Check if any of the row object parents are collapsed.\n *\n * @private\n * @param {object} rowObj Row object.\n * @returns {boolean}\n */\n\n }, {\n key: \"isAnyParentCollapsed\",\n value: function isAnyParentCollapsed(rowObj) {\n var parent = rowObj;\n\n while (parent !== null) {\n parent = this.dataManager.getRowParent(parent);\n var parentIndex = this.dataManager.getRowIndex(parent);\n\n if (this.collapsedRows.indexOf(parentIndex) > -1) {\n return true;\n }\n }\n\n return false;\n }\n /**\n * Toggle collapsed state. Callback for the `beforeOnCellMousedown` hook.\n *\n * @private\n * @param {MouseEvent} event `mousedown` event.\n * @param {object} coords Coordinates of the clicked cell/header.\n */\n\n }, {\n key: \"toggleState\",\n value: function toggleState(event, coords) {\n if (coords.col >= 0) {\n return;\n }\n\n var row = this.translateTrimmedRow(coords.row);\n\n if (hasClass(event.target, HeadersUI.CSS_CLASSES.button)) {\n if (this.areChildrenCollapsed(row)) {\n this.expandChildren(row);\n } else {\n this.collapseChildren(row);\n }\n\n stopImmediatePropagation(event);\n }\n }\n /**\n * Translate visual row after trimming to physical base row index.\n *\n * @private\n * @param {number} row Row index.\n * @returns {number} Base row index.\n */\n\n }, {\n key: \"translateTrimmedRow\",\n value: function translateTrimmedRow(row) {\n return this.hot.toPhysicalRow(row);\n }\n /**\n * Translate physical row after trimming to visual base row index.\n *\n * @private\n * @param {number} row Row index.\n * @returns {number} Base row index.\n */\n\n }, {\n key: \"untranslateTrimmedRow\",\n value: function untranslateTrimmedRow(row) {\n return this.hot.toVisualRow(row);\n }\n /**\n * Helper function to render the table and call the `adjustElementsSize` method.\n *\n * @private\n */\n\n }, {\n key: \"renderAndAdjust\",\n value: function renderAndAdjust() {\n this.hot.render(); // Dirty workaround to prevent scroll height not adjusting to the table height. Needs refactoring in the future.\n\n this.hot.view.adjustElementsSize();\n }\n }]);\n\n return CollapsingUI;\n}(BaseUI);\n\nexport default CollapsingUI;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { rangeEach } from \"../../../helpers/number.mjs\";\nimport { arrayEach } from \"../../../helpers/array.mjs\";\nimport * as C from \"../../../i18n/constants.mjs\";\nimport BaseUI from \"./_base.mjs\";\nvar privatePool = new WeakMap();\n/**\n * Class responsible for the Context Menu entries for the Nested Rows plugin.\n *\n * @class ContextMenuUI\n * @util\n * @private\n * @augments BaseUI\n */\n\nvar ContextMenuUI = /*#__PURE__*/function (_BaseUI) {\n _inherits(ContextMenuUI, _BaseUI);\n\n var _super = _createSuper(ContextMenuUI);\n\n function ContextMenuUI(nestedRowsPlugin, hotInstance) {\n var _this;\n\n _classCallCheck(this, ContextMenuUI);\n\n _this = _super.call(this, nestedRowsPlugin, hotInstance);\n privatePool.set(_assertThisInitialized(_this), {\n row_above: function row_above(key, selection) {\n var lastSelection = selection[selection.length - 1];\n\n _this.dataManager.addSibling(lastSelection.start.row, 'above');\n },\n row_below: function row_below(key, selection) {\n var lastSelection = selection[selection.length - 1];\n\n _this.dataManager.addSibling(lastSelection.start.row, 'below');\n }\n });\n /**\n * Reference to the DataManager instance connected with the Nested Rows plugin.\n *\n * @type {DataManager}\n */\n\n _this.dataManager = _this.plugin.dataManager;\n return _this;\n }\n /**\n * Append options to the context menu. (Propagated from the `afterContextMenuDefaultOptions` hook callback)\n * f.\n *\n * @private\n * @param {object} defaultOptions Default context menu options.\n * @returns {*}\n */\n\n\n _createClass(ContextMenuUI, [{\n key: \"appendOptions\",\n value: function appendOptions(defaultOptions) {\n var _this2 = this;\n\n var newEntries = [{\n key: 'add_child',\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD);\n },\n callback: function callback() {\n var translatedRowIndex = _this2.dataManager.translateTrimmedRow(_this2.hot.getSelectedLast()[0]);\n\n var parent = _this2.dataManager.getDataObject(translatedRowIndex);\n\n _this2.dataManager.addChild(parent);\n },\n disabled: function disabled() {\n var selected = _this2.hot.getSelectedLast();\n\n return !selected || selected[0] < 0 || _this2.hot.selection.isSelectedByColumnHeader() || _this2.hot.countRows() >= _this2.hot.getSettings().maxRows;\n }\n }, {\n key: 'detach_from_parent',\n name: function name() {\n return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD);\n },\n callback: function callback() {\n _this2.dataManager.detachFromParent(_this2.hot.getSelectedLast());\n },\n disabled: function disabled() {\n var selected = _this2.hot.getSelectedLast();\n\n var translatedRowIndex = _this2.dataManager.translateTrimmedRow(selected[0]);\n\n var parent = _this2.dataManager.getRowParent(translatedRowIndex);\n\n return !parent || !selected || selected[0] < 0 || _this2.hot.selection.isSelectedByColumnHeader() || _this2.hot.countRows() >= _this2.hot.getSettings().maxRows;\n }\n }, {\n name: '---------'\n }];\n rangeEach(0, defaultOptions.items.length - 1, function (i) {\n if (i === 0) {\n arrayEach(newEntries, function (val, j) {\n defaultOptions.items.splice(i + j, 0, val);\n });\n return false;\n }\n });\n return this.modifyRowInsertingOptions(defaultOptions);\n }\n /**\n * Modify how the row inserting options work.\n *\n * @private\n * @param {object} defaultOptions Default context menu items.\n * @returns {*}\n */\n\n }, {\n key: \"modifyRowInsertingOptions\",\n value: function modifyRowInsertingOptions(defaultOptions) {\n var priv = privatePool.get(this);\n rangeEach(0, defaultOptions.items.length - 1, function (i) {\n var option = priv[defaultOptions.items[i].key];\n\n if (option !== null && option !== void 0) {\n defaultOptions.items[i].callback = option;\n }\n });\n return defaultOptions;\n }\n }]);\n\n return ContextMenuUI;\n}(BaseUI);\n\nexport default ContextMenuUI;","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.some.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\n\nvar _templateObject;\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { isUndefined } from \"../../../helpers/mixed.mjs\";\nimport { warn } from \"../../../helpers/console.mjs\";\nimport { toSingleLine } from \"../../../helpers/templateLiteralTag.mjs\";\nimport { CellCoords } from \"../../../3rdparty/walkontable/src/index.mjs\";\n/**\n * Helper class for the row-move-related operations.\n *\n * @class RowMoveController\n * @plugin NestedRows\n * @private\n */\n\nvar RowMoveController = /*#__PURE__*/function () {\n function RowMoveController(plugin) {\n _classCallCheck(this, RowMoveController);\n /**\n * Reference to the Nested Rows plugin instance.\n *\n * @type {NestedRows}\n */\n\n\n this.plugin = plugin;\n /**\n * Reference to the Handsontable instance.\n *\n * @type {Handsontable.Core}\n */\n\n this.hot = plugin.hot;\n /**\n * Reference to the Data Manager class instance.\n *\n * @type {DataManager}\n */\n\n this.dataManager = plugin.dataManager;\n /**\n * Reference to the Collapsing UI class instance.\n *\n * @type {CollapsingUI}\n */\n\n this.collapsingUI = plugin.collapsingUI;\n }\n /**\n * `beforeRowMove` hook callback.\n *\n * @param {Array} rows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements\n * will be placed after the moving action. To check the visualization of the final index, please take a look at\n * [documentation](/docs/demo-moving.html).\n * @param {undefined|number} dropIndex Visual row index, being a drop index for the moved rows. Points to where we\n * are going to drop the moved elements. To check visualization of drop index please take a look at\n * [documentation](/docs/demo-moving.html).\n * @param {boolean} movePossible Indicates if it's possible to move rows to the desired position.\n * @fires Hooks#afterRowMove\n * @returns {boolean}\n */\n\n\n _createClass(RowMoveController, [{\n key: \"onBeforeRowMove\",\n value: function onBeforeRowMove(rows, finalIndex, dropIndex, movePossible) {\n var _this = this;\n\n var improperUsage = this.displayAPICompatibilityWarning({\n rows: rows,\n finalIndex: finalIndex,\n dropIndex: dropIndex,\n movePossible: movePossible\n });\n\n if (improperUsage) {\n return false;\n }\n\n this.movedToCollapsed = false;\n var dropToLastRow = dropIndex === this.hot.countRows();\n var physicalDropIndex = dropToLastRow ? this.hot.countSourceRows() : this.dataManager.translateTrimmedRow(dropIndex);\n var allowMove = true;\n var physicalStartIndexes = rows.map(function (rowIndex) {\n // Don't do the logic for the rest of the rows, as it's bound to fail anyway.\n if (!allowMove) {\n return false;\n }\n\n var physicalRowIndex = _this.dataManager.translateTrimmedRow(rowIndex);\n\n allowMove = _this.shouldAllowMoving(physicalRowIndex, physicalDropIndex);\n return physicalRowIndex;\n });\n var willDataChange = physicalStartIndexes.indexOf(physicalDropIndex) === -1;\n\n if (!allowMove || !willDataChange) {\n return false;\n }\n\n var baseParent = this.getBaseParent(physicalStartIndexes);\n var targetParent = this.getTargetParent(dropToLastRow, physicalDropIndex);\n var sameParent = baseParent === targetParent;\n this.movedToCollapsed = this.collapsingUI.areChildrenCollapsed(targetParent); // Stash the current state of collapsed rows\n\n this.collapsingUI.collapsedRowsStash.stash();\n this.shiftCollapsibleParentsLocations(physicalStartIndexes, physicalDropIndex, sameParent);\n this.moveRows(physicalStartIndexes, physicalDropIndex, targetParent);\n this.dataManager.updateWithData(this.dataManager.getRawSourceData());\n this.moveCellsMeta(physicalStartIndexes, physicalDropIndex);\n this.collapsingUI.collapsedRowsStash.applyStash(false); // TODO: Trying to mock real work of the `ManualRowMove` plugin. It was blocked by returning `false` below.\n\n this.hot.runHooks('afterRowMove', rows, finalIndex, dropIndex, movePossible, movePossible && this.isRowOrderChanged(rows, finalIndex)); // Not necessary - added to keep compatibility with other plugins (namely: columnSummary).\n\n this.hot.render();\n this.selectCells(rows, dropIndex);\n return false;\n }\n /**\n * Display a `dragRows`/`moveRows` method compatibility warning if needed.\n *\n * @param {object} beforeMoveRowHookArgs A set of arguments from the `beforeMoveRow` hook.\n * @returns {boolean} `true` if is a result of an improper usage of the moving API.\n */\n\n }, {\n key: \"displayAPICompatibilityWarning\",\n value: function displayAPICompatibilityWarning(beforeMoveRowHookArgs) {\n var rows = beforeMoveRowHookArgs.rows,\n finalIndex = beforeMoveRowHookArgs.finalIndex,\n dropIndex = beforeMoveRowHookArgs.dropIndex,\n movePossible = beforeMoveRowHookArgs.movePossible;\n var shouldTerminate = false;\n\n if (isUndefined(dropIndex)) {\n warn(toSingleLine(_templateObject || (_templateObject = _taggedTemplateLiteral([\"Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows \\n when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.\"], [\"Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\\\\x20\\n when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.\"])))); // TODO: Trying to mock real work of the `ManualRowMove` plugin. It was blocked by returning `false` below.\n\n this.hot.runHooks('afterRowMove', rows, finalIndex, dropIndex, movePossible, false);\n shouldTerminate = true;\n }\n\n return shouldTerminate;\n }\n /**\n * Check if the moving action should be allowed.\n *\n * @param {number} physicalRowIndex Physical start row index.\n * @param {number} physicalDropIndex Physical drop index.\n * @returns {boolean} `true` if it should continue with the moving action.\n */\n\n }, {\n key: \"shouldAllowMoving\",\n value: function shouldAllowMoving(physicalRowIndex, physicalDropIndex) {\n /*\n We can't move rows when any of them is:\n - a parent\n - a top-level element\n - is being moved to the top level\n - is being moved to the position of any of the moved rows (not changing position)\n */\n return !(this.dataManager.isParent(physicalRowIndex) || this.dataManager.isRowHighestLevel(physicalRowIndex) || physicalRowIndex === physicalDropIndex || physicalDropIndex === 0);\n }\n /**\n * Get the base row parent.\n *\n * @param {number} physicalStartIndexes Physical start row index.\n * @returns {object|null} The base row parent.\n */\n\n }, {\n key: \"getBaseParent\",\n value: function getBaseParent(physicalStartIndexes) {\n return this.dataManager.getRowParent(physicalStartIndexes[0]);\n }\n /**\n * Get the target row parent.\n *\n * @param {boolean} dropToLastRow `true` if the row is moved to the last row of the table.\n * @param {number} physicalDropIndex Physical drop row index.\n * @returns {object|null} The target row parent.\n */\n\n }, {\n key: \"getTargetParent\",\n value: function getTargetParent(dropToLastRow, physicalDropIndex) {\n var targetParent = this.dataManager.getRowParent(dropToLastRow ? physicalDropIndex - 1 : physicalDropIndex); // If we try to move an element to the place of a top-level parent, snap the element to the previous top-level\n // parent's children instead\n\n if (targetParent === null || targetParent === void 0) {\n targetParent = this.dataManager.getRowParent(physicalDropIndex - 1);\n }\n\n return targetParent;\n }\n /**\n * Shift the cached collapsible rows position according to the move action.\n *\n * @param {number[]} physicalStartIndexes Physical start row indexes.\n * @param {number} physicalDropIndex Physical drop index.\n * @param {boolean} sameParent `true` if the row's being moved between siblings of the same parent.\n */\n\n }, {\n key: \"shiftCollapsibleParentsLocations\",\n value: function shiftCollapsibleParentsLocations(physicalStartIndexes, physicalDropIndex, sameParent) {\n if (!sameParent) {\n if (Math.max.apply(Math, _toConsumableArray(physicalStartIndexes)) <= physicalDropIndex) {\n this.collapsingUI.collapsedRowsStash.shiftStash(physicalStartIndexes[0], physicalDropIndex, -1 * physicalStartIndexes.length);\n } else {\n this.collapsingUI.collapsedRowsStash.shiftStash(physicalDropIndex, physicalStartIndexes[0], physicalStartIndexes.length);\n }\n }\n }\n /**\n * Move the rows at the provided coordinates.\n *\n * @param {number[]} physicalStartIndexes Physical indexes of the rows about to be moved.\n * @param {number} physicalDropIndex Physical drop index.\n * @param {object} targetParent Parent of the destination row.\n */\n\n }, {\n key: \"moveRows\",\n value: function moveRows(physicalStartIndexes, physicalDropIndex, targetParent) {\n var _this2 = this;\n\n var moveToLastChild = physicalDropIndex === this.dataManager.getRowIndex(targetParent) + this.dataManager.countChildren(targetParent) + 1;\n this.hot.batchRender(function () {\n physicalStartIndexes.forEach(function (physicalStartIndex) {\n _this2.dataManager.moveRow(physicalStartIndex, physicalDropIndex, _this2.movedToCollapsed, moveToLastChild);\n });\n });\n }\n /**\n * Move the cell meta for multiple rows.\n *\n * @param {number[]} baseIndexes Array of indexes for the rows being moved.\n * @param {number} targetIndex Index of the destination of the move.\n */\n\n }, {\n key: \"moveCellsMeta\",\n value: function moveCellsMeta(baseIndexes, targetIndex) {\n var _this3 = this,\n _this$hot;\n\n var rowsOfMeta = [];\n var movingDown = Math.max.apply(Math, _toConsumableArray(baseIndexes)) < targetIndex;\n baseIndexes.forEach(function (baseIndex) {\n rowsOfMeta.push(_this3.hot.getCellMetaAtRow(baseIndex));\n });\n this.hot.spliceCellsMeta(baseIndexes[0], baseIndexes.length);\n\n (_this$hot = this.hot).spliceCellsMeta.apply(_this$hot, [targetIndex - (movingDown ? rowsOfMeta.length : 0), 0].concat(rowsOfMeta));\n }\n /**\n * Select cells after the move.\n *\n * @param {Array} rows Array of visual row indexes to be moved.\n * @param {undefined|number} dropIndex Visual row index, being a drop index for the moved rows. Points to where we\n * are going to drop the moved elements. To check visualization of drop index please take a look at\n * [documentation](/docs/demo-moving.html).\n */\n\n }, {\n key: \"selectCells\",\n value: function selectCells(rows, dropIndex) {\n var rowsLen = rows.length;\n var startRow = 0;\n var endRow = 0;\n var selection = null;\n var lastColIndex = null;\n\n if (this.movedToCollapsed) {\n var physicalDropIndex = null;\n\n if (rows[rowsLen - 1] < dropIndex) {\n physicalDropIndex = this.dataManager.translateTrimmedRow(dropIndex - rowsLen);\n } else {\n physicalDropIndex = this.dataManager.translateTrimmedRow(dropIndex);\n }\n\n var parentObject = this.dataManager.getRowParent(physicalDropIndex === null ? this.hot.countSourceRows() - 1 : physicalDropIndex - 1);\n var parentIndex = this.dataManager.getRowIndex(parentObject);\n startRow = this.dataManager.untranslateTrimmedRow(parentIndex);\n endRow = startRow;\n } else if (rows[rowsLen - 1] < dropIndex) {\n endRow = dropIndex - 1;\n startRow = endRow - rowsLen + 1;\n } else {\n startRow = dropIndex;\n endRow = startRow + rowsLen - 1;\n }\n\n selection = this.hot.selection;\n lastColIndex = this.hot.countCols() - 1;\n selection.setRangeStart(new CellCoords(startRow, 0));\n selection.setRangeEnd(new CellCoords(endRow, lastColIndex), true);\n } // TODO: Reimplementation of function which is inside the `ManualRowMove` plugin.\n\n /**\n * Indicates if order of rows was changed.\n *\n * @param {Array} movedRows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements\n * will be placed after the moving action. To check the visualization of the final index, please take a look at\n * [documentation](/docs/demo-moving.html).\n * @returns {boolean}\n */\n\n }, {\n key: \"isRowOrderChanged\",\n value: function isRowOrderChanged(movedRows, finalIndex) {\n return movedRows.some(function (row, nrOfMovedElement) {\n return row - nrOfMovedElement !== finalIndex;\n });\n }\n }]);\n\n return RowMoveController;\n}();\n\nexport { RowMoveController as default };","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.for-each.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.reduce.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.weak-map.js\";\nimport \"core-js/modules/web.dom-collections.for-each.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport DataManager from \"./data/dataManager.mjs\";\nimport CollapsingUI from \"./ui/collapsing.mjs\";\nimport HeadersUI from \"./ui/headers.mjs\";\nimport ContextMenuUI from \"./ui/contextMenu.mjs\";\nimport { TrimmingMap } from \"../../translations/index.mjs\";\nimport RowMoveController from \"./utils/rowMoveController.mjs\";\nexport var PLUGIN_KEY = 'nestedRows';\nexport var PLUGIN_PRIORITY = 300;\nvar privatePool = new WeakMap();\n/**\n * @plugin NestedRows\n *\n * @description\n * Plugin responsible for displaying and operating on data sources with nested structures.\n */\n\nexport var NestedRows = /*#__PURE__*/function (_BasePlugin) {\n _inherits(NestedRows, _BasePlugin);\n\n var _super = _createSuper(NestedRows);\n\n function NestedRows(hotInstance) {\n var _this;\n\n _classCallCheck(this, NestedRows);\n\n _this = _super.call(this, hotInstance);\n /**\n * Reference to the DataManager instance.\n *\n * @private\n * @type {object}\n */\n\n _this.dataManager = null;\n /**\n * Reference to the HeadersUI instance.\n *\n * @private\n * @type {object}\n */\n\n _this.headersUI = null;\n /**\n * Map of skipped rows by plugin.\n *\n * @private\n * @type {null|TrimmingMap}\n */\n\n _this.collapsedRowsMap = null;\n privatePool.set(_assertThisInitialized(_this), {\n movedToCollapsed: false,\n skipRender: null,\n skipCoreAPIModifiers: false\n });\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link NestedRows#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(NestedRows, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.collapsedRowsMap = this.hot.rowIndexMapper.registerMap('nestedRows', new TrimmingMap());\n this.dataManager = new DataManager(this, this.hot);\n this.collapsingUI = new CollapsingUI(this, this.hot);\n this.headersUI = new HeadersUI(this, this.hot);\n this.contextMenuUI = new ContextMenuUI(this, this.hot);\n this.rowMoveController = new RowMoveController(this);\n this.addHook('afterInit', function () {\n return _this2.onAfterInit.apply(_this2, arguments);\n });\n this.addHook('beforeRender', function () {\n return _this2.onBeforeRender.apply(_this2, arguments);\n });\n this.addHook('modifyRowData', function () {\n return _this2.onModifyRowData.apply(_this2, arguments);\n });\n this.addHook('modifySourceLength', function () {\n return _this2.onModifySourceLength.apply(_this2, arguments);\n });\n this.addHook('beforeDataSplice', function () {\n return _this2.onBeforeDataSplice.apply(_this2, arguments);\n });\n this.addHook('beforeDataFilter', function () {\n return _this2.onBeforeDataFilter.apply(_this2, arguments);\n });\n this.addHook('afterContextMenuDefaultOptions', function () {\n return _this2.onAfterContextMenuDefaultOptions.apply(_this2, arguments);\n });\n this.addHook('afterGetRowHeader', function () {\n return _this2.onAfterGetRowHeader.apply(_this2, arguments);\n });\n this.addHook('beforeOnCellMouseDown', function () {\n return _this2.onBeforeOnCellMouseDown.apply(_this2, arguments);\n });\n this.addHook('beforeRemoveRow', function () {\n return _this2.onBeforeRemoveRow.apply(_this2, arguments);\n });\n this.addHook('afterRemoveRow', function () {\n return _this2.onAfterRemoveRow.apply(_this2, arguments);\n });\n this.addHook('beforeAddChild', function () {\n return _this2.onBeforeAddChild.apply(_this2, arguments);\n });\n this.addHook('afterAddChild', function () {\n return _this2.onAfterAddChild.apply(_this2, arguments);\n });\n this.addHook('beforeDetachChild', function () {\n return _this2.onBeforeDetachChild.apply(_this2, arguments);\n });\n this.addHook('afterDetachChild', function () {\n return _this2.onAfterDetachChild.apply(_this2, arguments);\n });\n this.addHook('modifyRowHeaderWidth', function () {\n return _this2.onModifyRowHeaderWidth.apply(_this2, arguments);\n });\n this.addHook('afterCreateRow', function () {\n return _this2.onAfterCreateRow.apply(_this2, arguments);\n });\n this.addHook('beforeRowMove', function () {\n return _this2.onBeforeRowMove.apply(_this2, arguments);\n });\n this.addHook('beforeLoadData', function (data) {\n return _this2.onBeforeLoadData(data);\n });\n\n _get(_getPrototypeOf(NestedRows.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.hot.rowIndexMapper.unregisterMap('nestedRows');\n\n _get(_getPrototypeOf(NestedRows.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n var vanillaSourceData = this.hot.getSourceData();\n this.enablePlugin();\n this.dataManager.updateWithData(vanillaSourceData);\n\n _get(_getPrototypeOf(NestedRows.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * `beforeRowMove` hook callback.\n *\n * @private\n * @param {Array} rows Array of visual row indexes to be moved.\n * @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements\n * will be placed after the moving action. To check the visualization of the final index, please take a look at\n * [documentation](/docs/demo-moving.html).\n * @param {undefined|number} dropIndex Visual row index, being a drop index for the moved rows. Points to where we\n * are going to drop the moved elements. To check visualization of drop index please take a look at\n * [documentation](/docs/demo-moving.html).\n * @param {boolean} movePossible Indicates if it's possible to move rows to the desired position.\n * @fires Hooks#afterRowMove\n * @returns {boolean}\n */\n\n }, {\n key: \"onBeforeRowMove\",\n value: function onBeforeRowMove(rows, finalIndex, dropIndex, movePossible) {\n return this.rowMoveController.onBeforeRowMove(rows, finalIndex, dropIndex, movePossible);\n }\n /**\n * Enable the modify hook skipping flag - allows retrieving the data from Handsontable without this plugin's\n * modifications.\n */\n\n }, {\n key: \"disableCoreAPIModifiers\",\n value: function disableCoreAPIModifiers() {\n var priv = privatePool.get(this);\n priv.skipCoreAPIModifiers = true;\n }\n /**\n * Disable the modify hook skipping flag.\n */\n\n }, {\n key: \"enableCoreAPIModifiers\",\n value: function enableCoreAPIModifiers() {\n var priv = privatePool.get(this);\n priv.skipCoreAPIModifiers = false;\n }\n /**\n * `beforeOnCellMousedown` hook callback.\n *\n * @private\n * @param {MouseEvent} event Mousedown event.\n * @param {object} coords Cell coords.\n * @param {HTMLElement} TD Clicked cell.\n */\n\n }, {\n key: \"onBeforeOnCellMouseDown\",\n value: function onBeforeOnCellMouseDown(event, coords, TD) {\n this.collapsingUI.toggleState(event, coords, TD);\n }\n /**\n * The modifyRowData hook callback.\n *\n * @private\n * @param {number} row Visual row index.\n * @returns {boolean}\n */\n\n }, {\n key: \"onModifyRowData\",\n value: function onModifyRowData(row) {\n var priv = privatePool.get(this);\n\n if (priv.skipCoreAPIModifiers) {\n return;\n }\n\n return this.dataManager.getDataObject(row);\n }\n /**\n * Modify the source data length to match the length of the nested structure.\n *\n * @private\n * @returns {number}\n */\n\n }, {\n key: \"onModifySourceLength\",\n value: function onModifySourceLength() {\n var priv = privatePool.get(this);\n\n if (priv.skipCoreAPIModifiers) {\n return;\n }\n\n return this.dataManager.countAllRows();\n }\n /**\n * @private\n * @param {number} index The index where the data was spliced.\n * @param {number} amount An amount of items to remove.\n * @param {object} element An element to add.\n * @returns {boolean}\n */\n\n }, {\n key: \"onBeforeDataSplice\",\n value: function onBeforeDataSplice(index, amount, element) {\n var priv = privatePool.get(this);\n\n if (priv.skipCoreAPIModifiers || this.dataManager.isRowHighestLevel(index)) {\n return true;\n }\n\n this.dataManager.spliceData(index, amount, element);\n return false;\n }\n /**\n * Called before the source data filtering. Returning `false` stops the native filtering.\n *\n * @private\n * @param {number} index The index where the data filtering starts.\n * @param {number} amount An amount of rows which filtering applies to.\n * @param {number} physicalRows Physical row indexes.\n * @returns {boolean}\n */\n\n }, {\n key: \"onBeforeDataFilter\",\n value: function onBeforeDataFilter(index, amount, physicalRows) {\n var priv = privatePool.get(this);\n this.collapsingUI.collapsedRowsStash.stash();\n this.collapsingUI.collapsedRowsStash.trimStash(physicalRows[0], amount);\n this.collapsingUI.collapsedRowsStash.shiftStash(physicalRows[0], null, -1 * amount);\n this.dataManager.filterData(index, amount, physicalRows);\n priv.skipRender = true;\n return false;\n }\n /**\n * `afterContextMenuDefaultOptions` hook callback.\n *\n * @private\n * @param {object} defaultOptions The default context menu items order.\n * @returns {boolean}\n */\n\n }, {\n key: \"onAfterContextMenuDefaultOptions\",\n value: function onAfterContextMenuDefaultOptions(defaultOptions) {\n return this.contextMenuUI.appendOptions(defaultOptions);\n }\n /**\n * `afterGetRowHeader` hook callback.\n *\n * @private\n * @param {number} row Row index.\n * @param {HTMLElement} TH Row header element.\n */\n\n }, {\n key: \"onAfterGetRowHeader\",\n value: function onAfterGetRowHeader(row, TH) {\n this.headersUI.appendLevelIndicators(row, TH);\n }\n /**\n * `modifyRowHeaderWidth` hook callback.\n *\n * @private\n * @param {number} rowHeaderWidth The initial row header width(s).\n * @returns {number}\n */\n\n }, {\n key: \"onModifyRowHeaderWidth\",\n value: function onModifyRowHeaderWidth(rowHeaderWidth) {\n return this.headersUI.rowHeaderWidthCache || rowHeaderWidth;\n }\n /**\n * `onAfterRemoveRow` hook callback.\n *\n * @private\n * @param {number} index Removed row.\n * @param {number} amount Amount of removed rows.\n * @param {Array} logicRows An array of the removed physical rows.\n * @param {string} source Source of action.\n */\n\n }, {\n key: \"onAfterRemoveRow\",\n value: function onAfterRemoveRow(index, amount, logicRows, source) {\n var _this3 = this;\n\n if (source === this.pluginName) {\n return;\n }\n\n var priv = privatePool.get(this);\n setTimeout(function () {\n priv.skipRender = null;\n\n _this3.headersUI.updateRowHeaderWidth();\n\n _this3.collapsingUI.collapsedRowsStash.applyStash();\n }, 0);\n }\n /**\n * Callback for the `beforeRemoveRow` change list of removed physical indexes by reference. Removing parent node\n * has effect in removing children nodes.\n *\n * @private\n * @param {number} index Visual index of starter row.\n * @param {number} amount Amount of rows to be removed.\n * @param {Array} physicalRows List of physical indexes.\n */\n\n }, {\n key: \"onBeforeRemoveRow\",\n value: function onBeforeRemoveRow(index, amount, physicalRows) {\n var _this4 = this;\n\n var modifiedPhysicalRows = Array.from(physicalRows.reduce(function (removedRows, physicalIndex) {\n if (_this4.dataManager.isParent(physicalIndex)) {\n var children = _this4.dataManager.getDataObject(physicalIndex).__children; // Preserve a parent in the list of removed rows.\n\n\n removedRows.add(physicalIndex);\n\n if (Array.isArray(children)) {\n // Add a children to the list of removed rows.\n children.forEach(function (child) {\n return removedRows.add(_this4.dataManager.getRowIndex(child));\n });\n }\n\n return removedRows;\n } // Don't modify list of removed rows when already checked element isn't a parent.\n\n\n return removedRows.add(physicalIndex);\n }, new Set())); // Modifying hook's argument by the reference.\n\n physicalRows.length = 0;\n physicalRows.push.apply(physicalRows, _toConsumableArray(modifiedPhysicalRows));\n }\n /**\n * `beforeAddChild` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onBeforeAddChild\",\n value: function onBeforeAddChild() {\n this.collapsingUI.collapsedRowsStash.stash();\n }\n /**\n * `afterAddChild` hook callback.\n *\n * @private\n * @param {object} parent Parent element.\n * @param {object} element New child element.\n */\n\n }, {\n key: \"onAfterAddChild\",\n value: function onAfterAddChild(parent, element) {\n this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(element));\n this.collapsingUI.collapsedRowsStash.applyStash();\n this.headersUI.updateRowHeaderWidth();\n }\n /**\n * `beforeDetachChild` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onBeforeDetachChild\",\n value: function onBeforeDetachChild() {\n this.collapsingUI.collapsedRowsStash.stash();\n }\n /**\n * `afterDetachChild` hook callback.\n *\n * @private\n * @param {object} parent Parent element.\n * @param {object} element New child element.\n */\n\n }, {\n key: \"onAfterDetachChild\",\n value: function onAfterDetachChild(parent, element) {\n this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(element), null, -1);\n this.collapsingUI.collapsedRowsStash.applyStash();\n this.headersUI.updateRowHeaderWidth();\n }\n /**\n * `afterCreateRow` hook callback.\n *\n * @private\n * @param {number} index Represents the visual index of first newly created row in the data source array.\n * @param {number} amount Number of newly created rows in the data source array.\n * @param {string} source String that identifies source of hook call.\n */\n\n }, {\n key: \"onAfterCreateRow\",\n value: function onAfterCreateRow(index, amount, source) {\n if (source === this.pluginName) {\n return;\n }\n\n this.dataManager.updateWithData(this.dataManager.getRawSourceData());\n }\n /**\n * `afterInit` hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onAfterInit\",\n value: function onAfterInit() {\n var deepestLevel = Math.max.apply(Math, _toConsumableArray(this.dataManager.cache.levels));\n\n if (deepestLevel > 0) {\n this.headersUI.updateRowHeaderWidth(deepestLevel);\n }\n }\n /**\n * `beforeRender` hook callback.\n *\n * @param {boolean} force Indicates if the render call was trigered by a change of settings or data.\n * @param {object} skipRender An object, holder for skipRender functionality.\n * @private\n */\n\n }, {\n key: \"onBeforeRender\",\n value: function onBeforeRender(force, skipRender) {\n var priv = privatePool.get(this);\n\n if (priv.skipRender) {\n skipRender.skipRender = true;\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.rowIndexMapper.unregisterMap('nestedRows');\n\n _get(_getPrototypeOf(NestedRows.prototype), \"destroy\", this).call(this);\n }\n /**\n * `beforeLoadData` hook callback.\n *\n * @param {Array} data The source data.\n * @private\n */\n\n }, {\n key: \"onBeforeLoadData\",\n value: function onBeforeLoadData(data) {\n this.dataManager.setData(data);\n this.dataManager.rewriteCache();\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return NestedRows;\n}(BasePlugin);","import \"core-js/modules/es.symbol.js\";\nimport \"core-js/modules/es.symbol.description.js\";\nimport \"core-js/modules/es.symbol.iterator.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.object.keys.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/es.string.replace.js\";\nimport \"core-js/modules/es.string.split.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\nimport \"core-js/modules/web.timers.js\";\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n/*!\n * https://github.com/Starcounter-Jack/JSON-Patch\n * json-patch-duplex.js version: 0.5.7\n * (c) 2013 Joachim Wester\n * MIT license\n */\n\n\nvar __extends = this && this.__extends || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\n\nvar OriginalError = Error;\nvar jsonpatch;\n\n(function (jsonpatch) {\n var _objectKeys = function _objectKeys(obj) {\n if (_isArray(obj)) {\n var keys = new Array(obj.length);\n\n for (var k = 0; k < keys.length; k++) {\n keys[k] = \"\" + k;\n }\n\n return keys;\n }\n\n if (Object.keys) {\n return Object.keys(obj);\n }\n\n var keys = [];\n\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n keys.push(i);\n }\n }\n\n return keys;\n };\n\n function _equals(a, b) {\n switch (_typeof(a)) {\n case 'undefined': //backward compatibility, but really I think we should return false\n\n case 'boolean':\n case 'string':\n case 'number':\n return a === b;\n\n case 'object':\n if (a === null) return b === null;\n\n if (_isArray(a)) {\n if (!_isArray(b) || a.length !== b.length) return false;\n\n for (var i = 0, l = a.length; i < l; i++) {\n if (!_equals(a[i], b[i])) return false;\n }\n\n return true;\n }\n\n var bKeys = _objectKeys(b);\n\n var bLength = bKeys.length;\n if (_objectKeys(a).length !== bLength) return false;\n\n for (var i = 0; i < bLength; i++) {\n if (!_equals(a[i], b[i])) return false;\n }\n\n return true;\n\n default:\n return false;\n }\n }\n /* We use a Javascript hash to store each\n function. Each hash entry (property) uses\n the operation identifiers specified in rfc6902.\n In this way, we can map each patch operation\n to its dedicated function in efficient way.\n */\n\n /* The operations applicable to an object */\n\n\n var objOps = {\n add: function add(obj, key) {\n obj[key] = this.value;\n return true;\n },\n remove: function remove(obj, key) {\n delete obj[key];\n return true;\n },\n replace: function replace(obj, key) {\n obj[key] = this.value;\n return true;\n },\n move: function move(obj, key, tree) {\n var temp = {\n op: \"_get\",\n path: this.from\n };\n apply(tree, [temp]);\n apply(tree, [{\n op: \"remove\",\n path: this.from\n }]);\n apply(tree, [{\n op: \"add\",\n path: this.path,\n value: temp.value\n }]);\n return true;\n },\n copy: function copy(obj, key, tree) {\n var temp = {\n op: \"_get\",\n path: this.from\n };\n apply(tree, [temp]);\n apply(tree, [{\n op: \"add\",\n path: this.path,\n value: temp.value\n }]);\n return true;\n },\n test: function test(obj, key) {\n return _equals(obj[key], this.value);\n },\n _get: function _get(obj, key) {\n this.value = obj[key];\n }\n };\n /* The operations applicable to an array. Many are the same as for the object */\n\n var arrOps = {\n add: function add(arr, i) {\n arr.splice(i, 0, this.value);\n return true;\n },\n remove: function remove(arr, i) {\n arr.splice(i, 1);\n return true;\n },\n replace: function replace(arr, i) {\n arr[i] = this.value;\n return true;\n },\n move: objOps.move,\n copy: objOps.copy,\n test: objOps.test,\n _get: objOps._get\n };\n /* The operations applicable to object root. Many are the same as for the object */\n\n var rootOps = {\n add: function add(obj) {\n rootOps.remove.call(this, obj);\n\n for (var key in this.value) {\n if (this.value.hasOwnProperty(key)) {\n obj[key] = this.value[key];\n }\n }\n\n return true;\n },\n remove: function remove(obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n objOps.remove.call(this, obj, key);\n }\n }\n\n return true;\n },\n replace: function replace(obj) {\n apply(obj, [{\n op: \"remove\",\n path: this.path\n }]);\n apply(obj, [{\n op: \"add\",\n path: this.path,\n value: this.value\n }]);\n return true;\n },\n move: objOps.move,\n copy: objOps.copy,\n test: function test(obj) {\n return JSON.stringify(obj) === JSON.stringify(this.value);\n },\n _get: function _get(obj) {\n this.value = obj;\n }\n };\n var observeOps = {\n add: function add(patches, path) {\n var patch = {\n op: \"add\",\n path: path + escapePathComponent(this.name),\n value: this.object[this.name]\n };\n patches.push(patch);\n },\n 'delete': function _delete(patches, path) {\n var patch = {\n op: \"remove\",\n path: path + escapePathComponent(this.name)\n };\n patches.push(patch);\n },\n update: function update(patches, path) {\n var patch = {\n op: \"replace\",\n path: path + escapePathComponent(this.name),\n value: this.object[this.name]\n };\n patches.push(patch);\n }\n };\n\n function escapePathComponent(str) {\n if (str.indexOf('/') === -1 && str.indexOf('~') === -1) return str;\n return str.replace(/~/g, '~0').replace(/\\//g, '~1');\n }\n\n function _getPathRecursive(root, obj) {\n var found;\n\n for (var key in root) {\n if (root.hasOwnProperty(key)) {\n if (root[key] === obj) {\n return escapePathComponent(key) + '/';\n } else if (_typeof(root[key]) === 'object') {\n found = _getPathRecursive(root[key], obj);\n\n if (found != '') {\n return escapePathComponent(key) + '/' + found;\n }\n }\n }\n }\n\n return '';\n }\n\n function getPath(root, obj) {\n if (root === obj) {\n return '/';\n }\n\n var path = _getPathRecursive(root, obj);\n\n if (path === '') {\n throw new OriginalError(\"Object not found in root\");\n }\n\n return '/' + path;\n }\n\n var beforeDict = [];\n\n var Mirror = function () {\n function Mirror(obj) {\n this.observers = [];\n this.obj = obj;\n }\n\n return Mirror;\n }();\n\n var ObserverInfo = function () {\n function ObserverInfo(callback, observer) {\n this.callback = callback;\n this.observer = observer;\n }\n\n return ObserverInfo;\n }();\n\n function getMirror(obj) {\n for (var i = 0, ilen = beforeDict.length; i < ilen; i++) {\n if (beforeDict[i].obj === obj) {\n return beforeDict[i];\n }\n }\n }\n\n function getObserverFromMirror(mirror, callback) {\n for (var j = 0, jlen = mirror.observers.length; j < jlen; j++) {\n if (mirror.observers[j].callback === callback) {\n return mirror.observers[j].observer;\n }\n }\n }\n\n function removeObserverFromMirror(mirror, observer) {\n for (var j = 0, jlen = mirror.observers.length; j < jlen; j++) {\n if (mirror.observers[j].observer === observer) {\n mirror.observers.splice(j, 1);\n return;\n }\n }\n }\n\n function unobserve(root, observer) {\n observer.unobserve();\n }\n\n jsonpatch.unobserve = unobserve;\n\n function deepClone(obj) {\n if (_typeof(obj) === \"object\") {\n return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n } else {\n return obj; //no need to clone primitives\n }\n }\n\n function observe(obj, callback) {\n var patches = [];\n var root = obj;\n var observer;\n var mirror = getMirror(obj);\n\n if (!mirror) {\n mirror = new Mirror(obj);\n beforeDict.push(mirror);\n } else {\n observer = getObserverFromMirror(mirror, callback);\n }\n\n if (observer) {\n return observer;\n }\n\n observer = {};\n mirror.value = deepClone(obj);\n\n if (callback) {\n observer.callback = callback;\n observer.next = null;\n var intervals = this.intervals || [100, 1000, 10000, 60000];\n\n if (intervals.push === void 0) {\n throw new OriginalError(\"jsonpatch.intervals must be an array\");\n }\n\n var currentInterval = 0;\n\n var dirtyCheck = function dirtyCheck() {\n generate(observer);\n };\n\n var fastCheck = function fastCheck() {\n clearTimeout(observer.next);\n observer.next = setTimeout(function () {\n dirtyCheck();\n currentInterval = 0;\n observer.next = setTimeout(slowCheck, intervals[currentInterval++]);\n }, 0);\n };\n\n var slowCheck = function slowCheck() {\n dirtyCheck();\n if (currentInterval == intervals.length) currentInterval = intervals.length - 1;\n observer.next = setTimeout(slowCheck, intervals[currentInterval++]);\n };\n\n if (typeof window !== 'undefined') {\n if (window.addEventListener) {\n window.addEventListener('mousedown', fastCheck);\n window.addEventListener('mouseup', fastCheck);\n window.addEventListener('keydown', fastCheck);\n } else {\n document.documentElement.attachEvent('onmousedown', fastCheck);\n document.documentElement.attachEvent('onmouseup', fastCheck);\n document.documentElement.attachEvent('onkeydown', fastCheck);\n }\n }\n\n observer.next = setTimeout(slowCheck, intervals[currentInterval++]);\n }\n\n observer.patches = patches;\n observer.object = obj;\n\n observer.unobserve = function () {\n generate(observer);\n clearTimeout(observer.next);\n removeObserverFromMirror(mirror, observer);\n\n if (mirror.observers.length === 0) {\n beforeDict.splice(beforeDict.indexOf(mirror), 1);\n }\n\n if (typeof window !== 'undefined') {\n if (window.removeEventListener) {\n window.removeEventListener('mousedown', fastCheck);\n window.removeEventListener('mouseup', fastCheck);\n window.removeEventListener('keydown', fastCheck);\n } else {\n document.documentElement.detachEvent('onmousedown', fastCheck);\n document.documentElement.detachEvent('onmouseup', fastCheck);\n document.documentElement.detachEvent('onkeydown', fastCheck);\n }\n }\n };\n\n mirror.observers.push(new ObserverInfo(callback, observer));\n return observer;\n }\n\n jsonpatch.observe = observe;\n\n function generate(observer) {\n var mirror;\n\n for (var i = 0, ilen = beforeDict.length; i < ilen; i++) {\n if (beforeDict[i].obj === observer.object) {\n mirror = beforeDict[i];\n break;\n }\n }\n\n _generate(mirror.value, observer.object, observer.patches, \"\");\n\n if (observer.patches.length) {\n apply(mirror.value, observer.patches);\n }\n\n var temp = observer.patches;\n\n if (temp.length > 0) {\n observer.patches = [];\n\n if (observer.callback) {\n observer.callback(temp);\n }\n }\n\n return temp;\n }\n\n jsonpatch.generate = generate; // Dirty check if obj is different from mirror, generate patches and update mirror\n\n function _generate(mirror, obj, patches, path) {\n var newKeys = _objectKeys(obj);\n\n var oldKeys = _objectKeys(mirror);\n\n var changed = false;\n var deleted = false; //if ever \"move\" operation is implemented here, make sure this test runs OK: \"should not generate the same patch twice (move)\"\n\n for (var t = oldKeys.length - 1; t >= 0; t--) {\n var key = oldKeys[t];\n var oldVal = mirror[key];\n\n if (obj.hasOwnProperty(key)) {\n var newVal = obj[key];\n\n if (_typeof(oldVal) == \"object\" && oldVal != null && _typeof(newVal) == \"object\" && newVal != null) {\n _generate(oldVal, newVal, patches, path + \"/\" + escapePathComponent(key));\n } else {\n if (oldVal != newVal) {\n changed = true;\n patches.push({\n op: \"replace\",\n path: path + \"/\" + escapePathComponent(key),\n value: deepClone(newVal)\n });\n }\n }\n } else {\n patches.push({\n op: \"remove\",\n path: path + \"/\" + escapePathComponent(key)\n });\n deleted = true; // property has been deleted\n }\n }\n\n if (!deleted && newKeys.length == oldKeys.length) {\n return;\n }\n\n for (var t = 0; t < newKeys.length; t++) {\n var key = newKeys[t];\n\n if (!mirror.hasOwnProperty(key)) {\n patches.push({\n op: \"add\",\n path: path + \"/\" + escapePathComponent(key),\n value: deepClone(obj[key])\n });\n }\n }\n }\n\n var _isArray;\n\n if (Array.isArray) {\n _isArray = Array.isArray;\n } else {\n _isArray = function _isArray(obj) {\n return obj.push && typeof obj.length === 'number';\n };\n } //3x faster than cached /^\\d+$/.test(str)\n\n\n function isInteger(str) {\n var i = 0;\n var len = str.length;\n var charCode;\n\n while (i < len) {\n charCode = str.charCodeAt(i);\n\n if (charCode >= 48 && charCode <= 57) {\n i++;\n continue;\n }\n\n return false;\n }\n\n return true;\n } /// Apply a json-patch operation on an object tree\n\n\n function apply(tree, patches, validate) {\n var result = false,\n p = 0,\n plen = patches.length,\n patch,\n key;\n\n while (p < plen) {\n patch = patches[p];\n p++; // Find the object\n\n var path = patch.path || \"\";\n var keys = path.split('/');\n var obj = tree;\n var t = 1; //skip empty element - http://jsperf.com/to-shift-or-not-to-shift\n\n var len = keys.length;\n var existingPathFragment = undefined;\n\n while (true) {\n key = keys[t];\n\n if (validate) {\n if (existingPathFragment === undefined) {\n if (obj[key] === undefined) {\n existingPathFragment = keys.slice(0, t).join('/');\n } else if (t == len - 1) {\n existingPathFragment = patch.path;\n }\n\n if (existingPathFragment !== undefined) {\n this.validator(patch, p - 1, tree, existingPathFragment);\n }\n }\n }\n\n t++;\n\n if (key === undefined) {\n if (t >= len) {\n result = rootOps[patch.op].call(patch, obj, key, tree); // Apply patch\n\n break;\n }\n }\n\n if (_isArray(obj)) {\n if (key === '-') {\n key = obj.length;\n } else {\n if (validate && !isInteger(key)) {\n throw new JsonPatchError(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\", \"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\", p - 1, patch.path, patch);\n }\n\n key = parseInt(key, 10);\n }\n\n if (t >= len) {\n if (validate && patch.op === \"add\" && key > obj.length) {\n throw new JsonPatchError(\"The specified index MUST NOT be greater than the number of elements in the array\", \"OPERATION_VALUE_OUT_OF_BOUNDS\", p - 1, patch.path, patch);\n }\n\n result = arrOps[patch.op].call(patch, obj, key, tree); // Apply patch\n\n break;\n }\n } else {\n if (key && key.indexOf('~') != -1) key = key.replace(/~1/g, '/').replace(/~0/g, '~'); // escape chars\n\n if (t >= len) {\n result = objOps[patch.op].call(patch, obj, key, tree); // Apply patch\n\n break;\n }\n }\n\n obj = obj[key];\n }\n }\n\n return result;\n }\n\n jsonpatch.apply = apply;\n\n function compare(tree1, tree2) {\n var patches = [];\n\n _generate(tree1, tree2, patches, '');\n\n return patches;\n }\n\n jsonpatch.compare = compare;\n\n var JsonPatchError = function (_super) {\n __extends(JsonPatchError, _super);\n\n function JsonPatchError(message, name, index, operation, tree) {\n _super.call(this, message);\n\n this.message = message;\n this.name = name;\n this.index = index;\n this.operation = operation;\n this.tree = tree;\n }\n\n return JsonPatchError;\n }(OriginalError);\n\n jsonpatch.JsonPatchError = JsonPatchError;\n jsonpatch.Error = JsonPatchError;\n /**\n * Recursively checks whether an object has any undefined values inside.\n */\n\n function hasUndefined(obj) {\n if (obj === undefined) {\n return true;\n }\n\n if (typeof obj == \"array\" || _typeof(obj) == \"object\") {\n for (var i in obj) {\n if (hasUndefined(obj[i])) {\n return true;\n }\n }\n }\n\n return false;\n }\n /**\n * Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.\n * @param {object} operation - operation object (patch)\n * @param {number} index - index of operation in the sequence\n * @param {object} [tree] - object where the operation is supposed to be applied\n * @param {string} [existingPathFragment] - comes along with `tree`\n */\n\n\n function validator(operation, index, tree, existingPathFragment) {\n if (_typeof(operation) !== 'object' || operation === null || _isArray(operation)) {\n throw new JsonPatchError('Operation is not an object', 'OPERATION_NOT_AN_OBJECT', index, operation, tree);\n } else if (!objOps[operation.op]) {\n throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, tree);\n } else if (typeof operation.path !== 'string') {\n throw new JsonPatchError('Operation `path` property is not a string', 'OPERATION_PATH_INVALID', index, operation, tree);\n } else if ((operation.op === 'move' || operation.op === 'copy') && typeof operation.from !== 'string') {\n throw new JsonPatchError('Operation `from` property is not present (applicable in `move` and `copy` operations)', 'OPERATION_FROM_REQUIRED', index, operation, tree);\n } else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && operation.value === undefined) {\n throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_REQUIRED', index, operation, tree);\n } else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && hasUndefined(operation.value)) {\n throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED', index, operation, tree);\n } else if (tree) {\n if (operation.op == \"add\") {\n var pathLen = operation.path.split(\"/\").length;\n var existingPathLen = existingPathFragment.split(\"/\").length;\n\n if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {\n throw new JsonPatchError('Cannot perform an `add` operation at the desired path', 'OPERATION_PATH_CANNOT_ADD', index, operation, tree);\n }\n } else if (operation.op === 'replace' || operation.op === 'remove' || operation.op === '_get') {\n if (operation.path !== existingPathFragment) {\n throw new JsonPatchError('Cannot perform the operation at a path that does not exist', 'OPERATION_PATH_UNRESOLVABLE', index, operation, tree);\n }\n } else if (operation.op === 'move' || operation.op === 'copy') {\n var existingValue = {\n op: \"_get\",\n path: operation.from,\n value: undefined\n };\n var error = jsonpatch.validate([existingValue], tree);\n\n if (error && error.name === 'OPERATION_PATH_UNRESOLVABLE') {\n throw new JsonPatchError('Cannot perform the operation from a path that does not exist', 'OPERATION_FROM_UNRESOLVABLE', index, operation, tree);\n }\n }\n }\n }\n\n jsonpatch.validator = validator;\n /**\n * Validates a sequence of operations. If `tree` parameter is provided, the sequence is additionally validated against the object tree.\n * If error is encountered, returns a JsonPatchError object\n * @param sequence\n * @param tree\n * @returns {JsonPatchError|undefined}\n */\n\n function validate(sequence, tree) {\n try {\n if (!_isArray(sequence)) {\n throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');\n }\n\n if (tree) {\n tree = JSON.parse(JSON.stringify(tree)); //clone tree so that we can safely try applying operations\n\n apply.call(this, tree, sequence, true);\n } else {\n for (var i = 0; i < sequence.length; i++) {\n this.validator(sequence[i], i);\n }\n }\n } catch (e) {\n if (e instanceof JsonPatchError) {\n return e;\n } else {\n throw e;\n }\n }\n }\n\n jsonpatch.validate = validate;\n})(jsonpatch || (jsonpatch = {}));\n\nexport default jsonpatch;","import \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport { arrayFilter, arrayMap } from \"../../helpers/array.mjs\";\n/**\n * Clean and extend patches from jsonpatch observer.\n *\n * @param {Array} patches The list of patches from jsonpatch lib to process.\n * @returns {Array}\n */\n\nexport function cleanPatches(patches) {\n var newOrRemovedColumns = [];\n /**\n * If observeChanges uses native Object.observe method, then it produces patches for length property. Filter them.\n * If path can't be parsed. Filter it.\n */\n\n var cleanedPatches = arrayFilter(patches, function (patch) {\n if (/[/]length/ig.test(patch.path)) {\n return false;\n }\n\n if (!parsePath(patch.path)) {\n return false;\n }\n\n return true;\n });\n /**\n * Extend patches with changed cells coords.\n */\n\n cleanedPatches = arrayMap(cleanedPatches, function (patch) {\n var coords = parsePath(patch.path);\n patch.row = coords.row;\n patch.col = coords.col;\n return patch;\n });\n /**\n * Removing or adding column will produce one patch for each table row.\n * Leaves only one patch for each column add/remove operation.\n */\n\n cleanedPatches = arrayFilter(cleanedPatches, function (patch) {\n if (['add', 'remove'].indexOf(patch.op) !== -1 && !isNaN(patch.col)) {\n if (newOrRemovedColumns.indexOf(patch.col) !== -1) {\n return false;\n }\n\n newOrRemovedColumns.push(patch.col);\n }\n\n return true;\n });\n newOrRemovedColumns.length = 0;\n return cleanedPatches;\n}\n/**\n * Extract coordinates from path where data was changed.\n *\n * @param {string} path Path describing where data was changed.\n * @returns {object|null} Returns an object with `row` and `col` properties or `null` if path doesn't have necessary information.\n */\n\nexport function parsePath(path) {\n var match = path.match(/^\\/(\\d+)\\/?(.*)?$/);\n\n if (!match) {\n return null;\n }\n\n var _match = _slicedToArray(match, 3),\n row = _match[1],\n column = _match[2];\n\n return {\n row: parseInt(row, 10),\n col: /^\\d*$/.test(column) ? parseInt(column, 10) : column\n };\n}","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport jsonpatch from \"../../3rdparty/jsonpatch/json-patch-duplex.mjs\";\nimport localHooks from \"../../mixins/localHooks.mjs\";\nimport { mixin } from \"../../helpers/object.mjs\";\nimport { cleanPatches } from \"./utils.mjs\";\n/**\n * @class DataObserver\n * @plugin ObserveChanges\n */\n\nvar DataObserver = /*#__PURE__*/function () {\n function DataObserver(observedData) {\n _classCallCheck(this, DataObserver);\n /**\n * Observed source data.\n *\n * @type {Array}\n */\n\n\n this.observedData = null;\n /**\n * JsonPatch observer.\n *\n * @type {object}\n */\n\n this.observer = null;\n /**\n * Flag which determines if observer is paused or not. Paused observer doesn't emit `change` hooks.\n *\n * @type {boolean}\n * @default false\n */\n\n this.paused = false;\n this.setObservedData(observedData);\n }\n /**\n * Set data to observe.\n *\n * @param {*} observedData Set an object to observe.\n */\n\n\n _createClass(DataObserver, [{\n key: \"setObservedData\",\n value: function setObservedData(observedData) {\n var _this = this;\n\n if (this.observer) {\n jsonpatch.unobserve(this.observedData, this.observer);\n }\n\n this.observedData = observedData;\n this.observer = jsonpatch.observe(this.observedData, function (patches) {\n return _this.onChange(patches);\n });\n }\n /**\n * Check if observer was paused.\n *\n * @returns {boolean}\n */\n\n }, {\n key: \"isPaused\",\n value: function isPaused() {\n return this.paused;\n }\n /**\n * Pause observer (stop emitting all detected changes).\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n this.paused = true;\n }\n /**\n * Resume observer (emit all detected changes).\n */\n\n }, {\n key: \"resume\",\n value: function resume() {\n this.paused = false;\n }\n /**\n * JsonPatch on change listener.\n *\n * @private\n * @param {Array} patches An array of object passed from jsonpatch.\n */\n\n }, {\n key: \"onChange\",\n value: function onChange(patches) {\n this.runLocalHooks('change', cleanPatches(patches));\n }\n /**\n * Destroy observer instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n jsonpatch.unobserve(this.observedData, this.observer);\n this.observedData = null;\n this.observer = null;\n }\n }]);\n\n return DataObserver;\n}();\n\nmixin(DataObserver, localHooks);\nexport default DataObserver;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport DataObserver from \"./dataObserver.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { warn } from \"../../helpers/console.mjs\"; // Handsontable.hooks.register('afterChangesObserved');\n\nexport var PLUGIN_KEY = 'observeChanges';\nexport var PLUGIN_PRIORITY = 180;\n/**\n * @plugin ObserveChanges\n *\n * @deprecated This plugin is deprecated and will be removed in the next major release.\n * @description\n * This plugin allows to observe data source changes. By default, the plugin is declared as `undefined`, which makes it\n * disabled. Enabling this plugin switches the table into one-way data binding where changes are applied into the data\n * source (outside from the table) will be automatically reflected in the table.\n *\n * @example\n * ```js\n * // as a boolean\n * observeChanges: true,\n * ```\n *\n * To configure this plugin see {@link Options#observeChanges}.\n */\n\nexport var ObserveChanges = /*#__PURE__*/function (_BasePlugin) {\n _inherits(ObserveChanges, _BasePlugin);\n\n var _super = _createSuper(ObserveChanges);\n\n function ObserveChanges(hotInstance) {\n var _this;\n\n _classCallCheck(this, ObserveChanges);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of {@link DataObserver}.\n *\n * @private\n * @type {DataObserver}\n */\n\n _this.observer = null;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link ObserveChanges#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(ObserveChanges, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n if (!this.observer) {\n warn('The Observe Changes plugin is deprecated and will be removed in the next major release');\n this.observer = new DataObserver(this.hot.getSettings().data);\n\n this._exposePublicApi();\n }\n\n this.observer.addLocalHook('change', function (patches) {\n return _this2.onDataChange(patches);\n });\n this.addHook('afterCreateRow', function () {\n return _this2.onAfterTableAlter();\n });\n this.addHook('afterRemoveRow', function () {\n return _this2.onAfterTableAlter();\n });\n this.addHook('afterCreateCol', function () {\n return _this2.onAfterTableAlter();\n });\n this.addHook('afterRemoveCol', function () {\n return _this2.onAfterTableAlter();\n });\n this.addHook('afterChange', function (changes, source) {\n return _this2.onAfterTableAlter(source);\n });\n this.addHook('afterLoadData', function (sourceData, firstRun) {\n return _this2.onAfterLoadData(sourceData, firstRun);\n });\n\n _get(_getPrototypeOf(ObserveChanges.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n if (this.observer) {\n this.observer.destroy();\n this.observer = null;\n\n this._deletePublicApi();\n }\n\n _get(_getPrototypeOf(ObserveChanges.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Data change observer.\n *\n * @private\n * @param {Array} patches An array of objects which every item defines coordinates where data was changed.\n */\n\n }, {\n key: \"onDataChange\",\n value: function onDataChange(patches) {\n var _this3 = this;\n\n var render = false;\n\n if (!this.observer.isPaused()) {\n var sourceName = \"\".concat(this.pluginName, \".change\");\n var actions = {\n add: function add(patch) {\n var _ref = [patch.row, patch.col],\n visualRow = _ref[0],\n visualColumn = _ref[1];\n\n if (isNaN(visualColumn)) {\n _this3.hot.rowIndexMapper.insertIndexes(visualRow, 1);\n\n _this3.hot.runHooks('afterCreateRow', visualRow, 1, sourceName);\n } else {\n _this3.hot.columnIndexMapper.insertIndexes(visualColumn, 1);\n\n _this3.hot.runHooks('afterCreateCol', visualColumn, 1, sourceName);\n }\n },\n remove: function remove(patch) {\n var _ref2 = [patch.row, patch.col],\n visualRow = _ref2[0],\n visualColumn = _ref2[1];\n\n if (isNaN(visualColumn)) {\n _this3.hot.rowIndexMapper.removeIndexes([visualRow]);\n\n _this3.hot.runHooks('afterRemoveRow', visualRow, 1, sourceName);\n } else {\n _this3.hot.columnIndexMapper.removeIndexes([visualColumn]);\n\n _this3.hot.runHooks('afterRemoveCol', visualColumn, 1, sourceName);\n }\n },\n replace: function replace(patch) {\n _this3.hot.runHooks('afterChange', [[patch.row, patch.col, null, patch.value]], sourceName);\n }\n };\n arrayEach(patches, function (patch) {\n if (actions[patch.op]) {\n actions[patch.op](patch);\n }\n });\n render = true;\n }\n\n this.hot.runHooks('afterChangesObserved');\n\n if (render) {\n this.hot.render();\n }\n }\n /**\n * On after table alter listener. Prevents infinity loop between internal and external data changing.\n *\n * @private\n * @param {string} source The identifier of the code that performed the action.\n */\n\n }, {\n key: \"onAfterTableAlter\",\n value: function onAfterTableAlter(source) {\n var _this4 = this;\n\n if (source !== 'loadData') {\n this.observer.pause();\n this.hot.addHookOnce('afterChangesObserved', function () {\n return _this4.observer.resume();\n });\n }\n }\n /**\n * On after load data listener.\n *\n * @private\n * @param {Array} sourceData Source data array.\n * @param {boolean} firstRun `true` if event was fired first time.\n */\n\n }, {\n key: \"onAfterLoadData\",\n value: function onAfterLoadData(sourceData, firstRun) {\n if (!firstRun) {\n this.observer.setObservedData(sourceData);\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.observer) {\n this.observer.destroy();\n\n this._deletePublicApi();\n }\n\n _get(_getPrototypeOf(ObserveChanges.prototype), \"destroy\", this).call(this);\n }\n /**\n * Expose plugins methods to the core.\n *\n * @private\n */\n\n }, {\n key: \"_exposePublicApi\",\n value: function _exposePublicApi() {\n var _this5 = this;\n\n var hot = this.hot;\n\n hot.pauseObservingChanges = function () {\n return _this5.observer.pause();\n };\n\n hot.resumeObservingChanges = function () {\n return _this5.observer.resume();\n };\n\n hot.isPausedObservingChanges = function () {\n return _this5.observer.isPaused();\n };\n }\n /**\n * Deletes all previously exposed methods.\n *\n * @private\n */\n\n }, {\n key: \"_deletePublicApi\",\n value: function _deletePublicApi() {\n var hot = this.hot;\n delete hot.pauseObservingChanges;\n delete hot.resumeObservingChanges;\n delete hot.isPausedObservingChanges;\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return ObserveChanges;\n}(BasePlugin);","import \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.index-of.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nimport { arrayEach } from \"../../helpers/array.mjs\";\n/**\n * @class Storage\n * @plugin PersistentState\n */\n\nvar Storage = /*#__PURE__*/function () {\n // eslint-disable-next-line no-restricted-globals\n function Storage(prefix) {\n var rootWindow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;\n\n _classCallCheck(this, Storage);\n /**\n * Reference to proper window.\n *\n * @type {Window}\n */\n\n\n this.rootWindow = rootWindow;\n /**\n * Prefix for key (id element).\n *\n * @type {string}\n */\n\n this.prefix = prefix;\n /**\n * Saved keys.\n *\n * @type {Array}\n */\n\n this.savedKeys = [];\n this.loadSavedKeys();\n }\n /**\n * Save data to localStorage.\n *\n * @param {string} key Key string.\n * @param {Mixed} value Value to save.\n */\n\n\n _createClass(Storage, [{\n key: \"saveValue\",\n value: function saveValue(key, value) {\n this.rootWindow.localStorage.setItem(\"\".concat(this.prefix, \"_\").concat(key), JSON.stringify(value));\n\n if (this.savedKeys.indexOf(key) === -1) {\n this.savedKeys.push(key);\n this.saveSavedKeys();\n }\n }\n /**\n * Load data from localStorage.\n *\n * @param {string} key Key string.\n * @param {object} defaultValue Object containing the loaded data.\n *\n * @returns {object|undefined}\n */\n\n }, {\n key: \"loadValue\",\n value: function loadValue(key, defaultValue) {\n var itemKey = typeof key === 'undefined' ? defaultValue : key;\n var value = this.rootWindow.localStorage.getItem(\"\".concat(this.prefix, \"_\").concat(itemKey));\n return value === null ? void 0 : JSON.parse(value);\n }\n /**\n * Reset given data from localStorage.\n *\n * @param {string} key Key string.\n */\n\n }, {\n key: \"reset\",\n value: function reset(key) {\n this.rootWindow.localStorage.removeItem(\"\".concat(this.prefix, \"_\").concat(key));\n }\n /**\n * Reset all data from localStorage.\n *\n */\n\n }, {\n key: \"resetAll\",\n value: function resetAll() {\n var _this = this;\n\n arrayEach(this.savedKeys, function (value, index) {\n _this.rootWindow.localStorage.removeItem(\"\".concat(_this.prefix, \"_\").concat(_this.savedKeys[index]));\n });\n this.clearSavedKeys();\n }\n /**\n * Load and save all keys from localStorage.\n *\n * @private\n */\n\n }, {\n key: \"loadSavedKeys\",\n value: function loadSavedKeys() {\n var keysJSON = this.rootWindow.localStorage.getItem(\"\".concat(this.prefix, \"__persistentStateKeys\"));\n var keys = typeof keysJSON === 'string' ? JSON.parse(keysJSON) : void 0;\n this.savedKeys = keys || [];\n }\n /**\n * Save saved key in localStorage.\n *\n * @private\n */\n\n }, {\n key: \"saveSavedKeys\",\n value: function saveSavedKeys() {\n this.rootWindow.localStorage.setItem(\"\".concat(this.prefix, \"__persistentStateKeys\"), JSON.stringify(this.savedKeys));\n }\n /**\n * Clear saved key from localStorage.\n *\n * @private\n */\n\n }, {\n key: \"clearSavedKeys\",\n value: function clearSavedKeys() {\n this.savedKeys.length = 0;\n this.saveSavedKeys();\n }\n }]);\n\n return Storage;\n}();\n\nexport default Storage;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport Storage from \"./storage.mjs\";\nimport Hooks from \"../../pluginHooks.mjs\";\nHooks.getSingleton().register('persistentStateSave');\nHooks.getSingleton().register('persistentStateLoad');\nHooks.getSingleton().register('persistentStateReset');\nexport var PLUGIN_KEY = 'persistentState';\nexport var PLUGIN_PRIORITY = 0;\n/**\n * @plugin PersistentState\n *\n * @description\n * Save the state of column sorting, column positions and column sizes in local storage to preserve table state\n * between page reloads.\n *\n * In order to enable data storage mechanism, {@link Options#persistentState} option must be set to `true`.\n *\n * When persistentState is enabled it exposes 3 hooks:\n * - {@link Hooks#persistentStateSave} - Saves value under given key in browser local storage.\n * - {@link Hooks#persistentStateLoad} - Loads value, saved under given key, from browser local storage. The loaded\n * value will be saved in `saveTo.value`.\n * - {@link Hooks#persistentStateReset} - Clears the value saved under key. If no key is given, all values associated\n * with table will be cleared.\n */\n\nexport var PersistentState = /*#__PURE__*/function (_BasePlugin) {\n _inherits(PersistentState, _BasePlugin);\n\n var _super = _createSuper(PersistentState);\n\n function PersistentState(hotInstance) {\n var _this;\n\n _classCallCheck(this, PersistentState);\n\n _this = _super.call(this, hotInstance);\n /**\n * Instance of {@link Storage}.\n *\n * @private\n * @type {Storage}\n */\n\n _this.storage = void 0;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link PersistentState#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(PersistentState, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n if (!this.storage) {\n this.storage = new Storage(this.hot.rootElement.id, this.hot.rootWindow);\n }\n\n this.addHook('persistentStateSave', function (key, value) {\n return _this2.saveValue(key, value);\n });\n this.addHook('persistentStateLoad', function (key, saveTo) {\n return _this2.loadValue(key, saveTo);\n });\n this.addHook('persistentStateReset', function () {\n return _this2.resetValue();\n });\n\n _get(_getPrototypeOf(PersistentState.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.storage = void 0;\n\n _get(_getPrototypeOf(PersistentState.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(PersistentState.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Loads the value from local storage.\n *\n * @param {string} key Storage key.\n * @param {object} saveTo Saved value from local storage.\n */\n\n }, {\n key: \"loadValue\",\n value: function loadValue(key, saveTo) {\n saveTo.value = this.storage.loadValue(key);\n }\n /**\n * Saves the data to local storage.\n *\n * @param {string} key Storage key.\n * @param {Mixed} value Value to save.\n */\n\n }, {\n key: \"saveValue\",\n value: function saveValue(key, value) {\n this.storage.saveValue(key, value);\n }\n /**\n * Resets the data or all data from local storage.\n *\n * @param {string} key [optional] Storage key.\n */\n\n }, {\n key: \"resetValue\",\n value: function resetValue(key) {\n if (typeof key === 'undefined') {\n this.storage.resetAll();\n } else {\n this.storage.reset(key);\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(PersistentState.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return PersistentState;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.join.js\";\nimport \"core-js/modules/es.array.splice.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.regexp.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/es.string.search.js\";\nimport \"core-js/modules/es.string.split.js\";\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { isObject } from \"../../helpers/object.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { isUndefined } from \"../../helpers/mixed.mjs\";\nexport var PLUGIN_KEY = 'search';\nexport var PLUGIN_PRIORITY = 190;\nvar DEFAULT_SEARCH_RESULT_CLASS = 'htSearchResult';\n\nvar DEFAULT_CALLBACK = function DEFAULT_CALLBACK(instance, row, col, data, testResult) {\n instance.getCellMeta(row, col).isSearchResult = testResult;\n};\n\nvar DEFAULT_QUERY_METHOD = function DEFAULT_QUERY_METHOD(query, value) {\n if (isUndefined(query) || query === null || !query.toLowerCase || query.length === 0) {\n return false;\n }\n\n if (isUndefined(value) || value === null) {\n return false;\n }\n\n return value.toString().toLowerCase().indexOf(query.toLowerCase()) !== -1;\n};\n/**\n * @plugin Search\n *\n * @description\n * The search plugin provides an easy interface to search data across Handsontable.\n *\n * In order to enable search mechanism, {@link Options#search} option must be set to `true`.\n *\n * @example\n * ```js\n * // as boolean\n * search: true\n * // as a object with one or more options\n * search: {\n * callback: myNewCallbackFunction,\n * queryMethod: myNewQueryMethod,\n * searchResultClass: 'customClass'\n * }\n *\n * // Access to search plugin instance:\n * const searchPlugin = hot.getPlugin('search');\n *\n * // Set callback programmatically:\n * searchPlugin.setCallback(myNewCallbackFunction);\n * // Set query method programmatically:\n * searchPlugin.setQueryMethod(myNewQueryMethod);\n * // Set search result cells class programmatically:\n * searchPlugin.setSearchResultClass(customClass);\n * ```\n */\n\n\nexport var Search = /*#__PURE__*/function (_BasePlugin) {\n _inherits(Search, _BasePlugin);\n\n var _super = _createSuper(Search);\n\n function Search(hotInstance) {\n var _this;\n\n _classCallCheck(this, Search);\n\n _this = _super.call(this, hotInstance);\n /**\n * Function called during querying for each cell from the {@link DataMap}.\n *\n * @private\n * @type {Function}\n */\n\n _this.callback = DEFAULT_CALLBACK;\n /**\n * Query function is responsible for determining whether a query matches the value stored in a cell.\n *\n * @private\n * @type {Function}\n */\n\n _this.queryMethod = DEFAULT_QUERY_METHOD;\n /**\n * Class name added to each cell that belongs to the searched query.\n *\n * @private\n * @type {string}\n */\n\n _this.searchResultClass = DEFAULT_SEARCH_RESULT_CLASS;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link AutoRowSize#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(Search, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n var searchSettings = this.hot.getSettings()[PLUGIN_KEY];\n this.updatePluginSettings(searchSettings);\n this.addHook('beforeRenderer', function () {\n return _this2.onBeforeRenderer.apply(_this2, arguments);\n });\n\n _get(_getPrototypeOf(Search.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n var _this3 = this;\n\n var beforeRendererCallback = function beforeRendererCallback() {\n return _this3.onBeforeRenderer.apply(_this3, arguments);\n };\n\n this.hot.addHook('beforeRenderer', beforeRendererCallback);\n this.hot.addHookOnce('afterRender', function () {\n _this3.hot.removeHook('beforeRenderer', beforeRendererCallback);\n });\n\n _get(_getPrototypeOf(Search.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.disablePlugin();\n this.enablePlugin();\n\n _get(_getPrototypeOf(Search.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Makes the query.\n *\n * @param {string} queryStr Value to be search.\n * @param {Function} [callback] Callback function performed on cells with values which matches to the searched query.\n * @param {Function} [queryMethod] Query function responsible for determining whether a query matches the value stored in a cell.\n * @returns {object[]} Return an array of objects with `row`, `col`, `data` properties or empty array.\n */\n\n }, {\n key: \"query\",\n value: function query(queryStr) {\n var _this4 = this;\n\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getCallback();\n var queryMethod = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getQueryMethod();\n var rowCount = this.hot.countRows();\n var colCount = this.hot.countCols();\n var queryResult = [];\n var instance = this.hot;\n rangeEach(0, rowCount - 1, function (rowIndex) {\n rangeEach(0, colCount - 1, function (colIndex) {\n var cellData = _this4.hot.getDataAtCell(rowIndex, colIndex);\n\n var cellProperties = _this4.hot.getCellMeta(rowIndex, colIndex);\n\n var cellCallback = cellProperties.search.callback || callback;\n var cellQueryMethod = cellProperties.search.queryMethod || queryMethod;\n var testResult = cellQueryMethod(queryStr, cellData, cellProperties);\n\n if (testResult) {\n var singleResult = {\n row: rowIndex,\n col: colIndex,\n data: cellData\n };\n queryResult.push(singleResult);\n }\n\n if (cellCallback) {\n cellCallback(instance, rowIndex, colIndex, cellData, testResult);\n }\n });\n });\n return queryResult;\n }\n /**\n * Gets the callback function.\n *\n * @returns {Function} Return the callback function.\n */\n\n }, {\n key: \"getCallback\",\n value: function getCallback() {\n return this.callback;\n }\n /**\n * Sets the callback function. This function will be called during querying for each cell.\n *\n * @param {Function} newCallback A callback function.\n */\n\n }, {\n key: \"setCallback\",\n value: function setCallback(newCallback) {\n this.callback = newCallback;\n }\n /**\n * Gets the query method function.\n *\n * @returns {Function} Return the query method.\n */\n\n }, {\n key: \"getQueryMethod\",\n value: function getQueryMethod() {\n return this.queryMethod;\n }\n /**\n * Sets the query method function. The function is responsible for determining whether a query matches the value stored in a cell.\n *\n * @param {Function} newQueryMethod A function with specific match logic.\n */\n\n }, {\n key: \"setQueryMethod\",\n value: function setQueryMethod(newQueryMethod) {\n this.queryMethod = newQueryMethod;\n }\n /**\n * Gets search result cells class name.\n *\n * @returns {string} Return the cell class name.\n */\n\n }, {\n key: \"getSearchResultClass\",\n value: function getSearchResultClass() {\n return this.searchResultClass;\n }\n /**\n * Sets search result cells class name. This class name will be added to each cell that belongs to the searched query.\n *\n * @param {string} newElementClass CSS class name.\n */\n\n }, {\n key: \"setSearchResultClass\",\n value: function setSearchResultClass(newElementClass) {\n this.searchResultClass = newElementClass;\n }\n /**\n * Updates the settings of the plugin.\n *\n * @param {object} searchSettings The plugin settings, taken from Handsontable configuration.\n * @private\n */\n\n }, {\n key: \"updatePluginSettings\",\n value: function updatePluginSettings(searchSettings) {\n if (isObject(searchSettings)) {\n if (searchSettings.searchResultClass) {\n this.setSearchResultClass(searchSettings.searchResultClass);\n }\n\n if (searchSettings.queryMethod) {\n this.setQueryMethod(searchSettings.queryMethod);\n }\n\n if (searchSettings.callback) {\n this.setCallback(searchSettings.callback);\n }\n }\n }\n /**\n * The `beforeRenderer` hook callback.\n *\n * @private\n * @param {HTMLTableCellElement} TD The rendered `TD` element.\n * @param {number} row Visual row index.\n * @param {number} col Visual column index.\n * @param {string|number} prop Column property name or a column index, if datasource is an array of arrays.\n * @param {string} value Value of the rendered cell.\n * @param {object} cellProperties Object containing the cell's properties.\n */\n\n }, {\n key: \"onBeforeRenderer\",\n value: function onBeforeRenderer(TD, row, col, prop, value, cellProperties) {\n // TODO: #4972\n var className = cellProperties.className || [];\n var classArray = [];\n\n if (typeof className === 'string') {\n classArray = className.split(' ');\n } else {\n var _classArray;\n\n (_classArray = classArray).push.apply(_classArray, _toConsumableArray(className));\n }\n\n if (this.isEnabled() && cellProperties.isSearchResult) {\n if (!classArray.includes(this.searchResultClass)) {\n classArray.push(\"\".concat(this.searchResultClass));\n }\n } else if (classArray.includes(this.searchResultClass)) {\n classArray.splice(classArray.indexOf(this.searchResultClass), 1);\n }\n\n cellProperties.className = classArray.join(' ');\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(Search.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return Search;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/web.timers.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { addClass, removeClass } from \"../../helpers/dom/element.mjs\";\nimport { arrayEach } from \"../../helpers/array.mjs\";\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { isTouchSupported } from \"../../helpers/feature.mjs\";\nexport var PLUGIN_KEY = 'touchScroll';\nexport var PLUGIN_PRIORITY = 200;\n/**\n * @private\n * @plugin TouchScroll\n * @class TouchScroll\n */\n\nexport var TouchScroll = /*#__PURE__*/function (_BasePlugin) {\n _inherits(TouchScroll, _BasePlugin);\n\n var _super = _createSuper(TouchScroll);\n\n function TouchScroll(hotInstance) {\n var _this;\n\n _classCallCheck(this, TouchScroll);\n\n _this = _super.call(this, hotInstance);\n /**\n * Collection of scrollbars to update.\n *\n * @type {Array}\n */\n\n _this.scrollbars = [];\n /**\n * Collection of overlays to update.\n *\n * @type {Array}\n */\n\n _this.clones = [];\n /**\n * Flag which determines if collection of overlays should be refilled on every table render.\n *\n * @type {boolean}\n * @default false\n */\n\n _this.lockedCollection = false;\n /**\n * Flag which determines if walkontable should freeze overlays while scrolling.\n *\n * @type {boolean}\n * @default false\n */\n\n _this.freezeOverlays = false;\n return _this;\n }\n /**\n * Check if plugin is enabled.\n *\n * @returns {boolean}\n */\n\n\n _createClass(TouchScroll, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return isTouchSupported();\n }\n /**\n * Enable the plugin.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.addHook('afterRender', function () {\n return _this2.onAfterRender();\n });\n this.registerEvents();\n\n _get(_getPrototypeOf(TouchScroll.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin to use the latest options you have specified.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n this.lockedCollection = false;\n\n _get(_getPrototypeOf(TouchScroll.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disable plugin for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n _get(_getPrototypeOf(TouchScroll.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Register all necessary events.\n *\n * @private\n */\n\n }, {\n key: \"registerEvents\",\n value: function registerEvents() {\n var _this3 = this;\n\n this.addHook('beforeTouchScroll', function () {\n return _this3.onBeforeTouchScroll();\n });\n this.addHook('afterMomentumScroll', function () {\n return _this3.onAfterMomentumScroll();\n });\n }\n /**\n * After render listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterRender\",\n value: function onAfterRender() {\n if (this.lockedCollection) {\n return;\n }\n\n var _this$hot$view$wt$wtO = this.hot.view.wt.wtOverlays,\n topOverlay = _this$hot$view$wt$wtO.topOverlay,\n bottomOverlay = _this$hot$view$wt$wtO.bottomOverlay,\n leftOverlay = _this$hot$view$wt$wtO.leftOverlay,\n topLeftCornerOverlay = _this$hot$view$wt$wtO.topLeftCornerOverlay,\n bottomLeftCornerOverlay = _this$hot$view$wt$wtO.bottomLeftCornerOverlay;\n this.lockedCollection = true;\n this.scrollbars.length = 0;\n this.scrollbars.push(topOverlay);\n\n if (bottomOverlay.clone) {\n this.scrollbars.push(bottomOverlay);\n }\n\n this.scrollbars.push(leftOverlay);\n\n if (topLeftCornerOverlay) {\n this.scrollbars.push(topLeftCornerOverlay);\n }\n\n if (bottomLeftCornerOverlay && bottomLeftCornerOverlay.clone) {\n this.scrollbars.push(bottomLeftCornerOverlay);\n }\n\n this.clones.length = 0;\n\n if (topOverlay.needFullRender) {\n this.clones.push(topOverlay.clone.wtTable.holder.parentNode);\n }\n\n if (bottomOverlay.needFullRender) {\n this.clones.push(bottomOverlay.clone.wtTable.holder.parentNode);\n }\n\n if (leftOverlay.needFullRender) {\n this.clones.push(leftOverlay.clone.wtTable.holder.parentNode);\n }\n\n if (topLeftCornerOverlay) {\n this.clones.push(topLeftCornerOverlay.clone.wtTable.holder.parentNode);\n }\n\n if (bottomLeftCornerOverlay && bottomLeftCornerOverlay.clone) {\n this.clones.push(bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);\n }\n }\n /**\n * Touch scroll listener.\n *\n * @private\n */\n\n }, {\n key: \"onBeforeTouchScroll\",\n value: function onBeforeTouchScroll() {\n this.freezeOverlays = true;\n arrayEach(this.clones, function (clone) {\n addClass(clone, 'hide-tween');\n });\n }\n /**\n * After momentum scroll listener.\n *\n * @private\n */\n\n }, {\n key: \"onAfterMomentumScroll\",\n value: function onAfterMomentumScroll() {\n var _this4 = this;\n\n this.freezeOverlays = false;\n arrayEach(this.clones, function (clone) {\n removeClass(clone, 'hide-tween');\n addClass(clone, 'show-tween');\n });\n setTimeout(function () {\n arrayEach(_this4.clones, function (clone) {\n removeClass(clone, 'show-tween');\n });\n }, 400);\n arrayEach(this.scrollbars, function (scrollbar) {\n scrollbar.refresh();\n scrollbar.resetFixedPosition();\n });\n this.hot.view.wt.wtOverlays.syncScrollWithMaster();\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return TouchScroll;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.every.js\";\nimport \"core-js/modules/es.array.from.js\";\nimport \"core-js/modules/es.array.iterator.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.number.is-integer.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.set.js\";\nimport \"core-js/modules/es.string.iterator.js\";\nimport \"core-js/modules/web.dom-collections.iterator.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nimport { BasePlugin } from \"../base/index.mjs\";\nimport { TrimmingMap } from \"../../translations/index.mjs\";\nimport { arrayEach, arrayReduce } from \"../../helpers/array.mjs\";\nexport var PLUGIN_KEY = 'trimRows';\nexport var PLUGIN_PRIORITY = 330;\n/**\n * @plugin TrimRows\n *\n * @description\n * The plugin allows to trim certain rows. The trimming is achieved by applying the transformation algorithm to the data\n * transformation. In this case, when the row is trimmed it is not accessible using `getData*` methods thus the trimmed\n * data is not visible to other plugins.\n *\n * @example\n * ```js\n * const container = document.getElementById('example');\n * const hot = new Handsontable(container, {\n * data: getData(),\n * // hide selected rows on table initialization\n * trimRows: [1, 2, 5]\n * });\n *\n * // access the trimRows plugin instance\n * const trimRowsPlugin = hot.getPlugin('trimRows');\n *\n * // hide single row\n * trimRowsPlugin.trimRow(1);\n *\n * // hide multiple rows\n * trimRowsPlugin.trimRow(1, 2, 9);\n *\n * // or as an array\n * trimRowsPlugin.trimRows([1, 2, 9]);\n *\n * // show single row\n * trimRowsPlugin.untrimRow(1);\n *\n * // show multiple rows\n * trimRowsPlugin.untrimRow(1, 2, 9);\n *\n * // or as an array\n * trimRowsPlugin.untrimRows([1, 2, 9]);\n *\n * // rerender table to see the changes\n * hot.render();\n * ```\n */\n\nexport var TrimRows = /*#__PURE__*/function (_BasePlugin) {\n _inherits(TrimRows, _BasePlugin);\n\n var _super = _createSuper(TrimRows);\n\n function TrimRows(hotInstance) {\n var _this;\n\n _classCallCheck(this, TrimRows);\n\n _this = _super.call(this, hotInstance);\n /**\n * Map of skipped rows by the plugin.\n *\n * @private\n * @type {null|TrimmingMap}\n */\n\n _this.trimmedRowsMap = null;\n return _this;\n }\n /**\n * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}\n * hook and if it returns `true` than the {@link AutoRowSize#enablePlugin} method is called.\n *\n * @returns {boolean}\n */\n\n\n _createClass(TrimRows, [{\n key: \"isEnabled\",\n value: function isEnabled() {\n return !!this.hot.getSettings()[PLUGIN_KEY];\n }\n /**\n * Enables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"enablePlugin\",\n value: function enablePlugin() {\n var _this2 = this;\n\n if (this.enabled) {\n return;\n }\n\n this.trimmedRowsMap = this.hot.rowIndexMapper.registerMap('trimRows', new TrimmingMap());\n this.trimmedRowsMap.addLocalHook('init', function () {\n return _this2.onMapInit();\n });\n\n _get(_getPrototypeOf(TrimRows.prototype), \"enablePlugin\", this).call(this);\n }\n /**\n * Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.\n */\n\n }, {\n key: \"updatePlugin\",\n value: function updatePlugin() {\n var _this3 = this;\n\n var trimmedRows = this.hot.getSettings()[PLUGIN_KEY];\n\n if (Array.isArray(trimmedRows)) {\n this.hot.batchExecution(function () {\n _this3.trimmedRowsMap.clear();\n\n arrayEach(trimmedRows, function (physicalRow) {\n _this3.trimmedRowsMap.setValueAtIndex(physicalRow, true);\n });\n }, true);\n }\n\n _get(_getPrototypeOf(TrimRows.prototype), \"updatePlugin\", this).call(this);\n }\n /**\n * Disables the plugin functionality for this Handsontable instance.\n */\n\n }, {\n key: \"disablePlugin\",\n value: function disablePlugin() {\n this.hot.rowIndexMapper.unregisterMap('trimRows');\n\n _get(_getPrototypeOf(TrimRows.prototype), \"disablePlugin\", this).call(this);\n }\n /**\n * Get list of trimmed rows.\n *\n * @returns {Array} Physical rows.\n */\n\n }, {\n key: \"getTrimmedRows\",\n value: function getTrimmedRows() {\n return this.trimmedRowsMap.getTrimmedIndexes();\n }\n /**\n * Trims the rows provided in the array.\n *\n * @param {number[]} rows Array of physical row indexes.\n * @fires Hooks#beforeTrimRow\n * @fires Hooks#afterTrimRow\n */\n\n }, {\n key: \"trimRows\",\n value: function trimRows(rows) {\n var _this4 = this;\n\n var currentTrimConfig = this.getTrimmedRows();\n var isValidConfig = this.isValidConfig(rows);\n var destinationTrimConfig = currentTrimConfig;\n\n if (isValidConfig) {\n destinationTrimConfig = Array.from(new Set(currentTrimConfig.concat(rows)));\n }\n\n var allowTrimRow = this.hot.runHooks('beforeTrimRow', currentTrimConfig, destinationTrimConfig, isValidConfig);\n\n if (allowTrimRow === false) {\n return;\n }\n\n if (isValidConfig) {\n this.hot.batchExecution(function () {\n arrayEach(rows, function (physicalRow) {\n _this4.trimmedRowsMap.setValueAtIndex(physicalRow, true);\n });\n }, true);\n }\n\n this.hot.runHooks('afterTrimRow', currentTrimConfig, destinationTrimConfig, isValidConfig, isValidConfig && destinationTrimConfig.length > currentTrimConfig.length);\n }\n /**\n * Trims the row provided as physical row index (counting from 0).\n *\n * @param {...number} row Physical row index.\n */\n\n }, {\n key: \"trimRow\",\n value: function trimRow() {\n for (var _len = arguments.length, row = new Array(_len), _key = 0; _key < _len; _key++) {\n row[_key] = arguments[_key];\n }\n\n this.trimRows(row);\n }\n /**\n * Untrims the rows provided in the array.\n *\n * @param {number[]} rows Array of physical row indexes.\n * @fires Hooks#beforeUntrimRow\n * @fires Hooks#afterUntrimRow\n */\n\n }, {\n key: \"untrimRows\",\n value: function untrimRows(rows) {\n var currentTrimConfig = this.getTrimmedRows();\n var isValidConfig = this.isValidConfig(rows);\n var destinationTrimConfig = currentTrimConfig;\n var trimmingMapValues = this.trimmedRowsMap.getValues().slice();\n var isAnyRowUntrimmed = rows.length > 0;\n\n if (isValidConfig && isAnyRowUntrimmed) {\n // Preparing new values for trimming map.\n arrayEach(rows, function (physicalRow) {\n trimmingMapValues[physicalRow] = false;\n }); // Preparing new trimming config.\n\n destinationTrimConfig = arrayReduce(trimmingMapValues, function (trimmedIndexes, isTrimmed, physicalIndex) {\n if (isTrimmed) {\n trimmedIndexes.push(physicalIndex);\n }\n\n return trimmedIndexes;\n }, []);\n }\n\n var allowUntrimRow = this.hot.runHooks('beforeUntrimRow', currentTrimConfig, destinationTrimConfig, isValidConfig && isAnyRowUntrimmed);\n\n if (allowUntrimRow === false) {\n return;\n }\n\n if (isValidConfig && isAnyRowUntrimmed) {\n this.trimmedRowsMap.setValues(trimmingMapValues);\n }\n\n this.hot.runHooks('afterUntrimRow', currentTrimConfig, destinationTrimConfig, isValidConfig && isAnyRowUntrimmed, isValidConfig && destinationTrimConfig.length < currentTrimConfig.length);\n }\n /**\n * Untrims the row provided as row index (counting from 0).\n *\n * @param {...number} row Physical row index.\n */\n\n }, {\n key: \"untrimRow\",\n value: function untrimRow() {\n for (var _len2 = arguments.length, row = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n row[_key2] = arguments[_key2];\n }\n\n this.untrimRows(row);\n }\n /**\n * Checks if given row is hidden.\n *\n * @param {number} physicalRow Physical row index.\n * @returns {boolean}\n */\n\n }, {\n key: \"isTrimmed\",\n value: function isTrimmed(physicalRow) {\n return this.trimmedRowsMap.getValueAtIndex(physicalRow) || false;\n }\n /**\n * Untrims all trimmed rows.\n */\n\n }, {\n key: \"untrimAll\",\n value: function untrimAll() {\n this.untrimRows(this.getTrimmedRows());\n }\n /**\n * Get if trim config is valid. Check whether all of the provided row indexes are within source data.\n *\n * @param {Array} trimmedRows List of physical row indexes.\n * @returns {boolean}\n */\n\n }, {\n key: \"isValidConfig\",\n value: function isValidConfig(trimmedRows) {\n var sourceRows = this.hot.countSourceRows();\n return trimmedRows.every(function (trimmedRow) {\n return Number.isInteger(trimmedRow) && trimmedRow >= 0 && trimmedRow < sourceRows;\n });\n }\n /**\n * On map initialized hook callback.\n *\n * @private\n */\n\n }, {\n key: \"onMapInit\",\n value: function onMapInit() {\n var _this5 = this;\n\n var trimmedRows = this.hot.getSettings()[PLUGIN_KEY];\n\n if (Array.isArray(trimmedRows)) {\n this.hot.batchExecution(function () {\n arrayEach(trimmedRows, function (physicalRow) {\n _this5.trimmedRowsMap.setValueAtIndex(physicalRow, true);\n });\n }, true);\n }\n }\n /**\n * Destroys the plugin instance.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hot.rowIndexMapper.unregisterMap('trimRows');\n\n _get(_getPrototypeOf(TrimRows.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"PLUGIN_KEY\",\n get: function get() {\n return PLUGIN_KEY;\n }\n }, {\n key: \"PLUGIN_PRIORITY\",\n get: function get() {\n return PLUGIN_PRIORITY;\n }\n }]);\n\n return TrimRows;\n}(BasePlugin);","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nimport \"core-js/modules/es.array.concat.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.array.index-of.js\";\nimport \"core-js/modules/es.array.reduce.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.array.splice.js\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nimport Hooks from \"../../pluginHooks.mjs\";\nimport { arrayMap, arrayEach } from \"../../helpers/array.mjs\";\nimport { rangeEach } from \"../../helpers/number.mjs\";\nimport { inherit, deepClone } from \"../../helpers/object.mjs\";\nimport { stopImmediatePropagation, isImmediatePropagationStopped } from \"../../helpers/dom/event.mjs\";\nimport { align } from \"../contextMenu/utils.mjs\";\nexport var PLUGIN_KEY = 'undoRedo';\n/**\n * @description\n * Handsontable UndoRedo plugin allows to undo and redo certain actions done in the table.\n *\n * __Note__, that not all actions are currently undo-able. The UndoRedo plugin is enabled by default.\n * @example\n * ```js\n * undo: true\n * ```\n * @class UndoRedo\n * @plugin UndoRedo\n * @param {Core} instance The Handsontable instance.\n */\n\nfunction UndoRedo(instance) {\n var plugin = this;\n this.instance = instance;\n this.doneActions = [];\n this.undoneActions = [];\n this.ignoreNewActions = false;\n this.enabled = false;\n instance.addHook('afterChange', function (changes, source) {\n var changesLen = changes && changes.length;\n\n if (!changesLen || ['UndoRedo.undo', 'UndoRedo.redo', 'MergeCells'].includes(source)) {\n return;\n }\n\n var hasDifferences = changes.find(function (change) {\n var _change = _slicedToArray(change, 4),\n oldValue = _change[2],\n newValue = _change[3];\n\n return oldValue !== newValue;\n });\n\n if (!hasDifferences) {\n return;\n }\n\n var clonedChanges = changes.reduce(function (arr, change) {\n arr.push(_toConsumableArray(change));\n return arr;\n }, []);\n arrayEach(clonedChanges, function (change) {\n change[1] = instance.propToCol(change[1]);\n });\n var selected = changesLen > 1 ? this.getSelected() : [[clonedChanges[0][0], clonedChanges[0][1]]];\n plugin.done(new UndoRedo.ChangeAction(clonedChanges, selected));\n });\n instance.addHook('afterCreateRow', function (index, amount, source) {\n if (source === 'UndoRedo.undo' || source === 'UndoRedo.undo' || source === 'auto') {\n return;\n }\n\n var action = new UndoRedo.CreateRowAction(index, amount);\n plugin.done(action);\n });\n instance.addHook('beforeRemoveRow', function (index, amount, logicRows, source) {\n if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {\n return;\n }\n\n var originalData = plugin.instance.getSourceDataArray();\n var rowIndex = (originalData.length + index) % originalData.length;\n var physicalRowIndex = instance.toPhysicalRow(rowIndex);\n var removedData = deepClone(originalData.slice(physicalRowIndex, physicalRowIndex + amount));\n plugin.done(new UndoRedo.RemoveRowAction(rowIndex, removedData, instance.getSettings().fixedRowsBottom, instance.getSettings().fixedRowsTop));\n });\n instance.addHook('afterCreateCol', function (index, amount, source) {\n if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {\n return;\n }\n\n plugin.done(new UndoRedo.CreateColumnAction(index, amount));\n });\n instance.addHook('beforeRemoveCol', function (index, amount, logicColumns, source) {\n if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {\n return;\n }\n\n var originalData = plugin.instance.getSourceDataArray();\n var columnIndex = (plugin.instance.countCols() + index) % plugin.instance.countCols();\n var removedData = [];\n var headers = [];\n var indexes = [];\n rangeEach(originalData.length - 1, function (i) {\n var column = [];\n var origRow = originalData[i];\n rangeEach(columnIndex, columnIndex + (amount - 1), function (j) {\n column.push(origRow[instance.toPhysicalColumn(j)]);\n });\n removedData.push(column);\n });\n rangeEach(amount - 1, function (i) {\n indexes.push(instance.toPhysicalColumn(columnIndex + i));\n });\n\n if (Array.isArray(instance.getSettings().colHeaders)) {\n rangeEach(amount - 1, function (i) {\n headers.push(instance.getSettings().colHeaders[instance.toPhysicalColumn(columnIndex + i)] || null);\n });\n }\n\n var columnsMap = instance.columnIndexMapper.getIndexesSequence();\n var rowsMap = instance.rowIndexMapper.getIndexesSequence();\n var action = new UndoRedo.RemoveColumnAction(columnIndex, indexes, removedData, headers, columnsMap, rowsMap, instance.getSettings().fixedColumnsLeft);\n plugin.done(action);\n });\n instance.addHook('beforeCellAlignment', function (stateBefore, range, type, alignment) {\n var action = new UndoRedo.CellAlignmentAction(stateBefore, range, type, alignment);\n plugin.done(action);\n });\n instance.addHook('beforeFilter', function (conditionsStack) {\n plugin.done(new UndoRedo.FiltersAction(conditionsStack));\n });\n instance.addHook('beforeRowMove', function (rows, finalIndex) {\n if (rows === false) {\n return;\n }\n\n plugin.done(new UndoRedo.RowMoveAction(rows, finalIndex));\n });\n instance.addHook('beforeMergeCells', function (cellRange, auto) {\n if (auto) {\n return;\n }\n\n plugin.done(new UndoRedo.MergeCellsAction(instance, cellRange));\n });\n instance.addHook('afterUnmergeCells', function (cellRange, auto) {\n if (auto) {\n return;\n }\n\n plugin.done(new UndoRedo.UnmergeCellsAction(instance, cellRange));\n });\n}\n/**\n * @param {object} action The action desciptor.\n */\n\n\nUndoRedo.prototype.done = function (action) {\n if (!this.ignoreNewActions) {\n this.doneActions.push(action);\n this.undoneActions.length = 0;\n }\n};\n/**\n * Undo the last action performed to the table.\n *\n * @function undo\n * @memberof UndoRedo#\n * @fires Hooks#beforeUndo\n * @fires Hooks#afterUndo\n */\n\n\nUndoRedo.prototype.undo = function () {\n if (this.isUndoAvailable()) {\n var action = this.doneActions.pop();\n var actionClone = deepClone(action);\n var instance = this.instance;\n var continueAction = instance.runHooks('beforeUndo', actionClone);\n\n if (continueAction === false) {\n return;\n }\n\n this.ignoreNewActions = true;\n var that = this;\n action.undo(this.instance, function () {\n that.ignoreNewActions = false;\n that.undoneActions.push(action);\n });\n instance.runHooks('afterUndo', actionClone);\n }\n};\n/**\n * Redo the previous action performed to the table (used to reverse an undo).\n *\n * @function redo\n * @memberof UndoRedo#\n * @fires Hooks#beforeRedo\n * @fires Hooks#afterRedo\n */\n\n\nUndoRedo.prototype.redo = function () {\n if (this.isRedoAvailable()) {\n var action = this.undoneActions.pop();\n var actionClone = deepClone(action);\n var instance = this.instance;\n var continueAction = instance.runHooks('beforeRedo', actionClone);\n\n if (continueAction === false) {\n return;\n }\n\n this.ignoreNewActions = true;\n var that = this;\n action.redo(this.instance, function () {\n that.ignoreNewActions = false;\n that.doneActions.push(action);\n });\n instance.runHooks('afterRedo', actionClone);\n }\n};\n/**\n * Checks if undo action is available.\n *\n * @function isUndoAvailable\n * @memberof UndoRedo#\n * @returns {boolean} Return `true` if undo can be performed, `false` otherwise.\n */\n\n\nUndoRedo.prototype.isUndoAvailable = function () {\n return this.doneActions.length > 0;\n};\n/**\n * Checks if redo action is available.\n *\n * @function isRedoAvailable\n * @memberof UndoRedo#\n * @returns {boolean} Return `true` if redo can be performed, `false` otherwise.\n */\n\n\nUndoRedo.prototype.isRedoAvailable = function () {\n return this.undoneActions.length > 0;\n};\n/**\n * Clears undo history.\n *\n * @function clear\n * @memberof UndoRedo#\n */\n\n\nUndoRedo.prototype.clear = function () {\n this.doneActions.length = 0;\n this.undoneActions.length = 0;\n};\n/**\n * Checks if the plugin is enabled.\n *\n * @function isEnabled\n * @memberof UndoRedo#\n * @returns {boolean}\n */\n\n\nUndoRedo.prototype.isEnabled = function () {\n return this.enabled;\n};\n/**\n * Enables the plugin.\n *\n * @function enable\n * @memberof UndoRedo#\n */\n\n\nUndoRedo.prototype.enable = function () {\n if (this.isEnabled()) {\n return;\n }\n\n var hot = this.instance;\n this.enabled = true;\n exposeUndoRedoMethods(hot);\n hot.addHook('beforeKeyDown', onBeforeKeyDown);\n hot.addHook('afterChange', onAfterChange);\n};\n/**\n * Disables the plugin.\n *\n * @function disable\n * @memberof UndoRedo#\n */\n\n\nUndoRedo.prototype.disable = function () {\n if (!this.isEnabled()) {\n return;\n }\n\n var hot = this.instance;\n this.enabled = false;\n removeExposedUndoRedoMethods(hot);\n hot.removeHook('beforeKeyDown', onBeforeKeyDown);\n hot.removeHook('afterChange', onAfterChange);\n};\n/**\n * Destroys the instance.\n *\n * @function destroy\n * @memberof UndoRedo#\n */\n\n\nUndoRedo.prototype.destroy = function () {\n this.clear();\n this.instance = null;\n this.doneActions = null;\n this.undoneActions = null;\n};\n\nUndoRedo.Action = function () {};\n\nUndoRedo.Action.prototype.undo = function () {};\n\nUndoRedo.Action.prototype.redo = function () {};\n/**\n * Change action.\n *\n * @private\n * @param {Array} changes 2D array containing information about each of the edited cells.\n * @param {number[]} selected The cell selection.\n */\n\n\nUndoRedo.ChangeAction = function (changes, selected) {\n this.changes = changes;\n this.selected = selected;\n this.actionType = 'change';\n};\n\ninherit(UndoRedo.ChangeAction, UndoRedo.Action);\n\nUndoRedo.ChangeAction.prototype.undo = function (instance, undoneCallback) {\n var data = deepClone(this.changes);\n var emptyRowsAtTheEnd = instance.countEmptyRows(true);\n var emptyColsAtTheEnd = instance.countEmptyCols(true);\n\n for (var i = 0, len = data.length; i < len; i++) {\n data[i].splice(3, 1);\n }\n\n instance.addHookOnce('afterChange', undoneCallback);\n instance.setDataAtCell(data, null, null, 'UndoRedo.undo');\n\n for (var _i2 = 0, _len = data.length; _i2 < _len; _i2++) {\n var _data$_i = _slicedToArray(data[_i2], 2),\n row = _data$_i[0],\n column = _data$_i[1];\n\n if (instance.getSettings().minSpareRows && row + 1 + instance.getSettings().minSpareRows === instance.countRows() && emptyRowsAtTheEnd === instance.getSettings().minSpareRows) {\n instance.alter('remove_row', parseInt(row + 1, 10), instance.getSettings().minSpareRows);\n instance.undoRedo.doneActions.pop();\n }\n\n if (instance.getSettings().minSpareCols && column + 1 + instance.getSettings().minSpareCols === instance.countCols() && emptyColsAtTheEnd === instance.getSettings().minSpareCols) {\n instance.alter('remove_col', parseInt(column + 1, 10), instance.getSettings().minSpareCols);\n instance.undoRedo.doneActions.pop();\n }\n }\n\n instance.selectCells(this.selected, false, false);\n};\n\nUndoRedo.ChangeAction.prototype.redo = function (instance, onFinishCallback) {\n var data = deepClone(this.changes);\n\n for (var i = 0, len = data.length; i < len; i++) {\n data[i].splice(2, 1);\n }\n\n instance.addHookOnce('afterChange', onFinishCallback);\n instance.setDataAtCell(data, null, null, 'UndoRedo.redo');\n\n if (this.selected) {\n instance.selectCells(this.selected, false, false);\n }\n};\n/**\n * Create row action.\n *\n * @private\n * @param {number} index The visual row index.\n * @param {number} amount The number of created rows.\n */\n\n\nUndoRedo.CreateRowAction = function (index, amount) {\n this.index = index;\n this.amount = amount;\n this.actionType = 'insert_row';\n};\n\ninherit(UndoRedo.CreateRowAction, UndoRedo.Action);\n\nUndoRedo.CreateRowAction.prototype.undo = function (instance, undoneCallback) {\n var rowCount = instance.countRows();\n var minSpareRows = instance.getSettings().minSpareRows;\n\n if (this.index >= rowCount && this.index - minSpareRows < rowCount) {\n this.index -= minSpareRows; // work around the situation where the needed row was removed due to an 'undo' of a made change\n }\n\n instance.addHookOnce('afterRemoveRow', undoneCallback);\n instance.alter('remove_row', this.index, this.amount, 'UndoRedo.undo');\n};\n\nUndoRedo.CreateRowAction.prototype.redo = function (instance, redoneCallback) {\n instance.addHookOnce('afterCreateRow', redoneCallback);\n instance.alter('insert_row', this.index, this.amount, 'UndoRedo.redo');\n};\n/**\n * Remove row action.\n *\n * @private\n * @param {number} index The visual row index.\n * @param {Array} data The removed data.\n * @param {number} fixedRowsBottom Number of fixed rows on the bottom. Remove row action change it sometimes.\n * @param {number} fixedRowsTop Number of fixed rows on the top. Remove row action change it sometimes.\n */\n\n\nUndoRedo.RemoveRowAction = function (index, data, fixedRowsBottom, fixedRowsTop) {\n this.index = index;\n this.data = data;\n this.actionType = 'remove_row';\n this.fixedRowsBottom = fixedRowsBottom;\n this.fixedRowsTop = fixedRowsTop;\n};\n\ninherit(UndoRedo.RemoveRowAction, UndoRedo.Action);\n\nUndoRedo.RemoveRowAction.prototype.undo = function (instance, undoneCallback) {\n var settings = instance.getSettings(); // Changing by the reference as `updateSettings` doesn't work the best.\n\n settings.fixedRowsBottom = this.fixedRowsBottom;\n settings.fixedRowsTop = this.fixedRowsTop;\n instance.alter('insert_row', this.index, this.data.length, 'UndoRedo.undo');\n instance.addHookOnce('afterRender', undoneCallback);\n instance.populateFromArray(this.index, 0, this.data, void 0, void 0, 'UndoRedo.undo');\n};\n\nUndoRedo.RemoveRowAction.prototype.redo = function (instance, redoneCallback) {\n instance.addHookOnce('afterRemoveRow', redoneCallback);\n instance.alter('remove_row', this.index, this.data.length, 'UndoRedo.redo');\n};\n/**\n * Create column action.\n *\n * @private\n * @param {number} index The visual column index.\n * @param {number} amount The number of created columns.\n */\n\n\nUndoRedo.CreateColumnAction = function (index, amount) {\n this.index = index;\n this.amount = amount;\n this.actionType = 'insert_col';\n};\n\ninherit(UndoRedo.CreateColumnAction, UndoRedo.Action);\n\nUndoRedo.CreateColumnAction.prototype.undo = function (instance, undoneCallback) {\n instance.addHookOnce('afterRemoveCol', undoneCallback);\n instance.alter('remove_col', this.index, this.amount, 'UndoRedo.undo');\n};\n\nUndoRedo.CreateColumnAction.prototype.redo = function (instance, redoneCallback) {\n instance.addHookOnce('afterCreateCol', redoneCallback);\n instance.alter('insert_col', this.index, this.amount, 'UndoRedo.redo');\n};\n/**\n * Remove column action.\n *\n * @private\n * @param {number} index The visual column index.\n * @param {number[]} indexes The visual column indexes.\n * @param {Array} data The removed data.\n * @param {Array} headers The header values.\n * @param {number[]} columnPositions The column position.\n * @param {number[]} rowPositions The row position.\n * @param {number} fixedColumnsLeft Number of fixed columns on the left. Remove column action change it sometimes.\n */\n\n\nUndoRedo.RemoveColumnAction = function (index, indexes, data, headers, columnPositions, rowPositions, fixedColumnsLeft) {\n this.index = index;\n this.indexes = indexes;\n this.data = data;\n this.amount = this.data[0].length;\n this.headers = headers;\n this.columnPositions = columnPositions.slice(0);\n this.rowPositions = rowPositions.slice(0);\n this.actionType = 'remove_col';\n this.fixedColumnsLeft = fixedColumnsLeft;\n};\n\ninherit(UndoRedo.RemoveColumnAction, UndoRedo.Action);\n\nUndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback) {\n var _this = this,\n _instance$getPlugin$e,\n _instance$getPlugin;\n\n var settings = instance.getSettings(); // Changing by the reference as `updateSettings` doesn't work the best.\n\n settings.fixedColumnsLeft = this.fixedColumnsLeft;\n var ascendingIndexes = this.indexes.slice(0).sort();\n\n var sortByIndexes = function sortByIndexes(elem, j, arr) {\n return arr[_this.indexes.indexOf(ascendingIndexes[j])];\n };\n\n var removedDataLength = this.data.length;\n var sortedData = [];\n\n for (var rowIndex = 0; rowIndex < removedDataLength; rowIndex++) {\n sortedData.push(arrayMap(this.data[rowIndex], sortByIndexes));\n }\n\n var sortedHeaders = arrayMap(this.headers, sortByIndexes);\n var isFormulaPluginEnabled = (_instance$getPlugin$e = (_instance$getPlugin = instance.getPlugin('formulas')) === null || _instance$getPlugin === void 0 ? void 0 : _instance$getPlugin.enabled) !== null && _instance$getPlugin$e !== void 0 ? _instance$getPlugin$e : false;\n var changes = [];\n instance.alter('insert_col', this.indexes[0], this.indexes.length, 'UndoRedo.undo');\n arrayEach(instance.getSourceDataArray(), function (rowData, rowIndex) {\n arrayEach(ascendingIndexes, function (changedIndex, contiquesIndex) {\n rowData[changedIndex] = sortedData[rowIndex][contiquesIndex];\n changes.push([rowIndex, changedIndex, rowData[changedIndex]]);\n });\n });\n instance.setSourceDataAtCell(changes);\n instance.columnIndexMapper.insertIndexes(ascendingIndexes[0], ascendingIndexes.length); // TODO Temporary hook for undo/redo mess\n\n if (isFormulaPluginEnabled) {\n var setDataAtCellChanges = [];\n arrayEach(instance.getSourceDataArray(), function (rowData, rowIndex) {\n arrayEach(ascendingIndexes, function (changedIndex, contiquesIndex) {\n rowData[changedIndex] = sortedData[rowIndex][contiquesIndex];\n setDataAtCellChanges.push([rowIndex, changedIndex, null, rowData[changedIndex]]);\n });\n });\n instance.getPlugin('formulas').onAfterSetDataAtCell(setDataAtCellChanges);\n }\n\n if (typeof this.headers !== 'undefined') {\n arrayEach(sortedHeaders, function (headerData, columnIndex) {\n instance.getSettings().colHeaders[ascendingIndexes[columnIndex]] = headerData;\n });\n }\n\n instance.batchExecution(function () {\n // Restore row sequence in a case when all columns are removed. the original\n // row sequence is lost in that case.\n instance.rowIndexMapper.setIndexesSequence(_this.rowPositions);\n instance.columnIndexMapper.setIndexesSequence(_this.columnPositions);\n }, true);\n instance.addHookOnce('afterRender', undoneCallback); // TODO Temporary hook for undo/redo mess\n\n instance.runHooks('afterCreateCol', this.indexes[0], this.indexes.length, 'UndoRedo.undo');\n\n if (isFormulaPluginEnabled) {\n instance.getPlugin('formulas').recalculateFull();\n }\n\n instance.render();\n};\n\nUndoRedo.RemoveColumnAction.prototype.redo = function (instance, redoneCallback) {\n instance.addHookOnce('afterRemoveCol', redoneCallback);\n instance.alter('remove_col', this.index, this.amount, 'UndoRedo.redo');\n};\n/**\n * Cell alignment action.\n *\n * @private\n * @param {Array} stateBefore The previous state.\n * @param {object} range The cell range.\n * @param {string} type The type of the alignment (\"top\", \"left\", \"bottom\" or \"right\").\n * @param {string} alignment The alignment CSS class.\n */\n\n\nUndoRedo.CellAlignmentAction = function (stateBefore, range, type, alignment) {\n this.stateBefore = stateBefore;\n this.range = range;\n this.type = type;\n this.alignment = alignment;\n};\n\nUndoRedo.CellAlignmentAction.prototype.undo = function (instance, undoneCallback) {\n var _this2 = this;\n\n arrayEach(this.range, function (range) {\n range.forAll(function (row, col) {\n // Alignment classes should only collected within cell ranges. We skip header coordinates.\n if (row >= 0 && col >= 0) {\n instance.setCellMeta(row, col, 'className', _this2.stateBefore[row][col] || ' htLeft');\n }\n });\n });\n instance.addHookOnce('afterRender', undoneCallback);\n instance.render();\n};\n\nUndoRedo.CellAlignmentAction.prototype.redo = function (instance, undoneCallback) {\n align(this.range, this.type, this.alignment, function (row, col) {\n return instance.getCellMeta(row, col);\n }, function (row, col, key, value) {\n return instance.setCellMeta(row, col, key, value);\n });\n instance.addHookOnce('afterRender', undoneCallback);\n instance.render();\n};\n/**\n * Filters action.\n *\n * @private\n * @param {Array} conditionsStack An array of the filter condition.\n */\n\n\nUndoRedo.FiltersAction = function (conditionsStack) {\n this.conditionsStack = conditionsStack;\n this.actionType = 'filter';\n};\n\ninherit(UndoRedo.FiltersAction, UndoRedo.Action);\n\nUndoRedo.FiltersAction.prototype.undo = function (instance, undoneCallback) {\n var filters = instance.getPlugin('filters');\n instance.addHookOnce('afterRender', undoneCallback);\n filters.conditionCollection.importAllConditions(this.conditionsStack.slice(0, this.conditionsStack.length - 1));\n filters.filter();\n};\n\nUndoRedo.FiltersAction.prototype.redo = function (instance, redoneCallback) {\n var filters = instance.getPlugin('filters');\n instance.addHookOnce('afterRender', redoneCallback);\n filters.conditionCollection.importAllConditions(this.conditionsStack);\n filters.filter();\n};\n/**\n * Merge Cells action.\n *\n * @util\n */\n\n\nvar MergeCellsAction = /*#__PURE__*/function (_UndoRedo$Action) {\n _inherits(MergeCellsAction, _UndoRedo$Action);\n\n var _super = _createSuper(MergeCellsAction);\n\n function MergeCellsAction(instance, cellRange) {\n var _this3;\n\n _classCallCheck(this, MergeCellsAction);\n\n _this3 = _super.call(this);\n _this3.cellRange = cellRange;\n\n var topLeftCorner = _this3.cellRange.getTopLeftCorner();\n\n var bottomRightCorner = _this3.cellRange.getBottomRightCorner();\n\n _this3.rangeData = instance.getData(topLeftCorner.row, topLeftCorner.col, bottomRightCorner.row, bottomRightCorner.col);\n return _this3;\n }\n\n _createClass(MergeCellsAction, [{\n key: \"undo\",\n value: function undo(instance, undoneCallback) {\n var mergeCellsPlugin = instance.getPlugin('mergeCells');\n instance.addHookOnce('afterRender', undoneCallback);\n mergeCellsPlugin.unmergeRange(this.cellRange, true);\n var topLeftCorner = this.cellRange.getTopLeftCorner();\n instance.populateFromArray(topLeftCorner.row, topLeftCorner.col, this.rangeData, void 0, void 0, 'MergeCells');\n }\n }, {\n key: \"redo\",\n value: function redo(instance, redoneCallback) {\n var mergeCellsPlugin = instance.getPlugin('mergeCells');\n instance.addHookOnce('afterRender', redoneCallback);\n mergeCellsPlugin.mergeRange(this.cellRange);\n }\n }]);\n\n return MergeCellsAction;\n}(UndoRedo.Action);\n\nUndoRedo.MergeCellsAction = MergeCellsAction;\n/**\n * Unmerge Cells action.\n *\n * @util\n */\n\nvar UnmergeCellsAction = /*#__PURE__*/function (_UndoRedo$Action2) {\n _inherits(UnmergeCellsAction, _UndoRedo$Action2);\n\n var _super2 = _createSuper(UnmergeCellsAction);\n\n function UnmergeCellsAction(instance, cellRange) {\n var _this4;\n\n _classCallCheck(this, UnmergeCellsAction);\n\n _this4 = _super2.call(this);\n _this4.cellRange = cellRange;\n return _this4;\n }\n\n _createClass(UnmergeCellsAction, [{\n key: \"undo\",\n value: function undo(instance, undoneCallback) {\n var mergeCellsPlugin = instance.getPlugin('mergeCells');\n instance.addHookOnce('afterRender', undoneCallback);\n mergeCellsPlugin.mergeRange(this.cellRange, true);\n }\n }, {\n key: \"redo\",\n value: function redo(instance, redoneCallback) {\n var mergeCellsPlugin = instance.getPlugin('mergeCells');\n instance.addHookOnce('afterRender', redoneCallback);\n mergeCellsPlugin.unmergeRange(this.cellRange, true);\n instance.render();\n }\n }]);\n\n return UnmergeCellsAction;\n}(UndoRedo.Action);\n\nUndoRedo.UnmergeCellsAction = UnmergeCellsAction;\n/**\n * ManualRowMove action.\n *\n * @TODO removeRow undo should works on logical index\n * @private\n * @param {number[]} rows An array with moved rows.\n * @param {number} finalIndex The destination index.\n */\n\nUndoRedo.RowMoveAction = function (rows, finalIndex) {\n this.rows = rows.slice();\n this.finalIndex = finalIndex;\n};\n\ninherit(UndoRedo.RowMoveAction, UndoRedo.Action);\n\nUndoRedo.RowMoveAction.prototype.undo = function (instance, undoneCallback) {\n var _this5 = this;\n\n var manualRowMove = instance.getPlugin('manualRowMove');\n var copyOfRows = [].concat(this.rows);\n var rowsMovedUp = copyOfRows.filter(function (a) {\n return a > _this5.finalIndex;\n });\n var rowsMovedDown = copyOfRows.filter(function (a) {\n return a <= _this5.finalIndex;\n });\n var allMovedRows = rowsMovedUp.sort(function (a, b) {\n return b - a;\n }).concat(rowsMovedDown.sort(function (a, b) {\n return a - b;\n }));\n instance.addHookOnce('afterRender', undoneCallback); // Moving rows from those with higher indexes to those with lower indexes when action was performed from bottom to top\n // Moving rows from those with lower indexes to those with higher indexes when action was performed from top to bottom\n\n for (var i = 0; i < allMovedRows.length; i += 1) {\n var newPhysicalRow = instance.toVisualRow(allMovedRows[i]);\n manualRowMove.moveRow(newPhysicalRow, allMovedRows[i]);\n }\n\n instance.render();\n instance.deselectCell();\n instance.selectRows(this.rows[0], this.rows[0] + this.rows.length - 1);\n};\n\nUndoRedo.RowMoveAction.prototype.redo = function (instance, redoneCallback) {\n var manualRowMove = instance.getPlugin('manualRowMove');\n instance.addHookOnce('afterRender', redoneCallback);\n manualRowMove.moveRows(this.rows.slice(), this.finalIndex);\n instance.render();\n instance.deselectCell();\n instance.selectRows(this.finalIndex, this.finalIndex + this.rows.length - 1);\n};\n/**\n *\n */\n\n\nfunction init() {\n var instance = this;\n var settings = instance.getSettings().undo;\n var pluginEnabled = typeof settings === 'undefined' || settings;\n\n if (!instance.undoRedo) {\n /**\n * Instance of Handsontable.UndoRedo Plugin {@link Handsontable.UndoRedo}.\n *\n * @alias undoRedo\n * @memberof! Handsontable.Core#\n * @type {UndoRedo}\n */\n instance.undoRedo = new UndoRedo(instance);\n }\n\n if (pluginEnabled) {\n instance.undoRedo.enable();\n } else {\n instance.undoRedo.disable();\n }\n}\n/**\n * @param {Event} event The keyboard event object.\n */\n\n\nfunction onBeforeKeyDown(event) {\n if (isImmediatePropagationStopped(event)) {\n return;\n }\n\n var instance = this;\n var editor = instance.getActiveEditor();\n\n if (editor && editor.isOpened()) {\n return;\n }\n\n var altKey = event.altKey,\n ctrlKey = event.ctrlKey,\n keyCode = event.keyCode,\n metaKey = event.metaKey,\n shiftKey = event.shiftKey;\n var isCtrlDown = (ctrlKey || metaKey) && !altKey;\n\n if (!isCtrlDown) {\n return;\n }\n\n var isRedoHotkey = keyCode === 89 || shiftKey && keyCode === 90;\n\n if (isRedoHotkey) {\n // CTRL + Y or CTRL + SHIFT + Z\n instance.undoRedo.redo();\n stopImmediatePropagation(event);\n } else if (keyCode === 90) {\n // CTRL + Z\n instance.undoRedo.undo();\n stopImmediatePropagation(event);\n }\n}\n/**\n * @param {Array} changes 2D array containing information about each of the edited cells.\n * @param {string} source String that identifies source of hook call.\n * @returns {boolean}\n */\n\n\nfunction onAfterChange(changes, source) {\n var instance = this;\n\n if (source === 'loadData') {\n return instance.undoRedo.clear();\n }\n}\n/**\n * @param {Core} instance The Handsontable instance.\n */\n\n\nfunction exposeUndoRedoMethods(instance) {\n /**\n * {@link UndoRedo#undo}.\n *\n * @alias undo\n * @memberof! Handsontable.Core#\n * @returns {boolean}\n */\n instance.undo = function () {\n return instance.undoRedo.undo();\n };\n /**\n * {@link UndoRedo#redo}.\n *\n * @alias redo\n * @memberof! Handsontable.Core#\n * @returns {boolean}\n */\n\n\n instance.redo = function () {\n return instance.undoRedo.redo();\n };\n /**\n * {@link UndoRedo#isUndoAvailable}.\n *\n * @alias isUndoAvailable\n * @memberof! Handsontable.Core#\n * @returns {boolean}\n */\n\n\n instance.isUndoAvailable = function () {\n return instance.undoRedo.isUndoAvailable();\n };\n /**\n * {@link UndoRedo#isRedoAvailable}.\n *\n * @alias isRedoAvailable\n * @memberof! Handsontable.Core#\n * @returns {boolean}\n */\n\n\n instance.isRedoAvailable = function () {\n return instance.undoRedo.isRedoAvailable();\n };\n /**\n * {@link UndoRedo#clear}.\n *\n * @alias clearUndo\n * @memberof! Handsontable.Core#\n * @returns {boolean}\n */\n\n\n instance.clearUndo = function () {\n return instance.undoRedo.clear();\n };\n}\n/**\n * @param {Core} instance The Handsontable instance.\n */\n\n\nfunction removeExposedUndoRedoMethods(instance) {\n delete instance.undo;\n delete instance.redo;\n delete instance.isUndoAvailable;\n delete instance.isRedoAvailable;\n delete instance.clearUndo;\n}\n\nvar hook = Hooks.getSingleton();\nhook.add('afterInit', init);\nhook.add('afterUpdateSettings', init);\nhook.register('beforeUndo');\nhook.register('afterUndo');\nhook.register('beforeRedo');\nhook.register('afterRedo');\nUndoRedo.PLUGIN_KEY = PLUGIN_KEY;\nexport default UndoRedo;","import \"core-js/modules/es.object.get-own-property-names.js\";\nimport Handsontable from \"./base.mjs\";\nimport EventManager, { getListenersCounter } from \"./eventManager.mjs\";\nimport { getRegisteredMapsCounter } from \"./translations/mapCollection.mjs\";\nimport Hooks from \"./pluginHooks.mjs\";\nimport { metaSchemaFactory } from \"./dataMap/index.mjs\";\nimport jQueryWrapper from \"./helpers/wrappers/jquery.mjs\";\nimport GhostTable from \"./utils/ghostTable.mjs\";\nimport * as parseTableHelpers from \"./utils/parseTable.mjs\";\nimport * as arrayHelpers from \"./helpers/array.mjs\";\nimport * as browserHelpers from \"./helpers/browser.mjs\";\nimport * as dataHelpers from \"./helpers/data.mjs\";\nimport * as dateHelpers from \"./helpers/date.mjs\";\nimport * as featureHelpers from \"./helpers/feature.mjs\";\nimport * as functionHelpers from \"./helpers/function.mjs\";\nimport * as mixedHelpers from \"./helpers/mixed.mjs\";\nimport * as numberHelpers from \"./helpers/number.mjs\";\nimport * as objectHelpers from \"./helpers/object.mjs\";\nimport * as stringHelpers from \"./helpers/string.mjs\";\nimport * as unicodeHelpers from \"./helpers/unicode.mjs\";\nimport * as domHelpers from \"./helpers/dom/element.mjs\";\nimport * as domEventHelpers from \"./helpers/dom/event.mjs\";\n/* eslint-disable handsontable/restricted-module-imports */\n// Since the Handsontable was modularized, importing some submodules is restricted.\n// Importing the main entry of the submodule can make the \"dead\" code elimination\n// process more difficult. The \"handsontable/restricted-module-imports\" rule is on\n// guard. For the index.js file, the rule has to be disabled. This file exports the\n// full version of the Handsontable with build-in all available components, so that's\n// why the rule is disabled here (see more #7506).\n\nimport { getRegisteredEditorNames, getEditor, registerEditor, AutocompleteEditor, BaseEditor, CheckboxEditor, DateEditor, DropdownEditor, HandsontableEditor, NumericEditor, PasswordEditor, SelectEditor, TextEditor } from \"./editors/index.mjs\";\nimport { getRegisteredRendererNames, getRenderer, registerRenderer, baseRenderer, autocompleteRenderer, checkboxRenderer, htmlRenderer, numericRenderer, passwordRenderer, textRenderer } from \"./renderers/index.mjs\";\nimport { getRegisteredValidatorNames, getValidator, registerValidator, autocompleteValidator, dateValidator, numericValidator, timeValidator } from \"./validators/index.mjs\";\nimport { getRegisteredCellTypeNames, getCellType, registerCellType, AutocompleteCellType, CheckboxCellType, DateCellType, DropdownCellType, HandsontableCellType, NumericCellType, PasswordCellType, TextCellType, TimeCellType } from \"./cellTypes/index.mjs\";\nimport { AutoColumnSize, AutoRowSize, Autofill, BasePlugin, BindRowsWithHeaders, CollapsibleColumns, ColumnSorting, ColumnSummary, Comments, ContextMenu, CopyPaste, CustomBorders, DragToScroll, DropdownMenu, ExportFile, Filters, Formulas, HeaderTooltips, HiddenColumns, HiddenRows, ManualColumnFreeze, ManualColumnMove, ManualColumnResize, ManualRowMove, ManualRowResize, MergeCells, MultiColumnSorting, MultipleSelectionHandles, NestedHeaders, NestedRows, ObserveChanges, PersistentState, Search, TouchScroll, TrimRows, UndoRedo, getPlugin, getPluginsNames, registerPlugin } from \"./plugins/index.mjs\";\n/* eslint-enable handsontable/restricted-module-imports */\n\nregisterEditor(BaseEditor);\nregisterEditor(AutocompleteEditor);\nregisterEditor(CheckboxEditor);\nregisterEditor(DateEditor);\nregisterEditor(DropdownEditor);\nregisterEditor(HandsontableEditor);\nregisterEditor(NumericEditor);\nregisterEditor(PasswordEditor);\nregisterEditor(SelectEditor);\nregisterEditor(TextEditor);\nregisterRenderer(baseRenderer);\nregisterRenderer(autocompleteRenderer);\nregisterRenderer(checkboxRenderer);\nregisterRenderer(htmlRenderer);\nregisterRenderer(numericRenderer);\nregisterRenderer(passwordRenderer);\nregisterRenderer(textRenderer);\nregisterValidator(autocompleteValidator);\nregisterValidator(dateValidator);\nregisterValidator(numericValidator);\nregisterValidator(timeValidator);\nregisterCellType(AutocompleteCellType);\nregisterCellType(CheckboxCellType);\nregisterCellType(DateCellType);\nregisterCellType(DropdownCellType);\nregisterCellType(HandsontableCellType);\nregisterCellType(NumericCellType);\nregisterCellType(PasswordCellType);\nregisterCellType(TimeCellType);\nregisterCellType(TextCellType);\njQueryWrapper(Handsontable);\nregisterPlugin(AutoColumnSize);\nregisterPlugin(Autofill);\nregisterPlugin(AutoRowSize);\nregisterPlugin(BindRowsWithHeaders);\nregisterPlugin(CollapsibleColumns);\nregisterPlugin(ColumnSorting);\nregisterPlugin(ColumnSummary);\nregisterPlugin(Comments);\nregisterPlugin(ContextMenu);\nregisterPlugin(CopyPaste);\nregisterPlugin(CustomBorders);\nregisterPlugin(DragToScroll);\nregisterPlugin(DropdownMenu);\nregisterPlugin(ExportFile);\nregisterPlugin(Filters);\nregisterPlugin(Formulas);\nregisterPlugin(HeaderTooltips);\nregisterPlugin(HiddenColumns);\nregisterPlugin(HiddenRows);\nregisterPlugin(ManualColumnFreeze);\nregisterPlugin(ManualColumnMove);\nregisterPlugin(ManualColumnResize);\nregisterPlugin(ManualRowMove);\nregisterPlugin(ManualRowResize);\nregisterPlugin(MergeCells);\nregisterPlugin(MultiColumnSorting);\nregisterPlugin(MultipleSelectionHandles);\nregisterPlugin(NestedHeaders);\nregisterPlugin(NestedRows);\nregisterPlugin(ObserveChanges);\nregisterPlugin(PersistentState);\nregisterPlugin(Search);\nregisterPlugin(TouchScroll);\nregisterPlugin(TrimRows);\nregisterPlugin(UndoRedo); // TODO: Remove this exports after rewrite tests about this module\n\nHandsontable.__GhostTable = GhostTable;\nHandsontable._getListenersCounter = getListenersCounter; // For MemoryLeak tests\n\nHandsontable._getRegisteredMapsCounter = getRegisteredMapsCounter; // For MemoryLeak tests\n\nHandsontable.DefaultSettings = metaSchemaFactory();\nHandsontable.EventManager = EventManager; // Export Hooks singleton\n\nHandsontable.hooks = Hooks.getSingleton(); // Export all helpers to the Handsontable object\n\nvar HELPERS = [arrayHelpers, browserHelpers, dataHelpers, dateHelpers, featureHelpers, functionHelpers, mixedHelpers, numberHelpers, objectHelpers, stringHelpers, unicodeHelpers, parseTableHelpers];\nvar DOM = [domHelpers, domEventHelpers];\nHandsontable.helper = {};\nHandsontable.dom = {}; // Fill general helpers.\n\narrayHelpers.arrayEach(HELPERS, function (helper) {\n arrayHelpers.arrayEach(Object.getOwnPropertyNames(helper), function (key) {\n if (key.charAt(0) !== '_') {\n Handsontable.helper[key] = helper[key];\n }\n });\n}); // Fill DOM helpers.\n\narrayHelpers.arrayEach(DOM, function (helper) {\n arrayHelpers.arrayEach(Object.getOwnPropertyNames(helper), function (key) {\n if (key.charAt(0) !== '_') {\n Handsontable.dom[key] = helper[key];\n }\n });\n}); // Export cell types.\n\nHandsontable.cellTypes = {};\narrayHelpers.arrayEach(getRegisteredCellTypeNames(), function (cellTypeName) {\n Handsontable.cellTypes[cellTypeName] = getCellType(cellTypeName);\n});\nHandsontable.cellTypes.registerCellType = registerCellType;\nHandsontable.cellTypes.getCellType = getCellType; // Export all registered editors from the Handsontable.\n\nHandsontable.editors = {};\narrayHelpers.arrayEach(getRegisteredEditorNames(), function (editorName) {\n Handsontable.editors[\"\".concat(stringHelpers.toUpperCaseFirst(editorName), \"Editor\")] = getEditor(editorName);\n});\nHandsontable.editors.registerEditor = registerEditor;\nHandsontable.editors.getEditor = getEditor; // Export all registered renderers from the Handsontable.\n\nHandsontable.renderers = {};\narrayHelpers.arrayEach(getRegisteredRendererNames(), function (rendererName) {\n var renderer = getRenderer(rendererName);\n\n if (rendererName === 'base') {\n Handsontable.renderers.cellDecorator = renderer;\n }\n\n Handsontable.renderers[\"\".concat(stringHelpers.toUpperCaseFirst(rendererName), \"Renderer\")] = renderer;\n});\nHandsontable.renderers.registerRenderer = registerRenderer;\nHandsontable.renderers.getRenderer = getRenderer; // Export all registered validators from the Handsontable.\n\nHandsontable.validators = {};\narrayHelpers.arrayEach(getRegisteredValidatorNames(), function (validatorName) {\n Handsontable.validators[\"\".concat(stringHelpers.toUpperCaseFirst(validatorName), \"Validator\")] = getValidator(validatorName);\n});\nHandsontable.validators.registerValidator = registerValidator;\nHandsontable.validators.getValidator = getValidator; // Export all registered plugins from the Handsontable.\n// Make sure to initialize the plugin dictionary as an empty object. Otherwise, while\n// transpiling the files into ES and CommonJS format, the injected CoreJS helper\n// `import \"core-js/modules/es.object.get-own-property-names\";` won't be processed\n// by the `./config/plugin/babel/add-import-extension` babel plugin. Thus, the distribution\n// files will be broken. The reason is not known right now (probably it's caused by bug in\n// the Babel or missing something in the plugin).\n\nHandsontable.plugins = {};\narrayHelpers.arrayEach(getPluginsNames(), function (pluginName) {\n Handsontable.plugins[pluginName] = getPlugin(pluginName);\n});\nHandsontable.plugins[\"\".concat(stringHelpers.toUpperCaseFirst(BasePlugin.PLUGIN_KEY), \"Plugin\")] = BasePlugin;\nHandsontable.plugins.registerPlugin = registerPlugin;\nHandsontable.plugins.getPlugin = getPlugin;\nexport default Handsontable;","import \"core-js/modules/es.array.concat.js\";\n/**\n * @param {Core} Handsontable The Handsontable instance.\n */\n\nexport default function jQueryWrapper(Handsontable) {\n // eslint-disable-next-line\n var jQuery = typeof window === 'undefined' ? false : window.jQuery;\n\n if (!jQuery) {\n return;\n }\n\n jQuery.fn.handsontable = function (action) {\n var $this = this.first(); // Use only first element from list\n\n var instance = $this.data('handsontable'); // Init case\n\n if (typeof action !== 'string') {\n var userSettings = action || {};\n\n if (instance) {\n instance.updateSettings(userSettings);\n } else {\n instance = new Handsontable.Core($this[0], userSettings);\n $this.data('handsontable', instance);\n instance.init();\n }\n\n return $this;\n }\n\n var output; // Action case\n\n if (instance) {\n if (typeof instance[action] !== 'undefined') {\n var _instance$action;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n output = (_instance$action = instance[action]).call.apply(_instance$action, [instance].concat(args));\n\n if (action === 'destroy') {\n $this.removeData();\n }\n } else {\n throw new Error(\"Handsontable do not provide action: \".concat(action));\n }\n }\n\n return output;\n };\n}","'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat) {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n\n case '[object Exception]':\n return true;\n\n case '[object DOMException]':\n return true;\n\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isErrorEvent(wat) {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isDOMError(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isDOMException(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isString(wat) {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isPrimitive(wat) {\n return wat === null || _typeof(wat) !== 'object' && typeof wat !== 'function';\n}\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isPlainObject(wat) {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isRegExp(wat) {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\n\nexport function isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\n\nexport function isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\n\nexport function isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('input',{ref:\"input\",attrs:{\"type\":\"number\",\"disabled\":_vm.disabled,\"required\":_vm.required},domProps:{\"value\":_vm.value},on:{\"change\":function($event){return _vm.onChange($event.target.value)},\"input\":function($event){return _vm.onInput($event.target.value)},\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }$event.preventDefault();}}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./currency_input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./currency_input.vue?vue&type=script&lang=js&\"","\n \n \n\n","import { render, staticRenderFns } from \"./currency_input.vue?vue&type=template&id=14ef5300&\"\nimport script from \"./currency_input.vue?vue&type=script&lang=js&\"\nexport * from \"./currency_input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_OUT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterOut\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterOut` method\n // https://github.com/tc39/proposal-array-filtering\n filterOut: createMethod(7)\n};\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.es/ecma262/#sec-map-objects\nmodule.exports = collection('Map', function (init) {\n return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col s12\",class:{ 'radio_buttons': _vm.isHorizontal }},_vm._l((_vm.options),function(option){return _c('materialize-checkbox',{key:option.value,attrs:{\"inputClass\":_vm.inputClass,\"labelClass\":_vm.labelClass,\"labelStyle\":_vm.labelStyle,\"label\":option.text,\"type\":_vm.type,\"disabled\":_vm.disabled,\"isHorizontal\":_vm.isHorizontal,\"value\":_vm.value === option.value},on:{\"input\":function (checked) { checked && _vm.$emit('input', option.value) }}})}),1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./materialize_checkboxes.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./materialize_checkboxes.vue?vue&type=script&lang=js&\"","\n \n
\n { checked && $emit('input', option.value) }\"\n > \n
\n
\n \n\n\n\n","import { render, staticRenderFns } from \"./materialize_checkboxes.vue?vue&type=template&id=604356f2&\"\nimport script from \"./materialize_checkboxes.vue?vue&type=script&lang=js&\"\nexport * from \"./materialize_checkboxes.vue?vue&type=script&lang=js&\"\nimport style0 from \"./materialize_checkboxes.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","import { isNodeEnv } from \"./node\";\nimport { snipLine } from \"./string\";\nvar fallbackGlobalObject = {};\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\n\nexport function getGlobalObject() {\n return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : fallbackGlobalObject;\n}\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\n\nexport function uuid4() {\n var global = getGlobalObject();\n var crypto = global.crypto || global.msCrypto;\n\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr); // set 4 in byte 7\n // eslint-disable-next-line no-bitwise\n\n arr[3] = arr[3] & 0xfff | 0x4000; // set 2 most significant bits of byte 9 to '10'\n // eslint-disable-next-line no-bitwise\n\n arr[4] = arr[4] & 0x3fff | 0x8000;\n\n var pad = function pad(num) {\n var v = num.toString(16);\n\n while (v.length < 4) {\n v = \"0\" + v;\n }\n\n return v;\n };\n\n return pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]);\n } // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n\n\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // eslint-disable-next-line no-bitwise\n var r = Math.random() * 16 | 0; // eslint-disable-next-line no-bitwise\n\n var v = c === 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\n\nexport function parseUrl(url) {\n if (!url) {\n return {};\n }\n\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n } // coerce to undefined values to empty string so we don't get 'undefined'\n\n\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment\n };\n}\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\n\nexport function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n\n if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n\n return exception.type || exception.value || event.event_id || '';\n }\n\n return event.event_id || '';\n}\n/** JSDoc */\n\nexport function consoleSandbox(callback) {\n var global = getGlobalObject();\n var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n\n if (!('console' in global)) {\n return callback();\n } // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n\n var originalConsole = global.console;\n var wrappedLevels = {}; // Restore all wrapped console methods\n\n levels.forEach(function (level) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (level in global.console && originalConsole[level].__sentry_original__) {\n wrappedLevels[level] = originalConsole[level];\n originalConsole[level] = originalConsole[level].__sentry_original__;\n }\n }); // Perform callback manipulations\n\n var result = callback(); // Revert restoration to wrapped state\n\n Object.keys(wrappedLevels).forEach(function (level) {\n originalConsole[level] = wrappedLevels[level];\n });\n return result;\n}\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\n\nexport function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\n\nexport function addExceptionMechanism(event, mechanism) {\n if (mechanism === void 0) {\n mechanism = {};\n } // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n\n\n try {\n // @ts-ignore Type 'Mechanism | {}' is not assignable to type 'Mechanism | undefined'\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || {};\n Object.keys(mechanism).forEach(function (key) {\n // @ts-ignore Mechanism has no index signature\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].mechanism[key] = mechanism[key];\n });\n } catch (_oO) {// no-empty\n }\n}\n/**\n * A safe form of location.href\n */\n\nexport function getLocationHref() {\n try {\n return document.location.href;\n } catch (oO) {\n return '';\n }\n} // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\n\nvar SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\n\nexport function parseSemver(input) {\n var match = input.match(SEMVER_REGEXP) || [];\n var major = parseInt(match[1], 10);\n var minor = parseInt(match[2], 10);\n var patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4]\n };\n}\nvar defaultRetryAfter = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\n\nexport function parseRetryAfterHeader(now, header) {\n if (!header) {\n return defaultRetryAfter;\n }\n\n var headerDelay = parseInt(\"\" + header, 10);\n\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n var headerDate = Date.parse(\"\" + header);\n\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return defaultRetryAfter;\n}\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\n\nexport function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) {\n linesOfContext = 5;\n }\n\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map(function (line) {\n return snipLine(line, 0);\n });\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map(function (line) {\n return snipLine(line, 0);\n });\n}\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\n\nexport function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n // eslint-disable-next-line es/no-array-from -- required for testing\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","import { render, staticRenderFns } from \"./modal.vue?vue&type=template&id=81279c68&scoped=true&\"\nimport script from \"./modal.vue?vue&type=script&lang=js&\"\nexport * from \"./modal.vue?vue&type=script&lang=js&\"\nimport style0 from \"./modal.vue?vue&type=style&index=0&id=81279c68&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"81279c68\",\n null\n \n)\n\nexport default component.exports","// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar slice = [].slice;\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\n\nvar wrap = function (scheduler) {\n return function (handler, timeout /* , ...arguments */) {\n var boundArgs = arguments.length > 2;\n var args = boundArgs ? slice.call(arguments, 2) : undefined;\n return scheduler(boundArgs ? function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (typeof handler == 'function' ? handler : Function(handler)).apply(this, args);\n } : handler, timeout);\n };\n};\n\n// ie9- setTimeout & setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n$({ global: true, bind: true, forced: MSIE }, {\n // `setTimeout` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n setTimeout: wrap(global.setTimeout),\n // `setInterval` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n setInterval: wrap(global.setInterval)\n});\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var path = require('../internals/path');\nvar has = require('../internals/has');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","'use strict';\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = String(R.source);\n var rf = R.flags;\n var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar quot = /\"/g;\n\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\n// https://tc39.es/ecma262/#sec-createhtml\nmodule.exports = function (string, tag, attribute, value) {\n var S = String(requireObjectCoercible(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '' + tag + '>';\n};\n","var fails = require('../internals/fails');\n\n// check the existence of a method, lowercase\n// of a tag and escaping quotes in arguments\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n var test = ''[METHOD_NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n });\n};\n","const numeral = require(\"numeral\");\nconst currencyFormatter = require(\"currency-formatter\");\n\nfunction formatDecimal(s) {\n return numeral(s).format(\"0.00\");\n}\nfunction formatNumber(s) {\n return numeral(s).format(\"0\");\n}\n\nfunction formatCurrency(s) {\n return numeral(s).format(\"$0,0.00\");\n}\n\nfunction formatRespectiveCurrency(value, currencyCode) {\n // return currencyFormatter.format(value, { code: currencyCode });\n return new Intl.NumberFormat(\"en-GB\", {\n style: \"currency\",\n currency: currencyCode,\n }).format(value);\n}\n\nfunction formatShowMore(s) {\n return s > 0 ? numeral(s).format(\"0[.]0a+\") : \"0\";\n}\n\nmodule.exports = {\n formatDecimal,\n formatNumber,\n formatCurrency,\n formatRespectiveCurrency,\n formatShowMore,\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getSubstitution = require('../internals/get-substitution');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\nvar max = Math.max;\nvar min = Math.min;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {\n var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;\n var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n if (\n (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||\n (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)\n ) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n }\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n});\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, UNSUPPORTED_Y);\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var $ = require('../internals/export');\nvar isInteger = require('../internals/is-integer');\n\n// `Number.isInteger` method\n// https://tc39.es/ecma262/#sec-number.isinteger\n$({ target: 'Number', stat: true }, {\n isInteger: isInteger\n});\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.es/ecma262/#sec-set-objects\nmodule.exports = collection('Set', function (init) {\n return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar freeGlobal = require(\"./_freeGlobal\");\n/** Detect free variable `self`. */\n\n\nvar freeSelf = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) == 'object' && self && self.Object === Object && self;\n/** Used as a reference to the global object. */\n\nvar root = freeGlobal || freeSelf || Function('return this')();\nmodule.exports = root;","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('form',{staticClass:\"simple_form\",attrs:{\"novalidate\":\"novalidate\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.submitForm($event)}}},[_c('modal',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showModal),expression:\"showModal\"}],on:{\"close\":function($event){!_vm.isSubmitting && _vm.$emit('close')}},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_vm._t(\"header\",[_c('h4',{ref:\"header\",staticClass:\"modal-form-title\"},[_vm._v(_vm._s(_vm.titleText))])])]},proxy:true},{key:\"body\",fn:function(){return [(_vm.hasErrors)?_c('blockquote',{staticClass:\"error-notification\"},[_vm._v(\"\\n Please correct the errors highlighted below:\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.errors)?_c('blockquote',{staticClass:\"error-notification\"},[_vm._v(\"\\n Please correct the errors listed below:\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.errors)?_c('ul',{attrs:{\"id\":\"errors-list\"}},_vm._l((_vm.errors),function(error){return _c('li',{key:error,staticClass:\"error-notification\"},[_vm._v(\"\\n - \"+_vm._s(error)+\"\\n \")])}),0):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"form-inputs\"},[_vm._t(\"default\")],2)]},proxy:true},{key:\"footer\",fn:function(){return [_c('button',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showSubmit),expression:\"showSubmit\"}],staticClass:\"btn btn-primary right\",attrs:{\"type\":\"submit\",\"name\":\"commit\",\"disabled\":_vm.disableSubmit || _vm.isSubmitting}},[_vm._v(\"\\n \"+_vm._s(_vm.isSubmitting ? _vm.submittingText : _vm.submitText)+\"\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-default right\",staticStyle:{\"margin-right\":\"5px\"},on:{\"click\":function($event){return _vm.$emit('close')}}},[_vm._v(\"\\n Cancel\\n \")])]},proxy:true}],null,true)})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n\n\n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal_form.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal_form.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./modal_form.vue?vue&type=template&id=68a0cffe&scoped=true&\"\nimport script from \"./modal_form.vue?vue&type=script&lang=js&\"\nexport * from \"./modal_form.vue?vue&type=script&lang=js&\"\nimport style0 from \"./modal_form.vue?vue&type=style&index=0&id=68a0cffe&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"68a0cffe\",\n null\n \n)\n\nexport default component.exports","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","module.exports = false;\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { __values } from \"tslib\";\nimport { htmlTreeAsString } from \"./browser\";\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from \"./is\";\nimport { Memo } from \"./memo\";\nimport { getFunctionName } from \"./stacktrace\";\nimport { truncate } from \"./string\";\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\n\nexport function fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n var original = source[name];\n var wrapped = replacementFactory(original); // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original\n }\n });\n } catch (_Oo) {// This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n\n source[name] = wrapped;\n}\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\n\nexport function urlEncode(object) {\n return Object.keys(object).map(function (key) {\n return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]);\n }).join('&');\n}\n/**\n * Transforms any object into an object literal with all its attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n */\n\nfunction getWalkSource(value) {\n if (isError(value)) {\n var error = value;\n var err = {\n message: error.message,\n name: error.name,\n stack: error.stack\n };\n\n for (var i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n\n return err;\n }\n\n if (isEvent(value)) {\n var event_1 = value;\n var source = {};\n source.type = event_1.type; // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n\n try {\n source.target = isElement(event_1.target) ? htmlTreeAsString(event_1.target) : Object.prototype.toString.call(event_1.target);\n } catch (_oO) {\n source.target = '';\n }\n\n try {\n source.currentTarget = isElement(event_1.currentTarget) ? htmlTreeAsString(event_1.currentTarget) : Object.prototype.toString.call(event_1.currentTarget);\n } catch (_oO) {\n source.currentTarget = '';\n }\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event_1.detail;\n }\n\n for (var i in event_1) {\n if (Object.prototype.hasOwnProperty.call(event_1, i)) {\n source[i] = event_1;\n }\n }\n\n return source;\n }\n\n return value;\n}\n/** Calculates bytes size of input string */\n\n\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */\n\n\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n/** JSDoc */\n\n\nexport function normalizeToSize(object, // Default Node.js REPL depth\ndepth, // 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize) {\n if (depth === void 0) {\n depth = 3;\n }\n\n if (maxSize === void 0) {\n maxSize = 100 * 1024;\n }\n\n var serialized = normalize(object, depth);\n\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return serialized;\n}\n/**\n * Transform any non-primitive, BigInt, or Symbol-type value into a string. Acts as a no-op on strings, numbers,\n * booleans, null, and undefined.\n *\n * @param value The value to stringify\n * @returns For non-primitive, BigInt, and Symbol-type values, a string denoting the value's type, type and value, or\n * type and `description` property, respectively. For non-BigInt, non-Symbol primitives, returns the original value,\n * unchanged.\n */\n\nfunction serializeValue(value) {\n var type = Object.prototype.toString.call(value); // Node.js REPL notation\n\n if (typeof value === 'string') {\n return value;\n }\n\n if (type === '[object Object]') {\n return '[Object]';\n }\n\n if (type === '[object Array]') {\n return '[Array]';\n }\n\n var normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n\n\nfunction normalizeValue(value, key) {\n if (key === 'domain' && value && _typeof(value) === 'object' && value._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n } // React's SyntheticEvent thingy\n\n\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (value === void 0) {\n return '[undefined]';\n }\n\n if (typeof value === 'function') {\n return \"[Function: \" + getFunctionName(value) + \"]\";\n } // symbols and bigints are considered primitives by TS, but aren't natively JSON-serilaizable\n\n\n if (_typeof(value) === 'symbol') {\n return \"[\" + String(value) + \"]\";\n }\n\n if (typeof value === 'bigint') {\n return \"[BigInt: \" + String(value) + \"]\";\n }\n\n return value;\n}\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\nexport function walk(key, value, depth, memo) {\n if (depth === void 0) {\n depth = +Infinity;\n }\n\n if (memo === void 0) {\n memo = new Memo();\n } // If we reach the maximum depth, serialize whatever has left\n\n\n if (depth === 0) {\n return serializeValue(value);\n }\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // If value implements `toJSON` method, call it and return early\n\n\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n\n\n var normalized = normalizeValue(value, key);\n\n if (isPrimitive(normalized)) {\n return normalized;\n } // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n\n\n var source = getWalkSource(value); // Create an accumulator that will act as a parent for all future itterations of that branch\n\n var acc = Array.isArray(value) ? [] : {}; // If we already walked that branch, bail out, as it's circular reference\n\n if (memo.memoize(value)) {\n return '[Circular ~]';\n } // Walk all keys of the source\n\n\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n } // Recursively walk through all the child nodes\n\n\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n } // Once walked through all the branches, remove the parent from memo storage\n\n\n memo.unmemoize(value); // Return accumulated values\n\n return acc;\n}\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nexport function normalize(input, depth) {\n try {\n return JSON.parse(JSON.stringify(input, function (key, value) {\n return walk(key, value, depth);\n }));\n } catch (_oO) {\n return '**non-serializable**';\n }\n}\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nexport function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) {\n maxLength = 40;\n }\n\n var keys = Object.keys(getWalkSource(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n\n if (serialized.length > maxLength) {\n continue;\n }\n\n if (includedKeys === keys.length) {\n return serialized;\n }\n\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\n\nexport function dropUndefinedKeys(val) {\n var e_1, _a;\n\n if (isPlainObject(val)) {\n var obj = val;\n var rv = {};\n\n try {\n for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n\n return rv;\n }\n\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys);\n }\n\n return val;\n}","'use strict';\nvar $ = require('../internals/export');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = [].join;\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar STRICT_METHOD = arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.es/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {\n join: function join(separator) {\n return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar forEach = require('../internals/array-for-each');\n\n// `Array.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n forEach: forEach\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n return isTypedArrayIndex(target, key = toPrimitive(key, true))\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n if (isTypedArrayIndex(target, key = toPrimitive(key, true))\n && isObject(descriptor)\n && has(descriptor, 'value')\n && !has(descriptor, 'get')\n && !has(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!has(descriptor, 'writable') || descriptor.writable)\n && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","'use strict';\nvar $ = require('../internals/export');\nvar $some = require('../internals/array-iteration').some;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\n\n// `Array.prototype.some` method\n// https://tc39.es/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject -- old IE */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = _typeof(value);\n\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","exports.nil = new Error('#NULL!');\nexports.div0 = new Error('#DIV/0!');\nexports.value = new Error('#VALUE!');\nexports.ref = new Error('#REF!');\nexports.name = new Error('#NAME?');\nexports.num = new Error('#NUM!');\nexports.na = new Error('#N/A');\nexports.error = new Error('#ERROR!');\nexports.data = new Error('#GETTING_DATA');","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar isSymbol = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.es/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.es/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.es/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.es/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.es/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.es/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.es/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.es/ecma262/#sec-json.stringify\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n\n $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var args = [it];\n var index = 1;\n var $replacer;\n while (arguments.length > index) args.push(arguments[index++]);\n $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return $stringify.apply(null, args);\n }\n });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {\n createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// `Symbol.prototype.description` getter\n// https://tc39.es/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","var hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar defineProperty = require('../internals/object-define-property').f;\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + ++id, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","var baseIsNative = require(\"./_baseIsNative\"),\n getValue = require(\"./_getValue\");\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n\n\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;","import { isRegExp, isString } from \"./is\";\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\n\nexport function truncate(str, max) {\n if (max === void 0) {\n max = 0;\n }\n\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n\n return str.length <= max ? str : str.substr(0, max) + \"...\";\n}\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\n\nexport function snipLine(line, colno) {\n var newLine = line;\n var ll = newLine.length;\n\n if (ll <= 150) {\n return newLine;\n }\n\n if (colno > ll) {\n // eslint-disable-next-line no-param-reassign\n colno = ll;\n }\n\n var start = Math.max(colno - 60, 0);\n\n if (start < 5) {\n start = 0;\n }\n\n var end = Math.min(start + 140, ll);\n\n if (end > ll - 5) {\n end = ll;\n }\n\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n\n if (start > 0) {\n newLine = \"'{snip} \" + newLine;\n }\n\n if (end < ll) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nexport function safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n var output = []; // eslint-disable-next-line @typescript-eslint/prefer-for-of\n\n for (var i = 0; i < input.length; i++) {\n var value = input[i];\n\n try {\n output.push(String(value));\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\n\nexport function isMatchingPattern(value, pattern) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n\n return false;\n}","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && _typeof(value) == 'object';\n}\n\nmodule.exports = isObjectLike;","var error = require(\"./error\");\n\nexports.flattenShallow = function (array) {\n if (!array || !array.reduce) {\n return array;\n }\n\n return array.reduce(function (a, b) {\n var aIsArray = Array.isArray(a);\n var bIsArray = Array.isArray(b);\n\n if (aIsArray && bIsArray) {\n return a.concat(b);\n }\n\n if (aIsArray) {\n a.push(b);\n return a;\n }\n\n if (bIsArray) {\n return [a].concat(b);\n }\n\n return [a, b];\n });\n};\n\nexports.isFlat = function (array) {\n if (!array) {\n return false;\n }\n\n for (var i = 0; i < array.length; ++i) {\n if (Array.isArray(array[i])) {\n return false;\n }\n }\n\n return true;\n};\n\nexports.flatten = function () {\n var result = exports.argsToArray.apply(null, arguments);\n\n while (!exports.isFlat(result)) {\n result = exports.flattenShallow(result);\n }\n\n return result;\n};\n\nexports.argsToArray = function (args) {\n var result = [];\n exports.arrayEach(args, function (value) {\n result.push(value);\n });\n return result;\n};\n\nexports.numbers = function () {\n var possibleNumbers = this.flatten.apply(null, arguments);\n return possibleNumbers.filter(function (el) {\n return typeof el === 'number';\n });\n};\n\nexports.cleanFloat = function (number) {\n var power = 1e14;\n return Math.round(number * power) / power;\n};\n\nexports.parseBool = function (bool) {\n if (typeof bool === 'boolean') {\n return bool;\n }\n\n if (bool instanceof Error) {\n return bool;\n }\n\n if (typeof bool === 'number') {\n return bool !== 0;\n }\n\n if (typeof bool === 'string') {\n var up = bool.toUpperCase();\n\n if (up === 'TRUE') {\n return true;\n }\n\n if (up === 'FALSE') {\n return false;\n }\n }\n\n if (bool instanceof Date && !isNaN(bool)) {\n return true;\n }\n\n return error.value;\n};\n\nexports.parseNumber = function (string) {\n if (string === undefined || string === '') {\n return error.value;\n }\n\n if (!isNaN(string)) {\n return parseFloat(string);\n }\n\n return error.value;\n};\n\nexports.parseNumberArray = function (arr) {\n var len;\n\n if (!arr || (len = arr.length) === 0) {\n return error.value;\n }\n\n var parsed;\n\n while (len--) {\n parsed = exports.parseNumber(arr[len]);\n\n if (parsed === error.value) {\n return parsed;\n }\n\n arr[len] = parsed;\n }\n\n return arr;\n};\n\nexports.parseMatrix = function (matrix) {\n var n;\n\n if (!matrix || (n = matrix.length) === 0) {\n return error.value;\n }\n\n var pnarr;\n\n for (var i = 0; i < matrix.length; i++) {\n pnarr = exports.parseNumberArray(matrix[i]);\n matrix[i] = pnarr;\n\n if (pnarr instanceof Error) {\n return pnarr;\n }\n }\n\n return matrix;\n};\n\nvar d1900 = new Date(Date.UTC(1900, 0, 1));\n\nexports.parseDate = function (date) {\n if (!isNaN(date)) {\n if (date instanceof Date) {\n return new Date(date);\n }\n\n var d = parseInt(date, 10);\n\n if (d < 0) {\n return error.num;\n }\n\n if (d <= 60) {\n return new Date(d1900.getTime() + (d - 1) * 86400000);\n }\n\n return new Date(d1900.getTime() + (d - 2) * 86400000);\n }\n\n if (typeof date === 'string') {\n date = new Date(date);\n\n if (!isNaN(date)) {\n return date;\n }\n }\n\n return error.value;\n};\n\nexports.parseDateArray = function (arr) {\n var len = arr.length;\n var parsed;\n\n while (len--) {\n parsed = this.parseDate(arr[len]);\n\n if (parsed === error.value) {\n return parsed;\n }\n\n arr[len] = parsed;\n }\n\n return arr;\n};\n\nexports.anyIsError = function () {\n var n = arguments.length;\n\n while (n--) {\n if (arguments[n] instanceof Error) {\n return true;\n }\n }\n\n return false;\n};\n\nexports.arrayValuesToNumbers = function (arr) {\n var n = arr.length;\n var el;\n\n while (n--) {\n el = arr[n];\n\n if (typeof el === 'number') {\n continue;\n }\n\n if (el === true) {\n arr[n] = 1;\n continue;\n }\n\n if (el === false) {\n arr[n] = 0;\n continue;\n }\n\n if (typeof el === 'string') {\n var number = this.parseNumber(el);\n\n if (number instanceof Error) {\n arr[n] = 0;\n } else {\n arr[n] = number;\n }\n }\n }\n\n return arr;\n};\n\nexports.rest = function (array, idx) {\n idx = idx || 1;\n\n if (!array || typeof array.slice !== 'function') {\n return array;\n }\n\n return array.slice(idx);\n};\n\nexports.initial = function (array, idx) {\n idx = idx || 1;\n\n if (!array || typeof array.slice !== 'function') {\n return array;\n }\n\n return array.slice(0, array.length - idx);\n};\n\nexports.arrayEach = function (array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n\n return array;\n};\n\nexports.transpose = function (matrix) {\n if (!matrix) {\n return error.value;\n }\n\n return matrix[0].map(function (col, i) {\n return matrix.map(function (row) {\n return row[i];\n });\n });\n};","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('input',{ref:\"input\",attrs:{\"type\":\"number\",\"disabled\":_vm.disabled,\"required\":_vm.required},domProps:{\"value\":_vm.value},on:{\"change\":function($event){return _vm.onChange($event.target.value)},\"input\":function($event){return _vm.onInput($event.target.value)},\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }$event.preventDefault();}}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./number_input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./number_input.vue?vue&type=script&lang=js&\"","\n \n \n\n","import { render, staticRenderFns } from \"./number_input.vue?vue&type=template&id=6213a994&\"\nimport script from \"./number_input.vue?vue&type=script&lang=js&\"\nexport * from \"./number_input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD;\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? nativeSort.call(toObject(this))\n : nativeSort.call(toObject(this), aFunction(comparefn));\n }\n});\n","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.16.1\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n\nvar timeoutDuration = function () {\n var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n\n for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n\n return 0;\n}();\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\n\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\n\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\n\n\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n } // NOTE: 1 DOM access here\n\n\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\n\n\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n\n return element.parentNode || element.host;\n}\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\n\n\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n\n case '#document':\n return element.body;\n } // Firefox want us to check `-x` and `-y` variations as well\n\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\n\n\nfunction getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\n\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n\n if (version === 10) {\n return isIE10;\n }\n\n return isIE11 || isIE10;\n}\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\n\n\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n var noOffsetParent = isIE(10) ? document.body : null; // NOTE: 1 DOM access here\n\n var offsetParent = element.offsetParent || null; // Skip hidden elements which don't have an offsetParent\n\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n } // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n\n\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\n\n\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\n\n\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n } // Here we make sure to give as \"start\" the element that comes first in the DOM\n\n\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1; // Get common ancestor container\n\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer; // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n } // one of the nodes is inside shadowDOM, find which one\n\n\n var element1root = getRoot(element1);\n\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\n\n\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\n\n\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar defineProperty = function defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\n\n\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\n\n\nfunction getBoundingClientRect(element) {\n var rect = {}; // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n }; // subtract scrollbar size from sizes\n\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.width;\n var height = sizes.height || element.clientHeight || result.height;\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height; // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth); // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0; // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop);\n var marginLeft = parseFloat(styles.marginLeft);\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft; // Attach marginTop and marginLeft because in some circumstances we may need them\n\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n return getClientRect(offset);\n}\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\n\n\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n\n var parentNode = getParentNode(element);\n\n if (!parentNode) {\n return false;\n }\n\n return isFixed(parentNode);\n}\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n\n var el = element.parentElement;\n\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n\n return el || document.documentElement;\n}\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\n\n\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; // NOTE: 1 DOM access here\n\n var boundaries = {\n top: 0,\n left: 0\n };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); // Handle viewport case\n\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation\n\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n } // Add paddings\n\n\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n return width * height;\n}\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n var variation = placement.split('-')[1];\n return computedPlacement + (variation ? '-' + variation : '');\n}\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\n\n\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\n\n\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\n\n\nfunction getOppositePlacement(placement) {\n var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\n\n\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0]; // Get popper node sizes\n\n var popperRect = getOuterSizes(popper); // Add position, width and height to our offsets object\n\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n }; // depending by the popper placement we have to compute its offsets slightly differently\n\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\n\n\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n } // use `filter` to obtain the same behavior of `find`\n\n\n return arr.filter(check)[0];\n}\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\n\n\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n } // use `find` + `indexOf` if `findIndex` isn't supported\n\n\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\n\n\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n data = fn(data, modifier);\n }\n });\n return data;\n}\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style. \n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\n\n\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n }; // compute reference element offsets\n\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`\n\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed; // compute the popper offsets\n\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers\n\n data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\n\n\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\n\n\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n\n return null;\n}\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\n\n\nfunction destroy() {\n this.state.isDestroyed = true; // touch DOM only if `applyStyle` modifier is enabled\n\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners(); // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n\n return this;\n}\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\n\n\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, {\n passive: true\n });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n\n scrollParents.push(target);\n}\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\n\n\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n }); // Scroll event listener on scroll parents\n\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\n\n\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\n\n\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents\n\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n }); // Reset state\n\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\n\n\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\n\n\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\n\n\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = ''; // add unit if the value is numeric and is one of the following\n\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n\n element.style[prop] = styles[prop] + unit;\n });\n}\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\n\n\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\n\n\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles); // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n\n setAttributes(data.instance.popper, data.attributes); // if arrowElement is defined and arrowStyles has some properties\n\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\n\n\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n popper.setAttribute('x-placement', placement); // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n\n setStyles(popper, {\n position: options.positionFixed ? 'fixed' : 'absolute'\n });\n return options;\n}\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\n\n\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n\n var noRound = function noRound(v) {\n return v;\n };\n\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper; // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent); // Styles\n\n var styles = {\n position: popper.position\n };\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right'; // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n\n var prefixedProperty = getSupportedPropertyName('transform'); // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n\n var left = void 0,\n top = void 0;\n\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n } // Attributes\n\n\n var attributes = {\n 'x-placement': data.placement\n }; // Update `data` attributes, styles and arrowStyles\n\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n return data;\n}\n/**\n * Helper used to know if the given modifier depends from another one. \n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\n\n\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n\n return isRequired;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction arrow(data, options) {\n var _data$offsets$arrow; // arrow depends on keepTogether in order to work\n\n\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element; // if arrowElement is a string, suppose it's a CSS selector\n\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement); // if arrowElement is not found, don't run the modifier\n\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len]; //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n // top/left side\n\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n } // bottom/right side\n\n\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n\n data.offsets.popper = getClientRect(data.offsets.popper); // compute center of the popper\n\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper\n\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n return data;\n}\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\n\n\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n\n return variation;\n}\n/**\n * List of accepted placements to use as values of the `placement` option. \n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right. \n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\n\n\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; // Get rid of `auto` `auto-start` and `auto-end`\n\nvar validPlacements = placements.slice(3);\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\n\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference; // using floor because the reference offsets may contain decimals we are not going to consider here\n\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; // flip the variation if required\n\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; // flips variation if reference element overflows boundaries\n\n var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); // flips variation if popper content overflows boundaries\n\n var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : ''); // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\n\n\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2]; // If it's not a number it's an operator, I guess\n\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\n\n\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0]; // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n }); // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n } // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n\n\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; // Convert the values with units to absolute pixels to allow our computations\n\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, []) // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n }); // Loop trough the offsets arrays and execute the operations\n\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var basePlacement = placement.split('-')[0];\n var offsets = void 0;\n\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n } // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n\n\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n options.boundaries = boundaries;\n var order = options.priority;\n var popper = data.offsets.popper;\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n\n return defineProperty({}, mainSide, value);\n }\n };\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n data.offsets.popper = popper;\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1]; // if shift shiftvariation is specified, run the modifier\n\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\n\n\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n return data;\n}\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property. \n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers. \n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\n\n\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element. \n * It will read the variation of the `placement` property. \n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper. \n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces. \n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2. \n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: offset,\n\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries. \n * We can say it has \"escaped the boundaries\" — or just \"escaped\". \n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: arrow,\n\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: flip,\n\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: computeStyle,\n\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n\n /** @prop {ModifierFn} */\n fn: applyStyle,\n\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor. \n * These can be overridden using the `options` argument of Popper.js. \n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\n\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created. \n * By default, it is set to no-op. \n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates. \n * By default, it is set to no-op. \n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n// Utils\n// Methods\n\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n }; // make update() debounced, so that it only runs at most once-per-tick\n\n\n this.update = debounce(this.update.bind(this)); // with {} we create a new object with the options inside it\n\n this.options = _extends({}, Popper.Defaults, options); // init state\n\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n }; // get reference and popper elements (allow jQuery wrappers)\n\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper; // Deep merge modifiers options\n\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n }); // Refactoring modifiers' list (Object => Array)\n\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n }) // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n }); // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n }); // fire the first update to position the popper in the right place\n\n this.update();\n var eventsEnabled = this.options.eventsEnabled;\n\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n } // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node. \n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\nexport default Popper;","var _Symbol = require(\"./_Symbol\"),\n getRawTag = require(\"./_getRawTag\"),\n objectToString = require(\"./_objectToString\");\n/** `Object#toString` result references. */\n\n\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n/** Built-in value references. */\n\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);\n}\n\nmodule.exports = baseGetTag;","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","module.exports = {};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","module.exports = {};\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || value !== value && other !== other;\n}\n\nmodule.exports = eq;","/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv() {\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n\nexport function dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\n\nexport function loadModule(moduleName) {\n var mod;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {// no-empty\n }\n\n try {\n var cwd = dynamicRequire(module, 'process').cwd;\n mod = dynamicRequire(module, cwd() + \"/node_modules/\" + moduleName);\n } catch (e) {// no-empty\n }\n\n return mod;\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n!function (e) {\n if (\"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) && \"undefined\" != typeof module) module.exports = e();else if (\"function\" == typeof define && define.amd) define([], e);else {\n (\"undefined\" != typeof window ? window : \"undefined\" != typeof global ? global : \"undefined\" != typeof self ? self : this).numbro = e();\n }\n}(function () {\n return function a(o, u, c) {\n function s(t, e) {\n if (!u[t]) {\n if (!o[t]) {\n var r = \"function\" == typeof require && require;\n if (!e && r) return r(t, !0);\n if (l) return l(t, !0);\n var n = new Error(\"Cannot find module '\" + t + \"'\");\n throw n.code = \"MODULE_NOT_FOUND\", n;\n }\n\n var i = u[t] = {\n exports: {}\n };\n o[t][0].call(i.exports, function (e) {\n return s(o[t][1][e] || e);\n }, i, i.exports, a, o, u, c);\n }\n\n return u[t].exports;\n }\n\n for (var l = \"function\" == typeof require && require, e = 0; e < c.length; e++) {\n s(c[e]);\n }\n\n return s;\n }({\n 1: [function (e, r, t) {\n !function (e) {\n \"use strict\";\n\n var t,\n k = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\n _ = Math.ceil,\n L = Math.floor,\n T = \"[BigNumber Error] \",\n P = T + \"Number primitive has more than 15 significant digits: \",\n U = 1e14,\n j = 14,\n C = 9007199254740991,\n R = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\n I = 1e7,\n $ = 1e9;\n\n function G(e) {\n var t = 0 | e;\n return 0 < e || e === t ? t : t - 1;\n }\n\n function V(e) {\n for (var t, r, n = 1, i = e.length, a = e[0] + \"\"; n < i;) {\n for (t = e[n++] + \"\", r = j - t.length; r--; t = \"0\" + t) {\n ;\n }\n\n a += t;\n }\n\n for (i = a.length; 48 === a.charCodeAt(--i);) {\n ;\n }\n\n return a.slice(0, i + 1 || 1);\n }\n\n function q(e, t) {\n var r,\n n,\n i = e.c,\n a = t.c,\n o = e.s,\n u = t.s,\n c = e.e,\n s = t.e;\n if (!o || !u) return null;\n if (r = i && !i[0], n = a && !a[0], r || n) return r ? n ? 0 : -u : o;\n if (o != u) return o;\n if (r = o < 0, n = c == s, !i || !a) return n ? 0 : !i ^ r ? 1 : -1;\n if (!n) return s < c ^ r ? 1 : -1;\n\n for (u = (c = i.length) < (s = a.length) ? c : s, o = 0; o < u; o++) {\n if (i[o] != a[o]) return i[o] > a[o] ^ r ? 1 : -1;\n }\n\n return c == s ? 0 : s < c ^ r ? 1 : -1;\n }\n\n function Z(e, t, r, n) {\n if (e < t || r < e || e !== (e < 0 ? _(e) : L(e))) throw Error(T + (n || \"Argument\") + (\"number\" == typeof e ? e < t || r < e ? \" out of range: \" : \" not an integer: \" : \" not a primitive number: \") + String(e));\n }\n\n function z(e) {\n var t = e.c.length - 1;\n return G(e.e / j) == t && e.c[t] % 2 != 0;\n }\n\n function W(e, t) {\n return (1 < e.length ? e.charAt(0) + \".\" + e.slice(1) : e) + (t < 0 ? \"e\" : \"e+\") + t;\n }\n\n function H(e, t, r) {\n var n, i;\n\n if (t < 0) {\n for (i = r + \".\"; ++t; i += r) {\n ;\n }\n\n e = i + e;\n } else if (++t > (n = e.length)) {\n for (i = r, t -= n; --t; i += r) {\n ;\n }\n\n e += i;\n } else t < n && (e = e.slice(0, t) + \".\" + e.slice(t));\n\n return e;\n }\n\n (t = function e(t) {\n var y,\n f,\n p,\n r,\n s,\n o,\n u,\n c,\n l,\n g,\n n = A.prototype = {\n constructor: A,\n toString: null,\n valueOf: null\n },\n d = new A(1),\n b = 20,\n w = 4,\n h = -7,\n v = 21,\n m = -1e7,\n O = 1e7,\n x = !1,\n a = 1,\n S = 0,\n N = {\n prefix: \"\",\n groupSize: 3,\n secondaryGroupSize: 0,\n groupSeparator: \",\",\n decimalSeparator: \".\",\n fractionGroupSize: 0,\n fractionGroupSeparator: \" \",\n suffix: \"\"\n },\n M = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\n function A(e, t) {\n var r,\n n,\n i,\n a,\n o,\n u,\n c,\n s,\n l = this;\n if (!(l instanceof A)) return new A(e, t);\n\n if (null == t) {\n if (e instanceof A) return l.s = e.s, l.e = e.e, void (l.c = (e = e.c) ? e.slice() : e);\n\n if ((u = \"number\" == typeof e) && 0 * e == 0) {\n if (l.s = 1 / e < 0 ? (e = -e, -1) : 1, e === ~~e) {\n for (a = 0, o = e; 10 <= o; o /= 10, a++) {\n ;\n }\n\n return l.e = a, void (l.c = [e]);\n }\n\n s = String(e);\n } else {\n if (s = String(e), !k.test(s)) return p(l, s, u);\n l.s = 45 == s.charCodeAt(0) ? (s = s.slice(1), -1) : 1;\n }\n\n -1 < (a = s.indexOf(\".\")) && (s = s.replace(\".\", \"\")), 0 < (o = s.search(/e/i)) ? (a < 0 && (a = o), a += +s.slice(o + 1), s = s.substring(0, o)) : a < 0 && (a = s.length);\n } else {\n if (Z(t, 2, M.length, \"Base\"), s = String(e), 10 == t) return E(l = new A(e instanceof A ? e : s), b + l.e + 1, w);\n\n if (u = \"number\" == typeof e) {\n if (0 * e != 0) return p(l, s, u, t);\n if (l.s = 1 / e < 0 ? (s = s.slice(1), -1) : 1, A.DEBUG && 15 < s.replace(/^0\\.0*|\\./, \"\").length) throw Error(P + e);\n u = !1;\n } else l.s = 45 === s.charCodeAt(0) ? (s = s.slice(1), -1) : 1;\n\n for (r = M.slice(0, t), a = o = 0, c = s.length; o < c; o++) {\n if (r.indexOf(n = s.charAt(o)) < 0) {\n if (\".\" == n) {\n if (a < o) {\n a = c;\n continue;\n }\n } else if (!i && (s == s.toUpperCase() && (s = s.toLowerCase()) || s == s.toLowerCase() && (s = s.toUpperCase()))) {\n i = !0, o = -1, a = 0;\n continue;\n }\n\n return p(l, String(e), u, t);\n }\n }\n\n -1 < (a = (s = f(s, t, 10, l.s)).indexOf(\".\")) ? s = s.replace(\".\", \"\") : a = s.length;\n }\n\n for (o = 0; 48 === s.charCodeAt(o); o++) {\n ;\n }\n\n for (c = s.length; 48 === s.charCodeAt(--c);) {\n ;\n }\n\n if (s = s.slice(o, ++c)) {\n if (c -= o, u && A.DEBUG && 15 < c && (C < e || e !== L(e))) throw Error(P + l.s * e);\n if (O < (a = a - o - 1)) l.c = l.e = null;else if (a < m) l.c = [l.e = 0];else {\n if (l.e = a, l.c = [], o = (a + 1) % j, a < 0 && (o += j), o < c) {\n for (o && l.c.push(+s.slice(0, o)), c -= j; o < c;) {\n l.c.push(+s.slice(o, o += j));\n }\n\n s = s.slice(o), o = j - s.length;\n } else o -= c;\n\n for (; o--; s += \"0\") {\n ;\n }\n\n l.c.push(+s);\n }\n } else l.c = [l.e = 0];\n }\n\n function i(e, t, r, n) {\n var i, a, o, u, c;\n if (null == r ? r = w : Z(r, 0, 8), !e.c) return e.toString();\n if (i = e.c[0], o = e.e, null == t) c = V(e.c), c = 1 == n || 2 == n && (o <= h || v <= o) ? W(c, o) : H(c, o, \"0\");else if (a = (e = E(new A(e), t, r)).e, u = (c = V(e.c)).length, 1 == n || 2 == n && (t <= a || a <= h)) {\n for (; u < t; c += \"0\", u++) {\n ;\n }\n\n c = W(c, a);\n } else if (t -= o, c = H(c, a, \"0\"), u < a + 1) {\n if (0 < --t) for (c += \".\"; t--; c += \"0\") {\n ;\n }\n } else if (0 < (t += a - u)) for (a + 1 == u && (c += \".\"); t--; c += \"0\") {\n ;\n }\n return e.s < 0 && i ? \"-\" + c : c;\n }\n\n function B(e, t) {\n for (var r, n = 1, i = new A(e[0]); n < e.length; n++) {\n if (!(r = new A(e[n])).s) {\n i = r;\n break;\n }\n\n t.call(i, r) && (i = r);\n }\n\n return i;\n }\n\n function D(e, t, r) {\n for (var n = 1, i = t.length; !t[--i]; t.pop()) {\n ;\n }\n\n for (i = t[0]; 10 <= i; i /= 10, n++) {\n ;\n }\n\n return (r = n + r * j - 1) > O ? e.c = e.e = null : e.c = r < m ? [e.e = 0] : (e.e = r, t), e;\n }\n\n function E(e, t, r, n) {\n var i,\n a,\n o,\n u,\n c,\n s,\n l,\n f = e.c,\n p = R;\n\n if (f) {\n e: {\n for (i = 1, u = f[0]; 10 <= u; u /= 10, i++) {\n ;\n }\n\n if ((a = t - i) < 0) a += j, o = t, l = (c = f[s = 0]) / p[i - o - 1] % 10 | 0;else if ((s = _((a + 1) / j)) >= f.length) {\n if (!n) break e;\n\n for (; f.length <= s; f.push(0)) {\n ;\n }\n\n c = l = 0, o = (a %= j) - j + (i = 1);\n } else {\n for (c = u = f[s], i = 1; 10 <= u; u /= 10, i++) {\n ;\n }\n\n l = (o = (a %= j) - j + i) < 0 ? 0 : c / p[i - o - 1] % 10 | 0;\n }\n if (n = n || t < 0 || null != f[s + 1] || (o < 0 ? c : c % p[i - o - 1]), n = r < 4 ? (l || n) && (0 == r || r == (e.s < 0 ? 3 : 2)) : 5 < l || 5 == l && (4 == r || n || 6 == r && (0 < a ? 0 < o ? c / p[i - o] : 0 : f[s - 1]) % 10 & 1 || r == (e.s < 0 ? 8 : 7)), t < 1 || !f[0]) return f.length = 0, n ? (t -= e.e + 1, f[0] = p[(j - t % j) % j], e.e = -t || 0) : f[0] = e.e = 0, e;\n if (0 == a ? (f.length = s, u = 1, s--) : (f.length = s + 1, u = p[j - a], f[s] = 0 < o ? L(c / p[i - o] % p[o]) * u : 0), n) for (;;) {\n if (0 == s) {\n for (a = 1, o = f[0]; 10 <= o; o /= 10, a++) {\n ;\n }\n\n for (o = f[0] += u, u = 1; 10 <= o; o /= 10, u++) {\n ;\n }\n\n a != u && (e.e++, f[0] == U && (f[0] = 1));\n break;\n }\n\n if (f[s] += u, f[s] != U) break;\n f[s--] = 0, u = 1;\n }\n\n for (a = f.length; 0 === f[--a]; f.pop()) {\n ;\n }\n }\n\n e.e > O ? e.c = e.e = null : e.e < m && (e.c = [e.e = 0]);\n }\n\n return e;\n }\n\n function F(e) {\n var t,\n r = e.e;\n return null === r ? e.toString() : (t = V(e.c), t = r <= h || v <= r ? W(t, r) : H(t, r, \"0\"), e.s < 0 ? \"-\" + t : t);\n }\n\n return A.clone = e, A.ROUND_UP = 0, A.ROUND_DOWN = 1, A.ROUND_CEIL = 2, A.ROUND_FLOOR = 3, A.ROUND_HALF_UP = 4, A.ROUND_HALF_DOWN = 5, A.ROUND_HALF_EVEN = 6, A.ROUND_HALF_CEIL = 7, A.ROUND_HALF_FLOOR = 8, A.EUCLID = 9, A.config = A.set = function (e) {\n var t, r;\n\n if (null != e) {\n if (\"object\" != _typeof(e)) throw Error(T + \"Object expected: \" + e);\n if (e.hasOwnProperty(t = \"DECIMAL_PLACES\") && (Z(r = e[t], 0, $, t), b = r), e.hasOwnProperty(t = \"ROUNDING_MODE\") && (Z(r = e[t], 0, 8, t), w = r), e.hasOwnProperty(t = \"EXPONENTIAL_AT\") && ((r = e[t]) && r.pop ? (Z(r[0], -$, 0, t), Z(r[1], 0, $, t), h = r[0], v = r[1]) : (Z(r, -$, $, t), h = -(v = r < 0 ? -r : r))), e.hasOwnProperty(t = \"RANGE\")) if ((r = e[t]) && r.pop) Z(r[0], -$, -1, t), Z(r[1], 1, $, t), m = r[0], O = r[1];else {\n if (Z(r, -$, $, t), !r) throw Error(T + t + \" cannot be zero: \" + r);\n m = -(O = r < 0 ? -r : r);\n }\n\n if (e.hasOwnProperty(t = \"CRYPTO\")) {\n if ((r = e[t]) !== !!r) throw Error(T + t + \" not true or false: \" + r);\n\n if (r) {\n if (\"undefined\" == typeof crypto || !crypto || !crypto.getRandomValues && !crypto.randomBytes) throw x = !r, Error(T + \"crypto unavailable\");\n x = r;\n } else x = r;\n }\n\n if (e.hasOwnProperty(t = \"MODULO_MODE\") && (Z(r = e[t], 0, 9, t), a = r), e.hasOwnProperty(t = \"POW_PRECISION\") && (Z(r = e[t], 0, $, t), S = r), e.hasOwnProperty(t = \"FORMAT\")) {\n if (\"object\" != _typeof(r = e[t])) throw Error(T + t + \" not an object: \" + r);\n N = r;\n }\n\n if (e.hasOwnProperty(t = \"ALPHABET\")) {\n if (\"string\" != typeof (r = e[t]) || /^.$|[+-.\\s]|(.).*\\1/.test(r)) throw Error(T + t + \" invalid: \" + r);\n M = r;\n }\n }\n\n return {\n DECIMAL_PLACES: b,\n ROUNDING_MODE: w,\n EXPONENTIAL_AT: [h, v],\n RANGE: [m, O],\n CRYPTO: x,\n MODULO_MODE: a,\n POW_PRECISION: S,\n FORMAT: N,\n ALPHABET: M\n };\n }, A.isBigNumber = function (e) {\n return e instanceof A || e && !0 === e._isBigNumber || !1;\n }, A.maximum = A.max = function () {\n return B(arguments, n.lt);\n }, A.minimum = A.min = function () {\n return B(arguments, n.gt);\n }, A.random = (r = 9007199254740992, s = Math.random() * r & 2097151 ? function () {\n return L(Math.random() * r);\n } : function () {\n return 8388608 * (1073741824 * Math.random() | 0) + (8388608 * Math.random() | 0);\n }, function (e) {\n var t,\n r,\n n,\n i,\n a,\n o = 0,\n u = [],\n c = new A(d);\n if (null == e ? e = b : Z(e, 0, $), i = _(e / j), x) if (crypto.getRandomValues) {\n for (t = crypto.getRandomValues(new Uint32Array(i *= 2)); o < i;) {\n 9e15 <= (a = 131072 * t[o] + (t[o + 1] >>> 11)) ? (r = crypto.getRandomValues(new Uint32Array(2)), t[o] = r[0], t[o + 1] = r[1]) : (u.push(a % 1e14), o += 2);\n }\n\n o = i / 2;\n } else {\n if (!crypto.randomBytes) throw x = !1, Error(T + \"crypto unavailable\");\n\n for (t = crypto.randomBytes(i *= 7); o < i;) {\n 9e15 <= (a = 281474976710656 * (31 & t[o]) + 1099511627776 * t[o + 1] + 4294967296 * t[o + 2] + 16777216 * t[o + 3] + (t[o + 4] << 16) + (t[o + 5] << 8) + t[o + 6]) ? crypto.randomBytes(7).copy(t, o) : (u.push(a % 1e14), o += 7);\n }\n\n o = i / 7;\n }\n if (!x) for (; o < i;) {\n (a = s()) < 9e15 && (u[o++] = a % 1e14);\n }\n\n for (i = u[--o], e %= j, i && e && (a = R[j - e], u[o] = L(i / a) * a); 0 === u[o]; u.pop(), o--) {\n ;\n }\n\n if (o < 0) u = [n = 0];else {\n for (n = -1; 0 === u[0]; u.splice(0, 1), n -= j) {\n ;\n }\n\n for (o = 1, a = u[0]; 10 <= a; a /= 10, o++) {\n ;\n }\n\n o < j && (n -= j - o);\n }\n return c.e = n, c.c = u, c;\n }), A.sum = function () {\n for (var e = 1, t = arguments, r = new A(t[0]); e < t.length;) {\n r = r.plus(t[e++]);\n }\n\n return r;\n }, f = function () {\n var v = \"0123456789\";\n\n function m(e, t, r, n) {\n for (var i, a, o = [0], u = 0, c = e.length; u < c;) {\n for (a = o.length; a--; o[a] *= t) {\n ;\n }\n\n for (o[0] += n.indexOf(e.charAt(u++)), i = 0; i < o.length; i++) {\n o[i] > r - 1 && (null == o[i + 1] && (o[i + 1] = 0), o[i + 1] += o[i] / r | 0, o[i] %= r);\n }\n }\n\n return o.reverse();\n }\n\n return function (e, t, r, n, i) {\n var a,\n o,\n u,\n c,\n s,\n l,\n f,\n p,\n g = e.indexOf(\".\"),\n h = b,\n d = w;\n\n for (0 <= g && (c = S, S = 0, e = e.replace(\".\", \"\"), l = (p = new A(t)).pow(e.length - g), S = c, p.c = m(H(V(l.c), l.e, \"0\"), 10, r, v), p.e = p.c.length), u = c = (f = m(e, t, r, i ? (a = M, v) : (a = v, M))).length; 0 == f[--c]; f.pop()) {\n ;\n }\n\n if (!f[0]) return a.charAt(0);\n if (g < 0 ? --u : (l.c = f, l.e = u, l.s = n, f = (l = y(l, p, h, d, r)).c, s = l.r, u = l.e), g = f[o = u + h + 1], c = r / 2, s = s || o < 0 || null != f[o + 1], s = d < 4 ? (null != g || s) && (0 == d || d == (l.s < 0 ? 3 : 2)) : c < g || g == c && (4 == d || s || 6 == d && 1 & f[o - 1] || d == (l.s < 0 ? 8 : 7)), o < 1 || !f[0]) e = s ? H(a.charAt(1), -h, a.charAt(0)) : a.charAt(0);else {\n if (f.length = o, s) for (--r; ++f[--o] > r;) {\n f[o] = 0, o || (++u, f = [1].concat(f));\n }\n\n for (c = f.length; !f[--c];) {\n ;\n }\n\n for (g = 0, e = \"\"; g <= c; e += a.charAt(f[g++])) {\n ;\n }\n\n e = H(e, u, a.charAt(0));\n }\n return e;\n };\n }(), y = function () {\n function M(e, t, r) {\n var n,\n i,\n a,\n o,\n u = 0,\n c = e.length,\n s = t % I,\n l = t / I | 0;\n\n for (e = e.slice(); c--;) {\n u = ((i = s * (a = e[c] % I) + (n = l * a + (o = e[c] / I | 0) * s) % I * I + u) / r | 0) + (n / I | 0) + l * o, e[c] = i % r;\n }\n\n return u && (e = [u].concat(e)), e;\n }\n\n function B(e, t, r, n) {\n var i, a;\n if (r != n) a = n < r ? 1 : -1;else for (i = a = 0; i < r; i++) {\n if (e[i] != t[i]) {\n a = e[i] > t[i] ? 1 : -1;\n break;\n }\n }\n return a;\n }\n\n function D(e, t, r, n) {\n for (var i = 0; r--;) {\n e[r] -= i, i = e[r] < t[r] ? 1 : 0, e[r] = i * n + e[r] - t[r];\n }\n\n for (; !e[0] && 1 < e.length; e.splice(0, 1)) {\n ;\n }\n }\n\n return function (e, t, r, n, i) {\n var a,\n o,\n u,\n c,\n s,\n l,\n f,\n p,\n g,\n h,\n d,\n v,\n m,\n y,\n b,\n w,\n O,\n x = e.s == t.s ? 1 : -1,\n S = e.c,\n N = t.c;\n if (!(S && S[0] && N && N[0])) return new A(e.s && t.s && (S ? !N || S[0] != N[0] : N) ? S && 0 == S[0] || !N ? 0 * x : x / 0 : NaN);\n\n for (g = (p = new A(x)).c = [], x = r + (o = e.e - t.e) + 1, i || (i = U, o = G(e.e / j) - G(t.e / j), x = x / j | 0), u = 0; N[u] == (S[u] || 0); u++) {\n ;\n }\n\n if (N[u] > (S[u] || 0) && o--, x < 0) g.push(1), c = !0;else {\n for (y = S.length, w = N.length, x += 2, 1 < (s = L(i / (N[u = 0] + 1))) && (N = M(N, s, i), S = M(S, s, i), w = N.length, y = S.length), m = w, d = (h = S.slice(0, w)).length; d < w; h[d++] = 0) {\n ;\n }\n\n O = N.slice(), O = [0].concat(O), b = N[0], N[1] >= i / 2 && b++;\n\n do {\n if (s = 0, (a = B(N, h, w, d)) < 0) {\n if (v = h[0], w != d && (v = v * i + (h[1] || 0)), 1 < (s = L(v / b))) for (i <= s && (s = i - 1), f = (l = M(N, s, i)).length, d = h.length; 1 == B(l, h, f, d);) {\n s--, D(l, w < f ? O : N, f, i), f = l.length, a = 1;\n } else 0 == s && (a = s = 1), f = (l = N.slice()).length;\n if (f < d && (l = [0].concat(l)), D(h, l, d, i), d = h.length, -1 == a) for (; B(N, h, w, d) < 1;) {\n s++, D(h, w < d ? O : N, d, i), d = h.length;\n }\n } else 0 === a && (s++, h = [0]);\n\n g[u++] = s, h[0] ? h[d++] = S[m] || 0 : (h = [S[m]], d = 1);\n } while ((m++ < y || null != h[0]) && x--);\n\n c = null != h[0], g[0] || g.splice(0, 1);\n }\n\n if (i == U) {\n for (u = 1, x = g[0]; 10 <= x; x /= 10, u++) {\n ;\n }\n\n E(p, r + (p.e = u + o * j - 1) + 1, n, c);\n } else p.e = o, p.r = +c;\n\n return p;\n };\n }(), o = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i, u = /^([^.]+)\\.$/, c = /^\\.([^.]+)$/, l = /^-?(Infinity|NaN)$/, g = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g, p = function p(e, t, r, n) {\n var i,\n a = r ? t : t.replace(g, \"\");\n if (l.test(a)) e.s = isNaN(a) ? null : a < 0 ? -1 : 1, e.c = e.e = null;else {\n if (!r && (a = a.replace(o, function (e, t, r) {\n return i = \"x\" == (r = r.toLowerCase()) ? 16 : \"b\" == r ? 2 : 8, n && n != i ? e : t;\n }), n && (i = n, a = a.replace(u, \"$1\").replace(c, \"0.$1\")), t != a)) return new A(a, i);\n if (A.DEBUG) throw Error(T + \"Not a\" + (n ? \" base \" + n : \"\") + \" number: \" + t);\n e.c = e.e = e.s = null;\n }\n }, n.absoluteValue = n.abs = function () {\n var e = new A(this);\n return e.s < 0 && (e.s = 1), e;\n }, n.comparedTo = function (e, t) {\n return q(this, new A(e, t));\n }, n.decimalPlaces = n.dp = function (e, t) {\n var r, n, i;\n if (null != e) return Z(e, 0, $), null == t ? t = w : Z(t, 0, 8), E(new A(this), e + this.e + 1, t);\n if (!(r = this.c)) return null;\n if (n = ((i = r.length - 1) - G(this.e / j)) * j, i = r[i]) for (; i % 10 == 0; i /= 10, n--) {\n ;\n }\n return n < 0 && (n = 0), n;\n }, n.dividedBy = n.div = function (e, t) {\n return y(this, new A(e, t), b, w);\n }, n.dividedToIntegerBy = n.idiv = function (e, t) {\n return y(this, new A(e, t), 0, 1);\n }, n.exponentiatedBy = n.pow = function (e, t) {\n var r,\n n,\n i,\n a,\n o,\n u,\n c,\n s,\n l = this;\n if ((e = new A(e)).c && !e.isInteger()) throw Error(T + \"Exponent not an integer: \" + F(e));\n if (null != t && (t = new A(t)), o = 14 < e.e, !l.c || !l.c[0] || 1 == l.c[0] && !l.e && 1 == l.c.length || !e.c || !e.c[0]) return s = new A(Math.pow(+F(l), o ? 2 - z(e) : +F(e))), t ? s.mod(t) : s;\n\n if (u = e.s < 0, t) {\n if (t.c ? !t.c[0] : !t.s) return new A(NaN);\n (n = !u && l.isInteger() && t.isInteger()) && (l = l.mod(t));\n } else {\n if (9 < e.e && (0 < l.e || l.e < -1 || (0 == l.e ? 1 < l.c[0] || o && 24e7 <= l.c[1] : l.c[0] < 8e13 || o && l.c[0] <= 9999975e7))) return a = l.s < 0 && z(e) ? -0 : 0, -1 < l.e && (a = 1 / a), new A(u ? 1 / a : a);\n S && (a = _(S / j + 2));\n }\n\n for (c = o ? (r = new A(.5), u && (e.s = 1), z(e)) : (i = Math.abs(+F(e))) % 2, s = new A(d);;) {\n if (c) {\n if (!(s = s.times(l)).c) break;\n a ? s.c.length > a && (s.c.length = a) : n && (s = s.mod(t));\n }\n\n if (i) {\n if (0 === (i = L(i / 2))) break;\n c = i % 2;\n } else if (E(e = e.times(r), e.e + 1, 1), 14 < e.e) c = z(e);else {\n if (0 == (i = +F(e))) break;\n c = i % 2;\n }\n\n l = l.times(l), a ? l.c && l.c.length > a && (l.c.length = a) : n && (l = l.mod(t));\n }\n\n return n ? s : (u && (s = d.div(s)), t ? s.mod(t) : a ? E(s, S, w, void 0) : s);\n }, n.integerValue = function (e) {\n var t = new A(this);\n return null == e ? e = w : Z(e, 0, 8), E(t, t.e + 1, e);\n }, n.isEqualTo = n.eq = function (e, t) {\n return 0 === q(this, new A(e, t));\n }, n.isFinite = function () {\n return !!this.c;\n }, n.isGreaterThan = n.gt = function (e, t) {\n return 0 < q(this, new A(e, t));\n }, n.isGreaterThanOrEqualTo = n.gte = function (e, t) {\n return 1 === (t = q(this, new A(e, t))) || 0 === t;\n }, n.isInteger = function () {\n return !!this.c && G(this.e / j) > this.c.length - 2;\n }, n.isLessThan = n.lt = function (e, t) {\n return q(this, new A(e, t)) < 0;\n }, n.isLessThanOrEqualTo = n.lte = function (e, t) {\n return -1 === (t = q(this, new A(e, t))) || 0 === t;\n }, n.isNaN = function () {\n return !this.s;\n }, n.isNegative = function () {\n return this.s < 0;\n }, n.isPositive = function () {\n return 0 < this.s;\n }, n.isZero = function () {\n return !!this.c && 0 == this.c[0];\n }, n.minus = function (e, t) {\n var r,\n n,\n i,\n a,\n o = this,\n u = o.s;\n if (t = (e = new A(e, t)).s, !u || !t) return new A(NaN);\n if (u != t) return e.s = -t, o.plus(e);\n var c = o.e / j,\n s = e.e / j,\n l = o.c,\n f = e.c;\n\n if (!c || !s) {\n if (!l || !f) return l ? (e.s = -t, e) : new A(f ? o : NaN);\n if (!l[0] || !f[0]) return f[0] ? (e.s = -t, e) : new A(l[0] ? o : 3 == w ? -0 : 0);\n }\n\n if (c = G(c), s = G(s), l = l.slice(), u = c - s) {\n for ((i = (a = u < 0) ? (u = -u, l) : (s = c, f)).reverse(), t = u; t--; i.push(0)) {\n ;\n }\n\n i.reverse();\n } else for (n = (a = (u = l.length) < (t = f.length)) ? u : t, u = t = 0; t < n; t++) {\n if (l[t] != f[t]) {\n a = l[t] < f[t];\n break;\n }\n }\n\n if (a && (i = l, l = f, f = i, e.s = -e.s), 0 < (t = (n = f.length) - (r = l.length))) for (; t--; l[r++] = 0) {\n ;\n }\n\n for (t = U - 1; u < n;) {\n if (l[--n] < f[n]) {\n for (r = n; r && !l[--r]; l[r] = t) {\n ;\n }\n\n --l[r], l[n] += U;\n }\n\n l[n] -= f[n];\n }\n\n for (; 0 == l[0]; l.splice(0, 1), --s) {\n ;\n }\n\n return l[0] ? D(e, l, s) : (e.s = 3 == w ? -1 : 1, e.c = [e.e = 0], e);\n }, n.modulo = n.mod = function (e, t) {\n var r,\n n,\n i = this;\n return e = new A(e, t), !i.c || !e.s || e.c && !e.c[0] ? new A(NaN) : !e.c || i.c && !i.c[0] ? new A(i) : (9 == a ? (n = e.s, e.s = 1, r = y(i, e, 0, 3), e.s = n, r.s *= n) : r = y(i, e, 0, a), (e = i.minus(r.times(e))).c[0] || 1 != a || (e.s = i.s), e);\n }, n.multipliedBy = n.times = function (e, t) {\n var r,\n n,\n i,\n a,\n o,\n u,\n c,\n s,\n l,\n f,\n p,\n g,\n h,\n d,\n v,\n m = this,\n y = m.c,\n b = (e = new A(e, t)).c;\n if (!(y && b && y[0] && b[0])) return !m.s || !e.s || y && !y[0] && !b || b && !b[0] && !y ? e.c = e.e = e.s = null : (e.s *= m.s, y && b ? (e.c = [0], e.e = 0) : e.c = e.e = null), e;\n\n for (n = G(m.e / j) + G(e.e / j), e.s *= m.s, (c = y.length) < (f = b.length) && (h = y, y = b, b = h, i = c, c = f, f = i), i = c + f, h = []; i--; h.push(0)) {\n ;\n }\n\n for (d = U, v = I, i = f; 0 <= --i;) {\n for (r = 0, p = b[i] % v, g = b[i] / v | 0, a = i + (o = c); i < a;) {\n r = ((s = p * (s = y[--o] % v) + (u = g * s + (l = y[o] / v | 0) * p) % v * v + h[a] + r) / d | 0) + (u / v | 0) + g * l, h[a--] = s % d;\n }\n\n h[a] = r;\n }\n\n return r ? ++n : h.splice(0, 1), D(e, h, n);\n }, n.negated = function () {\n var e = new A(this);\n return e.s = -e.s || null, e;\n }, n.plus = function (e, t) {\n var r,\n n = this,\n i = n.s;\n if (t = (e = new A(e, t)).s, !i || !t) return new A(NaN);\n if (i != t) return e.s = -t, n.minus(e);\n var a = n.e / j,\n o = e.e / j,\n u = n.c,\n c = e.c;\n\n if (!a || !o) {\n if (!u || !c) return new A(i / 0);\n if (!u[0] || !c[0]) return c[0] ? e : new A(u[0] ? n : 0 * i);\n }\n\n if (a = G(a), o = G(o), u = u.slice(), i = a - o) {\n for ((r = 0 < i ? (o = a, c) : (i = -i, u)).reverse(); i--; r.push(0)) {\n ;\n }\n\n r.reverse();\n }\n\n for ((i = u.length) - (t = c.length) < 0 && (r = c, c = u, u = r, t = i), i = 0; t;) {\n i = (u[--t] = u[t] + c[t] + i) / U | 0, u[t] = U === u[t] ? 0 : u[t] % U;\n }\n\n return i && (u = [i].concat(u), ++o), D(e, u, o);\n }, n.precision = n.sd = function (e, t) {\n var r, n, i;\n if (null != e && e !== !!e) return Z(e, 1, $), null == t ? t = w : Z(t, 0, 8), E(new A(this), e, t);\n if (!(r = this.c)) return null;\n\n if (n = (i = r.length - 1) * j + 1, i = r[i]) {\n for (; i % 10 == 0; i /= 10, n--) {\n ;\n }\n\n for (i = r[0]; 10 <= i; i /= 10, n++) {\n ;\n }\n }\n\n return e && this.e + 1 > n && (n = this.e + 1), n;\n }, n.shiftedBy = function (e) {\n return Z(e, -C, C), this.times(\"1e\" + e);\n }, n.squareRoot = n.sqrt = function () {\n var e,\n t,\n r,\n n,\n i,\n a = this,\n o = a.c,\n u = a.s,\n c = a.e,\n s = b + 4,\n l = new A(\"0.5\");\n if (1 !== u || !o || !o[0]) return new A(!u || u < 0 && (!o || o[0]) ? NaN : o ? a : 1 / 0);\n if ((r = 0 == (u = Math.sqrt(+F(a))) || u == 1 / 0 ? (((t = V(o)).length + c) % 2 == 0 && (t += \"0\"), u = Math.sqrt(+t), c = G((c + 1) / 2) - (c < 0 || c % 2), new A(t = u == 1 / 0 ? \"1e\" + c : (t = u.toExponential()).slice(0, t.indexOf(\"e\") + 1) + c)) : new A(u + \"\")).c[0]) for ((u = (c = r.e) + s) < 3 && (u = 0);;) {\n if (i = r, r = l.times(i.plus(y(a, i, s, 1))), V(i.c).slice(0, u) === (t = V(r.c)).slice(0, u)) {\n if (r.e < c && --u, \"9999\" != (t = t.slice(u - 3, u + 1)) && (n || \"4999\" != t)) {\n +t && (+t.slice(1) || \"5\" != t.charAt(0)) || (E(r, r.e + b + 2, 1), e = !r.times(r).eq(a));\n break;\n }\n\n if (!n && (E(i, i.e + b + 2, 0), i.times(i).eq(a))) {\n r = i;\n break;\n }\n\n s += 4, u += 4, n = 1;\n }\n }\n return E(r, r.e + b + 1, w, e);\n }, n.toExponential = function (e, t) {\n return null != e && (Z(e, 0, $), e++), i(this, e, t, 1);\n }, n.toFixed = function (e, t) {\n return null != e && (Z(e, 0, $), e = e + this.e + 1), i(this, e, t);\n }, n.toFormat = function (e, t, r) {\n var n;\n if (null == r) null != e && t && \"object\" == _typeof(t) ? (r = t, t = null) : e && \"object\" == _typeof(e) ? (r = e, e = t = null) : r = N;else if (\"object\" != _typeof(r)) throw Error(T + \"Argument not an object: \" + r);\n\n if (n = this.toFixed(e, t), this.c) {\n var i,\n a = n.split(\".\"),\n o = +r.groupSize,\n u = +r.secondaryGroupSize,\n c = r.groupSeparator || \"\",\n s = a[0],\n l = a[1],\n f = this.s < 0,\n p = f ? s.slice(1) : s,\n g = p.length;\n\n if (u && (i = o, o = u, g -= u = i), 0 < o && 0 < g) {\n for (i = g % o || o, s = p.substr(0, i); i < g; i += o) {\n s += c + p.substr(i, o);\n }\n\n 0 < u && (s += c + p.slice(i)), f && (s = \"-\" + s);\n }\n\n n = l ? s + (r.decimalSeparator || \"\") + ((u = +r.fractionGroupSize) ? l.replace(new RegExp(\"\\\\d{\" + u + \"}\\\\B\", \"g\"), \"$&\" + (r.fractionGroupSeparator || \"\")) : l) : s;\n }\n\n return (r.prefix || \"\") + n + (r.suffix || \"\");\n }, n.toFraction = function (e) {\n var t,\n r,\n n,\n i,\n a,\n o,\n u,\n c,\n s,\n l,\n f,\n p,\n g = this,\n h = g.c;\n if (null != e && (!(u = new A(e)).isInteger() && (u.c || 1 !== u.s) || u.lt(d))) throw Error(T + \"Argument \" + (u.isInteger() ? \"out of range: \" : \"not an integer: \") + F(u));\n if (!h) return new A(g);\n\n for (t = new A(d), s = r = new A(d), n = c = new A(d), p = V(h), a = t.e = p.length - g.e - 1, t.c[0] = R[(o = a % j) < 0 ? j + o : o], e = !e || 0 < u.comparedTo(t) ? 0 < a ? t : s : u, o = O, O = 1 / 0, u = new A(p), c.c[0] = 0; l = y(u, t, 0, 1), 1 != (i = r.plus(l.times(n))).comparedTo(e);) {\n r = n, n = i, s = c.plus(l.times(i = s)), c = i, t = u.minus(l.times(i = t)), u = i;\n }\n\n return i = y(e.minus(r), n, 0, 1), c = c.plus(i.times(s)), r = r.plus(i.times(n)), c.s = s.s = g.s, f = y(s, n, a *= 2, w).minus(g).abs().comparedTo(y(c, r, a, w).minus(g).abs()) < 1 ? [s, n] : [c, r], O = o, f;\n }, n.toNumber = function () {\n return +F(this);\n }, n.toPrecision = function (e, t) {\n return null != e && Z(e, 1, $), i(this, e, t, 2);\n }, n.toString = function (e) {\n var t,\n r = this,\n n = r.s,\n i = r.e;\n return null === i ? n ? (t = \"Infinity\", n < 0 && (t = \"-\" + t)) : t = \"NaN\" : (t = null == e ? i <= h || v <= i ? W(V(r.c), i) : H(V(r.c), i, \"0\") : 10 === e ? H(V((r = E(new A(r), b + i + 1, w)).c), r.e, \"0\") : (Z(e, 2, M.length, \"Base\"), f(H(V(r.c), i, \"0\"), 10, e, n, !0)), n < 0 && r.c[0] && (t = \"-\" + t)), t;\n }, n.valueOf = n.toJSON = function () {\n return F(this);\n }, n._isBigNumber = !0, \"function\" == typeof Symbol && \"symbol\" == _typeof(Symbol.iterator) && (n[Symbol.toStringTag] = \"BigNumber\", n[Symbol.for(\"nodejs.util.inspect.custom\")] = n.valueOf), null != t && A.set(t), A;\n }()).default = t.BigNumber = t, void 0 !== r && r.exports ? r.exports = t : (e || (e = \"undefined\" != typeof self && self ? self : window), e.BigNumber = t);\n }(this);\n }, {}],\n 2: [function (e, t, r) {\n \"use strict\";\n\n t.exports = {\n languageTag: \"en-US\",\n delimiters: {\n thousands: \",\",\n decimal: \".\"\n },\n abbreviations: {\n thousand: \"k\",\n million: \"m\",\n billion: \"b\",\n trillion: \"t\"\n },\n spaceSeparated: !1,\n ordinal: function ordinal(e) {\n var t = e % 10;\n return 1 == ~~(e % 100 / 10) ? \"th\" : 1 === t ? \"st\" : 2 === t ? \"nd\" : 3 === t ? \"rd\" : \"th\";\n },\n currency: {\n symbol: \"$\",\n position: \"prefix\",\n code: \"USD\"\n },\n currencyFormat: {\n thousandSeparated: !0,\n totalLength: 4,\n spaceSeparated: !0\n },\n formats: {\n fourDigits: {\n totalLength: 4,\n spaceSeparated: !0\n },\n fullWithTwoDecimals: {\n output: \"currency\",\n thousandSeparated: !0,\n mantissa: 2\n },\n fullWithTwoDecimalsNoCurrency: {\n thousandSeparated: !0,\n mantissa: 2\n },\n fullWithNoDecimals: {\n output: \"currency\",\n thousandSeparated: !0,\n mantissa: 0\n }\n }\n };\n }, {}],\n 3: [function (e, t, r) {\n \"use strict\";\n\n function C(e, t) {\n return function (e) {\n if (Array.isArray(e)) return e;\n }(e) || function (e, t) {\n var r = [],\n n = !0,\n i = !1,\n a = void 0;\n\n try {\n for (var o, u = e[Symbol.iterator](); !(n = (o = u.next()).done) && (r.push(o.value), !t || r.length !== t); n = !0) {\n ;\n }\n } catch (e) {\n i = !0, a = e;\n } finally {\n try {\n n || null == u.return || u.return();\n } finally {\n if (i) throw a;\n }\n }\n\n return r;\n }(e, t) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }();\n }\n\n var R = e(\"./globalState\"),\n o = e(\"./validating\"),\n u = e(\"./parsing\"),\n n = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"],\n M = {\n general: {\n scale: 1024,\n suffixes: n,\n marker: \"bd\"\n },\n binary: {\n scale: 1024,\n suffixes: [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"],\n marker: \"b\"\n },\n decimal: {\n scale: 1e3,\n suffixes: n,\n marker: \"d\"\n }\n },\n I = {\n totalLength: 0,\n characteristic: 0,\n forceAverage: !1,\n average: !1,\n mantissa: -1,\n optionalMantissa: !0,\n thousandSeparated: !1,\n spaceSeparated: !1,\n negative: \"sign\",\n forceSign: !1\n };\n\n function i(e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {},\n r = 2 < arguments.length ? arguments[2] : void 0;\n if (\"string\" == typeof t && (t = u.parseFormat(t)), !o.validateFormat(t)) return \"ERROR: invalid format\";\n\n var n = t.prefix || \"\",\n i = t.postfix || \"\",\n a = function (e, t, r) {\n switch (t.output) {\n case \"currency\":\n return t = A(t, R.currentCurrencyDefaultFormat()), function (e, t, r) {\n var n = r.currentCurrency(),\n i = Object.assign({}, I, t),\n a = void 0,\n o = \"\",\n u = !!i.totalLength || !!i.forceAverage || i.average,\n c = t.currencyPosition || n.position,\n s = t.currencySymbol || n.symbol;\n i.spaceSeparated && (o = \" \");\n \"infix\" === c && (a = o + s + o);\n var l = D({\n instance: e,\n providedFormat: t,\n state: r,\n decimalSeparator: a\n });\n \"prefix\" === c && (l = e._value < 0 && \"sign\" === i.negative ? \"-\".concat(o).concat(s).concat(l.slice(1)) : s + o + l);\n c && \"postfix\" !== c || (l = l + (o = u ? \"\" : o) + s);\n return l;\n }(e, t, R);\n\n case \"percent\":\n return t = A(t, R.currentPercentageDefaultFormat()), function (e, t, r, n) {\n var i = t.prefixSymbol,\n a = D({\n instance: n(100 * e._value),\n providedFormat: t,\n state: r\n }),\n o = Object.assign({}, I, t);\n if (i) return \"%\".concat(o.spaceSeparated ? \" \" : \"\").concat(a);\n return \"\".concat(a).concat(o.spaceSeparated ? \" \" : \"\", \"%\");\n }(e, t, R, r);\n\n case \"byte\":\n return t = A(t, R.currentByteDefaultFormat()), h = e, v = R, m = r, y = (d = t).base || \"binary\", b = M[y], w = B(h._value, b.suffixes, b.scale), O = w.value, x = w.suffix, S = D({\n instance: m(O),\n providedFormat: d,\n state: v,\n defaults: v.currentByteDefaultFormat()\n }), N = v.currentAbbreviations(), \"\".concat(S).concat(N.spaced ? \" \" : \"\").concat(x);\n\n case \"time\":\n return t = A(t, R.currentTimeDefaultFormat()), l = e, f = Math.floor(l._value / 60 / 60), p = Math.floor((l._value - 60 * f * 60) / 60), g = Math.round(l._value - 60 * f * 60 - 60 * p), \"\".concat(f, \":\").concat(p < 10 ? \"0\" : \"\").concat(p, \":\").concat(g < 10 ? \"0\" : \"\").concat(g);\n\n case \"ordinal\":\n return t = A(t, R.currentOrdinalDefaultFormat()), n = e, i = t, o = (a = R).currentOrdinal(), u = Object.assign({}, I, i), c = D({\n instance: n,\n providedFormat: i,\n state: a\n }), s = o(n._value), \"\".concat(c).concat(u.spaceSeparated ? \" \" : \"\").concat(s);\n\n case \"number\":\n default:\n return D({\n instance: e,\n providedFormat: t,\n numbro: r\n });\n }\n\n var n, i, a, o, u, c, s;\n var l, f, p, g;\n var h, d, v, m, y, b, w, O, x, S, N;\n }(e, t, r);\n\n return a = (a = n + a) + i;\n }\n\n function B(e, t, r) {\n var n = t[0],\n i = Math.abs(e);\n\n if (r <= i) {\n for (var a = 1; a < t.length; ++a) {\n var o = Math.pow(r, a),\n u = Math.pow(r, a + 1);\n\n if (o <= i && i < u) {\n n = t[a], e /= o;\n break;\n }\n }\n\n n === t[0] && (e /= Math.pow(r, t.length - 1), n = t[t.length - 1]);\n }\n\n return {\n value: e,\n suffix: n\n };\n }\n\n function p(e) {\n for (var t = \"\", r = 0; r < e; r++) {\n t += \"0\";\n }\n\n return t;\n }\n\n function $(e, t) {\n return -1 !== e.toString().indexOf(\"e\") ? function (e, t) {\n var r = e.toString(),\n n = C(r.split(\"e\"), 2),\n i = n[0],\n a = n[1],\n o = C(i.split(\".\"), 2),\n u = o[0],\n c = o[1],\n s = void 0 === c ? \"\" : c;\n if (0 < +a) r = u + s + p(a - s.length);else {\n var l = \".\";\n l = +u < 0 ? \"-0\".concat(l) : \"0\".concat(l);\n var f = (p(-a - 1) + Math.abs(u) + s).substr(0, t);\n f.length < t && (f += p(t - f.length)), r = l + f;\n }\n return 0 < +a && 0 < t && (r += \".\".concat(p(t))), r;\n }(e, t) : (Math.round(+\"\".concat(e, \"e+\").concat(t)) / Math.pow(10, t)).toFixed(t);\n }\n\n function D(e) {\n var t = e.instance,\n r = e.providedFormat,\n n = e.state,\n i = void 0 === n ? R : n,\n a = e.decimalSeparator,\n o = e.defaults,\n u = void 0 === o ? i.currentDefaults() : o,\n c = t._value;\n if (0 === c && i.hasZeroFormat()) return i.getZeroFormat();\n if (!isFinite(c)) return c.toString();\n var s,\n l,\n f,\n p,\n g,\n h,\n d,\n v,\n m = Object.assign({}, I, u, r),\n y = m.totalLength,\n b = y ? 0 : m.characteristic,\n w = m.optionalCharacteristic,\n O = m.forceAverage,\n x = !!y || !!O || m.average,\n S = y ? -1 : x && void 0 === r.mantissa ? 0 : m.mantissa,\n N = !y && (void 0 === r.optionalMantissa ? -1 === S : m.optionalMantissa),\n M = m.trimMantissa,\n B = m.thousandSeparated,\n D = m.spaceSeparated,\n A = m.negative,\n E = m.forceSign,\n F = m.exponential,\n k = \"\";\n\n if (x) {\n var _ = function (e) {\n var t = e.value,\n r = e.forceAverage,\n n = e.abbreviations,\n i = e.spaceSeparated,\n a = void 0 !== i && i,\n o = e.totalLength,\n u = void 0 === o ? 0 : o,\n c = \"\",\n s = Math.abs(t),\n l = -1;\n\n if (s >= Math.pow(10, 12) && !r || \"trillion\" === r ? (c = n.trillion, t /= Math.pow(10, 12)) : s < Math.pow(10, 12) && s >= Math.pow(10, 9) && !r || \"billion\" === r ? (c = n.billion, t /= Math.pow(10, 9)) : s < Math.pow(10, 9) && s >= Math.pow(10, 6) && !r || \"million\" === r ? (c = n.million, t /= Math.pow(10, 6)) : (s < Math.pow(10, 6) && s >= Math.pow(10, 3) && !r || \"thousand\" === r) && (c = n.thousand, t /= Math.pow(10, 3)), c && (c = (a ? \" \" : \"\") + c), u) {\n var f = t.toString().split(\".\")[0];\n l = Math.max(u - f.length, 0);\n }\n\n return {\n value: t,\n abbreviation: c,\n mantissaPrecision: l\n };\n }({\n value: c,\n forceAverage: O,\n abbreviations: i.currentAbbreviations(),\n spaceSeparated: D,\n totalLength: y\n });\n\n c = _.value, k += _.abbreviation, y && (S = _.mantissaPrecision);\n }\n\n if (F) {\n var L = (l = (s = {\n value: c,\n characteristicPrecision: b\n }).value, f = s.characteristicPrecision, p = void 0 === f ? 0 : f, g = C(l.toExponential().split(\"e\"), 2), h = g[0], d = g[1], v = +h, p && 1 < p && (v *= Math.pow(10, p - 1), d = 0 <= (d = +d - (p - 1)) ? \"+\".concat(d) : d), {\n value: v,\n abbreviation: \"e\".concat(d)\n });\n c = L.value, k = L.abbreviation + k;\n }\n\n var T,\n P,\n U,\n j = function (e, t, r, n, i) {\n if (-1 === n) return e;\n var a = $(t, n),\n o = C(a.toString().split(\".\"), 2),\n u = o[0],\n c = o[1],\n s = void 0 === c ? \"\" : c;\n if (s.match(/^0+$/) && (r || i)) return u;\n var l = s.match(/0+$/);\n return i && l ? \"\".concat(u, \".\").concat(s.toString().slice(0, l.index)) : a.toString();\n }(c.toString(), c, N, S, M);\n\n return j = function (e, t, r, n, i) {\n var a = n.currentDelimiters(),\n o = a.thousands;\n i = i || a.decimal;\n var u = a.thousandsSize || 3,\n c = e.toString(),\n s = c.split(\".\")[0],\n l = c.split(\".\")[1];\n return r && (t < 0 && (s = s.slice(1)), function (e, t) {\n for (var r = [], n = 0, i = e; 0 < i; i--) {\n n === t && (r.unshift(i), n = 0), n++;\n }\n\n return r;\n }(s.length, u).forEach(function (e, t) {\n s = s.slice(0, e + t) + o + s.slice(e + t);\n }), t < 0 && (s = \"-\".concat(s))), c = l ? s + i + l : s;\n }(j = function (e, t, r, n) {\n var i = e,\n a = C(i.toString().split(\".\"), 2),\n o = a[0],\n u = a[1];\n if (o.match(/^-?0$/) && r) return u ? \"\".concat(o.replace(\"0\", \"\"), \".\").concat(u) : o.replace(\"0\", \"\");\n if (o.length < n) for (var c = n - o.length, s = 0; s < c; s++) {\n i = \"0\".concat(i);\n }\n return i.toString();\n }(j, 0, w, b), c, B, i, a), (x || F) && (j = j + k), (E || c < 0) && (T = j, U = A, j = 0 === (P = c) ? T : 0 == +T ? T.replace(\"-\", \"\") : 0 < P ? \"+\".concat(T) : \"sign\" === U ? T : \"(\".concat(T.replace(\"-\", \"\"), \")\")), j;\n }\n\n function A(e, t) {\n if (!e) return t;\n var r = Object.keys(e);\n return 1 === r.length && \"output\" === r[0] ? t : e;\n }\n\n t.exports = function (n) {\n return {\n format: function format() {\n for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) {\n t[r] = arguments[r];\n }\n\n return i.apply(void 0, t.concat([n]));\n },\n getByteUnit: function getByteUnit() {\n for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) {\n t[r] = arguments[r];\n }\n\n return function (e) {\n var t = M.general;\n return B(e._value, t.suffixes, t.scale).suffix;\n }.apply(void 0, t.concat([n]));\n },\n getBinaryByteUnit: function getBinaryByteUnit() {\n for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) {\n t[r] = arguments[r];\n }\n\n return function (e) {\n var t = M.binary;\n return B(e._value, t.suffixes, t.scale).suffix;\n }.apply(void 0, t.concat([n]));\n },\n getDecimalByteUnit: function getDecimalByteUnit() {\n for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) {\n t[r] = arguments[r];\n }\n\n return function (e) {\n var t = M.decimal;\n return B(e._value, t.suffixes, t.scale).suffix;\n }.apply(void 0, t.concat([n]));\n },\n formatOrDefault: A\n };\n };\n }, {\n \"./globalState\": 4,\n \"./parsing\": 8,\n \"./validating\": 10\n }],\n 4: [function (e, t, r) {\n \"use strict\";\n\n var i = e(\"./en-US\"),\n n = e(\"./validating\"),\n a = e(\"./parsing\"),\n o = {},\n u = void 0,\n c = {},\n s = null,\n l = {};\n\n function f(e) {\n u = e;\n }\n\n function p() {\n return c[u];\n }\n\n o.languages = function () {\n return Object.assign({}, c);\n }, o.currentLanguage = function () {\n return u;\n }, o.currentCurrency = function () {\n return p().currency;\n }, o.currentAbbreviations = function () {\n return p().abbreviations;\n }, o.currentDelimiters = function () {\n return p().delimiters;\n }, o.currentOrdinal = function () {\n return p().ordinal;\n }, o.currentDefaults = function () {\n return Object.assign({}, p().defaults, l);\n }, o.currentOrdinalDefaultFormat = function () {\n return Object.assign({}, o.currentDefaults(), p().ordinalFormat);\n }, o.currentByteDefaultFormat = function () {\n return Object.assign({}, o.currentDefaults(), p().byteFormat);\n }, o.currentPercentageDefaultFormat = function () {\n return Object.assign({}, o.currentDefaults(), p().percentageFormat);\n }, o.currentCurrencyDefaultFormat = function () {\n return Object.assign({}, o.currentDefaults(), p().currencyFormat);\n }, o.currentTimeDefaultFormat = function () {\n return Object.assign({}, o.currentDefaults(), p().timeFormat);\n }, o.setDefaults = function (e) {\n e = a.parseFormat(e), n.validateFormat(e) && (l = e);\n }, o.getZeroFormat = function () {\n return s;\n }, o.setZeroFormat = function (e) {\n return s = \"string\" == typeof e ? e : null;\n }, o.hasZeroFormat = function () {\n return null !== s;\n }, o.languageData = function (e) {\n if (e) {\n if (c[e]) return c[e];\n throw new Error('Unknown tag \"'.concat(e, '\"'));\n }\n\n return p();\n }, o.registerLanguage = function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] && arguments[1];\n if (!n.validateLanguage(e)) throw new Error(\"Invalid language data\");\n c[e.languageTag] = e, t && f(e.languageTag);\n }, o.setLanguage = function (e) {\n var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : i.languageTag;\n\n if (!c[e]) {\n var r = e.split(\"-\")[0],\n n = Object.keys(c).find(function (e) {\n return e.split(\"-\")[0] === r;\n });\n return c[n] ? void f(n) : void f(t);\n }\n\n f(e);\n }, o.registerLanguage(i), u = i.languageTag, t.exports = o;\n }, {\n \"./en-US\": 2,\n \"./parsing\": 8,\n \"./validating\": 10\n }],\n 5: [function (n, e, t) {\n \"use strict\";\n\n e.exports = function (t) {\n return {\n loadLanguagesInNode: function loadLanguagesInNode(e) {\n return r = t, void e.forEach(function (t) {\n var e = void 0;\n\n try {\n e = n(\"../languages/\".concat(t));\n } catch (e) {\n console.error('Unable to load \"'.concat(t, '\". No matching language file found.'));\n }\n\n e && r.registerLanguage(e);\n });\n var r;\n }\n };\n };\n }, {}],\n 6: [function (e, t, r) {\n \"use strict\";\n\n var c = e(\"bignumber.js\");\n\n function a(e, t, r) {\n var n = new c(e._value),\n i = t;\n return r.isNumbro(t) && (i = t._value), i = new c(i), e._value = n.minus(i).toNumber(), e;\n }\n\n t.exports = function (u) {\n return {\n add: function add(e, t) {\n return n = t, i = u, a = new c((r = e)._value), o = n, i.isNumbro(n) && (o = n._value), o = new c(o), r._value = a.plus(o).toNumber(), r;\n var r, n, i, a, o;\n },\n subtract: function subtract(e, t) {\n return a(e, t, u);\n },\n multiply: function multiply(e, t) {\n return n = t, i = u, a = new c((r = e)._value), o = n, i.isNumbro(n) && (o = n._value), o = new c(o), r._value = a.times(o).toNumber(), r;\n var r, n, i, a, o;\n },\n divide: function divide(e, t) {\n return n = t, i = u, a = new c((r = e)._value), o = n, i.isNumbro(n) && (o = n._value), o = new c(o), r._value = a.dividedBy(o).toNumber(), r;\n var r, n, i, a, o;\n },\n set: function set(e, t) {\n return r = e, i = n = t, u.isNumbro(n) && (i = n._value), r._value = i, r;\n var r, n, i;\n },\n difference: function difference(e, t) {\n return r = t, a(i = (n = u)(e._value), r, n), Math.abs(i._value);\n var r, n, i;\n }\n };\n };\n }, {\n \"bignumber.js\": 1\n }],\n 7: [function (e, t, r) {\n \"use strict\";\n\n function i(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n\n var a = e(\"./globalState\"),\n n = e(\"./validating\"),\n o = e(\"./loading\")(g),\n u = e(\"./unformatting\"),\n c = e(\"./formatting\")(g),\n s = e(\"./manipulating\")(g),\n l = e(\"./parsing\"),\n f = function () {\n function t(e) {\n !function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), this._value = e;\n }\n\n var e, r, n;\n return e = t, (r = [{\n key: \"clone\",\n value: function value() {\n return g(this._value);\n }\n }, {\n key: \"format\",\n value: function value() {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};\n return c.format(this, e);\n }\n }, {\n key: \"formatCurrency\",\n value: function value(e) {\n return \"string\" == typeof e && (e = l.parseFormat(e)), (e = c.formatOrDefault(e, a.currentCurrencyDefaultFormat())).output = \"currency\", c.format(this, e);\n }\n }, {\n key: \"formatTime\",\n value: function value() {\n var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};\n return e.output = \"time\", c.format(this, e);\n }\n }, {\n key: \"binaryByteUnits\",\n value: function value() {\n return c.getBinaryByteUnit(this);\n }\n }, {\n key: \"decimalByteUnits\",\n value: function value() {\n return c.getDecimalByteUnit(this);\n }\n }, {\n key: \"byteUnits\",\n value: function value() {\n return c.getByteUnit(this);\n }\n }, {\n key: \"difference\",\n value: function value(e) {\n return s.difference(this, e);\n }\n }, {\n key: \"add\",\n value: function value(e) {\n return s.add(this, e);\n }\n }, {\n key: \"subtract\",\n value: function value(e) {\n return s.subtract(this, e);\n }\n }, {\n key: \"multiply\",\n value: function value(e) {\n return s.multiply(this, e);\n }\n }, {\n key: \"divide\",\n value: function value(e) {\n return s.divide(this, e);\n }\n }, {\n key: \"set\",\n value: function value(e) {\n return s.set(this, p(e));\n }\n }, {\n key: \"value\",\n value: function value() {\n return this._value;\n }\n }, {\n key: \"valueOf\",\n value: function value() {\n return this._value;\n }\n }]) && i(e.prototype, r), n && i(e, n), t;\n }();\n\n function p(e) {\n var t = e;\n return g.isNumbro(e) ? t = e._value : \"string\" == typeof e ? t = g.unformat(e) : isNaN(e) && (t = NaN), t;\n }\n\n function g(e) {\n return new f(p(e));\n }\n\n g.version = \"2.1.2\", g.isNumbro = function (e) {\n return e instanceof f;\n }, g.language = a.currentLanguage, g.registerLanguage = a.registerLanguage, g.setLanguage = a.setLanguage, g.languages = a.languages, g.languageData = a.languageData, g.zeroFormat = a.setZeroFormat, g.defaultFormat = a.currentDefaults, g.setDefaults = a.setDefaults, g.defaultCurrencyFormat = a.currentCurrencyDefaultFormat, g.validate = n.validate, g.loadLanguagesInNode = o.loadLanguagesInNode, g.unformat = u.unformat, t.exports = g;\n }, {\n \"./formatting\": 3,\n \"./globalState\": 4,\n \"./loading\": 5,\n \"./manipulating\": 6,\n \"./parsing\": 8,\n \"./unformatting\": 9,\n \"./validating\": 10\n }],\n 8: [function (e, t, r) {\n \"use strict\";\n\n t.exports = {\n parseFormat: function parseFormat(e) {\n var t,\n r,\n n,\n i,\n a,\n o,\n u,\n c,\n s,\n l,\n f,\n p,\n g,\n h,\n d,\n v,\n m,\n y,\n b,\n w,\n O = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};\n return \"string\" != typeof e ? e : (r = O, e = (n = (t = e).match(/^{([^}]*)}/)) ? (r.prefix = n[1], t.slice(n[0].length)) : t, a = O, function (e, t) {\n if (-1 === e.indexOf(\"$\")) {\n if (-1 === e.indexOf(\"%\")) return -1 !== e.indexOf(\"bd\") ? (t.output = \"byte\", t.base = \"general\") : -1 !== e.indexOf(\"b\") ? (t.output = \"byte\", t.base = \"binary\") : -1 !== e.indexOf(\"d\") ? (t.output = \"byte\", t.base = \"decimal\") : -1 === e.indexOf(\":\") ? -1 !== e.indexOf(\"o\") && (t.output = \"ordinal\") : t.output = \"time\";\n t.output = \"percent\";\n } else t.output = \"currency\";\n }(e = (o = (i = e).match(/{([^}]*)}$/)) ? (a.postfix = o[1], i.slice(0, -o[0].length)) : i, O), u = O, (c = e.match(/[1-9]+[0-9]*/)) && (u.totalLength = +c[0]), s = O, (l = e.split(\".\")[0].match(/0+/)) && (s.characteristic = l[0].length), function (e, t) {\n if (-1 !== e.indexOf(\".\")) {\n var r = e.split(\".\")[0];\n t.optionalCharacteristic = -1 === r.indexOf(\"0\");\n }\n }(e, O), f = O, -1 !== e.indexOf(\"a\") && (f.average = !0), g = O, -1 !== (p = e).indexOf(\"K\") ? g.forceAverage = \"thousand\" : -1 !== p.indexOf(\"M\") ? g.forceAverage = \"million\" : -1 !== p.indexOf(\"B\") ? g.forceAverage = \"billion\" : -1 !== p.indexOf(\"T\") && (g.forceAverage = \"trillion\"), function (e, t) {\n var r = e.split(\".\")[1];\n\n if (r) {\n var n = r.match(/0+/);\n n && (t.mantissa = n[0].length);\n }\n }(e, O), d = O, (h = e).match(/\\[\\.]/) ? d.optionalMantissa = !0 : h.match(/\\./) && (d.optionalMantissa = !1), v = O, -1 !== e.indexOf(\",\") && (v.thousandSeparated = !0), m = O, -1 !== e.indexOf(\" \") && (m.spaceSeparated = !0), b = O, (y = e).match(/^\\+?\\([^)]*\\)$/) && (b.negative = \"parenthesis\"), y.match(/^\\+?-/) && (b.negative = \"sign\"), w = O, e.match(/^\\+/) && (w.forceSign = !0), O);\n }\n };\n }, {}],\n 9: [function (p, e, t) {\n \"use strict\";\n\n var O = [{\n key: \"ZiB\",\n factor: Math.pow(1024, 7)\n }, {\n key: \"ZB\",\n factor: Math.pow(1e3, 7)\n }, {\n key: \"YiB\",\n factor: Math.pow(1024, 8)\n }, {\n key: \"YB\",\n factor: Math.pow(1e3, 8)\n }, {\n key: \"TiB\",\n factor: Math.pow(1024, 4)\n }, {\n key: \"TB\",\n factor: Math.pow(1e3, 4)\n }, {\n key: \"PiB\",\n factor: Math.pow(1024, 5)\n }, {\n key: \"PB\",\n factor: Math.pow(1e3, 5)\n }, {\n key: \"MiB\",\n factor: Math.pow(1024, 2)\n }, {\n key: \"MB\",\n factor: Math.pow(1e3, 2)\n }, {\n key: \"KiB\",\n factor: Math.pow(1024, 1)\n }, {\n key: \"KB\",\n factor: Math.pow(1e3, 1)\n }, {\n key: \"GiB\",\n factor: Math.pow(1024, 3)\n }, {\n key: \"GB\",\n factor: Math.pow(1e3, 3)\n }, {\n key: \"EiB\",\n factor: Math.pow(1024, 6)\n }, {\n key: \"EB\",\n factor: Math.pow(1e3, 6)\n }, {\n key: \"B\",\n factor: 1\n }];\n\n function x(e) {\n return e.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n }\n\n function g(e, t) {\n var r = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : \"\",\n n = 3 < arguments.length ? arguments[3] : void 0,\n i = 4 < arguments.length ? arguments[4] : void 0,\n a = 5 < arguments.length ? arguments[5] : void 0,\n o = 6 < arguments.length ? arguments[6] : void 0;\n if (\"\" !== e) return e === i ? 0 : function e(t, r) {\n var n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : \"\",\n i = 3 < arguments.length ? arguments[3] : void 0,\n a = 4 < arguments.length ? arguments[4] : void 0,\n o = 5 < arguments.length ? arguments[5] : void 0,\n u = 6 < arguments.length ? arguments[6] : void 0;\n if (!isNaN(+t)) return +t;\n var c = \"\",\n s = t.replace(/(^[^(]*)\\((.*)\\)([^)]*$)/, \"$1$2$3\");\n if (s !== t) return -1 * e(s, r, n, i, a, o, u);\n\n for (var l = 0; l < O.length; l++) {\n var f = O[l];\n if ((c = t.replace(f.key, \"\")) !== t) return e(c, r, n, i, a, o, u) * f.factor;\n }\n\n if ((c = t.replace(\"%\", \"\")) !== t) return e(c, r, n, i, a, o, u) / 100;\n var p = parseFloat(t);\n\n if (!isNaN(p)) {\n var g = i(p);\n if (g && \".\" !== g && (c = t.replace(new RegExp(\"\".concat(x(g), \"$\")), \"\")) !== t) return e(c, r, n, i, a, o, u);\n var h = {};\n Object.keys(o).forEach(function (e) {\n h[o[e]] = e;\n });\n\n for (var d = Object.keys(h).sort().reverse(), v = d.length, m = 0; m < v; m++) {\n var y = d[m],\n b = h[y];\n\n if ((c = t.replace(y, \"\")) !== t) {\n var w = void 0;\n\n switch (b) {\n case \"thousand\":\n w = Math.pow(10, 3);\n break;\n\n case \"million\":\n w = Math.pow(10, 6);\n break;\n\n case \"billion\":\n w = Math.pow(10, 9);\n break;\n\n case \"trillion\":\n w = Math.pow(10, 12);\n }\n\n return e(c, r, n, i, a, o, u) * w;\n }\n }\n }\n }(function (e, t) {\n var r = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : \"\",\n n = e.replace(r, \"\");\n return n = (n = n.replace(new RegExp(\"([0-9])\".concat(x(t.thousands), \"([0-9])\"), \"g\"), \"$1$2\")).replace(t.decimal, \".\");\n }(e, t, r), t, r, n, i, a, o);\n }\n\n e.exports = {\n unformat: function unformat(e, t) {\n var r,\n n,\n i,\n a = p(\"./globalState\"),\n o = a.currentDelimiters(),\n u = a.currentCurrency().symbol,\n c = a.currentOrdinal(),\n s = a.getZeroFormat(),\n l = a.currentAbbreviations(),\n f = void 0;\n if (\"string\" == typeof e) f = function (e, t) {\n if (!e.indexOf(\":\") || \":\" === t.thousands) return !1;\n var r = e.split(\":\");\n if (3 !== r.length) return !1;\n var n = +r[0],\n i = +r[1],\n a = +r[2];\n return !isNaN(n) && !isNaN(i) && !isNaN(a);\n }(e, o) ? (r = e.split(\":\"), n = +r[0], i = +r[1], +r[2] + 60 * i + 3600 * n) : g(e, o, u, c, s, l, t);else {\n if (\"number\" != typeof e) return;\n f = e;\n }\n if (void 0 !== f) return f;\n }\n };\n }, {\n \"./globalState\": 4\n }],\n 10: [function (e, t, r) {\n \"use strict\";\n\n function n(e) {\n return function (e) {\n if (Array.isArray(e)) {\n for (var t = 0, r = new Array(e.length); t < e.length; t++) {\n r[t] = e[t];\n }\n\n return r;\n }\n }(e) || function (e) {\n if (Symbol.iterator in Object(e) || \"[object Arguments]\" === Object.prototype.toString.call(e)) return Array.from(e);\n }(e) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }\n\n function f(e) {\n return (f = \"function\" == typeof Symbol && \"symbol\" == _typeof(Symbol.iterator) ? function (e) {\n return _typeof(e);\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : _typeof(e);\n })(e);\n }\n\n var i = e(\"./unformatting\"),\n a = /^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,\n p = {\n output: {\n type: \"string\",\n validValues: [\"currency\", \"percent\", \"byte\", \"time\", \"ordinal\", \"number\"]\n },\n base: {\n type: \"string\",\n validValues: [\"decimal\", \"binary\", \"general\"],\n restriction: function restriction(e, t) {\n return \"byte\" === t.output;\n },\n message: \"`base` must be provided only when the output is `byte`\",\n mandatory: function mandatory(e) {\n return \"byte\" === e.output;\n }\n },\n characteristic: {\n type: \"number\",\n restriction: function restriction(e) {\n return 0 <= e;\n },\n message: \"value must be positive\"\n },\n prefix: \"string\",\n postfix: \"string\",\n forceAverage: {\n type: \"string\",\n validValues: [\"trillion\", \"billion\", \"million\", \"thousand\"]\n },\n average: \"boolean\",\n currencyPosition: {\n type: \"string\",\n validValues: [\"prefix\", \"infix\", \"postfix\"]\n },\n currencySymbol: \"string\",\n totalLength: {\n type: \"number\",\n restrictions: [{\n restriction: function restriction(e) {\n return 0 <= e;\n },\n message: \"value must be positive\"\n }, {\n restriction: function restriction(e, t) {\n return !t.exponential;\n },\n message: \"`totalLength` is incompatible with `exponential`\"\n }]\n },\n mantissa: {\n type: \"number\",\n restriction: function restriction(e) {\n return 0 <= e;\n },\n message: \"value must be positive\"\n },\n optionalMantissa: \"boolean\",\n trimMantissa: \"boolean\",\n optionalCharacteristic: \"boolean\",\n thousandSeparated: \"boolean\",\n spaceSeparated: \"boolean\",\n abbreviations: {\n type: \"object\",\n children: {\n thousand: \"string\",\n million: \"string\",\n billion: \"string\",\n trillion: \"string\"\n }\n },\n negative: {\n type: \"string\",\n validValues: [\"sign\", \"parenthesis\"]\n },\n forceSign: \"boolean\",\n exponential: {\n type: \"boolean\"\n },\n prefixSymbol: {\n type: \"boolean\",\n restriction: function restriction(e, t) {\n return \"percent\" === t.output;\n },\n message: \"`prefixSymbol` can be provided only when the output is `percent`\"\n }\n },\n o = {\n languageTag: {\n type: \"string\",\n mandatory: !0,\n restriction: function restriction(e) {\n return e.match(a);\n },\n message: \"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)\"\n },\n delimiters: {\n type: \"object\",\n children: {\n thousands: \"string\",\n decimal: \"string\",\n thousandsSize: \"number\"\n },\n mandatory: !0\n },\n abbreviations: {\n type: \"object\",\n children: {\n thousand: {\n type: \"string\",\n mandatory: !0\n },\n million: {\n type: \"string\",\n mandatory: !0\n },\n billion: {\n type: \"string\",\n mandatory: !0\n },\n trillion: {\n type: \"string\",\n mandatory: !0\n }\n },\n mandatory: !0\n },\n spaceSeparated: \"boolean\",\n ordinal: {\n type: \"function\",\n mandatory: !0\n },\n currency: {\n type: \"object\",\n children: {\n symbol: \"string\",\n position: \"string\",\n code: \"string\"\n },\n mandatory: !0\n },\n defaults: \"format\",\n ordinalFormat: \"format\",\n byteFormat: \"format\",\n percentageFormat: \"format\",\n currencyFormat: \"format\",\n timeDefaults: \"format\",\n formats: {\n type: \"object\",\n children: {\n fourDigits: {\n type: \"format\",\n mandatory: !0\n },\n fullWithTwoDecimals: {\n type: \"format\",\n mandatory: !0\n },\n fullWithTwoDecimalsNoCurrency: {\n type: \"format\",\n mandatory: !0\n },\n fullWithNoDecimals: {\n type: \"format\",\n mandatory: !0\n }\n }\n }\n };\n\n function u(e) {\n return !!i.unformat(e);\n }\n\n function g(c, s, l) {\n var e = 3 < arguments.length && void 0 !== arguments[3] && arguments[3],\n t = Object.keys(c).map(function (e) {\n if (!s[e]) return console.error(\"\".concat(l, \" Invalid key: \").concat(e)), !1;\n var t = c[e],\n r = s[e];\n\n if (\"string\" == typeof r && (r = {\n type: r\n }), \"format\" === r.type) {\n if (!g(t, p, \"[Validate \".concat(e, \"]\"), !0)) return !1;\n } else if (f(t) !== r.type) return console.error(\"\".concat(l, \" \").concat(e, ' type mismatched: \"').concat(r.type, '\" expected, \"').concat(f(t), '\" provided')), !1;\n\n if (r.restrictions && r.restrictions.length) for (var n = r.restrictions.length, i = 0; i < n; i++) {\n var a = r.restrictions[i],\n o = a.restriction,\n u = a.message;\n if (!o(t, c)) return console.error(\"\".concat(l, \" \").concat(e, \" invalid value: \").concat(u)), !1;\n }\n if (r.restriction && !r.restriction(t, c)) return console.error(\"\".concat(l, \" \").concat(e, \" invalid value: \").concat(r.message)), !1;\n if (r.validValues && -1 === r.validValues.indexOf(t)) return console.error(\"\".concat(l, \" \").concat(e, \" invalid value: must be among \").concat(JSON.stringify(r.validValues), ', \"').concat(t, '\" provided')), !1;\n if (r.children && !g(t, r.children, \"[Validate \".concat(e, \"]\"))) return !1;\n return !0;\n });\n return e || t.push.apply(t, n(Object.keys(s).map(function (e) {\n var t = s[e];\n\n if (\"string\" == typeof t && (t = {\n type: t\n }), t.mandatory) {\n var r = t.mandatory;\n if (\"function\" == typeof r && (r = r(c)), r && void 0 === c[e]) return console.error(\"\".concat(l, ' Missing mandatory key \"').concat(e, '\"')), !1;\n }\n\n return !0;\n }))), t.reduce(function (e, t) {\n return e && t;\n }, !0);\n }\n\n function c(e) {\n return g(e, p, \"[Validate format]\");\n }\n\n t.exports = {\n validate: function validate(e, t) {\n var r = u(e),\n n = c(t);\n return r && n;\n },\n validateFormat: c,\n validateInput: u,\n validateLanguage: function validateLanguage(e) {\n return g(e, o, \"[Validate language]\");\n }\n };\n }, {\n \"./unformatting\": 9\n }]\n }, {}, [7])(7);\n});","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.es/ecma262/#sec-regexp-constructor\nif (FORCED) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n var sticky;\n\n if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {\n return pattern;\n }\n\n if (CORRECT_NEW) {\n if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;\n } else if (pattern instanceof RegExpWrapper) {\n if (flagsAreUndefined) flags = getFlags.call(pattern);\n pattern = pattern.source;\n }\n\n if (UNSUPPORTED_Y) {\n sticky = !!flags && flags.indexOf('y') > -1;\n if (sticky) flags = flags.replace(/y/g, '');\n }\n\n var result = inheritIfRequired(\n CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),\n thisIsRegExp ? this : RegExpPrototype,\n RegExpWrapper\n );\n\n if (UNSUPPORTED_Y && sticky) {\n var state = enforceInternalState(result);\n state.sticky = true;\n }\n\n return result;\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys = getOwnPropertyNames(NativeRegExp);\n var index = 0;\n while (keys.length > index) proxy(keys[index++]);\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.es/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar $startsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = String(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.11.0',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY,\n KEY == 'add' ? function add(value) {\n nativeMethod.call(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n nativeMethod.call(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n var REPLACE = isForced(\n CONSTRUCTOR_NAME,\n typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n }))\n );\n\n if (REPLACE) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.REQUIRED = true;\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new -- required for testing\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","// eslint-disable-next-line es/no-math-expm1 -- safe\nvar $expm1 = Math.expm1;\nvar exp = Math.exp;\n\n// `Math.expm1` method implementation\n// https://tc39.es/ecma262/#sec-math.expm1\nmodule.exports = (!$expm1\n // Old FF bug\n || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || $expm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1;\n} : $expm1;\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","'use strict';\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\n\n// Forced replacement object prototype accessors methods\nmodule.exports = IS_PURE || !fails(function () {\n var key = Math.random();\n // In FF throws only define methods\n // eslint-disable-next-line no-undef, no-useless-call -- required for testing\n __defineSetter__.call(null, key, function () { /* empty */ });\n delete global[key];\n});\n","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","'use strict';\n\nvar fails = require('./fails');\n\n// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,\n// so we use an intermediate function.\nfunction RE(s, f) {\n return RegExp(s, f);\n}\n\nexports.UNSUPPORTED_Y = fails(function () {\n // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\n var re = RE('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = RE('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\nvar REPLACE = wellKnownSymbol('replace');\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !(\n REPLACE_SUPPORTS_NAMED_GROUPS &&\n REPLACE_KEEPS_$0 &&\n !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n )) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === RegExp.prototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }, {\n REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,\n REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n }\n\n if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);\n};\n","var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n","var listCacheClear = require(\"./_listCacheClear\"),\n listCacheDelete = require(\"./_listCacheDelete\"),\n listCacheGet = require(\"./_listCacheGet\"),\n listCacheHas = require(\"./_listCacheHas\"),\n listCacheSet = require(\"./_listCacheSet\");\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\n\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n} // Add methods to `ListCache`.\n\n\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\nmodule.exports = ListCache;","var eq = require(\"./eq\");\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n\n\nfunction assocIndexOf(array, key) {\n var length = array.length;\n\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n\n return -1;\n}\n\nmodule.exports = assocIndexOf;","var getNative = require(\"./_getNative\");\n/* Built-in method references that are verified to be native. */\n\n\nvar nativeCreate = getNative(Object, 'create');\nmodule.exports = nativeCreate;","var isKeyable = require(\"./_isKeyable\");\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n\n\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;\n}\n\nmodule.exports = getMapData;","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\nmodule.exports = isArray;","var isFunction = require(\"./isFunction\"),\n isLength = require(\"./isLength\");\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n\n\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;","var defaultFunctionName = '';\n/**\n * Safely extract function name from itself\n */\n\nexport function getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}","'use strict';\nvar $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // eslint-disable-next-line es/no-symbol -- required for testing\n return !Symbol.sham &&\n // Chrome 38 Symbol has incorrect toString conversion\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n (IS_NODE ? V8_VERSION === 38 : V8_VERSION > 37 && V8_VERSION < 41);\n});\n","var $ = require('../internals/export');\nvar fill = require('../internals/array-fill');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.fill` method\n// https://tc39.es/ecma262/#sec-array.prototype.fill\n$({ target: 'Array', proto: true }, {\n fill: fill\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('fill');\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","// `Math.sign` method implementation\n// https://tc39.es/ecma262/#sec-math.sign\n// eslint-disable-next-line es/no-math-sign -- safe\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n","'use strict';\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.repeat` method implementation\n// https://tc39.es/ecma262/#sec-string.prototype.repeat\nmodule.exports = function repeat(count) {\n var str = String(requireObjectCoercible(this));\n var result = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins -- safe\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n typeof postMessage == 'function' &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","'use strict';\nvar regexpFlags = require('./regexp-flags');\nvar stickyHelpers = require('./regexp-sticky-helpers');\nvar shared = require('./shared');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\n// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = String(str).slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","/* eslint-disable no-new -- required for testing */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","var getNative = require(\"./_getNative\"),\n root = require(\"./_root\");\n/* Built-in method references that are verified to be native. */\n\n\nvar Map = getNative(root, 'Map');\nmodule.exports = Map;","var baseGetTag = require(\"./_baseGetTag\"),\n isObject = require(\"./isObject\");\n/** `Object#toString` result references. */\n\n\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n } // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n\n\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;","var root = require(\"./_root\");\n/** Built-in value references. */\n\n\nvar _Symbol = root.Symbol;\nmodule.exports = _Symbol;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar root = require(\"./_root\"),\n stubFalse = require(\"./stubFalse\");\n/** Detect free variable `exports`. */\n\n\nvar freeExports = (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n/** Detect free variable `module`. */\n\nvar freeModule = freeExports && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) == 'object' && module && !module.nodeType && module;\n/** Detect the popular CommonJS extension `module.exports`. */\n\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n/** Built-in value references. */\n\nvar Buffer = moduleExports ? root.Buffer : undefined;\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n\nvar isBuffer = nativeIsBuffer || stubFalse;\nmodule.exports = isBuffer;","var baseIsTypedArray = require(\"./_baseIsTypedArray\"),\n baseUnary = require(\"./_baseUnary\"),\n nodeUtil = require(\"./_nodeUtil\");\n/* Node.js helper references. */\n\n\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\nmodule.exports = isTypedArray;","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;\n return value === proto;\n}\n\nmodule.exports = isPrototype;","var defineProperty = require(\"./_defineProperty\");\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n\n\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;","'use strict';\nvar $ = require('../internals/export');\nvar $every = require('../internals/array-iteration').every;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('every');\n\n// `Array.prototype.every` method\n// https://tc39.es/ecma262/#sec-array.prototype.every\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n every: function every(callbackfn /* , thisArg */) {\n return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","function _typeof2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nimport Handsontable from 'handsontable';\nimport Vue from 'vue';\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof2(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nvar unassignedPropSymbol = Symbol('unassigned');\nvar bulkComponentContainer = null;\n/**\r\n * Private method to ensure the table is not calling `updateSettings` after editing cells.\r\n * @private\r\n */\n\nfunction preventInternalEditWatch(component) {\n component.hotInstance.addHook('beforeChange', function () {\n component.__internalEdit = true;\n });\n component.hotInstance.addHook('beforeCreateRow', function () {\n component.__internalEdit = true;\n });\n component.hotInstance.addHook('beforeCreateCol', function () {\n component.__internalEdit = true;\n });\n component.hotInstance.addHook('beforeRemoveRow', function () {\n component.__internalEdit = true;\n });\n component.hotInstance.addHook('beforeRemoveCol', function () {\n component.__internalEdit = true;\n });\n}\n/**\r\n * Generate an object containing all the available Handsontable properties and plugin hooks.\r\n *\r\n * @param {String} source Source for the factory (either 'HotTable' or 'HotColumn').\r\n * @returns {Object}\r\n */\n\n\nfunction propFactory(source) {\n var registeredHooks = Handsontable.hooks.getRegistered();\n var propSchema = {};\n Object.assign(propSchema, Handsontable.DefaultSettings);\n\n for (var prop in propSchema) {\n propSchema[prop] = {\n \"default\": unassignedPropSymbol\n };\n }\n\n for (var i = 0; i < registeredHooks.length; i++) {\n propSchema[registeredHooks[i]] = {\n \"default\": unassignedPropSymbol\n };\n }\n\n propSchema.settings = {\n \"default\": unassignedPropSymbol\n };\n\n if (source === 'HotTable') {\n propSchema.id = {\n type: String,\n \"default\": 'hot-' + Math.random().toString(36).substring(5)\n };\n propSchema.wrapperRendererCacheSize = {\n type: Number,\n \"default\": 3000\n };\n }\n\n return propSchema;\n}\n/**\r\n * Filter out all of the unassigned props, and return only the one passed to the component.\r\n *\r\n * @param {Object} props Object containing all the possible props.\r\n * @returns {Object} Object containing only used props.\r\n */\n\n\nfunction filterPassedProps(props) {\n var filteredProps = {};\n var columnSettingsProp = props['settings'];\n\n if (columnSettingsProp !== unassignedPropSymbol) {\n for (var propName in columnSettingsProp) {\n if (columnSettingsProp.hasOwnProperty(propName) && columnSettingsProp[propName] !== unassignedPropSymbol) {\n filteredProps[propName] = columnSettingsProp[propName];\n }\n }\n }\n\n for (var _propName in props) {\n if (props.hasOwnProperty(_propName) && _propName !== 'settings' && props[_propName] !== unassignedPropSymbol) {\n filteredProps[_propName] = props[_propName];\n }\n }\n\n return filteredProps;\n}\n/**\r\n * Prepare the settings object to be used as the settings for Handsontable, based on the props provided to the component.\r\n *\r\n * @param {HotTableProps} props The props passed to the component.\r\n * @param {Handsontable.GridSettings} currentSettings The current Handsontable settings.\r\n * @returns {Handsontable.GridSettings} An object containing the properties, ready to be used within Handsontable.\r\n */\n\n\nfunction prepareSettings(props, currentSettings) {\n var assignedProps = filterPassedProps(props);\n var hotSettingsInProps = props.settings ? props.settings : assignedProps;\n var additionalHotSettingsInProps = props.settings ? assignedProps : null;\n var newSettings = {};\n\n for (var key in hotSettingsInProps) {\n if (hotSettingsInProps.hasOwnProperty(key) && hotSettingsInProps[key] !== void 0 && (currentSettings && key !== 'data' ? !simpleEqual(currentSettings[key], hotSettingsInProps[key]) : true)) {\n newSettings[key] = hotSettingsInProps[key];\n }\n }\n\n for (var _key in additionalHotSettingsInProps) {\n if (additionalHotSettingsInProps.hasOwnProperty(_key) && _key !== 'id' && _key !== 'settings' && _key !== 'wrapperRendererCacheSize' && additionalHotSettingsInProps[_key] !== void 0 && (currentSettings && _key !== 'data' ? !simpleEqual(currentSettings[_key], additionalHotSettingsInProps[_key]) : true)) {\n newSettings[_key] = additionalHotSettingsInProps[_key];\n }\n }\n\n return newSettings;\n}\n/**\r\n * Get the VNode element with the provided type attribute from the component slots.\r\n *\r\n * @param {Array} componentSlots Array of slots from a component.\r\n * @param {String} type Type of the child component. Either `hot-renderer` or `hot-editor`.\r\n * @returns {Object|null} The VNode of the child component (or `null` when nothing's found).\r\n */\n\n\nfunction findVNodeByType(componentSlots, type) {\n var componentVNode = null;\n componentSlots.every(function (slot, index) {\n if (slot.data && slot.data.attrs && slot.data.attrs[type] !== void 0) {\n componentVNode = slot;\n return false;\n }\n\n return true;\n });\n return componentVNode;\n}\n/**\r\n * Get all `hot-column` component instances from the provided children array.\r\n *\r\n * @param {Array} children Array of children from a component.\r\n * @returns {Array} Array of `hot-column` instances.\r\n */\n\n\nfunction getHotColumnComponents(children) {\n return children.filter(function (child) {\n return child.$options.name === 'HotColumn';\n });\n}\n/**\r\n * Create an instance of the Vue Component based on the provided VNode.\r\n *\r\n * @param {Object} vNode VNode element to be turned into a component instance.\r\n * @param {Object} parent Instance of the component to be marked as a parent of the newly created instance.\r\n * @param {Object} props Props to be passed to the new instance.\r\n * @param {Object} data Data to be passed to the new instance.\r\n */\n\n\nfunction createVueComponent(vNode, parent, props, data) {\n var ownerDocument = parent.$el ? parent.$el.ownerDocument : document;\n var settings = {\n propsData: props,\n parent: parent,\n data: data\n };\n\n if (!bulkComponentContainer) {\n bulkComponentContainer = ownerDocument.createElement('DIV');\n bulkComponentContainer.id = 'vueHotComponents';\n ownerDocument.body.appendChild(bulkComponentContainer);\n }\n\n var componentContainer = ownerDocument.createElement('DIV');\n bulkComponentContainer.appendChild(componentContainer);\n return new vNode.componentOptions.Ctor(settings).$mount(componentContainer);\n}\n/**\r\n * Compare two objects using `JSON.stringify`.\r\n * *Note: * As it's using the stringify function to compare objects, the property order in both objects is\r\n * important. It will return `false` for the same objects, if they're defined in a different order.\r\n *\r\n * @param {object} objectA First object to compare.\r\n * @param {object} objectB Second object to compare.\r\n * @returns {boolean} `true` if they're the same, `false` otherwise.\r\n */\n\n\nfunction simpleEqual(objectA, objectB) {\n return JSON.stringify(objectA) === JSON.stringify(objectB);\n}\n\nvar version = \"6.0.0\";\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n}\n\nvar lru = createCommonjsModule(function (module, exports) {\n /**\n * A doubly linked list-based Least Recently Used (LRU) cache. Will keep most\n * recently used items while discarding least recently used items when its limit\n * is reached.\n *\n * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson \n * See README.md for details.\n *\n * Illustration of the design:\n *\n * entry entry entry entry\n * ______ ______ ______ ______\n * | head |.newer => | |.newer => | |.newer => | tail |\n * | A | | B | | C | | D |\n * |______| <= older.|______| <= older.|______| <= older.|______|\n *\n * removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added\n */\n (function (g, f) {\n var e = exports;\n f(e);\n })(commonjsGlobal, function (exports) {\n var NEWER = Symbol('newer');\n var OLDER = Symbol('older');\n\n function LRUMap(limit, entries) {\n if (typeof limit !== 'number') {\n // called as (entries)\n entries = limit;\n limit = 0;\n }\n\n this.size = 0;\n this.limit = limit;\n this.oldest = this.newest = undefined;\n this._keymap = new Map();\n\n if (entries) {\n this.assign(entries);\n\n if (limit < 1) {\n this.limit = this.size;\n }\n }\n }\n\n exports.LRUMap = LRUMap;\n\n function Entry(key, value) {\n this.key = key;\n this.value = value;\n this[NEWER] = undefined;\n this[OLDER] = undefined;\n }\n\n LRUMap.prototype._markEntryAsUsed = function (entry) {\n if (entry === this.newest) {\n // Already the most recenlty used entry, so no need to update the list\n return;\n } // HEAD--------------TAIL\n // <.older .newer>\n // <--- add direction --\n // A B C E\n\n\n if (entry[NEWER]) {\n if (entry === this.oldest) {\n this.oldest = entry[NEWER];\n }\n\n entry[NEWER][OLDER] = entry[OLDER]; // C <-- E.\n }\n\n if (entry[OLDER]) {\n entry[OLDER][NEWER] = entry[NEWER]; // C. --> E\n }\n\n entry[NEWER] = undefined; // D --x\n\n entry[OLDER] = this.newest; // D. --> E\n\n if (this.newest) {\n this.newest[NEWER] = entry; // E. <-- D\n }\n\n this.newest = entry;\n };\n\n LRUMap.prototype.assign = function (entries) {\n var entry,\n limit = this.limit || Number.MAX_VALUE;\n\n this._keymap.clear();\n\n var it = entries[Symbol.iterator]();\n\n for (var itv = it.next(); !itv.done; itv = it.next()) {\n var e = new Entry(itv.value[0], itv.value[1]);\n\n this._keymap.set(e.key, e);\n\n if (!entry) {\n this.oldest = e;\n } else {\n entry[NEWER] = e;\n e[OLDER] = entry;\n }\n\n entry = e;\n\n if (limit-- == 0) {\n throw new Error('overflow');\n }\n }\n\n this.newest = entry;\n this.size = this._keymap.size;\n };\n\n LRUMap.prototype.get = function (key) {\n // First, find our cache entry\n var entry = this._keymap.get(key);\n\n if (!entry) return; // Not cached. Sorry.\n // As was found in the cache, register it as being requested recently\n\n this._markEntryAsUsed(entry);\n\n return entry.value;\n };\n\n LRUMap.prototype.set = function (key, value) {\n var entry = this._keymap.get(key);\n\n if (entry) {\n // update existing\n entry.value = value;\n\n this._markEntryAsUsed(entry);\n\n return this;\n } // new entry\n\n\n this._keymap.set(key, entry = new Entry(key, value));\n\n if (this.newest) {\n // link previous tail to the new tail (entry)\n this.newest[NEWER] = entry;\n entry[OLDER] = this.newest;\n } else {\n // we're first in -- yay\n this.oldest = entry;\n } // add new entry to the end of the linked list -- it's now the freshest entry.\n\n\n this.newest = entry;\n ++this.size;\n\n if (this.size > this.limit) {\n // we hit the limit -- remove the head\n this.shift();\n }\n\n return this;\n };\n\n LRUMap.prototype.shift = function () {\n // todo: handle special case when limit == 1\n var entry = this.oldest;\n\n if (entry) {\n if (this.oldest[NEWER]) {\n // advance the list\n this.oldest = this.oldest[NEWER];\n this.oldest[OLDER] = undefined;\n } else {\n // the cache is exhausted\n this.oldest = undefined;\n this.newest = undefined;\n } // Remove last strong reference to and remove links from the purged\n // entry being returned:\n\n\n entry[NEWER] = entry[OLDER] = undefined;\n\n this._keymap[\"delete\"](entry.key);\n\n --this.size;\n return [entry.key, entry.value];\n }\n }; // ----------------------------------------------------------------------------\n // Following code is optional and can be removed without breaking the core\n // functionality.\n\n\n LRUMap.prototype.has = function (key) {\n return this._keymap.has(key);\n };\n });\n});\nvar lru_1 = lru.LRUMap;\nvar HotTable = {\n name: 'HotTable',\n props: propFactory('HotTable'),\n watch: {\n mergedHotSettings: function mergedHotSettings(value) {\n if (value.data) {\n if (this.hotInstance.isColumnModificationAllowed() || !this.hotInstance.isColumnModificationAllowed() && this.hotInstance.countSourceCols() === this.miscCache.currentSourceColumns) {\n // If the dataset dimensions change, update the index mappers.\n this.matchHotMappersSize(value.data); // Data is automatically synchronized by reference.\n\n delete value.data;\n }\n } // If there are another options changed, update the HOT settings, render the table otherwise.\n\n\n if (Object.keys(value).length) {\n this.hotInstance.updateSettings(value);\n } else {\n this.hotInstance.render();\n }\n\n this.miscCache.currentSourceColumns = this.hotInstance.countSourceCols();\n }\n },\n data: function data() {\n var rendererCache = new lru_1(this.wrapperRendererCacheSize); // Make the LRU cache destroy each removed component\n\n rendererCache.shift = function () {\n var entry = lru_1.prototype.shift.call(this);\n entry[1].component.$destroy();\n return entry;\n };\n\n return {\n __internalEdit: false,\n miscCache: {\n currentSourceColumns: null\n },\n hotInstance: null,\n columnSettings: null,\n rendererCache: rendererCache,\n editorCache: new Map()\n };\n },\n computed: {\n mergedHotSettings: function mergedHotSettings() {\n return prepareSettings(this.$props, this.hotInstance ? this.hotInstance.getSettings() : void 0);\n }\n },\n methods: {\n /**\r\n * Initialize Handsontable.\r\n */\n hotInit: function hotInit() {\n var globalRendererVNode = this.getGlobalRendererVNode();\n var globalEditorVNode = this.getGlobalEditorVNode();\n var newSettings = prepareSettings(this.$props);\n newSettings.columns = this.columnSettings ? this.columnSettings : newSettings.columns;\n\n if (globalEditorVNode) {\n newSettings.editor = this.getEditorClass(globalEditorVNode, this);\n globalEditorVNode.child.$destroy();\n }\n\n if (globalRendererVNode) {\n newSettings.renderer = this.getRendererWrapper(globalRendererVNode, this);\n globalRendererVNode.child.$destroy();\n }\n\n this.hotInstance = new Handsontable.Core(this.$el, newSettings);\n this.hotInstance.init();\n preventInternalEditWatch(this);\n this.miscCache.currentSourceColumns = this.hotInstance.countSourceCols();\n },\n matchHotMappersSize: function matchHotMappersSize(data) {\n var _this = this;\n\n var rowsToRemove = [];\n var columnsToRemove = [];\n var indexMapperRowCount = this.hotInstance.rowIndexMapper.getNumberOfIndexes();\n var isColumnModificationAllowed = this.hotInstance.isColumnModificationAllowed();\n var indexMapperColumnCount = 0;\n\n if (data && data.length !== indexMapperRowCount) {\n if (data.length < indexMapperRowCount) {\n for (var r = data.length; r < indexMapperRowCount; r++) {\n rowsToRemove.push(r);\n }\n }\n }\n\n if (isColumnModificationAllowed) {\n var _data$;\n\n indexMapperColumnCount = this.hotInstance.columnIndexMapper.getNumberOfIndexes();\n\n if (data && data[0] && ((_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.length) !== indexMapperColumnCount) {\n if (data[0].length < indexMapperColumnCount) {\n for (var c = data[0].length; c < indexMapperColumnCount; c++) {\n columnsToRemove.push(c);\n }\n }\n }\n }\n\n this.hotInstance.batch(function () {\n if (rowsToRemove.length > 0) {\n _this.hotInstance.rowIndexMapper.removeIndexes(rowsToRemove);\n } else {\n _this.hotInstance.rowIndexMapper.insertIndexes(indexMapperRowCount - 1, data.length - indexMapperRowCount);\n }\n\n if (isColumnModificationAllowed) {\n if (columnsToRemove.length > 0) {\n _this.hotInstance.columnIndexMapper.removeIndexes(columnsToRemove);\n } else {\n _this.hotInstance.columnIndexMapper.insertIndexes(indexMapperColumnCount - 1, data[0].length - indexMapperColumnCount);\n }\n }\n });\n },\n getGlobalRendererVNode: function getGlobalRendererVNode() {\n var hotTableSlots = this.$slots[\"default\"] || [];\n return findVNodeByType(hotTableSlots, 'hot-renderer');\n },\n getGlobalEditorVNode: function getGlobalEditorVNode() {\n var hotTableSlots = this.$slots[\"default\"] || [];\n return findVNodeByType(hotTableSlots, 'hot-editor');\n },\n\n /**\r\n * Get settings for the columns provided in the `hot-column` components.\r\n */\n getColumnSettings: function getColumnSettings() {\n var hotColumns = getHotColumnComponents(this.$children);\n var usesRendererComponent = false;\n var columnSettings = hotColumns.map(function (elem) {\n if (elem.usesRendererComponent) {\n usesRendererComponent = true;\n }\n\n return _objectSpread2({}, elem.columnSettings);\n });\n\n if (usesRendererComponent && this.settings && (this.settings.autoColumnSize !== false || this.settings.autoRowSize) && (this.autoColumnSize !== false || this.autoRowSize)) {\n console.warn('Your `hot-table` configuration includes both `hot-column` and `autoRowSize`/`autoColumnSize`, which are not compatible with each other ' + 'in this version of `@handsontable/vue`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.');\n }\n\n return columnSettings.length ? columnSettings : void 0;\n },\n\n /**\r\n * Create the wrapper function for the provided renderer child component.\r\n *\r\n * @param {Object} vNode VNode of the renderer child component.\r\n * @param {Boolean} containerComponent Instance of the component, which will be treated as a parent for the newly created renderer component.\r\n * @returns {Function} The wrapper function used as the renderer.\r\n */\n getRendererWrapper: function getRendererWrapper(vNode, containerComponent) {\n var $vm = this;\n return function (instance, TD, row, col, prop, value, cellProperties) {\n // Prevent caching and rendering of the GhostTable table cells\n if (TD && !TD.getAttribute('ghost-table')) {\n var rendererCache = $vm.rendererCache;\n var rendererArgs = {\n hotInstance: instance,\n TD: TD,\n row: row,\n col: col,\n prop: prop,\n value: value,\n cellProperties: cellProperties,\n isRenderer: true\n };\n\n if (rendererCache && !rendererCache.has(\"\".concat(row, \"-\").concat(col))) {\n var mountedComponent = createVueComponent(vNode, containerComponent, vNode.componentOptions.propsData, rendererArgs);\n rendererCache.set(\"\".concat(row, \"-\").concat(col), {\n component: mountedComponent,\n lastUsedTD: null\n });\n }\n\n var cachedEntry = rendererCache.get(\"\".concat(row, \"-\").concat(col));\n var cachedComponent = cachedEntry.component;\n var cachedTD = cachedEntry.lastUsedTD;\n Object.assign(cachedComponent.$data, rendererArgs);\n\n if (!cachedComponent.$el.parentElement || cachedTD !== TD) {\n // Clear the previous contents of a TD\n while (TD.firstChild) {\n TD.removeChild(TD.firstChild);\n }\n\n TD.appendChild(cachedComponent.$el);\n cachedEntry.lastUsedTD = TD;\n }\n }\n\n return TD;\n };\n },\n\n /**\r\n * Create a fresh class to be used as an editor, based on the editor component provided.\r\n *\r\n * @param {Object} vNode VNode for the editor child component.\r\n * @param {Boolean} containerComponent Instance of the component, which will be treated as a parent for the newly created editor component.\r\n * @returns {Class} The class used as an editor in Handsontable.\r\n */\n getEditorClass: function getEditorClass(vNode, containerComponent) {\n var componentKey = vNode.key ? vNode.key.toString() : null;\n var componentName = vNode.componentOptions.Ctor.options.name;\n var componentCacheKey = componentKey ? \"\".concat(componentName, \":\").concat(componentKey) : componentName;\n var editorCache = this.editorCache;\n var mountedComponent = null;\n\n if (!editorCache.has(componentCacheKey)) {\n mountedComponent = createVueComponent(vNode, containerComponent, vNode.componentOptions.propsData, {\n isEditor: true\n });\n editorCache.set(componentCacheKey, mountedComponent);\n } else {\n mountedComponent = editorCache.get(componentCacheKey);\n }\n\n return mountedComponent.$data.hotCustomEditorClass;\n }\n },\n mounted: function mounted() {\n this.columnSettings = this.getColumnSettings();\n return this.hotInit();\n },\n beforeDestroy: function beforeDestroy() {\n this.hotInstance.destroy();\n },\n version: version\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier\n/* server only */\n, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\n if (typeof shadowMode !== 'boolean') {\n createInjectorSSR = createInjector;\n createInjector = shadowMode;\n shadowMode = false;\n } // Vue.extend constructor export interop.\n\n\n var options = typeof script === 'function' ? script.options : script; // render functions\n\n if (template && template.render) {\n options.render = template.render;\n options.staticRenderFns = template.staticRenderFns;\n options._compiled = true; // functional template\n\n if (isFunctionalTemplate) {\n options.functional = true;\n }\n } // scopedId\n\n\n if (scopeId) {\n options._scopeId = scopeId;\n }\n\n var hook;\n\n if (moduleIdentifier) {\n // server build\n hook = function hook(context) {\n // 2.3 injection\n context = context || // cached call\n this.$vnode && this.$vnode.ssrContext || // stateful\n this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional\n // 2.2 with runInNewContext: true\n\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__;\n } // inject component styles\n\n\n if (style) {\n style.call(this, createInjectorSSR(context));\n } // register component module identifier for async chunk inference\n\n\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier);\n }\n }; // used by ssr in case component is cached and beforeCreate\n // never gets called\n\n\n options._ssrRegister = hook;\n } else if (style) {\n hook = shadowMode ? function (context) {\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\n } : function (context) {\n style.call(this, createInjector(context));\n };\n }\n\n if (hook) {\n if (options.functional) {\n // register for functional component in vue file\n var originalRender = options.render;\n\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context);\n return originalRender(h, context);\n };\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate;\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\n }\n }\n\n return script;\n}\n/* script */\n\n\nvar __vue_script__ = HotTable;\n/* template */\n\nvar __vue_render__ = function __vue_render__() {\n var _vm = this;\n\n var _h = _vm.$createElement;\n\n var _c = _vm._self._c || _h;\n\n return _c('div', {\n attrs: {\n \"id\": _vm.id\n }\n }, [_vm._t(\"default\")], 2);\n};\n\nvar __vue_staticRenderFns__ = [];\n/* style */\n\nvar __vue_inject_styles__ = undefined;\n/* scoped */\n\nvar __vue_scope_id__ = undefined;\n/* module identifier */\n\nvar __vue_module_identifier__ = undefined;\n/* functional template */\n\nvar __vue_is_functional_template__ = false;\n/* style inject */\n\n/* style inject SSR */\n\n/* style inject shadow dom */\n\nvar __vue_component__ = /*#__PURE__*/normalizeComponent({\n render: __vue_render__,\n staticRenderFns: __vue_staticRenderFns__\n}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);\n\nvar HotColumn = {\n name: 'HotColumn',\n props: propFactory('HotColumn'),\n methods: {\n /**\r\n * Create the column settings based on the data provided to the `hot-column` component and it's child components.\r\n */\n createColumnSettings: function createColumnSettings() {\n var hotColumnSlots = this.$slots[\"default\"] || [];\n var rendererVNode = findVNodeByType(hotColumnSlots, 'hot-renderer');\n var editorVNode = findVNodeByType(hotColumnSlots, 'hot-editor');\n var assignedProps = filterPassedProps(this.$props);\n\n if (rendererVNode && this.usesRendererComponent === void 0) {\n this.usesRendererComponent = true;\n }\n\n this.columnSettings = _objectSpread2({}, assignedProps);\n\n if (rendererVNode !== null) {\n this.columnSettings.renderer = this.$parent.getRendererWrapper(rendererVNode, this);\n } else if (assignedProps.renderer) {\n this.columnSettings.renderer = assignedProps.renderer;\n }\n\n if (editorVNode !== null) {\n this.columnSettings.editor = this.$parent.getEditorClass(editorVNode, this);\n } else if (assignedProps.editor) {\n this.columnSettings.editor = assignedProps.editor;\n }\n }\n },\n mounted: function mounted() {\n this.createColumnSettings();\n },\n render: function render() {\n return null;\n }\n};\n/* script */\n\nvar __vue_script__$1 = HotColumn;\n/* template */\n\n/* style */\n\nvar __vue_inject_styles__$1 = undefined;\n/* scoped */\n\nvar __vue_scope_id__$1 = undefined;\n/* module identifier */\n\nvar __vue_module_identifier__$1 = undefined;\n/* functional template */\n\nvar __vue_is_functional_template__$1 = undefined;\n/* style inject */\n\n/* style inject SSR */\n\n/* style inject shadow dom */\n\nvar __vue_component__$1 = /*#__PURE__*/normalizeComponent({}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\n\n\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if ((typeof Reflect === \"undefined\" ? \"undefined\" : _typeof2(Reflect)) === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nfunction _typeof$1(obj) {\n if (typeof Symbol === \"function\" && _typeof(Symbol.iterator) === \"symbol\") {\n _typeof$1 = function _typeof$1(obj) {\n return _typeof(obj);\n };\n } else {\n _typeof$1 = function _typeof$1(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof(obj);\n };\n }\n\n return _typeof$1(obj);\n}\n\nfunction _defineProperty$1(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n} // The rational behind the verbose Reflect-feature check below is the fact that there are polyfills\n// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.\n// Without this check consumers will encounter hard to track down runtime errors.\n\n\nfunction reflectionIsSupported() {\n return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;\n}\n\nfunction copyReflectionMetadata(to, from) {\n forwardMetadata(to, from);\n Object.getOwnPropertyNames(from.prototype).forEach(function (key) {\n forwardMetadata(to.prototype, from.prototype, key);\n });\n Object.getOwnPropertyNames(from).forEach(function (key) {\n forwardMetadata(to, from, key);\n });\n}\n\nfunction forwardMetadata(to, from, propertyKey) {\n var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);\n metaKeys.forEach(function (metaKey) {\n var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);\n\n if (propertyKey) {\n Reflect.defineMetadata(metaKey, metadata, to, propertyKey);\n } else {\n Reflect.defineMetadata(metaKey, metadata, to);\n }\n });\n}\n\nvar fakeArray = {\n __proto__: []\n};\nvar hasProto = fakeArray instanceof Array;\n\nfunction isPrimitive(value) {\n var type = _typeof$1(value);\n\n return value == null || type !== 'object' && type !== 'function';\n}\n\nfunction collectDataFromConstructor(vm, Component) {\n // override _init to prevent to init as Vue instance\n var originalInit = Component.prototype._init;\n\n Component.prototype._init = function () {\n var _this = this; // proxy to actual vm\n\n\n var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)\n\n if (vm.$options.props) {\n for (var key in vm.$options.props) {\n if (!vm.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n }\n\n keys.forEach(function (key) {\n Object.defineProperty(_this, key, {\n get: function get() {\n return vm[key];\n },\n set: function set(value) {\n vm[key] = value;\n },\n configurable: true\n });\n });\n }; // should be acquired class property values\n\n\n var data = new Component(); // restore original _init to avoid memory leak (#209)\n\n Component.prototype._init = originalInit; // create plain data object\n\n var plainData = {};\n Object.keys(data).forEach(function (key) {\n if (data[key] !== undefined) {\n plainData[key] = data[key];\n }\n });\n return plainData;\n}\n\nvar $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6\n];\n\nfunction componentFactory(Component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options.name = options.name || Component._componentTag || Component.name; // prototype props.\n\n var proto = Component.prototype;\n Object.getOwnPropertyNames(proto).forEach(function (key) {\n if (key === 'constructor') {\n return;\n } // hooks\n\n\n if ($internalHooks.indexOf(key) > -1) {\n options[key] = proto[key];\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(proto, key);\n\n if (descriptor.value !== void 0) {\n // methods\n if (typeof descriptor.value === 'function') {\n (options.methods || (options.methods = {}))[key] = descriptor.value;\n } else {\n // typescript decorated data\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return _defineProperty$1({}, key, descriptor.value);\n }\n });\n }\n } else if (descriptor.get || descriptor.set) {\n // computed properties\n (options.computed || (options.computed = {}))[key] = {\n get: descriptor.get,\n set: descriptor.set\n };\n }\n });\n (options.mixins || (options.mixins = [])).push({\n data: function data() {\n return collectDataFromConstructor(this, Component);\n }\n }); // decorate options\n\n var decorators = Component.__decorators__;\n\n if (decorators) {\n decorators.forEach(function (fn) {\n return fn(options);\n });\n delete Component.__decorators__;\n } // find super\n\n\n var superProto = Object.getPrototypeOf(Component.prototype);\n var Super = superProto instanceof Vue ? superProto.constructor : Vue;\n var Extended = Super.extend(options);\n forwardStaticMembers(Extended, Component, Super);\n\n if (reflectionIsSupported()) {\n copyReflectionMetadata(Extended, Component);\n }\n\n return Extended;\n}\n\nvar shouldIgnore = {\n prototype: true,\n arguments: true,\n callee: true,\n caller: true\n};\n\nfunction forwardStaticMembers(Extended, Original, Super) {\n // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable\n Object.getOwnPropertyNames(Original).forEach(function (key) {\n // Skip the properties that should not be overwritten\n if (shouldIgnore[key]) {\n return;\n } // Some browsers does not allow reconfigure built-in properties\n\n\n var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);\n\n if (extendedDescriptor && !extendedDescriptor.configurable) {\n return;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),\n // the sub class properties may be inherited properties from the super class in TypeScript.\n // We need to exclude such properties to prevent to overwrite\n // the component options object which stored on the extended constructor (See #192).\n // If the value is a referenced value (object or function),\n // we can check equality of them and exclude it if they have the same reference.\n // If it is a primitive value, it will be forwarded for safety.\n\n if (!hasProto) {\n // Only `cid` is explicitly exluded from property forwarding\n // because we cannot detect whether it is a inherited property or not\n // on the no `__proto__` environment even though the property is reserved.\n if (key === 'cid') {\n return;\n }\n\n var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);\n\n if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {\n return;\n }\n } // Warn if the users manually declare reserved properties\n\n\n Object.defineProperty(Extended, key, descriptor);\n });\n}\n\nfunction Component(options) {\n if (typeof options === 'function') {\n return componentFactory(options);\n }\n\n return function (Component) {\n return componentFactory(Component, options);\n };\n}\n\nComponent.registerHooks = function registerHooks(keys) {\n $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));\n};\n\nvar BaseEditorComponent = /*#__PURE__*/function (_Vue) {\n _inherits(BaseEditorComponent, _Vue);\n\n var _super = _createSuper(BaseEditorComponent);\n\n function BaseEditorComponent() {\n var _this2;\n\n _classCallCheck(this, BaseEditorComponent);\n\n _this2 = _super.apply(this, arguments);\n _this2.name = 'BaseEditorComponent';\n _this2.instance = null;\n _this2.row = null;\n _this2.col = null;\n _this2.prop = null;\n _this2.TD = null;\n _this2.originalValue = null;\n _this2.cellProperties = null;\n _this2.state = null;\n _this2.hot = null;\n return _this2;\n }\n\n _createClass(BaseEditorComponent, [{\n key: \"mounted\",\n value: function mounted() {\n var _this = this;\n\n this.$data.hotCustomEditorClass = function () {\n var customEditorClass = /*#__PURE__*/function (_Handsontable$editors) {\n _inherits(CustomEditor, _Handsontable$editors);\n\n var _super2 = _createSuper(CustomEditor);\n\n function CustomEditor(hotInstance, row, col, prop, TD, cellProperties) {\n var _this3;\n\n _classCallCheck(this, CustomEditor);\n\n _this3 = _super2.call(this, hotInstance, row, col, prop, TD, cellProperties);\n _this.$data.hotCustomEditorInstance = _assertThisInitialized(_this3);\n return _this3;\n }\n\n _createClass(CustomEditor, [{\n key: \"focus\",\n value: function focus() {}\n }, {\n key: \"getValue\",\n value: function getValue() {}\n }, {\n key: \"setValue\",\n value: function setValue() {}\n }, {\n key: \"open\",\n value: function open() {}\n }, {\n key: \"close\",\n value: function close() {}\n }]);\n\n return CustomEditor;\n }(Handsontable.editors.BaseEditor); // Fill with the rest of the BaseEditorComponent methods\n\n\n Object.getOwnPropertyNames(Handsontable.editors.BaseEditor.prototype).forEach(function (propName) {\n if (propName === 'constructor') {\n return;\n }\n\n customEditorClass.prototype[propName] = function () {\n var _this$propName;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_this$propName = _this[propName]).call.apply(_this$propName, [this].concat(args));\n };\n });\n return customEditorClass;\n }();\n } // BaseEditorComponent methods:\n\n }, {\n key: \"_fireCallbacks\",\n value: function _fireCallbacks() {\n var _Handsontable$editors2;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n (_Handsontable$editors2 = Handsontable.editors.BaseEditor.prototype._fireCallbacks).call.apply(_Handsontable$editors2, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"beginEditing\",\n value: function beginEditing() {\n var _Handsontable$editors3;\n\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return (_Handsontable$editors3 = Handsontable.editors.BaseEditor.prototype.beginEditing).call.apply(_Handsontable$editors3, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"cancelChanges\",\n value: function cancelChanges() {\n var _Handsontable$editors4;\n\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return (_Handsontable$editors4 = Handsontable.editors.BaseEditor.prototype.cancelChanges).call.apply(_Handsontable$editors4, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"checkEditorSection\",\n value: function checkEditorSection() {\n var _Handsontable$editors5;\n\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n return (_Handsontable$editors5 = Handsontable.editors.BaseEditor.prototype.checkEditorSection).call.apply(_Handsontable$editors5, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"close\",\n value: function close() {\n var _Handsontable$editors6;\n\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n return (_Handsontable$editors6 = Handsontable.editors.BaseEditor.prototype.close).call.apply(_Handsontable$editors6, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"discardEditor\",\n value: function discardEditor() {\n var _Handsontable$editors7;\n\n for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n args[_key7] = arguments[_key7];\n }\n\n return (_Handsontable$editors7 = Handsontable.editors.BaseEditor.prototype.discardEditor).call.apply(_Handsontable$editors7, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"enableFullEditMode\",\n value: function enableFullEditMode() {\n var _Handsontable$editors8;\n\n for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n args[_key8] = arguments[_key8];\n }\n\n return (_Handsontable$editors8 = Handsontable.editors.BaseEditor.prototype.enableFullEditMode).call.apply(_Handsontable$editors8, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"extend\",\n value: function extend() {\n var _Handsontable$editors9;\n\n for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n args[_key9] = arguments[_key9];\n }\n\n return (_Handsontable$editors9 = Handsontable.editors.BaseEditor.prototype.extend).call.apply(_Handsontable$editors9, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"finishEditing\",\n value: function finishEditing() {\n var _Handsontable$editors10;\n\n for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {\n args[_key10] = arguments[_key10];\n }\n\n return (_Handsontable$editors10 = Handsontable.editors.BaseEditor.prototype.finishEditing).call.apply(_Handsontable$editors10, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"focus\",\n value: function focus() {\n var _Handsontable$editors11;\n\n for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {\n args[_key11] = arguments[_key11];\n }\n\n return (_Handsontable$editors11 = Handsontable.editors.BaseEditor.prototype.focus).call.apply(_Handsontable$editors11, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n var _Handsontable$editors12;\n\n for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {\n args[_key12] = arguments[_key12];\n }\n\n return (_Handsontable$editors12 = Handsontable.editors.BaseEditor.prototype.getValue).call.apply(_Handsontable$editors12, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"init\",\n value: function init() {\n var _Handsontable$editors13;\n\n for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {\n args[_key13] = arguments[_key13];\n }\n\n return (_Handsontable$editors13 = Handsontable.editors.BaseEditor.prototype.init).call.apply(_Handsontable$editors13, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"isInFullEditMode\",\n value: function isInFullEditMode() {\n var _Handsontable$editors14;\n\n for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {\n args[_key14] = arguments[_key14];\n }\n\n return (_Handsontable$editors14 = Handsontable.editors.BaseEditor.prototype.isInFullEditMode).call.apply(_Handsontable$editors14, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"isOpened\",\n value: function isOpened() {\n var _Handsontable$editors15;\n\n for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {\n args[_key15] = arguments[_key15];\n }\n\n return (_Handsontable$editors15 = Handsontable.editors.BaseEditor.prototype.isOpened).call.apply(_Handsontable$editors15, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"isWaiting\",\n value: function isWaiting() {\n var _Handsontable$editors16;\n\n for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {\n args[_key16] = arguments[_key16];\n }\n\n return (_Handsontable$editors16 = Handsontable.editors.BaseEditor.prototype.isWaiting).call.apply(_Handsontable$editors16, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"open\",\n value: function open() {\n var _Handsontable$editors17;\n\n for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {\n args[_key17] = arguments[_key17];\n }\n\n return (_Handsontable$editors17 = Handsontable.editors.BaseEditor.prototype.open).call.apply(_Handsontable$editors17, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"prepare\",\n value: function prepare(row, col, prop, TD, originalValue, cellProperties) {\n this.$data.hotInstance = cellProperties.instance;\n this.$data.row = row;\n this.$data.col = col;\n this.$data.prop = prop;\n this.$data.TD = TD;\n this.$data.originalValue = originalValue;\n this.$data.cellProperties = cellProperties;\n return Handsontable.editors.BaseEditor.prototype.prepare.call(this.$data.hotCustomEditorInstance, row, col, prop, TD, originalValue, cellProperties);\n }\n }, {\n key: \"saveValue\",\n value: function saveValue() {\n var _Handsontable$editors18;\n\n for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {\n args[_key18] = arguments[_key18];\n }\n\n return (_Handsontable$editors18 = Handsontable.editors.BaseEditor.prototype.saveValue).call.apply(_Handsontable$editors18, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"setValue\",\n value: function setValue() {\n var _Handsontable$editors19;\n\n for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {\n args[_key19] = arguments[_key19];\n }\n\n return (_Handsontable$editors19 = Handsontable.editors.BaseEditor.prototype.setValue).call.apply(_Handsontable$editors19, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"addHook\",\n value: function addHook() {\n var _Handsontable$editors20;\n\n for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {\n args[_key20] = arguments[_key20];\n }\n\n return (_Handsontable$editors20 = Handsontable.editors.BaseEditor.prototype.addHook).call.apply(_Handsontable$editors20, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"removeHooksByKey\",\n value: function removeHooksByKey() {\n var _Handsontable$editors21;\n\n for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {\n args[_key21] = arguments[_key21];\n }\n\n return (_Handsontable$editors21 = Handsontable.editors.BaseEditor.prototype.removeHooksByKey).call.apply(_Handsontable$editors21, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"clearHooks\",\n value: function clearHooks() {\n var _Handsontable$editors22;\n\n for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {\n args[_key22] = arguments[_key22];\n }\n\n return (_Handsontable$editors22 = Handsontable.editors.BaseEditor.prototype.clearHooks).call.apply(_Handsontable$editors22, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"getEditedCell\",\n value: function getEditedCell() {\n var _Handsontable$editors23;\n\n for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {\n args[_key23] = arguments[_key23];\n }\n\n return (_Handsontable$editors23 = Handsontable.editors.BaseEditor.prototype.getEditedCell).call.apply(_Handsontable$editors23, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"getEditedCellsZIndex\",\n value: function getEditedCellsZIndex() {\n var _Handsontable$editors24;\n\n for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {\n args[_key24] = arguments[_key24];\n }\n\n return (_Handsontable$editors24 = Handsontable.editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(_Handsontable$editors24, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }, {\n key: \"getEditedCellsLayerClass\",\n value: function getEditedCellsLayerClass() {\n var _Handsontable$editors25;\n\n for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) {\n args[_key25] = arguments[_key25];\n }\n\n return (_Handsontable$editors25 = Handsontable.editors.BaseEditor.prototype.getEditedCellsLayerClass).call.apply(_Handsontable$editors25, [this.$data.hotCustomEditorInstance].concat(args));\n }\n }]);\n\n return BaseEditorComponent;\n}(Vue);\n\nBaseEditorComponent = __decorate([Component({})], BaseEditorComponent);\nvar script = BaseEditorComponent;\n/* script */\n\nvar __vue_script__$2 = script;\n/* template */\n\n/* style */\n\nvar __vue_inject_styles__$2 = undefined;\n/* scoped */\n\nvar __vue_scope_id__$2 = undefined;\n/* module identifier */\n\nvar __vue_module_identifier__$2 = undefined;\n/* functional template */\n\nvar __vue_is_functional_template__$2 = undefined;\n/* style inject */\n\n/* style inject SSR */\n\n/* style inject shadow dom */\n\nvar __vue_component__$2 = /*#__PURE__*/normalizeComponent({}, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, undefined, undefined, undefined);\n\nexport default __vue_component__;\nexport { __vue_component__$2 as BaseEditorComponent, __vue_component__$1 as HotColumn, __vue_component__ as HotTable };","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"row\"},[_c('h3',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'header'),expression:\"field.field_type == 'header'\"}]},[_c('strong',[_vm._v(_vm._s(_vm.field.label || 'Untitled'))])]),_vm._v(\" \"),_c('h5',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'subheader'),expression:\"field.field_type == 'subheader'\"}]},[_vm._v(_vm._s(_vm.field.label || 'Untitled'))]),_vm._v(\" \"),_c('p',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'description'),expression:\"field.field_type == 'description'\"}]},[_c('strong',[_vm._v(_vm._s(_vm.field.label || 'Untitled'))])]),_vm._v(\" \"),_c('p',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'paragraph'),expression:\"field.field_type == 'paragraph'\"}]},[_vm._v(_vm._s(_vm.field.label || 'Untitled'))]),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'number_box'),expression:\"field.field_type == 'number_box'\"}]},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":_vm.field.label || 'Untitled',\"type\":\"number\",\"placeholder\":\"Enter number here\",\"required\":_vm.field.required,\"disabled\":!_vm.canEdit,\"errors\":_vm.answer.errors.input},model:{value:(_vm.answer.input),callback:function ($$v) {_vm.$set(_vm.answer, \"input\", $$v)},expression:\"answer.input\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'text_box'),expression:\"field.field_type == 'text_box'\"}]},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":_vm.field.label || 'Untitled',\"type\":\"text\",\"placeholder\":\"Enter text here\",\"required\":_vm.field.required,\"disabled\":!_vm.canEdit,\"errors\":_vm.answer.errors.input},model:{value:(_vm.answer.input),callback:function ($$v) {_vm.$set(_vm.answer, \"input\", $$v)},expression:\"answer.input\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'text_area'),expression:\"field.field_type == 'text_area'\"}]},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":_vm.field.label || 'Untitled',\"type\":\"textarea\",\"placeholder\":\"Enter text here\",\"required\":_vm.field.required,\"disabled\":!_vm.canEdit,\"errors\":_vm.answer.errors.input},model:{value:(_vm.answer.input),callback:function ($$v) {_vm.$set(_vm.answer, \"input\", $$v)},expression:\"answer.input\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'date'),expression:\"field.field_type == 'date'\"}]},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":_vm.field.label || 'Untitled',\"type\":\"date\",\"placeholder\":\"Select a date\",\"required\":_vm.field.required,\"disabled\":!_vm.canEdit,\"errors\":_vm.answer.errors.input},model:{value:(_vm.answer.input),callback:function ($$v) {_vm.$set(_vm.answer, \"input\", $$v)},expression:\"answer.input\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'radio'),expression:\"field.field_type == 'radio'\"}]},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":_vm.field.label || 'Untitled',\"disabled\":!_vm.canEdit,\"errors\":_vm.answer.errors.input}},[_c('materialize-checkboxes',{attrs:{\"options\":_vm.field.options,\"isHorizontal\":true,\"disabled\":!_vm.canEdit},model:{value:(_vm.answer.input),callback:function ($$v) {_vm.$set(_vm.answer, \"input\", $$v)},expression:\"answer.input\"}})],1),_vm._v(\" \"),_c('materialize-input',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showSpecifyField && _vm.field.enable_specify_input),expression:\"showSpecifyField && field.enable_specify_input\"}],staticClass:\"col l12\",attrs:{\"label\":\"Please specify\",\"type\":\"text\",\"placeholder\":\"Enter text here\",\"required\":_vm.field.specify_input_required,\"disabled\":!_vm.canEdit,\"errors\":_vm.answer.errors.others_input},model:{value:(_vm.answer.others_input),callback:function ($$v) {_vm.$set(_vm.answer, \"others_input\", $$v)},expression:\"answer.others_input\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'checkbox'),expression:\"field.field_type == 'checkbox'\"}]},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":_vm.field.label || 'Untitled',\"type\":\"checkbox\",\"required\":_vm.field.required,\"disabled\":!_vm.canEdit,\"errors\":_vm.answer.errors.input},model:{value:(_vm.answer.input),callback:function ($$v) {_vm.$set(_vm.answer, \"input\", $$v)},expression:\"answer.input\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'select'),expression:\"field.field_type == 'select'\"}]},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":_vm.field.label || 'Untitled',\"type\":\"select\",\"options\":_vm.field.options,\"required\":_vm.field.required,\"disabled\":!_vm.canEdit,\"placeholder\":\"Select an option\",\"errors\":_vm.answer.errors.input},model:{value:(_vm.answer.input),callback:function ($$v) {_vm.$set(_vm.answer, \"input\", $$v)},expression:\"answer.input\"}}),_vm._v(\" \"),_vm._l((_vm.field.options),function(option){return (!_vm.canEdit)?_c('div',[_c('p',[_vm._v(\"⎿ \"+_vm._s(option.text || 'Untitled'))])]):_vm._e()}),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('materialize-input',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showSpecifyField && _vm.field.enable_specify_input),expression:\"showSpecifyField && field.enable_specify_input\"}],staticClass:\"col l12\",attrs:{\"label\":\"Please specify\",\"type\":\"text\",\"placeholder\":\"Enter text here\",\"required\":_vm.field.specify_input_required,\"disabled\":!_vm.canEdit,\"errors\":_vm.answer.errors.others_input},model:{value:(_vm.answer.others_input),callback:function ($$v) {_vm.$set(_vm.answer, \"others_input\", $$v)},expression:\"answer.others_input\"}})],2),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'file'),expression:\"field.field_type == 'file'\"}],staticClass:\"col l12\"},[_c('h5',[_vm._v(_vm._s(_vm.field.label || 'Untitled'))]),_vm._v(\" \"),(!_vm.canEdit)?_c('materialize-input',{attrs:{\"label\":\"Select File\",\"placeholder\":\".pdf, .docx, .xlsx, .pptx, .txt, .jpg, .png\",\"type\":\"file\",\"disabled\":!_vm.canEdit}}):(_vm.field.field_type == 'file' && _vm.canEdit)?_c('materialize-input',{attrs:{\"fileName\":_vm.answer.document.file_file_name,\"fileDelete\":_vm.answer.document.file_delete,\"label\":\"Select File\",\"placeholder\":\".pdf, .docx, .xlsx, .pptx, .txt, .jpg, .png\",\"type\":\"file\",\"errors\":_vm.answer.document.errors.file,\"disabled\":!_vm.canEdit},on:{\"update:fileName\":function($event){return _vm.$set(_vm.answer.document, \"file_file_name\", $event)},\"update:file-name\":function($event){return _vm.$set(_vm.answer.document, \"file_file_name\", $event)},\"update:fileDelete\":function($event){return _vm.$set(_vm.answer.document, \"file_delete\", $event)},\"update:file-delete\":function($event){return _vm.$set(_vm.answer.document, \"file_delete\", $event)}},model:{value:(_vm.answer.document.file),callback:function ($$v) {_vm.$set(_vm.answer.document, \"file\", $$v)},expression:\"answer.document.file\"}}):_vm._e(),_vm._v(\" \"),(_vm.field.required)?_c('p',{staticClass:\"col s12 instruction\"},[_vm._m(0)]):_vm._e()],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'divider'),expression:\"field.field_type == 'divider'\"}]},[_c('hr'),_vm._v(\" \"),_c('br')])]),_vm._v(\" \"),(_vm.invalidLabel)?_c('p',{staticStyle:{\"color\":\"red\"}},[_vm._v(\"Invalid Label (Click here to open settings)\")]):_vm._e(),_vm._v(\" \"),(_vm.invalidOptions)?_c('p',{staticStyle:{\"color\":\"red\"}},[_vm._v(\"Invalid Option/s (Click here to open settings)\")]):_vm._e(),_vm._v(\" \"),(_vm.field.index == _vm.selectedIndex && _vm.field.field_type != 'divider')?_c('div',{staticClass:\"setting\"},[_c('div',{staticClass:\"row\"},[_c('a',{staticClass:\"right\",on:{\"click\":function($event){return _vm.closeSetting()}}},[_c('i',{staticClass:\"left\"},[_vm._v(\"Close Setting [ X ]\")])]),_vm._v(\" \"),_c('h5',[_c('u',[_vm._v(_vm._s(_vm.fieldTypeName)+\" Settings\")])]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Type\",\"type\":\"select\",\"options\":_vm.fieldTypeList,\"errors\":_vm.field.errors.field_type},model:{value:(_vm.field.field_type),callback:function ($$v) {_vm.$set(_vm.field, \"field_type\", $$v)},expression:\"field.field_type\"}}),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'header'),expression:\"field.field_type == 'header'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the header\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"errors\":_vm.field.errors.label,\"required\":true},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'subheader'),expression:\"field.field_type == 'subheader'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the subheader\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'paragraph'),expression:\"field.field_type == 'paragraph'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the paragraph\",\"placeholder\":\"Enter your text here\",\"type\":\"textarea\",\"newline\":\"\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'description'),expression:\"field.field_type == 'description'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the description\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'number_box'),expression:\"field.field_type == 'number_box'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the label for the number box\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Required?\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.required),callback:function ($$v) {_vm.$set(_vm.field, \"required\", $$v)},expression:\"field.required\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'text_box'),expression:\"field.field_type == 'text_box'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the label for the text box\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Required?\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.required),callback:function ($$v) {_vm.$set(_vm.field, \"required\", $$v)},expression:\"field.required\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'text_area'),expression:\"field.field_type == 'text_area'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the label for the text area\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Required?\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.required),callback:function ($$v) {_vm.$set(_vm.field, \"required\", $$v)},expression:\"field.required\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'date'),expression:\"field.field_type == 'date'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the label for the date field\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Required?\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.required),callback:function ($$v) {_vm.$set(_vm.field, \"required\", $$v)},expression:\"field.required\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'radio'),expression:\"field.field_type == 'radio'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the label for the radio button\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}}),_vm._v(\" \"),_c('div',{staticClass:\"col l8\"},[_vm._l((_vm.field.options),function(option,index){return (option.text != 'Others')?_c('div',[_c('materialize-input',{staticClass:\"col l11\",attrs:{\"label\":'Option ' + (index + 1),\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.validOptionLabel(_vm.field.options[index].text)},model:{value:(_vm.field.options[index].text),callback:function ($$v) {_vm.$set(_vm.field.options[index], \"text\", $$v)},expression:\"field.options[index].text\"}}),_vm._v(\" \"),(index > 1)?_c('div',{staticClass:\"remove col l1\"},[_c('a',{staticClass:\"btn btn-flat transparent materialize-red-text darken-2-text\",on:{\"click\":function($event){return _vm.deleteOption(index)}}},[_vm._v(\"X\")])]):_vm._e(),_vm._v(\" \"),_c('br'),_c('br')],1):_vm._e()}),_vm._v(\" \"),_c('br'),_c('br'),_vm._v(\" \"),_c('div',{staticClass:\"col l12\"},[_c('button',{staticClass:\"small-btn payboy-orange\",on:{\"click\":function($event){$event.preventDefault();return _vm.addOption($event)}}},[_vm._v(\"\\n Add new option\\n \")])])],2),_vm._v(\" \"),_c('div',{staticClass:\"col l4\"},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":\"Allow 'Others' option\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.enable_others_option),callback:function ($$v) {_vm.$set(_vm.field, \"enable_others_option\", $$v)},expression:\"field.enable_others_option\"}}),_vm._v(\" \"),(_vm.field.enable_others_option)?_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":\"Enable 'Please Specify' input\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.enable_specify_input),callback:function ($$v) {_vm.$set(_vm.field, \"enable_specify_input\", $$v)},expression:\"field.enable_specify_input\"}}):_vm._e(),_vm._v(\" \"),(_vm.field.enable_specify_input)?_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":\"'Please Specify' input is required\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.specify_input_required),callback:function ($$v) {_vm.$set(_vm.field, \"specify_input_required\", $$v)},expression:\"field.specify_input_required\"}}):_vm._e()],1),_vm._v(\" \"),_c('br')],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'checkbox'),expression:\"field.field_type == 'checkbox'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the label for the checkbox\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Required?\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.required),callback:function ($$v) {_vm.$set(_vm.field, \"required\", $$v)},expression:\"field.required\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'select'),expression:\"field.field_type == 'select'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the label for the select box\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}}),_vm._v(\" \"),_c('div',{staticClass:\"col l8\"},[_vm._l((_vm.field.options),function(option,index){return (option.text != 'Others')?_c('div',[_c('materialize-input',{staticClass:\"col l11\",attrs:{\"label\":'Option ' + (index + 1),\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.validOptionLabel(_vm.field.options[index].text)},model:{value:(_vm.field.options[index].text),callback:function ($$v) {_vm.$set(_vm.field.options[index], \"text\", $$v)},expression:\"field.options[index].text\"}}),_vm._v(\" \"),(index > 1)?_c('div',{staticClass:\"remove col l1\"},[_c('a',{staticClass:\"btn btn-flat transparent materialize-red-text darken-2-text\",on:{\"click\":function($event){return _vm.deleteOption(index)}}},[_vm._v(\"X\")])]):_vm._e(),_vm._v(\" \"),_c('br')],1):_vm._e()}),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('div',{staticClass:\"col l12\"},[_c('button',{staticClass:\"small-btn payboy-orange\",on:{\"click\":function($event){$event.preventDefault();return _vm.addOption($event)}}},[_vm._v(\"\\n Add new option\\n \")])])],2),_vm._v(\" \"),_c('div',{staticClass:\"col l4\"},[_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":\"Allow 'Others' option\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.enable_others_option),callback:function ($$v) {_vm.$set(_vm.field, \"enable_others_option\", $$v)},expression:\"field.enable_others_option\"}}),_vm._v(\" \"),(_vm.field.enable_others_option)?_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":\"Enable 'Please Specify' input\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.enable_specify_input),callback:function ($$v) {_vm.$set(_vm.field, \"enable_specify_input\", $$v)},expression:\"field.enable_specify_input\"}}):_vm._e(),_vm._v(\" \"),(_vm.field.enable_specify_input)?_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":\"'Please Specify' input is required\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.specify_input_required),callback:function ($$v) {_vm.$set(_vm.field, \"specify_input_required\", $$v)},expression:\"field.specify_input_required\"}}):_vm._e()],1),_vm._v(\" \"),_c('br'),_c('br'),_vm._v(\" \"),_c('materialize-input',{staticClass:\"col l12\",attrs:{\"label\":\"Required?\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.required),callback:function ($$v) {_vm.$set(_vm.field, \"required\", $$v)},expression:\"field.required\"}})],1),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.field.field_type == 'file'),expression:\"field.field_type == 'file'\"}]},[_c('materialize-input',{attrs:{\"label\":\"Key in the label for the file upload\",\"type\":\"text\",\"placeholder\":\"Enter your text here\",\"required\":true,\"errors\":_vm.field.errors.label},model:{value:(_vm.field.label),callback:function ($$v) {_vm.$set(_vm.field, \"label\", $$v)},expression:\"field.label\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Required?\",\"type\":\"checkbox\",\"required\":true},model:{value:(_vm.field.required),callback:function ($$v) {_vm.$set(_vm.field, \"required\", $$v)},expression:\"field.required\"}})],1)],1)]):_vm._e()])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('small',[_c('abbr',[_vm._v(\"*\")]),_vm._v(\" Required fields\")])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./form_field.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./form_field.vue?vue&type=script&lang=js&\"","\n \n
\n \n
\n {{ field.label || 'Untitled' }} \n \n\n \n
{{ field.label || 'Untitled' }} \n\n \n
\n {{ field.label || 'Untitled' }} \n
\n\n \n
{{ field.label || 'Untitled' }}
\n \n
\n \n
\n\n \n
\n \n
\n\n \n
\n \n
\n\n \n
\n \n
\n\n \n
\n \n \n \n\n \n
\n\n \n
\n \n
\n\n \n
\n
\n
\n
⎿ {{ option.text || 'Untitled' }}
\n
\n
\n
\n
\n\n \n
\n
{{ field.label || 'Untitled' }} \n
\n
\n
\n * Required fields \n
\n
\n\n \n
\n
\n \n \n
\n\n
Invalid Label (Click here to open settings)
\n
Invalid Option/s (Click here to open settings)
\n\n
\n
\n
\n Close Setting [ X ] \n \n
\n {{ fieldTypeName }} Settings \n \n
\n
\n
\n \n
\n \n
\n\n \n
\n \n
\n\n \n
\n \n
\n\n \n
\n \n
\n\n \n
\n \n \n
\n\n \n
\n \n \n
\n\n \n
\n \n \n
\n\n \n
\n \n \n
\n\n \n
\n
\n
\n
\n
\n
\n \n Add new option\n \n
\n
\n
\n \n \n \n
\n
\n
\n\n \n
\n \n \n
\n\n \n
\n
\n
\n
\n
\n
\n \n Add new option\n \n
\n
\n
\n \n \n \n
\n
\n
\n
\n\n \n
\n \n \n
\n
\n
\n
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./form_field.vue?vue&type=template&id=62db45fb&\"\nimport script from \"./form_field.vue?vue&type=script&lang=js&\"\nexport * from \"./form_field.vue?vue&type=script&lang=js&\"\nimport style0 from \"./form_field.vue?vue&type=style&index=0&scooped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import { isString } from \"./is\";\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\n\nexport function htmlTreeAsString(elem, keyAttr) {\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var MAX_OUTPUT_LEN = 80;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr = void 0; // eslint-disable-next-line no-plusplus\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttr); // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n\n if (nextStr === 'html' || height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN) {\n break;\n }\n\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\n\nfunction _htmlElementAsString(el, keyAttr) {\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n var keyAttrValue = keyAttr ? elem.getAttribute(keyAttr) : null;\n\n if (keyAttrValue) {\n out.push(\"[\" + keyAttr + \"=\\\"\" + keyAttrValue + \"\\\"]\");\n } else {\n if (elem.id) {\n out.push(\"#\" + elem.id);\n } // eslint-disable-next-line prefer-const\n\n\n className = elem.className;\n\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n\n for (i = 0; i < classes.length; i++) {\n out.push(\".\" + classes[i]);\n }\n }\n }\n\n var allowedAttrs = ['type', 'name', 'title', 'alt'];\n\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n\n if (attr) {\n out.push(\"[\" + key + \"=\\\"\" + attr + \"\\\"]\");\n }\n }\n\n return out.join('');\n}","var categories = [require(\"./lib/compatibility\"), require(\"./lib/database\"), require(\"./lib/engineering\"), require(\"./lib/logical\"), require(\"./lib/math-trig\"), require(\"./lib/text\"), require(\"./lib/date-time\"), require(\"./lib/financial\"), require(\"./lib/information\"), require(\"./lib/lookup-reference\"), require(\"./lib/statistical\"), require(\"./lib/miscellaneous\")];\n\nfor (var c in categories) {\n var category = categories[c];\n\n for (var f in category) {\n exports[f] = exports[f] || category[f];\n }\n}","var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.es/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.es/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","var utils = require(\"./utils/common\");\n\nvar error = require(\"./utils/error\");\n\nvar statistical = require(\"./statistical\");\n\nvar information = require(\"./information\");\n\nvar evalExpression = require(\"./utils/criteria-eval\");\n\nexports.ABS = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var result = Math.abs(number);\n return result;\n};\n\nexports.ACOS = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var result = Math.acos(number);\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.ACOSH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var result = Math.log(number + Math.sqrt(number * number - 1));\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.ACOT = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var result = Math.atan(1 / number);\n return result;\n};\n\nexports.ACOTH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var result = 0.5 * Math.log((number + 1) / (number - 1));\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n}; //TODO: use options\n\n\nexports.AGGREGATE = function (function_num, options, ref1, ref2) {\n function_num = utils.parseNumber(function_num);\n options = utils.parseNumber(function_num);\n\n if (utils.anyIsError(function_num, options)) {\n return error.value;\n }\n\n switch (function_num) {\n case 1:\n return statistical.AVERAGE(ref1);\n\n case 2:\n return statistical.COUNT(ref1);\n\n case 3:\n return statistical.COUNTA(ref1);\n\n case 4:\n return statistical.MAX(ref1);\n\n case 5:\n return statistical.MIN(ref1);\n\n case 6:\n return exports.PRODUCT(ref1);\n\n case 7:\n return statistical.STDEV.S(ref1);\n\n case 8:\n return statistical.STDEV.P(ref1);\n\n case 9:\n return exports.SUM(ref1);\n\n case 10:\n return statistical.VAR.S(ref1);\n\n case 11:\n return statistical.VAR.P(ref1);\n\n case 12:\n return statistical.MEDIAN(ref1);\n\n case 13:\n return statistical.MODE.SNGL(ref1);\n\n case 14:\n return statistical.LARGE(ref1, ref2);\n\n case 15:\n return statistical.SMALL(ref1, ref2);\n\n case 16:\n return statistical.PERCENTILE.INC(ref1, ref2);\n\n case 17:\n return statistical.QUARTILE.INC(ref1, ref2);\n\n case 18:\n return statistical.PERCENTILE.EXC(ref1, ref2);\n\n case 19:\n return statistical.QUARTILE.EXC(ref1, ref2);\n }\n};\n\nexports.ARABIC = function (text) {\n // Credits: Rafa? Kukawski\n if (!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(text)) {\n return error.value;\n }\n\n var r = 0;\n text.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g, function (i) {\n r += {\n M: 1000,\n CM: 900,\n D: 500,\n CD: 400,\n C: 100,\n XC: 90,\n L: 50,\n XL: 40,\n X: 10,\n IX: 9,\n V: 5,\n IV: 4,\n I: 1\n }[i];\n });\n return r;\n};\n\nexports.ASIN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var result = Math.asin(number);\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.ASINH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.log(number + Math.sqrt(number * number + 1));\n};\n\nexports.ATAN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.atan(number);\n};\n\nexports.ATAN2 = function (number_x, number_y) {\n number_x = utils.parseNumber(number_x);\n number_y = utils.parseNumber(number_y);\n\n if (utils.anyIsError(number_x, number_y)) {\n return error.value;\n }\n\n return Math.atan2(number_x, number_y);\n};\n\nexports.ATANH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var result = Math.log((1 + number) / (1 - number)) / 2;\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.BASE = function (number, radix, min_length) {\n min_length = min_length || 0;\n number = utils.parseNumber(number);\n radix = utils.parseNumber(radix);\n min_length = utils.parseNumber(min_length);\n\n if (utils.anyIsError(number, radix, min_length)) {\n return error.value;\n }\n\n min_length = min_length === undefined ? 0 : min_length;\n var result = number.toString(radix);\n return new Array(Math.max(min_length + 1 - result.length, 0)).join('0') + result;\n};\n\nexports.CEILING = function (number, significance, mode) {\n significance = significance === undefined ? 1 : Math.abs(significance);\n mode = mode || 0;\n number = utils.parseNumber(number);\n significance = utils.parseNumber(significance);\n mode = utils.parseNumber(mode);\n\n if (utils.anyIsError(number, significance, mode)) {\n return error.value;\n }\n\n if (significance === 0) {\n return 0;\n }\n\n var precision = -Math.floor(Math.log(significance) / Math.log(10));\n\n if (number >= 0) {\n return exports.ROUND(Math.ceil(number / significance) * significance, precision);\n } else {\n if (mode === 0) {\n return -exports.ROUND(Math.floor(Math.abs(number) / significance) * significance, precision);\n } else {\n return -exports.ROUND(Math.ceil(Math.abs(number) / significance) * significance, precision);\n }\n }\n};\n\nexports.CEILING.MATH = exports.CEILING;\nexports.CEILING.PRECISE = exports.CEILING;\n\nexports.COMBIN = function (number, number_chosen) {\n number = utils.parseNumber(number);\n number_chosen = utils.parseNumber(number_chosen);\n\n if (utils.anyIsError(number, number_chosen)) {\n return error.value;\n }\n\n return exports.FACT(number) / (exports.FACT(number_chosen) * exports.FACT(number - number_chosen));\n};\n\nexports.COMBINA = function (number, number_chosen) {\n number = utils.parseNumber(number);\n number_chosen = utils.parseNumber(number_chosen);\n\n if (utils.anyIsError(number, number_chosen)) {\n return error.value;\n }\n\n return number === 0 && number_chosen === 0 ? 1 : exports.COMBIN(number + number_chosen - 1, number - 1);\n};\n\nexports.COS = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.cos(number);\n};\n\nexports.COSH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return (Math.exp(number) + Math.exp(-number)) / 2;\n};\n\nexports.COT = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return 1 / Math.tan(number);\n};\n\nexports.COTH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var e2 = Math.exp(2 * number);\n return (e2 + 1) / (e2 - 1);\n};\n\nexports.CSC = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return 1 / Math.sin(number);\n};\n\nexports.CSCH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return 2 / (Math.exp(number) - Math.exp(-number));\n};\n\nexports.DECIMAL = function (number, radix) {\n if (arguments.length < 1) {\n return error.value;\n }\n\n return parseInt(number, radix);\n};\n\nexports.DEGREES = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return number * 180 / Math.PI;\n};\n\nexports.EVEN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return exports.CEILING(number, -2, -1);\n};\n\nexports.EXP = function (number) {\n if (arguments.length < 1) {\n return error.na;\n }\n\n if (typeof number !== 'number' || arguments.length > 1) {\n return error.error;\n }\n\n number = Math.exp(number);\n return number;\n};\n\nvar MEMOIZED_FACT = [];\n\nexports.FACT = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var n = Math.floor(number);\n\n if (n === 0 || n === 1) {\n return 1;\n } else if (MEMOIZED_FACT[n] > 0) {\n return MEMOIZED_FACT[n];\n } else {\n MEMOIZED_FACT[n] = exports.FACT(n - 1) * n;\n return MEMOIZED_FACT[n];\n }\n};\n\nexports.FACTDOUBLE = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var n = Math.floor(number);\n\n if (n <= 0) {\n return 1;\n } else {\n return n * exports.FACTDOUBLE(n - 2);\n }\n};\n\nexports.FLOOR = function (number, significance) {\n number = utils.parseNumber(number);\n significance = utils.parseNumber(significance);\n\n if (utils.anyIsError(number, significance)) {\n return error.value;\n }\n\n if (significance === 0) {\n return 0;\n }\n\n if (!(number > 0 && significance > 0) && !(number < 0 && significance < 0)) {\n return error.num;\n }\n\n significance = Math.abs(significance);\n var precision = -Math.floor(Math.log(significance) / Math.log(10));\n\n if (number >= 0) {\n return exports.ROUND(Math.floor(number / significance) * significance, precision);\n } else {\n return -exports.ROUND(Math.ceil(Math.abs(number) / significance), precision);\n }\n}; //TODO: Verify\n\n\nexports.FLOOR.MATH = function (number, significance, mode) {\n significance = significance === undefined ? 1 : significance;\n mode = mode === undefined ? 0 : mode;\n number = utils.parseNumber(number);\n significance = utils.parseNumber(significance);\n mode = utils.parseNumber(mode);\n\n if (utils.anyIsError(number, significance, mode)) {\n return error.value;\n }\n\n if (significance === 0) {\n return 0;\n }\n\n significance = significance ? Math.abs(significance) : 1;\n var precision = -Math.floor(Math.log(significance) / Math.log(10));\n\n if (number >= 0) {\n return exports.ROUND(Math.floor(number / significance) * significance, precision);\n } else if (mode === 0 || mode === undefined) {\n return -exports.ROUND(Math.ceil(Math.abs(number) / significance) * significance, precision);\n }\n\n return -exports.ROUND(Math.floor(Math.abs(number) / significance) * significance, precision);\n}; // Deprecated\n\n\nexports.FLOOR.PRECISE = exports.FLOOR.MATH; // adapted http://rosettacode.org/wiki/Greatest_common_divisor#JavaScript\n\nexports.GCD = function () {\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n var n = range.length;\n var r0 = range[0];\n var x = r0 < 0 ? -r0 : r0;\n\n for (var i = 1; i < n; i++) {\n var ri = range[i];\n var y = ri < 0 ? -ri : ri;\n\n while (x && y) {\n if (x > y) {\n x %= y;\n } else {\n y %= x;\n }\n }\n\n x += y;\n }\n\n return x;\n};\n\nexports.INT = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.floor(number);\n}; //TODO: verify\n\n\nexports.ISO = {\n CEILING: exports.CEILING\n};\n\nexports.LCM = function () {\n // Credits: Jonas Raoni Soares Silva\n var o = utils.parseNumberArray(utils.flatten(arguments));\n\n if (o instanceof Error) {\n return o;\n }\n\n for (var i, j, n, d, r = 1; (n = o.pop()) !== undefined;) {\n while (n > 1) {\n if (n % 2) {\n for (i = 3, j = Math.floor(Math.sqrt(n)); i <= j && n % i; i += 2) {//empty\n }\n\n d = i <= j ? i : n;\n } else {\n d = 2;\n }\n\n for (n /= d, r *= d, i = o.length; i; o[--i] % d === 0 && (o[i] /= d) === 1 && o.splice(i, 1)) {//empty\n }\n }\n }\n\n return r;\n};\n\nexports.LN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.log(number);\n};\n\nexports.LN10 = function () {\n return Math.log(10);\n};\n\nexports.LN2 = function () {\n return Math.log(2);\n};\n\nexports.LOG10E = function () {\n return Math.LOG10E;\n};\n\nexports.LOG2E = function () {\n return Math.LOG2E;\n};\n\nexports.LOG = function (number, base) {\n number = utils.parseNumber(number);\n base = utils.parseNumber(base);\n\n if (utils.anyIsError(number, base)) {\n return error.value;\n }\n\n base = base === undefined ? 10 : base;\n return Math.log(number) / Math.log(base);\n};\n\nexports.LOG10 = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.log(number) / Math.log(10);\n};\n\nexports.MOD = function (dividend, divisor) {\n dividend = utils.parseNumber(dividend);\n divisor = utils.parseNumber(divisor);\n\n if (utils.anyIsError(dividend, divisor)) {\n return error.value;\n }\n\n if (divisor === 0) {\n return error.div0;\n }\n\n var modulus = Math.abs(dividend % divisor);\n return divisor > 0 ? modulus : -modulus;\n};\n\nexports.MROUND = function (number, multiple) {\n number = utils.parseNumber(number);\n multiple = utils.parseNumber(multiple);\n\n if (utils.anyIsError(number, multiple)) {\n return error.value;\n }\n\n if (number * multiple < 0) {\n return error.num;\n }\n\n return Math.round(number / multiple) * multiple;\n};\n\nexports.MULTINOMIAL = function () {\n var args = utils.parseNumberArray(utils.flatten(arguments));\n\n if (args instanceof Error) {\n return args;\n }\n\n var sum = 0;\n var divisor = 1;\n\n for (var i = 0; i < args.length; i++) {\n sum += args[i];\n divisor *= exports.FACT(args[i]);\n }\n\n return exports.FACT(sum) / divisor;\n};\n\nexports.ODD = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var temp = Math.ceil(Math.abs(number));\n temp = temp & 1 ? temp : temp + 1;\n return number > 0 ? temp : -temp;\n};\n\nexports.PI = function () {\n return Math.PI;\n};\n\nexports.E = function () {\n return Math.E;\n};\n\nexports.POWER = function (number, power) {\n number = utils.parseNumber(number);\n power = utils.parseNumber(power);\n\n if (utils.anyIsError(number, power)) {\n return error.value;\n }\n\n var result = Math.pow(number, power);\n\n if (isNaN(result)) {\n return error.num;\n }\n\n return result;\n};\n\nexports.PRODUCT = function () {\n var args = utils.parseNumberArray(utils.flatten(arguments));\n\n if (args instanceof Error) {\n return args;\n }\n\n var result = 1;\n\n for (var i = 0; i < args.length; i++) {\n result *= args[i];\n }\n\n return result;\n};\n\nexports.QUOTIENT = function (numerator, denominator) {\n numerator = utils.parseNumber(numerator);\n denominator = utils.parseNumber(denominator);\n\n if (utils.anyIsError(numerator, denominator)) {\n return error.value;\n }\n\n return parseInt(numerator / denominator, 10);\n};\n\nexports.RADIANS = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return number * Math.PI / 180;\n};\n\nexports.RAND = function () {\n return Math.random();\n};\n\nexports.RANDBETWEEN = function (bottom, top) {\n bottom = utils.parseNumber(bottom);\n top = utils.parseNumber(top);\n\n if (utils.anyIsError(bottom, top)) {\n return error.value;\n } // Creative Commons Attribution 3.0 License\n // Copyright (c) 2012 eqcode\n\n\n return bottom + Math.ceil((top - bottom + 1) * Math.random()) - 1;\n}; // TODO\n\n\nexports.ROMAN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n } // The MIT License\n // Copyright (c) 2008 Steven Levithan\n\n\n var digits = String(number).split('');\n var key = ['', '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'];\n var roman = '';\n var i = 3;\n\n while (i--) {\n roman = (key[+digits.pop() + i * 10] || '') + roman;\n }\n\n return new Array(+digits.join('') + 1).join('M') + roman;\n};\n\nexports.ROUND = function (number, digits) {\n number = utils.parseNumber(number);\n digits = utils.parseNumber(digits);\n\n if (utils.anyIsError(number, digits)) {\n return error.value;\n }\n\n return Math.round(number * Math.pow(10, digits)) / Math.pow(10, digits);\n};\n\nexports.ROUNDDOWN = function (number, digits) {\n number = utils.parseNumber(number);\n digits = utils.parseNumber(digits);\n\n if (utils.anyIsError(number, digits)) {\n return error.value;\n }\n\n var sign = number > 0 ? 1 : -1;\n return sign * Math.floor(Math.abs(number) * Math.pow(10, digits)) / Math.pow(10, digits);\n};\n\nexports.ROUNDUP = function (number, digits) {\n number = utils.parseNumber(number);\n digits = utils.parseNumber(digits);\n\n if (utils.anyIsError(number, digits)) {\n return error.value;\n }\n\n var sign = number > 0 ? 1 : -1;\n return sign * Math.ceil(Math.abs(number) * Math.pow(10, digits)) / Math.pow(10, digits);\n};\n\nexports.SEC = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return 1 / Math.cos(number);\n};\n\nexports.SECH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return 2 / (Math.exp(number) + Math.exp(-number));\n};\n\nexports.SERIESSUM = function (x, n, m, coefficients) {\n x = utils.parseNumber(x);\n n = utils.parseNumber(n);\n m = utils.parseNumber(m);\n coefficients = utils.parseNumberArray(coefficients);\n\n if (utils.anyIsError(x, n, m, coefficients)) {\n return error.value;\n }\n\n var result = coefficients[0] * Math.pow(x, n);\n\n for (var i = 1; i < coefficients.length; i++) {\n result += coefficients[i] * Math.pow(x, n + i * m);\n }\n\n return result;\n};\n\nexports.SIGN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n if (number < 0) {\n return -1;\n } else if (number === 0) {\n return 0;\n } else {\n return 1;\n }\n};\n\nexports.SIN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.sin(number);\n};\n\nexports.SINH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return (Math.exp(number) - Math.exp(-number)) / 2;\n};\n\nexports.SQRT = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n if (number < 0) {\n return error.num;\n }\n\n return Math.sqrt(number);\n};\n\nexports.SQRTPI = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.sqrt(number * Math.PI);\n};\n\nexports.SQRT1_2 = function () {\n return 1 / Math.sqrt(2);\n};\n\nexports.SQRT2 = function () {\n return Math.sqrt(2);\n};\n\nexports.SUBTOTAL = function (function_code, ref1) {\n function_code = utils.parseNumber(function_code);\n\n if (function_code instanceof Error) {\n return function_code;\n }\n\n switch (function_code) {\n case 1:\n return statistical.AVERAGE(ref1);\n\n case 2:\n return statistical.COUNT(ref1);\n\n case 3:\n return statistical.COUNTA(ref1);\n\n case 4:\n return statistical.MAX(ref1);\n\n case 5:\n return statistical.MIN(ref1);\n\n case 6:\n return exports.PRODUCT(ref1);\n\n case 7:\n return statistical.STDEV.S(ref1);\n\n case 8:\n return statistical.STDEV.P(ref1);\n\n case 9:\n return exports.SUM(ref1);\n\n case 10:\n return statistical.VAR.S(ref1);\n\n case 11:\n return statistical.VAR.P(ref1);\n // no hidden values for us\n\n case 101:\n return statistical.AVERAGE(ref1);\n\n case 102:\n return statistical.COUNT(ref1);\n\n case 103:\n return statistical.COUNTA(ref1);\n\n case 104:\n return statistical.MAX(ref1);\n\n case 105:\n return statistical.MIN(ref1);\n\n case 106:\n return exports.PRODUCT(ref1);\n\n case 107:\n return statistical.STDEV.S(ref1);\n\n case 108:\n return statistical.STDEV.P(ref1);\n\n case 109:\n return exports.SUM(ref1);\n\n case 110:\n return statistical.VAR.S(ref1);\n\n case 111:\n return statistical.VAR.P(ref1);\n }\n};\n\nexports.ADD = function (num1, num2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n num1 = utils.parseNumber(num1);\n num2 = utils.parseNumber(num2);\n\n if (utils.anyIsError(num1, num2)) {\n return error.value;\n }\n\n return num1 + num2;\n};\n\nexports.MINUS = function (num1, num2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n num1 = utils.parseNumber(num1);\n num2 = utils.parseNumber(num2);\n\n if (utils.anyIsError(num1, num2)) {\n return error.value;\n }\n\n return num1 - num2;\n};\n\nexports.DIVIDE = function (dividend, divisor) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n dividend = utils.parseNumber(dividend);\n divisor = utils.parseNumber(divisor);\n\n if (utils.anyIsError(dividend, divisor)) {\n return error.value;\n }\n\n if (divisor === 0) {\n return error.div0;\n }\n\n return dividend / divisor;\n};\n\nexports.MULTIPLY = function (factor1, factor2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n factor1 = utils.parseNumber(factor1);\n factor2 = utils.parseNumber(factor2);\n\n if (utils.anyIsError(factor1, factor2)) {\n return error.value;\n }\n\n return factor1 * factor2;\n};\n\nexports.GTE = function (num1, num2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n num1 = utils.parseNumber(num1);\n num2 = utils.parseNumber(num2);\n\n if (utils.anyIsError(num1, num2)) {\n return error.error;\n }\n\n return num1 >= num2;\n};\n\nexports.LT = function (num1, num2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n num1 = utils.parseNumber(num1);\n num2 = utils.parseNumber(num2);\n\n if (utils.anyIsError(num1, num2)) {\n return error.error;\n }\n\n return num1 < num2;\n};\n\nexports.LTE = function (num1, num2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n num1 = utils.parseNumber(num1);\n num2 = utils.parseNumber(num2);\n\n if (utils.anyIsError(num1, num2)) {\n return error.error;\n }\n\n return num1 <= num2;\n};\n\nexports.EQ = function (value1, value2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n return value1 === value2;\n};\n\nexports.NE = function (value1, value2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n return value1 !== value2;\n};\n\nexports.POW = function (base, exponent) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n base = utils.parseNumber(base);\n exponent = utils.parseNumber(exponent);\n\n if (utils.anyIsError(base, exponent)) {\n return error.error;\n }\n\n return exports.POWER(base, exponent);\n};\n\nexports.SUM = function () {\n var result = 0;\n utils.arrayEach(utils.argsToArray(arguments), function (value) {\n if (typeof value === 'number') {\n result += value;\n } else if (typeof value === 'string') {\n var parsed = parseFloat(value);\n !isNaN(parsed) && (result += parsed);\n } else if (Array.isArray(value)) {\n result += exports.SUM.apply(null, value);\n }\n });\n return result;\n};\n\nexports.SUMIF = function (range, criteria) {\n range = utils.parseNumberArray(utils.flatten(range));\n\n if (range instanceof Error) {\n return range;\n }\n\n var result = 0;\n var isWildcard = criteria === void 0 || criteria === '*';\n var tokenizedCriteria = isWildcard ? null : evalExpression.parse(criteria + '');\n\n for (var i = 0; i < range.length; i++) {\n var value = range[i];\n\n if (isWildcard) {\n result += value;\n } else {\n var tokens = [evalExpression.createToken(value, evalExpression.TOKEN_TYPE_LITERAL)].concat(tokenizedCriteria);\n result += evalExpression.compute(tokens) ? value : 0;\n }\n }\n\n return result;\n};\n\nexports.SUMIFS = function () {\n var args = utils.argsToArray(arguments);\n var range = utils.parseNumberArray(utils.flatten(args.shift()));\n\n if (range instanceof Error) {\n return range;\n }\n\n var criterias = args;\n var n_range_elements = range.length;\n var criteriaLength = criterias.length;\n var result = 0;\n\n for (var i = 0; i < n_range_elements; i++) {\n var value = range[i];\n var isMeetCondition = false;\n\n for (var j = 0; j < criteriaLength; j++) {\n var criteria = criterias[j];\n var isWildcard = criteria === void 0 || criteria === '*';\n var computedResult = false;\n\n if (isWildcard) {\n computedResult = true;\n } else {\n var tokenizedCriteria = evalExpression.parse(criteria + '');\n var tokens = [evalExpression.createToken(value, evalExpression.TOKEN_TYPE_LITERAL)].concat(tokenizedCriteria);\n computedResult = evalExpression.compute(tokens);\n } // Criterias are calculated as AND so any `false` breakes the loop as unmeet condition\n\n\n if (!computedResult) {\n isMeetCondition = false;\n break;\n }\n\n isMeetCondition = true;\n }\n\n if (isMeetCondition) {\n result += value;\n }\n }\n\n return result;\n};\n\nexports.SUMPRODUCT = function () {\n if (!arguments || arguments.length === 0) {\n return error.value;\n }\n\n var arrays = arguments.length + 1;\n var result = 0;\n var product;\n var k;\n\n var _i;\n\n var _ij;\n\n for (var i = 0; i < arguments[0].length; i++) {\n if (!(arguments[0][i] instanceof Array)) {\n product = 1;\n\n for (k = 1; k < arrays; k++) {\n _i = utils.parseNumber(arguments[k - 1][i]);\n\n if (_i instanceof Error) {\n return _i;\n }\n\n product *= _i;\n }\n\n result += product;\n } else {\n for (var j = 0; j < arguments[0][i].length; j++) {\n product = 1;\n\n for (k = 1; k < arrays; k++) {\n _ij = utils.parseNumber(arguments[k - 1][i][j]);\n\n if (_ij instanceof Error) {\n return _ij;\n }\n\n product *= _ij;\n }\n\n result += product;\n }\n }\n }\n\n return result;\n};\n\nexports.SUMSQ = function () {\n var numbers = utils.parseNumberArray(utils.flatten(arguments));\n\n if (numbers instanceof Error) {\n return numbers;\n }\n\n var result = 0;\n var length = numbers.length;\n\n for (var i = 0; i < length; i++) {\n result += information.ISNUMBER(numbers[i]) ? numbers[i] * numbers[i] : 0;\n }\n\n return result;\n};\n\nexports.SUMX2MY2 = function (array_x, array_y) {\n array_x = utils.parseNumberArray(utils.flatten(array_x));\n array_y = utils.parseNumberArray(utils.flatten(array_y));\n\n if (utils.anyIsError(array_x, array_y)) {\n return error.value;\n }\n\n var result = 0;\n\n for (var i = 0; i < array_x.length; i++) {\n result += array_x[i] * array_x[i] - array_y[i] * array_y[i];\n }\n\n return result;\n};\n\nexports.SUMX2PY2 = function (array_x, array_y) {\n array_x = utils.parseNumberArray(utils.flatten(array_x));\n array_y = utils.parseNumberArray(utils.flatten(array_y));\n\n if (utils.anyIsError(array_x, array_y)) {\n return error.value;\n }\n\n var result = 0;\n array_x = utils.parseNumberArray(utils.flatten(array_x));\n array_y = utils.parseNumberArray(utils.flatten(array_y));\n\n for (var i = 0; i < array_x.length; i++) {\n result += array_x[i] * array_x[i] + array_y[i] * array_y[i];\n }\n\n return result;\n};\n\nexports.SUMXMY2 = function (array_x, array_y) {\n array_x = utils.parseNumberArray(utils.flatten(array_x));\n array_y = utils.parseNumberArray(utils.flatten(array_y));\n\n if (utils.anyIsError(array_x, array_y)) {\n return error.value;\n }\n\n var result = 0;\n array_x = utils.flatten(array_x);\n array_y = utils.flatten(array_y);\n\n for (var i = 0; i < array_x.length; i++) {\n result += Math.pow(array_x[i] - array_y[i], 2);\n }\n\n return result;\n};\n\nexports.TAN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return Math.tan(number);\n};\n\nexports.TANH = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n var e2 = Math.exp(2 * number);\n return (e2 - 1) / (e2 + 1);\n};\n\nexports.TRUNC = function (number, digits) {\n digits = digits === undefined ? 0 : digits;\n number = utils.parseNumber(number);\n digits = utils.parseNumber(digits);\n\n if (utils.anyIsError(number, digits)) {\n return error.value;\n }\n\n var sign = number > 0 ? 1 : -1;\n return sign * Math.floor(Math.abs(number) * Math.pow(10, digits)) / Math.pow(10, digits);\n};","var mathTrig = require(\"./math-trig\");\n\nvar text = require(\"./text\");\n\nvar jStat = require('jstat');\n\nvar utils = require(\"./utils/common\");\n\nvar evalExpression = require(\"./utils/criteria-eval\");\n\nvar error = require(\"./utils/error\");\n\nvar misc = require(\"./miscellaneous\");\n\nvar SQRT2PI = 2.5066282746310002;\n\nexports.AVEDEV = function () {\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n return jStat.sum(jStat(range).subtract(jStat.mean(range)).abs()[0]) / range.length;\n};\n\nexports.AVERAGE = function () {\n var range = utils.numbers(utils.flatten(arguments));\n var n = range.length;\n var sum = 0;\n var count = 0;\n var result;\n\n for (var i = 0; i < n; i++) {\n sum += range[i];\n count += 1;\n }\n\n result = sum / count;\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.AVERAGEA = function () {\n var range = utils.flatten(arguments);\n var n = range.length;\n var sum = 0;\n var count = 0;\n var result;\n\n for (var i = 0; i < n; i++) {\n var el = range[i];\n\n if (typeof el === 'number') {\n sum += el;\n }\n\n if (el === true) {\n sum++;\n }\n\n if (el !== null) {\n count++;\n }\n }\n\n result = sum / count;\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.AVERAGEIF = function (range, criteria, average_range) {\n if (arguments.length <= 1) {\n return error.na;\n }\n\n average_range = average_range || range;\n range = utils.flatten(range);\n average_range = utils.parseNumberArray(utils.flatten(average_range));\n\n if (average_range instanceof Error) {\n return average_range;\n }\n\n var average_count = 0;\n var result = 0;\n var isWildcard = criteria === void 0 || criteria === '*';\n var tokenizedCriteria = isWildcard ? null : evalExpression.parse(criteria + '');\n\n for (var i = 0; i < range.length; i++) {\n var value = range[i];\n\n if (isWildcard) {\n result += average_range[i];\n average_count++;\n } else {\n var tokens = [evalExpression.createToken(value, evalExpression.TOKEN_TYPE_LITERAL)].concat(tokenizedCriteria);\n\n if (evalExpression.compute(tokens)) {\n result += average_range[i];\n average_count++;\n }\n }\n }\n\n return result / average_count;\n};\n\nexports.AVERAGEIFS = function () {\n // Does not work with multi dimensional ranges yet!\n //http://office.microsoft.com/en-001/excel-help/averageifs-function-HA010047493.aspx\n var args = utils.argsToArray(arguments);\n var criteriaLength = (args.length - 1) / 2;\n var range = utils.flatten(args[0]);\n var count = 0;\n var result = 0;\n\n for (var i = 0; i < range.length; i++) {\n var isMeetCondition = false;\n\n for (var j = 0; j < criteriaLength; j++) {\n var value = args[2 * j + 1][i];\n var criteria = args[2 * j + 2];\n var isWildcard = criteria === void 0 || criteria === '*';\n var computedResult = false;\n\n if (isWildcard) {\n computedResult = true;\n } else {\n var tokenizedCriteria = evalExpression.parse(criteria + '');\n var tokens = [evalExpression.createToken(value, evalExpression.TOKEN_TYPE_LITERAL)].concat(tokenizedCriteria);\n computedResult = evalExpression.compute(tokens);\n } // Criterias are calculated as AND so any `false` breakes the loop as unmeet condition\n\n\n if (!computedResult) {\n isMeetCondition = false;\n break;\n }\n\n isMeetCondition = true;\n }\n\n if (isMeetCondition) {\n result += range[i];\n count++;\n }\n }\n\n var average = result / count;\n\n if (isNaN(average)) {\n return 0;\n } else {\n return average;\n }\n};\n\nexports.BETA = {};\n\nexports.BETA.DIST = function (x, alpha, beta, cumulative, A, B) {\n if (arguments.length < 4) {\n return error.value;\n }\n\n A = A === undefined ? 0 : A;\n B = B === undefined ? 1 : B;\n x = utils.parseNumber(x);\n alpha = utils.parseNumber(alpha);\n beta = utils.parseNumber(beta);\n A = utils.parseNumber(A);\n B = utils.parseNumber(B);\n\n if (utils.anyIsError(x, alpha, beta, A, B)) {\n return error.value;\n }\n\n x = (x - A) / (B - A);\n return cumulative ? jStat.beta.cdf(x, alpha, beta) : jStat.beta.pdf(x, alpha, beta);\n};\n\nexports.BETA.INV = function (probability, alpha, beta, A, B) {\n A = A === undefined ? 0 : A;\n B = B === undefined ? 1 : B;\n probability = utils.parseNumber(probability);\n alpha = utils.parseNumber(alpha);\n beta = utils.parseNumber(beta);\n A = utils.parseNumber(A);\n B = utils.parseNumber(B);\n\n if (utils.anyIsError(probability, alpha, beta, A, B)) {\n return error.value;\n }\n\n return jStat.beta.inv(probability, alpha, beta) * (B - A) + A;\n};\n\nexports.BINOM = {};\n\nexports.BINOM.DIST = function (successes, trials, probability, cumulative) {\n successes = utils.parseNumber(successes);\n trials = utils.parseNumber(trials);\n probability = utils.parseNumber(probability);\n cumulative = utils.parseNumber(cumulative);\n\n if (utils.anyIsError(successes, trials, probability, cumulative)) {\n return error.value;\n }\n\n return cumulative ? jStat.binomial.cdf(successes, trials, probability) : jStat.binomial.pdf(successes, trials, probability);\n};\n\nexports.BINOM.DIST.RANGE = function (trials, probability, successes, successes2) {\n successes2 = successes2 === undefined ? successes : successes2;\n trials = utils.parseNumber(trials);\n probability = utils.parseNumber(probability);\n successes = utils.parseNumber(successes);\n successes2 = utils.parseNumber(successes2);\n\n if (utils.anyIsError(trials, probability, successes, successes2)) {\n return error.value;\n }\n\n var result = 0;\n\n for (var i = successes; i <= successes2; i++) {\n result += mathTrig.COMBIN(trials, i) * Math.pow(probability, i) * Math.pow(1 - probability, trials - i);\n }\n\n return result;\n};\n\nexports.BINOM.INV = function (trials, probability, alpha) {\n trials = utils.parseNumber(trials);\n probability = utils.parseNumber(probability);\n alpha = utils.parseNumber(alpha);\n\n if (utils.anyIsError(trials, probability, alpha)) {\n return error.value;\n }\n\n var x = 0;\n\n while (x <= trials) {\n if (jStat.binomial.cdf(x, trials, probability) >= alpha) {\n return x;\n }\n\n x++;\n }\n};\n\nexports.CHISQ = {};\n\nexports.CHISQ.DIST = function (x, k, cumulative) {\n x = utils.parseNumber(x);\n k = utils.parseNumber(k);\n\n if (utils.anyIsError(x, k)) {\n return error.value;\n }\n\n return cumulative ? jStat.chisquare.cdf(x, k) : jStat.chisquare.pdf(x, k);\n};\n\nexports.CHISQ.DIST.RT = function (x, k) {\n if (!x | !k) {\n return error.na;\n }\n\n if (x < 1 || k > Math.pow(10, 10)) {\n return error.num;\n }\n\n if (typeof x !== 'number' || typeof k !== 'number') {\n return error.value;\n }\n\n return 1 - jStat.chisquare.cdf(x, k);\n};\n\nexports.CHISQ.INV = function (probability, k) {\n probability = utils.parseNumber(probability);\n k = utils.parseNumber(k);\n\n if (utils.anyIsError(probability, k)) {\n return error.value;\n }\n\n return jStat.chisquare.inv(probability, k);\n};\n\nexports.CHISQ.INV.RT = function (p, k) {\n if (!p | !k) {\n return error.na;\n }\n\n if (p < 0 || p > 1 || k < 1 || k > Math.pow(10, 10)) {\n return error.num;\n }\n\n if (typeof p !== 'number' || typeof k !== 'number') {\n return error.value;\n }\n\n return jStat.chisquare.inv(1.0 - p, k);\n};\n\nexports.CHISQ.TEST = function (observed, expected) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n if (!(observed instanceof Array) || !(expected instanceof Array)) {\n return error.value;\n }\n\n if (observed.length !== expected.length) {\n return error.value;\n }\n\n if (observed[0] && expected[0] && observed[0].length !== expected[0].length) {\n return error.value;\n }\n\n var row = observed.length;\n var tmp, i, j; // Convert single-dimension array into two-dimension array\n\n for (i = 0; i < row; i++) {\n if (!(observed[i] instanceof Array)) {\n tmp = observed[i];\n observed[i] = [];\n observed[i].push(tmp);\n }\n\n if (!(expected[i] instanceof Array)) {\n tmp = expected[i];\n expected[i] = [];\n expected[i].push(tmp);\n }\n }\n\n var col = observed[0].length;\n var dof = col === 1 ? row - 1 : (row - 1) * (col - 1);\n var xsqr = 0;\n var Pi = Math.PI;\n\n for (i = 0; i < row; i++) {\n for (j = 0; j < col; j++) {\n xsqr += Math.pow(observed[i][j] - expected[i][j], 2) / expected[i][j];\n }\n } // Get independency by X square and its degree of freedom\n\n\n function ChiSq(xsqr, dof) {\n var p = Math.exp(-0.5 * xsqr);\n\n if (dof % 2 === 1) {\n p = p * Math.sqrt(2 * xsqr / Pi);\n }\n\n var k = dof;\n\n while (k >= 2) {\n p = p * xsqr / k;\n k = k - 2;\n }\n\n var t = p;\n var a = dof;\n\n while (t > 0.0000000001 * p) {\n a = a + 2;\n t = t * xsqr / a;\n p = p + t;\n }\n\n return 1 - p;\n }\n\n return Math.round(ChiSq(xsqr, dof) * 1000000) / 1000000;\n};\n\nexports.COLUMN = function (matrix, index) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n if (index < 0) {\n return error.num;\n }\n\n if (!(matrix instanceof Array) || typeof index !== 'number') {\n return error.value;\n }\n\n if (matrix.length === 0) {\n return undefined;\n }\n\n return jStat.col(matrix, index);\n};\n\nexports.COLUMNS = function (matrix) {\n if (arguments.length !== 1) {\n return error.na;\n }\n\n if (!(matrix instanceof Array)) {\n return error.value;\n }\n\n if (matrix.length === 0) {\n return 0;\n }\n\n return jStat.cols(matrix);\n};\n\nexports.CONFIDENCE = {};\n\nexports.CONFIDENCE.NORM = function (alpha, sd, n) {\n alpha = utils.parseNumber(alpha);\n sd = utils.parseNumber(sd);\n n = utils.parseNumber(n);\n\n if (utils.anyIsError(alpha, sd, n)) {\n return error.value;\n }\n\n return jStat.normalci(1, alpha, sd, n)[1] - 1;\n};\n\nexports.CONFIDENCE.T = function (alpha, sd, n) {\n alpha = utils.parseNumber(alpha);\n sd = utils.parseNumber(sd);\n n = utils.parseNumber(n);\n\n if (utils.anyIsError(alpha, sd, n)) {\n return error.value;\n }\n\n return jStat.tci(1, alpha, sd, n)[1] - 1;\n};\n\nexports.CORREL = function (array1, array2) {\n array1 = utils.parseNumberArray(utils.flatten(array1));\n array2 = utils.parseNumberArray(utils.flatten(array2));\n\n if (utils.anyIsError(array1, array2)) {\n return error.value;\n }\n\n return jStat.corrcoeff(array1, array2);\n};\n\nexports.COUNT = function () {\n return utils.numbers(utils.flatten(arguments)).length;\n};\n\nexports.COUNTA = function () {\n var range = utils.flatten(arguments);\n return range.length - exports.COUNTBLANK(range);\n};\n\nexports.COUNTIN = function (range, value) {\n var result = 0;\n range = utils.flatten(range);\n\n for (var i = 0; i < range.length; i++) {\n if (range[i] === value) {\n result++;\n }\n }\n\n return result;\n};\n\nexports.COUNTBLANK = function () {\n var range = utils.flatten(arguments);\n var blanks = 0;\n var element;\n\n for (var i = 0; i < range.length; i++) {\n element = range[i];\n\n if (element === null || element === '') {\n blanks++;\n }\n }\n\n return blanks;\n};\n\nexports.COUNTIF = function (range, criteria) {\n range = utils.flatten(range);\n var isWildcard = criteria === void 0 || criteria === '*';\n\n if (isWildcard) {\n return range.length;\n }\n\n var matches = 0;\n var tokenizedCriteria = evalExpression.parse(criteria + '');\n\n for (var i = 0; i < range.length; i++) {\n var value = range[i];\n var tokens = [evalExpression.createToken(value, evalExpression.TOKEN_TYPE_LITERAL)].concat(tokenizedCriteria);\n\n if (evalExpression.compute(tokens)) {\n matches++;\n }\n }\n\n return matches;\n};\n\nexports.COUNTIFS = function () {\n var args = utils.argsToArray(arguments);\n var results = new Array(utils.flatten(args[0]).length);\n\n for (var i = 0; i < results.length; i++) {\n results[i] = true;\n }\n\n for (i = 0; i < args.length; i += 2) {\n var range = utils.flatten(args[i]);\n var criteria = args[i + 1];\n var isWildcard = criteria === void 0 || criteria === '*';\n\n if (!isWildcard) {\n var tokenizedCriteria = evalExpression.parse(criteria + '');\n\n for (var j = 0; j < range.length; j++) {\n var value = range[j];\n var tokens = [evalExpression.createToken(value, evalExpression.TOKEN_TYPE_LITERAL)].concat(tokenizedCriteria);\n results[j] = results[j] && evalExpression.compute(tokens);\n }\n }\n }\n\n var result = 0;\n\n for (i = 0; i < results.length; i++) {\n if (results[i]) {\n result++;\n }\n }\n\n return result;\n};\n\nexports.COUNTUNIQUE = function () {\n return misc.UNIQUE.apply(null, utils.flatten(arguments)).length;\n};\n\nexports.COVARIANCE = {};\n\nexports.COVARIANCE.P = function (array1, array2) {\n array1 = utils.parseNumberArray(utils.flatten(array1));\n array2 = utils.parseNumberArray(utils.flatten(array2));\n\n if (utils.anyIsError(array1, array2)) {\n return error.value;\n }\n\n var mean1 = jStat.mean(array1);\n var mean2 = jStat.mean(array2);\n var result = 0;\n var n = array1.length;\n\n for (var i = 0; i < n; i++) {\n result += (array1[i] - mean1) * (array2[i] - mean2);\n }\n\n return result / n;\n};\n\nexports.COVARIANCE.S = function (array1, array2) {\n array1 = utils.parseNumberArray(utils.flatten(array1));\n array2 = utils.parseNumberArray(utils.flatten(array2));\n\n if (utils.anyIsError(array1, array2)) {\n return error.value;\n }\n\n return jStat.covariance(array1, array2);\n};\n\nexports.DEVSQ = function () {\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n var mean = jStat.mean(range);\n var result = 0;\n\n for (var i = 0; i < range.length; i++) {\n result += Math.pow(range[i] - mean, 2);\n }\n\n return result;\n};\n\nexports.EXPON = {};\n\nexports.EXPON.DIST = function (x, lambda, cumulative) {\n x = utils.parseNumber(x);\n lambda = utils.parseNumber(lambda);\n\n if (utils.anyIsError(x, lambda)) {\n return error.value;\n }\n\n return cumulative ? jStat.exponential.cdf(x, lambda) : jStat.exponential.pdf(x, lambda);\n};\n\nexports.F = {};\n\nexports.F.DIST = function (x, d1, d2, cumulative) {\n x = utils.parseNumber(x);\n d1 = utils.parseNumber(d1);\n d2 = utils.parseNumber(d2);\n\n if (utils.anyIsError(x, d1, d2)) {\n return error.value;\n }\n\n return cumulative ? jStat.centralF.cdf(x, d1, d2) : jStat.centralF.pdf(x, d1, d2);\n};\n\nexports.F.DIST.RT = function (x, d1, d2) {\n if (arguments.length !== 3) {\n return error.na;\n }\n\n if (x < 0 || d1 < 1 || d2 < 1) {\n return error.num;\n }\n\n if (typeof x !== 'number' || typeof d1 !== 'number' || typeof d2 !== 'number') {\n return error.value;\n }\n\n return 1 - jStat.centralF.cdf(x, d1, d2);\n};\n\nexports.F.INV = function (probability, d1, d2) {\n probability = utils.parseNumber(probability);\n d1 = utils.parseNumber(d1);\n d2 = utils.parseNumber(d2);\n\n if (utils.anyIsError(probability, d1, d2)) {\n return error.value;\n }\n\n if (probability <= 0.0 || probability > 1.0) {\n return error.num;\n }\n\n return jStat.centralF.inv(probability, d1, d2);\n};\n\nexports.F.INV.RT = function (p, d1, d2) {\n if (arguments.length !== 3) {\n return error.na;\n }\n\n if (p < 0 || p > 1 || d1 < 1 || d1 > Math.pow(10, 10) || d2 < 1 || d2 > Math.pow(10, 10)) {\n return error.num;\n }\n\n if (typeof p !== 'number' || typeof d1 !== 'number' || typeof d2 !== 'number') {\n return error.value;\n }\n\n return jStat.centralF.inv(1.0 - p, d1, d2);\n};\n\nexports.F.TEST = function (array1, array2) {\n if (!array1 || !array2) {\n return error.na;\n }\n\n if (!(array1 instanceof Array) || !(array2 instanceof Array)) {\n return error.na;\n }\n\n if (array1.length < 2 || array2.length < 2) {\n return error.div0;\n }\n\n var sumOfSquares = function sumOfSquares(values, x1) {\n var sum = 0;\n\n for (var i = 0; i < values.length; i++) {\n sum += Math.pow(values[i] - x1, 2);\n }\n\n return sum;\n };\n\n var x1 = mathTrig.SUM(array1) / array1.length;\n var x2 = mathTrig.SUM(array2) / array2.length;\n var sum1 = sumOfSquares(array1, x1) / (array1.length - 1);\n var sum2 = sumOfSquares(array2, x2) / (array2.length - 1);\n return sum1 / sum2;\n};\n\nexports.FISHER = function (x) {\n x = utils.parseNumber(x);\n\n if (x instanceof Error) {\n return x;\n }\n\n return Math.log((1 + x) / (1 - x)) / 2;\n};\n\nexports.FISHERINV = function (y) {\n y = utils.parseNumber(y);\n\n if (y instanceof Error) {\n return y;\n }\n\n var e2y = Math.exp(2 * y);\n return (e2y - 1) / (e2y + 1);\n};\n\nexports.FORECAST = function (x, data_y, data_x) {\n x = utils.parseNumber(x);\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n\n if (utils.anyIsError(x, data_y, data_x)) {\n return error.value;\n }\n\n var xmean = jStat.mean(data_x);\n var ymean = jStat.mean(data_y);\n var n = data_x.length;\n var num = 0;\n var den = 0;\n\n for (var i = 0; i < n; i++) {\n num += (data_x[i] - xmean) * (data_y[i] - ymean);\n den += Math.pow(data_x[i] - xmean, 2);\n }\n\n var b = num / den;\n var a = ymean - b * xmean;\n return a + b * x;\n};\n\nexports.FREQUENCY = function (data, bins) {\n data = utils.parseNumberArray(utils.flatten(data));\n bins = utils.parseNumberArray(utils.flatten(bins));\n\n if (utils.anyIsError(data, bins)) {\n return error.value;\n }\n\n var n = data.length;\n var b = bins.length;\n var r = [];\n\n for (var i = 0; i <= b; i++) {\n r[i] = 0;\n\n for (var j = 0; j < n; j++) {\n if (i === 0) {\n if (data[j] <= bins[0]) {\n r[0] += 1;\n }\n } else if (i < b) {\n if (data[j] > bins[i - 1] && data[j] <= bins[i]) {\n r[i] += 1;\n }\n } else if (i === b) {\n if (data[j] > bins[b - 1]) {\n r[b] += 1;\n }\n }\n }\n }\n\n return r;\n};\n\nexports.GAMMA = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n if (number === 0) {\n return error.num;\n }\n\n if (parseInt(number, 10) === number && number < 0) {\n return error.num;\n }\n\n return jStat.gammafn(number);\n};\n\nexports.GAMMA.DIST = function (value, alpha, beta, cumulative) {\n if (arguments.length !== 4) {\n return error.na;\n }\n\n if (value < 0 || alpha <= 0 || beta <= 0) {\n return error.value;\n }\n\n if (typeof value !== 'number' || typeof alpha !== 'number' || typeof beta !== 'number') {\n return error.value;\n }\n\n return cumulative ? jStat.gamma.cdf(value, alpha, beta, true) : jStat.gamma.pdf(value, alpha, beta, false);\n};\n\nexports.GAMMA.INV = function (probability, alpha, beta) {\n if (arguments.length !== 3) {\n return error.na;\n }\n\n if (probability < 0 || probability > 1 || alpha <= 0 || beta <= 0) {\n return error.num;\n }\n\n if (typeof probability !== 'number' || typeof alpha !== 'number' || typeof beta !== 'number') {\n return error.value;\n }\n\n return jStat.gamma.inv(probability, alpha, beta);\n};\n\nexports.GAMMALN = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return jStat.gammaln(number);\n};\n\nexports.GAMMALN.PRECISE = function (x) {\n if (arguments.length !== 1) {\n return error.na;\n }\n\n if (x <= 0) {\n return error.num;\n }\n\n if (typeof x !== 'number') {\n return error.value;\n }\n\n return jStat.gammaln(x);\n};\n\nexports.GAUSS = function (z) {\n z = utils.parseNumber(z);\n\n if (z instanceof Error) {\n return z;\n }\n\n return jStat.normal.cdf(z, 0, 1) - 0.5;\n};\n\nexports.GEOMEAN = function () {\n var args = utils.parseNumberArray(utils.flatten(arguments));\n\n if (args instanceof Error) {\n return args;\n }\n\n return jStat.geomean(args);\n};\n\nexports.GROWTH = function (known_y, known_x, new_x, use_const) {\n // Credits: Ilmari Karonen (http://stackoverflow.com/questions/14161990/how-to-implement-growth-function-in-javascript)\n known_y = utils.parseNumberArray(known_y);\n\n if (known_y instanceof Error) {\n return known_y;\n } // Default values for optional parameters:\n\n\n var i;\n\n if (known_x === undefined) {\n known_x = [];\n\n for (i = 1; i <= known_y.length; i++) {\n known_x.push(i);\n }\n }\n\n if (new_x === undefined) {\n new_x = [];\n\n for (i = 1; i <= known_y.length; i++) {\n new_x.push(i);\n }\n }\n\n known_x = utils.parseNumberArray(known_x);\n new_x = utils.parseNumberArray(new_x);\n\n if (utils.anyIsError(known_x, new_x)) {\n return error.value;\n }\n\n if (use_const === undefined) {\n use_const = true;\n } // Calculate sums over the data:\n\n\n var n = known_y.length;\n var avg_x = 0;\n var avg_y = 0;\n var avg_xy = 0;\n var avg_xx = 0;\n\n for (i = 0; i < n; i++) {\n var x = known_x[i];\n var y = Math.log(known_y[i]);\n avg_x += x;\n avg_y += y;\n avg_xy += x * y;\n avg_xx += x * x;\n }\n\n avg_x /= n;\n avg_y /= n;\n avg_xy /= n;\n avg_xx /= n; // Compute linear regression coefficients:\n\n var beta;\n var alpha;\n\n if (use_const) {\n beta = (avg_xy - avg_x * avg_y) / (avg_xx - avg_x * avg_x);\n alpha = avg_y - beta * avg_x;\n } else {\n beta = avg_xy / avg_xx;\n alpha = 0;\n } // Compute and return result array:\n\n\n var new_y = [];\n\n for (i = 0; i < new_x.length; i++) {\n new_y.push(Math.exp(alpha + beta * new_x[i]));\n }\n\n return new_y;\n};\n\nexports.HARMEAN = function () {\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n var n = range.length;\n var den = 0;\n\n for (var i = 0; i < n; i++) {\n den += 1 / range[i];\n }\n\n return n / den;\n};\n\nexports.HYPGEOM = {};\n\nexports.HYPGEOM.DIST = function (x, n, M, N, cumulative) {\n x = utils.parseNumber(x);\n n = utils.parseNumber(n);\n M = utils.parseNumber(M);\n N = utils.parseNumber(N);\n\n if (utils.anyIsError(x, n, M, N)) {\n return error.value;\n }\n\n function pdf(x, n, M, N) {\n return mathTrig.COMBIN(M, x) * mathTrig.COMBIN(N - M, n - x) / mathTrig.COMBIN(N, n);\n }\n\n function cdf(x, n, M, N) {\n var result = 0;\n\n for (var i = 0; i <= x; i++) {\n result += pdf(i, n, M, N);\n }\n\n return result;\n }\n\n return cumulative ? cdf(x, n, M, N) : pdf(x, n, M, N);\n};\n\nexports.INTERCEPT = function (known_y, known_x) {\n known_y = utils.parseNumberArray(known_y);\n known_x = utils.parseNumberArray(known_x);\n\n if (utils.anyIsError(known_y, known_x)) {\n return error.value;\n }\n\n if (known_y.length !== known_x.length) {\n return error.na;\n }\n\n return exports.FORECAST(0, known_y, known_x);\n};\n\nexports.KURT = function () {\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n var mean = jStat.mean(range);\n var n = range.length;\n var sigma = 0;\n\n for (var i = 0; i < n; i++) {\n sigma += Math.pow(range[i] - mean, 4);\n }\n\n sigma = sigma / Math.pow(jStat.stdev(range, true), 4);\n return n * (n + 1) / ((n - 1) * (n - 2) * (n - 3)) * sigma - 3 * (n - 1) * (n - 1) / ((n - 2) * (n - 3));\n};\n\nexports.LARGE = function (range, k) {\n range = utils.parseNumberArray(utils.flatten(range));\n k = utils.parseNumber(k);\n\n if (utils.anyIsError(range, k)) {\n return range;\n }\n\n return range.sort(function (a, b) {\n return b - a;\n })[k - 1];\n};\n\nexports.LINEST = function (data_y, data_x) {\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n\n if (utils.anyIsError(data_y, data_x)) {\n return error.value;\n }\n\n var ymean = jStat.mean(data_y);\n var xmean = jStat.mean(data_x);\n var n = data_x.length;\n var num = 0;\n var den = 0;\n\n for (var i = 0; i < n; i++) {\n num += (data_x[i] - xmean) * (data_y[i] - ymean);\n den += Math.pow(data_x[i] - xmean, 2);\n }\n\n var m = num / den;\n var b = ymean - m * xmean;\n return [m, b];\n}; // According to Microsoft:\n// http://office.microsoft.com/en-us/starter-help/logest-function-HP010342665.aspx\n// LOGEST returns are based on the following linear model:\n// ln y = x1 ln m1 + ... + xn ln mn + ln b\n\n\nexports.LOGEST = function (data_y, data_x) {\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n\n if (utils.anyIsError(data_y, data_x)) {\n return error.value;\n }\n\n for (var i = 0; i < data_y.length; i++) {\n data_y[i] = Math.log(data_y[i]);\n }\n\n var result = exports.LINEST(data_y, data_x);\n result[0] = Math.round(Math.exp(result[0]) * 1000000) / 1000000;\n result[1] = Math.round(Math.exp(result[1]) * 1000000) / 1000000;\n return result;\n};\n\nexports.LOGNORM = {};\n\nexports.LOGNORM.DIST = function (x, mean, sd, cumulative) {\n x = utils.parseNumber(x);\n mean = utils.parseNumber(mean);\n sd = utils.parseNumber(sd);\n\n if (utils.anyIsError(x, mean, sd)) {\n return error.value;\n }\n\n return cumulative ? jStat.lognormal.cdf(x, mean, sd) : jStat.lognormal.pdf(x, mean, sd);\n};\n\nexports.LOGNORM.INV = function (probability, mean, sd) {\n probability = utils.parseNumber(probability);\n mean = utils.parseNumber(mean);\n sd = utils.parseNumber(sd);\n\n if (utils.anyIsError(probability, mean, sd)) {\n return error.value;\n }\n\n return jStat.lognormal.inv(probability, mean, sd);\n};\n\nexports.MAX = function () {\n var range = utils.numbers(utils.flatten(arguments));\n return range.length === 0 ? 0 : Math.max.apply(Math, range);\n};\n\nexports.MAXA = function () {\n var range = utils.arrayValuesToNumbers(utils.flatten(arguments));\n return range.length === 0 ? 0 : Math.max.apply(Math, range);\n};\n\nexports.MEDIAN = function () {\n var range = utils.arrayValuesToNumbers(utils.flatten(arguments));\n var result = jStat.median(range);\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.MIN = function () {\n var range = utils.numbers(utils.flatten(arguments));\n return range.length === 0 ? 0 : Math.min.apply(Math, range);\n};\n\nexports.MINA = function () {\n var range = utils.arrayValuesToNumbers(utils.flatten(arguments));\n return range.length === 0 ? 0 : Math.min.apply(Math, range);\n};\n\nexports.MODE = {};\n\nexports.MODE.MULT = function () {\n // Credits: Roönaän\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n var n = range.length;\n var count = {};\n var maxItems = [];\n var max = 0;\n var currentItem;\n\n for (var i = 0; i < n; i++) {\n currentItem = range[i];\n count[currentItem] = count[currentItem] ? count[currentItem] + 1 : 1;\n\n if (count[currentItem] > max) {\n max = count[currentItem];\n maxItems = [];\n }\n\n if (count[currentItem] === max) {\n maxItems[maxItems.length] = currentItem;\n }\n }\n\n return maxItems;\n};\n\nexports.MODE.SNGL = function () {\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n return exports.MODE.MULT(range).sort(function (a, b) {\n return a - b;\n })[0];\n};\n\nexports.NEGBINOM = {};\n\nexports.NEGBINOM.DIST = function (k, r, p, cumulative) {\n k = utils.parseNumber(k);\n r = utils.parseNumber(r);\n p = utils.parseNumber(p);\n\n if (utils.anyIsError(k, r, p)) {\n return error.value;\n }\n\n return cumulative ? jStat.negbin.cdf(k, r, p) : jStat.negbin.pdf(k, r, p);\n};\n\nexports.NORM = {};\n\nexports.NORM.DIST = function (x, mean, sd, cumulative) {\n x = utils.parseNumber(x);\n mean = utils.parseNumber(mean);\n sd = utils.parseNumber(sd);\n\n if (utils.anyIsError(x, mean, sd)) {\n return error.value;\n }\n\n if (sd <= 0) {\n return error.num;\n } // Return normal distribution computed by jStat [http://jstat.org]\n\n\n return cumulative ? jStat.normal.cdf(x, mean, sd) : jStat.normal.pdf(x, mean, sd);\n};\n\nexports.NORM.INV = function (probability, mean, sd) {\n probability = utils.parseNumber(probability);\n mean = utils.parseNumber(mean);\n sd = utils.parseNumber(sd);\n\n if (utils.anyIsError(probability, mean, sd)) {\n return error.value;\n }\n\n return jStat.normal.inv(probability, mean, sd);\n};\n\nexports.NORM.S = {};\n\nexports.NORM.S.DIST = function (z, cumulative) {\n z = utils.parseNumber(z);\n\n if (z instanceof Error) {\n return error.value;\n }\n\n return cumulative ? jStat.normal.cdf(z, 0, 1) : jStat.normal.pdf(z, 0, 1);\n};\n\nexports.NORM.S.INV = function (probability) {\n probability = utils.parseNumber(probability);\n\n if (probability instanceof Error) {\n return error.value;\n }\n\n return jStat.normal.inv(probability, 0, 1);\n};\n\nexports.PEARSON = function (data_x, data_y) {\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n\n if (utils.anyIsError(data_y, data_x)) {\n return error.value;\n }\n\n var xmean = jStat.mean(data_x);\n var ymean = jStat.mean(data_y);\n var n = data_x.length;\n var num = 0;\n var den1 = 0;\n var den2 = 0;\n\n for (var i = 0; i < n; i++) {\n num += (data_x[i] - xmean) * (data_y[i] - ymean);\n den1 += Math.pow(data_x[i] - xmean, 2);\n den2 += Math.pow(data_y[i] - ymean, 2);\n }\n\n return num / Math.sqrt(den1 * den2);\n};\n\nexports.PERCENTILE = {};\n\nexports.PERCENTILE.EXC = function (array, k) {\n array = utils.parseNumberArray(utils.flatten(array));\n k = utils.parseNumber(k);\n\n if (utils.anyIsError(array, k)) {\n return error.value;\n }\n\n array = array.sort(function (a, b) {\n {\n return a - b;\n }\n });\n var n = array.length;\n\n if (k < 1 / (n + 1) || k > 1 - 1 / (n + 1)) {\n return error.num;\n }\n\n var l = k * (n + 1) - 1;\n var fl = Math.floor(l);\n return utils.cleanFloat(l === fl ? array[l] : array[fl] + (l - fl) * (array[fl + 1] - array[fl]));\n};\n\nexports.PERCENTILE.INC = function (array, k) {\n array = utils.parseNumberArray(utils.flatten(array));\n k = utils.parseNumber(k);\n\n if (utils.anyIsError(array, k)) {\n return error.value;\n }\n\n array = array.sort(function (a, b) {\n return a - b;\n });\n var n = array.length;\n var l = k * (n - 1);\n var fl = Math.floor(l);\n return utils.cleanFloat(l === fl ? array[l] : array[fl] + (l - fl) * (array[fl + 1] - array[fl]));\n};\n\nexports.PERCENTRANK = {};\n\nexports.PERCENTRANK.EXC = function (array, x, significance) {\n significance = significance === undefined ? 3 : significance;\n array = utils.parseNumberArray(utils.flatten(array));\n x = utils.parseNumber(x);\n significance = utils.parseNumber(significance);\n\n if (utils.anyIsError(array, x, significance)) {\n return error.value;\n }\n\n array = array.sort(function (a, b) {\n return a - b;\n });\n var uniques = misc.UNIQUE.apply(null, array);\n var n = array.length;\n var m = uniques.length;\n var power = Math.pow(10, significance);\n var result = 0;\n var match = false;\n var i = 0;\n\n while (!match && i < m) {\n if (x === uniques[i]) {\n result = (array.indexOf(uniques[i]) + 1) / (n + 1);\n match = true;\n } else if (x >= uniques[i] && (x < uniques[i + 1] || i === m - 1)) {\n result = (array.indexOf(uniques[i]) + 1 + (x - uniques[i]) / (uniques[i + 1] - uniques[i])) / (n + 1);\n match = true;\n }\n\n i++;\n }\n\n return Math.floor(result * power) / power;\n};\n\nexports.PERCENTRANK.INC = function (array, x, significance) {\n significance = significance === undefined ? 3 : significance;\n array = utils.parseNumberArray(utils.flatten(array));\n x = utils.parseNumber(x);\n significance = utils.parseNumber(significance);\n\n if (utils.anyIsError(array, x, significance)) {\n return error.value;\n }\n\n array = array.sort(function (a, b) {\n return a - b;\n });\n var uniques = misc.UNIQUE.apply(null, array);\n var n = array.length;\n var m = uniques.length;\n var power = Math.pow(10, significance);\n var result = 0;\n var match = false;\n var i = 0;\n\n while (!match && i < m) {\n if (x === uniques[i]) {\n result = array.indexOf(uniques[i]) / (n - 1);\n match = true;\n } else if (x >= uniques[i] && (x < uniques[i + 1] || i === m - 1)) {\n result = (array.indexOf(uniques[i]) + (x - uniques[i]) / (uniques[i + 1] - uniques[i])) / (n - 1);\n match = true;\n }\n\n i++;\n }\n\n return Math.floor(result * power) / power;\n};\n\nexports.PERMUT = function (number, number_chosen) {\n number = utils.parseNumber(number);\n number_chosen = utils.parseNumber(number_chosen);\n\n if (utils.anyIsError(number, number_chosen)) {\n return error.value;\n }\n\n return mathTrig.FACT(number) / mathTrig.FACT(number - number_chosen);\n};\n\nexports.PERMUTATIONA = function (number, number_chosen) {\n number = utils.parseNumber(number);\n number_chosen = utils.parseNumber(number_chosen);\n\n if (utils.anyIsError(number, number_chosen)) {\n return error.value;\n }\n\n return Math.pow(number, number_chosen);\n};\n\nexports.PHI = function (x) {\n x = utils.parseNumber(x);\n\n if (x instanceof Error) {\n return error.value;\n }\n\n return Math.exp(-0.5 * x * x) / SQRT2PI;\n};\n\nexports.POISSON = {};\n\nexports.POISSON.DIST = function (x, mean, cumulative) {\n x = utils.parseNumber(x);\n mean = utils.parseNumber(mean);\n\n if (utils.anyIsError(x, mean)) {\n return error.value;\n }\n\n return cumulative ? jStat.poisson.cdf(x, mean) : jStat.poisson.pdf(x, mean);\n};\n\nexports.PROB = function (range, probability, lower, upper) {\n if (lower === undefined) {\n return 0;\n }\n\n upper = upper === undefined ? lower : upper;\n range = utils.parseNumberArray(utils.flatten(range));\n probability = utils.parseNumberArray(utils.flatten(probability));\n lower = utils.parseNumber(lower);\n upper = utils.parseNumber(upper);\n\n if (utils.anyIsError(range, probability, lower, upper)) {\n return error.value;\n }\n\n if (lower === upper) {\n return range.indexOf(lower) >= 0 ? probability[range.indexOf(lower)] : 0;\n }\n\n var sorted = range.sort(function (a, b) {\n return a - b;\n });\n var n = sorted.length;\n var result = 0;\n\n for (var i = 0; i < n; i++) {\n if (sorted[i] >= lower && sorted[i] <= upper) {\n result += probability[range.indexOf(sorted[i])];\n }\n }\n\n return result;\n};\n\nexports.QUARTILE = {};\n\nexports.QUARTILE.EXC = function (range, quart) {\n range = utils.parseNumberArray(utils.flatten(range));\n quart = utils.parseNumber(quart);\n\n if (utils.anyIsError(range, quart)) {\n return error.value;\n }\n\n switch (quart) {\n case 1:\n return exports.PERCENTILE.EXC(range, 0.25);\n\n case 2:\n return exports.PERCENTILE.EXC(range, 0.5);\n\n case 3:\n return exports.PERCENTILE.EXC(range, 0.75);\n\n default:\n return error.num;\n }\n};\n\nexports.QUARTILE.INC = function (range, quart) {\n range = utils.parseNumberArray(utils.flatten(range));\n quart = utils.parseNumber(quart);\n\n if (utils.anyIsError(range, quart)) {\n return error.value;\n }\n\n switch (quart) {\n case 1:\n return exports.PERCENTILE.INC(range, 0.25);\n\n case 2:\n return exports.PERCENTILE.INC(range, 0.5);\n\n case 3:\n return exports.PERCENTILE.INC(range, 0.75);\n\n default:\n return error.num;\n }\n};\n\nexports.RANK = {};\n\nexports.RANK.AVG = function (number, range, order) {\n number = utils.parseNumber(number);\n range = utils.parseNumberArray(utils.flatten(range));\n\n if (utils.anyIsError(number, range)) {\n return error.value;\n }\n\n range = utils.flatten(range);\n order = order || false;\n var sort = order ? function (a, b) {\n return a - b;\n } : function (a, b) {\n return b - a;\n };\n range = range.sort(sort);\n var length = range.length;\n var count = 0;\n\n for (var i = 0; i < length; i++) {\n if (range[i] === number) {\n count++;\n }\n }\n\n return count > 1 ? (2 * range.indexOf(number) + count + 1) / 2 : range.indexOf(number) + 1;\n};\n\nexports.RANK.EQ = function (number, range, order) {\n number = utils.parseNumber(number);\n range = utils.parseNumberArray(utils.flatten(range));\n\n if (utils.anyIsError(number, range)) {\n return error.value;\n }\n\n order = order || false;\n var sort = order ? function (a, b) {\n return a - b;\n } : function (a, b) {\n return b - a;\n };\n range = range.sort(sort);\n return range.indexOf(number) + 1;\n};\n\nexports.ROW = function (matrix, index) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n if (index < 0) {\n return error.num;\n }\n\n if (!(matrix instanceof Array) || typeof index !== 'number') {\n return error.value;\n }\n\n if (matrix.length === 0) {\n return undefined;\n }\n\n return jStat.row(matrix, index);\n};\n\nexports.ROWS = function (matrix) {\n if (arguments.length !== 1) {\n return error.na;\n }\n\n if (!(matrix instanceof Array)) {\n return error.value;\n }\n\n if (matrix.length === 0) {\n return 0;\n }\n\n return jStat.rows(matrix);\n};\n\nexports.RSQ = function (data_x, data_y) {\n // no need to flatten here, PEARSON will take care of that\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n\n if (utils.anyIsError(data_x, data_y)) {\n return error.value;\n }\n\n return Math.pow(exports.PEARSON(data_x, data_y), 2);\n};\n\nexports.SKEW = function () {\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n var mean = jStat.mean(range);\n var n = range.length;\n var sigma = 0;\n\n for (var i = 0; i < n; i++) {\n sigma += Math.pow(range[i] - mean, 3);\n }\n\n return n * sigma / ((n - 1) * (n - 2) * Math.pow(jStat.stdev(range, true), 3));\n};\n\nexports.SKEW.P = function () {\n var range = utils.parseNumberArray(utils.flatten(arguments));\n\n if (range instanceof Error) {\n return range;\n }\n\n var mean = jStat.mean(range);\n var n = range.length;\n var m2 = 0;\n var m3 = 0;\n\n for (var i = 0; i < n; i++) {\n m3 += Math.pow(range[i] - mean, 3);\n m2 += Math.pow(range[i] - mean, 2);\n }\n\n m3 = m3 / n;\n m2 = m2 / n;\n return m3 / Math.pow(m2, 3 / 2);\n};\n\nexports.SLOPE = function (data_y, data_x) {\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n\n if (utils.anyIsError(data_y, data_x)) {\n return error.value;\n }\n\n var xmean = jStat.mean(data_x);\n var ymean = jStat.mean(data_y);\n var n = data_x.length;\n var num = 0;\n var den = 0;\n\n for (var i = 0; i < n; i++) {\n num += (data_x[i] - xmean) * (data_y[i] - ymean);\n den += Math.pow(data_x[i] - xmean, 2);\n }\n\n return num / den;\n};\n\nexports.SMALL = function (range, k) {\n range = utils.parseNumberArray(utils.flatten(range));\n k = utils.parseNumber(k);\n\n if (utils.anyIsError(range, k)) {\n return range;\n }\n\n return range.sort(function (a, b) {\n return a - b;\n })[k - 1];\n};\n\nexports.STANDARDIZE = function (x, mean, sd) {\n x = utils.parseNumber(x);\n mean = utils.parseNumber(mean);\n sd = utils.parseNumber(sd);\n\n if (utils.anyIsError(x, mean, sd)) {\n return error.value;\n }\n\n return (x - mean) / sd;\n};\n\nexports.STDEV = {};\n\nexports.STDEV.P = function () {\n var v = exports.VAR.P.apply(this, arguments);\n var result = Math.sqrt(v);\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.STDEV.S = function () {\n var v = exports.VAR.S.apply(this, arguments);\n var result = Math.sqrt(v);\n return result;\n};\n\nexports.STDEVA = function () {\n var v = exports.VARA.apply(this, arguments);\n var result = Math.sqrt(v);\n return result;\n};\n\nexports.STDEVPA = function () {\n var v = exports.VARPA.apply(this, arguments);\n var result = Math.sqrt(v);\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.STEYX = function (data_y, data_x) {\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n\n if (utils.anyIsError(data_y, data_x)) {\n return error.value;\n }\n\n var xmean = jStat.mean(data_x);\n var ymean = jStat.mean(data_y);\n var n = data_x.length;\n var lft = 0;\n var num = 0;\n var den = 0;\n\n for (var i = 0; i < n; i++) {\n lft += Math.pow(data_y[i] - ymean, 2);\n num += (data_x[i] - xmean) * (data_y[i] - ymean);\n den += Math.pow(data_x[i] - xmean, 2);\n }\n\n return Math.sqrt((lft - num * num / den) / (n - 2));\n};\n\nexports.TRANSPOSE = function (matrix) {\n if (!matrix) {\n return error.na;\n }\n\n return jStat.transpose(matrix);\n};\n\nexports.T = text.T;\n\nexports.T.DIST = function (x, df, cumulative) {\n x = utils.parseNumber(x);\n df = utils.parseNumber(df);\n\n if (utils.anyIsError(x, df)) {\n return error.value;\n }\n\n return cumulative ? jStat.studentt.cdf(x, df) : jStat.studentt.pdf(x, df);\n};\n\nexports.T.DIST['2T'] = function (x, df) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n if (x < 0 || df < 1) {\n return error.num;\n }\n\n if (typeof x !== 'number' || typeof df !== 'number') {\n return error.value;\n }\n\n return (1 - jStat.studentt.cdf(x, df)) * 2;\n};\n\nexports.T.DIST.RT = function (x, df) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n if (x < 0 || df < 1) {\n return error.num;\n }\n\n if (typeof x !== 'number' || typeof df !== 'number') {\n return error.value;\n }\n\n return 1 - jStat.studentt.cdf(x, df);\n};\n\nexports.T.INV = function (probability, df) {\n probability = utils.parseNumber(probability);\n df = utils.parseNumber(df);\n\n if (utils.anyIsError(probability, df)) {\n return error.value;\n }\n\n return jStat.studentt.inv(probability, df);\n};\n\nexports.T.INV['2T'] = function (probability, df) {\n probability = utils.parseNumber(probability);\n df = utils.parseNumber(df);\n\n if (probability <= 0 || probability > 1 || df < 1) {\n return error.num;\n }\n\n if (utils.anyIsError(probability, df)) {\n return error.value;\n }\n\n return Math.abs(jStat.studentt.inv(probability / 2, df));\n}; // The algorithm can be found here:\n// http://www.chem.uoa.gr/applets/AppletTtest/Appl_Ttest2.html\n\n\nexports.T.TEST = function (data_x, data_y) {\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n\n if (utils.anyIsError(data_x, data_y)) {\n return error.value;\n }\n\n var mean_x = jStat.mean(data_x);\n var mean_y = jStat.mean(data_y);\n var s_x = 0;\n var s_y = 0;\n var i;\n\n for (i = 0; i < data_x.length; i++) {\n s_x += Math.pow(data_x[i] - mean_x, 2);\n }\n\n for (i = 0; i < data_y.length; i++) {\n s_y += Math.pow(data_y[i] - mean_y, 2);\n }\n\n s_x = s_x / (data_x.length - 1);\n s_y = s_y / (data_y.length - 1);\n var t = Math.abs(mean_x - mean_y) / Math.sqrt(s_x / data_x.length + s_y / data_y.length);\n return exports.T.DIST['2T'](t, data_x.length + data_y.length - 2);\n};\n\nexports.TREND = function (data_y, data_x, new_data_x) {\n data_y = utils.parseNumberArray(utils.flatten(data_y));\n data_x = utils.parseNumberArray(utils.flatten(data_x));\n new_data_x = utils.parseNumberArray(utils.flatten(new_data_x));\n\n if (utils.anyIsError(data_y, data_x, new_data_x)) {\n return error.value;\n }\n\n var linest = exports.LINEST(data_y, data_x);\n var m = linest[0];\n var b = linest[1];\n var result = [];\n new_data_x.forEach(function (x) {\n result.push(m * x + b);\n });\n return result;\n};\n\nexports.TRIMMEAN = function (range, percent) {\n range = utils.parseNumberArray(utils.flatten(range));\n percent = utils.parseNumber(percent);\n\n if (utils.anyIsError(range, percent)) {\n return error.value;\n }\n\n var trim = mathTrig.FLOOR(range.length * percent, 2) / 2;\n return jStat.mean(utils.initial(utils.rest(range.sort(function (a, b) {\n return a - b;\n }), trim), trim));\n};\n\nexports.VAR = {};\n\nexports.VAR.P = function () {\n var range = utils.numbers(utils.flatten(arguments));\n var n = range.length;\n var sigma = 0;\n var mean = exports.AVERAGE(range);\n var result;\n\n for (var i = 0; i < n; i++) {\n sigma += Math.pow(range[i] - mean, 2);\n }\n\n result = sigma / n;\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.VAR.S = function () {\n var range = utils.numbers(utils.flatten(arguments));\n var n = range.length;\n var sigma = 0;\n var mean = exports.AVERAGE(range);\n\n for (var i = 0; i < n; i++) {\n sigma += Math.pow(range[i] - mean, 2);\n }\n\n return sigma / (n - 1);\n};\n\nexports.VARA = function () {\n var range = utils.flatten(arguments);\n var n = range.length;\n var sigma = 0;\n var count = 0;\n var mean = exports.AVERAGEA(range);\n\n for (var i = 0; i < n; i++) {\n var el = range[i];\n\n if (typeof el === 'number') {\n sigma += Math.pow(el - mean, 2);\n } else if (el === true) {\n sigma += Math.pow(1 - mean, 2);\n } else {\n sigma += Math.pow(0 - mean, 2);\n }\n\n if (el !== null) {\n count++;\n }\n }\n\n return sigma / (count - 1);\n};\n\nexports.VARPA = function () {\n var range = utils.flatten(arguments);\n var n = range.length;\n var sigma = 0;\n var count = 0;\n var mean = exports.AVERAGEA(range);\n var result;\n\n for (var i = 0; i < n; i++) {\n var el = range[i];\n\n if (typeof el === 'number') {\n sigma += Math.pow(el - mean, 2);\n } else if (el === true) {\n sigma += Math.pow(1 - mean, 2);\n } else {\n sigma += Math.pow(0 - mean, 2);\n }\n\n if (el !== null) {\n count++;\n }\n }\n\n result = sigma / count;\n\n if (isNaN(result)) {\n result = error.num;\n }\n\n return result;\n};\n\nexports.WEIBULL = {};\n\nexports.WEIBULL.DIST = function (x, alpha, beta, cumulative) {\n x = utils.parseNumber(x);\n alpha = utils.parseNumber(alpha);\n beta = utils.parseNumber(beta);\n\n if (utils.anyIsError(x, alpha, beta)) {\n return error.value;\n }\n\n return cumulative ? 1 - Math.exp(-Math.pow(x / beta, alpha)) : Math.pow(x, alpha - 1) * Math.exp(-Math.pow(x / beta, alpha)) * alpha / Math.pow(beta, alpha);\n};\n\nexports.Z = {};\n\nexports.Z.TEST = function (range, x, sd) {\n range = utils.parseNumberArray(utils.flatten(range));\n x = utils.parseNumber(x);\n\n if (utils.anyIsError(range, x)) {\n return error.value;\n }\n\n sd = sd || exports.STDEV.S(range);\n var n = range.length;\n return 1 - exports.NORM.S.DIST((exports.AVERAGE(range) - x) / (sd / Math.sqrt(n)), true);\n};","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=script&lang=js&\"","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return $getOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]'\n ? getWindowNames(it)\n : $getOwnPropertyNames(toIndexedObject(it));\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg, 3) : false;\n var element;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","var anObject = require('../internals/an-object');\n\nmodule.exports = function (iterator) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) {\n return anObject(returnMethod.call(iterator)).value;\n }\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return NativeArrayBuffer.name != ARRAY_BUFFER;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n","var toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length or index');\n return length;\n};\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar create = require('../internals/object-create');\nvar redefineAll = require('../internals/redefine-all');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/define-iterator');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return C;\n },\n setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return { value: undefined, done: true };\n }\n // return step by kind\n if (kind == 'keys') return { value: entry.key, done: false };\n if (kind == 'values') return { value: entry.value, done: false };\n return { value: [entry.key, entry.value], done: false };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","var log = Math.log;\n\n// `Math.log1p` method implementation\n// https://tc39.es/ecma262/#sec-math.log1p\n// eslint-disable-next-line es/no-math-log1p -- safe\nmodule.exports = Math.log1p || function log1p(x) {\n return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x);\n};\n","var isObject = require('../internals/is-object');\n\nvar floor = Math.floor;\n\n// `Number.isInteger` method implementation\n// https://tc39.es/ecma262/#sec-number.isinteger\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","'use strict';\nvar aFunction = require('../internals/a-function');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('../internals/to-length');\nvar repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = String(requireObjectCoercible($this));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.es/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.es/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/engine-user-agent');\n\n// eslint-disable-next-line unicorn/no-unsafe-regex -- safe\nmodule.exports = /Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(userAgent);\n","var toPositiveInteger = require('../internals/to-positive-integer');\n\nmodule.exports = function (it, BYTES) {\n var offset = toPositiveInteger(it);\n if (offset % BYTES) throw RangeError('Wrong offset');\n return offset;\n};\n","var toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar bind = require('../internals/function-bind-context');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, step, iterator, next;\n if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n O = [];\n while (!(step = next.call(iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2], 2);\n }\n length = toLength(O.length);\n result = new (aTypedArrayConstructor(this))(length);\n for (i = 0; length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n};\n","'use strict';\nvar redefineAll = require('../internals/redefine-all');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar $has = require('../internals/has');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (store) {\n return store.frozen || (store.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n return find(store.entries, function (it) {\n return it[0] === key;\n });\n};\n\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) this.entries.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n id: id++,\n frozen: undefined\n });\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && $has(data, state.id) && delete data[state.id];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && $has(data, state.id);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return C;\n }\n};\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar hasOwn = require('../internals/has');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $fetch = getBuiltIn('fetch');\nvar Headers = getBuiltIn('Headers');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (typeof iteratorMethod === 'function') {\n iterator = iteratorMethod.call(init);\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = entryNext.call(entryIterator)).done ||\n (second = entryNext.call(entryIterator)).done ||\n !entryNext.call(entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: first.value + '', value: second.value + '' });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });\n } else {\n parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: name + '', value: value + '' });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = name + '';\n var val = value + '';\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` for correct work with polyfilled `URLSearchParams`\n// https://github.com/zloirock/core-js/issues/674\nif (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {\n $({ global: true, enumerable: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n var args = [input];\n var init, body, headers;\n if (arguments.length > 1) {\n init = arguments[1];\n if (isObject(init)) {\n body = init.body;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headers.has('content-type')) {\n headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n init = create(init, {\n body: createPropertyDescriptor(0, String(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n }\n args.push(init);\n } return $fetch.apply(this, args);\n }\n });\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","var ListCache = require(\"./_ListCache\"),\n stackClear = require(\"./_stackClear\"),\n stackDelete = require(\"./_stackDelete\"),\n stackGet = require(\"./_stackGet\"),\n stackHas = require(\"./_stackHas\"),\n stackSet = require(\"./_stackSet\");\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\n\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n} // Add methods to `Stack`.\n\n\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\nmodule.exports = Stack;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = (typeof global === \"undefined\" ? \"undefined\" : _typeof(global)) == 'object' && global && global.Object === Object && global;\nmodule.exports = freeGlobal;","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n\n try {\n return func + '';\n } catch (e) {}\n }\n\n return '';\n}\n\nmodule.exports = toSource;","var mapCacheClear = require(\"./_mapCacheClear\"),\n mapCacheDelete = require(\"./_mapCacheDelete\"),\n mapCacheGet = require(\"./_mapCacheGet\"),\n mapCacheHas = require(\"./_mapCacheHas\"),\n mapCacheSet = require(\"./_mapCacheSet\");\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\n\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n} // Add methods to `MapCache`.\n\n\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\nmodule.exports = MapCache;","var SetCache = require(\"./_SetCache\"),\n arraySome = require(\"./_arraySome\"),\n cacheHas = require(\"./_cacheHas\");\n/** Used to compose bitmasks for value comparisons. */\n\n\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n } // Check that cyclic values are equal.\n\n\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n\n var index = -1,\n result = true,\n seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;\n stack.set(array, other);\n stack.set(other, array); // Ignore non-index properties.\n\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);\n }\n\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n\n result = false;\n break;\n } // Recursively compare arrays (susceptible to call stack limits).\n\n\n if (seen) {\n if (!arraySome(other, function (othValue, othIndex) {\n if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n result = false;\n break;\n }\n }\n\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;","var root = require(\"./_root\");\n/** Built-in value references. */\n\n\nvar Uint8Array = root.Uint8Array;\nmodule.exports = Uint8Array;","var baseTimes = require(\"./_baseTimes\"),\n isArguments = require(\"./isArguments\"),\n isArray = require(\"./isArray\"),\n isBuffer = require(\"./isBuffer\"),\n isIndex = require(\"./_isIndex\"),\n isTypedArray = require(\"./isTypedArray\");\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.\n isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays.\n isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.\n isIndex(key, length)))) {\n result.push(key);\n }\n }\n\n return result;\n}\n\nmodule.exports = arrayLikeKeys;","var baseIsArguments = require(\"./_baseIsArguments\"),\n isObjectLike = require(\"./isObjectLike\");\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Built-in value references. */\n\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n\nvar isArguments = baseIsArguments(function () {\n return arguments;\n}()) ? baseIsArguments : function (value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n};\nmodule.exports = isArguments;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n/** Used to detect unsigned integer values. */\n\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n\nfunction isIndex(value, length) {\n var type = _typeof(value);\n\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;","var baseAssignValue = require(\"./_baseAssignValue\"),\n eq = require(\"./eq\");\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n\n\nfunction assignMergeValue(object, key, value) {\n if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;","var getNative = require(\"./_getNative\");\n\nvar defineProperty = function () {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}();\n\nmodule.exports = defineProperty;","var overArg = require(\"./_overArg\");\n/** Built-in value references. */\n\n\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\nmodule.exports = getPrototype;","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;","var arrayLikeKeys = require(\"./_arrayLikeKeys\"),\n baseKeysIn = require(\"./_baseKeysIn\"),\n isArrayLike = require(\"./isArrayLike\");\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n\n\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;","// shim for using process in browser\nvar process = module.exports = {}; // cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\n\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n } // if setTimeout wasn't available but was latter defined\n\n\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\n\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n } // if clearTimeout wasn't available but was latter defined\n\n\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\n\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n\n draining = false;\n\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n\n while (len) {\n currentQueue = queue;\n queue = [];\n\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n\n queueIndex = -1;\n len = queue.length;\n }\n\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n\n queue.push(new Item(fun, args));\n\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}; // v8 likes predictible objects\n\n\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\n\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\n\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) {\n return [];\n};\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () {\n return '/';\n};\n\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\nprocess.umask = function () {\n return 0;\n};","module.exports = function (originalModule) {\n if (!originalModule.webpackPolyfill) {\n var module = Object.create(originalModule); // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n Object.defineProperty(module, \"exports\", {\n enumerable: true\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*! @preserve\n * numeral.js\n * version : 2.0.6\n * author : Adam Draper\n * license : MIT\n * http://adamwdraper.github.com/Numeral-js/\n */\n(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n module.exports = factory();\n } else {\n global.numeral = factory();\n }\n})(this, function () {\n /************************************\n Variables\n ************************************/\n var _numeral,\n _,\n VERSION = '2.0.6',\n formats = {},\n locales = {},\n defaults = {\n currentLocale: 'en',\n zeroFormat: null,\n nullFormat: null,\n defaultFormat: '0,0',\n scalePercentBy100: true\n },\n options = {\n currentLocale: defaults.currentLocale,\n zeroFormat: defaults.zeroFormat,\n nullFormat: defaults.nullFormat,\n defaultFormat: defaults.defaultFormat,\n scalePercentBy100: defaults.scalePercentBy100\n };\n /************************************\n Constructors\n ************************************/\n // Numeral prototype object\n\n\n function Numeral(input, number) {\n this._input = input;\n this._value = number;\n }\n\n _numeral = function numeral(input) {\n var value, kind, unformatFunction, regexp;\n\n if (_numeral.isNumeral(input)) {\n value = input.value();\n } else if (input === 0 || typeof input === 'undefined') {\n value = 0;\n } else if (input === null || _.isNaN(input)) {\n value = null;\n } else if (typeof input === 'string') {\n if (options.zeroFormat && input === options.zeroFormat) {\n value = 0;\n } else if (options.nullFormat && input === options.nullFormat || !input.replace(/[^0-9]+/g, '').length) {\n value = null;\n } else {\n for (kind in formats) {\n regexp = typeof formats[kind].regexps.unformat === 'function' ? formats[kind].regexps.unformat() : formats[kind].regexps.unformat;\n\n if (regexp && input.match(regexp)) {\n unformatFunction = formats[kind].unformat;\n break;\n }\n }\n\n unformatFunction = unformatFunction || _numeral._.stringToNumber;\n value = unformatFunction(input);\n }\n } else {\n value = Number(input) || null;\n }\n\n return new Numeral(input, value);\n }; // version number\n\n\n _numeral.version = VERSION; // compare numeral object\n\n _numeral.isNumeral = function (obj) {\n return obj instanceof Numeral;\n }; // helper functions\n\n\n _numeral._ = _ = {\n // formats numbers separators, decimals places, signs, abbreviations\n numberToFormat: function numberToFormat(value, format, roundingFunction) {\n var locale = locales[_numeral.options.currentLocale],\n negP = false,\n optDec = false,\n leadingCount = 0,\n abbr = '',\n trillion = 1000000000000,\n billion = 1000000000,\n million = 1000000,\n thousand = 1000,\n decimal = '',\n neg = false,\n abbrForce,\n // force abbreviation\n abs,\n min,\n max,\n power,\n int,\n precision,\n signed,\n thousands,\n output; // make sure we never format a null value\n\n value = value || 0;\n abs = Math.abs(value); // see if we should use parentheses for negative number or if we should prefix with a sign\n // if both are present we default to parentheses\n\n if (_numeral._.includes(format, '(')) {\n negP = true;\n format = format.replace(/[\\(|\\)]/g, '');\n } else if (_numeral._.includes(format, '+') || _numeral._.includes(format, '-')) {\n signed = _numeral._.includes(format, '+') ? format.indexOf('+') : value < 0 ? format.indexOf('-') : -1;\n format = format.replace(/[\\+|\\-]/g, '');\n } // see if abbreviation is wanted\n\n\n if (_numeral._.includes(format, 'a')) {\n abbrForce = format.match(/a(k|m|b|t)?/);\n abbrForce = abbrForce ? abbrForce[1] : false; // check for space before abbreviation\n\n if (_numeral._.includes(format, ' a')) {\n abbr = ' ';\n }\n\n format = format.replace(new RegExp(abbr + 'a[kmbt]?'), '');\n\n if (abs >= trillion && !abbrForce || abbrForce === 't') {\n // trillion\n abbr += locale.abbreviations.trillion;\n value = value / trillion;\n } else if (abs < trillion && abs >= billion && !abbrForce || abbrForce === 'b') {\n // billion\n abbr += locale.abbreviations.billion;\n value = value / billion;\n } else if (abs < billion && abs >= million && !abbrForce || abbrForce === 'm') {\n // million\n abbr += locale.abbreviations.million;\n value = value / million;\n } else if (abs < million && abs >= thousand && !abbrForce || abbrForce === 'k') {\n // thousand\n abbr += locale.abbreviations.thousand;\n value = value / thousand;\n }\n } // check for optional decimals\n\n\n if (_numeral._.includes(format, '[.]')) {\n optDec = true;\n format = format.replace('[.]', '.');\n } // break number and format\n\n\n int = value.toString().split('.')[0];\n precision = format.split('.')[1];\n thousands = format.indexOf(',');\n leadingCount = (format.split('.')[0].split(',')[0].match(/0/g) || []).length;\n\n if (precision) {\n if (_numeral._.includes(precision, '[')) {\n precision = precision.replace(']', '');\n precision = precision.split('[');\n decimal = _numeral._.toFixed(value, precision[0].length + precision[1].length, roundingFunction, precision[1].length);\n } else {\n decimal = _numeral._.toFixed(value, precision.length, roundingFunction);\n }\n\n int = decimal.split('.')[0];\n\n if (_numeral._.includes(decimal, '.')) {\n decimal = locale.delimiters.decimal + decimal.split('.')[1];\n } else {\n decimal = '';\n }\n\n if (optDec && Number(decimal.slice(1)) === 0) {\n decimal = '';\n }\n } else {\n int = _numeral._.toFixed(value, 0, roundingFunction);\n } // check abbreviation again after rounding\n\n\n if (abbr && !abbrForce && Number(int) >= 1000 && abbr !== locale.abbreviations.trillion) {\n int = String(Number(int) / 1000);\n\n switch (abbr) {\n case locale.abbreviations.thousand:\n abbr = locale.abbreviations.million;\n break;\n\n case locale.abbreviations.million:\n abbr = locale.abbreviations.billion;\n break;\n\n case locale.abbreviations.billion:\n abbr = locale.abbreviations.trillion;\n break;\n }\n } // format number\n\n\n if (_numeral._.includes(int, '-')) {\n int = int.slice(1);\n neg = true;\n }\n\n if (int.length < leadingCount) {\n for (var i = leadingCount - int.length; i > 0; i--) {\n int = '0' + int;\n }\n }\n\n if (thousands > -1) {\n int = int.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1' + locale.delimiters.thousands);\n }\n\n if (format.indexOf('.') === 0) {\n int = '';\n }\n\n output = int + decimal + (abbr ? abbr : '');\n\n if (negP) {\n output = (negP && neg ? '(' : '') + output + (negP && neg ? ')' : '');\n } else {\n if (signed >= 0) {\n output = signed === 0 ? (neg ? '-' : '+') + output : output + (neg ? '-' : '+');\n } else if (neg) {\n output = '-' + output;\n }\n }\n\n return output;\n },\n // unformats numbers separators, decimals places, signs, abbreviations\n stringToNumber: function stringToNumber(string) {\n var locale = locales[options.currentLocale],\n stringOriginal = string,\n abbreviations = {\n thousand: 3,\n million: 6,\n billion: 9,\n trillion: 12\n },\n abbreviation,\n value,\n i,\n regexp;\n\n if (options.zeroFormat && string === options.zeroFormat) {\n value = 0;\n } else if (options.nullFormat && string === options.nullFormat || !string.replace(/[^0-9]+/g, '').length) {\n value = null;\n } else {\n value = 1;\n\n if (locale.delimiters.decimal !== '.') {\n string = string.replace(/\\./g, '').replace(locale.delimiters.decimal, '.');\n }\n\n for (abbreviation in abbreviations) {\n regexp = new RegExp('[^a-zA-Z]' + locale.abbreviations[abbreviation] + '(?:\\\\)|(\\\\' + locale.currency.symbol + ')?(?:\\\\))?)?$');\n\n if (stringOriginal.match(regexp)) {\n value *= Math.pow(10, abbreviations[abbreviation]);\n break;\n }\n } // check for negative number\n\n\n value *= (string.split('-').length + Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2 ? 1 : -1; // remove non numbers\n\n string = string.replace(/[^0-9\\.]+/g, '');\n value *= Number(string);\n }\n\n return value;\n },\n isNaN: function (_isNaN) {\n function isNaN(_x) {\n return _isNaN.apply(this, arguments);\n }\n\n isNaN.toString = function () {\n return _isNaN.toString();\n };\n\n return isNaN;\n }(function (value) {\n return typeof value === 'number' && isNaN(value);\n }),\n includes: function includes(string, search) {\n return string.indexOf(search) !== -1;\n },\n insert: function insert(string, subString, start) {\n return string.slice(0, start) + subString + string.slice(start);\n },\n reduce: function reduce(array, callback\n /*, initialValue*/\n ) {\n if (this === null) {\n throw new TypeError('Array.prototype.reduce called on null or undefined');\n }\n\n if (typeof callback !== 'function') {\n throw new TypeError(callback + ' is not a function');\n }\n\n var t = Object(array),\n len = t.length >>> 0,\n k = 0,\n value;\n\n if (arguments.length === 3) {\n value = arguments[2];\n } else {\n while (k < len && !(k in t)) {\n k++;\n }\n\n if (k >= len) {\n throw new TypeError('Reduce of empty array with no initial value');\n }\n\n value = t[k++];\n }\n\n for (; k < len; k++) {\n if (k in t) {\n value = callback(value, t[k], k, t);\n }\n }\n\n return value;\n },\n\n /**\n * Computes the multiplier necessary to make x >= 1,\n * effectively eliminating miscalculations caused by\n * finite precision.\n */\n multiplier: function multiplier(x) {\n var parts = x.toString().split('.');\n return parts.length < 2 ? 1 : Math.pow(10, parts[1].length);\n },\n\n /**\n * Given a variable number of arguments, returns the maximum\n * multiplier that must be used to normalize an operation involving\n * all of them.\n */\n correctionFactor: function correctionFactor() {\n var args = Array.prototype.slice.call(arguments);\n return args.reduce(function (accum, next) {\n var mn = _.multiplier(next);\n\n return accum > mn ? accum : mn;\n }, 1);\n },\n\n /**\n * Implementation of toFixed() that treats floats more like decimals\n *\n * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present\n * problems for accounting- and finance-related software.\n */\n toFixed: function toFixed(value, maxDecimals, roundingFunction, optionals) {\n var splitValue = value.toString().split('.'),\n minDecimals = maxDecimals - (optionals || 0),\n boundedPrecision,\n optionalsRegExp,\n power,\n output; // Use the smallest precision value possible to avoid errors from floating point representation\n\n if (splitValue.length === 2) {\n boundedPrecision = Math.min(Math.max(splitValue[1].length, minDecimals), maxDecimals);\n } else {\n boundedPrecision = minDecimals;\n }\n\n power = Math.pow(10, boundedPrecision); // Multiply up by precision, round accurately, then divide and use native toFixed():\n\n output = (roundingFunction(value + 'e+' + boundedPrecision) / power).toFixed(boundedPrecision);\n\n if (optionals > maxDecimals - boundedPrecision) {\n optionalsRegExp = new RegExp('\\\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }\n }; // avaliable options\n\n _numeral.options = options; // avaliable formats\n\n _numeral.formats = formats; // avaliable formats\n\n _numeral.locales = locales; // This function sets the current locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n _numeral.locale = function (key) {\n if (key) {\n options.currentLocale = key.toLowerCase();\n }\n\n return options.currentLocale;\n }; // This function provides access to the loaded locale data. If\n // no arguments are passed in, it will simply return the current\n // global locale object.\n\n\n _numeral.localeData = function (key) {\n if (!key) {\n return locales[options.currentLocale];\n }\n\n key = key.toLowerCase();\n\n if (!locales[key]) {\n throw new Error('Unknown locale : ' + key);\n }\n\n return locales[key];\n };\n\n _numeral.reset = function () {\n for (var property in defaults) {\n options[property] = defaults[property];\n }\n };\n\n _numeral.zeroFormat = function (format) {\n options.zeroFormat = typeof format === 'string' ? format : null;\n };\n\n _numeral.nullFormat = function (format) {\n options.nullFormat = typeof format === 'string' ? format : null;\n };\n\n _numeral.defaultFormat = function (format) {\n options.defaultFormat = typeof format === 'string' ? format : '0.0';\n };\n\n _numeral.register = function (type, name, format) {\n name = name.toLowerCase();\n\n if (this[type + 's'][name]) {\n throw new TypeError(name + ' ' + type + ' already registered.');\n }\n\n this[type + 's'][name] = format;\n return format;\n };\n\n _numeral.validate = function (val, culture) {\n var _decimalSep, _thousandSep, _currSymbol, _valArray, _abbrObj, _thousandRegEx, localeData, temp; //coerce val to string\n\n\n if (typeof val !== 'string') {\n val += '';\n\n if (console.warn) {\n console.warn('Numeral.js: Value is not string. It has been co-erced to: ', val);\n }\n } //trim whitespaces from either sides\n\n\n val = val.trim(); //if val is just digits return true\n\n if (!!val.match(/^\\d+$/)) {\n return true;\n } //if val is empty return false\n\n\n if (val === '') {\n return false;\n } //get the decimal and thousands separator from numeral.localeData\n\n\n try {\n //check if the culture is understood by numeral. if not, default it to current locale\n localeData = _numeral.localeData(culture);\n } catch (e) {\n localeData = _numeral.localeData(_numeral.locale());\n } //setup the delimiters and currency symbol based on culture/locale\n\n\n _currSymbol = localeData.currency.symbol;\n _abbrObj = localeData.abbreviations;\n _decimalSep = localeData.delimiters.decimal;\n\n if (localeData.delimiters.thousands === '.') {\n _thousandSep = '\\\\.';\n } else {\n _thousandSep = localeData.delimiters.thousands;\n } // validating currency symbol\n\n\n temp = val.match(/^[^\\d]+/);\n\n if (temp !== null) {\n val = val.substr(1);\n\n if (temp[0] !== _currSymbol) {\n return false;\n }\n } //validating abbreviation symbol\n\n\n temp = val.match(/[^\\d]+$/);\n\n if (temp !== null) {\n val = val.slice(0, -1);\n\n if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million && temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {\n return false;\n }\n }\n\n _thousandRegEx = new RegExp(_thousandSep + '{2}');\n\n if (!val.match(/[^\\d.,]/g)) {\n _valArray = val.split(_decimalSep);\n\n if (_valArray.length > 2) {\n return false;\n } else {\n if (_valArray.length < 2) {\n return !!_valArray[0].match(/^\\d+.*\\d$/) && !_valArray[0].match(_thousandRegEx);\n } else {\n if (_valArray[0].length === 1) {\n return !!_valArray[0].match(/^\\d+$/) && !_valArray[0].match(_thousandRegEx) && !!_valArray[1].match(/^\\d+$/);\n } else {\n return !!_valArray[0].match(/^\\d+.*\\d$/) && !_valArray[0].match(_thousandRegEx) && !!_valArray[1].match(/^\\d+$/);\n }\n }\n }\n }\n\n return false;\n };\n /************************************\n Numeral Prototype\n ************************************/\n\n\n _numeral.fn = Numeral.prototype = {\n clone: function clone() {\n return _numeral(this);\n },\n format: function format(inputString, roundingFunction) {\n var value = this._value,\n format = inputString || options.defaultFormat,\n kind,\n output,\n formatFunction; // make sure we have a roundingFunction\n\n roundingFunction = roundingFunction || Math.round; // format based on value\n\n if (value === 0 && options.zeroFormat !== null) {\n output = options.zeroFormat;\n } else if (value === null && options.nullFormat !== null) {\n output = options.nullFormat;\n } else {\n for (kind in formats) {\n if (format.match(formats[kind].regexps.format)) {\n formatFunction = formats[kind].format;\n break;\n }\n }\n\n formatFunction = formatFunction || _numeral._.numberToFormat;\n output = formatFunction(value, format, roundingFunction);\n }\n\n return output;\n },\n value: function value() {\n return this._value;\n },\n input: function input() {\n return this._input;\n },\n set: function set(value) {\n this._value = Number(value);\n return this;\n },\n add: function add(value) {\n var corrFactor = _.correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr, currI, O) {\n return accum + Math.round(corrFactor * curr);\n }\n\n this._value = _.reduce([this._value, value], cback, 0) / corrFactor;\n return this;\n },\n subtract: function subtract(value) {\n var corrFactor = _.correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr, currI, O) {\n return accum - Math.round(corrFactor * curr);\n }\n\n this._value = _.reduce([value], cback, Math.round(this._value * corrFactor)) / corrFactor;\n return this;\n },\n multiply: function multiply(value) {\n function cback(accum, curr, currI, O) {\n var corrFactor = _.correctionFactor(accum, curr);\n\n return Math.round(accum * corrFactor) * Math.round(curr * corrFactor) / Math.round(corrFactor * corrFactor);\n }\n\n this._value = _.reduce([this._value, value], cback, 1);\n return this;\n },\n divide: function divide(value) {\n function cback(accum, curr, currI, O) {\n var corrFactor = _.correctionFactor(accum, curr);\n\n return Math.round(accum * corrFactor) / Math.round(curr * corrFactor);\n }\n\n this._value = _.reduce([this._value, value], cback);\n return this;\n },\n difference: function difference(value) {\n return Math.abs(_numeral(this._value).subtract(value).value());\n }\n };\n /************************************\n Default Locale && Format\n ************************************/\n\n _numeral.register('locale', 'en', {\n delimiters: {\n thousands: ',',\n decimal: '.'\n },\n abbreviations: {\n thousand: 'k',\n million: 'm',\n billion: 'b',\n trillion: 't'\n },\n ordinal: function ordinal(number) {\n var b = number % 10;\n return ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n },\n currency: {\n symbol: '$'\n }\n });\n\n (function () {\n _numeral.register('format', 'bps', {\n regexps: {\n format: /(BPS)/,\n unformat: /(BPS)/\n },\n format: function format(value, _format, roundingFunction) {\n var space = _numeral._.includes(_format, ' BPS') ? ' ' : '',\n output;\n value = value * 10000; // check for space before BPS\n\n _format = _format.replace(/\\s?BPS/, '');\n output = _numeral._.numberToFormat(value, _format, roundingFunction);\n\n if (_numeral._.includes(output, ')')) {\n output = output.split('');\n output.splice(-1, 0, space + 'BPS');\n output = output.join('');\n } else {\n output = output + space + 'BPS';\n }\n\n return output;\n },\n unformat: function unformat(string) {\n return +(_numeral._.stringToNumber(string) * 0.0001).toFixed(15);\n }\n });\n })();\n\n (function () {\n var decimal = {\n base: 1000,\n suffixes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n },\n binary = {\n base: 1024,\n suffixes: ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n };\n var allSuffixes = decimal.suffixes.concat(binary.suffixes.filter(function (item) {\n return decimal.suffixes.indexOf(item) < 0;\n }));\n var unformatRegex = allSuffixes.join('|'); // Allow support for BPS (http://www.investopedia.com/terms/b/basispoint.asp)\n\n unformatRegex = '(' + unformatRegex.replace('B', 'B(?!PS)') + ')';\n\n _numeral.register('format', 'bytes', {\n regexps: {\n format: /([0\\s]i?b)/,\n unformat: new RegExp(unformatRegex)\n },\n format: function format(value, _format2, roundingFunction) {\n var output,\n bytes = _numeral._.includes(_format2, 'ib') ? binary : decimal,\n suffix = _numeral._.includes(_format2, ' b') || _numeral._.includes(_format2, ' ib') ? ' ' : '',\n power,\n min,\n max; // check for space before\n\n _format2 = _format2.replace(/\\s?i?b/, '');\n\n for (power = 0; power <= bytes.suffixes.length; power++) {\n min = Math.pow(bytes.base, power);\n max = Math.pow(bytes.base, power + 1);\n\n if (value === null || value === 0 || value >= min && value < max) {\n suffix += bytes.suffixes[power];\n\n if (min > 0) {\n value = value / min;\n }\n\n break;\n }\n }\n\n output = _numeral._.numberToFormat(value, _format2, roundingFunction);\n return output + suffix;\n },\n unformat: function unformat(string) {\n var value = _numeral._.stringToNumber(string),\n power,\n bytesMultiplier;\n\n if (value) {\n for (power = decimal.suffixes.length - 1; power >= 0; power--) {\n if (_numeral._.includes(string, decimal.suffixes[power])) {\n bytesMultiplier = Math.pow(decimal.base, power);\n break;\n }\n\n if (_numeral._.includes(string, binary.suffixes[power])) {\n bytesMultiplier = Math.pow(binary.base, power);\n break;\n }\n }\n\n value *= bytesMultiplier || 1;\n }\n\n return value;\n }\n });\n })();\n\n (function () {\n _numeral.register('format', 'currency', {\n regexps: {\n format: /(\\$)/\n },\n format: function format(value, _format3, roundingFunction) {\n var locale = _numeral.locales[_numeral.options.currentLocale],\n symbols = {\n before: _format3.match(/^([\\+|\\-|\\(|\\s|\\$]*)/)[0],\n after: _format3.match(/([\\+|\\-|\\)|\\s|\\$]*)$/)[0]\n },\n output,\n symbol,\n i; // strip format of spaces and $\n\n _format3 = _format3.replace(/\\s?\\$\\s?/, ''); // format the number\n\n output = _numeral._.numberToFormat(value, _format3, roundingFunction); // update the before and after based on value\n\n if (value >= 0) {\n symbols.before = symbols.before.replace(/[\\-\\(]/, '');\n symbols.after = symbols.after.replace(/[\\-\\)]/, '');\n } else if (value < 0 && !_numeral._.includes(symbols.before, '-') && !_numeral._.includes(symbols.before, '(')) {\n symbols.before = '-' + symbols.before;\n } // loop through each before symbol\n\n\n for (i = 0; i < symbols.before.length; i++) {\n symbol = symbols.before[i];\n\n switch (symbol) {\n case '$':\n output = _numeral._.insert(output, locale.currency.symbol, i);\n break;\n\n case ' ':\n output = _numeral._.insert(output, ' ', i + locale.currency.symbol.length - 1);\n break;\n }\n } // loop through each after symbol\n\n\n for (i = symbols.after.length - 1; i >= 0; i--) {\n symbol = symbols.after[i];\n\n switch (symbol) {\n case '$':\n output = i === symbols.after.length - 1 ? output + locale.currency.symbol : _numeral._.insert(output, locale.currency.symbol, -(symbols.after.length - (1 + i)));\n break;\n\n case ' ':\n output = i === symbols.after.length - 1 ? output + ' ' : _numeral._.insert(output, ' ', -(symbols.after.length - (1 + i) + locale.currency.symbol.length - 1));\n break;\n }\n }\n\n return output;\n }\n });\n })();\n\n (function () {\n _numeral.register('format', 'exponential', {\n regexps: {\n format: /(e\\+|e-)/,\n unformat: /(e\\+|e-)/\n },\n format: function format(value, _format4, roundingFunction) {\n var output,\n exponential = typeof value === 'number' && !_numeral._.isNaN(value) ? value.toExponential() : '0e+0',\n parts = exponential.split('e');\n _format4 = _format4.replace(/e[\\+|\\-]{1}0/, '');\n output = _numeral._.numberToFormat(Number(parts[0]), _format4, roundingFunction);\n return output + 'e' + parts[1];\n },\n unformat: function unformat(string) {\n var parts = _numeral._.includes(string, 'e+') ? string.split('e+') : string.split('e-'),\n value = Number(parts[0]),\n power = Number(parts[1]);\n power = _numeral._.includes(string, 'e-') ? power *= -1 : power;\n\n function cback(accum, curr, currI, O) {\n var corrFactor = _numeral._.correctionFactor(accum, curr),\n num = accum * corrFactor * (curr * corrFactor) / (corrFactor * corrFactor);\n\n return num;\n }\n\n return _numeral._.reduce([value, Math.pow(10, power)], cback, 1);\n }\n });\n })();\n\n (function () {\n _numeral.register('format', 'ordinal', {\n regexps: {\n format: /(o)/\n },\n format: function format(value, _format5, roundingFunction) {\n var locale = _numeral.locales[_numeral.options.currentLocale],\n output,\n ordinal = _numeral._.includes(_format5, ' o') ? ' ' : ''; // check for space before\n\n _format5 = _format5.replace(/\\s?o/, '');\n ordinal += locale.ordinal(value);\n output = _numeral._.numberToFormat(value, _format5, roundingFunction);\n return output + ordinal;\n }\n });\n })();\n\n (function () {\n _numeral.register('format', 'percentage', {\n regexps: {\n format: /(%)/,\n unformat: /(%)/\n },\n format: function format(value, _format6, roundingFunction) {\n var space = _numeral._.includes(_format6, ' %') ? ' ' : '',\n output;\n\n if (_numeral.options.scalePercentBy100) {\n value = value * 100;\n } // check for space before %\n\n\n _format6 = _format6.replace(/\\s?\\%/, '');\n output = _numeral._.numberToFormat(value, _format6, roundingFunction);\n\n if (_numeral._.includes(output, ')')) {\n output = output.split('');\n output.splice(-1, 0, space + '%');\n output = output.join('');\n } else {\n output = output + space + '%';\n }\n\n return output;\n },\n unformat: function unformat(string) {\n var number = _numeral._.stringToNumber(string);\n\n if (_numeral.options.scalePercentBy100) {\n return number * 0.01;\n }\n\n return number;\n }\n });\n })();\n\n (function () {\n _numeral.register('format', 'time', {\n regexps: {\n format: /(:)/,\n unformat: /(:)/\n },\n format: function format(value, _format7, roundingFunction) {\n var hours = Math.floor(value / 60 / 60),\n minutes = Math.floor((value - hours * 60 * 60) / 60),\n seconds = Math.round(value - hours * 60 * 60 - minutes * 60);\n return hours + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);\n },\n unformat: function unformat(string) {\n var timeArray = string.split(':'),\n seconds = 0; // turn hours and minutes into seconds and add them all up\n\n if (timeArray.length === 3) {\n // hours\n seconds = seconds + Number(timeArray[0]) * 60 * 60; // minutes\n\n seconds = seconds + Number(timeArray[1]) * 60; // seconds\n\n seconds = seconds + Number(timeArray[2]);\n } else if (timeArray.length === 2) {\n // minutes\n seconds = seconds + Number(timeArray[0]) * 60; // seconds\n\n seconds = seconds + Number(timeArray[1]);\n }\n\n return Number(seconds);\n }\n });\n })();\n\n return _numeral;\n});","function _typeof2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\n/*!\n * vue-scrollto v2.20.0\n * (c) 2019 Randjelovic Igor\n * @license MIT\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global['vue-scrollto'] = factory());\n})(this, function () {\n 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n /**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n // These values are established by empiricism with tests (tradeoff: performance VS precision)\n\n\n var NEWTON_ITERATIONS = 4;\n var NEWTON_MIN_SLOPE = 0.001;\n var SUBDIVISION_PRECISION = 0.0000001;\n var SUBDIVISION_MAX_ITERATIONS = 10;\n var kSplineTableSize = 11;\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n var float32ArraySupported = typeof Float32Array === 'function';\n\n function A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n }\n\n function B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n }\n\n function C(aA1) {\n return 3.0 * aA1;\n } // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\n\n function calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n } // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n\n\n function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }\n\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\n var currentX,\n currentT,\n i = 0;\n\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n\n return currentT;\n }\n\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n\n return aGuessT;\n }\n\n function LinearEasing(x) {\n return x;\n }\n\n var src = function bezier(mX1, mY1, mX2, mY2) {\n if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if (mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n } // Precompute samples table\n\n\n var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample; // Interpolate to provide an initial guess for t\n\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if (x === 0) {\n return 0;\n }\n\n if (x === 1) {\n return 1;\n }\n\n return calcBezier(getTForX(x), mY1, mY2);\n };\n };\n\n var easings = {\n ease: [0.25, 0.1, 0.25, 1.0],\n linear: [0.0, 0.0, 1.0, 1.0],\n 'ease-in': [0.42, 0.0, 1.0, 1.0],\n 'ease-out': [0.0, 0.0, 0.58, 1.0],\n 'ease-in-out': [0.42, 0.0, 0.58, 1.0]\n }; // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n\n var supportsPassive = false;\n\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n supportsPassive = true;\n }\n });\n window.addEventListener('test', null, opts);\n } catch (e) {}\n\n var _ = {\n $: function $(selector) {\n if (typeof selector !== 'string') {\n return selector;\n }\n\n return document.querySelector(selector);\n },\n on: function on(element, events, handler) {\n var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n passive: false\n };\n\n if (!(events instanceof Array)) {\n events = [events];\n }\n\n for (var i = 0; i < events.length; i++) {\n element.addEventListener(events[i], handler, supportsPassive ? opts : false);\n }\n },\n off: function off(element, events, handler) {\n if (!(events instanceof Array)) {\n events = [events];\n }\n\n for (var i = 0; i < events.length; i++) {\n element.removeEventListener(events[i], handler);\n }\n },\n cumulativeOffset: function cumulativeOffset(element) {\n var top = 0;\n var left = 0;\n\n do {\n top += element.offsetTop || 0;\n left += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n\n return {\n top: top,\n left: left\n };\n }\n };\n var abortEvents = ['mousedown', 'wheel', 'DOMMouseScroll', 'mousewheel', 'keyup', 'touchmove'];\n var defaults = {\n container: 'body',\n duration: 500,\n lazy: true,\n easing: 'ease',\n offset: 0,\n force: true,\n cancelable: true,\n onStart: false,\n onDone: false,\n onCancel: false,\n x: false,\n y: true\n };\n\n function setDefaults(options) {\n defaults = _extends({}, defaults, options);\n }\n\n var scroller = function scroller() {\n var element; // element to scroll to\n\n var container; // container to scroll\n\n var duration; // duration of the scrolling\n\n var easing; // easing to be used when scrolling\n\n var lazy; // checks the target position at each step\n\n var offset; // offset to be added (subtracted)\n\n var force; // force scroll, even if element is visible\n\n var cancelable; // indicates if user can cancel the scroll or not.\n\n var onStart; // callback when scrolling is started\n\n var onDone; // callback when scrolling is done\n\n var onCancel; // callback when scrolling is canceled / aborted\n\n var x; // scroll on x axis\n\n var y; // scroll on y axis\n\n var initialX; // initial X of container\n\n var targetX; // target X of container\n\n var initialY; // initial Y of container\n\n var targetY; // target Y of container\n\n var diffX; // difference\n\n var diffY; // difference\n\n var abort; // is scrolling aborted\n\n var cumulativeOffsetContainer;\n var cumulativeOffsetElement;\n var abortEv; // event that aborted scrolling\n\n var abortFn = function abortFn(e) {\n if (!cancelable) return;\n abortEv = e;\n abort = true;\n };\n\n var easingFn;\n var timeStart; // time when scrolling started\n\n var timeElapsed; // time elapsed since scrolling started\n\n var progress; // progress\n\n function scrollTop(container) {\n var scrollTop = container.scrollTop;\n\n if (container.tagName.toLowerCase() === 'body') {\n // in firefox body.scrollTop always returns 0\n // thus if we are trying to get scrollTop on a body tag\n // we need to get it from the documentElement\n scrollTop = scrollTop || document.documentElement.scrollTop;\n }\n\n return scrollTop;\n }\n\n function scrollLeft(container) {\n var scrollLeft = container.scrollLeft;\n\n if (container.tagName.toLowerCase() === 'body') {\n // in firefox body.scrollLeft always returns 0\n // thus if we are trying to get scrollLeft on a body tag\n // we need to get it from the documentElement\n scrollLeft = scrollLeft || document.documentElement.scrollLeft;\n }\n\n return scrollLeft;\n }\n\n function recalculateTargets() {\n cumulativeOffsetContainer = _.cumulativeOffset(container);\n cumulativeOffsetElement = _.cumulativeOffset(element);\n\n if (x) {\n targetX = cumulativeOffsetElement.left - cumulativeOffsetContainer.left + offset;\n diffX = targetX - initialX;\n }\n\n if (y) {\n targetY = cumulativeOffsetElement.top - cumulativeOffsetContainer.top + offset;\n diffY = targetY - initialY;\n }\n }\n\n function step(timestamp) {\n if (abort) return done();\n if (!timeStart) timeStart = timestamp; // When a site has a lot of media that can be loaded asynchronously,\n // the targetY/targetX may end up in the wrong place during scrolling.\n // So we will check this at each step\n\n if (!lazy) {\n recalculateTargets();\n }\n\n timeElapsed = timestamp - timeStart;\n progress = Math.min(timeElapsed / duration, 1);\n progress = easingFn(progress);\n topLeft(container, initialY + diffY * progress, initialX + diffX * progress);\n timeElapsed < duration ? window.requestAnimationFrame(step) : done();\n }\n\n function done() {\n if (!abort) topLeft(container, targetY, targetX);\n timeStart = false;\n\n _.off(container, abortEvents, abortFn);\n\n if (abort && onCancel) onCancel(abortEv, element);\n if (!abort && onDone) onDone(element);\n }\n\n function topLeft(element, top, left) {\n if (y) element.scrollTop = top;\n if (x) element.scrollLeft = left;\n\n if (element.tagName.toLowerCase() === 'body') {\n // in firefox body.scrollTop doesn't scroll the page\n // thus if we are trying to scrollTop on a body tag\n // we need to scroll on the documentElement\n if (y) document.documentElement.scrollTop = top;\n if (x) document.documentElement.scrollLeft = left;\n }\n }\n\n function scrollTo(target, _duration) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (_typeof(_duration) === 'object') {\n options = _duration;\n } else if (typeof _duration === 'number') {\n options.duration = _duration;\n }\n\n element = _.$(target);\n\n if (!element) {\n return console.warn('[vue-scrollto warn]: Trying to scroll to an element that is not on the page: ' + target);\n }\n\n container = _.$(options.container || defaults.container);\n duration = options.hasOwnProperty('duration') ? options.duration : defaults.duration;\n lazy = options.hasOwnProperty('lazy') ? options.lazy : defaults.lazy;\n easing = options.easing || defaults.easing;\n offset = options.hasOwnProperty('offset') ? options.offset : defaults.offset;\n force = options.hasOwnProperty('force') ? options.force !== false : defaults.force;\n cancelable = options.hasOwnProperty('cancelable') ? options.cancelable !== false : defaults.cancelable;\n onStart = options.onStart || defaults.onStart;\n onDone = options.onDone || defaults.onDone;\n onCancel = options.onCancel || defaults.onCancel;\n x = options.x === undefined ? defaults.x : options.x;\n y = options.y === undefined ? defaults.y : options.y;\n\n if (typeof offset === 'function') {\n offset = offset(element, container);\n }\n\n initialX = scrollLeft(container);\n initialY = scrollTop(container); // calculates cumulative offsets and targetX/Y + diffX/Y\n\n recalculateTargets();\n abort = false;\n\n if (!force) {\n // When the container is the default (body) we need to use the viewport\n // height, not the entire body height\n var containerHeight = container.tagName.toLowerCase() === 'body' ? document.documentElement.clientHeight || window.innerHeight : container.offsetHeight;\n var containerTop = initialY;\n var containerBottom = containerTop + containerHeight;\n var elementTop = targetY - offset;\n var elementBottom = elementTop + element.offsetHeight;\n\n if (elementTop >= containerTop && elementBottom <= containerBottom) {\n // make sure to call the onDone callback even if there is no need to\n // scroll the container. Fixes #111 (ref #118)\n if (onDone) onDone(element);\n return;\n }\n }\n\n if (onStart) onStart(element);\n\n if (!diffY && !diffX) {\n if (onDone) onDone(element);\n return;\n }\n\n if (typeof easing === 'string') {\n easing = easings[easing] || easings['ease'];\n }\n\n easingFn = src.apply(src, easing);\n\n _.on(container, abortEvents, abortFn, {\n passive: true\n });\n\n window.requestAnimationFrame(step);\n return function () {\n abortEv = null;\n abort = true;\n };\n }\n\n return scrollTo;\n };\n\n var _scroller = scroller();\n\n var bindings = []; // store binding data\n\n function deleteBinding(el) {\n for (var i = 0; i < bindings.length; ++i) {\n if (bindings[i].el === el) {\n bindings.splice(i, 1);\n return true;\n }\n }\n\n return false;\n }\n\n function findBinding(el) {\n for (var i = 0; i < bindings.length; ++i) {\n if (bindings[i].el === el) {\n return bindings[i];\n }\n }\n }\n\n function getBinding(el) {\n var binding = findBinding(el);\n\n if (binding) {\n return binding;\n }\n\n bindings.push(binding = {\n el: el,\n binding: {}\n });\n return binding;\n }\n\n function handleClick(e) {\n var ctx = getBinding(this).binding;\n if (!ctx.value) return;\n e.preventDefault();\n\n if (typeof ctx.value === 'string') {\n return _scroller(ctx.value);\n }\n\n _scroller(ctx.value.el || ctx.value.element, ctx.value);\n }\n\n var directiveHooks = {\n bind: function bind(el, binding) {\n getBinding(el).binding = binding;\n\n _.on(el, 'click', handleClick);\n },\n unbind: function unbind(el) {\n deleteBinding(el);\n\n _.off(el, 'click', handleClick);\n },\n update: function update(el, binding) {\n getBinding(el).binding = binding;\n }\n };\n var VueScrollTo = {\n bind: directiveHooks.bind,\n unbind: directiveHooks.unbind,\n update: directiveHooks.update,\n beforeMount: directiveHooks.bind,\n unmounted: directiveHooks.unbind,\n updated: directiveHooks.update,\n scrollTo: _scroller,\n bindings: bindings\n };\n\n var install = function install(Vue, options) {\n if (options) setDefaults(options);\n Vue.directive('scroll-to', VueScrollTo);\n var properties = Vue.config.globalProperties || Vue.prototype;\n properties.$scrollTo = VueScrollTo.scrollTo;\n };\n\n if (typeof window !== 'undefined' && window.Vue) {\n window.VueScrollTo = VueScrollTo;\n window.VueScrollTo.setDefaults = setDefaults;\n window.VueScrollTo.scroller = scroller;\n if (window.Vue.use) window.Vue.use(install);\n }\n\n VueScrollTo.install = install;\n return VueScrollTo;\n});","import _typeof from '@babel/runtime/helpers/typeof';\nimport _defineProperty from '@babel/runtime/helpers/defineProperty';\nimport _classCallCheck from '@babel/runtime/helpers/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/createClass';\nimport Popper from 'popper.js';\nimport isEqual from 'lodash/isEqual';\nimport { ResizeObserver } from 'vue-resize';\nimport merge from 'lodash/merge';\n\nvar SVGAnimatedString = function SVGAnimatedString() {};\n\nif (typeof window !== 'undefined') {\n SVGAnimatedString = window.SVGAnimatedString;\n}\n\nfunction convertToArray(value) {\n if (typeof value === 'string') {\n value = value.split(' ');\n }\n\n return value;\n}\n/**\n * Add classes to an element.\n * This method checks to ensure that the classes don't already exist before adding them.\n * It uses el.className rather than classList in order to be IE friendly.\n * @param {object} el - The element to add the classes to.\n * @param {classes} string - List of space separated classes to be added to the element.\n */\n\n\nfunction addClasses(el, classes) {\n var newClasses = convertToArray(classes);\n var classList;\n\n if (el.className instanceof SVGAnimatedString) {\n classList = convertToArray(el.className.baseVal);\n } else {\n classList = convertToArray(el.className);\n }\n\n newClasses.forEach(function (newClass) {\n if (classList.indexOf(newClass) === -1) {\n classList.push(newClass);\n }\n });\n\n if (el instanceof SVGElement) {\n el.setAttribute('class', classList.join(' '));\n } else {\n el.className = classList.join(' ');\n }\n}\n/**\n * Remove classes from an element.\n * It uses el.className rather than classList in order to be IE friendly.\n * @export\n * @param {any} el The element to remove the classes from.\n * @param {any} classes List of space separated classes to be removed from the element.\n */\n\n\nfunction removeClasses(el, classes) {\n var newClasses = convertToArray(classes);\n var classList;\n\n if (el.className instanceof SVGAnimatedString) {\n classList = convertToArray(el.className.baseVal);\n } else {\n classList = convertToArray(el.className);\n }\n\n newClasses.forEach(function (newClass) {\n var index = classList.indexOf(newClass);\n\n if (index !== -1) {\n classList.splice(index, 1);\n }\n });\n\n if (el instanceof SVGElement) {\n el.setAttribute('class', classList.join(' '));\n } else {\n el.className = classList.join(' ');\n }\n}\n\nvar supportsPassive = false;\n\nif (typeof window !== 'undefined') {\n supportsPassive = false;\n\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n supportsPassive = true;\n }\n });\n window.addEventListener('test', null, opts);\n } catch (e) {}\n}\n\nfunction ownKeys$2(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread$2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys$2(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys$2(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nvar DEFAULT_OPTIONS = {\n container: false,\n delay: 0,\n html: false,\n placement: 'top',\n title: '',\n template: '',\n trigger: 'hover focus',\n offset: 0\n};\nvar openTooltips = [];\n\nvar Tooltip = /*#__PURE__*/function () {\n /**\n * Create a new Tooltip.js instance\n * @class Tooltip\n * @param {HTMLElement} reference - The DOM node used as reference of the tooltip (it can be a jQuery element).\n * @param {Object} options\n * @param {String} options.placement=bottom\n * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -end),\n * left(-start, -end)`\n * @param {HTMLElement|String|false} options.container=false - Append the tooltip to a specific element.\n * @param {Number|Object} options.delay=0\n * Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type.\n * If a number is supplied, delay is applied to both hide/show.\n * Object structure is: `{ show: 500, hide: 100 }`\n * @param {Boolean} options.html=false - Insert HTML into the tooltip. If false, the content will inserted with `innerText`.\n * @param {String|PlacementFunction} options.placement='top' - One of the allowed placements, or a function returning one of them.\n * @param {String} [options.template='']\n * Base HTML to used when creating the tooltip.\n * The tooltip's `title` will be injected into the `.tooltip-inner` or `.tooltip__inner`.\n * `.tooltip-arrow` or `.tooltip__arrow` will become the tooltip's arrow.\n * The outermost wrapper element should have the `.tooltip` class.\n * @param {String|HTMLElement|TitleFunction} options.title='' - Default title value if `title` attribute isn't present.\n * @param {String} [options.trigger='hover focus']\n * How tooltip is triggered - click, hover, focus, manual.\n * You may pass multiple triggers; separate them with a space. `manual` cannot be combined with any other trigger.\n * @param {HTMLElement} options.boundariesElement\n * The element used as boundaries for the tooltip. For more information refer to Popper.js'\n * [boundariesElement docs](https://popper.js.org/popper-documentation.html)\n * @param {Number|String} options.offset=0 - Offset of the tooltip relative to its reference. For more information refer to Popper.js'\n * [offset docs](https://popper.js.org/popper-documentation.html)\n * @param {Object} options.popperOptions={} - Popper options, will be passed directly to popper instance. For more information refer to Popper.js'\n * [options docs](https://popper.js.org/popper-documentation.html)\n * @param {string} [options.ariaId] Id used for accessibility\n * @return {Object} instance - The generated tooltip instance\n */\n function Tooltip(_reference, _options) {\n var _this = this;\n\n _classCallCheck(this, Tooltip);\n\n _defineProperty(this, \"_events\", []);\n\n _defineProperty(this, \"_setTooltipNodeEvent\", function (evt, reference, delay, options) {\n var relatedreference = evt.relatedreference || evt.toElement || evt.relatedTarget;\n\n var callback = function callback(evt2) {\n var relatedreference2 = evt2.relatedreference || evt2.toElement || evt2.relatedTarget; // Remove event listener after call\n\n _this._tooltipNode.removeEventListener(evt.type, callback); // If the new reference is not the reference element\n\n\n if (!reference.contains(relatedreference2)) {\n // Schedule to hide tooltip\n _this._scheduleHide(reference, options.delay, options, evt2);\n }\n };\n\n if (_this._tooltipNode.contains(relatedreference)) {\n // listen to mouseleave on the tooltip element to be able to hide the tooltip\n _this._tooltipNode.addEventListener(evt.type, callback);\n\n return true;\n }\n\n return false;\n }); // apply user options over default ones\n\n\n _options = _objectSpread$2(_objectSpread$2({}, DEFAULT_OPTIONS), _options);\n _reference.jquery && (_reference = _reference[0]);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this); // cache reference and options\n\n this.reference = _reference;\n this.options = _options; // set initial state\n\n this._isOpen = false;\n\n this._init();\n } //\n // Public methods\n //\n\n /**\n * Reveals an element's tooltip. This is considered a \"manual\" triggering of the tooltip.\n * Tooltips with zero-length titles are never displayed.\n * @method Tooltip#show\n * @memberof Tooltip\n */\n\n\n _createClass(Tooltip, [{\n key: \"show\",\n value: function show() {\n this._show(this.reference, this.options);\n }\n /**\n * Hides an element’s tooltip. This is considered a “manual” triggering of the tooltip.\n * @method Tooltip#hide\n * @memberof Tooltip\n */\n\n }, {\n key: \"hide\",\n value: function hide() {\n this._hide();\n }\n /**\n * Hides and destroys an element’s tooltip.\n * @method Tooltip#dispose\n * @memberof Tooltip\n */\n\n }, {\n key: \"dispose\",\n value: function dispose() {\n this._dispose();\n }\n /**\n * Toggles an element’s tooltip. This is considered a “manual” triggering of the tooltip.\n * @method Tooltip#toggle\n * @memberof Tooltip\n */\n\n }, {\n key: \"toggle\",\n value: function toggle() {\n if (this._isOpen) {\n return this.hide();\n } else {\n return this.show();\n }\n }\n }, {\n key: \"setClasses\",\n value: function setClasses(classes) {\n this._classes = classes;\n }\n }, {\n key: \"setContent\",\n value: function setContent(content) {\n this.options.title = content;\n\n if (this._tooltipNode) {\n this._setContent(content, this.options);\n }\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var classesUpdated = false;\n var classes = options && options.classes || directive.options.defaultClass;\n\n if (!isEqual(this._classes, classes)) {\n this.setClasses(classes);\n classesUpdated = true;\n }\n\n options = getOptions(options);\n var needPopperUpdate = false;\n var needRestart = false;\n\n if (this.options.offset !== options.offset || this.options.placement !== options.placement) {\n needPopperUpdate = true;\n }\n\n if (this.options.template !== options.template || this.options.trigger !== options.trigger || this.options.container !== options.container || classesUpdated) {\n needRestart = true;\n }\n\n for (var key in options) {\n this.options[key] = options[key];\n }\n\n if (this._tooltipNode) {\n if (needRestart) {\n var isOpen = this._isOpen;\n this.dispose();\n\n this._init();\n\n if (isOpen) {\n this.show();\n }\n } else if (needPopperUpdate) {\n this.popperInstance.update();\n }\n }\n } //\n // Private methods\n //\n\n }, {\n key: \"_init\",\n value: function _init() {\n // get events list\n var events = typeof this.options.trigger === 'string' ? this.options.trigger.split(' ') : [];\n this._isDisposed = false;\n this._enableDocumentTouch = events.indexOf('manual') === -1;\n events = events.filter(function (trigger) {\n return ['click', 'hover', 'focus'].indexOf(trigger) !== -1;\n }); // set event listeners\n\n this._setEventListeners(this.reference, events, this.options); // title attribute\n\n\n this.$_originalTitle = this.reference.getAttribute('title');\n this.reference.removeAttribute('title');\n this.reference.setAttribute('data-original-title', this.$_originalTitle);\n }\n /**\n * Creates a new tooltip node\n * @memberof Tooltip\n * @private\n * @param {HTMLElement} reference\n * @param {String} template\n * @param {String|HTMLElement|TitleFunction} title\n * @param {Boolean} allowHtml\n * @return {HTMLelement} tooltipNode\n */\n\n }, {\n key: \"_create\",\n value: function _create(reference, template) {\n var _this2 = this; // create tooltip element\n\n\n var tooltipGenerator = window.document.createElement('div');\n tooltipGenerator.innerHTML = template.trim();\n var tooltipNode = tooltipGenerator.childNodes[0]; // add unique ID to our tooltip (needed for accessibility reasons)\n\n tooltipNode.id = this.options.ariaId || \"tooltip_\".concat(Math.random().toString(36).substr(2, 10)); // Initially hide the tooltip\n // The attribute will be switched in a next frame so\n // CSS transitions can play\n\n tooltipNode.setAttribute('aria-hidden', 'true');\n\n if (this.options.autoHide && this.options.trigger.indexOf('hover') !== -1) {\n tooltipNode.addEventListener('mouseenter', function (evt) {\n return _this2._scheduleHide(reference, _this2.options.delay, _this2.options, evt);\n });\n tooltipNode.addEventListener('click', function (evt) {\n return _this2._scheduleHide(reference, _this2.options.delay, _this2.options, evt);\n });\n } // return the generated tooltip node\n\n\n return tooltipNode;\n }\n }, {\n key: \"_setContent\",\n value: function _setContent(content, options) {\n var _this3 = this;\n\n this.asyncContent = false;\n\n this._applyContent(content, options).then(function () {\n if (!_this3.popperInstance) return;\n\n _this3.popperInstance.update();\n });\n }\n }, {\n key: \"_applyContent\",\n value: function _applyContent(title, options) {\n var _this4 = this;\n\n return new Promise(function (resolve, reject) {\n var allowHtml = options.html;\n var rootNode = _this4._tooltipNode;\n if (!rootNode) return;\n var titleNode = rootNode.querySelector(_this4.options.innerSelector);\n\n if (title.nodeType === 1) {\n // if title is a node, append it only if allowHtml is true\n if (allowHtml) {\n while (titleNode.firstChild) {\n titleNode.removeChild(titleNode.firstChild);\n }\n\n titleNode.appendChild(title);\n }\n } else if (typeof title === 'function') {\n // if title is a function, call it and set innerText or innerHtml depending by `allowHtml` value\n var result = title();\n\n if (result && typeof result.then === 'function') {\n _this4.asyncContent = true;\n options.loadingClass && addClasses(rootNode, options.loadingClass);\n\n if (options.loadingContent) {\n _this4._applyContent(options.loadingContent, options);\n }\n\n result.then(function (asyncResult) {\n options.loadingClass && removeClasses(rootNode, options.loadingClass);\n return _this4._applyContent(asyncResult, options);\n }).then(resolve).catch(reject);\n } else {\n _this4._applyContent(result, options).then(resolve).catch(reject);\n }\n\n return;\n } else {\n // if it's just a simple text, set innerText or innerHtml depending by `allowHtml` value\n allowHtml ? titleNode.innerHTML = title : titleNode.innerText = title;\n }\n\n resolve();\n });\n }\n }, {\n key: \"_show\",\n value: function _show(reference, options) {\n if (options && typeof options.container === 'string') {\n var container = document.querySelector(options.container);\n if (!container) return;\n }\n\n clearTimeout(this._disposeTimer);\n options = Object.assign({}, options);\n delete options.offset;\n var updateClasses = true;\n\n if (this._tooltipNode) {\n addClasses(this._tooltipNode, this._classes);\n updateClasses = false;\n }\n\n var result = this._ensureShown(reference, options);\n\n if (updateClasses && this._tooltipNode) {\n addClasses(this._tooltipNode, this._classes);\n }\n\n addClasses(reference, ['v-tooltip-open']);\n return result;\n }\n }, {\n key: \"_ensureShown\",\n value: function _ensureShown(reference, options) {\n var _this5 = this; // don't show if it's already visible\n\n\n if (this._isOpen) {\n return this;\n }\n\n this._isOpen = true;\n openTooltips.push(this); // if the tooltipNode already exists, just show it\n\n if (this._tooltipNode) {\n this._tooltipNode.style.display = '';\n\n this._tooltipNode.setAttribute('aria-hidden', 'false');\n\n this.popperInstance.enableEventListeners();\n this.popperInstance.update();\n\n if (this.asyncContent) {\n this._setContent(options.title, options);\n }\n\n return this;\n } // get title\n\n\n var title = reference.getAttribute('title') || options.title; // don't show tooltip if no title is defined\n\n if (!title) {\n return this;\n } // create tooltip node\n\n\n var tooltipNode = this._create(reference, options.template);\n\n this._tooltipNode = tooltipNode; // Add `aria-describedby` to our reference element for accessibility reasons\n\n reference.setAttribute('aria-describedby', tooltipNode.id); // append tooltip to container\n\n var container = this._findContainer(options.container, reference);\n\n this._append(tooltipNode, container);\n\n var popperOptions = _objectSpread$2(_objectSpread$2({}, options.popperOptions), {}, {\n placement: options.placement\n });\n\n popperOptions.modifiers = _objectSpread$2(_objectSpread$2({}, popperOptions.modifiers), {}, {\n arrow: {\n element: this.options.arrowSelector\n }\n });\n\n if (options.boundariesElement) {\n popperOptions.modifiers.preventOverflow = {\n boundariesElement: options.boundariesElement\n };\n }\n\n this.popperInstance = new Popper(reference, tooltipNode, popperOptions);\n\n this._setContent(title, options); // Fix position\n\n\n requestAnimationFrame(function () {\n if (!_this5._isDisposed && _this5.popperInstance) {\n _this5.popperInstance.update(); // Show the tooltip\n\n\n requestAnimationFrame(function () {\n if (!_this5._isDisposed) {\n _this5._isOpen && tooltipNode.setAttribute('aria-hidden', 'false');\n } else {\n _this5.dispose();\n }\n });\n } else {\n _this5.dispose();\n }\n });\n return this;\n }\n }, {\n key: \"_noLongerOpen\",\n value: function _noLongerOpen() {\n var index = openTooltips.indexOf(this);\n\n if (index !== -1) {\n openTooltips.splice(index, 1);\n }\n }\n }, {\n key: \"_hide\",\n value: function _hide()\n /* reference, options */\n {\n var _this6 = this; // don't hide if it's already hidden\n\n\n if (!this._isOpen) {\n return this;\n }\n\n this._isOpen = false;\n\n this._noLongerOpen(); // hide tooltipNode\n\n\n this._tooltipNode.style.display = 'none';\n\n this._tooltipNode.setAttribute('aria-hidden', 'true');\n\n if (this.popperInstance) {\n this.popperInstance.disableEventListeners();\n }\n\n clearTimeout(this._disposeTimer);\n var disposeTime = directive.options.disposeTimeout;\n\n if (disposeTime !== null) {\n this._disposeTimer = setTimeout(function () {\n if (_this6._tooltipNode) {\n _this6._tooltipNode.removeEventListener('mouseenter', _this6.hide);\n\n _this6._tooltipNode.removeEventListener('click', _this6.hide); // Don't remove popper instance, just the HTML element\n\n\n _this6._removeTooltipNode();\n }\n }, disposeTime);\n }\n\n removeClasses(this.reference, ['v-tooltip-open']);\n return this;\n }\n }, {\n key: \"_removeTooltipNode\",\n value: function _removeTooltipNode() {\n if (!this._tooltipNode) return;\n var parentNode = this._tooltipNode.parentNode;\n\n if (parentNode) {\n parentNode.removeChild(this._tooltipNode);\n this.reference.removeAttribute('aria-describedby');\n }\n\n this._tooltipNode = null;\n }\n }, {\n key: \"_dispose\",\n value: function _dispose() {\n var _this7 = this;\n\n this._isDisposed = true;\n this.reference.removeAttribute('data-original-title');\n\n if (this.$_originalTitle) {\n this.reference.setAttribute('title', this.$_originalTitle);\n } // remove event listeners first to prevent any unexpected behaviour\n\n\n this._events.forEach(function (_ref) {\n var func = _ref.func,\n event = _ref.event;\n\n _this7.reference.removeEventListener(event, func);\n });\n\n this._events = [];\n\n if (this._tooltipNode) {\n this._hide();\n\n this._tooltipNode.removeEventListener('mouseenter', this.hide);\n\n this._tooltipNode.removeEventListener('click', this.hide); // destroy instance\n\n\n this.popperInstance.destroy(); // destroy tooltipNode if removeOnDestroy is not set, as popperInstance.destroy() already removes the element\n\n if (!this.popperInstance.options.removeOnDestroy) {\n this._removeTooltipNode();\n }\n } else {\n this._noLongerOpen();\n }\n\n return this;\n }\n }, {\n key: \"_findContainer\",\n value: function _findContainer(container, reference) {\n // if container is a query, get the relative element\n if (typeof container === 'string') {\n container = window.document.querySelector(container);\n } else if (container === false) {\n // if container is `false`, set it to reference parent\n container = reference.parentNode;\n }\n\n return container;\n }\n /**\n * Append tooltip to container\n * @memberof Tooltip\n * @private\n * @param {HTMLElement} tooltip\n * @param {HTMLElement|String|false} container\n */\n\n }, {\n key: \"_append\",\n value: function _append(tooltipNode, container) {\n container.appendChild(tooltipNode);\n }\n }, {\n key: \"_setEventListeners\",\n value: function _setEventListeners(reference, events, options) {\n var _this8 = this;\n\n var directEvents = [];\n var oppositeEvents = [];\n events.forEach(function (event) {\n switch (event) {\n case 'hover':\n directEvents.push('mouseenter');\n oppositeEvents.push('mouseleave');\n if (_this8.options.hideOnTargetClick) oppositeEvents.push('click');\n break;\n\n case 'focus':\n directEvents.push('focus');\n oppositeEvents.push('blur');\n if (_this8.options.hideOnTargetClick) oppositeEvents.push('click');\n break;\n\n case 'click':\n directEvents.push('click');\n oppositeEvents.push('click');\n break;\n }\n }); // schedule show tooltip\n\n directEvents.forEach(function (event) {\n var func = function func(evt) {\n if (_this8._isOpen === true) {\n return;\n }\n\n evt.usedByTooltip = true;\n\n _this8._scheduleShow(reference, options.delay, options, evt);\n };\n\n _this8._events.push({\n event: event,\n func: func\n });\n\n reference.addEventListener(event, func);\n }); // schedule hide tooltip\n\n oppositeEvents.forEach(function (event) {\n var func = function func(evt) {\n if (evt.usedByTooltip === true) {\n return;\n }\n\n _this8._scheduleHide(reference, options.delay, options, evt);\n };\n\n _this8._events.push({\n event: event,\n func: func\n });\n\n reference.addEventListener(event, func);\n });\n }\n }, {\n key: \"_onDocumentTouch\",\n value: function _onDocumentTouch(event) {\n if (this._enableDocumentTouch) {\n this._scheduleHide(this.reference, this.options.delay, this.options, event);\n }\n }\n }, {\n key: \"_scheduleShow\",\n value: function _scheduleShow(reference, delay, options\n /*, evt */\n ) {\n var _this9 = this; // defaults to 0\n\n\n var computedDelay = delay && delay.show || delay || 0;\n clearTimeout(this._scheduleTimer);\n this._scheduleTimer = window.setTimeout(function () {\n return _this9._show(reference, options);\n }, computedDelay);\n }\n }, {\n key: \"_scheduleHide\",\n value: function _scheduleHide(reference, delay, options, evt) {\n var _this10 = this; // defaults to 0\n\n\n var computedDelay = delay && delay.hide || delay || 0;\n clearTimeout(this._scheduleTimer);\n this._scheduleTimer = window.setTimeout(function () {\n if (_this10._isOpen === false) {\n return;\n }\n\n if (!_this10._tooltipNode.ownerDocument.body.contains(_this10._tooltipNode)) {\n return;\n } // if we are hiding because of a mouseleave, we must check that the new\n // reference isn't the tooltip, because in this case we don't want to hide it\n\n\n if (evt.type === 'mouseleave') {\n var isSet = _this10._setTooltipNodeEvent(evt, reference, delay, options); // if we set the new event, don't hide the tooltip yet\n // the new event will take care to hide it if necessary\n\n\n if (isSet) {\n return;\n }\n }\n\n _this10._hide(reference, options);\n }, computedDelay);\n }\n }]);\n\n return Tooltip;\n}(); // Hide tooltips on touch devices\n\n\nif (typeof document !== 'undefined') {\n document.addEventListener('touchstart', function (event) {\n for (var i = 0; i < openTooltips.length; i++) {\n openTooltips[i]._onDocumentTouch(event);\n }\n }, supportsPassive ? {\n passive: true,\n capture: true\n } : true);\n}\n/**\n * Placement function, its context is the Tooltip instance.\n * @memberof Tooltip\n * @callback PlacementFunction\n * @param {HTMLElement} tooltip - tooltip DOM node.\n * @param {HTMLElement} reference - reference DOM node.\n * @return {String} placement - One of the allowed placement options.\n */\n\n/**\n * Title function, its context is the Tooltip instance.\n * @memberof Tooltip\n * @callback TitleFunction\n * @return {String} placement - The desired title.\n */\n\n\nfunction ownKeys$1(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread$1(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys$1(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys$1(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nvar state = {\n enabled: true\n};\nvar positions = ['top', 'top-start', 'top-end', 'right', 'right-start', 'right-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end'];\nvar defaultOptions = {\n // Default tooltip placement relative to target element\n defaultPlacement: 'top',\n // Default CSS classes applied to the tooltip element\n defaultClass: 'vue-tooltip-theme',\n // Default CSS classes applied to the target element of the tooltip\n defaultTargetClass: 'has-tooltip',\n // Is the content HTML by default?\n defaultHtml: true,\n // Default HTML template of the tooltip element\n // It must include `tooltip-arrow` & `tooltip-inner` CSS classes (can be configured, see below)\n // Change if the classes conflict with other libraries (for example bootstrap)\n defaultTemplate: '',\n // Selector used to get the arrow element in the tooltip template\n defaultArrowSelector: '.tooltip-arrow, .tooltip__arrow',\n // Selector used to get the inner content element in the tooltip template\n defaultInnerSelector: '.tooltip-inner, .tooltip__inner',\n // Delay (ms)\n defaultDelay: 0,\n // Default events that trigger the tooltip\n defaultTrigger: 'hover focus',\n // Default position offset (px)\n defaultOffset: 0,\n // Default container where the tooltip will be appended\n defaultContainer: 'body',\n defaultBoundariesElement: undefined,\n defaultPopperOptions: {},\n // Class added when content is loading\n defaultLoadingClass: 'tooltip-loading',\n // Displayed when tooltip content is loading\n defaultLoadingContent: '...',\n // Hide on mouseover tooltip\n autoHide: true,\n // Close tooltip on click on tooltip target?\n defaultHideOnTargetClick: true,\n // Auto destroy tooltip DOM nodes (ms)\n disposeTimeout: 5000,\n // Options for popover\n popover: {\n defaultPlacement: 'bottom',\n // Use the `popoverClass` prop for theming\n defaultClass: 'vue-popover-theme',\n // Base class (change if conflicts with other libraries)\n defaultBaseClass: 'tooltip popover',\n // Wrapper class (contains arrow and inner)\n defaultWrapperClass: 'wrapper',\n // Inner content class\n defaultInnerClass: 'tooltip-inner popover-inner',\n // Arrow class\n defaultArrowClass: 'tooltip-arrow popover-arrow',\n // Class added when popover is open\n defaultOpenClass: 'open',\n defaultDelay: 0,\n defaultTrigger: 'click',\n defaultOffset: 0,\n defaultContainer: 'body',\n defaultBoundariesElement: undefined,\n defaultPopperOptions: {},\n // Hides if clicked outside of popover\n defaultAutoHide: true,\n // Update popper on content resize\n defaultHandleResize: true\n }\n};\n\nfunction getOptions(options) {\n var result = {\n placement: typeof options.placement !== 'undefined' ? options.placement : directive.options.defaultPlacement,\n delay: typeof options.delay !== 'undefined' ? options.delay : directive.options.defaultDelay,\n html: typeof options.html !== 'undefined' ? options.html : directive.options.defaultHtml,\n template: typeof options.template !== 'undefined' ? options.template : directive.options.defaultTemplate,\n arrowSelector: typeof options.arrowSelector !== 'undefined' ? options.arrowSelector : directive.options.defaultArrowSelector,\n innerSelector: typeof options.innerSelector !== 'undefined' ? options.innerSelector : directive.options.defaultInnerSelector,\n trigger: typeof options.trigger !== 'undefined' ? options.trigger : directive.options.defaultTrigger,\n offset: typeof options.offset !== 'undefined' ? options.offset : directive.options.defaultOffset,\n container: typeof options.container !== 'undefined' ? options.container : directive.options.defaultContainer,\n boundariesElement: typeof options.boundariesElement !== 'undefined' ? options.boundariesElement : directive.options.defaultBoundariesElement,\n autoHide: typeof options.autoHide !== 'undefined' ? options.autoHide : directive.options.autoHide,\n hideOnTargetClick: typeof options.hideOnTargetClick !== 'undefined' ? options.hideOnTargetClick : directive.options.defaultHideOnTargetClick,\n loadingClass: typeof options.loadingClass !== 'undefined' ? options.loadingClass : directive.options.defaultLoadingClass,\n loadingContent: typeof options.loadingContent !== 'undefined' ? options.loadingContent : directive.options.defaultLoadingContent,\n popperOptions: _objectSpread$1({}, typeof options.popperOptions !== 'undefined' ? options.popperOptions : directive.options.defaultPopperOptions)\n };\n\n if (result.offset) {\n var typeofOffset = _typeof(result.offset);\n\n var offset = result.offset; // One value -> switch\n\n if (typeofOffset === 'number' || typeofOffset === 'string' && offset.indexOf(',') === -1) {\n offset = \"0, \".concat(offset);\n }\n\n if (!result.popperOptions.modifiers) {\n result.popperOptions.modifiers = {};\n }\n\n result.popperOptions.modifiers.offset = {\n offset: offset\n };\n }\n\n if (result.trigger && result.trigger.indexOf('click') !== -1) {\n result.hideOnTargetClick = false;\n }\n\n return result;\n}\n\nfunction getPlacement(value, modifiers) {\n var placement = value.placement;\n\n for (var i = 0; i < positions.length; i++) {\n var pos = positions[i];\n\n if (modifiers[pos]) {\n placement = pos;\n }\n }\n\n return placement;\n}\n\nfunction getContent(value) {\n var type = _typeof(value);\n\n if (type === 'string') {\n return value;\n } else if (value && type === 'object') {\n return value.content;\n } else {\n return false;\n }\n}\n\nfunction createTooltip(el, value) {\n var modifiers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var content = getContent(value);\n var classes = typeof value.classes !== 'undefined' ? value.classes : directive.options.defaultClass;\n\n var opts = _objectSpread$1({\n title: content\n }, getOptions(_objectSpread$1(_objectSpread$1({}, _typeof(value) === 'object' ? value : {}), {}, {\n placement: getPlacement(value, modifiers)\n })));\n\n var tooltip = el._tooltip = new Tooltip(el, opts);\n tooltip.setClasses(classes);\n tooltip._vueEl = el; // Class on target\n\n var targetClasses = typeof value.targetClasses !== 'undefined' ? value.targetClasses : directive.options.defaultTargetClass;\n el._tooltipTargetClasses = targetClasses;\n addClasses(el, targetClasses);\n return tooltip;\n}\n\nfunction destroyTooltip(el) {\n if (el._tooltip) {\n el._tooltip.dispose();\n\n delete el._tooltip;\n delete el._tooltipOldShow;\n }\n\n if (el._tooltipTargetClasses) {\n removeClasses(el, el._tooltipTargetClasses);\n delete el._tooltipTargetClasses;\n }\n}\n\nfunction bind(el, _ref) {\n var value = _ref.value;\n _ref.oldValue;\n var modifiers = _ref.modifiers;\n var content = getContent(value);\n\n if (!content || !state.enabled) {\n destroyTooltip(el);\n } else {\n var tooltip;\n\n if (el._tooltip) {\n tooltip = el._tooltip; // Content\n\n tooltip.setContent(content); // Options\n\n tooltip.setOptions(_objectSpread$1(_objectSpread$1({}, value), {}, {\n placement: getPlacement(value, modifiers)\n }));\n } else {\n tooltip = createTooltip(el, value, modifiers);\n } // Manual show\n\n\n if (typeof value.show !== 'undefined' && value.show !== el._tooltipOldShow) {\n el._tooltipOldShow = value.show;\n value.show ? tooltip.show() : tooltip.hide();\n }\n }\n}\n\nvar directive = {\n options: defaultOptions,\n bind: bind,\n update: bind,\n unbind: function unbind(el) {\n destroyTooltip(el);\n }\n};\n\nfunction addListeners(el) {\n el.addEventListener('click', onClick);\n el.addEventListener('touchstart', onTouchStart, supportsPassive ? {\n passive: true\n } : false);\n}\n\nfunction removeListeners(el) {\n el.removeEventListener('click', onClick);\n el.removeEventListener('touchstart', onTouchStart);\n el.removeEventListener('touchend', onTouchEnd);\n el.removeEventListener('touchcancel', onTouchCancel);\n}\n\nfunction onClick(event) {\n var el = event.currentTarget;\n event.closePopover = !el.$_vclosepopover_touch;\n event.closeAllPopover = el.$_closePopoverModifiers && !!el.$_closePopoverModifiers.all;\n}\n\nfunction onTouchStart(event) {\n if (event.changedTouches.length === 1) {\n var el = event.currentTarget;\n el.$_vclosepopover_touch = true;\n var touch = event.changedTouches[0];\n el.$_vclosepopover_touchPoint = touch;\n el.addEventListener('touchend', onTouchEnd);\n el.addEventListener('touchcancel', onTouchCancel);\n }\n}\n\nfunction onTouchEnd(event) {\n var el = event.currentTarget;\n el.$_vclosepopover_touch = false;\n\n if (event.changedTouches.length === 1) {\n var touch = event.changedTouches[0];\n var firstTouch = el.$_vclosepopover_touchPoint;\n event.closePopover = Math.abs(touch.screenY - firstTouch.screenY) < 20 && Math.abs(touch.screenX - firstTouch.screenX) < 20;\n event.closeAllPopover = el.$_closePopoverModifiers && !!el.$_closePopoverModifiers.all;\n }\n}\n\nfunction onTouchCancel(event) {\n var el = event.currentTarget;\n el.$_vclosepopover_touch = false;\n}\n\nvar vclosepopover = {\n bind: function bind(el, _ref) {\n var value = _ref.value,\n modifiers = _ref.modifiers;\n el.$_closePopoverModifiers = modifiers;\n\n if (typeof value === 'undefined' || value) {\n addListeners(el);\n }\n },\n update: function update(el, _ref2) {\n var value = _ref2.value,\n oldValue = _ref2.oldValue,\n modifiers = _ref2.modifiers;\n el.$_closePopoverModifiers = modifiers;\n\n if (value !== oldValue) {\n if (typeof value === 'undefined' || value) {\n addListeners(el);\n } else {\n removeListeners(el);\n }\n }\n },\n unbind: function unbind(el) {\n removeListeners(el);\n }\n};\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction getDefault(key) {\n var value = directive.options.popover[key];\n\n if (typeof value === 'undefined') {\n return directive.options[key];\n }\n\n return value;\n}\n\nvar isIOS = false;\n\nif (typeof window !== 'undefined' && typeof navigator !== 'undefined') {\n isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n}\n\nvar openPopovers = [];\n\nvar Element = function Element() {};\n\nif (typeof window !== 'undefined') {\n Element = window.Element;\n}\n\nvar script = {\n name: 'VPopover',\n components: {\n ResizeObserver: ResizeObserver\n },\n props: {\n open: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n placement: {\n type: String,\n default: function _default() {\n return getDefault('defaultPlacement');\n }\n },\n delay: {\n type: [String, Number, Object],\n default: function _default() {\n return getDefault('defaultDelay');\n }\n },\n offset: {\n type: [String, Number],\n default: function _default() {\n return getDefault('defaultOffset');\n }\n },\n trigger: {\n type: String,\n default: function _default() {\n return getDefault('defaultTrigger');\n }\n },\n container: {\n type: [String, Object, Element, Boolean],\n default: function _default() {\n return getDefault('defaultContainer');\n }\n },\n boundariesElement: {\n type: [String, Element],\n default: function _default() {\n return getDefault('defaultBoundariesElement');\n }\n },\n popperOptions: {\n type: Object,\n default: function _default() {\n return getDefault('defaultPopperOptions');\n }\n },\n popoverClass: {\n type: [String, Array],\n default: function _default() {\n return getDefault('defaultClass');\n }\n },\n popoverBaseClass: {\n type: [String, Array],\n default: function _default() {\n return directive.options.popover.defaultBaseClass;\n }\n },\n popoverInnerClass: {\n type: [String, Array],\n default: function _default() {\n return directive.options.popover.defaultInnerClass;\n }\n },\n popoverWrapperClass: {\n type: [String, Array],\n default: function _default() {\n return directive.options.popover.defaultWrapperClass;\n }\n },\n popoverArrowClass: {\n type: [String, Array],\n default: function _default() {\n return directive.options.popover.defaultArrowClass;\n }\n },\n autoHide: {\n type: Boolean,\n default: function _default() {\n return directive.options.popover.defaultAutoHide;\n }\n },\n handleResize: {\n type: Boolean,\n default: function _default() {\n return directive.options.popover.defaultHandleResize;\n }\n },\n openGroup: {\n type: String,\n default: null\n },\n openClass: {\n type: [String, Array],\n default: function _default() {\n return directive.options.popover.defaultOpenClass;\n }\n },\n ariaId: {\n default: null\n }\n },\n data: function data() {\n return {\n isOpen: false,\n id: Math.random().toString(36).substr(2, 10)\n };\n },\n computed: {\n cssClass: function cssClass() {\n return _defineProperty({}, this.openClass, this.isOpen);\n },\n popoverId: function popoverId() {\n return \"popover_\".concat(this.ariaId != null ? this.ariaId : this.id);\n }\n },\n watch: {\n open: function open(val) {\n if (val) {\n this.show();\n } else {\n this.hide();\n }\n },\n disabled: function disabled(val, oldVal) {\n if (val !== oldVal) {\n if (val) {\n this.hide();\n } else if (this.open) {\n this.show();\n }\n }\n },\n container: function container(val) {\n if (this.isOpen && this.popperInstance) {\n var popoverNode = this.$refs.popover;\n var reference = this.$refs.trigger;\n var container = this.$_findContainer(this.container, reference);\n\n if (!container) {\n console.warn('No container for popover', this);\n return;\n }\n\n container.appendChild(popoverNode);\n this.popperInstance.scheduleUpdate();\n }\n },\n trigger: function trigger(val) {\n this.$_removeEventListeners();\n this.$_addEventListeners();\n },\n placement: function placement(val) {\n var _this = this;\n\n this.$_updatePopper(function () {\n _this.popperInstance.options.placement = val;\n });\n },\n offset: '$_restartPopper',\n boundariesElement: '$_restartPopper',\n popperOptions: {\n handler: '$_restartPopper',\n deep: true\n }\n },\n created: function created() {\n this.$_isDisposed = false;\n this.$_mounted = false;\n this.$_events = [];\n this.$_preventOpen = false;\n },\n mounted: function mounted() {\n var popoverNode = this.$refs.popover;\n popoverNode.parentNode && popoverNode.parentNode.removeChild(popoverNode);\n this.$_init();\n\n if (this.open) {\n this.show();\n }\n },\n deactivated: function deactivated() {\n this.hide();\n },\n beforeDestroy: function beforeDestroy() {\n this.dispose();\n },\n methods: {\n show: function show() {\n var _this2 = this;\n\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n event = _ref2.event;\n\n _ref2.skipDelay;\n var _ref2$force = _ref2.force,\n force = _ref2$force === void 0 ? false : _ref2$force;\n\n if (force || !this.disabled) {\n this.$_scheduleShow(event);\n this.$emit('show');\n }\n\n this.$emit('update:open', true);\n this.$_beingShowed = true;\n requestAnimationFrame(function () {\n _this2.$_beingShowed = false;\n });\n },\n hide: function hide() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n event = _ref3.event;\n\n _ref3.skipDelay;\n this.$_scheduleHide(event);\n this.$emit('hide');\n this.$emit('update:open', false);\n },\n dispose: function dispose() {\n this.$_isDisposed = true;\n this.$_removeEventListeners();\n this.hide({\n skipDelay: true\n });\n\n if (this.popperInstance) {\n this.popperInstance.destroy(); // destroy tooltipNode if removeOnDestroy is not set, as popperInstance.destroy() already removes the element\n\n if (!this.popperInstance.options.removeOnDestroy) {\n var popoverNode = this.$refs.popover;\n popoverNode.parentNode && popoverNode.parentNode.removeChild(popoverNode);\n }\n }\n\n this.$_mounted = false;\n this.popperInstance = null;\n this.isOpen = false;\n this.$emit('dispose');\n },\n $_init: function $_init() {\n if (this.trigger.indexOf('manual') === -1) {\n this.$_addEventListeners();\n }\n },\n $_show: function $_show() {\n var _this3 = this;\n\n var reference = this.$refs.trigger;\n var popoverNode = this.$refs.popover;\n clearTimeout(this.$_disposeTimer); // Already open\n\n if (this.isOpen) {\n return;\n } // Popper is already initialized\n\n\n if (this.popperInstance) {\n this.isOpen = true;\n this.popperInstance.enableEventListeners();\n this.popperInstance.scheduleUpdate();\n }\n\n if (!this.$_mounted) {\n var container = this.$_findContainer(this.container, reference);\n\n if (!container) {\n console.warn('No container for popover', this);\n return;\n }\n\n container.appendChild(popoverNode);\n this.$_mounted = true;\n this.isOpen = false;\n\n if (this.popperInstance) {\n requestAnimationFrame(function () {\n if (!_this3.hidden) {\n _this3.isOpen = true;\n }\n });\n }\n }\n\n if (!this.popperInstance) {\n var popperOptions = _objectSpread(_objectSpread({}, this.popperOptions), {}, {\n placement: this.placement\n });\n\n popperOptions.modifiers = _objectSpread(_objectSpread({}, popperOptions.modifiers), {}, {\n arrow: _objectSpread(_objectSpread({}, popperOptions.modifiers && popperOptions.modifiers.arrow), {}, {\n element: this.$refs.arrow\n })\n });\n\n if (this.offset) {\n var offset = this.$_getOffset();\n popperOptions.modifiers.offset = _objectSpread(_objectSpread({}, popperOptions.modifiers && popperOptions.modifiers.offset), {}, {\n offset: offset\n });\n }\n\n if (this.boundariesElement) {\n popperOptions.modifiers.preventOverflow = _objectSpread(_objectSpread({}, popperOptions.modifiers && popperOptions.modifiers.preventOverflow), {}, {\n boundariesElement: this.boundariesElement\n });\n }\n\n this.popperInstance = new Popper(reference, popoverNode, popperOptions); // Fix position\n\n requestAnimationFrame(function () {\n if (_this3.hidden) {\n _this3.hidden = false;\n\n _this3.$_hide();\n\n return;\n }\n\n if (!_this3.$_isDisposed && _this3.popperInstance) {\n _this3.popperInstance.scheduleUpdate(); // Show the tooltip\n\n\n requestAnimationFrame(function () {\n if (_this3.hidden) {\n _this3.hidden = false;\n\n _this3.$_hide();\n\n return;\n }\n\n if (!_this3.$_isDisposed) {\n _this3.isOpen = true;\n } else {\n _this3.dispose();\n }\n });\n } else {\n _this3.dispose();\n }\n });\n }\n\n var openGroup = this.openGroup;\n\n if (openGroup) {\n var popover;\n\n for (var i = 0; i < openPopovers.length; i++) {\n popover = openPopovers[i];\n\n if (popover.openGroup !== openGroup) {\n popover.hide();\n popover.$emit('close-group');\n }\n }\n }\n\n openPopovers.push(this);\n this.$emit('apply-show');\n },\n $_hide: function $_hide() {\n var _this4 = this; // Already hidden\n\n\n if (!this.isOpen) {\n return;\n }\n\n var index = openPopovers.indexOf(this);\n\n if (index !== -1) {\n openPopovers.splice(index, 1);\n }\n\n this.isOpen = false;\n\n if (this.popperInstance) {\n this.popperInstance.disableEventListeners();\n }\n\n clearTimeout(this.$_disposeTimer);\n var disposeTime = directive.options.popover.disposeTimeout || directive.options.disposeTimeout;\n\n if (disposeTime !== null) {\n this.$_disposeTimer = setTimeout(function () {\n var popoverNode = _this4.$refs.popover;\n\n if (popoverNode) {\n // Don't remove popper instance, just the HTML element\n popoverNode.parentNode && popoverNode.parentNode.removeChild(popoverNode);\n _this4.$_mounted = false;\n }\n }, disposeTime);\n }\n\n this.$emit('apply-hide');\n },\n $_findContainer: function $_findContainer(container, reference) {\n // if container is a query, get the relative element\n if (typeof container === 'string') {\n container = window.document.querySelector(container);\n } else if (container === false) {\n // if container is `false`, set it to reference parent\n container = reference.parentNode;\n }\n\n return container;\n },\n $_getOffset: function $_getOffset() {\n var typeofOffset = _typeof(this.offset);\n\n var offset = this.offset; // One value -> switch\n\n if (typeofOffset === 'number' || typeofOffset === 'string' && offset.indexOf(',') === -1) {\n offset = \"0, \".concat(offset);\n }\n\n return offset;\n },\n $_addEventListeners: function $_addEventListeners() {\n var _this5 = this;\n\n var reference = this.$refs.trigger;\n var directEvents = [];\n var oppositeEvents = [];\n var events = typeof this.trigger === 'string' ? this.trigger.split(' ').filter(function (trigger) {\n return ['click', 'hover', 'focus'].indexOf(trigger) !== -1;\n }) : [];\n events.forEach(function (event) {\n switch (event) {\n case 'hover':\n directEvents.push('mouseenter');\n oppositeEvents.push('mouseleave');\n break;\n\n case 'focus':\n directEvents.push('focus');\n oppositeEvents.push('blur');\n break;\n\n case 'click':\n directEvents.push('click');\n oppositeEvents.push('click');\n break;\n }\n }); // schedule show tooltip\n\n directEvents.forEach(function (event) {\n var func = function func(event) {\n if (_this5.isOpen) {\n return;\n }\n\n event.usedByTooltip = true;\n !_this5.$_preventOpen && _this5.show({\n event: event\n });\n _this5.hidden = false;\n };\n\n _this5.$_events.push({\n event: event,\n func: func\n });\n\n reference.addEventListener(event, func);\n }); // schedule hide tooltip\n\n oppositeEvents.forEach(function (event) {\n var func = function func(event) {\n if (event.usedByTooltip) {\n return;\n }\n\n _this5.hide({\n event: event\n });\n\n _this5.hidden = true;\n };\n\n _this5.$_events.push({\n event: event,\n func: func\n });\n\n reference.addEventListener(event, func);\n });\n },\n $_scheduleShow: function $_scheduleShow() {\n var skipDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n clearTimeout(this.$_scheduleTimer);\n\n if (skipDelay) {\n this.$_show();\n } else {\n // defaults to 0\n var computedDelay = parseInt(this.delay && this.delay.show || this.delay || 0);\n this.$_scheduleTimer = setTimeout(this.$_show.bind(this), computedDelay);\n }\n },\n $_scheduleHide: function $_scheduleHide() {\n var _this6 = this;\n\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var skipDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n clearTimeout(this.$_scheduleTimer);\n\n if (skipDelay) {\n this.$_hide();\n } else {\n // defaults to 0\n var computedDelay = parseInt(this.delay && this.delay.hide || this.delay || 0);\n this.$_scheduleTimer = setTimeout(function () {\n if (!_this6.isOpen) {\n return;\n } // if we are hiding because of a mouseleave, we must check that the new\n // reference isn't the tooltip, because in this case we don't want to hide it\n\n\n if (event && event.type === 'mouseleave') {\n var isSet = _this6.$_setTooltipNodeEvent(event); // if we set the new event, don't hide the tooltip yet\n // the new event will take care to hide it if necessary\n\n\n if (isSet) {\n return;\n }\n }\n\n _this6.$_hide();\n }, computedDelay);\n }\n },\n $_setTooltipNodeEvent: function $_setTooltipNodeEvent(event) {\n var _this7 = this;\n\n var reference = this.$refs.trigger;\n var popoverNode = this.$refs.popover;\n var relatedreference = event.relatedreference || event.toElement || event.relatedTarget;\n\n var callback = function callback(event2) {\n var relatedreference2 = event2.relatedreference || event2.toElement || event2.relatedTarget; // Remove event listener after call\n\n popoverNode.removeEventListener(event.type, callback); // If the new reference is not the reference element\n\n if (!reference.contains(relatedreference2)) {\n // Schedule to hide tooltip\n _this7.hide({\n event: event2\n });\n }\n };\n\n if (popoverNode.contains(relatedreference)) {\n // listen to mouseleave on the tooltip element to be able to hide the tooltip\n popoverNode.addEventListener(event.type, callback);\n return true;\n }\n\n return false;\n },\n $_removeEventListeners: function $_removeEventListeners() {\n var reference = this.$refs.trigger;\n this.$_events.forEach(function (_ref4) {\n var func = _ref4.func,\n event = _ref4.event;\n reference.removeEventListener(event, func);\n });\n this.$_events = [];\n },\n $_updatePopper: function $_updatePopper(cb) {\n if (this.popperInstance) {\n cb();\n if (this.isOpen) this.popperInstance.scheduleUpdate();\n }\n },\n $_restartPopper: function $_restartPopper() {\n if (this.popperInstance) {\n var isOpen = this.isOpen;\n this.dispose();\n this.$_isDisposed = false;\n this.$_init();\n\n if (isOpen) {\n this.show({\n skipDelay: true,\n force: true\n });\n }\n }\n },\n $_handleGlobalClose: function $_handleGlobalClose(event) {\n var _this8 = this;\n\n var touch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (this.$_beingShowed) return;\n this.hide({\n event: event\n });\n\n if (event.closePopover) {\n this.$emit('close-directive');\n } else {\n this.$emit('auto-hide');\n }\n\n if (touch) {\n this.$_preventOpen = true;\n setTimeout(function () {\n _this8.$_preventOpen = false;\n }, 300);\n }\n },\n $_handleResize: function $_handleResize() {\n if (this.isOpen && this.popperInstance) {\n this.popperInstance.scheduleUpdate();\n this.$emit('resize');\n }\n }\n }\n};\n\nif (typeof document !== 'undefined' && typeof window !== 'undefined') {\n if (isIOS) {\n document.addEventListener('touchend', handleGlobalTouchend, supportsPassive ? {\n passive: true,\n capture: true\n } : true);\n } else {\n window.addEventListener('click', handleGlobalClick, true);\n }\n}\n\nfunction handleGlobalClick(event) {\n handleGlobalClose(event);\n}\n\nfunction handleGlobalTouchend(event) {\n handleGlobalClose(event, true);\n}\n\nfunction handleGlobalClose(event) {\n var touch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var _loop = function _loop(i) {\n var popover = openPopovers[i];\n\n if (popover.$refs.popover) {\n var contains = popover.$refs.popover.contains(event.target);\n requestAnimationFrame(function () {\n if (event.closeAllPopover || event.closePopover && contains || popover.autoHide && !contains) {\n popover.$_handleGlobalClose(event, touch);\n }\n });\n }\n }; // Delay so that close directive has time to set values\n\n\n for (var i = 0; i < openPopovers.length; i++) {\n _loop(i);\n }\n}\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier\n/* server only */\n, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\n if (typeof shadowMode !== 'boolean') {\n createInjectorSSR = createInjector;\n createInjector = shadowMode;\n shadowMode = false;\n } // Vue.extend constructor export interop.\n\n\n var options = typeof script === 'function' ? script.options : script; // render functions\n\n if (template && template.render) {\n options.render = template.render;\n options.staticRenderFns = template.staticRenderFns;\n options._compiled = true; // functional template\n\n if (isFunctionalTemplate) {\n options.functional = true;\n }\n } // scopedId\n\n\n if (scopeId) {\n options._scopeId = scopeId;\n }\n\n var hook;\n\n if (moduleIdentifier) {\n // server build\n hook = function hook(context) {\n // 2.3 injection\n context = context || // cached call\n this.$vnode && this.$vnode.ssrContext || // stateful\n this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional\n // 2.2 with runInNewContext: true\n\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__;\n } // inject component styles\n\n\n if (style) {\n style.call(this, createInjectorSSR(context));\n } // register component module identifier for async chunk inference\n\n\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier);\n }\n }; // used by ssr in case component is cached and beforeCreate\n // never gets called\n\n\n options._ssrRegister = hook;\n } else if (style) {\n hook = shadowMode ? function (context) {\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\n } : function (context) {\n style.call(this, createInjector(context));\n };\n }\n\n if (hook) {\n if (options.functional) {\n // register for functional component in vue file\n var originalRender = options.render;\n\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context);\n return originalRender(h, context);\n };\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate;\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\n }\n }\n\n return script;\n}\n/* script */\n\n\nvar __vue_script__ = script;\n/* template */\n\nvar __vue_render__ = function __vue_render__() {\n var _vm = this;\n\n var _h = _vm.$createElement;\n\n var _c = _vm._self._c || _h;\n\n return _c(\"div\", {\n staticClass: \"v-popover\",\n class: _vm.cssClass\n }, [_c(\"div\", {\n ref: \"trigger\",\n staticClass: \"trigger\",\n staticStyle: {\n display: \"inline-block\"\n },\n attrs: {\n \"aria-describedby\": _vm.isOpen ? _vm.popoverId : undefined,\n tabindex: _vm.trigger.indexOf(\"focus\") !== -1 ? 0 : undefined\n }\n }, [_vm._t(\"default\")], 2), _vm._v(\" \"), _c(\"div\", {\n ref: \"popover\",\n class: [_vm.popoverBaseClass, _vm.popoverClass, _vm.cssClass],\n style: {\n visibility: _vm.isOpen ? \"visible\" : \"hidden\"\n },\n attrs: {\n id: _vm.popoverId,\n \"aria-hidden\": _vm.isOpen ? \"false\" : \"true\",\n tabindex: _vm.autoHide ? 0 : undefined\n },\n on: {\n keyup: function keyup($event) {\n if (!$event.type.indexOf(\"key\") && _vm._k($event.keyCode, \"esc\", 27, $event.key, [\"Esc\", \"Escape\"])) {\n return null;\n }\n\n _vm.autoHide && _vm.hide();\n }\n }\n }, [_c(\"div\", {\n class: _vm.popoverWrapperClass\n }, [_c(\"div\", {\n ref: \"inner\",\n class: _vm.popoverInnerClass,\n staticStyle: {\n position: \"relative\"\n }\n }, [_c(\"div\", [_vm._t(\"popover\", null, {\n isOpen: _vm.isOpen\n })], 2), _vm._v(\" \"), _vm.handleResize ? _c(\"ResizeObserver\", {\n on: {\n notify: _vm.$_handleResize\n }\n }) : _vm._e()], 1), _vm._v(\" \"), _c(\"div\", {\n ref: \"arrow\",\n class: _vm.popoverArrowClass\n })])])]);\n};\n\nvar __vue_staticRenderFns__ = [];\n__vue_render__._withStripped = true;\n/* style */\n\nvar __vue_inject_styles__ = undefined;\n/* scoped */\n\nvar __vue_scope_id__ = undefined;\n/* module identifier */\n\nvar __vue_module_identifier__ = undefined;\n/* functional template */\n\nvar __vue_is_functional_template__ = false;\n/* style inject */\n\n/* style inject SSR */\n\n/* style inject shadow dom */\n\nvar __vue_component__ = /*#__PURE__*/normalizeComponent({\n render: __vue_render__,\n staticRenderFns: __vue_staticRenderFns__\n}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".resize-observer[data-v-8859cc6c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-8859cc6c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}\";\nstyleInject(css_248z);\n\nfunction install(Vue) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (install.installed) return;\n install.installed = true;\n var finalOptions = {};\n merge(finalOptions, defaultOptions, options);\n plugin.options = finalOptions;\n directive.options = finalOptions;\n Vue.directive('tooltip', directive);\n Vue.directive('close-popover', vclosepopover);\n Vue.component('VPopover', __vue_component__);\n}\n\nvar VTooltip = directive;\nvar VClosePopover = vclosepopover;\nvar VPopover = __vue_component__;\nvar plugin = {\n install: install,\n\n get enabled() {\n return state.enabled;\n },\n\n set enabled(value) {\n state.enabled = value;\n }\n\n}; // Auto-install\n\nvar GlobalVue = null;\n\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue;\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.Vue;\n}\n\nif (GlobalVue) {\n GlobalVue.use(plugin);\n}\n\nexport default plugin;\nexport { VClosePopover, VPopover, VTooltip, createTooltip, destroyTooltip, install };","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var baseIsEqual = require(\"./_baseIsEqual\");\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n\n\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;","function getInternetExplorerVersion() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf('MSIE ');\n\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n } // other browser\n\n\n return -1;\n} //\n\n\nvar isIE;\n\nfunction initCompat() {\n if (!initCompat.init) {\n initCompat.init = true;\n isIE = getInternetExplorerVersion() !== -1;\n }\n}\n\nvar script = {\n name: 'ResizeObserver',\n props: {\n emitOnMount: {\n type: Boolean,\n default: false\n },\n ignoreWidth: {\n type: Boolean,\n default: false\n },\n ignoreHeight: {\n type: Boolean,\n default: false\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n initCompat();\n this.$nextTick(function () {\n _this._w = _this.$el.offsetWidth;\n _this._h = _this.$el.offsetHeight;\n\n if (_this.emitOnMount) {\n _this.emitSize();\n }\n });\n var object = document.createElement('object');\n this._resizeObject = object;\n object.setAttribute('aria-hidden', 'true');\n object.setAttribute('tabindex', -1);\n object.onload = this.addResizeHandlers;\n object.type = 'text/html';\n\n if (isIE) {\n this.$el.appendChild(object);\n }\n\n object.data = 'about:blank';\n\n if (!isIE) {\n this.$el.appendChild(object);\n }\n },\n beforeDestroy: function beforeDestroy() {\n this.removeResizeHandlers();\n },\n methods: {\n compareAndNotify: function compareAndNotify() {\n if (!this.ignoreWidth && this._w !== this.$el.offsetWidth || !this.ignoreHeight && this._h !== this.$el.offsetHeight) {\n this._w = this.$el.offsetWidth;\n this._h = this.$el.offsetHeight;\n this.emitSize();\n }\n },\n emitSize: function emitSize() {\n this.$emit('notify', {\n width: this._w,\n height: this._h\n });\n },\n addResizeHandlers: function addResizeHandlers() {\n this._resizeObject.contentDocument.defaultView.addEventListener('resize', this.compareAndNotify);\n\n this.compareAndNotify();\n },\n removeResizeHandlers: function removeResizeHandlers() {\n if (this._resizeObject && this._resizeObject.onload) {\n if (!isIE && this._resizeObject.contentDocument) {\n this._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.compareAndNotify);\n }\n\n this.$el.removeChild(this._resizeObject);\n this._resizeObject.onload = null;\n this._resizeObject = null;\n }\n }\n }\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier\n/* server only */\n, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\n if (typeof shadowMode !== 'boolean') {\n createInjectorSSR = createInjector;\n createInjector = shadowMode;\n shadowMode = false;\n } // Vue.extend constructor export interop.\n\n\n var options = typeof script === 'function' ? script.options : script; // render functions\n\n if (template && template.render) {\n options.render = template.render;\n options.staticRenderFns = template.staticRenderFns;\n options._compiled = true; // functional template\n\n if (isFunctionalTemplate) {\n options.functional = true;\n }\n } // scopedId\n\n\n if (scopeId) {\n options._scopeId = scopeId;\n }\n\n var hook;\n\n if (moduleIdentifier) {\n // server build\n hook = function hook(context) {\n // 2.3 injection\n context = context || // cached call\n this.$vnode && this.$vnode.ssrContext || // stateful\n this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional\n // 2.2 with runInNewContext: true\n\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__;\n } // inject component styles\n\n\n if (style) {\n style.call(this, createInjectorSSR(context));\n } // register component module identifier for async chunk inference\n\n\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier);\n }\n }; // used by ssr in case component is cached and beforeCreate\n // never gets called\n\n\n options._ssrRegister = hook;\n } else if (style) {\n hook = shadowMode ? function (context) {\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\n } : function (context) {\n style.call(this, createInjector(context));\n };\n }\n\n if (hook) {\n if (options.functional) {\n // register for functional component in vue file\n var originalRender = options.render;\n\n options.render = function renderWithStyleInjection(h, context) {\n hook.call(context);\n return originalRender(h, context);\n };\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate;\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\n }\n }\n\n return script;\n}\n/* script */\n\n\nvar __vue_script__ = script;\n/* template */\n\nvar __vue_render__ = function __vue_render__() {\n var _vm = this;\n\n var _h = _vm.$createElement;\n\n var _c = _vm._self._c || _h;\n\n return _c(\"div\", {\n staticClass: \"resize-observer\",\n attrs: {\n tabindex: \"-1\"\n }\n });\n};\n\nvar __vue_staticRenderFns__ = [];\n__vue_render__._withStripped = true;\n/* style */\n\nvar __vue_inject_styles__ = undefined;\n/* scoped */\n\nvar __vue_scope_id__ = \"data-v-8859cc6c\";\n/* module identifier */\n\nvar __vue_module_identifier__ = undefined;\n/* functional template */\n\nvar __vue_is_functional_template__ = false;\n/* style inject */\n\n/* style inject SSR */\n\n/* style inject shadow dom */\n\nvar __vue_component__ = /*#__PURE__*/normalizeComponent({\n render: __vue_render__,\n staticRenderFns: __vue_staticRenderFns__\n}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);\n\nfunction install(Vue) {\n // eslint-disable-next-line vue/component-definition-name-casing\n Vue.component('resize-observer', __vue_component__);\n Vue.component('ResizeObserver', __vue_component__);\n}\n\nvar plugin = {\n // eslint-disable-next-line no-undef\n version: \"1.0.1\",\n install: install\n};\nvar GlobalVue = null;\n\nif (typeof window !== 'undefined') {\n GlobalVue = window.Vue;\n} else if (typeof global !== 'undefined') {\n GlobalVue = global.Vue;\n}\n\nif (GlobalVue) {\n GlobalVue.use(plugin);\n}\n\nexport default plugin;\nexport { __vue_component__ as ResizeObserver, install };","var baseMerge = require(\"./_baseMerge\"),\n createAssigner = require(\"./_createAssigner\");\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n\n\nvar merge = createAssigner(function (object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\nmodule.exports = merge;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n!function (t, e) {\n \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) && \"object\" == (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) ? module.exports = e() : \"function\" == typeof define && define.amd ? define([], e) : \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) ? exports[\"vue-js-modal\"] = e() : t[\"vue-js-modal\"] = e();\n}(window, function () {\n return i = {}, o.m = n = [function (t, e, n) {\n var i = n(7);\n \"string\" == typeof i && (i = [[t.i, i, \"\"]]), i.locals && (t.exports = i.locals);\n (0, n(4).default)(\"d763679c\", i, !1, {});\n }, function (t, e, n) {\n var i = n(10);\n \"string\" == typeof i && (i = [[t.i, i, \"\"]]), i.locals && (t.exports = i.locals);\n (0, n(4).default)(\"6b9cc0e0\", i, !1, {});\n }, function (t, e, n) {\n var i = n(12);\n \"string\" == typeof i && (i = [[t.i, i, \"\"]]), i.locals && (t.exports = i.locals);\n (0, n(4).default)(\"663c004e\", i, !1, {});\n }, function (t, e) {\n t.exports = function (n) {\n var a = [];\n return a.toString = function () {\n return this.map(function (t) {\n var e = function (t, e) {\n var n = t[1] || \"\",\n i = t[3];\n if (!i) return n;\n\n if (e && \"function\" == typeof btoa) {\n var o = function (t) {\n return \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(t)))) + \" */\";\n }(i),\n r = i.sources.map(function (t) {\n return \"/*# sourceURL=\" + i.sourceRoot + t + \" */\";\n });\n\n return [n].concat(r).concat([o]).join(\"\\n\");\n }\n\n return [n].join(\"\\n\");\n }(t, n);\n\n return t[2] ? \"@media \" + t[2] + \"{\" + e + \"}\" : e;\n }).join(\"\");\n }, a.i = function (t, e) {\n \"string\" == typeof t && (t = [[null, t, \"\"]]);\n\n for (var n = {}, i = 0; i < this.length; i++) {\n var o = this[i][0];\n \"number\" == typeof o && (n[o] = !0);\n }\n\n for (i = 0; i < t.length; i++) {\n var r = t[i];\n \"number\" == typeof r[0] && n[r[0]] || (e && !r[2] ? r[2] = e : e && (r[2] = \"(\" + r[2] + \") and (\" + e + \")\"), a.push(r));\n }\n }, a;\n };\n }, function (t, e, n) {\n \"use strict\";\n\n function l(t, e) {\n for (var n = [], i = {}, o = 0; o < e.length; o++) {\n var r = e[o],\n a = r[0],\n s = {\n id: t + \":\" + o,\n css: r[1],\n media: r[2],\n sourceMap: r[3]\n };\n i[a] ? i[a].parts.push(s) : n.push(i[a] = {\n id: a,\n parts: [s]\n });\n }\n\n return n;\n }\n\n n.r(e), n.d(e, \"default\", function () {\n return p;\n });\n var i = \"undefined\" != typeof document;\n if (\"undefined\" != typeof DEBUG && DEBUG && !i) throw new Error(\"vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\");\n\n var u = {},\n o = i && (document.head || document.getElementsByTagName(\"head\")[0]),\n r = null,\n a = 0,\n c = !1,\n s = function s() {},\n d = null,\n h = \"data-vue-ssr-id\",\n f = \"undefined\" != typeof navigator && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());\n\n function p(a, t, e, n) {\n c = e, d = n || {};\n var s = l(a, t);\n return v(s), function (t) {\n for (var e = [], n = 0; n < s.length; n++) {\n var i = s[n];\n (o = u[i.id]).refs--, e.push(o);\n }\n\n t ? v(s = l(a, t)) : s = [];\n\n for (n = 0; n < e.length; n++) {\n var o;\n\n if (0 === (o = e[n]).refs) {\n for (var r = 0; r < o.parts.length; r++) {\n o.parts[r]();\n }\n\n delete u[o.id];\n }\n }\n };\n }\n\n function v(t) {\n for (var e = 0; e < t.length; e++) {\n var n = t[e],\n i = u[n.id];\n\n if (i) {\n i.refs++;\n\n for (var o = 0; o < i.parts.length; o++) {\n i.parts[o](n.parts[o]);\n }\n\n for (; o < n.parts.length; o++) {\n i.parts.push(b(n.parts[o]));\n }\n\n i.parts.length > n.parts.length && (i.parts.length = n.parts.length);\n } else {\n var r = [];\n\n for (o = 0; o < n.parts.length; o++) {\n r.push(b(n.parts[o]));\n }\n\n u[n.id] = {\n id: n.id,\n refs: 1,\n parts: r\n };\n }\n }\n }\n\n function m() {\n var t = document.createElement(\"style\");\n return t.type = \"text/css\", o.appendChild(t), t;\n }\n\n function b(e) {\n var n,\n i,\n t = document.querySelector(\"style[\" + h + '~=\"' + e.id + '\"]');\n\n if (t) {\n if (c) return s;\n t.parentNode.removeChild(t);\n }\n\n if (f) {\n var o = a++;\n t = r = r || m(), n = w.bind(null, t, o, !1), i = w.bind(null, t, o, !0);\n } else t = m(), n = function (t, e) {\n var n = e.css,\n i = e.media,\n o = e.sourceMap;\n i && t.setAttribute(\"media\", i);\n d.ssrId && t.setAttribute(h, e.id);\n o && (n += \"\\n/*# sourceURL=\" + o.sources[0] + \" */\", n += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(o)))) + \" */\");\n if (t.styleSheet) t.styleSheet.cssText = n;else {\n for (; t.firstChild;) {\n t.removeChild(t.firstChild);\n }\n\n t.appendChild(document.createTextNode(n));\n }\n }.bind(null, t), i = function i() {\n t.parentNode.removeChild(t);\n };\n\n return n(e), function (t) {\n if (t) {\n if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return;\n n(e = t);\n } else i();\n };\n }\n\n var y,\n g = (y = [], function (t, e) {\n return y[t] = e, y.filter(Boolean).join(\"\\n\");\n });\n\n function w(t, e, n, i) {\n var o = n ? \"\" : i.css;\n if (t.styleSheet) t.styleSheet.cssText = g(e, o);else {\n var r = document.createTextNode(o),\n a = t.childNodes;\n a[e] && t.removeChild(a[e]), a.length ? t.insertBefore(r, a[e]) : t.appendChild(r);\n }\n }\n }, function (t, M, e) {\n \"use strict\";\n\n (function (t) {\n var i = function () {\n if (\"undefined\" != typeof Map) return Map;\n\n function i(t, n) {\n var i = -1;\n return t.some(function (t, e) {\n return t[0] === n && (i = e, !0);\n }), i;\n }\n\n return Object.defineProperty(t.prototype, \"size\", {\n get: function get() {\n return this.__entries__.length;\n },\n enumerable: !0,\n configurable: !0\n }), t.prototype.get = function (t) {\n var e = i(this.__entries__, t),\n n = this.__entries__[e];\n return n && n[1];\n }, t.prototype.set = function (t, e) {\n var n = i(this.__entries__, t);\n ~n ? this.__entries__[n][1] = e : this.__entries__.push([t, e]);\n }, t.prototype.delete = function (t) {\n var e = this.__entries__,\n n = i(e, t);\n ~n && e.splice(n, 1);\n }, t.prototype.has = function (t) {\n return !!~i(this.__entries__, t);\n }, t.prototype.clear = function () {\n this.__entries__.splice(0);\n }, t.prototype.forEach = function (t, e) {\n void 0 === e && (e = null);\n\n for (var n = 0, i = this.__entries__; n < i.length; n++) {\n var o = i[n];\n t.call(e, o[1], o[0]);\n }\n }, t;\n\n function t() {\n this.__entries__ = [];\n }\n }(),\n n = \"undefined\" != typeof window && \"undefined\" != typeof document && window.document === document,\n e = void 0 !== t && t.Math === Math ? t : \"undefined\" != typeof self && self.Math === Math ? self : \"undefined\" != typeof window && window.Math === Math ? window : Function(\"return this\")(),\n l = \"function\" == typeof requestAnimationFrame ? requestAnimationFrame.bind(e) : function (t) {\n return setTimeout(function () {\n return t(Date.now());\n }, 1e3 / 60);\n },\n u = 2;\n\n var o = [\"top\", \"right\", \"bottom\", \"left\", \"width\", \"height\", \"size\", \"weight\"],\n r = \"undefined\" != typeof MutationObserver,\n a = (s.prototype.addObserver = function (t) {\n ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();\n }, s.prototype.removeObserver = function (t) {\n var e = this.observers_,\n n = e.indexOf(t);\n ~n && e.splice(n, 1), !e.length && this.connected_ && this.disconnect_();\n }, s.prototype.refresh = function () {\n this.updateObservers_() && this.refresh();\n }, s.prototype.updateObservers_ = function () {\n var t = this.observers_.filter(function (t) {\n return t.gatherActive(), t.hasActive();\n });\n return t.forEach(function (t) {\n return t.broadcastActive();\n }), 0 < t.length;\n }, s.prototype.connect_ = function () {\n n && !this.connected_ && (document.addEventListener(\"transitionend\", this.onTransitionEnd_), window.addEventListener(\"resize\", this.refresh), r ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {\n attributes: !0,\n childList: !0,\n characterData: !0,\n subtree: !0\n })) : (document.addEventListener(\"DOMSubtreeModified\", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);\n }, s.prototype.disconnect_ = function () {\n n && this.connected_ && (document.removeEventListener(\"transitionend\", this.onTransitionEnd_), window.removeEventListener(\"resize\", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener(\"DOMSubtreeModified\", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);\n }, s.prototype.onTransitionEnd_ = function (t) {\n var e = t.propertyName,\n n = void 0 === e ? \"\" : e;\n o.some(function (t) {\n return !!~n.indexOf(t);\n }) && this.refresh();\n }, s.getInstance = function () {\n return this.instance_ || (this.instance_ = new s()), this.instance_;\n }, s.instance_ = null, s);\n\n function s() {\n function t() {\n r && (r = !1, i()), a && n();\n }\n\n function e() {\n l(t);\n }\n\n function n() {\n var t = Date.now();\n\n if (r) {\n if (t - s < u) return;\n a = !0;\n } else a = !(r = !0), setTimeout(e, o);\n\n s = t;\n }\n\n var i, o, r, a, s;\n this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = (i = this.refresh.bind(this), a = r = !(o = 20), s = 0, n);\n }\n\n var c = function c(t, e) {\n for (var n = 0, i = Object.keys(e); n < i.length; n++) {\n var o = i[n];\n Object.defineProperty(t, o, {\n value: e[o],\n enumerable: !1,\n writable: !1,\n configurable: !0\n });\n }\n\n return t;\n },\n h = function h(t) {\n return t && t.ownerDocument && t.ownerDocument.defaultView || e;\n },\n f = y(0, 0, 0, 0);\n\n function p(t) {\n return parseFloat(t) || 0;\n }\n\n function v(n) {\n for (var t = [], e = 1; e < arguments.length; e++) {\n t[e - 1] = arguments[e];\n }\n\n return t.reduce(function (t, e) {\n return t + p(n[\"border-\" + e + \"-width\"]);\n }, 0);\n }\n\n function d(t) {\n var e = t.clientWidth,\n n = t.clientHeight;\n if (!e && !n) return f;\n\n var i,\n o = h(t).getComputedStyle(t),\n r = function (t) {\n for (var e = {}, n = 0, i = [\"top\", \"right\", \"bottom\", \"left\"]; n < i.length; n++) {\n var o = i[n],\n r = t[\"padding-\" + o];\n e[o] = p(r);\n }\n\n return e;\n }(o),\n a = r.left + r.right,\n s = r.top + r.bottom,\n l = p(o.width),\n u = p(o.height);\n\n if (\"border-box\" === o.boxSizing && (Math.round(l + a) !== e && (l -= v(o, \"left\", \"right\") + a), Math.round(u + s) !== n && (u -= v(o, \"top\", \"bottom\") + s)), (i = t) !== h(i).document.documentElement) {\n var c = Math.round(l + a) - e,\n d = Math.round(u + s) - n;\n 1 !== Math.abs(c) && (l -= c), 1 !== Math.abs(d) && (u -= d);\n }\n\n return y(r.left, r.top, l, u);\n }\n\n var m = \"undefined\" != typeof SVGGraphicsElement ? function (t) {\n return t instanceof h(t).SVGGraphicsElement;\n } : function (t) {\n return t instanceof h(t).SVGElement && \"function\" == typeof t.getBBox;\n };\n\n function b(t) {\n return n ? m(t) ? y(0, 0, (e = t.getBBox()).width, e.height) : d(t) : f;\n var e;\n }\n\n function y(t, e, n, i) {\n return {\n x: t,\n y: e,\n width: n,\n height: i\n };\n }\n\n var g = (w.prototype.isActive = function () {\n var t = b(this.target);\n return (this.contentRect_ = t).width !== this.broadcastWidth || t.height !== this.broadcastHeight;\n }, w.prototype.broadcastRect = function () {\n var t = this.contentRect_;\n return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;\n }, w);\n\n function w(t) {\n this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = y(0, 0, 0, 0), this.target = t;\n }\n\n var _ = function _(t, e) {\n var n,\n i,\n o,\n r,\n a,\n s,\n l,\n u = (i = (n = e).x, o = n.y, r = n.width, a = n.height, s = \"undefined\" != typeof DOMRectReadOnly ? DOMRectReadOnly : Object, l = Object.create(s.prototype), c(l, {\n x: i,\n y: o,\n width: r,\n height: a,\n top: o,\n right: i + r,\n bottom: a + o,\n left: i\n }), l);\n c(this, {\n target: t,\n contentRect: u\n });\n },\n E = (x.prototype.observe = function (t) {\n if (!arguments.length) throw new TypeError(\"1 argument required, but only 0 present.\");\n\n if (\"undefined\" != typeof Element && Element instanceof Object) {\n if (!(t instanceof h(t).Element)) throw new TypeError('parameter 1 is not of type \"Element\".');\n var e = this.observations_;\n e.has(t) || (e.set(t, new g(t)), this.controller_.addObserver(this), this.controller_.refresh());\n }\n }, x.prototype.unobserve = function (t) {\n if (!arguments.length) throw new TypeError(\"1 argument required, but only 0 present.\");\n\n if (\"undefined\" != typeof Element && Element instanceof Object) {\n if (!(t instanceof h(t).Element)) throw new TypeError('parameter 1 is not of type \"Element\".');\n var e = this.observations_;\n e.has(t) && (e.delete(t), e.size || this.controller_.removeObserver(this));\n }\n }, x.prototype.disconnect = function () {\n this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);\n }, x.prototype.gatherActive = function () {\n var e = this;\n this.clearActive(), this.observations_.forEach(function (t) {\n t.isActive() && e.activeObservations_.push(t);\n });\n }, x.prototype.broadcastActive = function () {\n if (this.hasActive()) {\n var t = this.callbackCtx_,\n e = this.activeObservations_.map(function (t) {\n return new _(t.target, t.broadcastRect());\n });\n this.callback_.call(t, e, t), this.clearActive();\n }\n }, x.prototype.clearActive = function () {\n this.activeObservations_.splice(0);\n }, x.prototype.hasActive = function () {\n return 0 < this.activeObservations_.length;\n }, x);\n\n function x(t, e, n) {\n if (this.activeObservations_ = [], this.observations_ = new i(), \"function\" != typeof t) throw new TypeError(\"The callback provided as parameter 1 is not a function.\");\n this.callback_ = t, this.controller_ = e, this.callbackCtx_ = n;\n }\n\n var T = new (\"undefined\" != typeof WeakMap ? WeakMap : i)(),\n O = function t(e) {\n if (!(this instanceof t)) throw new TypeError(\"Cannot call a class as a function.\");\n if (!arguments.length) throw new TypeError(\"1 argument required, but only 0 present.\");\n var n = a.getInstance(),\n i = new E(e, n, this);\n T.set(this, i);\n };\n\n [\"observe\", \"unobserve\", \"disconnect\"].forEach(function (e) {\n O.prototype[e] = function () {\n var t;\n return (t = T.get(this))[e].apply(t, arguments);\n };\n });\n var S = void 0 !== e.ResizeObserver ? e.ResizeObserver : O;\n M.a = S;\n }).call(this, e(8));\n }, function (t, e, n) {\n \"use strict\";\n\n var i = n(0);\n n.n(i).a;\n }, function (t, e, n) {\n (t.exports = n(3)(!1)).push([t.i, \"\\n.vue-modal-resizer {\\n display: block;\\n overflow: hidden;\\n position: absolute;\\n width: 12px;\\n height: 12px;\\n right: 0;\\n bottom: 0;\\n z-index: 9999999;\\n background: transparent;\\n cursor: se-resize;\\n}\\n.vue-modal-resizer::after {\\n display: block;\\n position: absolute;\\n content: '';\\n background: transparent;\\n left: 0;\\n top: 0;\\n width: 0;\\n height: 0;\\n border-bottom: 10px solid #ddd;\\n border-left: 10px solid transparent;\\n}\\n.vue-modal-resizer.clicked::after {\\n border-bottom: 10px solid #369be9;\\n}\\n\", \"\"]);\n }, function (t, e) {\n var n;\n\n n = function () {\n return this;\n }();\n\n try {\n n = n || new Function(\"return this\")();\n } catch (t) {\n \"object\" == (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) && (n = window);\n }\n\n t.exports = n;\n }, function (t, e, n) {\n \"use strict\";\n\n var i = n(1);\n n.n(i).a;\n }, function (t, e, n) {\n (t.exports = n(3)(!1)).push([t.i, \"\\n.vm--block-scroll {\\n overflow: hidden;\\n width: 100vw;\\n}\\n.vm--container {\\n position: fixed;\\n box-sizing: border-box;\\n left: 0;\\n top: 0;\\n width: 100%;\\n height: 100vh;\\n z-index: 999;\\n}\\n.vm--overlay {\\n position: fixed;\\n box-sizing: border-box;\\n left: 0;\\n top: 0;\\n width: 100%;\\n height: 100vh;\\n background: rgba(0, 0, 0, 0.2);\\n /* z-index: 999; */\\n opacity: 1;\\n}\\n.vm--container.scrollable {\\n height: 100%;\\n min-height: 100vh;\\n overflow-y: auto;\\n -webkit-overflow-scrolling: touch;\\n}\\n.vm--modal {\\n position: relative;\\n overflow: hidden;\\n box-sizing: border-box;\\n\\n background-color: white;\\n border-radius: 3px;\\n box-shadow: 0 20px 60px -2px rgba(27, 33, 58, 0.4);\\n}\\n.vm--container.scrollable .vm--modal {\\n margin-bottom: 2px;\\n}\\n.vm--top-right-slot {\\n display: block;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n.vm-transition--overlay-enter-active,\\n.vm-transition--overlay-leave-active {\\n transition: all 50ms;\\n}\\n.vm-transition--overlay-enter,\\n.vm-transition--overlay-leave-active {\\n opacity: 0;\\n}\\n.vm-transition--modal-enter-active,\\n.vm-transition--modal-leave-active {\\n transition: all 400ms;\\n}\\n.vm-transition--modal-enter,\\n.vm-transition--modal-leave-active {\\n opacity: 0;\\n transform: translateY(-20px);\\n}\\n.vm-transition--default-enter-active,\\n.vm-transition--default-leave-active {\\n transition: all 2ms;\\n}\\n.vm-transition--default-enter,\\n.vm-transition--default-leave-active {\\n opacity: 0;\\n}\\n\", \"\"]);\n }, function (t, e, n) {\n \"use strict\";\n\n var i = n(2);\n n.n(i).a;\n }, function (t, e, n) {\n (t.exports = n(3)(!1)).push([t.i, \"\\n.vue-dialog {\\n font-size: 14px;\\n}\\n.vue-dialog div {\\n box-sizing: border-box;\\n}\\n.vue-dialog-content {\\n flex: 1 0 auto;\\n width: 100%;\\n padding: 14px;\\n}\\n.vue-dialog-content-title {\\n font-weight: 600;\\n padding-bottom: 14px;\\n}\\n.vue-dialog-buttons {\\n display: flex;\\n flex: 0 1 auto;\\n width: 100%;\\n border-top: 1px solid #eee;\\n}\\n.vue-dialog-buttons-none {\\n width: 100%;\\n padding-bottom: 14px;\\n}\\n.vue-dialog-button {\\n font-size: inherit;\\n background: transparent;\\n padding: 0;\\n margin: 0;\\n border: 0;\\n cursor: pointer;\\n box-sizing: border-box;\\n line-height: 40px;\\n height: 40px;\\n color: inherit;\\n font: inherit;\\n outline: none;\\n}\\n.vue-dialog-button:hover {\\n background: #f9f9f9;\\n}\\n.vue-dialog-button:active {\\n background: #f3f3f3;\\n}\\n.vue-dialog-button:not(:first-of-type) {\\n border-left: 1px solid #eee;\\n}\\n\", \"\"]);\n }, function (t, e, n) {\n \"use strict\";\n\n n.r(e), n.d(e, \"Modal\", function () {\n return W;\n }), n.d(e, \"Dialog\", function () {\n return U;\n }), n.d(e, \"version\", function () {\n return J;\n });\n\n function i() {\n var e = this,\n t = e.$createElement,\n n = e._self._c || t;\n return e.visible ? n(\"div\", {\n class: e.containerClass\n }, [n(\"transition\", {\n attrs: {\n name: e.guaranteedOverlayTransition\n },\n on: {\n \"before-enter\": e.beforeOverlayTransitionEnter,\n \"after-enter\": e.afterOverlayTransitionEnter,\n \"before-leave\": e.beforeOverlayTransitionLeave,\n \"after-leave\": e.afterOverlayTransitionLeave\n }\n }, [e.visibility.overlay ? n(\"div\", {\n staticClass: \"vm--overlay\",\n attrs: {\n \"data-modal\": e.name,\n \"aria-expanded\": e.visibility.overlay.toString()\n },\n on: {\n click: function click(t) {\n return t.target !== t.currentTarget ? null : (t.stopPropagation(), e.onOverlayClick(t));\n }\n }\n }, [n(\"div\", {\n staticClass: \"vm--top-right-slot\"\n }, [e._t(\"top-right\")], 2)]) : e._e()]), e._v(\" \"), n(\"transition\", {\n attrs: {\n name: e.guaranteedModalTransition\n },\n on: {\n \"before-enter\": e.beforeModalTransitionEnter,\n \"after-enter\": e.afterModalTransitionEnter,\n \"before-leave\": e.beforeModalTransitionLeave,\n \"after-leave\": e.afterModalTransitionLeave\n }\n }, [e.visibility.modal ? n(\"div\", {\n ref: \"modal\",\n class: e.modalClass,\n style: e.modalStyle,\n attrs: {\n \"aria-expanded\": e.visibility.modal.toString(),\n role: \"dialog\",\n \"aria-modal\": \"true\"\n }\n }, [e._t(\"default\"), e._v(\" \"), e.resizable && !e.isAutoHeight ? n(\"resizer\", {\n attrs: {\n \"min-width\": e.minWidth,\n \"min-height\": e.minHeight,\n \"max-width\": e.maxWidth,\n \"max-height\": e.maxHeight\n },\n on: {\n resize: e.onModalResize\n }\n }) : e._e()], 2) : e._e()])], 1) : e._e();\n }\n\n function o() {\n var t = this.$createElement;\n return (this._self._c || t)(\"div\", {\n class: this.className\n });\n }\n\n o._withStripped = i._withStripped = !0;\n\n function h(t, e, n) {\n return n < t ? t : e < n ? e : n;\n }\n\n function r(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n function a(t, e) {\n return function (t) {\n if (Array.isArray(t)) return t;\n }(t) || function (t, e) {\n var n = [],\n i = !0,\n o = !1,\n r = void 0;\n\n try {\n for (var a, s = t[Symbol.iterator](); !(i = (a = s.next()).done) && (n.push(a.value), !e || n.length !== e); i = !0) {\n ;\n }\n } catch (t) {\n o = !0, r = t;\n } finally {\n try {\n i || null == s.return || s.return();\n } finally {\n if (o) throw r;\n }\n }\n\n return n;\n }(t, e) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }();\n }\n\n function s() {\n var t = window.innerWidth,\n e = document.documentElement.clientWidth;\n return t && e ? Math.min(t, e) : e || t;\n }\n\n function l(t) {\n return t.split(\";\").map(function (t) {\n return t.trim();\n }).filter(Boolean).map(function (t) {\n return t.split(\":\");\n }).reduce(function (t, e) {\n var n = a(e, 2);\n return function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {},\n i = Object.keys(n);\n \"function\" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter(function (t) {\n return Object.getOwnPropertyDescriptor(n, t).enumerable;\n }))), i.forEach(function (t) {\n r(e, t, n[t]);\n });\n }\n\n return e;\n }({}, t, r({}, n[0], n[1]));\n }, {});\n }\n\n function f(t) {\n return t.touches && 0 < t.touches.length ? t.touches[0] : t;\n }\n\n var p = [\"INPUT\", \"TEXTAREA\", \"SELECT\"],\n c = function (t) {\n var e = 0 < arguments.length && void 0 !== t ? t : 0;\n return function () {\n return (e++).toString();\n };\n }(),\n u = {\n name: \"VueJsModalResizer\",\n props: {\n minHeight: {\n type: Number,\n default: 0\n },\n minWidth: {\n type: Number,\n default: 0\n },\n maxWidth: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER\n },\n maxHeight: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER\n }\n },\n data: function data() {\n return {\n clicked: !1,\n size: {}\n };\n },\n mounted: function mounted() {\n this.$el.addEventListener(\"mousedown\", this.start, !1);\n },\n computed: {\n className: function className() {\n return [\"vue-modal-resizer\", {\n clicked: this.clicked\n }];\n }\n },\n methods: {\n start: function start(t) {\n this.clicked = !0, window.addEventListener(\"mousemove\", this.mousemove, !1), window.addEventListener(\"mouseup\", this.stop, !1), t.stopPropagation(), t.preventDefault();\n },\n stop: function stop() {\n this.clicked = !1, window.removeEventListener(\"mousemove\", this.mousemove, !1), window.removeEventListener(\"mouseup\", this.stop, !1), this.$emit(\"resize-stop\", {\n element: this.$el.parentElement,\n size: this.size\n });\n },\n mousemove: function mousemove(t) {\n this.resize(t);\n },\n resize: function resize(t) {\n var e = this.$el.parentElement;\n\n if (e) {\n var n = t.clientX - e.offsetLeft,\n i = t.clientY - e.offsetTop,\n o = Math.min(s(), this.maxWidth),\n r = Math.min(window.innerHeight, this.maxHeight);\n n = h(this.minWidth, o, n), i = h(this.minHeight, r, i), this.size = {\n width: n,\n height: i\n }, e.style.width = n + \"px\", e.style.height = i + \"px\", this.$emit(\"resize\", {\n element: e,\n size: this.size\n });\n }\n }\n }\n };\n\n n(6);\n\n function d(t, e, n, i, o, r, a, s) {\n var l,\n u = \"function\" == typeof t ? t.options : t;\n if (e && (u.render = e, u.staticRenderFns = n, u._compiled = !0), i && (u.functional = !0), r && (u._scopeId = \"data-v-\" + r), a ? (l = function l(t) {\n (t = t || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || \"undefined\" == typeof __VUE_SSR_CONTEXT__ || (t = __VUE_SSR_CONTEXT__), o && o.call(this, t), t && t._registeredComponents && t._registeredComponents.add(a);\n }, u._ssrRegister = l) : o && (l = s ? function () {\n o.call(this, this.$root.$options.shadowRoot);\n } : o), l) if (u.functional) {\n u._injectStyles = l;\n var c = u.render;\n\n u.render = function (t, e) {\n return l.call(e), c(t, e);\n };\n } else {\n var d = u.beforeCreate;\n u.beforeCreate = d ? [].concat(d, l) : [l];\n }\n return {\n exports: t,\n options: u\n };\n }\n\n var v = d(u, o, [], !1, null, null, null);\n v.options.__file = \"src/components/Resizer.vue\";\n var m = v.exports;\n\n function b(t) {\n return (b = \"function\" == typeof Symbol && \"symbol\" == _typeof(Symbol.iterator) ? function (t) {\n return _typeof(t);\n } : function (t) {\n return t && \"function\" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : _typeof(t);\n })(t);\n }\n\n function y(t) {\n switch (b(t)) {\n case \"number\":\n return {\n type: \"px\",\n value: t\n };\n\n case \"string\":\n return function (e) {\n if (\"auto\" === e) return {\n type: e,\n value: 0\n };\n\n var t = _.find(function (t) {\n return t.regexp.test(e);\n });\n\n return t ? {\n type: t.name,\n value: parseFloat(e)\n } : {\n type: \"\",\n value: e\n };\n }(t);\n\n default:\n return {\n type: \"\",\n value: t\n };\n }\n }\n\n function g(t) {\n if (\"string\" != typeof t) return 0 <= t;\n var e = y(t);\n return (\"%\" === e.type || \"px\" === e.type) && 0 < e.value;\n }\n\n var w = \"[-+]?[0-9]*.?[0-9]+\",\n _ = [{\n name: \"px\",\n regexp: new RegExp(\"^\".concat(w, \"px$\"))\n }, {\n name: \"%\",\n regexp: new RegExp(\"^\".concat(w, \"%$\"))\n }, {\n name: \"px\",\n regexp: new RegExp(\"^\".concat(w, \"$\"))\n }],\n E = n(5),\n x = \"undefined\" != typeof window && window.ResizeObserver ? ResizeObserver : E.a;\n\n function T(t, e) {\n for (var n = 0; n < e.length; n++) {\n var i = e[n];\n i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);\n }\n }\n\n function O(t) {\n return function (t) {\n if (Array.isArray(t)) {\n for (var e = 0, n = new Array(t.length); e < t.length; e++) {\n n[e] = t[e];\n }\n\n return n;\n }\n }(t) || function (t) {\n if (Symbol.iterator in Object(t) || \"[object Arguments]\" === Object.prototype.toString.call(t)) return Array.from(t);\n }(t) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }\n\n function S(t) {\n return e = 'button:not([disabled]), select:not([disabled]), a[href]:not([disabled]), area[href]:not([disabled]), [contentEditable=\"\"]:not([disabled]), [contentEditable=\"true\"]:not([disabled]), [contentEditable=\"TRUE\"]:not([disabled]), textarea:not([disabled]), iframe:not([disabled]), input:not([disabled]), summary:not([disabled]), [tabindex]:not([tabindex=\"-1\"])', O(t.querySelectorAll(e) || []);\n var e;\n }\n\n function M(t) {\n return t == document.activeElement;\n }\n\n var k = function () {\n function t() {\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), this.root = null, this.elements = [], this.onKeyDown = this.onKeyDown.bind(this), this.enable = this.enable.bind(this), this.disable = this.disable.bind(this), this.firstElement = this.firstElement.bind(this), this.lastElement = this.lastElement.bind(this);\n }\n\n var e, n, i;\n return e = t, (n = [{\n key: \"lastElement\",\n value: function value() {\n return this.elements[this.elements.length - 1] || null;\n }\n }, {\n key: \"firstElement\",\n value: function value() {\n return this.elements[0] || null;\n }\n }, {\n key: \"onKeyDown\",\n value: function value(t) {\n var e;\n if (\"Tab\" === (e = t).key || 9 === e.keyCode) return t.shiftKey && M(this.firstElement()) ? (this.lastElement().focus(), void t.preventDefault()) : !document.activeElement || M(this.lastElement()) ? (this.firstElement().focus(), void t.preventDefault()) : void 0;\n }\n }, {\n key: \"enabled\",\n value: function value() {\n return !!this.root;\n }\n }, {\n key: \"enable\",\n value: function value(t) {\n if (t) {\n this.root = t, this.elements = S(this.root);\n var e = this.firstElement();\n e && e.focus(), this.root.addEventListener(\"keydown\", this.onKeyDown);\n }\n }\n }, {\n key: \"disable\",\n value: function value() {\n this.root.removeEventListener(\"keydown\", this.onKeyDown), this.root = null;\n }\n }]) && T(e.prototype, n), i && T(e, i), t;\n }();\n\n function L(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n function z(t, e) {\n return function (t) {\n if (Array.isArray(t)) return t;\n }(t) || function (t, e) {\n var n = [],\n i = !0,\n o = !1,\n r = void 0;\n\n try {\n for (var a, s = t[Symbol.iterator](); !(i = (a = s.next()).done) && (n.push(a.value), !e || n.length !== e); i = !0) {\n ;\n }\n } catch (t) {\n o = !0, r = t;\n } finally {\n try {\n i || null == s.return || s.return();\n } finally {\n if (o) throw r;\n }\n }\n\n return n;\n }(t, e) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }();\n }\n\n var $ = \"vm-transition--default\",\n A = \"enter\",\n C = \"entering\",\n j = \"leave\",\n R = \"leavng\",\n H = {\n name: \"VueJsModal\",\n props: {\n name: {\n required: !0,\n type: String\n },\n resizable: {\n type: Boolean,\n default: !1\n },\n adaptive: {\n type: Boolean,\n default: !1\n },\n draggable: {\n type: [Boolean, String],\n default: !1\n },\n scrollable: {\n type: Boolean,\n default: !1\n },\n focusTrap: {\n type: Boolean,\n default: !1\n },\n reset: {\n type: Boolean,\n default: !1\n },\n overlayTransition: {\n type: String,\n default: \"vm-transition--overlay\"\n },\n transition: {\n type: String,\n default: \"vm-transition--modal\"\n },\n clickToClose: {\n type: Boolean,\n default: !0\n },\n classes: {\n type: [String, Array],\n default: function _default() {\n return [];\n }\n },\n styles: {\n type: [String, Array, Object]\n },\n minWidth: {\n type: Number,\n default: 0,\n validator: function validator(t) {\n return 0 <= t;\n }\n },\n minHeight: {\n type: Number,\n default: 0,\n validator: function validator(t) {\n return 0 <= t;\n }\n },\n maxWidth: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER\n },\n maxHeight: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER\n },\n width: {\n type: [Number, String],\n default: 600,\n validator: g\n },\n height: {\n type: [Number, String],\n default: 300,\n validator: function validator(t) {\n return \"auto\" === t || g(t);\n }\n },\n shiftX: {\n type: Number,\n default: .5,\n validator: function validator(t) {\n return 0 <= t && t <= 1;\n }\n },\n shiftY: {\n type: Number,\n default: .5,\n validator: function validator(t) {\n return 0 <= t && t <= 1;\n }\n }\n },\n components: {\n Resizer: m\n },\n data: function data() {\n return {\n visible: !1,\n visibility: {\n modal: !1,\n overlay: !1\n },\n overlayTransitionState: null,\n modalTransitionState: null,\n shiftLeft: 0,\n shiftTop: 0,\n modal: {\n width: 0,\n widthType: \"px\",\n height: 0,\n heightType: \"px\",\n renderedHeight: 0\n },\n viewportHeight: 0,\n viewportWidth: 0\n };\n },\n created: function created() {\n this.setInitialSize();\n },\n beforeMount: function beforeMount() {\n this.$modal.subscription.$on(\"toggle\", this.onToggle), window.addEventListener(\"resize\", this.onWindowResize), window.addEventListener(\"orientationchange\", this.onWindowResize), this.onWindowResize(), this.scrollable && !this.isAutoHeight && console.warn('Modal \"'.concat(this.name, '\" has scrollable flag set to true ') + 'but height is not \"auto\" ('.concat(this.height, \")\")), this.clickToClose && window.addEventListener(\"keyup\", this.onEscapeKeyUp);\n },\n mounted: function mounted() {\n var n = this;\n this.resizeObserver = new x(function (t) {\n if (0 < t.length) {\n var e = z(t, 1)[0];\n n.modal.renderedHeight = e.contentRect.height;\n }\n }), this.$focusTrap = new k();\n },\n beforeDestroy: function beforeDestroy() {\n this.$modal.subscription.$off(\"toggle\", this.onToggle), window.removeEventListener(\"resize\", this.onWindowResize), window.removeEventListener(\"orientationchange\", this.onWindowResize), this.clickToClose && window.removeEventListener(\"keyup\", this.onEscapeKeyUp), document.body.classList.remove(\"vm--block-scroll\");\n },\n computed: {\n guaranteedOverlayTransition: function guaranteedOverlayTransition() {\n return this.overlayTransition || $;\n },\n guaranteedModalTransition: function guaranteedModalTransition() {\n return this.transition || $;\n },\n isAutoHeight: function isAutoHeight() {\n return \"auto\" === this.modal.heightType;\n },\n position: function position() {\n var t = this.viewportHeight,\n e = this.viewportWidth,\n n = this.shiftLeft,\n i = this.shiftTop,\n o = this.shiftX,\n r = this.shiftY,\n a = this.trueModalWidth,\n s = this.trueModalHeight,\n l = e - a,\n u = Math.max(t - s, 0),\n c = i + r * u;\n return {\n left: parseInt(h(0, l, n + o * l)),\n top: !s && this.isAutoHeight ? void 0 : parseInt(h(0, u, c))\n };\n },\n trueModalWidth: function trueModalWidth() {\n var t = this.viewportWidth,\n e = this.modal,\n n = this.adaptive,\n i = this.minWidth,\n o = this.maxWidth,\n r = \"%\" === e.widthType ? t / 100 * e.width : e.width;\n\n if (n) {\n var a = Math.max(i, Math.min(t, o));\n return h(i, a, r);\n }\n\n return r;\n },\n trueModalHeight: function trueModalHeight() {\n var t = this.viewportHeight,\n e = this.modal,\n n = this.isAutoHeight,\n i = this.adaptive,\n o = this.minHeight,\n r = this.maxHeight,\n a = \"%\" === e.heightType ? t / 100 * e.height : e.height;\n if (n) return this.modal.renderedHeight;\n\n if (i) {\n var s = Math.max(o, Math.min(t, r));\n return h(o, s, a);\n }\n\n return a;\n },\n autoHeight: function autoHeight() {\n return this.adaptive && this.modal.renderedHeight >= this.viewportHeight ? Math.max(this.minHeight, this.viewportHeight) + \"px\" : \"auto\";\n },\n containerClass: function containerClass() {\n return [\"vm--container\", this.scrollable && this.isAutoHeight && \"scrollable\"];\n },\n modalClass: function modalClass() {\n return [\"vm--modal\", this.classes];\n },\n stylesProp: function stylesProp() {\n return \"string\" == typeof this.styles ? l(this.styles) : this.styles;\n },\n modalStyle: function modalStyle() {\n return [this.stylesProp, {\n top: this.position.top + \"px\",\n left: this.position.left + \"px\",\n width: this.trueModalWidth + \"px\",\n height: this.isAutoHeight ? this.autoHeight : this.trueModalHeight + \"px\"\n }];\n },\n isComponentReadyToBeDestroyed: function isComponentReadyToBeDestroyed() {\n return this.overlayTransitionState === j && this.modalTransitionState === j;\n }\n },\n watch: {\n isComponentReadyToBeDestroyed: function isComponentReadyToBeDestroyed(t) {\n t && (this.visible = !1);\n }\n },\n methods: {\n startTransitionEnter: function startTransitionEnter() {\n this.visibility.overlay = !0, this.visibility.modal = !0;\n },\n startTransitionLeave: function startTransitionLeave() {\n this.visibility.overlay = !1, this.visibility.modal = !1;\n },\n beforeOverlayTransitionEnter: function beforeOverlayTransitionEnter() {\n this.overlayTransitionState = C;\n },\n afterOverlayTransitionEnter: function afterOverlayTransitionEnter() {\n this.overlayTransitionState = A;\n },\n beforeOverlayTransitionLeave: function beforeOverlayTransitionLeave() {\n this.overlayTransitionState = R;\n },\n afterOverlayTransitionLeave: function afterOverlayTransitionLeave() {\n this.overlayTransitionState = j;\n },\n beforeModalTransitionEnter: function beforeModalTransitionEnter() {\n var t = this;\n this.modalTransitionState = C, this.$nextTick(function () {\n t.resizeObserver.observe(t.$refs.modal);\n });\n },\n afterModalTransitionEnter: function afterModalTransitionEnter() {\n this.modalTransitionState = A, this.draggable && this.addDraggableListeners(), this.focusTrap && this.$focusTrap.enable(this.$refs.modal);\n var t = this.createModalEvent({\n state: \"opened\"\n });\n this.$emit(\"opened\", t);\n },\n beforeModalTransitionLeave: function beforeModalTransitionLeave() {\n this.modalTransitionState = R, this.resizeObserver.unobserve(this.$refs.modal), this.$focusTrap.enabled() && this.$focusTrap.disable();\n },\n afterModalTransitionLeave: function afterModalTransitionLeave() {\n this.modalTransitionState = j;\n var t = this.createModalEvent({\n state: \"closed\"\n });\n this.$emit(\"closed\", t);\n },\n onToggle: function onToggle(t, e, n) {\n if (this.name === t) {\n var i = void 0 === e ? !this.visible : e;\n this.toggle(i, n);\n }\n },\n setInitialSize: function setInitialSize() {\n var t = y(this.width),\n e = y(this.height);\n this.modal.width = t.value, this.modal.widthType = t.type, this.modal.height = e.value, this.modal.heightType = e.type;\n },\n onEscapeKeyUp: function onEscapeKeyUp(t) {\n 27 === t.which && this.visible && this.$modal.hide(this.name);\n },\n onWindowResize: function onWindowResize() {\n this.viewportWidth = s(), this.viewportHeight = window.innerHeight, this.ensureShiftInWindowBounds();\n },\n createModalEvent: function createModalEvent(t) {\n var e = 0 < arguments.length && void 0 !== t ? t : {};\n return function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {},\n i = Object.keys(n);\n \"function\" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter(function (t) {\n return Object.getOwnPropertyDescriptor(n, t).enumerable;\n }))), i.forEach(function (t) {\n L(e, t, n[t]);\n });\n }\n\n return e;\n }({\n name: this.name,\n ref: this.$refs.modal || null\n }, e);\n },\n onModalResize: function onModalResize(t) {\n this.modal.widthType = \"px\", this.modal.width = t.size.width, this.modal.heightType = \"px\", this.modal.height = t.size.height;\n var e = this.modal.size;\n this.$emit(\"resize\", this.createModalEvent({\n size: e\n }));\n },\n open: function open(t) {\n var e = this;\n this.reset && (this.setInitialSize(), this.shiftLeft = 0, this.shiftTop = 0), this.scrollable && document.body.classList.add(\"vm--block-scroll\");\n var n = !1,\n i = this.createModalEvent({\n cancel: function cancel() {\n n = !0;\n },\n state: \"before-open\",\n params: t\n });\n this.$emit(\"before-open\", i), n ? this.scrollable && document.body.classList.remove(\"vm--block-scroll\") : (\"undefined\" != typeof document && document.activeElement && \"BODY\" !== document.activeElement.tagName && document.activeElement.blur && document.activeElement.blur(), this.visible = !0, this.$nextTick(function () {\n e.startTransitionEnter();\n }));\n },\n close: function close(t) {\n this.scrollable && document.body.classList.remove(\"vm--block-scroll\");\n var e = !1,\n n = this.createModalEvent({\n cancel: function cancel() {\n e = !0;\n },\n state: \"before-close\",\n params: t\n });\n this.$emit(\"before-close\", n), e || this.startTransitionLeave();\n },\n toggle: function toggle(t, e) {\n this.visible !== t && (t ? this.open(e) : this.close(e));\n },\n getDraggableElement: function getDraggableElement() {\n return !0 === this.draggable ? this.$refs.modal : \"string\" == typeof this.draggable ? this.$refs.modal.querySelector(this.draggable) : null;\n },\n onOverlayClick: function onOverlayClick() {\n this.clickToClose && this.toggle(!1);\n },\n addDraggableListeners: function addDraggableListeners() {\n var a = this,\n t = this.getDraggableElement();\n\n if (t) {\n var s = 0,\n l = 0,\n u = 0,\n c = 0,\n e = function e(t) {\n var e = t.target;\n\n if (!(n = e) || -1 === p.indexOf(n.nodeName)) {\n var n,\n i = f(t),\n o = i.clientX,\n r = i.clientY;\n document.addEventListener(\"mousemove\", d), document.addEventListener(\"touchmove\", d), document.addEventListener(\"mouseup\", h), document.addEventListener(\"touchend\", h), s = o, l = r, u = a.shiftLeft, c = a.shiftTop;\n }\n },\n d = function d(t) {\n var e = f(t),\n n = e.clientX,\n i = e.clientY;\n a.shiftLeft = u + n - s, a.shiftTop = c + i - l, t.preventDefault();\n },\n h = function t(e) {\n a.ensureShiftInWindowBounds(), document.removeEventListener(\"mousemove\", d), document.removeEventListener(\"touchmove\", d), document.removeEventListener(\"mouseup\", t), document.removeEventListener(\"touchend\", t), e.preventDefault();\n };\n\n t.addEventListener(\"mousedown\", e), t.addEventListener(\"touchstart\", e);\n }\n },\n ensureShiftInWindowBounds: function ensureShiftInWindowBounds() {\n var t = this.viewportHeight,\n e = this.viewportWidth,\n n = this.shiftLeft,\n i = this.shiftTop,\n o = this.shiftX,\n r = this.shiftY,\n a = this.trueModalWidth,\n s = this.trueModalHeight,\n l = e - a,\n u = Math.max(t - s, 0),\n c = n + o * l,\n d = i + r * u;\n this.shiftLeft -= c - h(0, l, c), this.shiftTop -= d - h(0, u, d);\n }\n }\n },\n N = (n(9), d(H, i, [], !1, null, null, null));\n N.options.__file = \"src/components/Modal.vue\";\n\n function D() {\n var n = this,\n t = n.$createElement,\n i = n._self._c || t;\n return i(n.$modal.context.componentName, {\n tag: \"component\",\n attrs: {\n name: \"dialog\",\n height: \"auto\",\n classes: [\"vue-dialog\", this.params.class],\n width: n.width,\n \"shift-y\": .3,\n adaptive: !0,\n \"focus-trap\": !0,\n clickToClose: n.clickToClose,\n transition: n.transition\n },\n on: {\n \"before-open\": n.beforeOpened,\n \"before-close\": n.beforeClosed,\n opened: function opened(t) {\n return n.$emit(\"opened\", t);\n },\n closed: function closed(t) {\n return n.$emit(\"closed\", t);\n }\n }\n }, [i(\"div\", {\n staticClass: \"vue-dialog-content\"\n }, [n.params.title ? i(\"div\", {\n staticClass: \"vue-dialog-content-title\",\n domProps: {\n innerHTML: n._s(n.params.title || \"\")\n }\n }) : n._e(), n._v(\" \"), n.params.component ? i(n.params.component, n._b({\n tag: \"component\"\n }, \"component\", n.params.props, !1)) : i(\"div\", {\n domProps: {\n innerHTML: n._s(n.params.text || \"\")\n }\n })], 1), n._v(\" \"), n.buttons ? i(\"div\", {\n staticClass: \"vue-dialog-buttons\"\n }, n._l(n.buttons, function (t, e) {\n return i(\"button\", {\n key: e,\n class: t.class || \"vue-dialog-button\",\n style: n.buttonStyle,\n attrs: {\n type: \"button\",\n tabindex: \"0\"\n },\n domProps: {\n innerHTML: n._s(t.title)\n },\n on: {\n click: function click(t) {\n return t.stopPropagation(), n.click(e, t);\n }\n }\n }, [n._v(n._s(t.title))]);\n }), 0) : i(\"div\", {\n staticClass: \"vue-dialog-buttons-none\"\n })]);\n }\n\n var W = N.exports;\n D._withStripped = !0;\n var P = {\n name: \"VueJsDialog\",\n props: {\n width: {\n type: [Number, String],\n default: 400\n },\n clickToClose: {\n type: Boolean,\n default: !0\n },\n transition: {\n type: String\n }\n },\n data: function data() {\n return {\n params: {}\n };\n },\n computed: {\n buttons: function buttons() {\n return this.params.buttons || [];\n },\n buttonStyle: function buttonStyle() {\n return {\n flex: \"1 1 \".concat(100 / this.buttons.length, \"%\")\n };\n }\n },\n methods: {\n beforeOpened: function beforeOpened(t) {\n this.params = t.params || {}, this.$emit(\"before-opened\", t);\n },\n beforeClosed: function beforeClosed(t) {\n this.params = {}, this.$emit(\"before-closed\", t);\n },\n click: function click(t, e, n) {\n var i = 2 < arguments.length && void 0 !== n ? n : \"click\",\n o = this.buttons[t],\n r = null == o ? void 0 : o.handler;\n \"function\" == typeof r && r(t, e, {\n source: i\n });\n }\n }\n },\n B = (n(11), d(P, D, [], !1, null, null, null));\n B.options.__file = \"src/components/Dialog.vue\";\n\n function I() {\n var n = this,\n t = n.$createElement,\n i = n._self._c || t;\n return i(\"div\", {\n attrs: {\n id: \"modals-container\"\n }\n }, n._l(n.modals, function (e) {\n return i(\"modal\", n._g(n._b({\n key: e.id,\n on: {\n closed: function closed(t) {\n return n.remove(e.id);\n }\n }\n }, \"modal\", e.modalAttrs, !1), e.modalListeners), [i(e.component, n._g(n._b({\n tag: \"component\",\n on: {\n close: function close(t) {\n return n.$modal.hide(e.modalAttrs.name, t);\n }\n }\n }, \"component\", e.componentAttrs, !1), n.$listeners))], 1);\n }), 1);\n }\n\n var U = B.exports;\n\n function X(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n I._withStripped = !0;\n var F = d({\n data: function data() {\n return {\n modals: []\n };\n },\n created: function created() {\n this.$root.__modalContainer = this;\n },\n mounted: function mounted() {\n var t = this;\n this.$modal.subscription.$on(\"hide-all\", function () {\n t.modals = [];\n });\n },\n methods: {\n add: function add(t, e, n, i) {\n var o = this,\n r = 1 < arguments.length && void 0 !== e ? e : {},\n a = 2 < arguments.length && void 0 !== n ? n : {},\n s = 3 < arguments.length && void 0 !== i ? i : {},\n l = c(),\n u = a.name || \"dynamic_modal_\" + l;\n this.modals.push({\n id: l,\n modalAttrs: function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {},\n i = Object.keys(n);\n \"function\" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter(function (t) {\n return Object.getOwnPropertyDescriptor(n, t).enumerable;\n }))), i.forEach(function (t) {\n X(e, t, n[t]);\n });\n }\n\n return e;\n }({}, a, {\n name: u\n }),\n modalListeners: s,\n component: t,\n componentAttrs: r\n }), this.$nextTick(function () {\n o.$modal.show(u);\n });\n },\n remove: function remove(e) {\n var t = this.modals.findIndex(function (t) {\n return t.id === e;\n });\n -1 !== t && this.modals.splice(t, 1);\n }\n }\n }, I, [], !1, null, null, null);\n F.options.__file = \"src/components/ModalsContainer.vue\";\n var G = F.exports;\n\n function V(t) {\n return (V = \"function\" == typeof Symbol && \"symbol\" == _typeof(Symbol.iterator) ? function (t) {\n return _typeof(t);\n } : function (t) {\n return t && \"function\" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : _typeof(t);\n })(t);\n }\n\n function q(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n var K = function K(i, t) {\n function o(t, e, n, i) {\n var o,\n r = 2 < arguments.length && void 0 !== n ? n : {},\n a = 3 < arguments.length ? i : void 0,\n s = null === (o = c.root) || void 0 === o ? void 0 : o.__modalContainer,\n l = u.dynamicDefaults || {};\n null != s && s.add(t, e, function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {},\n i = Object.keys(n);\n \"function\" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter(function (t) {\n return Object.getOwnPropertyDescriptor(n, t).enumerable;\n }))), i.forEach(function (t) {\n q(e, t, n[t]);\n });\n }\n\n return e;\n }({}, l, r), a);\n }\n\n var u = 1 < arguments.length && void 0 !== t ? t : {},\n r = new i(),\n c = {\n root: null,\n componentName: u.componentName || \"Modal\"\n };\n return {\n context: c,\n subscription: r,\n show: function show() {\n for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) {\n e[n] = arguments[n];\n }\n\n var i = e[0];\n\n switch (V(i)) {\n case \"string\":\n (function (t, e) {\n r.$emit(\"toggle\", t, !0, e);\n }).apply(void 0, e);\n break;\n\n case \"object\":\n case \"function\":\n o.apply(void 0, e);\n break;\n\n default:\n console.warn(\"[vue-js-modal] $modal() received an unsupported argument as a first argument.\", i);\n }\n },\n hide: function hide(t, e) {\n r.$emit(\"toggle\", t, !1, e);\n },\n hideAll: function hideAll() {\n r.$emit(\"hide-all\");\n },\n toggle: function toggle(t, e) {\n r.$emit(\"toggle\", t, void 0, e);\n },\n setDynamicModalContainer: function setDynamicModalContainer(t) {\n c.root = t;\n var e,\n n = (e = document.createElement(\"div\"), document.body.appendChild(e), e);\n new i({\n parent: t,\n render: function render(t) {\n return t(G);\n }\n }).$mount(n);\n }\n };\n },\n Y = {\n install: function install(e, t) {\n var n = 1 < arguments.length && void 0 !== t ? t : {};\n\n if (!e.prototype.$modal) {\n var i = new K(e, n);\n Object.defineProperty(e.prototype, \"$modal\", {\n get: function get() {\n if (this instanceof e) {\n var t = this.$root;\n i.context.root || i.setDynamicModalContainer(t);\n }\n\n return i;\n }\n }), e.component(i.context.componentName, W), n.dialog && e.component(\"VDialog\", U);\n }\n }\n },\n J = \"__VERSION__\";\n\n e.default = Y;\n }], o.c = i, o.d = function (t, e, n) {\n o.o(t, e) || Object.defineProperty(t, e, {\n enumerable: !0,\n get: n\n });\n }, o.r = function (t) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n }, o.t = function (e, t) {\n if (1 & t && (e = o(e)), 8 & t) return e;\n if (4 & t && \"object\" == _typeof(e) && e && e.__esModule) return e;\n var n = Object.create(null);\n if (o.r(n), Object.defineProperty(n, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var i in e) {\n o.d(n, i, function (t) {\n return e[t];\n }.bind(null, i));\n }\n return n;\n }, o.n = function (t) {\n var e = t && t.__esModule ? function () {\n return t.default;\n } : function () {\n return t;\n };\n return o.d(e, \"a\", e), e;\n }, o.o = function (t, e) {\n return Object.prototype.hasOwnProperty.call(t, e);\n }, o.p = \"/dist/\", o(o.s = 13);\n\n function o(t) {\n if (i[t]) return i[t].exports;\n var e = i[t] = {\n i: t,\n l: !1,\n exports: {}\n };\n return n[t].call(e.exports, e, e.exports, o), e.l = !0, e.exports;\n }\n\n var n, i;\n});","function confirmDatePlugin(pluginConfig) {\n var defaultConfig = {\n confirmIcon: \" \",\n confirmText: \"OK \",\n showAlways: false,\n theme: \"light\"\n };\n var config = {};\n\n for (var key in defaultConfig) {\n config[key] = pluginConfig && pluginConfig[key] !== undefined ? pluginConfig[key] : defaultConfig[key];\n }\n\n return function (fp) {\n var hooks = {\n onKeyDown: function onKeyDown(_, __, ___, e) {\n if (fp.config.enableTime && e.key === \"Tab\" && e.target === fp.amPM) {\n e.preventDefault();\n fp.confirmContainer.focus();\n } else if (e.key === \"Enter\" && e.target === fp.confirmContainer) fp.close();\n },\n onReady: function onReady() {\n if (fp.calendarContainer === undefined) return;\n fp.confirmContainer = fp._createElement(\"div\", \"flatpickr-confirm \" + (config.showAlways ? \"visible\" : \"\") + \" \" + config.theme + \"Theme\", config.confirmText);\n fp.confirmContainer.tabIndex = -1;\n fp.confirmContainer.innerHTML += config.confirmIcon;\n fp.confirmContainer.addEventListener(\"click\", fp.close);\n fp.calendarContainer.appendChild(fp.confirmContainer);\n }\n };\n\n if (!config.showAlways) {\n hooks.onChange = function (dateObj, dateStr) {\n var showCondition = fp.config.enableTime || fp.config.mode === \"multiple\";\n if (dateStr && !fp.config.inline && showCondition) return fp.confirmContainer.classList.add(\"visible\");\n fp.confirmContainer.classList.remove(\"visible\");\n };\n }\n\n return hooks;\n };\n}\n\nif (typeof module !== \"undefined\") module.exports = confirmDatePlugin;","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nvar Memo =\n/** @class */\nfunction () {\n function Memo() {\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n\n\n Memo.prototype.memoize = function (obj) {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n\n this._inner.add(obj);\n\n return false;\n } // eslint-disable-next-line @typescript-eslint/prefer-for-of\n\n\n for (var i = 0; i < this._inner.length; i++) {\n var value = this._inner[i];\n\n if (value === obj) {\n return true;\n }\n }\n\n this._inner.push(obj);\n\n return false;\n };\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n\n\n Memo.prototype.unmemoize = function (obj) {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (var i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n\n break;\n }\n }\n }\n };\n\n return Memo;\n}();\n\nexport { Memo };","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.3.3\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport Popper from 'popper.js';\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\n\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar DEFAULT_OPTIONS = {\n container: false,\n delay: 0,\n html: false,\n placement: 'top',\n title: '',\n template: '',\n trigger: 'hover focus',\n offset: 0,\n arrowSelector: '.tooltip-arrow, .tooltip__arrow',\n innerSelector: '.tooltip-inner, .tooltip__inner'\n};\n\nvar Tooltip = function () {\n /**\n * Create a new Tooltip.js instance\n * @class Tooltip\n * @param {HTMLElement} reference - The DOM node used as reference of the tooltip (it can be a jQuery element).\n * @param {Object} options\n * @param {String} options.placement='top'\n * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -end),\n * left(-start, -end)`\n * @param {String} [options.arrowSelector='.tooltip-arrow, .tooltip__arrow'] - className used to locate the DOM arrow element in the tooltip.\n * @param {String} [options.innerSelector='.tooltip-inner, .tooltip__inner'] - className used to locate the DOM inner element in the tooltip.\n * @param {HTMLElement|String|false} options.container=false - Append the tooltip to a specific element.\n * @param {Number|Object} options.delay=0\n * Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type.\n * If a number is supplied, delay is applied to both hide/show.\n * Object structure is: `{ show: 500, hide: 100 }`\n * @param {Boolean} options.html=false - Insert HTML into the tooltip. If false, the content will inserted with `textContent`.\n * @param {String} [options.template='']\n * Base HTML to used when creating the tooltip.\n * The tooltip's `title` will be injected into the `.tooltip-inner` or `.tooltip__inner`.\n * `.tooltip-arrow` or `.tooltip__arrow` will become the tooltip's arrow.\n * The outermost wrapper element should have the `.tooltip` class.\n * @param {String|HTMLElement|TitleFunction} options.title='' - Default title value if `title` attribute isn't present.\n * @param {String} [options.trigger='hover focus']\n * How tooltip is triggered - click, hover, focus, manual.\n * You may pass multiple triggers; separate them with a space. `manual` cannot be combined with any other trigger.\n * @param {Boolean} options.closeOnClickOutside=false - Close a popper on click outside of the popper and reference element. This has effect only when options.trigger is 'click'.\n * @param {String|HTMLElement} options.boundariesElement\n * The element used as boundaries for the tooltip. For more information refer to Popper.js'\n * [boundariesElement docs](https://popper.js.org/popper-documentation.html)\n * @param {Number|String} options.offset=0 - Offset of the tooltip relative to its reference. For more information refer to Popper.js'\n * [offset docs](https://popper.js.org/popper-documentation.html)\n * @param {Object} options.popperOptions={} - Popper options, will be passed directly to popper instance. For more information refer to Popper.js'\n * [options docs](https://popper.js.org/popper-documentation.html)\n * @return {Object} instance - The generated tooltip instance\n */\n function Tooltip(reference, options) {\n classCallCheck(this, Tooltip);\n\n _initialiseProps.call(this); // apply user options over default ones\n\n\n options = _extends({}, DEFAULT_OPTIONS, options);\n reference.jquery && (reference = reference[0]); // cache reference and options\n\n this.reference = reference;\n this.options = options; // get events list\n\n var events = typeof options.trigger === 'string' ? options.trigger.split(' ').filter(function (trigger) {\n return ['click', 'hover', 'focus'].indexOf(trigger) !== -1;\n }) : []; // set initial state\n\n this._isOpen = false;\n this._popperOptions = {}; // set event listeners\n\n this._setEventListeners(reference, events, options);\n } //\n // Public methods\n //\n\n /**\n * Reveals an element's tooltip. This is considered a \"manual\" triggering of the tooltip.\n * Tooltips with zero-length titles are never displayed.\n * @method Tooltip#show\n * @memberof Tooltip\n */\n\n /**\n * Hides an element’s tooltip. This is considered a “manual” triggering of the tooltip.\n * @method Tooltip#hide\n * @memberof Tooltip\n */\n\n /**\n * Hides and destroys an element’s tooltip.\n * @method Tooltip#dispose\n * @memberof Tooltip\n */\n\n /**\n * Toggles an element’s tooltip. This is considered a “manual” triggering of the tooltip.\n * @method Tooltip#toggle\n * @memberof Tooltip\n */\n\n /**\n * Updates the tooltip's title content\n * @method Tooltip#updateTitleContent\n * @memberof Tooltip\n * @param {String|HTMLElement} title - The new content to use for the title\n */\n //\n // Private methods\n //\n\n\n createClass(Tooltip, [{\n key: '_create',\n\n /**\n * Creates a new tooltip node\n * @memberof Tooltip\n * @private\n * @param {HTMLElement} reference\n * @param {String} template\n * @param {String|HTMLElement|TitleFunction} title\n * @param {Boolean} allowHtml\n * @return {HTMLElement} tooltipNode\n */\n value: function _create(reference, template, title, allowHtml) {\n // create tooltip element\n var tooltipGenerator = window.document.createElement('div');\n tooltipGenerator.innerHTML = template.trim();\n var tooltipNode = tooltipGenerator.childNodes[0]; // add unique ID to our tooltip (needed for accessibility reasons)\n\n tooltipNode.id = 'tooltip_' + Math.random().toString(36).substr(2, 10); // set initial `aria-hidden` state to `false` (it's visible!)\n\n tooltipNode.setAttribute('aria-hidden', 'false'); // add title to tooltip\n\n var titleNode = tooltipGenerator.querySelector(this.options.innerSelector);\n\n this._addTitleContent(reference, title, allowHtml, titleNode); // return the generated tooltip node\n\n\n return tooltipNode;\n }\n }, {\n key: '_addTitleContent',\n value: function _addTitleContent(reference, title, allowHtml, titleNode) {\n if (title.nodeType === 1 || title.nodeType === 11) {\n // if title is a element node or document fragment, append it only if allowHtml is true\n allowHtml && titleNode.appendChild(title);\n } else if (isFunction(title)) {\n // Recursively call ourself so that the return value of the function gets handled appropriately - either\n // as a dom node, a string, or even as another function.\n this._addTitleContent(reference, title.call(reference), allowHtml, titleNode);\n } else {\n // if it's just a simple text, set textContent or innerHtml depending by `allowHtml` value\n allowHtml ? titleNode.innerHTML = title : titleNode.textContent = title;\n }\n }\n }, {\n key: '_show',\n value: function _show(reference, options) {\n // don't show if it's already visible\n // or if it's not being showed\n if (this._isOpen && !this._isOpening) {\n return this;\n }\n\n this._isOpen = true; // if the tooltipNode already exists, just show it\n\n if (this._tooltipNode) {\n this._tooltipNode.style.visibility = 'visible';\n\n this._tooltipNode.setAttribute('aria-hidden', 'false');\n\n this.popperInstance.update();\n return this;\n } // get title\n\n\n var title = reference.getAttribute('title') || options.title; // don't show tooltip if no title is defined\n\n if (!title) {\n return this;\n } // create tooltip node\n\n\n var tooltipNode = this._create(reference, options.template, title, options.html); // Add `aria-describedby` to our reference element for accessibility reasons\n\n\n reference.setAttribute('aria-describedby', tooltipNode.id); // append tooltip to container\n\n var container = this._findContainer(options.container, reference);\n\n this._append(tooltipNode, container);\n\n this._popperOptions = _extends({}, options.popperOptions, {\n placement: options.placement\n });\n this._popperOptions.modifiers = _extends({}, this._popperOptions.modifiers, {\n arrow: _extends({}, this._popperOptions.modifiers && this._popperOptions.modifiers.arrow, {\n element: options.arrowSelector\n }),\n offset: _extends({}, this._popperOptions.modifiers && this._popperOptions.modifiers.offset, {\n offset: options.offset || this._popperOptions.modifiers && this._popperOptions.modifiers.offset && this._popperOptions.modifiers.offset.offset || options.offset\n })\n });\n\n if (options.boundariesElement) {\n this._popperOptions.modifiers.preventOverflow = {\n boundariesElement: options.boundariesElement\n };\n }\n\n this.popperInstance = new Popper(reference, tooltipNode, this._popperOptions);\n this._tooltipNode = tooltipNode;\n return this;\n }\n }, {\n key: '_hide',\n value: function _hide()\n /*reference, options*/\n {\n // don't hide if it's already hidden\n if (!this._isOpen) {\n return this;\n }\n\n this._isOpen = false; // hide tooltipNode\n\n this._tooltipNode.style.visibility = 'hidden';\n\n this._tooltipNode.setAttribute('aria-hidden', 'true');\n\n return this;\n }\n }, {\n key: '_dispose',\n value: function _dispose() {\n var _this = this; // remove event listeners first to prevent any unexpected behaviour\n\n\n this._events.forEach(function (_ref) {\n var func = _ref.func,\n event = _ref.event;\n\n _this.reference.removeEventListener(event, func);\n });\n\n this._events = [];\n\n if (this._tooltipNode) {\n this._hide(); // destroy instance\n\n\n this.popperInstance.destroy(); // destroy tooltipNode if removeOnDestroy is not set, as popperInstance.destroy() already removes the element\n\n if (!this.popperInstance.options.removeOnDestroy) {\n this._tooltipNode.parentNode.removeChild(this._tooltipNode);\n\n this._tooltipNode = null;\n }\n }\n\n return this;\n }\n }, {\n key: '_findContainer',\n value: function _findContainer(container, reference) {\n // if container is a query, get the relative element\n if (typeof container === 'string') {\n container = window.document.querySelector(container);\n } else if (container === false) {\n // if container is `false`, set it to reference parent\n container = reference.parentNode;\n }\n\n return container;\n }\n /**\n * Append tooltip to container\n * @memberof Tooltip\n * @private\n * @param {HTMLElement} tooltipNode\n * @param {HTMLElement|String|false} container\n */\n\n }, {\n key: '_append',\n value: function _append(tooltipNode, container) {\n container.appendChild(tooltipNode);\n }\n }, {\n key: '_setEventListeners',\n value: function _setEventListeners(reference, events, options) {\n var _this2 = this;\n\n var directEvents = [];\n var oppositeEvents = [];\n events.forEach(function (event) {\n switch (event) {\n case 'hover':\n directEvents.push('mouseenter');\n oppositeEvents.push('mouseleave');\n break;\n\n case 'focus':\n directEvents.push('focus');\n oppositeEvents.push('blur');\n break;\n\n case 'click':\n directEvents.push('click');\n oppositeEvents.push('click');\n break;\n }\n }); // schedule show tooltip\n\n directEvents.forEach(function (event) {\n var func = function func(evt) {\n if (_this2._isOpening === true) {\n return;\n }\n\n evt.usedByTooltip = true;\n\n _this2._scheduleShow(reference, options.delay, options, evt);\n };\n\n _this2._events.push({\n event: event,\n func: func\n });\n\n reference.addEventListener(event, func);\n }); // schedule hide tooltip\n\n oppositeEvents.forEach(function (event) {\n var func = function func(evt) {\n if (evt.usedByTooltip === true) {\n return;\n }\n\n _this2._scheduleHide(reference, options.delay, options, evt);\n };\n\n _this2._events.push({\n event: event,\n func: func\n });\n\n reference.addEventListener(event, func);\n\n if (event === 'click' && options.closeOnClickOutside) {\n document.addEventListener('mousedown', function (e) {\n if (!_this2._isOpening) {\n return;\n }\n\n var popper = _this2.popperInstance.popper;\n\n if (reference.contains(e.target) || popper.contains(e.target)) {\n return;\n }\n\n func(e);\n }, true);\n }\n });\n }\n }, {\n key: '_scheduleShow',\n value: function _scheduleShow(reference, delay, options\n /*, evt */\n ) {\n var _this3 = this;\n\n this._isOpening = true; // defaults to 0\n\n var computedDelay = delay && delay.show || delay || 0;\n this._showTimeout = window.setTimeout(function () {\n return _this3._show(reference, options);\n }, computedDelay);\n }\n }, {\n key: '_scheduleHide',\n value: function _scheduleHide(reference, delay, options, evt) {\n var _this4 = this;\n\n this._isOpening = false; // defaults to 0\n\n var computedDelay = delay && delay.hide || delay || 0;\n window.clearTimeout(this._showTimeout);\n window.setTimeout(function () {\n if (_this4._isOpen === false) {\n return;\n }\n\n if (!document.body.contains(_this4._tooltipNode)) {\n return;\n } // if we are hiding because of a mouseleave, we must check that the new\n // reference isn't the tooltip, because in this case we don't want to hide it\n\n\n if (evt.type === 'mouseleave') {\n var isSet = _this4._setTooltipNodeEvent(evt, reference, delay, options); // if we set the new event, don't hide the tooltip yet\n // the new event will take care to hide it if necessary\n\n\n if (isSet) {\n return;\n }\n }\n\n _this4._hide(reference, options);\n }, computedDelay);\n }\n }, {\n key: '_updateTitleContent',\n value: function _updateTitleContent(title) {\n if (typeof this._tooltipNode === 'undefined') {\n if (typeof this.options.title !== 'undefined') {\n this.options.title = title;\n }\n\n return;\n }\n\n var titleNode = this._tooltipNode.querySelector(this.options.innerSelector);\n\n this._clearTitleContent(titleNode, this.options.html, this.reference.getAttribute('title') || this.options.title);\n\n this._addTitleContent(this.reference, title, this.options.html, titleNode);\n\n this.options.title = title;\n this.popperInstance.update();\n }\n }, {\n key: '_clearTitleContent',\n value: function _clearTitleContent(titleNode, allowHtml, lastTitle) {\n if (lastTitle.nodeType === 1 || lastTitle.nodeType === 11) {\n allowHtml && titleNode.removeChild(lastTitle);\n } else {\n allowHtml ? titleNode.innerHTML = '' : titleNode.textContent = '';\n }\n }\n }]);\n return Tooltip;\n}();\n/**\n * Title function, its context is the Tooltip instance.\n * @memberof Tooltip\n * @callback TitleFunction\n * @return {String} placement - The desired title.\n */\n\n\nvar _initialiseProps = function _initialiseProps() {\n var _this5 = this;\n\n this.show = function () {\n return _this5._show(_this5.reference, _this5.options);\n };\n\n this.hide = function () {\n return _this5._hide();\n };\n\n this.dispose = function () {\n return _this5._dispose();\n };\n\n this.toggle = function () {\n if (_this5._isOpen) {\n return _this5.hide();\n } else {\n return _this5.show();\n }\n };\n\n this.updateTitleContent = function (title) {\n return _this5._updateTitleContent(title);\n };\n\n this._events = [];\n\n this._setTooltipNodeEvent = function (evt, reference, delay, options) {\n var relatedreference = evt.relatedreference || evt.toElement || evt.relatedTarget;\n\n var callback = function callback(evt2) {\n var relatedreference2 = evt2.relatedreference || evt2.toElement || evt2.relatedTarget; // Remove event listener after call\n\n _this5._tooltipNode.removeEventListener(evt.type, callback); // If the new reference is not the reference element\n\n\n if (!reference.contains(relatedreference2)) {\n // Schedule to hide tooltip\n _this5._scheduleHide(reference, options.delay, options, evt2);\n }\n };\n\n if (_this5._tooltipNode.contains(relatedreference)) {\n // listen to mouseleave on the tooltip element to be able to hide the tooltip\n _this5._tooltipNode.addEventListener(evt.type, callback);\n\n return true;\n }\n\n return false;\n };\n};\n\nexport default Tooltip;","'use strict';\nvar $ = require('../internals/export');\nvar toInteger = require('../internals/to-integer');\nvar thisNumberValue = require('../internals/this-number-value');\nvar repeat = require('../internals/string-repeat');\nvar fails = require('../internals/fails');\n\nvar nativeToFixed = 1.0.toFixed;\nvar floor = Math.floor;\n\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\nvar multiply = function (data, n, c) {\n var index = -1;\n var c2 = c;\n while (++index < 6) {\n c2 += n * data[index];\n data[index] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\n\nvar divide = function (data, n) {\n var index = 6;\n var c = 0;\n while (--index >= 0) {\n c += data[index];\n data[index] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\n\nvar dataToString = function (data) {\n var index = 6;\n var s = '';\n while (--index >= 0) {\n if (s !== '' || index === 0 || data[index] !== 0) {\n var t = String(data[index]);\n s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;\n }\n } return s;\n};\n\nvar FORCED = nativeToFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !fails(function () {\n // V8 ~ Android 4.3-\n nativeToFixed.call({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.es/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n toFixed: function toFixed(fractionDigits) {\n var number = thisNumberValue(this);\n var fractDigits = toInteger(fractionDigits);\n var data = [0, 0, 0, 0, 0, 0];\n var sign = '';\n var result = '0';\n var e, z, j, k;\n\n if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number) return 'NaN';\n if (number <= -1e21 || number >= 1e21) return String(number);\n if (number < 0) {\n sign = '-';\n number = -number;\n }\n if (number > 1e-21) {\n e = log(number * pow(2, 69, 1)) - 69;\n z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(data, 0, z);\n j = fractDigits;\n while (j >= 7) {\n multiply(data, 1e7, 0);\n j -= 7;\n }\n multiply(data, pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(data, 1 << 23);\n j -= 23;\n }\n divide(data, 1 << j);\n multiply(data, 1, 1);\n divide(data, 2);\n result = dataToString(data);\n } else {\n multiply(data, 0, z);\n multiply(data, 1 << -e, 0);\n result = dataToString(data) + repeat.call('0', fractDigits);\n }\n }\n if (fractDigits > 0) {\n k = result.length;\n result = sign + (k <= fractDigits\n ? '0.' + repeat.call('0', fractDigits - k) + result\n : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));\n } else {\n result = sign + result;\n } return result;\n }\n});\n","var $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\n// eslint-disable-next-line es/no-object-freeze -- safe\nvar $freeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });\n\n// `Object.freeze` method\n// https://tc39.es/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n freeze: function freeze(it) {\n return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names-external').f;\n\n// eslint-disable-next-line es/no-object-getownpropertynames -- required for testing\nvar FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n getOwnPropertyNames: getOwnPropertyNames\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar codeAt = require('../internals/string-multibyte').codeAt;\n\n// `String.prototype.codePointAt` method\n// https://tc39.es/ecma262/#sec-string.prototype.codepointat\n$({ target: 'String', proto: true }, {\n codePointAt: function codePointAt(pos) {\n return codeAt(this, pos);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-endswith -- safe\nvar $endsWith = ''.endsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.endsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.endswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = String(requireObjectCoercible(this));\n notARegExp(searchString);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = toLength(that.length);\n var end = endPosition === undefined ? len : min(toLength(endPosition), len);\n var search = String(searchString);\n return $endsWith\n ? $endsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.link` method\n// https://tc39.es/ecma262/#sec-string.prototype.link\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {\n link: function link(url) {\n return createHTML(this, 'a', 'href', url);\n }\n});\n","'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $lastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\n\n// `WeakSet` constructor\n// https://tc39.es/ecma262/#sec-weakset-constructor\ncollection('WeakSet', function (init) {\n return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionWeak);\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar task = require('../internals/task');\n\nvar FORCED = !global.setImmediate || !global.clearImmediate;\n\n// http://w3c.github.io/setImmediate/\n$({ global: true, bind: true, enumerable: true, forced: FORCED }, {\n // `setImmediate` method\n // http://w3c.github.io/setImmediate/#si-setImmediate\n setImmediate: task.set,\n // `clearImmediate` method\n // http://w3c.github.io/setImmediate/#si-clearImmediate\n clearImmediate: task.clear\n});\n","var $ = require('../internals/export');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n$({ target: 'Object', stat: true }, {\n setPrototypeOf: setPrototypeOf\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\n\nvar nativeReverse = [].reverse;\nvar test = [1, 2];\n\n// `Array.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n reverse: function reverse() {\n // eslint-disable-next-line no-self-assign -- dirty hack\n if (isArray(this)) this.length = this.length;\n return nativeReverse.call(this);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var utils = require(\"./utils/common\");\n\nvar error = require(\"./utils/error\"); //TODO\n\n\nexports.ASC = function () {\n throw new Error('ASC is not implemented');\n}; //TODO\n\n\nexports.BAHTTEXT = function () {\n throw new Error('BAHTTEXT is not implemented');\n};\n\nexports.CHAR = function (number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return String.fromCharCode(number);\n};\n\nexports.CLEAN = function (text) {\n text = text || '';\n var re = /[\\0-\\x1F]/g;\n return text.replace(re, \"\");\n};\n\nexports.CODE = function (text) {\n text = text || '';\n var result = text.charCodeAt(0);\n\n if (isNaN(result)) {\n result = error.na;\n }\n\n return result;\n};\n\nexports.CONCATENATE = function () {\n var args = utils.flatten(arguments);\n var trueFound = 0;\n\n while ((trueFound = args.indexOf(true)) > -1) {\n args[trueFound] = 'TRUE';\n }\n\n var falseFound = 0;\n\n while ((falseFound = args.indexOf(false)) > -1) {\n args[falseFound] = 'FALSE';\n }\n\n return args.join('');\n}; //TODO\n\n\nexports.DBCS = function () {\n throw new Error('DBCS is not implemented');\n}; //TODO\n\n\nexports.DOLLAR = function () {\n throw new Error('DOLLAR is not implemented');\n};\n\nexports.EXACT = function (text1, text2) {\n if (arguments.length !== 2) {\n return error.na;\n }\n\n return text1 === text2;\n};\n\nexports.FIND = function (find_text, within_text, position) {\n if (arguments.length < 2) {\n return error.na;\n }\n\n position = position === undefined ? 0 : position;\n return within_text ? within_text.indexOf(find_text, position - 1) + 1 : null;\n}; //TODO\n\n\nexports.FIXED = function () {\n throw new Error('FIXED is not implemented');\n};\n\nexports.HTML2TEXT = function (value) {\n var result = '';\n\n if (value) {\n if (value instanceof Array) {\n value.forEach(function (line) {\n if (result !== '') {\n result += '\\n';\n }\n\n result += line.replace(/<(?:.|\\n)*?>/gm, '');\n });\n } else {\n result = value.replace(/<(?:.|\\n)*?>/gm, '');\n }\n }\n\n return result;\n};\n\nexports.LEFT = function (text, number) {\n number = number === undefined ? 1 : number;\n number = utils.parseNumber(number);\n\n if (number instanceof Error || typeof text !== 'string') {\n return error.value;\n }\n\n return text ? text.substring(0, number) : null;\n};\n\nexports.LEN = function (text) {\n if (arguments.length === 0) {\n return error.error;\n }\n\n if (typeof text === 'string') {\n return text ? text.length : 0;\n }\n\n if (text.length) {\n return text.length;\n }\n\n return error.value;\n};\n\nexports.LOWER = function (text) {\n if (typeof text !== 'string') {\n return error.value;\n }\n\n return text ? text.toLowerCase() : text;\n};\n\nexports.MID = function (text, start, number) {\n start = utils.parseNumber(start);\n number = utils.parseNumber(number);\n\n if (utils.anyIsError(start, number) || typeof text !== 'string') {\n return number;\n }\n\n var begin = start - 1;\n var end = begin + number;\n return text.substring(begin, end);\n}; // TODO\n\n\nexports.NUMBERVALUE = function (text, decimal_separator, group_separator) {\n decimal_separator = typeof decimal_separator === 'undefined' ? '.' : decimal_separator;\n group_separator = typeof group_separator === 'undefined' ? ',' : group_separator;\n return Number(text.replace(decimal_separator, '.').replace(group_separator, ''));\n}; // TODO\n\n\nexports.PRONETIC = function () {\n throw new Error('PRONETIC is not implemented');\n};\n\nexports.PROPER = function (text) {\n if (text === undefined || text.length === 0) {\n return error.value;\n }\n\n if (text === true) {\n text = 'TRUE';\n }\n\n if (text === false) {\n text = 'FALSE';\n }\n\n if (isNaN(text) && typeof text === 'number') {\n return error.value;\n }\n\n if (typeof text === 'number') {\n text = '' + text;\n }\n\n return text.replace(/\\w\\S*/g, function (txt) {\n return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\n });\n};\n\nexports.REGEXEXTRACT = function (text, regular_expression) {\n if (arguments.length < 2) {\n return error.na;\n }\n\n var match = text.match(new RegExp(regular_expression));\n return match ? match[match.length > 1 ? match.length - 1 : 0] : null;\n};\n\nexports.REGEXMATCH = function (text, regular_expression, full) {\n if (arguments.length < 2) {\n return error.na;\n }\n\n var match = text.match(new RegExp(regular_expression));\n return full ? match : !!match;\n};\n\nexports.REGEXREPLACE = function (text, regular_expression, replacement) {\n if (arguments.length < 3) {\n return error.na;\n }\n\n return text.replace(new RegExp(regular_expression), replacement);\n};\n\nexports.REPLACE = function (text, position, length, new_text) {\n position = utils.parseNumber(position);\n length = utils.parseNumber(length);\n\n if (utils.anyIsError(position, length) || typeof text !== 'string' || typeof new_text !== 'string') {\n return error.value;\n }\n\n return text.substr(0, position - 1) + new_text + text.substr(position - 1 + length);\n};\n\nexports.REPT = function (text, number) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return new Array(number + 1).join(text);\n};\n\nexports.RIGHT = function (text, number) {\n number = number === undefined ? 1 : number;\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n }\n\n return text ? text.substring(text.length - number) : error.na;\n};\n\nexports.SEARCH = function (find_text, within_text, position) {\n var foundAt;\n\n if (typeof find_text !== 'string' || typeof within_text !== 'string') {\n return error.value;\n }\n\n position = position === undefined ? 0 : position;\n foundAt = within_text.toLowerCase().indexOf(find_text.toLowerCase(), position - 1) + 1;\n return foundAt === 0 ? error.value : foundAt;\n};\n\nexports.SPLIT = function (text, separator) {\n return text.split(separator);\n};\n\nexports.SUBSTITUTE = function (text, old_text, new_text, occurrence) {\n if (arguments.length < 2) {\n return error.na;\n }\n\n if (!text || !old_text || !new_text) {\n return text;\n } else if (occurrence === undefined) {\n return text.replace(new RegExp(old_text, 'g'), new_text);\n } else {\n var index = 0;\n var i = 0;\n\n while (text.indexOf(old_text, index) > 0) {\n index = text.indexOf(old_text, index + 1);\n i++;\n\n if (i === occurrence) {\n return text.substring(0, index) + new_text + text.substring(index + old_text.length);\n }\n }\n }\n};\n\nexports.T = function (value) {\n return typeof value === \"string\" ? value : '';\n}; // TODO incomplete implementation\n\n\nexports.TEXT = function () {\n throw new Error('TEXT is not implemented');\n};\n\nexports.TRIM = function (text) {\n if (typeof text !== 'string') {\n return error.value;\n }\n\n return text.replace(/ +/g, ' ').trim();\n};\n\nexports.UNICHAR = exports.CHAR;\nexports.UNICODE = exports.CODE;\n\nexports.UPPER = function (text) {\n if (typeof text !== 'string') {\n return error.value;\n }\n\n return text.toUpperCase();\n}; //TODO\n\n\nexports.VALUE = function () {\n throw new Error('VALUE is not implemented');\n};","var defaultOperator = '=';\nvar validSymbols = ['>', '>=', '<', '<=', '=', '<>'];\nvar TOKEN_TYPE_OPERATOR = 'operator';\nvar TOKEN_TYPE_LITERAL = 'literal';\nvar SUPPORTED_TOKENS = [TOKEN_TYPE_OPERATOR, TOKEN_TYPE_LITERAL];\nexports.TOKEN_TYPE_OPERATOR = TOKEN_TYPE_OPERATOR;\nexports.TOKEN_TYPE_LITERAL = TOKEN_TYPE_LITERAL;\n/**\n * Create token which describe passed symbol/value.\n *\n * @param {String} value Value/Symbol to describe.\n * @param {String} type Type of the token 'operator' or 'literal'.\n * @return {Object}\n */\n\nfunction createToken(value, type) {\n if (SUPPORTED_TOKENS.indexOf(type) === -1) {\n throw new Error('Unsupported token type: ' + type);\n }\n\n return {\n value: value,\n type: type\n };\n}\n/**\n * Tries to cast numeric values to their type passed as a string.\n *\n * @param {*} value\n * @return {*}\n */\n\n\nfunction castValueToCorrectType(value) {\n if (typeof value !== 'string') {\n return value;\n }\n\n if (/^\\d+(\\.\\d+)?$/.test(value)) {\n value = value.indexOf('.') === -1 ? parseInt(value, 10) : parseFloat(value);\n }\n\n return value;\n}\n/**\n * Generate stream of tokens from passed expression.\n *\n * @param {String} expression\n * @return {String[]}\n */\n\n\nfunction tokenizeExpression(expression) {\n var expressionLength = expression.length;\n var tokens = [];\n var cursorIndex = 0;\n var processedValue = '';\n var processedSymbol = '';\n\n while (cursorIndex < expressionLength) {\n var char = expression.charAt(cursorIndex);\n\n switch (char) {\n case '>':\n case '<':\n case '=':\n processedSymbol = processedSymbol + char;\n\n if (processedValue.length > 0) {\n tokens.push(processedValue);\n processedValue = '';\n }\n\n break;\n\n default:\n if (processedSymbol.length > 0) {\n tokens.push(processedSymbol);\n processedSymbol = '';\n }\n\n processedValue = processedValue + char;\n break;\n }\n\n cursorIndex++;\n }\n\n if (processedValue.length > 0) {\n tokens.push(processedValue);\n }\n\n if (processedSymbol.length > 0) {\n tokens.push(processedSymbol);\n }\n\n return tokens;\n}\n\n;\n/**\n * Analyze and convert tokens to an object which describes their meaning.\n *\n * @param {String[]} tokens\n * @return {Object[]}\n */\n\nfunction analyzeTokens(tokens) {\n var literalValue = '';\n var analyzedTokens = [];\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (i === 0 && validSymbols.indexOf(token) >= 0) {\n analyzedTokens.push(createToken(token, TOKEN_TYPE_OPERATOR));\n } else {\n literalValue += token;\n }\n }\n\n if (literalValue.length > 0) {\n analyzedTokens.push(createToken(castValueToCorrectType(literalValue), TOKEN_TYPE_LITERAL));\n }\n\n if (analyzedTokens.length > 0 && analyzedTokens[0].type !== TOKEN_TYPE_OPERATOR) {\n analyzedTokens.unshift(createToken(defaultOperator, TOKEN_TYPE_OPERATOR));\n }\n\n return analyzedTokens;\n}\n\n;\n/**\n * Compute/Evaluate an expression passed as an array of tokens.\n *\n * @param {Object[]} tokens\n * @return {Boolean}\n */\n\nfunction computeExpression(tokens) {\n var values = [];\n var operator;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n switch (token.type) {\n case TOKEN_TYPE_OPERATOR:\n operator = token.value;\n break;\n\n case TOKEN_TYPE_LITERAL:\n values.push(token.value);\n break;\n }\n }\n\n return evaluate(values, operator);\n}\n\n;\n/**\n * Evaluate values based on passed math operator.\n *\n * @param {*} values\n * @param {String} operator\n * @return {Boolean}\n */\n\nfunction evaluate(values, operator) {\n var result = false;\n\n switch (operator) {\n case '>':\n result = values[0] > values[1];\n break;\n\n case '>=':\n result = values[0] >= values[1];\n break;\n\n case '<':\n result = values[0] < values[1];\n break;\n\n case '<=':\n result = values[0] <= values[1];\n break;\n\n case '=':\n result = values[0] == values[1];\n break;\n\n case '<>':\n result = values[0] != values[1];\n break;\n }\n\n return result;\n}\n\nexports.parse = function (expression) {\n return analyzeTokens(tokenizeExpression(expression));\n};\n\nexports.createToken = createToken;\nexports.compute = computeExpression;","var error = require(\"./utils/error\"); // TODO\n\n\nexports.CELL = function () {\n throw new Error('CELL is not implemented');\n};\n\nexports.ERROR = {};\n\nexports.ERROR.TYPE = function (error_val) {\n switch (error_val) {\n case error.nil:\n return 1;\n\n case error.div0:\n return 2;\n\n case error.value:\n return 3;\n\n case error.ref:\n return 4;\n\n case error.name:\n return 5;\n\n case error.num:\n return 6;\n\n case error.na:\n return 7;\n\n case error.data:\n return 8;\n }\n\n return error.na;\n}; // TODO\n\n\nexports.INFO = function () {\n throw new Error('INFO is not implemented');\n};\n\nexports.ISBLANK = function (value) {\n return value === null;\n};\n\nexports.ISBINARY = function (number) {\n return /^[01]{1,10}$/.test(number);\n};\n\nexports.ISERR = function (value) {\n return [error.value, error.ref, error.div0, error.num, error.name, error.nil].indexOf(value) >= 0 || typeof value === 'number' && (isNaN(value) || !isFinite(value));\n};\n\nexports.ISERROR = function (value) {\n return exports.ISERR(value) || value === error.na;\n};\n\nexports.ISEVEN = function (number) {\n return Math.floor(Math.abs(number)) & 1 ? false : true;\n}; // TODO\n\n\nexports.ISFORMULA = function () {\n throw new Error('ISFORMULA is not implemented');\n};\n\nexports.ISLOGICAL = function (value) {\n return value === true || value === false;\n};\n\nexports.ISNA = function (value) {\n return value === error.na;\n};\n\nexports.ISNONTEXT = function (value) {\n return typeof value !== 'string';\n};\n\nexports.ISNUMBER = function (value) {\n return typeof value === 'number' && !isNaN(value) && isFinite(value);\n};\n\nexports.ISODD = function (number) {\n return Math.floor(Math.abs(number)) & 1 ? true : false;\n}; // TODO\n\n\nexports.ISREF = function () {\n throw new Error('ISREF is not implemented');\n};\n\nexports.ISTEXT = function (value) {\n return typeof value === 'string';\n};\n\nexports.N = function (value) {\n if (this.ISNUMBER(value)) {\n return value;\n }\n\n if (value instanceof Date) {\n return value.getTime();\n }\n\n if (value === true) {\n return 1;\n }\n\n if (value === false) {\n return 0;\n }\n\n if (this.ISERROR(value)) {\n return value;\n }\n\n return 0;\n};\n\nexports.NA = function () {\n return error.na;\n}; // TODO\n\n\nexports.SHEET = function () {\n throw new Error('SHEET is not implemented');\n}; // TODO\n\n\nexports.SHEETS = function () {\n throw new Error('SHEETS is not implemented');\n};\n\nexports.TYPE = function (value) {\n if (this.ISNUMBER(value)) {\n return 1;\n }\n\n if (this.ISTEXT(value)) {\n return 2;\n }\n\n if (this.ISLOGICAL(value)) {\n return 4;\n }\n\n if (this.ISERROR(value)) {\n return 16;\n }\n\n if (Array.isArray(value)) {\n return 64;\n }\n};","var error = require(\"./utils/error\");\n\nvar utils = require(\"./utils/common\");\n\nvar d1900 = new Date(Date.UTC(1900, 0, 1));\nvar WEEK_STARTS = [undefined, 0, 1, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, 1, 2, 3, 4, 5, 6, 0];\nvar WEEK_TYPES = [[], [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]];\nvar WEEKEND_TYPES = [[], [6, 0], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], undefined, undefined, undefined, [0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6]];\n\nexports.DATE = function (year, month, day) {\n var result;\n year = utils.parseNumber(year);\n month = utils.parseNumber(month);\n day = utils.parseNumber(day);\n\n if (utils.anyIsError(year, month, day)) {\n result = error.value;\n } else if (year < 0 || month < 0 || day < 0) {\n result = error.num;\n } else {\n result = new Date(year, month - 1, day);\n }\n\n return result;\n};\n\nexports.DATEVALUE = function (date_text) {\n var modifier = 2;\n var date;\n\n if (typeof date_text !== 'string') {\n return error.value;\n }\n\n date = Date.parse(date_text);\n\n if (isNaN(date)) {\n return error.value;\n }\n\n if (date <= -2203891200000) {\n modifier = 1;\n }\n\n return Math.ceil((date - d1900) / 86400000) + modifier;\n};\n\nexports.DAY = function (serial_number) {\n var date = utils.parseDate(serial_number);\n\n if (date instanceof Error) {\n return date;\n }\n\n return date.getDate();\n};\n\nexports.DAYS = function (end_date, start_date) {\n end_date = utils.parseDate(end_date);\n start_date = utils.parseDate(start_date);\n\n if (end_date instanceof Error) {\n return end_date;\n }\n\n if (start_date instanceof Error) {\n return start_date;\n }\n\n return serial(end_date) - serial(start_date);\n};\n\nexports.DAYS360 = function (start_date, end_date, method) {\n method = utils.parseBool(method);\n start_date = utils.parseDate(start_date);\n end_date = utils.parseDate(end_date);\n\n if (start_date instanceof Error) {\n return start_date;\n }\n\n if (end_date instanceof Error) {\n return end_date;\n }\n\n if (method instanceof Error) {\n return method;\n }\n\n var sm = start_date.getMonth();\n var em = end_date.getMonth();\n var sd, ed;\n\n if (method) {\n sd = start_date.getDate() === 31 ? 30 : start_date.getDate();\n ed = end_date.getDate() === 31 ? 30 : end_date.getDate();\n } else {\n var smd = new Date(start_date.getFullYear(), sm + 1, 0).getDate();\n var emd = new Date(end_date.getFullYear(), em + 1, 0).getDate();\n sd = start_date.getDate() === smd ? 30 : start_date.getDate();\n\n if (end_date.getDate() === emd) {\n if (sd < 30) {\n em++;\n ed = 1;\n } else {\n ed = 30;\n }\n } else {\n ed = end_date.getDate();\n }\n }\n\n return 360 * (end_date.getFullYear() - start_date.getFullYear()) + 30 * (em - sm) + (ed - sd);\n};\n\nexports.EDATE = function (start_date, months) {\n start_date = utils.parseDate(start_date);\n\n if (start_date instanceof Error) {\n return start_date;\n }\n\n if (isNaN(months)) {\n return error.value;\n }\n\n months = parseInt(months, 10);\n start_date.setMonth(start_date.getMonth() + months);\n return serial(start_date);\n};\n\nexports.EOMONTH = function (start_date, months) {\n start_date = utils.parseDate(start_date);\n\n if (start_date instanceof Error) {\n return start_date;\n }\n\n if (isNaN(months)) {\n return error.value;\n }\n\n months = parseInt(months, 10);\n return serial(new Date(start_date.getFullYear(), start_date.getMonth() + months + 1, 0));\n};\n\nexports.HOUR = function (serial_number) {\n serial_number = utils.parseDate(serial_number);\n\n if (serial_number instanceof Error) {\n return serial_number;\n }\n\n return serial_number.getHours();\n};\n\nexports.INTERVAL = function (second) {\n if (typeof second !== 'number' && typeof second !== 'string') {\n return error.value;\n } else {\n second = parseInt(second, 10);\n }\n\n var year = Math.floor(second / 946080000);\n second = second % 946080000;\n var month = Math.floor(second / 2592000);\n second = second % 2592000;\n var day = Math.floor(second / 86400);\n second = second % 86400;\n var hour = Math.floor(second / 3600);\n second = second % 3600;\n var min = Math.floor(second / 60);\n second = second % 60;\n var sec = second;\n year = year > 0 ? year + 'Y' : '';\n month = month > 0 ? month + 'M' : '';\n day = day > 0 ? day + 'D' : '';\n hour = hour > 0 ? hour + 'H' : '';\n min = min > 0 ? min + 'M' : '';\n sec = sec > 0 ? sec + 'S' : '';\n return 'P' + year + month + day + 'T' + hour + min + sec;\n};\n\nexports.ISOWEEKNUM = function (date) {\n date = utils.parseDate(date);\n\n if (date instanceof Error) {\n return date;\n }\n\n date.setHours(0, 0, 0);\n date.setDate(date.getDate() + 4 - (date.getDay() || 7));\n var yearStart = new Date(date.getFullYear(), 0, 1);\n return Math.ceil(((date - yearStart) / 86400000 + 1) / 7);\n};\n\nexports.MINUTE = function (serial_number) {\n serial_number = utils.parseDate(serial_number);\n\n if (serial_number instanceof Error) {\n return serial_number;\n }\n\n return serial_number.getMinutes();\n};\n\nexports.MONTH = function (serial_number) {\n serial_number = utils.parseDate(serial_number);\n\n if (serial_number instanceof Error) {\n return serial_number;\n }\n\n return serial_number.getMonth() + 1;\n};\n\nexports.NETWORKDAYS = function (start_date, end_date, holidays) {\n return this.NETWORKDAYS.INTL(start_date, end_date, 1, holidays);\n};\n\nexports.NETWORKDAYS.INTL = function (start_date, end_date, weekend, holidays) {\n start_date = utils.parseDate(start_date);\n\n if (start_date instanceof Error) {\n return start_date;\n }\n\n end_date = utils.parseDate(end_date);\n\n if (end_date instanceof Error) {\n return end_date;\n }\n\n if (weekend === undefined) {\n weekend = WEEKEND_TYPES[1];\n } else {\n weekend = WEEKEND_TYPES[weekend];\n }\n\n if (!(weekend instanceof Array)) {\n return error.value;\n }\n\n if (holidays === undefined) {\n holidays = [];\n } else if (!(holidays instanceof Array)) {\n holidays = [holidays];\n }\n\n for (var i = 0; i < holidays.length; i++) {\n var h = utils.parseDate(holidays[i]);\n\n if (h instanceof Error) {\n return h;\n }\n\n holidays[i] = h;\n }\n\n var days = (end_date - start_date) / (1000 * 60 * 60 * 24) + 1;\n var total = days;\n var day = start_date;\n\n for (i = 0; i < days; i++) {\n var d = new Date().getTimezoneOffset() > 0 ? day.getUTCDay() : day.getDay();\n var dec = false;\n\n if (d === weekend[0] || d === weekend[1]) {\n dec = true;\n }\n\n for (var j = 0; j < holidays.length; j++) {\n var holiday = holidays[j];\n\n if (holiday.getDate() === day.getDate() && holiday.getMonth() === day.getMonth() && holiday.getFullYear() === day.getFullYear()) {\n dec = true;\n break;\n }\n }\n\n if (dec) {\n total--;\n }\n\n day.setDate(day.getDate() + 1);\n }\n\n return total;\n};\n\nexports.NOW = function () {\n return new Date();\n};\n\nexports.SECOND = function (serial_number) {\n serial_number = utils.parseDate(serial_number);\n\n if (serial_number instanceof Error) {\n return serial_number;\n }\n\n return serial_number.getSeconds();\n};\n\nexports.TIME = function (hour, minute, second) {\n hour = utils.parseNumber(hour);\n minute = utils.parseNumber(minute);\n second = utils.parseNumber(second);\n\n if (utils.anyIsError(hour, minute, second)) {\n return error.value;\n }\n\n if (hour < 0 || minute < 0 || second < 0) {\n return error.num;\n }\n\n return (3600 * hour + 60 * minute + second) / 86400;\n};\n\nexports.TIMEVALUE = function (time_text) {\n time_text = utils.parseDate(time_text);\n\n if (time_text instanceof Error) {\n return time_text;\n }\n\n return (3600 * time_text.getHours() + 60 * time_text.getMinutes() + time_text.getSeconds()) / 86400;\n};\n\nexports.TODAY = function () {\n return new Date();\n};\n\nexports.WEEKDAY = function (serial_number, return_type) {\n serial_number = utils.parseDate(serial_number);\n\n if (serial_number instanceof Error) {\n return serial_number;\n }\n\n if (return_type === undefined) {\n return_type = 1;\n }\n\n var day = serial_number.getDay();\n return WEEK_TYPES[return_type][day];\n};\n\nexports.WEEKNUM = function (serial_number, return_type) {\n serial_number = utils.parseDate(serial_number);\n\n if (serial_number instanceof Error) {\n return serial_number;\n }\n\n if (return_type === undefined) {\n return_type = 1;\n }\n\n if (return_type === 21) {\n return this.ISOWEEKNUM(serial_number);\n }\n\n var week_start = WEEK_STARTS[return_type];\n var jan = new Date(serial_number.getFullYear(), 0, 1);\n var inc = jan.getDay() < week_start ? 1 : 0;\n jan -= Math.abs(jan.getDay() - week_start) * 24 * 60 * 60 * 1000;\n return Math.floor((serial_number - jan) / (1000 * 60 * 60 * 24) / 7 + 1) + inc;\n};\n\nexports.WORKDAY = function (start_date, days, holidays) {\n return this.WORKDAY.INTL(start_date, days, 1, holidays);\n};\n\nexports.WORKDAY.INTL = function (start_date, days, weekend, holidays) {\n start_date = utils.parseDate(start_date);\n\n if (start_date instanceof Error) {\n return start_date;\n }\n\n days = utils.parseNumber(days);\n\n if (days instanceof Error) {\n return days;\n }\n\n if (days < 0) {\n return error.num;\n }\n\n if (weekend === undefined) {\n weekend = WEEKEND_TYPES[1];\n } else {\n weekend = WEEKEND_TYPES[weekend];\n }\n\n if (!(weekend instanceof Array)) {\n return error.value;\n }\n\n if (holidays === undefined) {\n holidays = [];\n } else if (!(holidays instanceof Array)) {\n holidays = [holidays];\n }\n\n for (var i = 0; i < holidays.length; i++) {\n var h = utils.parseDate(holidays[i]);\n\n if (h instanceof Error) {\n return h;\n }\n\n holidays[i] = h;\n }\n\n var d = 0;\n\n while (d < days) {\n start_date.setDate(start_date.getDate() + 1);\n var day = start_date.getDay();\n\n if (day === weekend[0] || day === weekend[1]) {\n continue;\n }\n\n for (var j = 0; j < holidays.length; j++) {\n var holiday = holidays[j];\n\n if (holiday.getDate() === start_date.getDate() && holiday.getMonth() === start_date.getMonth() && holiday.getFullYear() === start_date.getFullYear()) {\n d--;\n break;\n }\n }\n\n d++;\n }\n\n return start_date;\n};\n\nexports.YEAR = function (serial_number) {\n serial_number = utils.parseDate(serial_number);\n\n if (serial_number instanceof Error) {\n return serial_number;\n }\n\n return serial_number.getFullYear();\n};\n\nfunction isLeapYear(year) {\n return new Date(year, 1, 29).getMonth() === 1;\n} // TODO : Use DAYS ?\n\n\nfunction daysBetween(start_date, end_date) {\n return Math.ceil((end_date - start_date) / 1000 / 60 / 60 / 24);\n}\n\nexports.YEARFRAC = function (start_date, end_date, basis) {\n start_date = utils.parseDate(start_date);\n\n if (start_date instanceof Error) {\n return start_date;\n }\n\n end_date = utils.parseDate(end_date);\n\n if (end_date instanceof Error) {\n return end_date;\n }\n\n basis = basis || 0;\n var sd = start_date.getDate();\n var sm = start_date.getMonth() + 1;\n var sy = start_date.getFullYear();\n var ed = end_date.getDate();\n var em = end_date.getMonth() + 1;\n var ey = end_date.getFullYear();\n\n switch (basis) {\n case 0:\n // US (NASD) 30/360\n if (sd === 31 && ed === 31) {\n sd = 30;\n ed = 30;\n } else if (sd === 31) {\n sd = 30;\n } else if (sd === 30 && ed === 31) {\n ed = 30;\n }\n\n return (ed + em * 30 + ey * 360 - (sd + sm * 30 + sy * 360)) / 360;\n\n case 1:\n // Actual/actual\n var feb29Between = function feb29Between(date1, date2) {\n var year1 = date1.getFullYear();\n var mar1year1 = new Date(year1, 2, 1);\n\n if (isLeapYear(year1) && date1 < mar1year1 && date2 >= mar1year1) {\n return true;\n }\n\n var year2 = date2.getFullYear();\n var mar1year2 = new Date(year2, 2, 1);\n return isLeapYear(year2) && date2 >= mar1year2 && date1 < mar1year2;\n };\n\n var ylength = 365;\n\n if (sy === ey || sy + 1 === ey && (sm > em || sm === em && sd >= ed)) {\n if (sy === ey && isLeapYear(sy) || feb29Between(start_date, end_date) || em === 1 && ed === 29) {\n ylength = 366;\n }\n\n return daysBetween(start_date, end_date) / ylength;\n }\n\n var years = ey - sy + 1;\n var days = (new Date(ey + 1, 0, 1) - new Date(sy, 0, 1)) / 1000 / 60 / 60 / 24;\n var average = days / years;\n return daysBetween(start_date, end_date) / average;\n\n case 2:\n // Actual/360\n return daysBetween(start_date, end_date) / 360;\n\n case 3:\n // Actual/365\n return daysBetween(start_date, end_date) / 365;\n\n case 4:\n // European 30/360\n return (ed + em * 30 + ey * 360 - (sd + sm * 30 + sy * 360)) / 360;\n }\n};\n\nfunction serial(date) {\n var addOn = date > -2203891200000 ? 2 : 1;\n return Math.ceil((date - d1900) / 86400000) + addOn;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * Pikaday\n *\n * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday\n */\n(function (root, factory) {\n 'use strict';\n\n var moment;\n\n if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object') {\n // CommonJS module\n // Load moment.js as an optional dependency\n try {\n moment = require('moment');\n } catch (e) {}\n\n module.exports = factory(moment);\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(function (req) {\n // Load moment.js as an optional dependency\n var id = 'moment';\n\n try {\n moment = req(id);\n } catch (e) {}\n\n return factory(moment);\n });\n } else {\n root.Pikaday = factory(root.moment);\n }\n})(this, function (moment) {\n 'use strict';\n /**\n * feature detection and helper functions\n */\n\n var hasMoment = typeof moment === 'function',\n hasEventListeners = !!window.addEventListener,\n document = window.document,\n sto = window.setTimeout,\n addEvent = function addEvent(el, e, callback, capture) {\n if (hasEventListeners) {\n el.addEventListener(e, callback, !!capture);\n } else {\n el.attachEvent('on' + e, callback);\n }\n },\n removeEvent = function removeEvent(el, e, callback, capture) {\n if (hasEventListeners) {\n el.removeEventListener(e, callback, !!capture);\n } else {\n el.detachEvent('on' + e, callback);\n }\n },\n trim = function trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n },\n hasClass = function hasClass(el, cn) {\n return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;\n },\n addClass = function addClass(el, cn) {\n if (!hasClass(el, cn)) {\n el.className = el.className === '' ? cn : el.className + ' ' + cn;\n }\n },\n removeClass = function removeClass(el, cn) {\n el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));\n },\n isArray = function isArray(obj) {\n return /Array/.test(Object.prototype.toString.call(obj));\n },\n isDate = function isDate(obj) {\n return /Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());\n },\n isWeekend = function isWeekend(date) {\n var day = date.getDay();\n return day === 0 || day === 6;\n },\n isLeapYear = function isLeapYear(year) {\n // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n },\n getDaysInMonth = function getDaysInMonth(year, month) {\n return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n },\n setToStartOfDay = function setToStartOfDay(date) {\n if (isDate(date)) date.setHours(0, 0, 0, 0);\n },\n compareDates = function compareDates(a, b) {\n // weak date comparison (use setToStartOfDay(date) to ensure correct result)\n return a.getTime() === b.getTime();\n },\n extend = function extend(to, from, overwrite) {\n var prop, hasProp;\n\n for (prop in from) {\n hasProp = to[prop] !== undefined;\n\n if (hasProp && _typeof(from[prop]) === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {\n if (isDate(from[prop])) {\n if (overwrite) {\n to[prop] = new Date(from[prop].getTime());\n }\n } else if (isArray(from[prop])) {\n if (overwrite) {\n to[prop] = from[prop].slice(0);\n }\n } else {\n to[prop] = extend({}, from[prop], overwrite);\n }\n } else if (overwrite || !hasProp) {\n to[prop] = from[prop];\n }\n }\n\n return to;\n },\n fireEvent = function fireEvent(el, eventName, data) {\n var ev;\n\n if (document.createEvent) {\n ev = document.createEvent('HTMLEvents');\n ev.initEvent(eventName, true, false);\n ev = extend(ev, data);\n el.dispatchEvent(ev);\n } else if (document.createEventObject) {\n ev = document.createEventObject();\n ev = extend(ev, data);\n el.fireEvent('on' + eventName, ev);\n }\n },\n adjustCalendar = function adjustCalendar(calendar) {\n if (calendar.month < 0) {\n calendar.year -= Math.ceil(Math.abs(calendar.month) / 12);\n calendar.month += 12;\n }\n\n if (calendar.month > 11) {\n calendar.year += Math.floor(Math.abs(calendar.month) / 12);\n calendar.month -= 12;\n }\n\n return calendar;\n },\n\n /**\n * defaults and localisation\n */\n defaults = {\n // bind the picker to a form field\n field: null,\n // automatically show/hide the picker on `field` focus (default `true` if `field` is set)\n bound: undefined,\n // data-attribute on the input field with an aria assistance tekst (only applied when `bound` is set)\n ariaLabel: 'Use the arrow keys to pick a date',\n // position of the datepicker, relative to the field (default to bottom & left)\n // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)\n position: 'bottom left',\n // automatically fit in the viewport even if it means repositioning from the position option\n reposition: true,\n // the default output format for `.toString()` and `field` value\n format: 'YYYY-MM-DD',\n // the toString function which gets passed a current date object and format\n // and returns a string\n toString: null,\n // used to create date object from current input string\n parse: null,\n // the initial date to view when first opened\n defaultDate: null,\n // make the `defaultDate` the initial selected value\n setDefaultDate: false,\n // first day of week (0: Sunday, 1: Monday etc)\n firstDay: 0,\n // the default flag for moment's strict date parsing\n formatStrict: false,\n // the minimum/earliest date that can be selected\n minDate: null,\n // the maximum/latest date that can be selected\n maxDate: null,\n // number of years either side, or array of upper/lower range\n yearRange: 10,\n // show week numbers at head of row\n showWeekNumber: false,\n // Week picker mode\n pickWholeWeek: false,\n // used internally (don't config outside)\n minYear: 0,\n maxYear: 9999,\n minMonth: undefined,\n maxMonth: undefined,\n startRange: null,\n endRange: null,\n isRTL: false,\n // Additional text to append to the year in the calendar title\n yearSuffix: '',\n // Render the month after year in the calendar title\n showMonthAfterYear: false,\n // Render days of the calendar grid that fall in the next or previous month\n showDaysInNextAndPreviousMonths: false,\n // Allows user to select days that fall in the next or previous month\n enableSelectionDaysInNextAndPreviousMonths: false,\n // how many months are visible\n numberOfMonths: 1,\n // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)\n // only used for the first display or when a selected date is not visible\n mainCalendar: 'left',\n // Specify a DOM element to render the calendar in\n container: undefined,\n // Blur field when date is selected\n blurFieldOnSelect: true,\n // internationalization\n i18n: {\n previousMonth: 'Previous Month',\n nextMonth: 'Next Month',\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n },\n // Theme Classname\n theme: null,\n // events array\n events: [],\n // callback function\n onSelect: null,\n onOpen: null,\n onClose: null,\n onDraw: null,\n // Enable keyboard input\n keyboardInput: true\n },\n\n /**\n * templating functions to abstract HTML rendering\n */\n renderDayName = function renderDayName(opts, day, abbr) {\n day += opts.firstDay;\n\n while (day >= 7) {\n day -= 7;\n }\n\n return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];\n },\n renderDay = function renderDay(opts) {\n var arr = [];\n var ariaSelected = 'false';\n\n if (opts.isEmpty) {\n if (opts.showDaysInNextAndPreviousMonths) {\n arr.push('is-outside-current-month');\n\n if (!opts.enableSelectionDaysInNextAndPreviousMonths) {\n arr.push('is-selection-disabled');\n }\n } else {\n return ' ';\n }\n }\n\n if (opts.isDisabled) {\n arr.push('is-disabled');\n }\n\n if (opts.isToday) {\n arr.push('is-today');\n }\n\n if (opts.isSelected) {\n arr.push('is-selected');\n ariaSelected = 'true';\n }\n\n if (opts.hasEvent) {\n arr.push('has-event');\n }\n\n if (opts.isInRange) {\n arr.push('is-inrange');\n }\n\n if (opts.isStartRange) {\n arr.push('is-startrange');\n }\n\n if (opts.isEndRange) {\n arr.push('is-endrange');\n }\n\n return '' + '' + opts.day + ' ' + ' ';\n },\n renderWeek = function renderWeek(d, m, y) {\n // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.\n var onejan = new Date(y, 0, 1),\n weekNum = Math.ceil(((new Date(y, m, d) - onejan) / 86400000 + onejan.getDay() + 1) / 7);\n return '' + weekNum + ' ';\n },\n renderRow = function renderRow(days, isRTL, pickWholeWeek, isRowSelected) {\n return '' + (isRTL ? days.reverse() : days).join('') + ' ';\n },\n renderBody = function renderBody(rows) {\n return '' + rows.join('') + ' ';\n },\n renderHead = function renderHead(opts) {\n var i,\n arr = [];\n\n if (opts.showWeekNumber) {\n arr.push(' ');\n }\n\n for (i = 0; i < 7; i++) {\n arr.push('' + renderDayName(opts, i, true) + ' ');\n }\n\n return '' + (opts.isRTL ? arr.reverse() : arr).join('') + ' ';\n },\n renderTitle = function renderTitle(instance, c, year, month, refYear, randId) {\n var i,\n j,\n arr,\n opts = instance._o,\n isMinYear = year === opts.minYear,\n isMaxYear = year === opts.maxYear,\n html = '',\n monthHtml,\n yearHtml,\n prev = true,\n next = true;\n\n for (arr = [], i = 0; i < 12; i++) {\n arr.push('
opts.maxMonth ? 'disabled=\"disabled\"' : '') + '>' + opts.i18n.months[i] + ' ');\n }\n\n monthHtml = '
' + opts.i18n.months[month] + '' + arr.join('') + '
';\n\n if (isArray(opts.yearRange)) {\n i = opts.yearRange[0];\n j = opts.yearRange[1] + 1;\n } else {\n i = year - opts.yearRange;\n j = 1 + year + opts.yearRange;\n }\n\n for (arr = []; i < j && i <= opts.maxYear; i++) {\n if (i >= opts.minYear) {\n arr.push('
' + i + ' ');\n }\n }\n\n yearHtml = '
' + year + opts.yearSuffix + '' + arr.join('') + '
';\n\n if (opts.showMonthAfterYear) {\n html += yearHtml + monthHtml;\n } else {\n html += monthHtml + yearHtml;\n }\n\n if (isMinYear && (month === 0 || opts.minMonth >= month)) {\n prev = false;\n }\n\n if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {\n next = false;\n }\n\n if (c === 0) {\n html += '
' + opts.i18n.previousMonth + ' ';\n }\n\n if (c === instance._o.numberOfMonths - 1) {\n html += '
' + opts.i18n.nextMonth + ' ';\n }\n\n return html += '
';\n },\n renderTable = function renderTable(opts, data, randId) {\n return '' + renderHead(opts) + renderBody(data) + '
';\n },\n\n /**\n * Pikaday constructor\n */\n Pikaday = function Pikaday(options) {\n var self = this,\n opts = self.config(options);\n\n self._onMouseDown = function (e) {\n if (!self._v) {\n return;\n }\n\n e = e || window.event;\n var target = e.target || e.srcElement;\n\n if (!target) {\n return;\n }\n\n if (!hasClass(target, 'is-disabled')) {\n if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {\n self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));\n\n if (opts.bound) {\n sto(function () {\n self.hide();\n\n if (opts.blurFieldOnSelect && opts.field) {\n opts.field.blur();\n }\n }, 100);\n }\n } else if (hasClass(target, 'pika-prev')) {\n self.prevMonth();\n } else if (hasClass(target, 'pika-next')) {\n self.nextMonth();\n }\n }\n\n if (!hasClass(target, 'pika-select')) {\n // if this is touch event prevent mouse events emulation\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n e.returnValue = false;\n return false;\n }\n } else {\n self._c = true;\n }\n };\n\n self._onChange = function (e) {\n e = e || window.event;\n var target = e.target || e.srcElement;\n\n if (!target) {\n return;\n }\n\n if (hasClass(target, 'pika-select-month')) {\n self.gotoMonth(target.value);\n } else if (hasClass(target, 'pika-select-year')) {\n self.gotoYear(target.value);\n }\n };\n\n self._onKeyChange = function (e) {\n e = e || window.event;\n\n if (self.isVisible()) {\n switch (e.keyCode) {\n case 13:\n case 27:\n if (opts.field) {\n opts.field.blur();\n }\n\n break;\n\n case 37:\n e.preventDefault();\n self.adjustDate('subtract', 1);\n break;\n\n case 38:\n self.adjustDate('subtract', 7);\n break;\n\n case 39:\n self.adjustDate('add', 1);\n break;\n\n case 40:\n self.adjustDate('add', 7);\n break;\n }\n }\n };\n\n self._onInputChange = function (e) {\n var date;\n\n if (e.firedBy === self) {\n return;\n }\n\n if (opts.parse) {\n date = opts.parse(opts.field.value, opts.format);\n } else if (hasMoment) {\n date = moment(opts.field.value, opts.format, opts.formatStrict);\n date = date && date.isValid() ? date.toDate() : null;\n } else {\n date = new Date(Date.parse(opts.field.value));\n }\n\n if (isDate(date)) {\n self.setDate(date);\n }\n\n if (!self._v) {\n self.show();\n }\n };\n\n self._onInputFocus = function () {\n self.show();\n };\n\n self._onInputClick = function () {\n self.show();\n };\n\n self._onInputBlur = function () {\n // IE allows pika div to gain focus; catch blur the input field\n var pEl = document.activeElement;\n\n do {\n if (hasClass(pEl, 'pika-single')) {\n return;\n }\n } while (pEl = pEl.parentNode);\n\n if (!self._c) {\n self._b = sto(function () {\n self.hide();\n }, 50);\n }\n\n self._c = false;\n };\n\n self._onClick = function (e) {\n e = e || window.event;\n var target = e.target || e.srcElement,\n pEl = target;\n\n if (!target) {\n return;\n }\n\n if (!hasEventListeners && hasClass(target, 'pika-select')) {\n if (!target.onchange) {\n target.setAttribute('onchange', 'return;');\n addEvent(target, 'change', self._onChange);\n }\n }\n\n do {\n if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {\n return;\n }\n } while (pEl = pEl.parentNode);\n\n if (self._v && target !== opts.trigger && pEl !== opts.trigger) {\n self.hide();\n }\n };\n\n self.el = document.createElement('div');\n self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');\n addEvent(self.el, 'mousedown', self._onMouseDown, true);\n addEvent(self.el, 'touchend', self._onMouseDown, true);\n addEvent(self.el, 'change', self._onChange);\n\n if (opts.keyboardInput) {\n addEvent(document, 'keydown', self._onKeyChange);\n }\n\n if (opts.field) {\n if (opts.container) {\n opts.container.appendChild(self.el);\n } else if (opts.bound) {\n document.body.appendChild(self.el);\n } else {\n opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);\n }\n\n addEvent(opts.field, 'change', self._onInputChange);\n\n if (!opts.defaultDate) {\n if (hasMoment && opts.field.value) {\n opts.defaultDate = moment(opts.field.value, opts.format).toDate();\n } else {\n opts.defaultDate = new Date(Date.parse(opts.field.value));\n }\n\n opts.setDefaultDate = true;\n }\n }\n\n var defDate = opts.defaultDate;\n\n if (isDate(defDate)) {\n if (opts.setDefaultDate) {\n self.setDate(defDate, true);\n } else {\n self.gotoDate(defDate);\n }\n } else {\n self.gotoDate(new Date());\n }\n\n if (opts.bound) {\n this.hide();\n self.el.className += ' is-bound';\n addEvent(opts.trigger, 'click', self._onInputClick);\n addEvent(opts.trigger, 'focus', self._onInputFocus);\n addEvent(opts.trigger, 'blur', self._onInputBlur);\n } else {\n this.show();\n }\n };\n /**\n * public Pikaday API\n */\n\n\n Pikaday.prototype = {\n /**\n * configure functionality\n */\n config: function config(options) {\n if (!this._o) {\n this._o = extend({}, defaults, true);\n }\n\n var opts = extend(this._o, options, true);\n opts.isRTL = !!opts.isRTL;\n opts.field = opts.field && opts.field.nodeName ? opts.field : null;\n opts.theme = typeof opts.theme === 'string' && opts.theme ? opts.theme : null;\n opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);\n opts.trigger = opts.trigger && opts.trigger.nodeName ? opts.trigger : opts.field;\n opts.disableWeekends = !!opts.disableWeekends;\n opts.disableDayFn = typeof opts.disableDayFn === 'function' ? opts.disableDayFn : null;\n var nom = parseInt(opts.numberOfMonths, 10) || 1;\n opts.numberOfMonths = nom > 4 ? 4 : nom;\n\n if (!isDate(opts.minDate)) {\n opts.minDate = false;\n }\n\n if (!isDate(opts.maxDate)) {\n opts.maxDate = false;\n }\n\n if (opts.minDate && opts.maxDate && opts.maxDate < opts.minDate) {\n opts.maxDate = opts.minDate = false;\n }\n\n if (opts.minDate) {\n this.setMinDate(opts.minDate);\n }\n\n if (opts.maxDate) {\n this.setMaxDate(opts.maxDate);\n }\n\n if (isArray(opts.yearRange)) {\n var fallback = new Date().getFullYear() - 10;\n opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;\n opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;\n } else {\n opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;\n\n if (opts.yearRange > 100) {\n opts.yearRange = 100;\n }\n }\n\n return opts;\n },\n\n /**\n * return a formatted string of the current selection (using Moment.js if available)\n */\n toString: function toString(format) {\n format = format || this._o.format;\n\n if (!isDate(this._d)) {\n return '';\n }\n\n if (this._o.toString) {\n return this._o.toString(this._d, format);\n }\n\n if (hasMoment) {\n return moment(this._d).format(format);\n }\n\n return this._d.toDateString();\n },\n\n /**\n * return a Moment.js object of the current selection (if available)\n */\n getMoment: function getMoment() {\n return hasMoment ? moment(this._d) : null;\n },\n\n /**\n * set the current selection from a Moment.js object (if available)\n */\n setMoment: function setMoment(date, preventOnSelect) {\n if (hasMoment && moment.isMoment(date)) {\n this.setDate(date.toDate(), preventOnSelect);\n }\n },\n\n /**\n * return a Date object of the current selection\n */\n getDate: function getDate() {\n return isDate(this._d) ? new Date(this._d.getTime()) : null;\n },\n\n /**\n * set the current selection\n */\n setDate: function setDate(date, preventOnSelect) {\n if (!date) {\n this._d = null;\n\n if (this._o.field) {\n this._o.field.value = '';\n fireEvent(this._o.field, 'change', {\n firedBy: this\n });\n }\n\n return this.draw();\n }\n\n if (typeof date === 'string') {\n date = new Date(Date.parse(date));\n }\n\n if (!isDate(date)) {\n return;\n }\n\n var min = this._o.minDate,\n max = this._o.maxDate;\n\n if (isDate(min) && date < min) {\n date = min;\n } else if (isDate(max) && date > max) {\n date = max;\n }\n\n this._d = new Date(date.getTime());\n setToStartOfDay(this._d);\n this.gotoDate(this._d);\n\n if (this._o.field) {\n this._o.field.value = this.toString();\n fireEvent(this._o.field, 'change', {\n firedBy: this\n });\n }\n\n if (!preventOnSelect && typeof this._o.onSelect === 'function') {\n this._o.onSelect.call(this, this.getDate());\n }\n },\n\n /**\n * change view to a specific date\n */\n gotoDate: function gotoDate(date) {\n var newCalendar = true;\n\n if (!isDate(date)) {\n return;\n }\n\n if (this.calendars) {\n var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),\n lastVisibleDate = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1),\n visibleDate = date.getTime(); // get the end of the month\n\n lastVisibleDate.setMonth(lastVisibleDate.getMonth() + 1);\n lastVisibleDate.setDate(lastVisibleDate.getDate() - 1);\n newCalendar = visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate;\n }\n\n if (newCalendar) {\n this.calendars = [{\n month: date.getMonth(),\n year: date.getFullYear()\n }];\n\n if (this._o.mainCalendar === 'right') {\n this.calendars[0].month += 1 - this._o.numberOfMonths;\n }\n }\n\n this.adjustCalendars();\n },\n adjustDate: function adjustDate(sign, days) {\n var day = this.getDate() || new Date();\n var difference = parseInt(days) * 24 * 60 * 60 * 1000;\n var newDay;\n\n if (sign === 'add') {\n newDay = new Date(day.valueOf() + difference);\n } else if (sign === 'subtract') {\n newDay = new Date(day.valueOf() - difference);\n }\n\n this.setDate(newDay);\n },\n adjustCalendars: function adjustCalendars() {\n this.calendars[0] = adjustCalendar(this.calendars[0]);\n\n for (var c = 1; c < this._o.numberOfMonths; c++) {\n this.calendars[c] = adjustCalendar({\n month: this.calendars[0].month + c,\n year: this.calendars[0].year\n });\n }\n\n this.draw();\n },\n gotoToday: function gotoToday() {\n this.gotoDate(new Date());\n },\n\n /**\n * change view to a specific month (zero-index, e.g. 0: January)\n */\n gotoMonth: function gotoMonth(month) {\n if (!isNaN(month)) {\n this.calendars[0].month = parseInt(month, 10);\n this.adjustCalendars();\n }\n },\n nextMonth: function nextMonth() {\n this.calendars[0].month++;\n this.adjustCalendars();\n },\n prevMonth: function prevMonth() {\n this.calendars[0].month--;\n this.adjustCalendars();\n },\n\n /**\n * change view to a specific full year (e.g. \"2012\")\n */\n gotoYear: function gotoYear(year) {\n if (!isNaN(year)) {\n this.calendars[0].year = parseInt(year, 10);\n this.adjustCalendars();\n }\n },\n\n /**\n * change the minDate\n */\n setMinDate: function setMinDate(value) {\n if (value instanceof Date) {\n setToStartOfDay(value);\n this._o.minDate = value;\n this._o.minYear = value.getFullYear();\n this._o.minMonth = value.getMonth();\n } else {\n this._o.minDate = defaults.minDate;\n this._o.minYear = defaults.minYear;\n this._o.minMonth = defaults.minMonth;\n this._o.startRange = defaults.startRange;\n }\n\n this.draw();\n },\n\n /**\n * change the maxDate\n */\n setMaxDate: function setMaxDate(value) {\n if (value instanceof Date) {\n setToStartOfDay(value);\n this._o.maxDate = value;\n this._o.maxYear = value.getFullYear();\n this._o.maxMonth = value.getMonth();\n } else {\n this._o.maxDate = defaults.maxDate;\n this._o.maxYear = defaults.maxYear;\n this._o.maxMonth = defaults.maxMonth;\n this._o.endRange = defaults.endRange;\n }\n\n this.draw();\n },\n setStartRange: function setStartRange(value) {\n this._o.startRange = value;\n },\n setEndRange: function setEndRange(value) {\n this._o.endRange = value;\n },\n\n /**\n * refresh the HTML\n */\n draw: function draw(force) {\n if (!this._v && !force) {\n return;\n }\n\n var opts = this._o,\n minYear = opts.minYear,\n maxYear = opts.maxYear,\n minMonth = opts.minMonth,\n maxMonth = opts.maxMonth,\n html = '',\n randId;\n\n if (this._y <= minYear) {\n this._y = minYear;\n\n if (!isNaN(minMonth) && this._m < minMonth) {\n this._m = minMonth;\n }\n }\n\n if (this._y >= maxYear) {\n this._y = maxYear;\n\n if (!isNaN(maxMonth) && this._m > maxMonth) {\n this._m = maxMonth;\n }\n }\n\n randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);\n\n for (var c = 0; c < opts.numberOfMonths; c++) {\n html += '' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '
';\n }\n\n this.el.innerHTML = html;\n\n if (opts.bound) {\n if (opts.field.type !== 'hidden') {\n sto(function () {\n opts.trigger.focus();\n }, 1);\n }\n }\n\n if (typeof this._o.onDraw === 'function') {\n this._o.onDraw(this);\n }\n\n if (opts.bound) {\n // let the screen reader user know to use arrow keys\n opts.field.setAttribute('aria-label', opts.ariaLabel);\n }\n },\n adjustPosition: function adjustPosition() {\n var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect, leftAligned, bottomAligned;\n if (this._o.container) return;\n this.el.style.position = 'absolute';\n field = this._o.trigger;\n pEl = field;\n width = this.el.offsetWidth;\n height = this.el.offsetHeight;\n viewportWidth = window.innerWidth || document.documentElement.clientWidth;\n viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;\n leftAligned = true;\n bottomAligned = true;\n\n if (typeof field.getBoundingClientRect === 'function') {\n clientRect = field.getBoundingClientRect();\n left = clientRect.left + window.pageXOffset;\n top = clientRect.bottom + window.pageYOffset;\n } else {\n left = pEl.offsetLeft;\n top = pEl.offsetTop + pEl.offsetHeight;\n\n while (pEl = pEl.offsetParent) {\n left += pEl.offsetLeft;\n top += pEl.offsetTop;\n }\n } // default position is bottom & left\n\n\n if (this._o.reposition && left + width > viewportWidth || this._o.position.indexOf('right') > -1 && left - width + field.offsetWidth > 0) {\n left = left - width + field.offsetWidth;\n leftAligned = false;\n }\n\n if (this._o.reposition && top + height > viewportHeight + scrollTop || this._o.position.indexOf('top') > -1 && top - height - field.offsetHeight > 0) {\n top = top - height - field.offsetHeight;\n bottomAligned = false;\n }\n\n this.el.style.left = left + 'px';\n this.el.style.top = top + 'px';\n addClass(this.el, leftAligned ? 'left-aligned' : 'right-aligned');\n addClass(this.el, bottomAligned ? 'bottom-aligned' : 'top-aligned');\n removeClass(this.el, !leftAligned ? 'left-aligned' : 'right-aligned');\n removeClass(this.el, !bottomAligned ? 'bottom-aligned' : 'top-aligned');\n },\n\n /**\n * render HTML for a particular month\n */\n render: function render(year, month, randId) {\n var opts = this._o,\n now = new Date(),\n days = getDaysInMonth(year, month),\n before = new Date(year, month, 1).getDay(),\n data = [],\n row = [];\n setToStartOfDay(now);\n\n if (opts.firstDay > 0) {\n before -= opts.firstDay;\n\n if (before < 0) {\n before += 7;\n }\n }\n\n var previousMonth = month === 0 ? 11 : month - 1,\n nextMonth = month === 11 ? 0 : month + 1,\n yearOfPreviousMonth = month === 0 ? year - 1 : year,\n yearOfNextMonth = month === 11 ? year + 1 : year,\n daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);\n var cells = days + before,\n after = cells;\n\n while (after > 7) {\n after -= 7;\n }\n\n cells += 7 - after;\n var isWeekSelected = false;\n\n for (var i = 0, r = 0; i < cells; i++) {\n var day = new Date(year, month, 1 + (i - before)),\n isSelected = isDate(this._d) ? compareDates(day, this._d) : false,\n isToday = compareDates(day, now),\n hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,\n isEmpty = i < before || i >= days + before,\n dayNumber = 1 + (i - before),\n monthNumber = month,\n yearNumber = year,\n isStartRange = opts.startRange && compareDates(opts.startRange, day),\n isEndRange = opts.endRange && compareDates(opts.endRange, day),\n isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,\n isDisabled = opts.minDate && day < opts.minDate || opts.maxDate && day > opts.maxDate || opts.disableWeekends && isWeekend(day) || opts.disableDayFn && opts.disableDayFn(day);\n\n if (isEmpty) {\n if (i < before) {\n dayNumber = daysInPreviousMonth + dayNumber;\n monthNumber = previousMonth;\n yearNumber = yearOfPreviousMonth;\n } else {\n dayNumber = dayNumber - days;\n monthNumber = nextMonth;\n yearNumber = yearOfNextMonth;\n }\n }\n\n var dayConfig = {\n day: dayNumber,\n month: monthNumber,\n year: yearNumber,\n hasEvent: hasEvent,\n isSelected: isSelected,\n isToday: isToday,\n isDisabled: isDisabled,\n isEmpty: isEmpty,\n isStartRange: isStartRange,\n isEndRange: isEndRange,\n isInRange: isInRange,\n showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,\n enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths\n };\n\n if (opts.pickWholeWeek && isSelected) {\n isWeekSelected = true;\n }\n\n row.push(renderDay(dayConfig));\n\n if (++r === 7) {\n if (opts.showWeekNumber) {\n row.unshift(renderWeek(i - before, month, year));\n }\n\n data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));\n row = [];\n r = 0;\n isWeekSelected = false;\n }\n }\n\n return renderTable(opts, data, randId);\n },\n isVisible: function isVisible() {\n return this._v;\n },\n show: function show() {\n if (!this.isVisible()) {\n this._v = true;\n this.draw();\n removeClass(this.el, 'is-hidden');\n\n if (this._o.bound) {\n addEvent(document, 'click', this._onClick);\n this.adjustPosition();\n }\n\n if (typeof this._o.onOpen === 'function') {\n this._o.onOpen.call(this);\n }\n }\n },\n hide: function hide() {\n var v = this._v;\n\n if (v !== false) {\n if (this._o.bound) {\n removeEvent(document, 'click', this._onClick);\n }\n\n this.el.style.position = 'static'; // reset\n\n this.el.style.left = 'auto';\n this.el.style.top = 'auto';\n addClass(this.el, 'is-hidden');\n this._v = false;\n\n if (v !== undefined && typeof this._o.onClose === 'function') {\n this._o.onClose.call(this);\n }\n }\n },\n\n /**\n * GAME OVER\n */\n destroy: function destroy() {\n var opts = this._o;\n this.hide();\n removeEvent(this.el, 'mousedown', this._onMouseDown, true);\n removeEvent(this.el, 'touchend', this._onMouseDown, true);\n removeEvent(this.el, 'change', this._onChange);\n\n if (opts.keyboardInput) {\n removeEvent(document, 'keydown', this._onKeyChange);\n }\n\n if (opts.field) {\n removeEvent(opts.field, 'change', this._onInputChange);\n\n if (opts.bound) {\n removeEvent(opts.trigger, 'click', this._onInputClick);\n removeEvent(opts.trigger, 'focus', this._onInputFocus);\n removeEvent(opts.trigger, 'blur', this._onInputBlur);\n }\n }\n\n if (this.el.parentNode) {\n this.el.parentNode.removeChild(this.el);\n }\n }\n };\n return Pikaday;\n});","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{\"name\":\"modal\"}},[_c('div',{staticClass:\"modal-mask\",on:{\"click\":function($event){return _vm.$emit('close')}}},[_c('div',{staticClass:\"modal-wrapper\"},[_c('div',{staticClass:\"modal-container\",on:{\"click\":function($event){$event.stopPropagation();}}},[_c('div',{staticClass:\"modal-content\"},[_c('div',{staticClass:\"modal-header\"},[_vm._t(\"header\",[_vm._v(\"\\n default header\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"divider\"}),_vm._v(\" \"),_c('br')],2),_vm._v(\" \"),_c('div',{staticClass:\"modal-body\"},[_vm._t(\"body\",[_vm._v(\"\\n default body\\n \")])],2)]),_vm._v(\" \"),_c('div',{staticClass:\"modal-footer\"},[_vm._t(\"footer\",[_c('button',{staticClass:\"btn btn-default\",on:{\"click\":function($event){return _vm.$emit('close')}}},[_vm._v(\"\\n Close\\n \")])])],2)])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","module.exports = jQuery;","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.asyncIterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.asynciterator\ndefineWellKnownSymbol('asyncIterator');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.hasInstance` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.hasinstance\ndefineWellKnownSymbol('hasInstance');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.isConcatSpreadable` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.isconcatspreadable\ndefineWellKnownSymbol('isConcatSpreadable');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.match` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.match\ndefineWellKnownSymbol('match');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.replace` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.replace\ndefineWellKnownSymbol('replace');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.search` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.search\ndefineWellKnownSymbol('search');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.species` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.species\ndefineWellKnownSymbol('species');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.split` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.split\ndefineWellKnownSymbol('split');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.toPrimitive` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.toprimitive\ndefineWellKnownSymbol('toPrimitive');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.toStringTag` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.tostringtag\ndefineWellKnownSymbol('toStringTag');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.unscopables` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.unscopables\ndefineWellKnownSymbol('unscopables');\n","var $ = require('../internals/export');\nvar copyWithin = require('../internals/array-copy-within');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.copyWithin` method\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n$({ target: 'Array', proto: true }, {\n copyWithin: copyWithin\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('copyWithin');\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flat` method\n// https://tc39.es/ecma262/#sec-array.prototype.flat\n$({ target: 'Array', proto: true }, {\n flat: function flat(/* depthArg = 1 */) {\n var depthArg = arguments.length ? arguments[0] : undefined;\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar aFunction = require('../internals/a-function');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-array.prototype.flatmap\n$({ target: 'Array', proto: true }, {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A;\n aFunction(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n","var anObject = require('../internals/an-object');\nvar iteratorClose = require('../internals/iterator-close');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar createProperty = require('../internals/create-property');\n\nvar ISNT_GENERIC = fails(function () {\n function F() { /* empty */ }\n // eslint-disable-next-line es/no-array-of -- required for testing\n return !(Array.of.call(F) instanceof F);\n});\n\n// `Array.of` method\n// https://tc39.es/ecma262/#sec-array.of\n// WebKit Array.of isn't generic\n$({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {\n of: function of(/* ...args */) {\n var index = 0;\n var argumentsLength = arguments.length;\n var result = new (typeof this == 'function' ? this : Array)(argumentsLength);\n while (argumentsLength > index) createProperty(result, index, arguments[index++]);\n result.length = argumentsLength;\n return result;\n }\n});\n","var setSpecies = require('../internals/set-species');\n\n// `Array[@@species]` getter\n// https://tc39.es/ecma262/#sec-get-array-@@species\nsetSpecies('Array');\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flat');\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flatMap');\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar arrayBufferModule = require('../internals/array-buffer');\nvar setSpecies = require('../internals/set-species');\n\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\n\n// `ArrayBuffer` constructor\n// https://tc39.es/ecma262/#sec-arraybuffer-constructor\n$({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, {\n ArrayBuffer: ArrayBuffer\n});\n\nsetSpecies(ARRAY_BUFFER);\n","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar dateToPrimitive = require('../internals/date-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar DatePrototype = Date.prototype;\n\n// `Date.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive\nif (!(TO_PRIMITIVE in DatePrototype)) {\n createNonEnumerableProperty(DatePrototype, TO_PRIMITIVE, dateToPrimitive);\n}\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nmodule.exports = function (hint) {\n if (hint !== 'string' && hint !== 'number' && hint !== 'default') {\n throw TypeError('Incorrect hint');\n } return toPrimitive(anObject(this), hint !== 'number');\n};\n","'use strict';\nvar isObject = require('../internals/is-object');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar HAS_INSTANCE = wellKnownSymbol('hasInstance');\nvar FunctionPrototype = Function.prototype;\n\n// `Function.prototype[@@hasInstance]` method\n// https://tc39.es/ecma262/#sec-function.prototype-@@hasinstance\nif (!(HAS_INSTANCE in FunctionPrototype)) {\n definePropertyModule.f(FunctionPrototype, HAS_INSTANCE, { value: function (O) {\n if (typeof this != 'function' || !isObject(O)) return false;\n if (!isObject(this.prototype)) return O instanceof this;\n // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:\n while (O = getPrototypeOf(O)) if (this.prototype === O) return true;\n return false;\n } });\n}\n","var global = require('../internals/global');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// JSON[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-json-@@tostringtag\nsetToStringTag(global.JSON, 'JSON', true);\n","var $ = require('../internals/export');\nvar log1p = require('../internals/math-log1p');\n\n// eslint-disable-next-line es/no-math-acosh -- required for testing\nvar $acosh = Math.acosh;\nvar log = Math.log;\nvar sqrt = Math.sqrt;\nvar LN2 = Math.LN2;\n\nvar FORCED = !$acosh\n // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509\n || Math.floor($acosh(Number.MAX_VALUE)) != 710\n // Tor Browser bug: Math.acosh(Infinity) -> NaN\n || $acosh(Infinity) != Infinity;\n\n// `Math.acosh` method\n// https://tc39.es/ecma262/#sec-math.acosh\n$({ target: 'Math', stat: true, forced: FORCED }, {\n acosh: function acosh(x) {\n return (x = +x) < 1 ? NaN : x > 94906265.62425156\n ? log(x) + LN2\n : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));\n }\n});\n","var $ = require('../internals/export');\n\n// eslint-disable-next-line es/no-math-asinh -- required for testing\nvar $asinh = Math.asinh;\nvar log = Math.log;\nvar sqrt = Math.sqrt;\n\nfunction asinh(x) {\n return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1));\n}\n\n// `Math.asinh` method\n// https://tc39.es/ecma262/#sec-math.asinh\n// Tor Browser bug: Math.asinh(0) -> -0\n$({ target: 'Math', stat: true, forced: !($asinh && 1 / $asinh(0) > 0) }, {\n asinh: asinh\n});\n","var $ = require('../internals/export');\n\n// eslint-disable-next-line es/no-math-atanh -- required for testing\nvar $atanh = Math.atanh;\nvar log = Math.log;\n\n// `Math.atanh` method\n// https://tc39.es/ecma262/#sec-math.atanh\n// Tor Browser bug: Math.atanh(-0) -> 0\n$({ target: 'Math', stat: true, forced: !($atanh && 1 / $atanh(-0) < 0) }, {\n atanh: function atanh(x) {\n return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2;\n }\n});\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\nvar abs = Math.abs;\nvar pow = Math.pow;\n\n// `Math.cbrt` method\n// https://tc39.es/ecma262/#sec-math.cbrt\n$({ target: 'Math', stat: true }, {\n cbrt: function cbrt(x) {\n return sign(x = +x) * pow(abs(x), 1 / 3);\n }\n});\n","var $ = require('../internals/export');\n\nvar floor = Math.floor;\nvar log = Math.log;\nvar LOG2E = Math.LOG2E;\n\n// `Math.clz32` method\n// https://tc39.es/ecma262/#sec-math.clz32\n$({ target: 'Math', stat: true }, {\n clz32: function clz32(x) {\n return (x >>>= 0) ? 31 - floor(log(x + 0.5) * LOG2E) : 32;\n }\n});\n","var $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\n// eslint-disable-next-line es/no-math-cosh -- required for testing\nvar $cosh = Math.cosh;\nvar abs = Math.abs;\nvar E = Math.E;\n\n// `Math.cosh` method\n// https://tc39.es/ecma262/#sec-math.cosh\n$({ target: 'Math', stat: true, forced: !$cosh || $cosh(710) === Infinity }, {\n cosh: function cosh(x) {\n var t = expm1(abs(x) - 1) + 1;\n return (t + 1 / (t * E * E)) * (E / 2);\n }\n});\n","var $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\n// `Math.expm1` method\n// https://tc39.es/ecma262/#sec-math.expm1\n// eslint-disable-next-line es/no-math-expm1 -- required for testing\n$({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 });\n","var $ = require('../internals/export');\nvar fround = require('../internals/math-fround');\n\n// `Math.fround` method\n// https://tc39.es/ecma262/#sec-math.fround\n$({ target: 'Math', stat: true }, { fround: fround });\n","var sign = require('../internals/math-sign');\n\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar EPSILON = pow(2, -52);\nvar EPSILON32 = pow(2, -23);\nvar MAX32 = pow(2, 127) * (2 - EPSILON32);\nvar MIN32 = pow(2, -126);\n\nvar roundTiesToEven = function (n) {\n return n + 1 / EPSILON - 1 / EPSILON;\n};\n\n// `Math.fround` method implementation\n// https://tc39.es/ecma262/#sec-math.fround\n// eslint-disable-next-line es/no-math-fround -- safe\nmodule.exports = Math.fround || function fround(x) {\n var $abs = abs(x);\n var $sign = sign(x);\n var a, result;\n if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;\n a = (1 + EPSILON32 / EPSILON) * $abs;\n result = a - (a - $abs);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (result > MAX32 || result != result) return $sign * Infinity;\n return $sign * result;\n};\n","var $ = require('../internals/export');\n\n// eslint-disable-next-line es/no-math-hypot -- required for testing\nvar $hypot = Math.hypot;\nvar abs = Math.abs;\nvar sqrt = Math.sqrt;\n\n// Chrome 77 bug\n// https://bugs.chromium.org/p/v8/issues/detail?id=9546\nvar BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity;\n\n// `Math.hypot` method\n// https://tc39.es/ecma262/#sec-math.hypot\n$({ target: 'Math', stat: true, forced: BUGGY }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n hypot: function hypot(value1, value2) {\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n while (i < aLen) {\n arg = abs(arguments[i++]);\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * sqrt(sum);\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-math-imul -- required for testing\nvar $imul = Math.imul;\n\nvar FORCED = fails(function () {\n return $imul(0xFFFFFFFF, 5) != -5 || $imul.length != 2;\n});\n\n// `Math.imul` method\n// https://tc39.es/ecma262/#sec-math.imul\n// some WebKit versions fails with big numbers, some has wrong arity\n$({ target: 'Math', stat: true, forced: FORCED }, {\n imul: function imul(x, y) {\n var UINT16 = 0xFFFF;\n var xn = +x;\n var yn = +y;\n var xl = UINT16 & xn;\n var yl = UINT16 & yn;\n return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n }\n});\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LOG10E = Math.LOG10E;\n\n// `Math.log10` method\n// https://tc39.es/ecma262/#sec-math.log10\n$({ target: 'Math', stat: true }, {\n log10: function log10(x) {\n return log(x) * LOG10E;\n }\n});\n","var $ = require('../internals/export');\nvar log1p = require('../internals/math-log1p');\n\n// `Math.log1p` method\n// https://tc39.es/ecma262/#sec-math.log1p\n$({ target: 'Math', stat: true }, { log1p: log1p });\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\n// `Math.log2` method\n// https://tc39.es/ecma262/#sec-math.log2\n$({ target: 'Math', stat: true }, {\n log2: function log2(x) {\n return log(x) / LN2;\n }\n});\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.es/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n sign: sign\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar expm1 = require('../internals/math-expm1');\n\nvar abs = Math.abs;\nvar exp = Math.exp;\nvar E = Math.E;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-math-sinh -- required for testing\n return Math.sinh(-2e-17) != -2e-17;\n});\n\n// `Math.sinh` method\n// https://tc39.es/ecma262/#sec-math.sinh\n// V8 near Chromium 38 has a problem with very small numbers\n$({ target: 'Math', stat: true, forced: FORCED }, {\n sinh: function sinh(x) {\n return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2);\n }\n});\n","var $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\nvar exp = Math.exp;\n\n// `Math.tanh` method\n// https://tc39.es/ecma262/#sec-math.tanh\n$({ target: 'Math', stat: true }, {\n tanh: function tanh(x) {\n var a = expm1(x = +x);\n var b = expm1(-x);\n return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));\n }\n});\n","var setToStringTag = require('../internals/set-to-string-tag');\n\n// Math[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-math-@@tostringtag\nsetToStringTag(Math, 'Math', true);\n","var $ = require('../internals/export');\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n$({ target: 'Math', stat: true }, {\n trunc: function trunc(it) {\n return (it > 0 ? floor : ceil)(it);\n }\n});\n","var $ = require('../internals/export');\n\n// `Number.EPSILON` constant\n// https://tc39.es/ecma262/#sec-number.epsilon\n$({ target: 'Number', stat: true }, {\n EPSILON: Math.pow(2, -52)\n});\n","var $ = require('../internals/export');\nvar numberIsFinite = require('../internals/number-is-finite');\n\n// `Number.isFinite` method\n// https://tc39.es/ecma262/#sec-number.isfinite\n$({ target: 'Number', stat: true }, { isFinite: numberIsFinite });\n","var global = require('../internals/global');\n\nvar globalIsFinite = global.isFinite;\n\n// `Number.isFinite` method\n// https://tc39.es/ecma262/#sec-number.isfinite\n// eslint-disable-next-line es/no-number-isfinite -- safe\nmodule.exports = Number.isFinite || function isFinite(it) {\n return typeof it == 'number' && globalIsFinite(it);\n};\n","var $ = require('../internals/export');\n\n// `Number.isNaN` method\n// https://tc39.es/ecma262/#sec-number.isnan\n$({ target: 'Number', stat: true }, {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return number != number;\n }\n});\n","var $ = require('../internals/export');\nvar isInteger = require('../internals/is-integer');\n\nvar abs = Math.abs;\n\n// `Number.isSafeInteger` method\n// https://tc39.es/ecma262/#sec-number.issafeinteger\n$({ target: 'Number', stat: true }, {\n isSafeInteger: function isSafeInteger(number) {\n return isInteger(number) && abs(number) <= 0x1FFFFFFFFFFFFF;\n }\n});\n","var $ = require('../internals/export');\n\n// `Number.MAX_SAFE_INTEGER` constant\n// https://tc39.es/ecma262/#sec-number.max_safe_integer\n$({ target: 'Number', stat: true }, {\n MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF\n});\n","var $ = require('../internals/export');\n\n// `Number.MIN_SAFE_INTEGER` constant\n// https://tc39.es/ecma262/#sec-number.min_safe_integer\n$({ target: 'Number', stat: true }, {\n MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF\n});\n","var $ = require('../internals/export');\nvar parseFloat = require('../internals/number-parse-float');\n\n// `Number.parseFloat` method\n// https://tc39.es/ecma262/#sec-number.parseFloat\n// eslint-disable-next-line es/no-number-parsefloat -- required for testing\n$({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, {\n parseFloat: parseFloat\n});\n","var global = require('../internals/global');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseFloat = global.parseFloat;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n var trimmedString = trim(String(string));\n var result = $parseFloat(trimmedString);\n return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n","var $ = require('../internals/export');\nvar parseInt = require('../internals/number-parse-int');\n\n// `Number.parseInt` method\n// https://tc39.es/ecma262/#sec-number.parseint\n// eslint-disable-next-line es/no-number-parseint -- required for testing\n$({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {\n parseInt: parseInt\n});\n","var global = require('../internals/global');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseInt = global.parseInt;\nvar hex = /^[+-]?0[Xx]/;\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n var S = trim(String(string));\n return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n","var classof = require('../internals/classof-raw');\n\n// `thisNumberValue` abstract operation\n// https://tc39.es/ecma262/#sec-thisnumbervalue\nmodule.exports = function (value) {\n if (typeof value != 'number' && classof(value) != 'Number') {\n throw TypeError('Incorrect invocation');\n }\n return +value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar aFunction = require('../internals/a-function');\nvar definePropertyModule = require('../internals/object-define-property');\n\n// `Object.prototype.__defineGetter__` method\n// https://tc39.es/ecma262/#sec-object.prototype.__defineGetter__\nif (DESCRIPTORS) {\n $({ target: 'Object', proto: true, forced: FORCED }, {\n __defineGetter__: function __defineGetter__(P, getter) {\n definePropertyModule.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar aFunction = require('../internals/a-function');\nvar definePropertyModule = require('../internals/object-define-property');\n\n// `Object.prototype.__defineSetter__` method\n// https://tc39.es/ecma262/#sec-object.prototype.__defineSetter__\nif (DESCRIPTORS) {\n $({ target: 'Object', proto: true, forced: FORCED }, {\n __defineSetter__: function __defineSetter__(P, setter) {\n definePropertyModule.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });\n }\n });\n}\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","var $ = require('../internals/export');\nvar iterate = require('../internals/iterate');\nvar createProperty = require('../internals/create-property');\n\n// `Object.fromEntries` method\n// https://github.com/tc39/proposal-object-from-entries\n$({ target: 'Object', stat: true }, {\n fromEntries: function fromEntries(iterable) {\n var obj = {};\n iterate(iterable, function (k, v) {\n createProperty(obj, k, v);\n }, { AS_ENTRIES: true });\n return obj;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });\nvar FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n }\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar ownKeys = require('../internals/own-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar createProperty = require('../internals/create-property');\n\n// `Object.getOwnPropertyDescriptors` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIndexedObject(object);\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n var keys = ownKeys(O);\n var result = {};\n var index = 0;\n var key, descriptor;\n while (keys.length > index) {\n descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n if (descriptor !== undefined) createProperty(result, key, descriptor);\n }\n return result;\n }\n});\n","var $ = require('../internals/export');\nvar is = require('../internals/same-value');\n\n// `Object.is` method\n// https://tc39.es/ecma262/#sec-object.is\n$({ target: 'Object', stat: true }, {\n is: is\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar $isExtensible = Object.isExtensible;\nvar FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });\n\n// `Object.isExtensible` method\n// https://tc39.es/ecma262/#sec-object.isextensible\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n isExtensible: function isExtensible(it) {\n return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\n\n// eslint-disable-next-line es/no-object-isfrozen -- safe\nvar $isFrozen = Object.isFrozen;\nvar FAILS_ON_PRIMITIVES = fails(function () { $isFrozen(1); });\n\n// `Object.isFrozen` method\n// https://tc39.es/ecma262/#sec-object.isfrozen\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n isFrozen: function isFrozen(it) {\n return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\n\n// eslint-disable-next-line es/no-object-issealed -- safe\nvar $isSealed = Object.isSealed;\nvar FAILS_ON_PRIMITIVES = fails(function () { $isSealed(1); });\n\n// `Object.isSealed` method\n// https://tc39.es/ecma262/#sec-object.issealed\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n isSealed: function isSealed(it) {\n return isObject(it) ? $isSealed ? $isSealed(it) : false : true;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Object.prototype.__lookupGetter__` method\n// https://tc39.es/ecma262/#sec-object.prototype.__lookupGetter__\nif (DESCRIPTORS) {\n $({ target: 'Object', proto: true, forced: FORCED }, {\n __lookupGetter__: function __lookupGetter__(P) {\n var O = toObject(this);\n var key = toPrimitive(P, true);\n var desc;\n do {\n if (desc = getOwnPropertyDescriptor(O, key)) return desc.get;\n } while (O = getPrototypeOf(O));\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Object.prototype.__lookupSetter__` method\n// https://tc39.es/ecma262/#sec-object.prototype.__lookupSetter__\nif (DESCRIPTORS) {\n $({ target: 'Object', proto: true, forced: FORCED }, {\n __lookupSetter__: function __lookupSetter__(P) {\n var O = toObject(this);\n var key = toPrimitive(P, true);\n var desc;\n do {\n if (desc = getOwnPropertyDescriptor(O, key)) return desc.set;\n } while (O = getPrototypeOf(O));\n }\n });\n}\n","var $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-preventextensions -- safe\nvar $preventExtensions = Object.preventExtensions;\nvar FAILS_ON_PRIMITIVES = fails(function () { $preventExtensions(1); });\n\n// `Object.preventExtensions` method\n// https://tc39.es/ecma262/#sec-object.preventextensions\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n preventExtensions: function preventExtensions(it) {\n return $preventExtensions && isObject(it) ? $preventExtensions(onFreeze(it)) : it;\n }\n});\n","var $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-seal -- safe\nvar $seal = Object.seal;\nvar FAILS_ON_PRIMITIVES = fails(function () { $seal(1); });\n\n// `Object.seal` method\n// https://tc39.es/ecma262/#sec-object.seal\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n seal: function seal(it) {\n return $seal && isObject(it) ? $seal(onFreeze(it)) : it;\n }\n});\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar isObject = require('../internals/is-object');\nvar aFunction = require('../internals/a-function');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar PromiseConstructor = NativePromise;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar $fetch = getBuiltIn('fetch');\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);\n if (!GLOBAL_CORE_JS_PROMISE) {\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (V8_VERSION === 66) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n if (!IS_NODE && !NATIVE_REJECTION_EVENT) return true;\n }\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = PromiseConstructor.resolve(1);\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n return !(promise.then(function () { /* empty */ }) instanceof FakePromise);\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && typeof NativePromise == 'function') {\n nativeThen = NativePromise.prototype.then;\n\n // wrap native Promise#then for native async functions\n redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // wrap fetch result\n if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n fetch: function fetch(input /* , init */) {\n return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));\n }\n });\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar redefine = require('../internals/redefine');\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// patch native Promise.prototype for native async functions\nif (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype['finally']) {\n redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']);\n}\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\n\nvar nativeApply = getBuiltIn('Reflect', 'apply');\nvar functionApply = Function.apply;\n\n// MS Edge argumentsList argument is optional\nvar OPTIONAL_ARGUMENTS_LIST = !fails(function () {\n nativeApply(function () { /* empty */ });\n});\n\n// `Reflect.apply` method\n// https://tc39.es/ecma262/#sec-reflect.apply\n$({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {\n apply: function apply(target, thisArgument, argumentsList) {\n aFunction(target);\n anObject(argumentsList);\n return nativeApply\n ? nativeApply(target, thisArgument, argumentsList)\n : functionApply.call(target, thisArgument, argumentsList);\n }\n});\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar bind = require('../internals/function-bind');\nvar fails = require('../internals/fails');\n\nvar nativeConstruct = getBuiltIn('Reflect', 'construct');\n\n// `Reflect.construct` method\n// https://tc39.es/ecma262/#sec-reflect.construct\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n nativeConstruct(function () { /* empty */ });\n});\nvar FORCED = NEW_TARGET_BUG || ARGS_BUG;\n\n$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {\n construct: function construct(Target, args /* , newTarget */) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n","'use strict';\nvar aFunction = require('../internals/a-function');\nvar isObject = require('../internals/is-object');\n\nvar slice = [].slice;\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n if (!(argsLength in factories)) {\n for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';\n // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only\n factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');\n } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var fn = aFunction(this);\n var partArgs = slice.call(arguments, 1);\n var boundFunction = function bound(/* args... */) {\n var args = partArgs.concat(slice.call(arguments));\n return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);\n };\n if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;\n return boundFunction;\n};\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar fails = require('../internals/fails');\n\n// MS Edge has broken Reflect.defineProperty - throwing instead of returning false\nvar ERROR_INSTEAD_OF_FALSE = fails(function () {\n // eslint-disable-next-line es/no-reflect -- required for testing\n Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });\n});\n\n// `Reflect.defineProperty` method\n// https://tc39.es/ecma262/#sec-reflect.defineproperty\n$({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {\n defineProperty: function defineProperty(target, propertyKey, attributes) {\n anObject(target);\n var key = toPrimitive(propertyKey, true);\n anObject(attributes);\n try {\n definePropertyModule.f(target, key, attributes);\n return true;\n } catch (error) {\n return false;\n }\n }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Reflect.deleteProperty` method\n// https://tc39.es/ecma262/#sec-reflect.deleteproperty\n$({ target: 'Reflect', stat: true }, {\n deleteProperty: function deleteProperty(target, propertyKey) {\n var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);\n return descriptor && !descriptor.configurable ? false : delete target[propertyKey];\n }\n});\n","var $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar has = require('../internals/has');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\n// `Reflect.get` method\n// https://tc39.es/ecma262/#sec-reflect.get\nfunction get(target, propertyKey /* , receiver */) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var descriptor, prototype;\n if (anObject(target) === receiver) return target[propertyKey];\n if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value')\n ? descriptor.value\n : descriptor.get === undefined\n ? undefined\n : descriptor.get.call(receiver);\n if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);\n}\n\n$({ target: 'Reflect', stat: true }, {\n get: get\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar anObject = require('../internals/an-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\n\n// `Reflect.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-reflect.getownpropertydescriptor\n$({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {\n return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);\n }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar objectGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\n// `Reflect.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-reflect.getprototypeof\n$({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(target) {\n return objectGetPrototypeOf(anObject(target));\n }\n});\n","var $ = require('../internals/export');\n\n// `Reflect.has` method\n// https://tc39.es/ecma262/#sec-reflect.has\n$({ target: 'Reflect', stat: true }, {\n has: function has(target, propertyKey) {\n return propertyKey in target;\n }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar objectIsExtensible = Object.isExtensible;\n\n// `Reflect.isExtensible` method\n// https://tc39.es/ecma262/#sec-reflect.isextensible\n$({ target: 'Reflect', stat: true }, {\n isExtensible: function isExtensible(target) {\n anObject(target);\n return objectIsExtensible ? objectIsExtensible(target) : true;\n }\n});\n","var $ = require('../internals/export');\nvar ownKeys = require('../internals/own-keys');\n\n// `Reflect.ownKeys` method\n// https://tc39.es/ecma262/#sec-reflect.ownkeys\n$({ target: 'Reflect', stat: true }, {\n ownKeys: ownKeys\n});\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar FREEZING = require('../internals/freezing');\n\n// `Reflect.preventExtensions` method\n// https://tc39.es/ecma262/#sec-reflect.preventextensions\n$({ target: 'Reflect', stat: true, sham: !FREEZING }, {\n preventExtensions: function preventExtensions(target) {\n anObject(target);\n try {\n var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');\n if (objectPreventExtensions) objectPreventExtensions(target);\n return true;\n } catch (error) {\n return false;\n }\n }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar fails = require('../internals/fails');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\n// `Reflect.set` method\n// https://tc39.es/ecma262/#sec-reflect.set\nfunction set(target, propertyKey, V /* , receiver */) {\n var receiver = arguments.length < 4 ? target : arguments[3];\n var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);\n var existingDescriptor, prototype;\n if (!ownDescriptor) {\n if (isObject(prototype = getPrototypeOf(target))) {\n return set(prototype, propertyKey, V, receiver);\n }\n ownDescriptor = createPropertyDescriptor(0);\n }\n if (has(ownDescriptor, 'value')) {\n if (ownDescriptor.writable === false || !isObject(receiver)) return false;\n if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {\n if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;\n existingDescriptor.value = V;\n definePropertyModule.f(receiver, propertyKey, existingDescriptor);\n } else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));\n return true;\n }\n return ownDescriptor.set === undefined ? false : (ownDescriptor.set.call(receiver, V), true);\n}\n\n// MS Edge 17-18 Reflect.set allows setting the property to object\n// with non-writable property on the prototype\nvar MS_EDGE_BUG = fails(function () {\n var Constructor = function () { /* empty */ };\n var object = definePropertyModule.f(new Constructor(), 'a', { configurable: true });\n // eslint-disable-next-line es/no-reflect -- required for testing\n return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;\n});\n\n$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {\n set: set\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\nvar objectSetPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Reflect.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-reflect.setprototypeof\nif (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, {\n setPrototypeOf: function setPrototypeOf(target, proto) {\n anObject(target);\n aPossiblePrototype(proto);\n try {\n objectSetPrototypeOf(target, proto);\n return true;\n } catch (error) {\n return false;\n }\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectDefinePropertyModule = require('../internals/object-define-property');\nvar regExpFlags = require('../internals/regexp-flags');\nvar UNSUPPORTED_Y = require('../internals/regexp-sticky-helpers').UNSUPPORTED_Y;\n\n// `RegExp.prototype.flags` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\n// eslint-disable-next-line es/no-regexp-prototype-flags -- required for testing\nif (DESCRIPTORS && (/./g.flags != 'g' || UNSUPPORTED_Y)) {\n objectDefinePropertyModule.f(RegExp.prototype, 'flags', {\n configurable: true,\n get: regExpFlags\n });\n}\n","var $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\nvar fromCharCode = String.fromCharCode;\n// eslint-disable-next-line es/no-string-fromcodepoint -- required for testing\nvar $fromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\nvar INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1;\n\n// `String.fromCodePoint` method\n// https://tc39.es/ecma262/#sec-string.fromcodepoint\n$({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n fromCodePoint: function fromCodePoint(x) {\n var elements = [];\n var length = arguments.length;\n var i = 0;\n var code;\n while (length > i) {\n code = +arguments[i++];\n if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point');\n elements.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00)\n );\n } return elements.join('');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $padEnd = require('../internals/string-pad').end;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padEnd` method\n// https://tc39.es/ecma262/#sec-string.prototype.padend\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padEnd: function padEnd(maxLength /* , fillString = ' ' */) {\n return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var $ = require('../internals/export');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `String.raw` method\n// https://tc39.es/ecma262/#sec-string.raw\n$({ target: 'String', stat: true }, {\n raw: function raw(template) {\n var rawTemplate = toIndexedObject(template.raw);\n var literalSegments = toLength(rawTemplate.length);\n var argumentsLength = arguments.length;\n var elements = [];\n var i = 0;\n while (literalSegments > i) {\n elements.push(String(rawTemplate[i++]));\n if (i < argumentsLength) elements.push(String(arguments[i]));\n } return elements.join('');\n }\n});\n","var $ = require('../internals/export');\nvar repeat = require('../internals/string-repeat');\n\n// `String.prototype.repeat` method\n// https://tc39.es/ecma262/#sec-string.prototype.repeat\n$({ target: 'String', proto: true }, {\n repeat: repeat\n});\n","var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $trimEnd = require('../internals/string-trim').end;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\nvar FORCED = forcedStringTrimMethod('trimEnd');\n\nvar trimEnd = FORCED ? function trimEnd() {\n return $trimEnd(this);\n// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe\n} : ''.trimEnd;\n\n// `String.prototype.{ trimEnd, trimRight }` methods\n// https://tc39.es/ecma262/#sec-string.prototype.trimend\n// https://tc39.es/ecma262/#String.prototype.trimright\n$({ target: 'String', proto: true, forced: FORCED }, {\n trimEnd: trimEnd,\n trimRight: trimEnd\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $trimStart = require('../internals/string-trim').start;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\nvar FORCED = forcedStringTrimMethod('trimStart');\n\nvar trimStart = FORCED ? function trimStart() {\n return $trimStart(this);\n// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe\n} : ''.trimStart;\n\n// `String.prototype.{ trimStart, trimLeft }` methods\n// https://tc39.es/ecma262/#sec-string.prototype.trimstart\n// https://tc39.es/ecma262/#String.prototype.trimleft\n$({ target: 'String', proto: true, forced: FORCED }, {\n trimStart: trimStart,\n trimLeft: trimStart\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.anchor` method\n// https://tc39.es/ecma262/#sec-string.prototype.anchor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {\n anchor: function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.big` method\n// https://tc39.es/ecma262/#sec-string.prototype.big\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, {\n big: function big() {\n return createHTML(this, 'big', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.blink` method\n// https://tc39.es/ecma262/#sec-string.prototype.blink\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, {\n blink: function blink() {\n return createHTML(this, 'blink', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.bold` method\n// https://tc39.es/ecma262/#sec-string.prototype.bold\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, {\n bold: function bold() {\n return createHTML(this, 'b', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fixed` method\n// https://tc39.es/ecma262/#sec-string.prototype.fixed\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {\n fixed: function fixed() {\n return createHTML(this, 'tt', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fontcolor` method\n// https://tc39.es/ecma262/#sec-string.prototype.fontcolor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') }, {\n fontcolor: function fontcolor(color) {\n return createHTML(this, 'font', 'color', color);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fontsize` method\n// https://tc39.es/ecma262/#sec-string.prototype.fontsize\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, {\n fontsize: function fontsize(size) {\n return createHTML(this, 'font', 'size', size);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.italics` method\n// https://tc39.es/ecma262/#sec-string.prototype.italics\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, {\n italics: function italics() {\n return createHTML(this, 'i', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.small` method\n// https://tc39.es/ecma262/#sec-string.prototype.small\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {\n small: function small() {\n return createHTML(this, 'small', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.strike` method\n// https://tc39.es/ecma262/#sec-string.prototype.strike\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {\n strike: function strike() {\n return createHTML(this, 'strike', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.sub` method\n// https://tc39.es/ecma262/#sec-string.prototype.sub\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {\n sub: function sub() {\n return createHTML(this, 'sub', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.sup` method\n// https://tc39.es/ecma262/#sec-string.prototype.sup\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, {\n sup: function sup() {\n return createHTML(this, 'sup', '', '');\n }\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Float32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Float32', function (init) {\n return function Float32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var toInteger = require('../internals/to-integer');\n\nmodule.exports = function (it) {\n var result = toInteger(it);\n if (result < 0) throw RangeError(\"The argument can't be less than 0\");\n return result;\n};\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Float64Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Float64', function (init) {\n return function Float64Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int8', function (init) {\n return function Int8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int16Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int16', function (init) {\n return function Int16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int32', function (init) {\n return function Int32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8ClampedArray` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8ClampedArray(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n}, true);\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint16Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint16', function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint32', function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $copyWithin = require('../internals/array-copy-within');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.copyWithin` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin\nexportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {\n return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $every = require('../internals/array-iteration').every;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.every` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every\nexportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {\n return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n return $fill.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return fromSpeciesAndList(this, list);\n});\n","var aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\nvar speciesConstructor = require('../internals/species-constructor');\n\nmodule.exports = function (instance, list) {\n var C = speciesConstructor(instance, instance.constructor);\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $find = require('../internals/array-iteration').find;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.find` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find\nexportTypedArrayMethod('find', function find(predicate /* , thisArg */) {\n return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findIndex = require('../internals/array-iteration').findIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex\nexportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {\n return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach\nexportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {\n $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar exportTypedArrayStaticMethod = require('../internals/array-buffer-view-core').exportTypedArrayStaticMethod;\nvar typedArrayFrom = require('../internals/typed-array-from');\n\n// `%TypedArray%.from` method\n// https://tc39.es/ecma262/#sec-%typedarray%.from\nexportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $includes = require('../internals/array-includes').includes;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.includes` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes\nexportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {\n return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $indexOf = require('../internals/array-includes').indexOf;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof\nexportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {\n return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = ArrayIterators.values;\nvar arrayKeys = ArrayIterators.keys;\nvar arrayEntries = ArrayIterators.entries;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];\n\nvar CORRECT_ITER_NAME = !!nativeTypedArrayIterator\n && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);\n\nvar typedArrayValues = function values() {\n return arrayValues.call(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = [].join;\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('join', function join(separator) {\n return $join.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $lastIndexOf = require('../internals/array-last-index-of');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.lastIndexOf` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {\n return $lastIndexOf.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);\n });\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\n\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayStaticMethod = ArrayBufferViewCore.exportTypedArrayStaticMethod;\n\n// `%TypedArray%.of` method\n// https://tc39.es/ecma262/#sec-%typedarray%.of\nexportTypedArrayStaticMethod('of', function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = new (aTypedArrayConstructor(this))(length);\n while (length > index) result[index] = arguments[index++];\n return result;\n}, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduce = require('../internals/array-reduce').left;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce\nexportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {\n return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduceRight = require('../internals/array-reduce').right;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduceRicht` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright\nexportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {\n return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toOffset = require('../internals/to-offset');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).set({});\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $slice = [].slice;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = $slice.call(aTypedArray(this), start, end);\n var C = speciesConstructor(this, this.constructor);\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $some = require('../internals/array-iteration').some;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.some` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some\nexportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {\n return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $sort = [].sort;\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n return $sort.call(aTypedArray(this), comparefn);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.subarray` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray\nexportTypedArrayMethod('subarray', function subarray(begin, end) {\n var O = aTypedArray(this);\n var length = O.length;\n var beginIndex = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O.constructor))(\n O.buffer,\n O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)\n );\n});\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\nvar $slice = [].slice;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);\n}, FORCED);\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return arrayJoin.call(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar microtask = require('../internals/microtask');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar process = global.process;\n\n// `queueMicrotask` method\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask\n$({ global: true, enumerable: true, noTargetGet: true }, {\n queueMicrotask: function queueMicrotask(fn) {\n var domain = IS_NODE && process.domain;\n microtask(domain ? domain.bind(fn) : fn);\n }\n});\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar global = require('../internals/global');\nvar defineProperties = require('../internals/object-define-properties');\nvar redefine = require('../internals/redefine');\nvar anInstance = require('../internals/an-instance');\nvar has = require('../internals/has');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/string-punycode-to-ascii');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar URLSearchParamsModule = require('../modules/web.url-search-params');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\n// eslint-disable-next-line regexp/no-obscure-range -- safe\nvar ALPHANUMERIC = /[\\d+-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^(0x|0X)/;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n/* eslint-disable no-control-regex -- safe */\nvar FORBIDDEN_HOST_CODE_POINT = /[\\0\\t\\n\\r #%/:?@[\\\\]]/;\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\0\\t\\n\\r #/:?@[\\\\]]/;\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u001F ]+|[\\u0000-\\u001F ]+$/g;\nvar TAB_AND_NEW_LINE = /[\\t\\n\\r]/g;\n/* eslint-enable no-control-regex -- safe */\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var char = function () {\n return input.charAt(pointer);\n };\n\n if (char() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (char()) {\n if (pieceIndex == 8) return;\n if (char() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(char())) {\n value = value * 16 + parseInt(char(), 16);\n pointer++;\n length++;\n }\n if (char() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (char()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (char() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(char())) return;\n while (DIGIT.test(char())) {\n number = parseInt(char(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (char() == ':') {\n pointer++;\n if (!char()) return;\n } else if (char()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (char, set) {\n var code = codeAt(char, 0);\n return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, char, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n char = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (char && ALPHA.test(char)) {\n buffer += char.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {\n buffer += char.toLowerCase();\n } else if (char == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && char == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (char == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (char == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (char == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '/' || (char == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (char == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (char == '/' || char == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (char == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (char != '/' && char != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (char == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += char;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (char == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (char == '[') seenBracket = true;\n else if (char == ']') seenBracket = false;\n buffer += char;\n } break;\n\n case PORT:\n if (DIGIT.test(char)) {\n buffer += char;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (char == '/' || char == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (char == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (char == '/' || char == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (char == EOF || char == '/' || char == '\\\\' || char == '?' || char == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += char;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (char != '/' && char != '\\\\') continue;\n } else if (!stateOverride && char == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n state = PATH;\n if (char != '/') continue;\n } break;\n\n case PATH:\n if (\n char == EOF || char == '/' ||\n (char == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (char == '?' || char == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(char, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n if (char == \"'\" && isSpecial(url)) url.query += '%27';\n else if (char == '#') url.query += '%23';\n else url.query += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = String(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, String(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URLConstructor(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = String(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, String(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = String(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, pathname + '', PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = String(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = String(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n","'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements -- TODO\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to , but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n","var anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (it) {\n var iteratorMethod = getIteratorMethod(it);\n if (typeof iteratorMethod != 'function') {\n throw TypeError(String(it) + ' is not iterable');\n } return anObject(iteratorMethod.call(it));\n};\n","'use strict';\nvar $ = require('../internals/export');\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\n$({ target: 'URL', proto: true, enumerable: true }, {\n toJSON: function toJSON() {\n return URL.prototype.toString.call(this);\n }\n});\n","var baseIsEqualDeep = require(\"./_baseIsEqualDeep\"),\n isObjectLike = require(\"./isObjectLike\");\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n\n\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n\n if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {\n return value !== value && other !== other;\n }\n\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;","var Stack = require(\"./_Stack\"),\n equalArrays = require(\"./_equalArrays\"),\n equalByTag = require(\"./_equalByTag\"),\n equalObjects = require(\"./_equalObjects\"),\n getTag = require(\"./_getTag\"),\n isArray = require(\"./isArray\"),\n isBuffer = require(\"./isBuffer\"),\n isTypedArray = require(\"./isTypedArray\");\n/** Used to compose bitmasks for value comparisons. */\n\n\nvar COMPARE_PARTIAL_FLAG = 1;\n/** `Object#toString` result references. */\n\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n/** Used for built-in method references. */\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n\n objIsArr = true;\n objIsObj = false;\n }\n\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack());\n return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n stack || (stack = new Stack());\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n\n if (!isSameTag) {\n return false;\n }\n\n stack || (stack = new Stack());\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;","var assocIndexOf = require(\"./_assocIndexOf\");\n/** Used for built-in method references. */\n\n\nvar arrayProto = Array.prototype;\n/** Built-in value references. */\n\nvar splice = arrayProto.splice;\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n\n var lastIndex = data.length - 1;\n\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;","var assocIndexOf = require(\"./_assocIndexOf\");\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;","var assocIndexOf = require(\"./_assocIndexOf\");\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;","var assocIndexOf = require(\"./_assocIndexOf\");\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n\n\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n\n return this;\n}\n\nmodule.exports = listCacheSet;","var ListCache = require(\"./_ListCache\");\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n\n\nfunction stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}\n\nmodule.exports = stackClear;","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;","var ListCache = require(\"./_ListCache\"),\n Map = require(\"./_Map\"),\n MapCache = require(\"./_MapCache\");\n/** Used as the size to enable large array optimizations. */\n\n\nvar LARGE_ARRAY_SIZE = 200;\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n\nfunction stackSet(key, value) {\n var data = this.__data__;\n\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n\n if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n\n data = this.__data__ = new MapCache(pairs);\n }\n\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;","var isFunction = require(\"./isFunction\"),\n isMasked = require(\"./_isMasked\"),\n isObject = require(\"./isObject\"),\n toSource = require(\"./_toSource\");\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n\n\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n/** Used to detect host constructors (Safari). */\n\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n/** Used for built-in method references. */\n\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Used to detect if a method is native. */\n\nvar reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;","var _Symbol = require(\"./_Symbol\");\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar nativeObjectToString = objectProto.toString;\n/** Built-in value references. */\n\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n\n return result;\n}\n\nmodule.exports = getRawTag;","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar nativeObjectToString = objectProto.toString;\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;","var coreJsData = require(\"./_coreJsData\");\n/** Used to detect methods masquerading as native. */\n\n\nvar maskSrcKey = function () {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? 'Symbol(src)_1.' + uid : '';\n}();\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n\n\nfunction isMasked(func) {\n return !!maskSrcKey && maskSrcKey in func;\n}\n\nmodule.exports = isMasked;","var root = require(\"./_root\");\n/** Used to detect overreaching core-js shims. */\n\n\nvar coreJsData = root['__core-js_shared__'];\nmodule.exports = coreJsData;","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;","var Hash = require(\"./_Hash\"),\n ListCache = require(\"./_ListCache\"),\n Map = require(\"./_Map\");\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n\n\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n}\n\nmodule.exports = mapCacheClear;","var hashClear = require(\"./_hashClear\"),\n hashDelete = require(\"./_hashDelete\"),\n hashGet = require(\"./_hashGet\"),\n hashHas = require(\"./_hashHas\"),\n hashSet = require(\"./_hashSet\");\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\n\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n} // Add methods to `Hash`.\n\n\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\nmodule.exports = Hash;","var nativeCreate = require(\"./_nativeCreate\");\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n\n\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;","var nativeCreate = require(\"./_nativeCreate\");\n/** Used to stand-in for `undefined` hash values. */\n\n\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n/** Used for built-in method references. */\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\nfunction hashGet(key) {\n var data = this.__data__;\n\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;","var nativeCreate = require(\"./_nativeCreate\");\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;","var nativeCreate = require(\"./_nativeCreate\");\n/** Used to stand-in for `undefined` hash values. */\n\n\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;","var getMapData = require(\"./_getMapData\");\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\n\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = _typeof(value);\n\n return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;\n}\n\nmodule.exports = isKeyable;","var getMapData = require(\"./_getMapData\");\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;","var getMapData = require(\"./_getMapData\");\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;","var getMapData = require(\"./_getMapData\");\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n\n\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;","var MapCache = require(\"./_MapCache\"),\n setCacheAdd = require(\"./_setCacheAdd\"),\n setCacheHas = require(\"./_setCacheHas\");\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n\n\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n this.__data__ = new MapCache();\n\n while (++index < length) {\n this.add(values[index]);\n }\n} // Add methods to `SetCache`.\n\n\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\nmodule.exports = SetCache;","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n\n return this;\n}\n\nmodule.exports = setCacheAdd;","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n\n return false;\n}\n\nmodule.exports = arraySome;","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;","var _Symbol = require(\"./_Symbol\"),\n Uint8Array = require(\"./_Uint8Array\"),\n eq = require(\"./eq\"),\n equalArrays = require(\"./_equalArrays\"),\n mapToArray = require(\"./_mapToArray\"),\n setToArray = require(\"./_setToArray\");\n/** Used to compose bitmasks for value comparisons. */\n\n\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n/** `Object#toString` result references. */\n\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n/** Used to convert symbols to primitives and strings. */\n\nvar symbolProto = _Symbol ? _Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {\n return false;\n }\n\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == other + '';\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n } // Assume cyclic values are equal.\n\n\n var stacked = stack.get(object);\n\n if (stacked) {\n return stacked == other;\n }\n\n bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits).\n\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n\n }\n\n return false;\n}\n\nmodule.exports = equalByTag;","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n map.forEach(function (value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n set.forEach(function (value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;","var getAllKeys = require(\"./_getAllKeys\");\n/** Used to compose bitmasks for value comparisons. */\n\n\nvar COMPARE_PARTIAL_FLAG = 1;\n/** Used for built-in method references. */\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n\n var index = objLength;\n\n while (index--) {\n var key = objProps[index];\n\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n } // Check that cyclic values are equal.\n\n\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n var skipCtor = isPartial;\n\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);\n } // Recursively compare objects (susceptible to call stack limits).\n\n\n if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {\n result = false;\n break;\n }\n\n skipCtor || (skipCtor = key == 'constructor');\n }\n\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal.\n\n if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;","var baseGetAllKeys = require(\"./_baseGetAllKeys\"),\n getSymbols = require(\"./_getSymbols\"),\n keys = require(\"./keys\");\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n\n\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;","var arrayPush = require(\"./_arrayPush\"),\n isArray = require(\"./isArray\");\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n\n\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n\n return array;\n}\n\nmodule.exports = arrayPush;","var arrayFilter = require(\"./_arrayFilter\"),\n stubArray = require(\"./stubArray\");\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Built-in value references. */\n\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n\nvar getSymbols = !nativeGetSymbols ? stubArray : function (object) {\n if (object == null) {\n return [];\n }\n\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function (symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\nmodule.exports = getSymbols;","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n\n return result;\n}\n\nmodule.exports = arrayFilter;","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;","var arrayLikeKeys = require(\"./_arrayLikeKeys\"),\n baseKeys = require(\"./_baseKeys\"),\n isArrayLike = require(\"./isArrayLike\");\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n\n\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n\n return result;\n}\n\nmodule.exports = baseTimes;","var baseGetTag = require(\"./_baseGetTag\"),\n isObjectLike = require(\"./isObjectLike\");\n/** `Object#toString` result references. */\n\n\nvar argsTag = '[object Arguments]';\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;","var baseGetTag = require(\"./_baseGetTag\"),\n isLength = require(\"./isLength\"),\n isObjectLike = require(\"./isObjectLike\");\n/** `Object#toString` result references. */\n\n\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n/** Used to identify `toStringTag` values of typed arrays. */\n\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function (value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar freeGlobal = require(\"./_freeGlobal\");\n/** Detect free variable `exports`. */\n\n\nvar freeExports = (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n/** Detect free variable `module`. */\n\nvar freeModule = freeExports && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) == 'object' && module && !module.nodeType && module;\n/** Detect the popular CommonJS extension `module.exports`. */\n\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n/** Detect free variable `process` from Node.js. */\n\nvar freeProcess = moduleExports && freeGlobal.process;\n/** Used to access faster Node.js helpers. */\n\nvar nodeUtil = function () {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n } // Legacy `process.binding('util')` for Node.js < 10.\n\n\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}();\n\nmodule.exports = nodeUtil;","var isPrototype = require(\"./_isPrototype\"),\n nativeKeys = require(\"./_nativeKeys\");\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n\n var result = [];\n\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n\n return result;\n}\n\nmodule.exports = baseKeys;","var overArg = require(\"./_overArg\");\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\n\nvar nativeKeys = overArg(Object.keys, Object);\nmodule.exports = nativeKeys;","var DataView = require(\"./_DataView\"),\n Map = require(\"./_Map\"),\n Promise = require(\"./_Promise\"),\n Set = require(\"./_Set\"),\n WeakMap = require(\"./_WeakMap\"),\n baseGetTag = require(\"./_baseGetTag\"),\n toSource = require(\"./_toSource\");\n/** `Object#toString` result references. */\n\n\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\nvar dataViewTag = '[object DataView]';\n/** Used to detect maps, sets, and weakmaps. */\n\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n\nvar getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n\nif (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {\n getTag = function getTag(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString:\n return dataViewTag;\n\n case mapCtorString:\n return mapTag;\n\n case promiseCtorString:\n return promiseTag;\n\n case setCtorString:\n return setTag;\n\n case weakMapCtorString:\n return weakMapTag;\n }\n }\n\n return result;\n };\n}\n\nmodule.exports = getTag;","var getNative = require(\"./_getNative\"),\n root = require(\"./_root\");\n/* Built-in method references that are verified to be native. */\n\n\nvar DataView = getNative(root, 'DataView');\nmodule.exports = DataView;","var getNative = require(\"./_getNative\"),\n root = require(\"./_root\");\n/* Built-in method references that are verified to be native. */\n\n\nvar Promise = getNative(root, 'Promise');\nmodule.exports = Promise;","var getNative = require(\"./_getNative\"),\n root = require(\"./_root\");\n/* Built-in method references that are verified to be native. */\n\n\nvar Set = getNative(root, 'Set');\nmodule.exports = Set;","var getNative = require(\"./_getNative\"),\n root = require(\"./_root\");\n/* Built-in method references that are verified to be native. */\n\n\nvar WeakMap = getNative(root, 'WeakMap');\nmodule.exports = WeakMap;","var Stack = require(\"./_Stack\"),\n assignMergeValue = require(\"./_assignMergeValue\"),\n baseFor = require(\"./_baseFor\"),\n baseMergeDeep = require(\"./_baseMergeDeep\"),\n isObject = require(\"./isObject\"),\n keysIn = require(\"./keysIn\"),\n safeGet = require(\"./_safeGet\");\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n\n\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n\n baseFor(source, function (srcValue, key) {\n stack || (stack = new Stack());\n\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n } else {\n var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + '', object, source, stack) : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;","var createBaseFor = require(\"./_createBaseFor\");\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n\n\nvar baseFor = createBaseFor();\nmodule.exports = baseFor;","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function (object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n\n return object;\n };\n}\n\nmodule.exports = createBaseFor;","var assignMergeValue = require(\"./_assignMergeValue\"),\n cloneBuffer = require(\"./_cloneBuffer\"),\n cloneTypedArray = require(\"./_cloneTypedArray\"),\n copyArray = require(\"./_copyArray\"),\n initCloneObject = require(\"./_initCloneObject\"),\n isArguments = require(\"./isArguments\"),\n isArray = require(\"./isArray\"),\n isArrayLikeObject = require(\"./isArrayLikeObject\"),\n isBuffer = require(\"./isBuffer\"),\n isFunction = require(\"./isFunction\"),\n isObject = require(\"./isObject\"),\n isPlainObject = require(\"./isPlainObject\"),\n isTypedArray = require(\"./isTypedArray\"),\n safeGet = require(\"./_safeGet\"),\n toPlainObject = require(\"./toPlainObject\");\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n\n\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n\n var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined;\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n newValue = srcValue;\n\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n } else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n } else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n } else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n } else {\n newValue = [];\n }\n } else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n } else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n } else {\n isCommon = false;\n }\n }\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar root = require(\"./_root\");\n/** Detect free variable `exports`. */\n\n\nvar freeExports = (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n/** Detect free variable `module`. */\n\nvar freeModule = freeExports && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) == 'object' && module && !module.nodeType && module;\n/** Detect the popular CommonJS extension `module.exports`. */\n\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n/** Built-in value references. */\n\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;","var cloneArrayBuffer = require(\"./_cloneArrayBuffer\");\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n\n\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;","var Uint8Array = require(\"./_Uint8Array\");\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n\n\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n array || (array = Array(length));\n\n while (++index < length) {\n array[index] = source[index];\n }\n\n return array;\n}\n\nmodule.exports = copyArray;","var baseCreate = require(\"./_baseCreate\"),\n getPrototype = require(\"./_getPrototype\"),\n isPrototype = require(\"./_isPrototype\");\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n\n\nfunction initCloneObject(object) {\n return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};\n}\n\nmodule.exports = initCloneObject;","var isObject = require(\"./isObject\");\n/** Built-in value references. */\n\n\nvar objectCreate = Object.create;\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n\nvar baseCreate = function () {\n function object() {}\n\n return function (proto) {\n if (!isObject(proto)) {\n return {};\n }\n\n if (objectCreate) {\n return objectCreate(proto);\n }\n\n object.prototype = proto;\n var result = new object();\n object.prototype = undefined;\n return result;\n };\n}();\n\nmodule.exports = baseCreate;","var isArrayLike = require(\"./isArrayLike\"),\n isObjectLike = require(\"./isObjectLike\");\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n\n\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;","var baseGetTag = require(\"./_baseGetTag\"),\n getPrototype = require(\"./_getPrototype\"),\n isObjectLike = require(\"./isObjectLike\");\n/** `Object#toString` result references. */\n\n\nvar objectTag = '[object Object]';\n/** Used for built-in method references. */\n\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Used to infer the `Object` constructor. */\n\nvar objectCtorString = funcToString.call(Object);\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n\n var proto = getPrototype(value);\n\n if (proto === null) {\n return true;\n }\n\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;","var copyObject = require(\"./_copyObject\"),\n keysIn = require(\"./keysIn\");\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n\n\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;","var assignValue = require(\"./_assignValue\"),\n baseAssignValue = require(\"./_baseAssignValue\");\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n\n\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n\n return object;\n}\n\nmodule.exports = copyObject;","var baseAssignValue = require(\"./_baseAssignValue\"),\n eq = require(\"./eq\");\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;","var isObject = require(\"./isObject\"),\n isPrototype = require(\"./_isPrototype\"),\n nativeKeysIn = require(\"./_nativeKeysIn\");\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n\n return result;\n}\n\nmodule.exports = baseKeysIn;","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n\n return result;\n}\n\nmodule.exports = nativeKeysIn;","var baseRest = require(\"./_baseRest\"),\n isIterateeCall = require(\"./_isIterateeCall\");\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n\n\nfunction createAssigner(assigner) {\n return baseRest(function (object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n\n object = Object(object);\n\n while (++index < length) {\n var source = sources[index];\n\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n\n return object;\n });\n}\n\nmodule.exports = createAssigner;","var identity = require(\"./identity\"),\n overRest = require(\"./_overRest\"),\n setToString = require(\"./_setToString\");\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n\n\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;","var apply = require(\"./_apply\");\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\n\nvar nativeMax = Math.max;\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? func.length - 1 : start, 0);\n return function () {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n\n index = -1;\n var otherArgs = Array(start + 1);\n\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0:\n return func.call(thisArg);\n\n case 1:\n return func.call(thisArg, args[0]);\n\n case 2:\n return func.call(thisArg, args[0], args[1]);\n\n case 3:\n return func.call(thisArg, args[0], args[1], args[2]);\n }\n\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;","var baseSetToString = require(\"./_baseSetToString\"),\n shortOut = require(\"./_shortOut\");\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n\n\nvar setToString = shortOut(baseSetToString);\nmodule.exports = setToString;","var constant = require(\"./constant\"),\n defineProperty = require(\"./_defineProperty\"),\n identity = require(\"./identity\");\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n\n\nvar baseSetToString = !defineProperty ? identity : function (func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\nmodule.exports = baseSetToString;","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function () {\n return value;\n };\n}\n\nmodule.exports = constant;","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeNow = Date.now;\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n return function () {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n lastCalled = stamp;\n\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar eq = require(\"./eq\"),\n isArrayLike = require(\"./isArrayLike\"),\n isIndex = require(\"./_isIndex\"),\n isObject = require(\"./isObject\");\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n\n\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n\n var type = _typeof(index);\n\n if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {\n return eq(object[index], value);\n }\n\n return false;\n}\n\nmodule.exports = isIterateeCall;","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./materialize_form.vue?vue&type=style&index=0&id=2aa58c5c&lang=scss&scoped=true&\"","function _typeof2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _typeof = typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\" ? function (obj) {\n return _typeof2(obj);\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n};\n/*! flatpickr v2.6.3, @license MIT */\n\n\nfunction Flatpickr(element, config) {\n var self = this;\n self._ = {};\n self._.afterDayAnim = afterDayAnim;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self._createElement = createElement;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n\n function init() {\n self.element = self.input = element;\n self.instanceConfig = config || {};\n self.parseDate = Flatpickr.prototype.parseDate.bind(self);\n self.formatDate = Flatpickr.prototype.formatDate.bind(self);\n setupFormats();\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n self.isOpen = false;\n self.isMobile = !self.config.disableMobile && !self.config.inline && self.config.mode === \"single\" && !self.config.disable.length && !self.config.enable.length && !self.config.weekNumbers && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n if (!self.isMobile) build();\n bindEvents();\n\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj || self.config.minDate : null);\n }\n\n updateValue();\n }\n\n if (self.config.weekNumbers) {\n self.calendarContainer.style.width = self.daysContainer.offsetWidth + self.weekWrapper.offsetWidth + \"px\";\n }\n\n self.showTimeInput = self.selectedDates.length > 0 || self.config.noCalendar;\n if (!self.isMobile) positionCalendar();\n triggerEvent(\"Ready\");\n }\n /**\n * Binds a function to the current flatpickr instance\n * @param {Function} fn the function\n * @return {Function} the function bound to the instance\n */\n\n\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n /**\n * The handler for all events targeting the time inputs\n * @param {Event} e the event - \"input\", \"wheel\", \"increment\", etc\n */\n\n\n function updateTime(e) {\n if (self.config.noCalendar && !self.selectedDates.length) // picking time only\n self.selectedDates = [self.now];\n timeWrapper(e);\n if (!self.selectedDates.length) return;\n\n if (!self.minDateHasTime || e.type !== \"input\" || e.target.value.length >= 2) {\n setHoursFromInputs();\n updateValue();\n } else {\n setTimeout(function () {\n setHoursFromInputs();\n updateValue();\n }, 1000);\n }\n }\n /**\n * Syncs the selected date object time with user's time input\n */\n\n\n function setHoursFromInputs() {\n if (!self.config.enableTime) return;\n var hours = (parseInt(self.hourElement.value, 10) || 0) % (self.amPM ? 12 : 24),\n minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60,\n seconds = self.config.enableSeconds ? (parseInt(self.secondElement.value, 10) || 0) % 60 : 0;\n if (self.amPM !== undefined) hours = hours % 12 + 12 * (self.amPM.textContent === \"PM\");\n\n if (self.minDateHasTime && compareDates(self.latestSelectedDateObj, self.config.minDate) === 0) {\n hours = Math.max(hours, self.config.minDate.getHours());\n if (hours === self.config.minDate.getHours()) minutes = Math.max(minutes, self.config.minDate.getMinutes());\n }\n\n if (self.maxDateHasTime && compareDates(self.latestSelectedDateObj, self.config.maxDate) === 0) {\n hours = Math.min(hours, self.config.maxDate.getHours());\n if (hours === self.config.maxDate.getHours()) minutes = Math.min(minutes, self.config.maxDate.getMinutes());\n }\n\n setHours(hours, minutes, seconds);\n }\n /**\n * Syncs time input values with a date\n * @param {Date} dateObj the date to sync with\n */\n\n\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date) setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n /**\n * Sets the hours, minutes, and optionally seconds\n * of the latest selected date object and the\n * corresponding time inputs\n * @param {Number} hours the hour. whether its military\n * or am-pm gets inferred from config\n * @param {Number} minutes the minutes\n * @param {Number} seconds the seconds (optional)\n */\n\n\n function setHours(hours, minutes, seconds) {\n if (self.selectedDates.length) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n\n if (!self.config.enableTime || self.isMobile) return;\n self.hourElement.value = self.pad(!self.config.time_24hr ? (12 + hours) % 12 + 12 * (hours % 12 === 0) : hours);\n self.minuteElement.value = self.pad(minutes);\n if (!self.config.time_24hr) self.amPM.textContent = hours >= 12 ? \"PM\" : \"AM\";\n if (self.config.enableSeconds === true) self.secondElement.value = self.pad(seconds);\n }\n /**\n * Handles the year input and incrementing events\n * @param {Event} event the keyup or increment event\n */\n\n\n function onYearInput(event) {\n var year = event.target.value;\n if (event.delta) year = (parseInt(year) + event.delta).toString();\n\n if (year.length === 4 || event.key === \"Enter\") {\n self.currentYearElement.blur();\n if (!/[^\\d]/.test(year)) changeYear(year);\n }\n }\n /**\n * Essentially addEventListener + tracking\n * @param {Element} element the element to addEventListener to\n * @param {String} event the event name\n * @param {Function} handler the event handler\n */\n\n\n function bind(element, event, handler) {\n if (event instanceof Array) return event.forEach(function (ev) {\n return bind(element, ev, handler);\n });\n if (element instanceof Array) return element.forEach(function (el) {\n return bind(el, event, handler);\n });\n element.addEventListener(event, handler);\n\n self._handlers.push({\n element: element,\n event: event,\n handler: handler\n });\n }\n /**\n * A mousedown handler which mimics click.\n * Minimizes latency, since we don't need to wait for mouseup in most cases.\n * Also, avoids handling right clicks.\n *\n * @param {Function} handler the event handler\n */\n\n\n function onClick(handler) {\n return function (evt) {\n return evt.which === 1 && handler(evt);\n };\n }\n /**\n * Adds all the necessary event listeners\n */\n\n\n function bindEvents() {\n self._handlers = [];\n self._animationLoop = [];\n\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"mousedown\", onClick(self[evt]));\n });\n });\n }\n\n if (self.isMobile) return setupMobile();\n self.debouncedResize = debounce(onResize, 50);\n\n self.triggerChange = function () {\n triggerEvent(\"Change\");\n };\n\n self.debouncedChange = debounce(self.triggerChange, 300);\n if (self.config.mode === \"range\" && self.daysContainer) bind(self.daysContainer, \"mouseover\", function (e) {\n return onMouseOver(e.target);\n });\n bind(window.document.body, \"keydown\", onKeyDown);\n if (!self.config.static) bind(self._input, \"keydown\", onKeyDown);\n if (!self.config.inline && !self.config.static) bind(window, \"resize\", self.debouncedResize);\n if (window.ontouchstart !== undefined) bind(window.document, \"touchstart\", documentClick);\n bind(window.document, \"mousedown\", onClick(documentClick));\n bind(self._input, \"blur\", documentClick);\n if (self.config.clickOpens === true) bind(self._input, \"focus\", self.open);\n\n if (!self.config.noCalendar) {\n self.monthNav.addEventListener(\"wheel\", function (e) {\n return e.preventDefault();\n });\n bind(self.monthNav, \"wheel\", debounce(onMonthNavScroll, 10));\n bind(self.monthNav, \"mousedown\", onClick(onMonthNavClick));\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"mousedown\", onClick(selectDate));\n\n if (self.config.animate) {\n bind(self.daysContainer, [\"webkitAnimationEnd\", \"animationend\"], animateDays);\n bind(self.monthNav, [\"webkitAnimationEnd\", \"animationend\"], animateMonths);\n }\n }\n\n if (self.config.enableTime) {\n var selText = function selText(e) {\n return e.target.select();\n };\n\n bind(self.timeContainer, [\"wheel\", \"input\", \"increment\"], updateTime);\n bind(self.timeContainer, \"mousedown\", onClick(timeIncrement));\n bind(self.timeContainer, [\"wheel\", \"increment\"], self.debouncedChange);\n bind(self.timeContainer, \"input\", self.triggerChange);\n bind([self.hourElement, self.minuteElement], \"focus\", selText);\n if (self.secondElement !== undefined) bind(self.secondElement, \"focus\", function () {\n return self.secondElement.select();\n });\n\n if (self.amPM !== undefined) {\n bind(self.amPM, \"mousedown\", onClick(function (e) {\n updateTime(e);\n self.triggerChange(e);\n }));\n }\n }\n }\n\n function processPostDayAnimation() {\n for (var i = self._animationLoop.length; i--;) {\n self._animationLoop[i]();\n\n self._animationLoop.splice(i, 1);\n }\n }\n /**\n * Removes the day container that slided out of view\n * @param {Event} e the animation event\n */\n\n\n function animateDays(e) {\n if (self.daysContainer.childNodes.length > 1) {\n switch (e.animationName) {\n case \"fpSlideLeft\":\n self.daysContainer.lastChild.classList.remove(\"slideLeftNew\");\n self.daysContainer.removeChild(self.daysContainer.firstChild);\n self.days = self.daysContainer.firstChild;\n processPostDayAnimation();\n break;\n\n case \"fpSlideRight\":\n self.daysContainer.firstChild.classList.remove(\"slideRightNew\");\n self.daysContainer.removeChild(self.daysContainer.lastChild);\n self.days = self.daysContainer.firstChild;\n processPostDayAnimation();\n break;\n\n default:\n break;\n }\n }\n }\n /**\n * Removes the month element that animated out of view\n * @param {Event} e the animation event\n */\n\n\n function animateMonths(e) {\n switch (e.animationName) {\n case \"fpSlideLeftNew\":\n case \"fpSlideRightNew\":\n self.navigationCurrentMonth.classList.remove(\"slideLeftNew\");\n self.navigationCurrentMonth.classList.remove(\"slideRightNew\");\n var nav = self.navigationCurrentMonth;\n\n while (nav.nextSibling && /curr/.test(nav.nextSibling.className)) {\n self.monthNav.removeChild(nav.nextSibling);\n }\n\n while (nav.previousSibling && /curr/.test(nav.previousSibling.className)) {\n self.monthNav.removeChild(nav.previousSibling);\n }\n\n self.oldCurMonth = null;\n break;\n }\n }\n /**\n * Set the calendar view to a particular date.\n * @param {Date} jumpDate the date to set the view to\n */\n\n\n function jumpToDate(jumpDate) {\n jumpDate = jumpDate ? self.parseDate(jumpDate) : self.latestSelectedDateObj || (self.config.minDate > self.now ? self.config.minDate : self.config.maxDate && self.config.maxDate < self.now ? self.config.maxDate : self.now);\n\n try {\n self.currentYear = jumpDate.getFullYear();\n self.currentMonth = jumpDate.getMonth();\n } catch (e) {\n /* istanbul ignore next */\n console.error(e.stack);\n /* istanbul ignore next */\n\n console.warn(\"Invalid date supplied: \" + jumpDate);\n }\n\n self.redraw();\n }\n /**\n * The up/down arrow handler for time inputs\n * @param {Event} e the click event\n */\n\n\n function timeIncrement(e) {\n if (~e.target.className.indexOf(\"arrow\")) incrementNumInput(e, e.target.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n /**\n * Increments/decrements the value of input associ-\n * ated with the up/down arrow by dispatching an\n * \"increment\" event on the input.\n *\n * @param {Event} e the click event\n * @param {Number} delta the diff (usually 1 or -1)\n * @param {Element} inputElem the input element\n */\n\n\n function incrementNumInput(e, delta, inputElem) {\n var input = inputElem || e.target.parentNode.childNodes[0];\n var event = createEvent(\"increment\");\n event.delta = delta;\n input.dispatchEvent(event);\n }\n\n function createNumberInput(inputClassName) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"),\n numInput = createElement(\"input\", \"numInput \" + inputClassName),\n arrowUp = createElement(\"span\", \"arrowUp\"),\n arrowDown = createElement(\"span\", \"arrowDown\");\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n }\n\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) self.innerContainer.appendChild(buildWeeks());\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n\n if (self.config.enableTime) fragment.appendChild(buildTime());\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo && self.config.appendTo.nodeType;\n\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n\n if (self.config.inline && !customAppend) {\n return self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n }\n\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput) wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n return;\n }\n }\n\n (customAppend ? self.config.appendTo : window.document.body).appendChild(self.calendarContainer);\n }\n\n function createDay(className, date, dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true),\n dayElement = createElement(\"span\", \"flatpickr-day \" + className, date.getDate());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n\n if (compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n }\n\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", compareDates(date, self.selectedDates[0]) === 0);\n toggleClass(dayElement, \"endRange\", compareDates(date, self.selectedDates[1]) === 0);\n }\n }\n } else {\n dayElement.classList.add(\"disabled\");\n if (self.selectedDates[0] && date > self.minRangeDate && date < self.selectedDates[0]) self.minRangeDate = date;else if (self.selectedDates[0] && date < self.maxRangeDate && date > self.selectedDates[0]) self.maxRangeDate = date;\n }\n\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date)) dayElement.classList.add(\"inRange\");\n if (self.selectedDates.length === 1 && (date < self.minRangeDate || date > self.maxRangeDate)) dayElement.classList.add(\"notAllowed\");\n }\n\n if (self.config.weekNumbers && className !== \"prevMonthDay\" && dayNumber % 7 === 1) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \" \");\n }\n\n triggerEvent(\"DayCreate\", dayElement);\n return dayElement;\n }\n\n function focusOnDay(currentIndex, offset) {\n var newIndex = currentIndex + offset || 0,\n targetNode = currentIndex !== undefined ? self.days.childNodes[newIndex] : self.selectedDateElem || self.todayDateElem || self.days.childNodes[0],\n focus = function focus() {\n targetNode = targetNode || self.days.childNodes[newIndex];\n targetNode.focus();\n if (self.config.mode === \"range\") onMouseOver(targetNode);\n };\n\n if (targetNode === undefined && offset !== 0) {\n if (offset > 0) {\n self.changeMonth(1);\n newIndex = newIndex % 42;\n } else if (offset < 0) {\n self.changeMonth(-1);\n newIndex += 42;\n }\n\n return afterDayAnim(focus);\n }\n\n focus();\n }\n\n function afterDayAnim(fn) {\n if (self.config.animate === true) return self._animationLoop.push(fn);\n fn();\n }\n\n function buildDays(delta) {\n var firstOfMonth = (new Date(self.currentYear, self.currentMonth, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7,\n isRangeMode = self.config.mode === \"range\";\n self.prevMonthDays = self.utils.getDaysinMonth((self.currentMonth - 1 + 12) % 12);\n self.selectedDateElem = undefined;\n self.todayDateElem = undefined;\n var daysInMonth = self.utils.getDaysinMonth(),\n days = window.document.createDocumentFragment();\n var dayNumber = self.prevMonthDays + 1 - firstOfMonth,\n dayIndex = 0;\n if (self.config.weekNumbers && self.weekNumbers.firstChild) self.weekNumbers.textContent = \"\";\n\n if (isRangeMode) {\n // const dateLimits = self.config.enable.length || self.config.disable.length || self.config.mixDate || self.config.maxDate;\n self.minRangeDate = new Date(self.currentYear, self.currentMonth - 1, dayNumber);\n self.maxRangeDate = new Date(self.currentYear, self.currentMonth + 1, (42 - firstOfMonth) % daysInMonth);\n } // prepend days from the ending of previous month\n\n\n for (; dayNumber <= self.prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"prevMonthDay\", new Date(self.currentYear, self.currentMonth - 1, dayNumber), dayNumber, dayIndex));\n } // Start at 1 since there is no 0th day\n\n\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"\", new Date(self.currentYear, self.currentMonth, dayNumber), dayNumber, dayIndex));\n } // append days from the next month\n\n\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth; dayNum++, dayIndex++) {\n days.appendChild(createDay(\"nextMonthDay\", new Date(self.currentYear, self.currentMonth + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n\n if (isRangeMode && self.selectedDates.length === 1 && days.childNodes[0]) {\n self._hidePrevMonthArrow = self._hidePrevMonthArrow || self.minRangeDate > days.childNodes[0].dateObj;\n self._hideNextMonthArrow = self._hideNextMonthArrow || self.maxRangeDate < new Date(self.currentYear, self.currentMonth + 1, 1);\n } else updateNavigationCurrentMonth();\n\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n if (!self.config.animate || delta === undefined) clearNode(self.daysContainer);else {\n while (self.daysContainer.childNodes.length > 1) {\n self.daysContainer.removeChild(self.daysContainer.firstChild);\n }\n }\n if (delta >= 0) self.daysContainer.appendChild(dayContainer);else self.daysContainer.insertBefore(dayContainer, self.daysContainer.firstChild);\n self.days = self.daysContainer.firstChild;\n return self.daysContainer;\n }\n\n function clearNode(node) {\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n }\n\n function buildMonthNav() {\n var monthNavFragment = window.document.createDocumentFragment();\n self.monthNav = createElement(\"div\", \"flatpickr-month\");\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.currentMonthElement = createElement(\"span\", \"cur-month\");\n self.currentMonthElement.title = self.l10n.scrollTitle;\n var yearInput = createNumberInput(\"cur-year\");\n self.currentYearElement = yearInput.childNodes[0];\n self.currentYearElement.title = self.l10n.scrollTitle;\n if (self.config.minDate) self.currentYearElement.min = self.config.minDate.getFullYear();\n\n if (self.config.maxDate) {\n self.currentYearElement.max = self.config.maxDate.getFullYear();\n self.currentYearElement.disabled = self.config.minDate && self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n self.navigationCurrentMonth = createElement(\"span\", \"flatpickr-current-month\");\n self.navigationCurrentMonth.appendChild(self.currentMonthElement);\n self.navigationCurrentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(self.prevMonthNav);\n monthNavFragment.appendChild(self.navigationCurrentMonth);\n monthNavFragment.appendChild(self.nextMonthNav);\n self.monthNav.appendChild(monthNavFragment);\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function get() {\n return this.__hidePrevMonthArrow;\n },\n set: function set(bool) {\n if (this.__hidePrevMonthArrow !== bool) self.prevMonthNav.style.display = bool ? \"none\" : \"block\";\n this.__hidePrevMonthArrow = bool;\n }\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function get() {\n return this.__hideNextMonthArrow;\n },\n set: function set(bool) {\n if (this.__hideNextMonthArrow !== bool) self.nextMonthNav.style.display = bool ? \"none\" : \"block\";\n this.__hideNextMonthArrow = bool;\n }\n });\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar) self.calendarContainer.classList.add(\"noCalendar\");\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\");\n self.hourElement = hourInput.childNodes[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\");\n self.minuteElement = minuteInput.childNodes[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = self.pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getHours() : self.config.defaultHour);\n self.minuteElement.value = self.pad(self.latestSelectedDateObj ? self.latestSelectedDateObj.getMinutes() : self.config.defaultMinute);\n self.hourElement.step = self.config.hourIncrement;\n self.minuteElement.step = self.config.minuteIncrement;\n self.hourElement.min = self.config.time_24hr ? 0 : 1;\n self.hourElement.max = self.config.time_24hr ? 23 : 12;\n self.minuteElement.min = 0;\n self.minuteElement.max = 59;\n self.hourElement.title = self.minuteElement.title = self.l10n.scrollTitle;\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr) self.timeContainer.classList.add(\"time24hr\");\n\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.childNodes[0];\n self.secondElement.value = self.latestSelectedDateObj ? self.pad(self.latestSelectedDateObj.getSeconds()) : \"00\";\n self.secondElement.step = self.minuteElement.step;\n self.secondElement.min = self.minuteElement.min;\n self.secondElement.max = self.minuteElement.max;\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n\n if (!self.config.time_24hr) {\n // add self.amPM if appropriate\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", [\"AM\", \"PM\"][self.hourElement.value > 11 | 0]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n\n return self.timeContainer;\n }\n\n function buildWeekdays() {\n if (!self.weekdayContainer) self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = self.l10n.weekdays.shorthand.slice();\n\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = [].concat(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n\n self.weekdayContainer.innerHTML = \"\\n\\t\\t\\n\\t\\t\\t\" + weekdays.join(\" \") + \"\\n\\t\\t \\n\\t\\t\";\n return self.weekdayContainer;\n }\n /* istanbul ignore next */\n\n\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n self.weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n self.weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n self.weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n self.weekWrapper.appendChild(self.weekNumbers);\n return self.weekWrapper;\n }\n\n function changeMonth(value, is_offset, animate) {\n is_offset = is_offset === undefined || is_offset;\n var delta = is_offset ? value : value - self.currentMonth;\n var skipAnimations = !self.config.animate || animate === false;\n if (delta < 0 && self._hidePrevMonthArrow || delta > 0 && self._hideNextMonthArrow) return;\n self.currentMonth += delta;\n\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"YearChange\");\n }\n\n buildDays(!skipAnimations ? delta : undefined);\n\n if (skipAnimations) {\n triggerEvent(\"MonthChange\");\n return updateNavigationCurrentMonth();\n } // remove possible remnants from clicking too fast\n\n\n var nav = self.navigationCurrentMonth;\n\n if (delta < 0) {\n while (nav.nextSibling && /curr/.test(nav.nextSibling.className)) {\n self.monthNav.removeChild(nav.nextSibling);\n }\n } else if (delta > 0) {\n while (nav.previousSibling && /curr/.test(nav.previousSibling.className)) {\n self.monthNav.removeChild(nav.previousSibling);\n }\n }\n\n self.oldCurMonth = self.navigationCurrentMonth;\n self.navigationCurrentMonth = self.monthNav.insertBefore(self.oldCurMonth.cloneNode(true), delta > 0 ? self.oldCurMonth.nextSibling : self.oldCurMonth);\n\n if (delta > 0) {\n self.daysContainer.firstChild.classList.add(\"slideLeft\");\n self.daysContainer.lastChild.classList.add(\"slideLeftNew\");\n self.oldCurMonth.classList.add(\"slideLeft\");\n self.navigationCurrentMonth.classList.add(\"slideLeftNew\");\n } else if (delta < 0) {\n self.daysContainer.firstChild.classList.add(\"slideRightNew\");\n self.daysContainer.lastChild.classList.add(\"slideRight\");\n self.oldCurMonth.classList.add(\"slideRight\");\n self.navigationCurrentMonth.classList.add(\"slideRightNew\");\n }\n\n self.currentMonthElement = self.navigationCurrentMonth.firstChild;\n self.currentYearElement = self.navigationCurrentMonth.lastChild.childNodes[0];\n updateNavigationCurrentMonth();\n self.oldCurMonth.firstChild.textContent = self.utils.monthToStr(self.currentMonth - delta);\n triggerEvent(\"MonthChange\");\n\n if (document.activeElement && document.activeElement.$i) {\n var index = document.activeElement.$i;\n afterDayAnim(function () {\n focusOnDay(index, 0);\n });\n }\n }\n\n function clear(triggerChangeEvent) {\n self.input.value = \"\";\n if (self.altInput) self.altInput.value = \"\";\n if (self.mobileInput) self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n self.showTimeInput = false;\n self.redraw();\n if (triggerChangeEvent !== false) // triggerChangeEvent is true (default) or an Event\n triggerEvent(\"Change\");\n }\n\n function close() {\n self.isOpen = false;\n\n if (!self.isMobile) {\n self.calendarContainer.classList.remove(\"open\");\n\n self._input.classList.remove(\"active\");\n }\n\n triggerEvent(\"Close\");\n }\n\n function destroy() {\n for (var i = self._handlers.length; i--;) {\n var h = self._handlers[i];\n h.element.removeEventListener(h.event, h.handler);\n }\n\n self._handlers = [];\n\n if (self.mobileInput) {\n if (self.mobileInput.parentNode) self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = null;\n } else if (self.calendarContainer && self.calendarContainer.parentNode) self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode) self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n self.input.value = \"\";\n }\n\n [\"_showTimeInput\", \"latestSelectedDateObj\", \"_hideNextMonthArrow\", \"_hidePrevMonthArrow\", \"__hideNextMonthArrow\", \"__hidePrevMonthArrow\", \"isMobile\", \"isOpen\", \"selectedDateElem\", \"minDateHasTime\", \"maxDateHasTime\", \"days\", \"daysContainer\", \"_input\", \"_positionElement\", \"innerContainer\", \"rContainer\", \"monthNav\", \"todayDateElem\", \"calendarContainer\", \"weekdayContainer\", \"prevMonthNav\", \"nextMonthNav\", \"currentMonthElement\", \"currentYearElement\", \"navigationCurrentMonth\", \"selectedDateElem\", \"config\"].forEach(function (k) {\n return delete self[k];\n });\n }\n\n function isCalendarElem(elem) {\n if (self.config.appendTo && self.config.appendTo.contains(elem)) return true;\n return self.calendarContainer.contains(elem);\n }\n\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var isCalendarElement = isCalendarElem(e.target);\n var isInput = e.target === self.input || e.target === self.altInput || self.element.contains(e.target) || // web components\n e.path && e.path.indexOf && (~e.path.indexOf(self.input) || ~e.path.indexOf(self.altInput));\n var lostFocus = e.type === \"blur\" ? isInput && e.relatedTarget && !isCalendarElem(e.relatedTarget) : !isInput && !isCalendarElement;\n\n if (lostFocus) {\n e.preventDefault();\n self.close();\n\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n self.clear(false);\n self.redraw();\n }\n }\n }\n }\n\n function changeYear(newYear) {\n if (!newYear || self.currentYearElement.min && newYear < self.currentYearElement.min || self.currentYearElement.max && newYear > self.currentYearElement.max) return;\n var newYearNum = parseInt(newYear, 10),\n isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n\n if (self.config.maxDate && self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n } else if (self.config.minDate && self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"YearChange\");\n }\n }\n\n function isEnabled(date, timeless) {\n if (self.config.minDate && compareDates(date, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0 || self.config.maxDate && compareDates(date, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0) return false;\n if (!self.config.enable.length && !self.config.disable.length) return true;\n var dateToCheck = self.parseDate(date, null, true); // timeless\n\n var bool = self.config.enable.length > 0,\n array = bool ? self.config.enable : self.config.disable;\n\n for (var i = 0, d; i < array.length; i++) {\n d = array[i];\n if (d instanceof Function && d(dateToCheck)) // disabled by function\n return bool;else if (d instanceof Date && d.getTime() === dateToCheck.getTime()) // disabled by date\n return bool;else if (typeof d === \"string\" && self.parseDate(d, null, true).getTime() === dateToCheck.getTime()) // disabled by date string\n return bool;else if ( // disabled by range\n (typeof d === \"undefined\" ? \"undefined\" : _typeof(d)) === \"object\" && d.from && d.to && dateToCheck >= d.from && dateToCheck <= d.to) return bool;\n }\n\n return !bool;\n }\n\n function onKeyDown(e) {\n var isInput = e.target === self._input;\n var calendarElem = isCalendarElem(e.target);\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n\n if (e.key === \"Enter\" && allowInput && isInput) {\n self.setDate(self._input.value, true, e.target === self.altInput ? self.config.altFormat : self.config.dateFormat);\n return e.target.blur();\n } else if (calendarElem || allowKeydown || allowInlineKeydown) {\n var isTimeObj = self.timeContainer && self.timeContainer.contains(e.target);\n\n switch (e.key) {\n case \"Enter\":\n if (isTimeObj) updateValue();else selectDate(e);\n break;\n\n case \"Escape\":\n // escape\n e.preventDefault();\n self.close();\n break;\n\n case \"ArrowLeft\":\n case \"ArrowRight\":\n if (!isTimeObj) {\n e.preventDefault();\n\n if (self.daysContainer) {\n var _delta = e.key === \"ArrowRight\" ? 1 : -1;\n\n if (!e.ctrlKey) focusOnDay(e.target.$i, _delta);else changeMonth(_delta, true);\n } else if (self.config.enableTime && !isTimeObj) self.hourElement.focus();\n }\n\n break;\n\n case \"ArrowUp\":\n case \"ArrowDown\":\n e.preventDefault();\n var delta = e.key === \"ArrowDown\" ? 1 : -1;\n\n if (self.daysContainer) {\n if (e.ctrlKey) {\n changeYear(self.currentYear - delta);\n focusOnDay(e.target.$i, 0);\n } else if (!isTimeObj) focusOnDay(e.target.$i, delta * 7);\n } else if (self.config.enableTime) {\n if (!isTimeObj) self.hourElement.focus();\n updateTime(e);\n }\n\n break;\n\n case \"Tab\":\n if (e.target === self.hourElement) {\n e.preventDefault();\n self.minuteElement.select();\n } else if (e.target === self.minuteElement && (self.secondElement || self.amPM)) {\n e.preventDefault();\n (self.secondElement || self.amPM).focus();\n } else if (e.target === self.secondElement) {\n e.preventDefault();\n self.amPM.focus();\n }\n\n break;\n\n case \"a\":\n if (e.target === self.amPM) {\n self.amPM.textContent = \"AM\";\n setHoursFromInputs();\n updateValue();\n }\n\n break;\n\n case \"p\":\n if (e.target === self.amPM) {\n self.amPM.textContent = \"PM\";\n setHoursFromInputs();\n updateValue();\n }\n\n break;\n\n default:\n break;\n }\n\n triggerEvent(\"KeyDown\", e);\n }\n }\n\n function onMouseOver(elem) {\n if (self.selectedDates.length !== 1 || !elem.classList.contains(\"flatpickr-day\")) return;\n var hoverDate = elem.dateObj,\n initialDate = self.parseDate(self.selectedDates[0], null, true),\n rangeStartDate = Math.min(hoverDate.getTime(), self.selectedDates[0].getTime()),\n rangeEndDate = Math.max(hoverDate.getTime(), self.selectedDates[0].getTime()),\n containsDisabled = false;\n\n for (var t = rangeStartDate; t < rangeEndDate; t += self.utils.duration.DAY) {\n if (!isEnabled(new Date(t))) {\n containsDisabled = true;\n break;\n }\n }\n\n var _loop = function _loop(timestamp, i) {\n var outOfRange = timestamp < self.minRangeDate.getTime() || timestamp > self.maxRangeDate.getTime(),\n dayElem = self.days.childNodes[i];\n\n if (outOfRange) {\n self.days.childNodes[i].classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return \"continue\";\n } else if (containsDisabled && !outOfRange) return \"continue\";\n\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n var minRangeDate = Math.max(self.minRangeDate.getTime(), rangeStartDate),\n maxRangeDate = Math.min(self.maxRangeDate.getTime(), rangeEndDate);\n elem.classList.add(hoverDate < self.selectedDates[0] ? \"startRange\" : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate.getTime()) dayElem.classList.add(\"startRange\");else if (initialDate > hoverDate && timestamp === initialDate.getTime()) dayElem.classList.add(\"endRange\");\n if (timestamp >= minRangeDate && timestamp <= maxRangeDate) dayElem.classList.add(\"inRange\");\n };\n\n for (var timestamp = self.days.childNodes[0].dateObj.getTime(), i = 0; i < 42; i++, timestamp += self.utils.duration.DAY) {\n var _ret = _loop(timestamp, i);\n\n if (_ret === \"continue\") continue;\n }\n }\n\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline) positionCalendar();\n }\n\n function open(e) {\n if (self.isMobile) {\n if (e) {\n e.preventDefault();\n e.target.blur();\n }\n\n setTimeout(function () {\n self.mobileInput.click();\n }, 0);\n triggerEvent(\"Open\");\n return;\n }\n\n if (self.isOpen || self._input.disabled || self.config.inline) return;\n self.isOpen = true;\n self.calendarContainer.classList.add(\"open\");\n positionCalendar();\n\n self._input.classList.add(\"active\");\n\n triggerEvent(\"Open\");\n }\n\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = self.config[\"_\" + type + \"Date\"] = self.parseDate(date);\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n var isValidDate = date && dateObj instanceof Date;\n\n if (isValidDate) {\n self[type + \"DateHasTime\"] = dateObj.getHours() || dateObj.getMinutes() || dateObj.getSeconds();\n }\n\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) {\n return isEnabled(d);\n });\n if (!self.selectedDates.length && type === \"min\") setHoursFromDate(dateObj);\n updateValue();\n }\n\n if (self.daysContainer) {\n redraw();\n if (isValidDate) self.currentYearElement[type] = dateObj.getFullYear();else self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled = inverseDateObj && dateObj && inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n\n function parseConfig() {\n var boolOpts = [\"utc\", \"wrap\", \"weekNumbers\", \"allowInput\", \"clickOpens\", \"time_24hr\", \"enableTime\", \"noCalendar\", \"altInput\", \"shorthandCurrentMonth\", \"inline\", \"static\", \"enableSeconds\", \"disableMobile\"];\n var hooks = [\"onChange\", \"onClose\", \"onDayCreate\", \"onKeyDown\", \"onMonthChange\", \"onOpen\", \"onParseConfig\", \"onReady\", \"onValueUpdate\", \"onYearChange\"];\n self.config = Object.create(Flatpickr.defaultConfig);\n\n var userConfig = _extends({}, self.instanceConfig, JSON.parse(JSON.stringify(self.element.dataset || {})));\n\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n\n _extends(self.config, userConfig);\n\n if (!userConfig.dateFormat && userConfig.enableTime) {\n self.config.dateFormat = self.config.noCalendar ? \"H:i\" + (self.config.enableSeconds ? \":S\" : \"\") : Flatpickr.defaultConfig.dateFormat + \" H:i\" + (self.config.enableSeconds ? \":S\" : \"\");\n }\n\n if (userConfig.altInput && userConfig.enableTime && !userConfig.altFormat) {\n self.config.altFormat = self.config.noCalendar ? \"h:i\" + (self.config.enableSeconds ? \":S K\" : \" K\") : Flatpickr.defaultConfig.altFormat + (\" h:i\" + (self.config.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n\n Object.defineProperty(self.config, \"minDate\", {\n get: function get() {\n return this._minDate;\n },\n set: minMaxDateSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function get() {\n return this._maxDate;\n },\n set: minMaxDateSetter(\"max\")\n });\n self.config.minDate = userConfig.minDate;\n self.config.maxDate = userConfig.maxDate;\n\n for (var i = 0; i < boolOpts.length; i++) {\n self.config[boolOpts[i]] = self.config[boolOpts[i]] === true || self.config[boolOpts[i]] === \"true\";\n }\n\n for (var _i = hooks.length; _i--;) {\n if (self.config[hooks[_i]] !== undefined) {\n self.config[hooks[_i]] = arrayify(self.config[hooks[_i]] || []).map(bindToInstance);\n }\n }\n\n for (var _i2 = 0; _i2 < self.config.plugins.length; _i2++) {\n var pluginConf = self.config.plugins[_i2](self) || {};\n\n for (var key in pluginConf) {\n if (self.config[key] instanceof Array || ~hooks.indexOf(key)) {\n self.config[key] = arrayify(pluginConf[key]).map(bindToInstance).concat(self.config[key]);\n } else if (typeof userConfig[key] === \"undefined\") self.config[key] = pluginConf[key];\n }\n }\n\n triggerEvent(\"ParseConfig\");\n }\n\n function setupLocale() {\n if (_typeof(self.config.locale) !== \"object\" && typeof Flatpickr.l10ns[self.config.locale] === \"undefined\") console.warn(\"flatpickr: invalid locale \" + self.config.locale);\n self.l10n = _extends(Object.create(Flatpickr.l10ns.default), _typeof(self.config.locale) === \"object\" ? self.config.locale : self.config.locale !== \"default\" ? Flatpickr.l10ns[self.config.locale] || {} : {});\n }\n\n function positionCalendar() {\n if (self.calendarContainer === undefined) return;\n\n var calendarHeight = self.calendarContainer.offsetHeight,\n calendarWidth = self.calendarContainer.offsetWidth,\n configPos = self.config.position,\n inputBounds = self._positionElement.getBoundingClientRect(),\n distanceFromBottom = window.innerHeight - inputBounds.bottom,\n showOnTop = configPos === \"above\" || configPos !== \"below\" && distanceFromBottom < calendarHeight && inputBounds.top > calendarHeight;\n\n var top = window.pageYOffset + inputBounds.top + (!showOnTop ? self._positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline) return;\n var left = window.pageXOffset + inputBounds.left;\n var right = window.document.body.offsetWidth - inputBounds.right;\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static) return;\n self.calendarContainer.style.top = top + \"px\";\n\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n } else {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n }\n\n function redraw() {\n if (self.config.noCalendar || self.isMobile) return;\n buildWeekdays();\n updateNavigationCurrentMonth();\n buildDays();\n }\n\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n if (!e.target.classList.contains(\"flatpickr-day\") || e.target.classList.contains(\"disabled\") || e.target.classList.contains(\"notAllowed\")) return;\n var selectedDate = self.latestSelectedDateObj = new Date(e.target.dateObj.getTime());\n var shouldChangeMonth = selectedDate.getMonth() !== self.currentMonth && self.config.mode !== \"range\";\n self.selectedDateElem = e.target;\n if (self.config.mode === \"single\") self.selectedDates = [selectedDate];else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex) self.selectedDates.splice(selectedIndex, 1);else self.selectedDates.push(selectedDate);\n } else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) self.clear();\n self.selectedDates.push(selectedDate); // unless selecting same date twice, sort ascendingly\n\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0) self.selectedDates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n }\n setHoursFromInputs();\n\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) triggerEvent(\"YearChange\");\n triggerEvent(\"MonthChange\");\n }\n\n buildDays();\n if (self.minDateHasTime && self.config.enableTime && compareDates(selectedDate, self.config.minDate) === 0) setHoursFromDate(self.config.minDate);\n updateValue();\n if (self.config.enableTime) setTimeout(function () {\n return self.showTimeInput = true;\n }, 50);\n\n if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 1) {\n onMouseOver(e.target);\n self._hidePrevMonthArrow = self._hidePrevMonthArrow || self.minRangeDate > self.days.childNodes[0].dateObj;\n self._hideNextMonthArrow = self._hideNextMonthArrow || self.maxRangeDate < new Date(self.currentYear, self.currentMonth + 1, 1);\n } else updateNavigationCurrentMonth();\n }\n\n triggerEvent(\"Change\"); // maintain focus\n\n if (!shouldChangeMonth) focusOnDay(e.target.$i, 0);else afterDayAnim(function () {\n return self.selectedDateElem.focus();\n });\n if (self.config.enableTime) setTimeout(function () {\n return self.hourElement.select();\n }, 451);\n\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" && self.selectedDates.length === 2 && !self.config.enableTime;\n if (single || range) self.close();\n }\n }\n\n function set(option, value) {\n self.config[option] = value;\n self.redraw();\n jumpToDate();\n }\n\n function setSelectedDate(inputDate, format) {\n if (inputDate instanceof Array) self.selectedDates = inputDate.map(function (d) {\n return self.parseDate(d, format);\n });else if (inputDate instanceof Date || !isNaN(inputDate)) self.selectedDates = [self.parseDate(inputDate, format)];else if (inputDate && inputDate.substring) {\n switch (self.config.mode) {\n case \"single\":\n self.selectedDates = [self.parseDate(inputDate, format)];\n break;\n\n case \"multiple\":\n self.selectedDates = inputDate.split(\"; \").map(function (date) {\n return self.parseDate(date, format);\n });\n break;\n\n case \"range\":\n self.selectedDates = inputDate.split(self.l10n.rangeSeparator).map(function (date) {\n return self.parseDate(date, format);\n });\n break;\n\n default:\n break;\n }\n }\n self.selectedDates = self.selectedDates.filter(function (d) {\n return d instanceof Date && isEnabled(d, false);\n });\n self.selectedDates.sort(function (a, b) {\n return a.getTime() - b.getTime();\n });\n }\n\n function setDate(date, triggerChange, format) {\n if (!date) return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.showTimeInput = self.selectedDates.length > 0;\n self.latestSelectedDateObj = self.selectedDates[0];\n self.redraw();\n jumpToDate();\n setHoursFromDate();\n updateValue(triggerChange);\n if (triggerChange) triggerEvent(\"Change\");\n }\n\n function setupDates() {\n function parseDateRules(arr) {\n for (var i = arr.length; i--;) {\n if (typeof arr[i] === \"string\" || +arr[i]) arr[i] = self.parseDate(arr[i], null, true);else if (arr[i] && arr[i].from && arr[i].to) {\n arr[i].from = self.parseDate(arr[i].from);\n arr[i].to = self.parseDate(arr[i].to);\n }\n }\n\n return arr.filter(function (x) {\n return x;\n }); // remove falsy values\n }\n\n self.selectedDates = [];\n self.now = new Date();\n if (self.config.disable.length) self.config.disable = parseDateRules(self.config.disable);\n if (self.config.enable.length) self.config.enable = parseDateRules(self.config.enable);\n var preloadedDate = self.config.defaultDate || self.input.value;\n if (preloadedDate) setSelectedDate(preloadedDate, self.config.dateFormat);\n var initialDate = self.selectedDates.length ? self.selectedDates[0] : self.config.minDate && self.config.minDate.getTime() > self.now ? self.config.minDate : self.config.maxDate && self.config.maxDate.getTime() < self.now ? self.config.maxDate : self.now;\n self.currentYear = initialDate.getFullYear();\n self.currentMonth = initialDate.getMonth();\n if (self.selectedDates.length) self.latestSelectedDateObj = self.selectedDates[0];\n self.minDateHasTime = self.config.minDate && (self.config.minDate.getHours() || self.config.minDate.getMinutes() || self.config.minDate.getSeconds());\n self.maxDateHasTime = self.config.maxDate && (self.config.maxDate.getHours() || self.config.maxDate.getMinutes() || self.config.maxDate.getSeconds());\n Object.defineProperty(self, \"latestSelectedDateObj\", {\n get: function get() {\n return self._selectedDateObj || self.selectedDates[self.selectedDates.length - 1];\n },\n set: function set(date) {\n self._selectedDateObj = date;\n }\n });\n\n if (!self.isMobile) {\n Object.defineProperty(self, \"showTimeInput\", {\n get: function get() {\n return self._showTimeInput;\n },\n set: function set(bool) {\n self._showTimeInput = bool;\n if (self.calendarContainer) toggleClass(self.calendarContainer, \"showTimeInput\", bool);\n positionCalendar();\n }\n });\n }\n }\n\n function setupHelperFunctions() {\n self.utils = {\n duration: {\n DAY: 86400000\n },\n getDaysinMonth: function getDaysinMonth(month, yr) {\n month = typeof month === \"undefined\" ? self.currentMonth : month;\n yr = typeof yr === \"undefined\" ? self.currentYear : yr;\n if (month === 1 && (yr % 4 === 0 && yr % 100 !== 0 || yr % 400 === 0)) return 29;\n return self.l10n.daysInMonth[month];\n },\n monthToStr: function monthToStr(monthNumber, shorthand) {\n shorthand = typeof shorthand === \"undefined\" ? self.config.shorthandCurrentMonth : shorthand;\n return self.l10n.months[(shorthand ? \"short\" : \"long\") + \"hand\"][monthNumber];\n }\n };\n }\n /* istanbul ignore next */\n\n\n function setupFormats() {\n [\"D\", \"F\", \"J\", \"M\", \"W\", \"l\"].forEach(function (f) {\n self.formats[f] = Flatpickr.prototype.formats[f].bind(self);\n });\n self.revFormat.F = Flatpickr.prototype.revFormat.F.bind(self);\n self.revFormat.M = Flatpickr.prototype.revFormat.M.bind(self);\n }\n\n function setupInputs() {\n self.input = self.config.wrap ? self.element.querySelector(\"[data-input]\") : self.element;\n /* istanbul ignore next */\n\n if (!self.input) return console.warn(\"Error: invalid input element specified\", self.input);\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n\n if (self.config.altInput) {\n // replicate self.element\n self.altInput = createElement(self.input.nodeName, self.input.className + \" \" + self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.type = \"text\";\n self.input.type = \"hidden\";\n if (!self.config.static && self.input.parentNode) self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n\n if (!self.config.allowInput) self._input.setAttribute(\"readonly\", \"readonly\");\n self._positionElement = self.config.positionElement || self._input;\n }\n\n function setupMobile() {\n var inputType = self.config.enableTime ? self.config.noCalendar ? \"time\" : \"datetime-local\" : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.step = \"any\";\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr = inputType === \"datetime-local\" ? \"Y-m-d\\\\TH:i:S\" : inputType === \"date\" ? \"Y-m-d\" : \"H:i:S\";\n\n if (self.selectedDates.length) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n\n if (self.config.minDate) self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate) self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n self.input.type = \"hidden\";\n if (self.config.altInput) self.altInput.type = \"hidden\";\n\n try {\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n } catch (e) {//\n }\n\n self.mobileInput.addEventListener(\"change\", function (e) {\n self.setDate(e.target.value, false, self.mobileFormatStr);\n triggerEvent(\"Change\");\n triggerEvent(\"Close\");\n });\n }\n\n function toggle() {\n if (self.isOpen) return self.close();\n self.open();\n }\n\n function triggerEvent(event, data) {\n var hooks = self.config[\"on\" + event];\n\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++) {\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n }\n\n if (event === \"Change\") {\n self.input.dispatchEvent(createEvent(\"change\")); // many front-end frameworks bind to the input event\n\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n /**\n * Creates an Event, normalized across browsers\n * @param {String} name the event name, e.g. \"click\"\n * @return {Event} the created event\n */\n\n\n function createEvent(name) {\n if (self._supportsEvents) return new Event(name, {\n bubbles: true\n });\n self._[name + \"Event\"] = document.createEvent(\"Event\");\n\n self._[name + \"Event\"].initEvent(name, true, true);\n\n return self._[name + \"Event\"];\n }\n\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n if (compareDates(self.selectedDates[i], date) === 0) return \"\" + i;\n }\n\n return false;\n }\n\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2) return false;\n return compareDates(date, self.selectedDates[0]) >= 0 && compareDates(date, self.selectedDates[1]) <= 0;\n }\n\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav) return;\n self.currentMonthElement.textContent = self.utils.monthToStr(self.currentMonth) + \" \";\n self.currentYearElement.value = self.currentYear;\n self._hidePrevMonthArrow = self.config.minDate && (self.currentYear === self.config.minDate.getFullYear() ? self.currentMonth <= self.config.minDate.getMonth() : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow = self.config.maxDate && (self.currentYear === self.config.maxDate.getFullYear() ? self.currentMonth + 1 > self.config.maxDate.getMonth() : self.currentYear > self.config.maxDate.getFullYear());\n }\n /**\n * Updates the values of inputs associated with the calendar\n * @return {void}\n */\n\n\n function updateValue(triggerChange) {\n if (!self.selectedDates.length) return self.clear(triggerChange);\n\n if (self.isMobile) {\n self.mobileInput.value = self.selectedDates.length ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr) : \"\";\n }\n\n var joinChar = self.config.mode !== \"range\" ? \"; \" : self.l10n.rangeSeparator;\n self.input.value = self.selectedDates.map(function (dObj) {\n return self.formatDate(dObj, self.config.dateFormat);\n }).join(joinChar);\n\n if (self.config.altInput) {\n self.altInput.value = self.selectedDates.map(function (dObj) {\n return self.formatDate(dObj, self.config.altFormat);\n }).join(joinChar);\n }\n\n triggerEvent(\"ValueUpdate\");\n }\n\n function mouseDelta(e) {\n return Math.max(-1, Math.min(1, e.wheelDelta || -e.deltaY));\n }\n\n function onMonthNavScroll(e) {\n e.preventDefault();\n var isYear = self.currentYearElement.parentNode.contains(e.target);\n\n if (e.target === self.currentMonthElement || isYear) {\n var delta = mouseDelta(e);\n\n if (isYear) {\n changeYear(self.currentYear + delta);\n e.target.value = self.currentYear;\n } else self.changeMonth(delta, true, false);\n }\n }\n\n function onMonthNavClick(e) {\n var isPrevMonth = self.prevMonthNav.contains(e.target);\n var isNextMonth = self.nextMonthNav.contains(e.target);\n if (isPrevMonth || isNextMonth) changeMonth(isPrevMonth ? -1 : 1);else if (e.target === self.currentYearElement) {\n e.preventDefault();\n self.currentYearElement.select();\n } else if (e.target.className === \"arrowUp\") self.changeYear(self.currentYear + 1);else if (e.target.className === \"arrowDown\") self.changeYear(self.currentYear - 1);\n }\n /**\n * Creates an HTMLElement with given tag, class, and textual content\n * @param {String} tag the HTML tag\n * @param {String} className the new element's class name\n * @param {String} content The new element's text content\n * @return {HTMLElement} the created HTML element\n */\n\n\n function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined) e.textContent = content;\n return e;\n }\n\n function arrayify(obj) {\n if (obj instanceof Array) return obj;\n return [obj];\n }\n\n function toggleClass(elem, className, bool) {\n if (bool) return elem.classList.add(className);\n elem.classList.remove(className);\n }\n /* istanbul ignore next */\n\n\n function debounce(func, wait, immediate) {\n var timeout = void 0;\n return function () {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n }\n /**\n * Compute the difference in dates, measured in ms\n * @param {Date} date1\n * @param {Date} date2\n * @param {Boolean} timeless whether to reset times of both dates to 00:00\n * @return {Number} the difference in ms\n */\n\n\n function compareDates(date1, date2, timeless) {\n if (!(date1 instanceof Date) || !(date2 instanceof Date)) return false;\n\n if (timeless !== false) {\n return new Date(date1.getTime()).setHours(0, 0, 0, 0) - new Date(date2.getTime()).setHours(0, 0, 0, 0);\n }\n\n return date1.getTime() - date2.getTime();\n }\n\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\",\n isWheel = e.type === \"wheel\",\n isIncrement = e.type === \"increment\",\n input = e.target;\n if (self.amPM && e.target === self.amPM) return e.target.textContent = [\"AM\", \"PM\"][e.target.textContent === \"AM\" | 0];\n var min = Number(input.min),\n max = Number(input.max),\n step = Number(input.step),\n curValue = parseInt(input.value, 10),\n delta = e.delta || (!isKeyDown ? Math.max(-1, Math.min(1, e.wheelDelta || -e.deltaY)) || 0 : e.which === 38 ? 1 : -1);\n var newValue = curValue + step * delta;\n\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement,\n isMinuteElem = input === self.minuteElement;\n\n if (newValue < min) {\n newValue = max + newValue + !isHourElem + (isHourElem && !self.amPM);\n if (isMinuteElem) incrementNumInput(null, -1, self.hourElement);\n } else if (newValue > max) {\n newValue = input === self.hourElement ? newValue - max - !self.amPM : min;\n if (isMinuteElem) incrementNumInput(null, 1, self.hourElement);\n }\n\n if (self.amPM && isHourElem && (step === 1 ? newValue + curValue === 23 : Math.abs(newValue - curValue) > step)) self.amPM.textContent = self.amPM.textContent === \"PM\" ? \"AM\" : \"PM\";\n input.value = self.pad(newValue);\n }\n }\n\n init();\n return self;\n}\n/* istanbul ignore next */\n\n\nFlatpickr.defaultConfig = {\n mode: \"single\",\n position: \"auto\",\n animate: window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n\n /* if true, dates will be parsed, formatted, and displayed in UTC.\n preloading date strings w/ timezones is recommended but not necessary */\n utc: false,\n // wrap: see https://chmln.github.io/flatpickr/examples/#flatpickr-external-elements\n wrap: false,\n // enables week numbers\n weekNumbers: false,\n // allow manual datetime input\n allowInput: false,\n\n /*\n \tclicking on input opens the date(time)picker.\n \tdisable if you wish to open the calendar manually with .open()\n */\n clickOpens: true,\n\n /*\n \tcloses calendar after date selection,\n \tunless 'mode' is 'multiple' or enableTime is true\n */\n closeOnSelect: true,\n // display time picker in 24 hour mode\n time_24hr: false,\n // enables the time picker functionality\n enableTime: false,\n // noCalendar: true will hide the calendar. use for a time picker along w/ enableTime\n noCalendar: false,\n // more date format chars at https://chmln.github.io/flatpickr/#dateformat\n dateFormat: \"Y-m-d\",\n // date format used in aria-label for days\n ariaDateFormat: \"F j, Y\",\n // altInput - see https://chmln.github.io/flatpickr/#altinput\n altInput: false,\n // the created altInput element will have this class.\n altInputClass: \"form-control input\",\n // same as dateFormat, but for altInput\n altFormat: \"F j, Y\",\n // defaults to e.g. June 10, 2016\n // defaultDate - either a datestring or a date object. used for datetimepicker\"s initial value\n defaultDate: null,\n // the minimum date that user can pick (inclusive)\n minDate: null,\n // the maximum date that user can pick (inclusive)\n maxDate: null,\n // dateparser that transforms a given string to a date object\n parseDate: null,\n // dateformatter that transforms a given date object to a string, according to passed format\n formatDate: null,\n getWeek: function getWeek(givenDate) {\n var date = new Date(givenDate.getTime());\n var onejan = new Date(date.getFullYear(), 0, 1);\n return Math.ceil(((date - onejan) / 86400000 + onejan.getDay() + 1) / 7);\n },\n // see https://chmln.github.io/flatpickr/#disable\n enable: [],\n // see https://chmln.github.io/flatpickr/#disable\n disable: [],\n // display the short version of month names - e.g. Sep instead of September\n shorthandCurrentMonth: false,\n // displays calendar inline. see https://chmln.github.io/flatpickr/#inline-calendar\n inline: false,\n // position calendar inside wrapper and next to the input element\n // leave at false unless you know what you\"re doing\n \"static\": false,\n // DOM node to append the calendar to in *static* mode\n appendTo: null,\n // code for previous/next icons. this is where you put your custom icon code e.g. fontawesome\n prevArrow: \" \",\n nextArrow: \" \",\n // enables seconds in the time picker\n enableSeconds: false,\n // step size used when scrolling/incrementing the hour element\n hourIncrement: 1,\n // step size used when scrolling/incrementing the minute element\n minuteIncrement: 5,\n // initial value in the hour element\n defaultHour: 12,\n // initial value in the minute element\n defaultMinute: 0,\n // disable native mobile datetime input support\n disableMobile: false,\n // default locale\n locale: \"default\",\n plugins: [],\n // called every time calendar is closed\n onClose: undefined,\n // function (dateObj, dateStr) {}\n // onChange callback when user selects a date or time\n onChange: undefined,\n // function (dateObj, dateStr) {}\n // called for every day element\n onDayCreate: undefined,\n // called every time the month is changed\n onMonthChange: undefined,\n // called every time calendar is opened\n onOpen: undefined,\n // function (dateObj, dateStr) {}\n // called after the configuration has been parsed\n onParseConfig: undefined,\n // called after calendar is ready\n onReady: undefined,\n // function (dateObj, dateStr) {}\n // called after input value updated\n onValueUpdate: undefined,\n // called every time the year is changed\n onYearChange: undefined,\n onKeyDown: undefined\n};\n/* istanbul ignore next */\n\nFlatpickr.l10ns = {\n en: {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]\n },\n months: {\n shorthand: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n longhand: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function ordinal(nth) {\n var s = nth % 100;\n if (s > 3 && s < 21) return \"th\";\n\n switch (s % 10) {\n case 1:\n return \"st\";\n\n case 2:\n return \"nd\";\n\n case 3:\n return \"rd\";\n\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\"\n }\n};\nFlatpickr.l10ns.default = Object.create(Flatpickr.l10ns.en);\n\nFlatpickr.localize = function (l10n) {\n return _extends(Flatpickr.l10ns.default, l10n || {});\n};\n\nFlatpickr.setDefaults = function (config) {\n return _extends(Flatpickr.defaultConfig, config || {});\n};\n\nFlatpickr.prototype = {\n formats: {\n // get the date in UTC\n Z: function Z(date) {\n return date.toISOString();\n },\n // weekday name, short, e.g. Thu\n D: function D(date) {\n return this.l10n.weekdays.shorthand[this.formats.w(date)];\n },\n // full month name e.g. January\n F: function F(date) {\n return this.utils.monthToStr(this.formats.n(date) - 1, false);\n },\n // padded hour 1-12\n G: function G(date) {\n return Flatpickr.prototype.pad(Flatpickr.prototype.formats.h(date));\n },\n // hours with leading zero e.g. 03\n H: function H(date) {\n return Flatpickr.prototype.pad(date.getHours());\n },\n // day (1-30) with ordinal suffix e.g. 1st, 2nd\n J: function J(date) {\n return date.getDate() + this.l10n.ordinal(date.getDate());\n },\n // AM/PM\n K: function K(date) {\n return date.getHours() > 11 ? \"PM\" : \"AM\";\n },\n // shorthand month e.g. Jan, Sep, Oct, etc\n M: function M(date) {\n return this.utils.monthToStr(date.getMonth(), true);\n },\n // seconds 00-59\n S: function S(date) {\n return Flatpickr.prototype.pad(date.getSeconds());\n },\n // unix timestamp\n U: function U(date) {\n return date.getTime() / 1000;\n },\n W: function W(date) {\n return this.config.getWeek(date);\n },\n // full year e.g. 2016\n Y: function Y(date) {\n return date.getFullYear();\n },\n // day in month, padded (01-30)\n d: function d(date) {\n return Flatpickr.prototype.pad(date.getDate());\n },\n // hour from 1-12 (am/pm)\n h: function h(date) {\n return date.getHours() % 12 ? date.getHours() % 12 : 12;\n },\n // minutes, padded with leading zero e.g. 09\n i: function i(date) {\n return Flatpickr.prototype.pad(date.getMinutes());\n },\n // day in month (1-30)\n j: function j(date) {\n return date.getDate();\n },\n // weekday name, full, e.g. Thursday\n l: function l(date) {\n return this.l10n.weekdays.longhand[date.getDay()];\n },\n // padded month number (01-12)\n m: function m(date) {\n return Flatpickr.prototype.pad(date.getMonth() + 1);\n },\n // the month number (1-12)\n n: function n(date) {\n return date.getMonth() + 1;\n },\n // seconds 0-59\n s: function s(date) {\n return date.getSeconds();\n },\n // number of the day of the week\n w: function w(date) {\n return date.getDay();\n },\n // last two digits of year e.g. 16 for 2016\n y: function y(date) {\n return String(date.getFullYear()).substring(2);\n }\n },\n\n /**\n * Formats a given Date object into a string based on supplied format\n * @param {Date} dateObj the date object\n * @param {String} frmt a string composed of formatting tokens e.g. \"Y-m-d\"\n * @return {String} The textual representation of the date e.g. 2017-02-03\n */\n formatDate: function formatDate(dateObj, frmt) {\n var _this = this;\n\n if (this.config !== undefined && this.config.formatDate !== undefined) return this.config.formatDate(dateObj, frmt);\n return frmt.split(\"\").map(function (c, i, arr) {\n return _this.formats[c] && arr[i - 1] !== \"\\\\\" ? _this.formats[c](dateObj) : c !== \"\\\\\" ? c : \"\";\n }).join(\"\");\n },\n revFormat: {\n D: function D() {},\n F: function F(dateObj, monthName) {\n dateObj.setMonth(this.l10n.months.longhand.indexOf(monthName));\n },\n G: function G(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n H: function H(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function J(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function K(dateObj, amPM) {\n var hours = dateObj.getHours();\n if (hours !== 12) dateObj.setHours(hours % 12 + 12 * /pm/i.test(amPM));\n },\n M: function M(dateObj, shortMonth) {\n dateObj.setMonth(this.l10n.months.shorthand.indexOf(shortMonth));\n },\n S: function S(dateObj, seconds) {\n dateObj.setSeconds(seconds);\n },\n U: function U(dateObj, unixSeconds) {\n return new Date(parseFloat(unixSeconds) * 1000);\n },\n W: function W(dateObj, weekNumber) {\n weekNumber = parseInt(weekNumber);\n return new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0, 0);\n },\n Y: function Y(dateObj, year) {\n dateObj.setFullYear(year);\n },\n Z: function Z(dateObj, ISODate) {\n return new Date(ISODate);\n },\n d: function d(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function h(dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n i: function i(dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function j(dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: function l() {},\n m: function m(dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function n(dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function s(dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n w: function w() {},\n y: function y(dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n }\n },\n tokenRegex: {\n D: \"(\\\\w+)\",\n F: \"(\\\\w+)\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"(\\\\w+)\",\n M: \"(\\\\w+)\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"(\\\\w+)\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\"\n },\n pad: function pad(number) {\n return (\"0\" + number).slice(-2);\n },\n\n /**\n * Parses a date(+time) string into a Date object\n * @param {String} date the date string, e.g. 2017-02-03 14:45\n * @param {String} givenFormat the date format, e.g. Y-m-d H:i\n * @param {Boolean} timeless whether to reset the time of Date object\n * @return {Date} the parsed Date object\n */\n parseDate: function parseDate(date, givenFormat, timeless) {\n if (!date) return null;\n var date_orig = date;\n\n if (date instanceof Date) {\n date = new Date(date.getTime()); // create a copy\n\n date.fp_isUTC = date_orig.fp_isUTC;\n } else if (date.toFixed !== undefined) // timestamp\n date = new Date(date);else {\n // date string\n var format = givenFormat || (this.config || Flatpickr.defaultConfig).dateFormat;\n date = String(date).trim();\n\n if (date === \"today\") {\n date = new Date();\n timeless = true;\n } else if (/Z$/.test(date) || /GMT$/.test(date)) // datestrings w/ timezone\n date = new Date(date);else if (this.config && this.config.parseDate) date = this.config.parseDate(date, format);else {\n var parsedDate = !this.config || !this.config.noCalendar ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0) : new Date(new Date().setHours(0, 0, 0, 0));\n var matched = void 0;\n\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n\n if (this.tokenRegex[token] && !escaped) {\n regexStr += this.tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n\n if (match && (matched = true)) {\n parsedDate = this.revFormat[token](parsedDate, match[++matchIndex]) || parsedDate;\n }\n } else if (!isBackSlash) regexStr += \".\"; // don't really care\n\n }\n\n date = matched ? parsedDate : null;\n }\n }\n /* istanbul ignore next */\n\n\n if (!(date instanceof Date)) {\n console.warn(\"flatpickr: invalid date \" + date_orig);\n console.info(this.element);\n return null;\n }\n\n if (this.config && this.config.utc && !date.fp_isUTC) date = date.fp_toUTC();\n if (timeless === true) date.setHours(0, 0, 0, 0);\n return date;\n }\n};\n/* istanbul ignore next */\n\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice.call(nodeList); // static list\n\n var instances = [];\n\n for (var i = 0; i < nodes.length; i++) {\n try {\n nodes[i]._flatpickr = new Flatpickr(nodes[i], config || {});\n instances.push(nodes[i]._flatpickr);\n } catch (e) {\n console.warn(e, e.stack);\n }\n }\n\n return instances.length === 1 ? instances[0] : instances;\n}\n/* istanbul ignore next */\n\n\nif (typeof HTMLElement !== \"undefined\") {\n // browser env\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\n/* istanbul ignore next */\n\n\nfunction flatpickr(selector, config) {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n}\n/* istanbul ignore next */\n\n\nif (typeof jQuery !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\n\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + parseInt(days, 10));\n};\n\nDate.prototype.fp_isUTC = false;\n\nDate.prototype.fp_toUTC = function () {\n var newDate = new Date(this.getUTCFullYear(), this.getUTCMonth(), this.getUTCDate(), this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds());\n newDate.fp_isUTC = true;\n return newDate;\n};\n\nif (typeof module !== \"undefined\") module.exports = Flatpickr;","export * from \"-!../../../mini-css-extract-plugin/dist/loader.js!../../../css-loader/dist/cjs.js??ref--2-1!../../../vue-loader/lib/loaders/stylePostLoader.js!../../../postcss-loader/src/index.js??ref--2-2!./airbnb.css?vue&type=style&index=0&lang=css&\"","export * from \"-!../../../../mini-css-extract-plugin/dist/loader.js!../../../../css-loader/dist/cjs.js??ref--2-1!../../../../vue-loader/lib/loaders/stylePostLoader.js!../../../../postcss-loader/src/index.js??ref--2-2!./confirmDate.css?vue&type=style&index=1&lang=css&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./flatpickr.vue?vue&type=style&index=2&lang=scss&\"","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar accounting = require('accounting');\n\nvar assign = require('object-assign');\n\nvar localeCurrency = require('locale-currency');\n\nvar currencies = require(\"./currencies.json\");\n\nvar localeFormats = require(\"./localeFormats.json\");\n\nvar defaultCurrency = {\n symbol: '',\n thousandsSeparator: ',',\n decimalSeparator: '.',\n symbolOnLeft: true,\n spaceBetweenAmountAndSymbol: false,\n decimalDigits: 2\n};\nvar defaultLocaleFormat = {};\nvar formatMapping = [{\n symbolOnLeft: true,\n spaceBetweenAmountAndSymbol: false,\n format: {\n pos: '%s%v',\n neg: '-%s%v',\n zero: '%s%v'\n }\n}, {\n symbolOnLeft: true,\n spaceBetweenAmountAndSymbol: true,\n format: {\n pos: '%s %v',\n neg: '-%s %v',\n zero: '%s %v'\n }\n}, {\n symbolOnLeft: false,\n spaceBetweenAmountAndSymbol: false,\n format: {\n pos: '%v%s',\n neg: '-%v%s',\n zero: '%v%s'\n }\n}, {\n symbolOnLeft: false,\n spaceBetweenAmountAndSymbol: true,\n format: {\n pos: '%v %s',\n neg: '-%v %s',\n zero: '%v %s'\n }\n}];\n\nfunction format(value, options) {\n var code = options.code || options.locale && localeCurrency.getCurrency(options.locale);\n var localeMatch = /^([a-z]+)([_-]([a-z]+))?$/i.exec(options.locale) || [];\n var language = localeMatch[1];\n var region = localeMatch[3];\n var localeFormat = assign({}, defaultLocaleFormat, localeFormats[language] || {}, localeFormats[language + '-' + region] || {});\n var currency = assign({}, defaultCurrency, findCurrency(code), localeFormat);\n var symbolOnLeft = currency.symbolOnLeft;\n var spaceBetweenAmountAndSymbol = currency.spaceBetweenAmountAndSymbol;\n var format = formatMapping.filter(function (f) {\n return f.symbolOnLeft == symbolOnLeft && f.spaceBetweenAmountAndSymbol == spaceBetweenAmountAndSymbol;\n })[0].format;\n return accounting.formatMoney(value, {\n symbol: isUndefined(options.symbol) ? currency.symbol : options.symbol,\n decimal: isUndefined(options.decimal) ? currency.decimalSeparator : options.decimal,\n thousand: isUndefined(options.thousand) ? currency.thousandsSeparator : options.thousand,\n precision: typeof options.precision === 'number' ? options.precision : currency.decimalDigits,\n format: ['string', 'object'].indexOf(_typeof(options.format)) > -1 ? options.format : format\n });\n}\n\nfunction findCurrency(currencyCode) {\n return currencies[currencyCode];\n}\n\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\nfunction unformat(value, options) {\n var code = options.code || options.locale && localeCurrency.getCurrency(options.locale);\n var localeFormat = localeFormats[options.locale] || defaultLocaleFormat;\n var currency = assign({}, defaultCurrency, findCurrency(code), localeFormat);\n var decimal = isUndefined(options.decimal) ? currency.decimalSeparator : options.decimal;\n return accounting.unformat(value, decimal);\n}\n\nmodule.exports = {\n defaultCurrency: defaultCurrency,\n\n get currencies() {\n // In favor of backwards compatibility, the currencies map is converted to an array here\n return Object.keys(currencies).map(function (key) {\n return currencies[key];\n });\n },\n\n findCurrency: findCurrency,\n format: format,\n unformat: unformat\n};","/*!\n * accounting.js v0.4.1\n * Copyright 2014 Open Exchange Rates\n *\n * Freely distributable under the MIT license.\n * Portions of accounting.js are inspired or borrowed from underscore.js\n *\n * Full details and documentation:\n * http://openexchangerates.github.io/accounting.js/\n */\n(function (root, undefined) {\n /* --- Setup --- */\n // Create the local library object, to be exported or referenced globally later\n var lib = {}; // Current version\n\n lib.version = '0.4.1';\n /* --- Exposed settings --- */\n // The library's settings configuration object. Contains default parameters for\n // currency and number formatting\n\n lib.settings = {\n currency: {\n symbol: \"$\",\n // default currency symbol is '$'\n format: \"%s%v\",\n // controls output: %s = symbol, %v = value (can be object, see docs)\n decimal: \".\",\n // decimal point separator\n thousand: \",\",\n // thousands separator\n precision: 2,\n // decimal places\n grouping: 3 // digit grouping (not implemented yet)\n\n },\n number: {\n precision: 0,\n // default precision on numbers is 0\n grouping: 3,\n // digit grouping (not implemented yet)\n thousand: \",\",\n decimal: \".\"\n }\n };\n /* --- Internal Helper Methods --- */\n // Store reference to possibly-available ECMAScript 5 methods for later\n\n var nativeMap = Array.prototype.map,\n nativeIsArray = Array.isArray,\n toString = Object.prototype.toString;\n /**\n * Tests whether supplied parameter is a string\n * from underscore.js\n */\n\n function isString(obj) {\n return !!(obj === '' || obj && obj.charCodeAt && obj.substr);\n }\n /**\n * Tests whether supplied parameter is a string\n * from underscore.js, delegates to ECMA5's native Array.isArray\n */\n\n\n function isArray(obj) {\n return nativeIsArray ? nativeIsArray(obj) : toString.call(obj) === '[object Array]';\n }\n /**\n * Tests whether supplied parameter is a true object\n */\n\n\n function isObject(obj) {\n return obj && toString.call(obj) === '[object Object]';\n }\n /**\n * Extends an object with a defaults object, similar to underscore's _.defaults\n *\n * Used for abstracting parameter handling from API methods\n */\n\n\n function defaults(object, defs) {\n var key;\n object = object || {};\n defs = defs || {}; // Iterate over object non-prototype properties:\n\n for (key in defs) {\n if (defs.hasOwnProperty(key)) {\n // Replace values with defaults only if undefined (allow empty/zero values):\n if (object[key] == null) object[key] = defs[key];\n }\n }\n\n return object;\n }\n /**\n * Implementation of `Array.map()` for iteration loops\n *\n * Returns a new Array as a result of calling `iterator` on each array value.\n * Defers to native Array.map if available\n */\n\n\n function map(obj, iterator, context) {\n var results = [],\n i,\n j;\n if (!obj) return results; // Use native .map method if it exists:\n\n if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); // Fallback for native .map:\n\n for (i = 0, j = obj.length; i < j; i++) {\n results[i] = iterator.call(context, obj[i], i, obj);\n }\n\n return results;\n }\n /**\n * Check and normalise the value of precision (must be positive integer)\n */\n\n\n function checkPrecision(val, base) {\n val = Math.round(Math.abs(val));\n return isNaN(val) ? base : val;\n }\n /**\n * Parses a format string or object and returns format obj for use in rendering\n *\n * `format` is either a string with the default (positive) format, or object\n * containing `pos` (required), `neg` and `zero` values (or a function returning\n * either a string or object)\n *\n * Either string or format.pos must contain \"%v\" (value) to be valid\n */\n\n\n function checkCurrencyFormat(format) {\n var defaults = lib.settings.currency.format; // Allow function as format parameter (should return string or object):\n\n if (typeof format === \"function\") format = format(); // Format can be a string, in which case `value` (\"%v\") must be present:\n\n if (isString(format) && format.match(\"%v\")) {\n // Create and return positive, negative and zero formats:\n return {\n pos: format,\n neg: format.replace(\"-\", \"\").replace(\"%v\", \"-%v\"),\n zero: format\n }; // If no format, or object is missing valid positive value, use defaults:\n } else if (!format || !format.pos || !format.pos.match(\"%v\")) {\n // If defaults is a string, casts it to an object for faster checking next time:\n return !isString(defaults) ? defaults : lib.settings.currency.format = {\n pos: defaults,\n neg: defaults.replace(\"%v\", \"-%v\"),\n zero: defaults\n };\n } // Otherwise, assume format was fine:\n\n\n return format;\n }\n /* --- API Methods --- */\n\n /**\n * Takes a string/array of strings, removes all formatting/cruft and returns the raw float value\n * Alias: `accounting.parse(string)`\n *\n * Decimal must be included in the regular expression to match floats (defaults to\n * accounting.settings.number.decimal), so if the number uses a non-standard decimal \n * separator, provide it as the second argument.\n *\n * Also matches bracketed negatives (eg. \"$ (1.99)\" => -1.99)\n *\n * Doesn't throw any errors (`NaN`s become 0) but this may change in future\n */\n\n\n var unformat = lib.unformat = lib.parse = function (value, decimal) {\n // Recursively unformat arrays:\n if (isArray(value)) {\n return map(value, function (val) {\n return unformat(val, decimal);\n });\n } // Fails silently (need decent errors):\n\n\n value = value || 0; // Return the value as-is if it's already a number:\n\n if (typeof value === \"number\") return value; // Default decimal point comes from settings, but could be set to eg. \",\" in opts:\n\n decimal = decimal || lib.settings.number.decimal; // Build regex to strip out everything except digits, decimal point and minus sign:\n\n var regex = new RegExp(\"[^0-9-\" + decimal + \"]\", [\"g\"]),\n unformatted = parseFloat((\"\" + value).replace(/\\((.*)\\)/, \"-$1\") // replace bracketed values with negatives\n .replace(regex, '') // strip out any cruft\n .replace(decimal, '.') // make sure decimal point is standard\n ); // This will fail silently which may cause trouble, let's wait and see:\n\n return !isNaN(unformatted) ? unformatted : 0;\n };\n /**\n * Implementation of toFixed() that treats floats more like decimals\n *\n * Fixes binary rounding issues (eg. (0.615).toFixed(2) === \"0.61\") that present\n * problems for accounting- and finance-related software.\n */\n\n\n var toFixed = lib.toFixed = function (value, precision) {\n precision = checkPrecision(precision, lib.settings.number.precision);\n var power = Math.pow(10, precision); // Multiply up by precision, round accurately, then divide and use native toFixed():\n\n return (Math.round(lib.unformat(value) * power) / power).toFixed(precision);\n };\n /**\n * Format a number, with comma-separated thousands and custom precision/decimal places\n * Alias: `accounting.format()`\n *\n * Localise by overriding the precision and thousand / decimal separators\n * 2nd parameter `precision` can be an object matching `settings.number`\n */\n\n\n var formatNumber = lib.formatNumber = lib.format = function (number, precision, thousand, decimal) {\n // Resursively format arrays:\n if (isArray(number)) {\n return map(number, function (val) {\n return formatNumber(val, precision, thousand, decimal);\n });\n } // Clean up number:\n\n\n number = unformat(number); // Build options object from second param (if object) or all params, extending defaults:\n\n var opts = defaults(isObject(precision) ? precision : {\n precision: precision,\n thousand: thousand,\n decimal: decimal\n }, lib.settings.number),\n // Clean up precision\n usePrecision = checkPrecision(opts.precision),\n // Do some calc:\n negative = number < 0 ? \"-\" : \"\",\n base = parseInt(toFixed(Math.abs(number || 0), usePrecision), 10) + \"\",\n mod = base.length > 3 ? base.length % 3 : 0; // Format the number:\n\n return negative + (mod ? base.substr(0, mod) + opts.thousand : \"\") + base.substr(mod).replace(/(\\d{3})(?=\\d)/g, \"$1\" + opts.thousand) + (usePrecision ? opts.decimal + toFixed(Math.abs(number), usePrecision).split('.')[1] : \"\");\n };\n /**\n * Format a number into currency\n *\n * Usage: accounting.formatMoney(number, symbol, precision, thousandsSep, decimalSep, format)\n * defaults: (0, \"$\", 2, \",\", \".\", \"%s%v\")\n *\n * Localise by overriding the symbol, precision, thousand / decimal separators and format\n * Second param can be an object matching `settings.currency` which is the easiest way.\n *\n * To do: tidy up the parameters\n */\n\n\n var formatMoney = lib.formatMoney = function (number, symbol, precision, thousand, decimal, format) {\n // Resursively format arrays:\n if (isArray(number)) {\n return map(number, function (val) {\n return formatMoney(val, symbol, precision, thousand, decimal, format);\n });\n } // Clean up number:\n\n\n number = unformat(number); // Build options object from second param (if object) or all params, extending defaults:\n\n var opts = defaults(isObject(symbol) ? symbol : {\n symbol: symbol,\n precision: precision,\n thousand: thousand,\n decimal: decimal,\n format: format\n }, lib.settings.currency),\n // Check format (returns object with pos, neg and zero):\n formats = checkCurrencyFormat(opts.format),\n // Choose which format to use for this value:\n useFormat = number > 0 ? formats.pos : number < 0 ? formats.neg : formats.zero; // Return with currency symbol added:\n\n return useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(number), checkPrecision(opts.precision), opts.thousand, opts.decimal));\n };\n /**\n * Format a list of numbers into an accounting column, padding with whitespace\n * to line up currency symbols, thousand separators and decimals places\n *\n * List should be an array of numbers\n * Second parameter can be an object containing keys that match the params\n *\n * Returns array of accouting-formatted number strings of same length\n *\n * NB: `white-space:pre` CSS rule is required on the list container to prevent\n * browsers from collapsing the whitespace in the output strings.\n */\n\n\n lib.formatColumn = function (list, symbol, precision, thousand, decimal, format) {\n if (!list) return []; // Build options object from second param (if object) or all params, extending defaults:\n\n var opts = defaults(isObject(symbol) ? symbol : {\n symbol: symbol,\n precision: precision,\n thousand: thousand,\n decimal: decimal,\n format: format\n }, lib.settings.currency),\n // Check format (returns object with pos, neg and zero), only need pos for now:\n formats = checkCurrencyFormat(opts.format),\n // Whether to pad at start of string or after currency symbol:\n padAfterSymbol = formats.pos.indexOf(\"%s\") < formats.pos.indexOf(\"%v\") ? true : false,\n // Store value for the length of the longest string in the column:\n maxLength = 0,\n // Format the list according to options, store the length of the longest string:\n formatted = map(list, function (val, i) {\n if (isArray(val)) {\n // Recursively format columns if list is a multi-dimensional array:\n return lib.formatColumn(val, opts);\n } else {\n // Clean up the value\n val = unformat(val); // Choose which format to use for this value (pos, neg or zero):\n\n var useFormat = val > 0 ? formats.pos : val < 0 ? formats.neg : formats.zero,\n // Format this value, push into formatted list and save the length:\n fVal = useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(val), checkPrecision(opts.precision), opts.thousand, opts.decimal));\n if (fVal.length > maxLength) maxLength = fVal.length;\n return fVal;\n }\n }); // Pad each number in the list and send back the column of numbers:\n\n return map(formatted, function (val, i) {\n // Only if this is a string (not a nested array, which would have already been padded):\n if (isString(val) && val.length < maxLength) {\n // Depending on symbol position, pad after symbol or at index 0:\n return padAfterSymbol ? val.replace(opts.symbol, opts.symbol + new Array(maxLength - val.length + 1).join(\" \")) : new Array(maxLength - val.length + 1).join(\" \") + val;\n }\n\n return val;\n });\n };\n /* --- Module Definition --- */\n // Export accounting for CommonJS. If being loaded as an AMD module, define it as such.\n // Otherwise, just add `accounting` to the global object\n\n\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = lib;\n }\n\n exports.accounting = lib;\n } else if (typeof define === 'function' && define.amd) {\n // Return the library as an AMD module:\n define([], function () {\n return lib;\n });\n } else {\n // Use accounting.noConflict to restore `accounting` back to its original value.\n // Returns a reference to the library's `accounting` object;\n // e.g. `var numbers = accounting.noConflict();`\n lib.noConflict = function (oldAccounting) {\n return function () {\n // Reset the value of the root's `accounting` variable:\n root.accounting = oldAccounting; // Delete the noConflict method:\n\n lib.noConflict = undefined; // Return reference to the library to re-assign it:\n\n return lib;\n };\n }(root.accounting); // Declare `fx` on the root (global/window) object:\n\n\n root['accounting'] = lib;\n } // Root will be `window` in browser or `global` on the server:\n\n})(this);","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n\n return to;\n};","var map = require(\"./map\");\n\nvar getCountryCode = function getCountryCode(localeString) {\n var components = localeString.split(\"_\");\n\n if (components.length == 2) {\n return components.pop();\n }\n\n components = localeString.split(\"-\");\n\n if (components.length == 2) {\n return components.pop();\n }\n\n return localeString;\n};\n\nexports.getCurrency = function (locale) {\n var countryCode = getCountryCode(locale).toUpperCase();\n\n if (countryCode in map) {\n return map[countryCode];\n }\n\n return null;\n};\n\nexports.getLocales = function (currencyCode) {\n currencyCode = currencyCode.toUpperCase();\n var locales = [];\n\n for (countryCode in map) {\n if (map[countryCode] === currencyCode) {\n locales.push(countryCode);\n }\n }\n\n return locales;\n};","// Generated using ShowCurrencies.java\nvar map = {\n AD: 'EUR',\n AE: 'AED',\n AF: 'AFN',\n AG: 'XCD',\n AI: 'XCD',\n AL: 'ALL',\n AM: 'AMD',\n AN: 'ANG',\n AO: 'AOA',\n AR: 'ARS',\n AS: 'USD',\n AT: 'EUR',\n AU: 'AUD',\n AW: 'AWG',\n AX: 'EUR',\n AZ: 'AZN',\n BA: 'BAM',\n BB: 'BBD',\n BD: 'BDT',\n BE: 'EUR',\n BF: 'XOF',\n BG: 'BGN',\n BH: 'BHD',\n BI: 'BIF',\n BJ: 'XOF',\n BL: 'EUR',\n BM: 'BMD',\n BN: 'BND',\n BO: 'BOB',\n BQ: 'USD',\n BR: 'BRL',\n BS: 'BSD',\n BT: 'BTN',\n BV: 'NOK',\n BW: 'BWP',\n BY: 'BYR',\n BZ: 'BZD',\n CA: 'CAD',\n CC: 'AUD',\n CD: 'CDF',\n CF: 'XAF',\n CG: 'XAF',\n CH: 'CHF',\n CI: 'XOF',\n CK: 'NZD',\n CL: 'CLP',\n CM: 'XAF',\n CN: 'CNY',\n CO: 'COP',\n CR: 'CRC',\n CU: 'CUP',\n CV: 'CVE',\n CW: 'ANG',\n CX: 'AUD',\n CY: 'EUR',\n CZ: 'CZK',\n DE: 'EUR',\n DJ: 'DJF',\n DK: 'DKK',\n DM: 'XCD',\n DO: 'DOP',\n DZ: 'DZD',\n EC: 'USD',\n EE: 'EUR',\n EG: 'EGP',\n EH: 'MAD',\n ER: 'ERN',\n ES: 'EUR',\n ET: 'ETB',\n FI: 'EUR',\n FJ: 'FJD',\n FK: 'FKP',\n FM: 'USD',\n FO: 'DKK',\n FR: 'EUR',\n GA: 'XAF',\n GB: 'GBP',\n GD: 'XCD',\n GE: 'GEL',\n GF: 'EUR',\n GG: 'GBP',\n GH: 'GHS',\n GI: 'GIP',\n GL: 'DKK',\n GM: 'GMD',\n GN: 'GNF',\n GP: 'EUR',\n GQ: 'XAF',\n GR: 'EUR',\n GS: 'GBP',\n GT: 'GTQ',\n GU: 'USD',\n GW: 'XOF',\n GY: 'GYD',\n HK: 'HKD',\n HM: 'AUD',\n HN: 'HNL',\n HR: 'HRK',\n HT: 'HTG',\n HU: 'HUF',\n ID: 'IDR',\n IE: 'EUR',\n IL: 'ILS',\n IM: 'GBP',\n IN: 'INR',\n IO: 'USD',\n IQ: 'IQD',\n IR: 'IRR',\n IS: 'ISK',\n IT: 'EUR',\n JE: 'GBP',\n JM: 'JMD',\n JO: 'JOD',\n JP: 'JPY',\n KE: 'KES',\n KG: 'KGS',\n KH: 'KHR',\n KI: 'AUD',\n KM: 'KMF',\n KN: 'XCD',\n KP: 'KPW',\n KR: 'KRW',\n KW: 'KWD',\n KY: 'KYD',\n KZ: 'KZT',\n LA: 'LAK',\n LB: 'LBP',\n LC: 'XCD',\n LI: 'CHF',\n LK: 'LKR',\n LR: 'LRD',\n LS: 'LSL',\n LT: 'LTL',\n LU: 'EUR',\n LV: 'LVL',\n LY: 'LYD',\n MA: 'MAD',\n MC: 'EUR',\n MD: 'MDL',\n ME: 'EUR',\n MF: 'EUR',\n MG: 'MGA',\n MH: 'USD',\n MK: 'MKD',\n ML: 'XOF',\n MM: 'MMK',\n MN: 'MNT',\n MO: 'MOP',\n MP: 'USD',\n MQ: 'EUR',\n MR: 'MRO',\n MS: 'XCD',\n MT: 'EUR',\n MU: 'MUR',\n MV: 'MVR',\n MW: 'MWK',\n MX: 'MXN',\n MY: 'MYR',\n MZ: 'MZN',\n NA: 'NAD',\n NC: 'XPF',\n NE: 'XOF',\n NF: 'AUD',\n NG: 'NGN',\n NI: 'NIO',\n NL: 'EUR',\n NO: 'NOK',\n NP: 'NPR',\n NR: 'AUD',\n NU: 'NZD',\n NZ: 'NZD',\n OM: 'OMR',\n PA: 'PAB',\n PE: 'PEN',\n PF: 'XPF',\n PG: 'PGK',\n PH: 'PHP',\n PK: 'PKR',\n PL: 'PLN',\n PM: 'EUR',\n PN: 'NZD',\n PR: 'USD',\n PS: 'ILS',\n PT: 'EUR',\n PW: 'USD',\n PY: 'PYG',\n QA: 'QAR',\n RE: 'EUR',\n RO: 'RON',\n RS: 'RSD',\n RU: 'RUB',\n RW: 'RWF',\n SA: 'SAR',\n SB: 'SBD',\n SC: 'SCR',\n SD: 'SDG',\n SE: 'SEK',\n SG: 'SGD',\n SH: 'SHP',\n SI: 'EUR',\n SJ: 'NOK',\n SK: 'EUR',\n SL: 'SLL',\n SM: 'EUR',\n SN: 'XOF',\n SO: 'SOS',\n SR: 'SRD',\n ST: 'STD',\n SV: 'SVC',\n SX: 'ANG',\n SY: 'SYP',\n SZ: 'SZL',\n TC: 'USD',\n TD: 'XAF',\n TF: 'EUR',\n TG: 'XOF',\n TH: 'THB',\n TJ: 'TJS',\n TK: 'NZD',\n TL: 'USD',\n TM: 'TMT',\n TN: 'TND',\n TO: 'TOP',\n TR: 'TRY',\n TT: 'TTD',\n TV: 'AUD',\n TW: 'TWD',\n TZ: 'TZS',\n UA: 'UAH',\n UG: 'UGX',\n UM: 'USD',\n US: 'USD',\n UY: 'UYU',\n UZ: 'UZS',\n VA: 'EUR',\n VC: 'XCD',\n VE: 'VEF',\n VG: 'USD',\n VI: 'USD',\n VN: 'VND',\n VU: 'VUV',\n WF: 'XPF',\n WS: 'WST',\n YE: 'YER',\n YT: 'EUR',\n ZA: 'ZAR',\n ZM: 'ZMK',\n ZW: 'ZWL'\n};\nmodule.exports = map;","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--2-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--2-2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./materialize_input.vue?vue&type=style&index=0&id=be0088e0&scoped=true&lang=css&\"","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var af = moment.defineLocale('af', {\n months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),\n weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM: function isPM(input) {\n return /^nm$/i.test(input);\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Vandag om] LT',\n nextDay: '[Môre om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[Gister om] LT',\n lastWeek: '[Laas] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'oor %s',\n past: '%s gelede',\n s: '\\'n paar sekondes',\n ss: '%d sekondes',\n m: '\\'n minuut',\n mm: '%d minute',\n h: '\\'n uur',\n hh: '%d ure',\n d: '\\'n dag',\n dd: '%d dae',\n M: '\\'n maand',\n MM: '%d maande',\n y: '\\'n jaar',\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week: {\n dow: 1,\n // Maandag is die eerste dag van die week.\n doy: 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n\n }\n });\n return af;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '١',\n '2': '٢',\n '3': '٣',\n '4': '٤',\n '5': '٥',\n '6': '٦',\n '7': '٧',\n '8': '٨',\n '9': '٩',\n '0': '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n },\n pluralForm = function pluralForm(n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n },\n plurals = {\n s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n },\n pluralize = function pluralize(u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n\n return str.replace(/%d/i, number);\n };\n },\n months = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];\n\n var ar = moment.defineLocale('ar', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: \"D/\\u200FM/\\u200FYYYY\",\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y')\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return ar;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var arDz = moment.defineLocale('ar-dz', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return arDz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var arKw = moment.defineLocale('ar-kw', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return arKw;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n '0': '0'\n },\n pluralForm = function pluralForm(n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n },\n plurals = {\n s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n },\n pluralize = function pluralize(u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n\n return str.replace(/%d/i, number);\n };\n },\n months = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];\n\n var arLy = moment.defineLocale('ar-ly', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: \"D/\\u200FM/\\u200FYYYY\",\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y')\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return arLy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var arMa = moment.defineLocale('ar-ma', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return arMa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '١',\n '2': '٢',\n '3': '٣',\n '4': '٤',\n '5': '٥',\n '6': '٦',\n '7': '٧',\n '8': '٨',\n '9': '٩',\n '0': '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n };\n var arSa = moment.defineLocale('ar-sa', {\n months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return arSa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return arTn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı'\n };\n var az = moment.defineLocale('az', {\n months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),\n monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),\n weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[sabah saat] LT',\n nextWeek: '[gələn həftə] dddd [saat] LT',\n lastDay: '[dünən] LT',\n lastWeek: '[keçən həftə] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s əvvəl',\n s: 'birneçə saniyə',\n ss: '%d saniyə',\n m: 'bir dəqiqə',\n mm: '%d dəqiqə',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir il',\n yy: '%d il'\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM: function isPM(input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal: function ordinal(number) {\n if (number === 0) {\n // special case for zero\n return number + '-ıncı';\n }\n\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return az;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n 'dd': 'дзень_дні_дзён',\n 'MM': 'месяц_месяцы_месяцаў',\n 'yy': 'год_гады_гадоў'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n } else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var be = moment.defineLocale('be', {\n months: {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),\n standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')\n },\n monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays: {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),\n standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),\n isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/\n },\n weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., HH:mm',\n LLLL: 'dddd, D MMMM YYYY г., HH:mm'\n },\n calendar: {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function nextWeek() {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'праз %s',\n past: '%s таму',\n s: 'некалькі секунд',\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithPlural,\n hh: relativeTimeWithPlural,\n d: 'дзень',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM: function isPM(input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) && number % 100 !== 12 && number % 100 !== 13 ? number + '-і' : number + '-ы';\n\n case 'D':\n return number + '-га';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return be;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var bg = moment.defineLocale('bg', {\n months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),\n monthsShort: 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),\n weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Днес в] LT',\n nextDay: '[Утре в] LT',\n nextWeek: 'dddd [в] LT',\n lastDay: '[Вчера в] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[В изминалата] dddd [в] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[В изминалия] dddd [в] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'след %s',\n past: 'преди %s',\n s: 'няколко секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дни',\n M: 'месец',\n MM: '%d месеца',\n y: 'година',\n yy: '%d години'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function ordinal(number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return bg;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var bm = moment.defineLocale('bm', {\n months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'),\n monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'MMMM [tile] D [san] YYYY',\n LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm'\n },\n calendar: {\n sameDay: '[Bi lɛrɛ] LT',\n nextDay: '[Sini lɛrɛ] LT',\n nextWeek: 'dddd [don lɛrɛ] LT',\n lastDay: '[Kunu lɛrɛ] LT',\n lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s kɔnɔ',\n past: 'a bɛ %s bɔ',\n s: 'sanga dama dama',\n ss: 'sekondi %d',\n m: 'miniti kelen',\n mm: 'miniti %d',\n h: 'lɛrɛ kelen',\n hh: 'lɛrɛ %d',\n d: 'tile kelen',\n dd: 'tile %d',\n M: 'kalo kelen',\n MM: 'kalo %d',\n y: 'san kelen',\n yy: 'san %d'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return bm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '১',\n '2': '২',\n '3': '৩',\n '4': '৪',\n '5': '৫',\n '6': '৬',\n '7': '৭',\n '8': '৮',\n '9': '৯',\n '0': '০'\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0'\n };\n var bn = moment.defineLocale('bn', {\n months: 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),\n monthsShort: 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়'\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর'\n },\n preparse: function preparse(string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'রাত' && hour >= 4 || meridiem === 'দুপুর' && hour < 5 || meridiem === 'বিকাল') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return bn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '༡',\n '2': '༢',\n '3': '༣',\n '4': '༤',\n '5': '༥',\n '6': '༦',\n '7': '༧',\n '8': '༨',\n '9': '༩',\n '0': '༠'\n },\n numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0'\n };\n var bo = moment.defineLocale('bo', {\n months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n monthsShort: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),\n weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n weekdaysMin: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[དི་རིང] LT',\n nextDay: '[སང་ཉིན] LT',\n nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay: '[ཁ་སང] LT',\n lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ལ་',\n past: '%s སྔན་ལ',\n s: 'ལམ་སང',\n ss: '%d སྐར་ཆ།',\n m: 'སྐར་མ་གཅིག',\n mm: '%d སྐར་མ',\n h: 'ཆུ་ཚོད་གཅིག',\n hh: '%d ཆུ་ཚོད',\n d: 'ཉིན་གཅིག',\n dd: '%d ཉིན་',\n M: 'ཟླ་བ་གཅིག',\n MM: '%d ཟླ་བ',\n y: 'ལོ་གཅིག',\n yy: '%d ལོ'\n },\n preparse: function preparse(string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'མཚན་མོ' && hour >= 4 || meridiem === 'ཉིན་གུང' && hour < 5 || meridiem === 'དགོང་དག') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return bo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n 'mm': 'munutenn',\n 'MM': 'miz',\n 'dd': 'devezh'\n };\n return number + ' ' + mutation(format[key], number);\n }\n\n function specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n\n default:\n return number + ' vloaz';\n }\n }\n\n function lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n\n return number;\n }\n\n function mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n\n return text;\n }\n\n function softMutation(text) {\n var mutationTable = {\n 'm': 'v',\n 'b': 'v',\n 'd': 'z'\n };\n\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n\n return mutationTable[text.charAt(0)] + text.substring(1);\n }\n\n var br = moment.defineLocale('br', {\n months: 'Genver_C\\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),\n monthsShort: 'Gen_C\\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays: 'Sul_Lun_Meurzh_Merc\\'her_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h[e]mm A',\n LTS: 'h[e]mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [a viz] MMMM YYYY',\n LLL: 'D [a viz] MMMM YYYY h[e]mm A',\n LLLL: 'dddd, D [a viz] MMMM YYYY h[e]mm A'\n },\n calendar: {\n sameDay: '[Hiziv da] LT',\n nextDay: '[Warc\\'hoazh da] LT',\n nextWeek: 'dddd [da] LT',\n lastDay: '[Dec\\'h da] LT',\n lastWeek: 'dddd [paset da] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'a-benn %s',\n past: '%s \\'zo',\n s: 'un nebeud segondennoù',\n ss: '%d eilenn',\n m: 'ur vunutenn',\n mm: relativeTimeWithMutation,\n h: 'un eur',\n hh: '%d eur',\n d: 'un devezh',\n dd: relativeTimeWithMutation,\n M: 'ur miz',\n MM: relativeTimeWithMutation,\n y: 'ur bloaz',\n yy: specialMutationForYears\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'añ' : 'vet';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return br;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n\n return result;\n\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n\n return result;\n\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n\n return result;\n\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n\n return result;\n }\n }\n\n var bs = moment.defineLocale('bs', {\n months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n\n case 6:\n return '[prošle] [subote] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return bs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ca = moment.defineLocale('ca', {\n months: {\n standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),\n format: 'de gener_de febrer_de març_d\\'abril_de maig_de juny_de juliol_d\\'agost_de setembre_d\\'octubre_de novembre_de desembre'.split('_'),\n isFormat: /D[oD]?(\\s)+MMMM/\n },\n monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),\n weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a les] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n llll: 'ddd D MMM YYYY, H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextDay: function nextDay() {\n return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [passat a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'd\\'aquí %s',\n past: 'fa %s',\n s: 'uns segons',\n ss: '%d segons',\n m: 'un minut',\n mm: '%d minuts',\n h: 'una hora',\n hh: '%d hores',\n d: 'un dia',\n dd: '%d dies',\n M: 'un mes',\n MM: '%d mesos',\n y: 'un any',\n yy: '%d anys'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function ordinal(number, period) {\n var output = number === 1 ? 'r' : number === 2 ? 'n' : number === 3 ? 'r' : number === 4 ? 't' : 'è';\n\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ca;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');\n var monthsParse = [/^led/i, /^úno/i, /^bře/i, /^dub/i, /^kvě/i, /^(čvn|červen$|června)/i, /^(čvc|červenec|července)/i, /^srp/i, /^zář/i, /^říj/i, /^lis/i, /^pro/i]; // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n\n var monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n function plural(n) {\n return n > 1 && n < 5 && ~~(n / 10) !== 1;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n\n case 'ss':\n // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekund');\n } else {\n return result + 'sekundami';\n }\n\n break;\n\n case 'm':\n // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n\n case 'mm':\n // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n\n break;\n\n case 'h':\n // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n\n case 'hh':\n // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n\n break;\n\n case 'd':\n // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'den' : 'dnem';\n\n case 'dd':\n // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n\n break;\n\n case 'M':\n // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n\n case 'MM':\n // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n\n break;\n\n case 'y':\n // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokem';\n\n case 'yy':\n // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n\n break;\n }\n }\n\n var cs = moment.defineLocale('cs', {\n months: months,\n monthsShort: monthsShort,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n l: 'D. M. YYYY'\n },\n calendar: {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n\n case 3:\n return '[ve středu v] LT';\n\n case 4:\n return '[ve čtvrtek v] LT';\n\n case 5:\n return '[v pátek v] LT';\n\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n\n case 3:\n return '[minulou středu v] LT';\n\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'před %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return cs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var cv = moment.defineLocale('cv', {\n months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),\n monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),\n weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'\n },\n calendar: {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(output) {\n var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';\n return output + affix;\n },\n past: '%s каялла',\n s: 'пӗр-ик ҫеккунт',\n ss: '%d ҫеккунт',\n m: 'пӗр минут',\n mm: '%d минут',\n h: 'пӗр сехет',\n hh: '%d сехет',\n d: 'пӗр кун',\n dd: '%d кун',\n M: 'пӗр уйӑх',\n MM: '%d уйӑх',\n y: 'пӗр ҫул',\n yy: '%d ҫул'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal: '%d-мӗш',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return cv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),\n weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n ss: '%d eiliad',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function ordinal(number) {\n var b = number,\n output = '',\n lookup = ['', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed\n 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed\n ];\n\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return cy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var da = moment.defineLocale('da', {\n months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'på dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[i] dddd[s kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'få sekunder',\n ss: '%d sekunder',\n m: 'et minut',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dage',\n M: 'en måned',\n MM: '%d måneder',\n y: 'et år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return da;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 'm': ['eine Minute', 'einer Minute'],\n 'h': ['eine Stunde', 'einer Stunde'],\n 'd': ['ein Tag', 'einem Tag'],\n 'dd': [number + ' Tage', number + ' Tagen'],\n 'M': ['ein Monat', 'einem Monat'],\n 'MM': [number + ' Monate', number + ' Monaten'],\n 'y': ['ein Jahr', 'einem Jahr'],\n 'yy': [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var de = moment.defineLocale('de', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return de;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 'm': ['eine Minute', 'einer Minute'],\n 'h': ['eine Stunde', 'einer Stunde'],\n 'd': ['ein Tag', 'einem Tag'],\n 'dd': [number + ' Tage', number + ' Tagen'],\n 'M': ['ein Monat', 'einem Monat'],\n 'MM': [number + ' Monate', number + ' Monaten'],\n 'y': ['ein Jahr', 'einem Jahr'],\n 'yy': [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deAt = moment.defineLocale('de-at', {\n months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return deAt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 'm': ['eine Minute', 'einer Minute'],\n 'h': ['eine Stunde', 'einer Stunde'],\n 'd': ['ein Tag', 'einem Tag'],\n 'dd': [number + ' Tage', number + ' Tagen'],\n 'M': ['ein Monat', 'einem Monat'],\n 'MM': [number + ' Monate', number + ' Monaten'],\n 'y': ['ein Jahr', 'einem Jahr'],\n 'yy': [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deCh = moment.defineLocale('de-ch', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return deCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var months = ['ޖެނުއަރީ', 'ފެބްރުއަރީ', 'މާރިޗު', 'އޭޕްރީލު', 'މޭ', 'ޖޫން', 'ޖުލައި', 'އޯގަސްޓު', 'ސެޕްޓެމްބަރު', 'އޮކްޓޯބަރު', 'ނޮވެމްބަރު', 'ޑިސެމްބަރު'],\n weekdays = ['އާދިއްތަ', 'ހޯމަ', 'އަންގާރަ', 'ބުދަ', 'ބުރާސްފަތި', 'ހުކުރު', 'ހޮނިހިރު'];\n var dv = moment.defineLocale('dv', {\n months: months,\n monthsShort: months,\n weekdays: weekdays,\n weekdaysShort: weekdays,\n weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/M/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /މކ|މފ/,\n isPM: function isPM(input) {\n return 'މފ' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar: {\n sameDay: '[މިއަދު] LT',\n nextDay: '[މާދަމާ] LT',\n nextWeek: 'dddd LT',\n lastDay: '[އިއްޔެ] LT',\n lastWeek: '[ފާއިތުވި] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ތެރޭގައި %s',\n past: 'ކުރިން %s',\n s: 'ސިކުންތުކޮޅެއް',\n ss: 'd% ސިކުންތު',\n m: 'މިނިޓެއް',\n mm: 'މިނިޓު %d',\n h: 'ގަޑިއިރެއް',\n hh: 'ގަޑިއިރު %d',\n d: 'ދުވަހެއް',\n dd: 'ދުވަސް %d',\n M: 'މަހެއް',\n MM: 'މަސް %d',\n y: 'އަހަރެއް',\n yy: 'އަހަރު %d'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 7,\n // Sunday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return dv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function isFunction(input) {\n return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n var el = moment.defineLocale('el', {\n monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),\n monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),\n months: function months(momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) {\n // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),\n weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM: function isPM(input) {\n return (input + '').toLowerCase()[0] === 'μ';\n },\n meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendarEl: {\n sameDay: '[Σήμερα {}] LT',\n nextDay: '[Αύριο {}] LT',\n nextWeek: 'dddd [{}] LT',\n lastDay: '[Χθες {}] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse: 'L'\n },\n calendar: function calendar(key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n\n return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n },\n relativeTime: {\n future: 'σε %s',\n past: '%s πριν',\n s: 'λίγα δευτερόλεπτα',\n ss: '%d δευτερόλεπτα',\n m: 'ένα λεπτό',\n mm: '%d λεπτά',\n h: 'μία ώρα',\n hh: '%d ώρες',\n d: 'μία μέρα',\n dd: '%d μέρες',\n M: 'ένας μήνας',\n MM: '%d μήνες',\n y: 'ένας χρόνος',\n yy: '%d χρόνια'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4st is the first week of the year.\n\n }\n });\n return el;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var enSG = moment.defineLocale('en-SG', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enSG;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var enAu = moment.defineLocale('en-au', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enAu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var enCa = moment.defineLocale('en-ca', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'YYYY-MM-DD',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n });\n return enCa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var enGb = moment.defineLocale('en-gb', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enGb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var enIe = moment.defineLocale('en-ie', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enIe;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n });\n return enIl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enNz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var eo = moment.defineLocale('eo', {\n months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),\n weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D[-a de] MMMM, YYYY',\n LLL: 'D[-a de] MMMM, YYYY HH:mm',\n LLLL: 'dddd, [la] D[-a de] MMMM, YYYY HH:mm'\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function isPM(input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar: {\n sameDay: '[Hodiaŭ je] LT',\n nextDay: '[Morgaŭ je] LT',\n nextWeek: 'dddd [je] LT',\n lastDay: '[Hieraŭ je] LT',\n lastWeek: '[pasinta] dddd [je] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'post %s',\n past: 'antaŭ %s',\n s: 'sekundoj',\n ss: '%d sekundoj',\n m: 'minuto',\n mm: '%d minutoj',\n h: 'horo',\n hh: '%d horoj',\n d: 'tago',\n //ne 'diurno', ĉar estas uzita por proksimumo\n dd: '%d tagoj',\n M: 'monato',\n MM: '%d monatoj',\n y: 'jaro',\n yy: '%d jaroj'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal: '%da',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return eo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\n var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];\n var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n var es = moment.defineLocale('es', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return es;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\n var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];\n var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n var esDo = moment.defineLocale('es-do', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return esDo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');\n\n var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];\n var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n var esUs = moment.defineLocale('es-us', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'MM/DD/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return esUs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 's': ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n 'ss': [number + 'sekundi', number + 'sekundit'],\n 'm': ['ühe minuti', 'üks minut'],\n 'mm': [number + ' minuti', number + ' minutit'],\n 'h': ['ühe tunni', 'tund aega', 'üks tund'],\n 'hh': [number + ' tunni', number + ' tundi'],\n 'd': ['ühe päeva', 'üks päev'],\n 'M': ['kuu aja', 'kuu aega', 'üks kuu'],\n 'MM': [number + ' kuu', number + ' kuud'],\n 'y': ['ühe aasta', 'aasta', 'üks aasta'],\n 'yy': [number + ' aasta', number + ' aastat']\n };\n\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var et = moment.defineLocale('et', {\n months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),\n monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),\n weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Täna,] LT',\n nextDay: '[Homme,] LT',\n nextWeek: '[Järgmine] dddd LT',\n lastDay: '[Eile,] LT',\n lastWeek: '[Eelmine] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s pärast',\n past: '%s tagasi',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: '%d päeva',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return et;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var eu = moment.defineLocale('eu', {\n months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),\n monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),\n monthsParseExact: true,\n weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),\n weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY[ko] MMMM[ren] D[a]',\n LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l: 'YYYY-M-D',\n ll: 'YYYY[ko] MMM D[a]',\n lll: 'YYYY[ko] MMM D[a] HH:mm',\n llll: 'ddd, YYYY[ko] MMM D[a] HH:mm'\n },\n calendar: {\n sameDay: '[gaur] LT[etan]',\n nextDay: '[bihar] LT[etan]',\n nextWeek: 'dddd LT[etan]',\n lastDay: '[atzo] LT[etan]',\n lastWeek: '[aurreko] dddd LT[etan]',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s barru',\n past: 'duela %s',\n s: 'segundo batzuk',\n ss: '%d segundo',\n m: 'minutu bat',\n mm: '%d minutu',\n h: 'ordu bat',\n hh: '%d ordu',\n d: 'egun bat',\n dd: '%d egun',\n M: 'hilabete bat',\n MM: '%d hilabete',\n y: 'urte bat',\n yy: '%d urte'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return eu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '۱',\n '2': '۲',\n '3': '۳',\n '4': '۴',\n '5': '۵',\n '6': '۶',\n '7': '۷',\n '8': '۸',\n '9': '۹',\n '0': '۰'\n },\n numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0'\n };\n var fa = moment.defineLocale('fa', {\n months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n weekdays: \"\\u06CC\\u06A9\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062F\\u0648\\u0634\\u0646\\u0628\\u0647_\\u0633\\u0647\\u200C\\u0634\\u0646\\u0628\\u0647_\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647_\\u067E\\u0646\\u062C\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062C\\u0645\\u0639\\u0647_\\u0634\\u0646\\u0628\\u0647\".split('_'),\n weekdaysShort: \"\\u06CC\\u06A9\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062F\\u0648\\u0634\\u0646\\u0628\\u0647_\\u0633\\u0647\\u200C\\u0634\\u0646\\u0628\\u0647_\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647_\\u067E\\u0646\\u062C\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062C\\u0645\\u0639\\u0647_\\u0634\\u0646\\u0628\\u0647\".split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function isPM(input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar: {\n sameDay: '[امروز ساعت] LT',\n nextDay: '[فردا ساعت] LT',\n nextWeek: 'dddd [ساعت] LT',\n lastDay: '[دیروز ساعت] LT',\n lastWeek: 'dddd [پیش] [ساعت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'در %s',\n past: '%s پیش',\n s: 'چند ثانیه',\n ss: 'ثانیه d%',\n m: 'یک دقیقه',\n mm: '%d دقیقه',\n h: 'یک ساعت',\n hh: '%d ساعت',\n d: 'یک روز',\n dd: '%d روز',\n M: 'یک ماه',\n MM: '%d ماه',\n y: 'یک سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal: '%dم',\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return fa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),\n numbersFuture = ['nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', numbersPast[7], numbersPast[8], numbersPast[9]];\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n\n case 'ss':\n return isFuture ? 'sekunnin' : 'sekuntia';\n\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n }\n\n function verbalNumber(number, isFuture) {\n return number < 10 ? isFuture ? numbersFuture[number] : numbersPast[number] : number;\n }\n\n var fi = moment.defineLocale('fi', {\n months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),\n monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),\n weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),\n weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[ta] YYYY',\n LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l: 'D.M.YYYY',\n ll: 'Do MMM YYYY',\n lll: 'Do MMM YYYY, [klo] HH.mm',\n llll: 'ddd, Do MMM YYYY, [klo] HH.mm'\n },\n calendar: {\n sameDay: '[tänään] [klo] LT',\n nextDay: '[huomenna] [klo] LT',\n nextWeek: 'dddd [klo] LT',\n lastDay: '[eilen] [klo] LT',\n lastWeek: '[viime] dddd[na] [klo] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s päästä',\n past: '%s sitten',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var fo = moment.defineLocale('fo', {\n months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),\n weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D. MMMM, YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Í dag kl.] LT',\n nextDay: '[Í morgin kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[Í gjár kl.] LT',\n lastWeek: '[síðstu] dddd [kl] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'um %s',\n past: '%s síðani',\n s: 'fá sekund',\n ss: '%d sekundir',\n m: 'ein minuttur',\n mm: '%d minuttir',\n h: 'ein tími',\n hh: '%d tímar',\n d: 'ein dagur',\n dd: '%d dagar',\n M: 'ein mánaður',\n MM: '%d mánaðir',\n y: 'eitt ár',\n yy: '%d ár'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var fr = moment.defineLocale('fr', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n // Words with masculine grammatical gender: mois, trimestre, jour\n\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var frCa = moment.defineLocale('fr-ca', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n }\n });\n return frCa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var frCh = moment.defineLocale('fr-ch', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return frCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var months = ['Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig'];\n var monthsShort = ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll'];\n var weekdays = ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn'];\n var weekdaysShort = ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat'];\n var weekdaysMin = ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa'];\n var ga = moment.defineLocale('ga', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Inniu ag] LT',\n nextDay: '[Amárach ag] LT',\n nextWeek: 'dddd [ag] LT',\n lastDay: '[Inné aig] LT',\n lastWeek: 'dddd [seo caite] [ag] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'i %s',\n past: '%s ó shin',\n s: 'cúpla soicind',\n ss: '%d soicind',\n m: 'nóiméad',\n mm: '%d nóiméad',\n h: 'uair an chloig',\n hh: '%d uair an chloig',\n d: 'lá',\n dd: '%d lá',\n M: 'mí',\n MM: '%d mí',\n y: 'bliain',\n yy: '%d bliain'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ga;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var months = ['Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'];\n var monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'];\n var weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'];\n var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'];\n var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n var gd = moment.defineLocale('gd', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[An-diugh aig] LT',\n nextDay: '[A-màireach aig] LT',\n nextWeek: 'dddd [aig] LT',\n lastDay: '[An-dè aig] LT',\n lastWeek: 'dddd [seo chaidh] [aig] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ann an %s',\n past: 'bho chionn %s',\n s: 'beagan diogan',\n ss: '%d diogan',\n m: 'mionaid',\n mm: '%d mionaidean',\n h: 'uair',\n hh: '%d uairean',\n d: 'latha',\n dd: '%d latha',\n M: 'mìos',\n MM: '%d mìosan',\n y: 'bliadhna',\n yy: '%d bliadhna'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return gd;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var gl = moment.defineLocale('gl', {\n months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),\n monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n lastDay: function lastDay() {\n return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n\n return 'en ' + str;\n },\n past: 'hai %s',\n s: 'uns segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'unha hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return gl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 's': ['thodde secondanim', 'thodde second'],\n 'ss': [number + ' secondanim', number + ' second'],\n 'm': ['eka mintan', 'ek minute'],\n 'mm': [number + ' mintanim', number + ' mintam'],\n 'h': ['eka voran', 'ek vor'],\n 'hh': [number + ' voranim', number + ' voram'],\n 'd': ['eka disan', 'ek dis'],\n 'dd': [number + ' disanim', number + ' dis'],\n 'M': ['eka mhoinean', 'ek mhoino'],\n 'MM': [number + ' mhoineanim', number + ' mhoine'],\n 'y': ['eka vorsan', 'ek voros'],\n 'yy': [number + ' vorsanim', number + ' vorsam']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var gomLatn = moment.defineLocale('gom-latn', {\n months: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),\n monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\\'var'.split('_'),\n weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [vazta]',\n LTS: 'A h:mm:ss [vazta]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [vazta]',\n LLLL: 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]'\n },\n calendar: {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Ieta to] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fatlo] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s',\n past: '%s adim',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n },\n meridiemParse: /rati|sokalli|donparam|sanje/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokalli') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokalli';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n }\n });\n return gomLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '૧',\n '2': '૨',\n '3': '૩',\n '4': '૪',\n '5': '૫',\n '6': '૬',\n '7': '૭',\n '8': '૮',\n '9': '૯',\n '0': '૦'\n },\n numberMap = {\n '૧': '1',\n '૨': '2',\n '૩': '3',\n '૪': '4',\n '૫': '5',\n '૬': '6',\n '૭': '7',\n '૮': '8',\n '૯': '9',\n '૦': '0'\n };\n var gu = moment.defineLocale('gu', {\n months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'),\n monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'),\n monthsParseExact: true,\n weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'),\n weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm વાગ્યે',\n LTS: 'A h:mm:ss વાગ્યે',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે'\n },\n calendar: {\n sameDay: '[આજ] LT',\n nextDay: '[કાલે] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ગઇકાલે] LT',\n lastWeek: '[પાછલા] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s મા',\n past: '%s પેહલા',\n s: 'અમુક પળો',\n ss: '%d સેકંડ',\n m: 'એક મિનિટ',\n mm: '%d મિનિટ',\n h: 'એક કલાક',\n hh: '%d કલાક',\n d: 'એક દિવસ',\n dd: '%d દિવસ',\n M: 'એક મહિનો',\n MM: '%d મહિનો',\n y: 'એક વર્ષ',\n yy: '%d વર્ષ'\n },\n preparse: function preparse(string) {\n return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'રાત') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'સવાર') {\n return hour;\n } else if (meridiem === 'બપોર') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'સાંજ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'રાત';\n } else if (hour < 10) {\n return 'સવાર';\n } else if (hour < 17) {\n return 'બપોર';\n } else if (hour < 20) {\n return 'સાંજ';\n } else {\n return 'રાત';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return gu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var he = moment.defineLocale('he', {\n months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),\n monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [ב]MMMM YYYY',\n LLL: 'D [ב]MMMM YYYY HH:mm',\n LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n l: 'D/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[היום ב־]LT',\n nextDay: '[מחר ב־]LT',\n nextWeek: 'dddd [בשעה] LT',\n lastDay: '[אתמול ב־]LT',\n lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'בעוד %s',\n past: 'לפני %s',\n s: 'מספר שניות',\n ss: '%d שניות',\n m: 'דקה',\n mm: '%d דקות',\n h: 'שעה',\n hh: function hh(number) {\n if (number === 2) {\n return 'שעתיים';\n }\n\n return number + ' שעות';\n },\n d: 'יום',\n dd: function dd(number) {\n if (number === 2) {\n return 'יומיים';\n }\n\n return number + ' ימים';\n },\n M: 'חודש',\n MM: function MM(number) {\n if (number === 2) {\n return 'חודשיים';\n }\n\n return number + ' חודשים';\n },\n y: 'שנה',\n yy: function yy(number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n\n return number + ' שנים';\n }\n },\n meridiemParse: /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM: function isPM(input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n }\n });\n return he;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '१',\n '2': '२',\n '3': '३',\n '4': '४',\n '5': '५',\n '6': '६',\n '7': '७',\n '8': '८',\n '9': '९',\n '0': '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n };\n var hi = moment.defineLocale('hi', {\n months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),\n monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm बजे',\n LTS: 'A h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s में',\n past: '%s पहले',\n s: 'कुछ ही क्षण',\n ss: '%d सेकंड',\n m: 'एक मिनट',\n mm: '%d मिनट',\n h: 'एक घंटा',\n hh: '%d घंटे',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महीने',\n MM: '%d महीने',\n y: 'एक वर्ष',\n yy: '%d वर्ष'\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return hi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n\n return result;\n\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n\n return result;\n\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n\n return result;\n\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n\n return result;\n }\n }\n\n var hr = moment.defineLocale('hr', {\n months: {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),\n standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')\n },\n monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n\n case 6:\n return '[prošle] [subote] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return hr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n\n function translate(number, withoutSuffix, key, isFuture) {\n var num = number;\n\n switch (key) {\n case 's':\n return isFuture || withoutSuffix ? 'néhány másodperc' : 'néhány másodperce';\n\n case 'ss':\n return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce';\n\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n\n return '';\n }\n\n function week(isFuture) {\n return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';\n }\n\n var hu = moment.defineLocale('hu', {\n months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),\n monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),\n weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY. MMMM D.',\n LLL: 'YYYY. MMMM D. H:mm',\n LLLL: 'YYYY. MMMM D., dddd H:mm'\n },\n meridiemParse: /de|du/i,\n isPM: function isPM(input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar: {\n sameDay: '[ma] LT[-kor]',\n nextDay: '[holnap] LT[-kor]',\n nextWeek: function nextWeek() {\n return week.call(this, true);\n },\n lastDay: '[tegnap] LT[-kor]',\n lastWeek: function lastWeek() {\n return week.call(this, false);\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s múlva',\n past: '%s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return hu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var hyAm = moment.defineLocale('hy-am', {\n months: {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),\n standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')\n },\n monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),\n weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY թ.',\n LLL: 'D MMMM YYYY թ., HH:mm',\n LLLL: 'dddd, D MMMM YYYY թ., HH:mm'\n },\n calendar: {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function nextWeek() {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function lastWeek() {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s հետո',\n past: '%s առաջ',\n s: 'մի քանի վայրկյան',\n ss: '%d վայրկյան',\n m: 'րոպե',\n mm: '%d րոպե',\n h: 'ժամ',\n hh: '%d ժամ',\n d: 'օր',\n dd: '%d օր',\n M: 'ամիս',\n MM: '%d ամիս',\n y: 'տարի',\n yy: '%d տարի'\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function isPM(input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem: function meridiem(hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n\n return number + '-րդ';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return hyAm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var id = moment.defineLocale('id', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Besok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kemarin pukul] LT',\n lastWeek: 'dddd [lalu pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lalu',\n s: 'beberapa detik',\n ss: '%d detik',\n m: 'semenit',\n mm: '%d menit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return id;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n\n return true;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';\n\n case 'ss':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum');\n }\n\n return result + 'sekúnda';\n\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n\n case 'mm':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n\n return result + 'mínútu';\n\n case 'hh':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');\n }\n\n return result + 'klukkustund';\n\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n\n return isFuture ? 'dag' : 'degi';\n\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n\n return result + (isFuture ? 'dag' : 'degi');\n\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n\n return isFuture ? 'mánuð' : 'mánuði';\n\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n\n return result + (isFuture ? 'mánuð' : 'mánuði');\n\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n }\n\n var is = moment.defineLocale('is', {\n months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),\n weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm'\n },\n calendar: {\n sameDay: '[í dag kl.] LT',\n nextDay: '[á morgun kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[í gær kl.] LT',\n lastWeek: '[síðasta] dddd [kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'eftir %s',\n past: 'fyrir %s síðan',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: 'klukkustund',\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return is;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: 'un\\'ora',\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return it;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: 'un\\'ora',\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return itCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ja = moment.defineLocale('ja', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日 dddd HH:mm',\n l: 'YYYY/MM/DD',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日(ddd) HH:mm'\n },\n meridiemParse: /午前|午後/i,\n isPM: function isPM(input) {\n return input === '午後';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar: {\n sameDay: '[今日] LT',\n nextDay: '[明日] LT',\n nextWeek: function nextWeek(now) {\n if (now.week() < this.week()) {\n return '[来週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n lastDay: '[昨日] LT',\n lastWeek: function lastWeek(now) {\n if (this.week() < now.week()) {\n return '[先週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}日/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '数秒',\n ss: '%d秒',\n m: '1分',\n mm: '%d分',\n h: '1時間',\n hh: '%d時間',\n d: '1日',\n dd: '%d日',\n M: '1ヶ月',\n MM: '%dヶ月',\n y: '1年',\n yy: '%d年'\n }\n });\n return ja;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var jv = moment.defineLocale('jv', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar: {\n sameDay: '[Dinten puniko pukul] LT',\n nextDay: '[Mbenjang pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kala wingi pukul] LT',\n lastWeek: 'dddd [kepengker pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'wonten ing %s',\n past: '%s ingkang kepengker',\n s: 'sawetawis detik',\n ss: '%d detik',\n m: 'setunggal menit',\n mm: '%d menit',\n h: 'setunggal jam',\n hh: '%d jam',\n d: 'sedinten',\n dd: '%d dinten',\n M: 'sewulan',\n MM: '%d wulan',\n y: 'setaun',\n yy: '%d taun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return jv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ka = moment.defineLocale('ka', {\n months: {\n standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),\n format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')\n },\n monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays: {\n standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),\n isFormat: /(წინა|შემდეგ)/\n },\n weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[დღეს] LT[-ზე]',\n nextDay: '[ხვალ] LT[-ზე]',\n lastDay: '[გუშინ] LT[-ზე]',\n nextWeek: '[შემდეგ] dddd LT[-ზე]',\n lastWeek: '[წინა] dddd LT-ზე',\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(s) {\n return /(წამი|წუთი|საათი|წელი)/.test(s) ? s.replace(/ი$/, 'ში') : s + 'ში';\n },\n past: function past(s) {\n if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n return s.replace(/(ი|ე)$/, 'ის წინ');\n }\n\n if (/წელი/.test(s)) {\n return s.replace(/წელი$/, 'წლის წინ');\n }\n },\n s: 'რამდენიმე წამი',\n ss: '%d წამი',\n m: 'წუთი',\n mm: '%d წუთი',\n h: 'საათი',\n hh: '%d საათი',\n d: 'დღე',\n dd: '%d დღე',\n M: 'თვე',\n MM: '%d თვე',\n y: 'წელი',\n yy: '%d წელი'\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal: function ordinal(number) {\n if (number === 0) {\n return number;\n }\n\n if (number === 1) {\n return number + '-ლი';\n }\n\n if (number < 20 || number <= 100 && number % 20 === 0 || number % 100 === 0) {\n return 'მე-' + number;\n }\n\n return number + '-ე';\n },\n week: {\n dow: 1,\n doy: 7\n }\n });\n return ka;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші'\n };\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return kk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '១',\n '2': '២',\n '3': '៣',\n '4': '៤',\n '5': '៥',\n '6': '៦',\n '7': '៧',\n '8': '៨',\n '9': '៩',\n '0': '០'\n },\n numberMap = {\n '១': '1',\n '២': '2',\n '៣': '3',\n '៤': '4',\n '៥': '5',\n '៦': '6',\n '៧': '7',\n '៨': '8',\n '៩': '9',\n '០': '0'\n };\n var km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /ព្រឹក|ល្ងាច/,\n isPM: function isPM(input) {\n return input === 'ល្ងាច';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ព្រឹក';\n } else {\n return 'ល្ងាច';\n }\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n ss: '%d វិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ'\n },\n dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n ordinal: 'ទី%d',\n preparse: function preparse(string) {\n return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return km;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '೧',\n '2': '೨',\n '3': '೩',\n '4': '೪',\n '5': '೫',\n '6': '೬',\n '7': '೭',\n '8': '೮',\n '9': '೯',\n '0': '೦'\n },\n numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0'\n };\n var kn = moment.defineLocale('kn', {\n months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),\n monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'),\n monthsParseExact: true,\n weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),\n weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[ಇಂದು] LT',\n nextDay: '[ನಾಳೆ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ನಿನ್ನೆ] LT',\n lastWeek: '[ಕೊನೆಯ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ನಂತರ',\n past: '%s ಹಿಂದೆ',\n s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n ss: '%d ಸೆಕೆಂಡುಗಳು',\n m: 'ಒಂದು ನಿಮಿಷ',\n mm: '%d ನಿಮಿಷ',\n h: 'ಒಂದು ಗಂಟೆ',\n hh: '%d ಗಂಟೆ',\n d: 'ಒಂದು ದಿನ',\n dd: '%d ದಿನ',\n M: 'ಒಂದು ತಿಂಗಳು',\n MM: '%d ತಿಂಗಳು',\n y: 'ಒಂದು ವರ್ಷ',\n yy: '%d ವರ್ಷ'\n },\n preparse: function preparse(string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal: function ordinal(number) {\n return number + 'ನೇ';\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return kn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ko = moment.defineLocale('ko', {\n months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY년 MMMM D일',\n LLL: 'YYYY년 MMMM D일 A h:mm',\n LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n l: 'YYYY.MM.DD.',\n ll: 'YYYY년 MMMM D일',\n lll: 'YYYY년 MMMM D일 A h:mm',\n llll: 'YYYY년 MMMM D일 dddd A h:mm'\n },\n calendar: {\n sameDay: '오늘 LT',\n nextDay: '내일 LT',\n nextWeek: 'dddd LT',\n lastDay: '어제 LT',\n lastWeek: '지난주 dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s 후',\n past: '%s 전',\n s: '몇 초',\n ss: '%d초',\n m: '1분',\n mm: '%d분',\n h: '한 시간',\n hh: '%d시간',\n d: '하루',\n dd: '%d일',\n M: '한 달',\n MM: '%d달',\n y: '일 년',\n yy: '%d년'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '일';\n\n case 'M':\n return number + '월';\n\n case 'w':\n case 'W':\n return number + '주';\n\n default:\n return number;\n }\n },\n meridiemParse: /오전|오후/,\n isPM: function isPM(token) {\n return token === '오후';\n },\n meridiem: function meridiem(hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n }\n });\n return ko;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '١',\n '2': '٢',\n '3': '٣',\n '4': '٤',\n '5': '٥',\n '6': '٦',\n '7': '٧',\n '8': '٨',\n '9': '٩',\n '0': '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n },\n months = ['کانونی دووەم', 'شوبات', 'ئازار', 'نیسان', 'ئایار', 'حوزەیران', 'تەمموز', 'ئاب', 'ئەیلوول', 'تشرینی یەكەم', 'تشرینی دووەم', 'كانونی یەکەم'];\n var ku = moment.defineLocale('ku', {\n months: months,\n monthsShort: months,\n weekdays: 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split('_'),\n weekdaysShort: 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /ئێواره|بهیانی/,\n isPM: function isPM(input) {\n return /ئێواره/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'بهیانی';\n } else {\n return 'ئێواره';\n }\n },\n calendar: {\n sameDay: '[ئهمرۆ كاتژمێر] LT',\n nextDay: '[بهیانی كاتژمێر] LT',\n nextWeek: 'dddd [كاتژمێر] LT',\n lastDay: '[دوێنێ كاتژمێر] LT',\n lastWeek: 'dddd [كاتژمێر] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'له %s',\n past: '%s',\n s: 'چهند چركهیهك',\n ss: 'چركه %d',\n m: 'یهك خولهك',\n mm: '%d خولهك',\n h: 'یهك كاتژمێر',\n hh: '%d كاتژمێر',\n d: 'یهك ڕۆژ',\n dd: '%d ڕۆژ',\n M: 'یهك مانگ',\n MM: '%d مانگ',\n y: 'یهك ساڵ',\n yy: '%d ساڵ'\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return ku;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү'\n };\n var ky = moment.defineLocale('ky', {\n months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),\n monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),\n weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Бүгүн саат] LT',\n nextDay: '[Эртең саат] LT',\n nextWeek: 'dddd [саат] LT',\n lastDay: '[Кечээ саат] LT',\n lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ичинде',\n past: '%s мурун',\n s: 'бирнече секунд',\n ss: '%d секунд',\n m: 'бир мүнөт',\n mm: '%d мүнөт',\n h: 'бир саат',\n hh: '%d саат',\n d: 'бир күн',\n dd: '%d күн',\n M: 'бир ай',\n MM: '%d ай',\n y: 'бир жыл',\n yy: '%d жыл'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ky;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 'm': ['eng Minutt', 'enger Minutt'],\n 'h': ['eng Stonn', 'enger Stonn'],\n 'd': ['een Dag', 'engem Dag'],\n 'M': ['ee Mount', 'engem Mount'],\n 'y': ['ee Joer', 'engem Joer']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n function processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n\n return 'an ' + string;\n }\n\n function processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n\n return 'virun ' + string;\n }\n /**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\n\n\n function eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n\n if (isNaN(number)) {\n return false;\n }\n\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10,\n firstDigit = number / 10;\n\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n }\n\n var lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function lastWeek() {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n\n default:\n return '[Leschte] dddd [um] LT';\n }\n }\n },\n relativeTime: {\n future: processFutureTime,\n past: processPastTime,\n s: 'e puer Sekonnen',\n ss: '%d Sekonnen',\n m: processRelativeTime,\n mm: '%d Minutten',\n h: processRelativeTime,\n hh: '%d Stonnen',\n d: processRelativeTime,\n dd: '%d Deeg',\n M: processRelativeTime,\n MM: '%d Méint',\n y: processRelativeTime,\n yy: '%d Joer'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var lo = moment.defineLocale('lo', {\n months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'ວັນdddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function isPM(input) {\n return input === 'ຕອນແລງ';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar: {\n sameDay: '[ມື້ນີ້ເວລາ] LT',\n nextDay: '[ມື້ອື່ນເວລາ] LT',\n nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ອີກ %s',\n past: '%sຜ່ານມາ',\n s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n ss: '%d ວິນາທີ',\n m: '1 ນາທີ',\n mm: '%d ນາທີ',\n h: '1 ຊົ່ວໂມງ',\n hh: '%d ຊົ່ວໂມງ',\n d: '1 ມື້',\n dd: '%d ມື້',\n M: '1 ເດືອນ',\n MM: '%d ເດືອນ',\n y: '1 ປີ',\n yy: '%d ປີ'\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal: function ordinal(number) {\n return 'ທີ່' + number;\n }\n });\n return lo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var units = {\n 'ss': 'sekundė_sekundžių_sekundes',\n 'm': 'minutė_minutės_minutę',\n 'mm': 'minutės_minučių_minutes',\n 'h': 'valanda_valandos_valandą',\n 'hh': 'valandos_valandų_valandas',\n 'd': 'diena_dienos_dieną',\n 'dd': 'dienos_dienų_dienas',\n 'M': 'mėnuo_mėnesio_mėnesį',\n 'MM': 'mėnesiai_mėnesių_mėnesius',\n 'y': 'metai_metų_metus',\n 'yy': 'metai_metų_metus'\n };\n\n function translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n }\n\n function translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix ? forms(key)[0] : isFuture ? forms(key)[1] : forms(key)[2];\n }\n\n function special(number) {\n return number % 10 === 0 || number > 10 && number < 20;\n }\n\n function forms(key) {\n return units[key].split('_');\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n if (number === 1) {\n return result + translateSingular(number, withoutSuffix, key[0], isFuture);\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n }\n\n var lt = moment.defineLocale('lt', {\n months: {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),\n standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/\n },\n monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays: {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),\n standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),\n isFormat: /dddd HH:mm/\n },\n weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY [m.] MMMM D [d.]',\n LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l: 'YYYY-MM-DD',\n ll: 'YYYY [m.] MMMM D [d.]',\n lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'\n },\n calendar: {\n sameDay: '[Šiandien] LT',\n nextDay: '[Rytoj] LT',\n nextWeek: 'dddd LT',\n lastDay: '[Vakar] LT',\n lastWeek: '[Praėjusį] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'po %s',\n past: 'prieš %s',\n s: translateSeconds,\n ss: translate,\n m: translateSingular,\n mm: translate,\n h: translateSingular,\n hh: translate,\n d: translateSingular,\n dd: translate,\n M: translateSingular,\n MM: translate,\n y: translateSingular,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal: function ordinal(number) {\n return number + '-oji';\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var units = {\n 'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n 'h': 'stundas_stundām_stunda_stundas'.split('_'),\n 'hh': 'stundas_stundām_stunda_stundas'.split('_'),\n 'd': 'dienas_dienām_diena_dienas'.split('_'),\n 'dd': 'dienas_dienām_diena_dienas'.split('_'),\n 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n 'y': 'gada_gadiem_gads_gadi'.split('_'),\n 'yy': 'gada_gadiem_gads_gadi'.split('_')\n };\n /**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\n\n function format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n }\n\n function relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n }\n\n function relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n }\n\n var lv = moment.defineLocale('lv', {\n months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),\n monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),\n weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY.',\n LL: 'YYYY. [gada] D. MMMM',\n LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm'\n },\n calendar: {\n sameDay: '[Šodien pulksten] LT',\n nextDay: '[Rīt pulksten] LT',\n nextWeek: 'dddd [pulksten] LT',\n lastDay: '[Vakar pulksten] LT',\n lastWeek: '[Pagājušā] dddd [pulksten] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'pēc %s',\n past: 'pirms %s',\n s: relativeSeconds,\n ss: relativeTimeWithPlural,\n m: relativeTimeWithSingular,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithSingular,\n hh: relativeTimeWithPlural,\n d: relativeTimeWithSingular,\n dd: relativeTimeWithPlural,\n M: relativeTimeWithSingular,\n MM: relativeTimeWithPlural,\n y: relativeTimeWithSingular,\n yy: relativeTimeWithPlural\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekund', 'sekunda', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[prošle] [nedjelje] [u] LT', '[prošlog] [ponedjeljka] [u] LT', '[prošlog] [utorka] [u] LT', '[prošle] [srijede] [u] LT', '[prošlog] [četvrtka] [u] LT', '[prošlog] [petka] [u] LT', '[prošle] [subote] [u] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mjesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return me;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),\n monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm'\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n ss: '%d hēkona',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return mi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var mk = moment.defineLocale('mk', {\n months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),\n monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),\n weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Денес во] LT',\n nextDay: '[Утре во] LT',\n nextWeek: '[Во] dddd [во] LT',\n lastDay: '[Вчера во] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'после %s',\n past: 'пред %s',\n s: 'неколку секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дена',\n M: 'месец',\n MM: '%d месеци',\n y: 'година',\n yy: '%d години'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function ordinal(number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return mk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ml = moment.defineLocale('ml', {\n months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),\n monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),\n monthsParseExact: true,\n weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),\n weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm -നു',\n LTS: 'A h:mm:ss -നു',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm -നു',\n LLLL: 'dddd, D MMMM YYYY, A h:mm -നു'\n },\n calendar: {\n sameDay: '[ഇന്ന്] LT',\n nextDay: '[നാളെ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ഇന്നലെ] LT',\n lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s കഴിഞ്ഞ്',\n past: '%s മുൻപ്',\n s: 'അൽപ നിമിഷങ്ങൾ',\n ss: '%d സെക്കൻഡ്',\n m: 'ഒരു മിനിറ്റ്',\n mm: '%d മിനിറ്റ്',\n h: 'ഒരു മണിക്കൂർ',\n hh: '%d മണിക്കൂർ',\n d: 'ഒരു ദിവസം',\n dd: '%d ദിവസം',\n M: 'ഒരു മാസം',\n MM: '%d മാസം',\n y: 'ഒരു വർഷം',\n yy: '%d വർഷം'\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'രാത്രി' && hour >= 4 || meridiem === 'ഉച്ച കഴിഞ്ഞ്' || meridiem === 'വൈകുന്നേരം') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n }\n });\n return ml;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n\n default:\n return number;\n }\n }\n\n var mn = moment.defineLocale('mn', {\n months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'),\n monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'),\n monthsParseExact: true,\n weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY оны MMMMын D',\n LLL: 'YYYY оны MMMMын D HH:mm',\n LLLL: 'dddd, YYYY оны MMMMын D HH:mm'\n },\n meridiemParse: /ҮӨ|ҮХ/i,\n isPM: function isPM(input) {\n return input === 'ҮХ';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ҮӨ';\n } else {\n return 'ҮХ';\n }\n },\n calendar: {\n sameDay: '[Өнөөдөр] LT',\n nextDay: '[Маргааш] LT',\n nextWeek: '[Ирэх] dddd LT',\n lastDay: '[Өчигдөр] LT',\n lastWeek: '[Өнгөрсөн] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s дараа',\n past: '%s өмнө',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + ' өдөр';\n\n default:\n return number;\n }\n }\n });\n return mn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '१',\n '2': '२',\n '3': '३',\n '4': '४',\n '5': '५',\n '6': '६',\n '7': '७',\n '8': '८',\n '9': '९',\n '0': '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n };\n\n function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n var output = '';\n\n if (withoutSuffix) {\n switch (string) {\n case 's':\n output = 'काही सेकंद';\n break;\n\n case 'ss':\n output = '%d सेकंद';\n break;\n\n case 'm':\n output = 'एक मिनिट';\n break;\n\n case 'mm':\n output = '%d मिनिटे';\n break;\n\n case 'h':\n output = 'एक तास';\n break;\n\n case 'hh':\n output = '%d तास';\n break;\n\n case 'd':\n output = 'एक दिवस';\n break;\n\n case 'dd':\n output = '%d दिवस';\n break;\n\n case 'M':\n output = 'एक महिना';\n break;\n\n case 'MM':\n output = '%d महिने';\n break;\n\n case 'y':\n output = 'एक वर्ष';\n break;\n\n case 'yy':\n output = '%d वर्षे';\n break;\n }\n } else {\n switch (string) {\n case 's':\n output = 'काही सेकंदां';\n break;\n\n case 'ss':\n output = '%d सेकंदां';\n break;\n\n case 'm':\n output = 'एका मिनिटा';\n break;\n\n case 'mm':\n output = '%d मिनिटां';\n break;\n\n case 'h':\n output = 'एका तासा';\n break;\n\n case 'hh':\n output = '%d तासां';\n break;\n\n case 'd':\n output = 'एका दिवसा';\n break;\n\n case 'dd':\n output = '%d दिवसां';\n break;\n\n case 'M':\n output = 'एका महिन्या';\n break;\n\n case 'MM':\n output = '%d महिन्यां';\n break;\n\n case 'y':\n output = 'एका वर्षा';\n break;\n\n case 'yy':\n output = '%d वर्षां';\n break;\n }\n }\n\n return output.replace(/%d/i, number);\n }\n\n var mr = moment.defineLocale('mr', {\n months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),\n monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm वाजता',\n LTS: 'A h:mm:ss वाजता',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm वाजता',\n LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता'\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[उद्या] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n ss: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'रात्री') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळी') {\n return hour;\n } else if (meridiem === 'दुपारी') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'सायंकाळी') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'रात्री';\n } else if (hour < 10) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return mr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ms = moment.defineLocale('ms', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ms;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var msMy = moment.defineLocale('ms-my', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return msMy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var mt = moment.defineLocale('mt', {\n months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'),\n monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'),\n weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Illum fil-]LT',\n nextDay: '[Għada fil-]LT',\n nextWeek: 'dddd [fil-]LT',\n lastDay: '[Il-bieraħ fil-]LT',\n lastWeek: 'dddd [li għadda] [fil-]LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'f’ %s',\n past: '%s ilu',\n s: 'ftit sekondi',\n ss: '%d sekondi',\n m: 'minuta',\n mm: '%d minuti',\n h: 'siegħa',\n hh: '%d siegħat',\n d: 'ġurnata',\n dd: '%d ġranet',\n M: 'xahar',\n MM: '%d xhur',\n y: 'sena',\n yy: '%d sni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return mt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '၁',\n '2': '၂',\n '3': '၃',\n '4': '၄',\n '5': '၅',\n '6': '၆',\n '7': '၇',\n '8': '၈',\n '9': '၉',\n '0': '၀'\n },\n numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0'\n };\n var my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n ss: '%d စက္ကန့်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်'\n },\n preparse: function preparse(string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return my;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dager',\n M: 'en måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '१',\n '2': '२',\n '3': '३',\n '4': '४',\n '5': '५',\n '6': '६',\n '7': '७',\n '8': '८',\n '9': '९',\n '0': '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n };\n var ne = moment.defineLocale('ne', {\n months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),\n monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),\n monthsParseExact: true,\n weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),\n weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'Aको h:mm बजे',\n LTS: 'Aको h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, Aको h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे'\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[भोलि] LT',\n nextWeek: '[आउँदो] dddd[,] LT',\n lastDay: '[हिजो] LT',\n lastWeek: '[गएको] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sमा',\n past: '%s अगाडि',\n s: 'केही क्षण',\n ss: '%d सेकेण्ड',\n m: 'एक मिनेट',\n mm: '%d मिनेट',\n h: 'एक घण्टा',\n hh: '%d घण्टा',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महिना',\n MM: '%d महिना',\n y: 'एक बर्ष',\n yy: '%d बर्ष'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return ne;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\n var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n var nl = moment.defineLocale('nl', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');\n var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];\n var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n var nlBe = moment.defineLocale('nl-be', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nlBe;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var nn = moment.defineLocale('nn', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort: 'sun_mån_tys_ons_tor_fre_lau'.split('_'),\n weekdaysMin: 'su_må_ty_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s sidan',\n s: 'nokre sekund',\n ss: '%d sekund',\n m: 'eit minutt',\n mm: '%d minutt',\n h: 'ein time',\n hh: '%d timar',\n d: 'ein dag',\n dd: '%d dagar',\n M: 'ein månad',\n MM: '%d månader',\n y: 'eit år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '੧',\n '2': '੨',\n '3': '੩',\n '4': '੪',\n '5': '੫',\n '6': '੬',\n '7': '੭',\n '8': '੮',\n '9': '੯',\n '0': '੦'\n },\n numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0'\n };\n var paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),\n weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm ਵਜੇ',\n LTS: 'A h:mm:ss ਵਜੇ',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'\n },\n calendar: {\n sameDay: '[ਅਜ] LT',\n nextDay: '[ਕਲ] LT',\n nextWeek: '[ਅਗਲਾ] dddd, LT',\n lastDay: '[ਕਲ] LT',\n lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ਵਿੱਚ',\n past: '%s ਪਿਛਲੇ',\n s: 'ਕੁਝ ਸਕਿੰਟ',\n ss: '%d ਸਕਿੰਟ',\n m: 'ਇਕ ਮਿੰਟ',\n mm: '%d ਮਿੰਟ',\n h: 'ਇੱਕ ਘੰਟਾ',\n hh: '%d ਘੰਟੇ',\n d: 'ਇੱਕ ਦਿਨ',\n dd: '%d ਦਿਨ',\n M: 'ਇੱਕ ਮਹੀਨਾ',\n MM: '%d ਮਹੀਨੇ',\n y: 'ਇੱਕ ਸਾਲ',\n yy: '%d ਸਾਲ'\n },\n preparse: function preparse(string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return paIn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),\n monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');\n\n function plural(n) {\n return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n }\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n return result + (plural(number) ? 'sekundy' : 'sekund');\n\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n }\n\n var pl = moment.defineLocale('pl', {\n months: function months(momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (format === '') {\n // Hack: if format empty we know this is used to generate\n // RegExp by moment. Give then back both valid forms of months\n // in RegExp ready format.\n return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[W niedzielę o] LT';\n\n case 2:\n return '[We wtorek o] LT';\n\n case 3:\n return '[W środę o] LT';\n\n case 6:\n return '[W sobotę o] LT';\n\n default:\n return '[W] dddd [o] LT';\n }\n },\n lastDay: '[Wczoraj o] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n\n case 3:\n return '[W zeszłą środę o] LT';\n\n case 6:\n return '[W zeszłą sobotę o] LT';\n\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: '%s temu',\n s: 'kilka sekund',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: '1 dzień',\n dd: '%d dni',\n M: 'miesiąc',\n MM: translate,\n y: 'rok',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return pl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var pt = moment.defineLocale('pt', {\n months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function lastWeek() {\n return this.day() === 0 || this.day() === 6 ? '[Último] dddd [às] LT' : // Saturday + Sunday\n '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return pt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ptBr = moment.defineLocale('pt-br', {\n months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function lastWeek() {\n return this.day() === 0 || this.day() === 6 ? '[Último] dddd [às] LT' : // Saturday + Sunday\n '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'poucos segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº'\n });\n return ptBr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n 'ss': 'secunde',\n 'mm': 'minute',\n 'hh': 'ore',\n 'dd': 'zile',\n 'MM': 'luni',\n 'yy': 'ani'\n },\n separator = ' ';\n\n if (number % 100 >= 20 || number >= 100 && number % 100 === 0) {\n separator = ' de ';\n }\n\n return number + separator + format[key];\n }\n\n var ro = moment.defineLocale('ro', {\n months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),\n monthsShort: 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'peste %s',\n past: '%s în urmă',\n s: 'câteva secunde',\n ss: relativeTimeWithPlural,\n m: 'un minut',\n mm: relativeTimeWithPlural,\n h: 'o oră',\n hh: relativeTimeWithPlural,\n d: 'o zi',\n dd: relativeTimeWithPlural,\n M: 'o lună',\n MM: relativeTimeWithPlural,\n y: 'un an',\n yy: relativeTimeWithPlural\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ro;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n 'hh': 'час_часа_часов',\n 'dd': 'день_дня_дней',\n 'MM': 'месяц_месяца_месяцев',\n 'yy': 'год_года_лет'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),\n standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку ?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),\n standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')\n },\n weekdays: {\n standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\\] ?dddd/\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n // копия предыдущего\n monthsShortRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n // полные названия с падежами\n monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n // Выражение, которое соотвествует только сокращённым формам\n monthsShortStrictRegex: /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm'\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function nextWeek(now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function lastWeek(now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function isPM(input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n\n case 'D':\n return number + '-го';\n\n case 'w':\n case 'W':\n return number + '-я';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ru;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var months = ['جنوري', 'فيبروري', 'مارچ', 'اپريل', 'مئي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'];\n var days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n var sd = moment.defineLocale('sd', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm'\n },\n meridiemParse: /صبح|شام/,\n isPM: function isPM(input) {\n return 'شام' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n\n return 'شام';\n },\n calendar: {\n sameDay: '[اڄ] LT',\n nextDay: '[سڀاڻي] LT',\n nextWeek: 'dddd [اڳين هفتي تي] LT',\n lastDay: '[ڪالهه] LT',\n lastWeek: '[گزريل هفتي] dddd [تي] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s پوء',\n past: '%s اڳ',\n s: 'چند سيڪنڊ',\n ss: '%d سيڪنڊ',\n m: 'هڪ منٽ',\n mm: '%d منٽ',\n h: 'هڪ ڪلاڪ',\n hh: '%d ڪلاڪ',\n d: 'هڪ ڏينهن',\n dd: '%d ڏينهن',\n M: 'هڪ مهينو',\n MM: '%d مهينا',\n y: 'هڪ سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sd;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var se = moment.defineLocale('se', {\n months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),\n monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),\n weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'MMMM D. [b.] YYYY',\n LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'\n },\n calendar: {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s geažes',\n past: 'maŋit %s',\n s: 'moadde sekunddat',\n ss: '%d sekunddat',\n m: 'okta minuhta',\n mm: '%d minuhtat',\n h: 'okta diimmu',\n hh: '%d diimmut',\n d: 'okta beaivi',\n dd: '%d beaivvit',\n M: 'okta mánnu',\n MM: '%d mánut',\n y: 'okta jahki',\n yy: '%d jagit'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return se;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n /*jshint -W100*/\n\n var si = moment.defineLocale('si', {\n months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),\n monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),\n weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),\n weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),\n weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'a h:mm',\n LTS: 'a h:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY MMMM D',\n LLL: 'YYYY MMMM D, a h:mm',\n LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'\n },\n calendar: {\n sameDay: '[අද] LT[ට]',\n nextDay: '[හෙට] LT[ට]',\n nextWeek: 'dddd LT[ට]',\n lastDay: '[ඊයේ] LT[ට]',\n lastWeek: '[පසුගිය] dddd LT[ට]',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sකින්',\n past: '%sකට පෙර',\n s: 'තත්පර කිහිපය',\n ss: 'තත්පර %d',\n m: 'මිනිත්තුව',\n mm: 'මිනිත්තු %d',\n h: 'පැය',\n hh: 'පැය %d',\n d: 'දිනය',\n dd: 'දින %d',\n M: 'මාසය',\n MM: 'මාස %d',\n y: 'වසර',\n yy: 'වසර %d'\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal: function ordinal(number) {\n return number + ' වැනි';\n },\n meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM: function isPM(input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n }\n });\n return si;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),\n monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n\n function plural(n) {\n return n > 1 && n < 5;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n\n case 'ss':\n // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekúnd');\n } else {\n return result + 'sekundami';\n }\n\n break;\n\n case 'm':\n // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n\n case 'mm':\n // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n\n break;\n\n case 'h':\n // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n\n case 'hh':\n // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n\n break;\n\n case 'd':\n // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'deň' : 'dňom';\n\n case 'dd':\n // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n\n break;\n\n case 'M':\n // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n\n case 'MM':\n // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n\n break;\n\n case 'y':\n // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokom';\n\n case 'yy':\n // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n\n break;\n }\n }\n\n var sk = moment.defineLocale('sk', {\n months: months,\n monthsShort: monthsShort,\n weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n\n case 3:\n return '[v stredu o] LT';\n\n case 4:\n return '[vo štvrtok o] LT';\n\n case 5:\n return '[v piatok o] LT';\n\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n\n case 3:\n return '[minulú stredu o] LT';\n\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'pred %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n\n return result;\n\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n\n return result;\n\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n\n return result;\n\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n\n return result;\n }\n }\n\n var sl = moment.defineLocale('sl', {\n months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danes ob] LT',\n nextDay: '[jutri ob] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n\n case 3:\n return '[v] [sredo] [ob] LT';\n\n case 6:\n return '[v] [soboto] [ob] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay: '[včeraj ob] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'čez %s',\n past: 'pred %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var sq = moment.defineLocale('sq', {\n months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),\n monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),\n weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /PD|MD/,\n isPM: function isPM(input) {\n return input.charAt(0) === 'M';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Sot në] LT',\n nextDay: '[Nesër në] LT',\n nextWeek: 'dddd [në] LT',\n lastDay: '[Dje në] LT',\n lastWeek: 'dddd [e kaluar në] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'në %s',\n past: '%s më parë',\n s: 'disa sekonda',\n ss: '%d sekonda',\n m: 'një minutë',\n mm: '%d minuta',\n h: 'një orë',\n hh: '%d orë',\n d: 'një ditë',\n dd: '%d ditë',\n M: 'një muaj',\n MM: '%d muaj',\n y: 'një vit',\n yy: '%d vite'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sq;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekunda', 'sekunde', 'sekundi'],\n m: ['jedan minut', 'jedne minute'],\n mm: ['minut', 'minute', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mesec', 'meseca', 'meseci'],\n yy: ['godina', 'godine', 'godina']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n\n case 3:\n return '[u] [sredu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[prošle] [nedelje] [u] LT', '[prošlog] [ponedeljka] [u] LT', '[prošlog] [utorka] [u] LT', '[prošle] [srede] [u] LT', '[prošlog] [četvrtka] [u] LT', '[prošlog] [petka] [u] LT', '[prošle] [subote] [u] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'pre %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['секунда', 'секунде', 'секунди'],\n m: ['један минут', 'једне минуте'],\n mm: ['минут', 'минуте', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n dd: ['дан', 'дана', 'дана'],\n MM: ['месец', 'месеца', 'месеци'],\n yy: ['година', 'године', 'година']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),\n monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n\n case 3:\n return '[у] [среду] [у] LT';\n\n case 6:\n return '[у] [суботу] [у] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay: '[јуче у] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[прошле] [недеље] [у] LT', '[прошлог] [понедељка] [у] LT', '[прошлог] [уторка] [у] LT', '[прошле] [среде] [у] LT', '[прошлог] [четвртка] [у] LT', '[прошлог] [петка] [у] LT', '[прошле] [суботе] [у] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'за %s',\n past: 'пре %s',\n s: 'неколико секунди',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'дан',\n dd: translator.translate,\n M: 'месец',\n MM: translator.translate,\n y: 'годину',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return srCyrl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ss = moment.defineLocale('ss', {\n months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split('_'),\n monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),\n weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Namuhla nga] LT',\n nextDay: '[Kusasa nga] LT',\n nextWeek: 'dddd [nga] LT',\n lastDay: '[Itolo nga] LT',\n lastWeek: 'dddd [leliphelile] [nga] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'nga %s',\n past: 'wenteka nga %s',\n s: 'emizuzwana lomcane',\n ss: '%d mzuzwana',\n m: 'umzuzu',\n mm: '%d emizuzu',\n h: 'lihora',\n hh: '%d emahora',\n d: 'lilanga',\n dd: '%d emalanga',\n M: 'inyanga',\n MM: '%d tinyanga',\n y: 'umnyaka',\n yy: '%d iminyaka'\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: '%d',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ss;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var sv = moment.defineLocale('sv', {\n months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: 'för %s sedan',\n s: 'några sekunder',\n ss: '%d sekunder',\n m: 'en minut',\n mm: '%d minuter',\n h: 'en timme',\n hh: '%d timmar',\n d: 'en dag',\n dd: '%d dagar',\n M: 'en månad',\n MM: '%d månader',\n y: 'ett år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(e|a)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'e' : b === 1 ? 'a' : b === 2 ? 'a' : b === 3 ? 'e' : 'e';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'masiku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sw;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var symbolMap = {\n '1': '௧',\n '2': '௨',\n '3': '௩',\n '4': '௪',\n '5': '௫',\n '6': '௬',\n '7': '௭',\n '8': '௮',\n '9': '௯',\n '0': '௦'\n },\n numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0'\n };\n var ta = moment.defineLocale('ta', {\n months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),\n weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),\n weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, HH:mm',\n LLLL: 'dddd, D MMMM YYYY, HH:mm'\n },\n calendar: {\n sameDay: '[இன்று] LT',\n nextDay: '[நாளை] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[நேற்று] LT',\n lastWeek: '[கடந்த வாரம்] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s இல்',\n past: '%s முன்',\n s: 'ஒரு சில விநாடிகள்',\n ss: '%d விநாடிகள்',\n m: 'ஒரு நிமிடம்',\n mm: '%d நிமிடங்கள்',\n h: 'ஒரு மணி நேரம்',\n hh: '%d மணி நேரம்',\n d: 'ஒரு நாள்',\n dd: '%d நாட்கள்',\n M: 'ஒரு மாதம்',\n MM: '%d மாதங்கள்',\n y: 'ஒரு வருடம்',\n yy: '%d ஆண்டுகள்'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal: function ordinal(number) {\n return number + 'வது';\n },\n preparse: function preparse(string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return ta;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var te = moment.defineLocale('te', {\n months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),\n monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),\n monthsParseExact: true,\n weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),\n weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[నేడు] LT',\n nextDay: '[రేపు] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[నిన్న] LT',\n lastWeek: '[గత] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s లో',\n past: '%s క్రితం',\n s: 'కొన్ని క్షణాలు',\n ss: '%d సెకన్లు',\n m: 'ఒక నిమిషం',\n mm: '%d నిమిషాలు',\n h: 'ఒక గంట',\n hh: '%d గంటలు',\n d: 'ఒక రోజు',\n dd: '%d రోజులు',\n M: 'ఒక నెల',\n MM: '%d నెలలు',\n y: 'ఒక సంవత్సరం',\n yy: '%d సంవత్సరాలు'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n ordinal: '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return te;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var tet = moment.defineLocale('tet', {\n months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'iha %s',\n past: '%s liuba',\n s: 'minutu balun',\n ss: 'minutu %d',\n m: 'minutu ida',\n mm: 'minutu %d',\n h: 'oras ida',\n hh: 'oras %d',\n d: 'loron ida',\n dd: 'loron %d',\n M: 'fulan ida',\n MM: 'fulan %d',\n y: 'tinan ida',\n yy: 'tinan %d'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tet;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var suffixes = {\n 0: '-ум',\n 1: '-ум',\n 2: '-юм',\n 3: '-юм',\n 4: '-ум',\n 5: '-ум',\n 6: '-ум',\n 7: '-ум',\n 8: '-ум',\n 9: '-ум',\n 10: '-ум',\n 12: '-ум',\n 13: '-ум',\n 20: '-ум',\n 30: '-юм',\n 40: '-ум',\n 50: '-ум',\n 60: '-ум',\n 70: '-ум',\n 80: '-ум',\n 90: '-ум',\n 100: '-ум'\n };\n var tg = moment.defineLocale('tg', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'),\n weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Имрӯз соати] LT',\n nextDay: '[Пагоҳ соати] LT',\n lastDay: '[Дирӯз соати] LT',\n nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'баъди %s',\n past: '%s пеш',\n s: 'якчанд сония',\n m: 'як дақиқа',\n mm: '%d дақиқа',\n h: 'як соат',\n hh: '%d соат',\n d: 'як рӯз',\n dd: '%d рӯз',\n M: 'як моҳ',\n MM: '%d моҳ',\n y: 'як сол',\n yy: '%d сол'\n },\n meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'шаб') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'субҳ') {\n return hour;\n } else if (meridiem === 'рӯз') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'бегоҳ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'шаб';\n } else if (hour < 11) {\n return 'субҳ';\n } else if (hour < 16) {\n return 'рӯз';\n } else if (hour < 19) {\n return 'бегоҳ';\n } else {\n return 'шаб';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 1th is the first week of the year.\n\n }\n });\n return tg;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var th = moment.defineLocale('th', {\n months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),\n monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),\n monthsParseExact: true,\n weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'),\n // yes, three characters difference\n weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY เวลา H:mm',\n LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function isPM(input) {\n return input === 'หลังเที่ยง';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar: {\n sameDay: '[วันนี้ เวลา] LT',\n nextDay: '[พรุ่งนี้ เวลา] LT',\n nextWeek: 'dddd[หน้า เวลา] LT',\n lastDay: '[เมื่อวานนี้ เวลา] LT',\n lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'อีก %s',\n past: '%sที่แล้ว',\n s: 'ไม่กี่วินาที',\n ss: '%d วินาที',\n m: '1 นาที',\n mm: '%d นาที',\n h: '1 ชั่วโมง',\n hh: '%d ชั่วโมง',\n d: '1 วัน',\n dd: '%d วัน',\n M: '1 เดือน',\n MM: '%d เดือน',\n y: '1 ปี',\n yy: '%d ปี'\n }\n });\n return th;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var tlPh = moment.defineLocale('tl-ph', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm'\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function ordinal(number) {\n return number;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tlPh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n function translateFuture(output) {\n var time = output;\n time = output.indexOf('jaj') !== -1 ? time.slice(0, -3) + 'leS' : output.indexOf('jar') !== -1 ? time.slice(0, -3) + 'waQ' : output.indexOf('DIS') !== -1 ? time.slice(0, -3) + 'nem' : time + ' pIq';\n return time;\n }\n\n function translatePast(output) {\n var time = output;\n time = output.indexOf('jaj') !== -1 ? time.slice(0, -3) + 'Hu’' : output.indexOf('jar') !== -1 ? time.slice(0, -3) + 'wen' : output.indexOf('DIS') !== -1 ? time.slice(0, -3) + 'ben' : time + ' ret';\n return time;\n }\n\n function translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n\n switch (string) {\n case 'ss':\n return numberNoun + ' lup';\n\n case 'mm':\n return numberNoun + ' tup';\n\n case 'hh':\n return numberNoun + ' rep';\n\n case 'dd':\n return numberNoun + ' jaj';\n\n case 'MM':\n return numberNoun + ' jar';\n\n case 'yy':\n return numberNoun + ' DIS';\n }\n }\n\n function numberAsNoun(number) {\n var hundred = Math.floor(number % 1000 / 100),\n ten = Math.floor(number % 100 / 10),\n one = number % 10,\n word = '';\n\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n\n if (ten > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n\n if (one > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[one];\n }\n\n return word === '' ? 'pagh' : word;\n }\n\n var tlh = moment.defineLocale('tlh', {\n months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),\n monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),\n monthsParseExact: true,\n weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L'\n },\n relativeTime: {\n future: translateFuture,\n past: translatePast,\n s: 'puS lup',\n ss: translate,\n m: 'wa’ tup',\n mm: translate,\n h: 'wa’ rep',\n hh: translate,\n d: 'wa’ jaj',\n dd: translate,\n M: 'wa’ jar',\n MM: translate,\n y: 'wa’ DIS',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tlh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var suffixes = {\n 1: '\\'inci',\n 5: '\\'inci',\n 8: '\\'inci',\n 70: '\\'inci',\n 80: '\\'inci',\n 2: '\\'nci',\n 7: '\\'nci',\n 20: '\\'nci',\n 50: '\\'nci',\n 3: '\\'üncü',\n 4: '\\'üncü',\n 100: '\\'üncü',\n 6: '\\'ncı',\n 9: '\\'uncu',\n 10: '\\'uncu',\n 30: '\\'uncu',\n 60: '\\'ıncı',\n 90: '\\'ıncı'\n };\n var tr = moment.defineLocale('tr', {\n months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),\n monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),\n weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),\n weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s önce',\n s: 'birkaç saniye',\n ss: '%d saniye',\n m: 'bir dakika',\n mm: '%d dakika',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir yıl',\n yy: '%d yıl'\n },\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n\n default:\n if (number === 0) {\n // special case for zero\n return number + '\\'ıncı';\n }\n\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return tr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n // This is currently too difficult (maybe even impossible) to add.\n\n var tzl = moment.defineLocale('tzl', {\n months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),\n monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM [dallas] YYYY',\n LLL: 'D. MMMM [dallas] YYYY HH.mm',\n LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM: function isPM(input) {\n return 'd\\'o' === input.toLowerCase();\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'd\\'o' : 'D\\'O';\n } else {\n return isLower ? 'd\\'a' : 'D\\'A';\n }\n },\n calendar: {\n sameDay: '[oxhi à] LT',\n nextDay: '[demà à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[ieiri à] LT',\n lastWeek: '[sür el] dddd [lasteu à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'osprei %s',\n past: 'ja%s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n 's': ['viensas secunds', '\\'iensas secunds'],\n 'ss': [number + ' secunds', '' + number + ' secunds'],\n 'm': ['\\'n míut', '\\'iens míut'],\n 'mm': [number + ' míuts', '' + number + ' míuts'],\n 'h': ['\\'n þora', '\\'iensa þora'],\n 'hh': [number + ' þoras', '' + number + ' þoras'],\n 'd': ['\\'n ziua', '\\'iensa ziua'],\n 'dd': [number + ' ziuas', '' + number + ' ziuas'],\n 'M': ['\\'n mes', '\\'iens mes'],\n 'MM': [number + ' mesen', '' + number + ' mesen'],\n 'y': ['\\'n ar', '\\'iens ar'],\n 'yy': [number + ' ars', '' + number + ' ars']\n };\n return isFuture ? format[key][0] : withoutSuffix ? format[key][0] : format[key][1];\n }\n\n return tzl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var tzm = moment.defineLocale('tzm', {\n months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past: 'ⵢⴰⵏ %s',\n s: 'ⵉⵎⵉⴽ',\n ss: '%d ⵉⵎⵉⴽ',\n m: 'ⵎⵉⵏⵓⴺ',\n mm: '%d ⵎⵉⵏⵓⴺ',\n h: 'ⵙⴰⵄⴰ',\n hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d: 'ⴰⵙⵙ',\n dd: '%d oⵙⵙⴰⵏ',\n M: 'ⴰⵢoⵓⵔ',\n MM: '%d ⵉⵢⵢⵉⵔⵏ',\n y: 'ⴰⵙⴳⴰⵙ',\n yy: '%d ⵉⵙⴳⴰⵙⵏ'\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return tzm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var tzmLatn = moment.defineLocale('tzm-latn', {\n months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dadkh s yan %s',\n past: 'yan %s',\n s: 'imik',\n ss: '%d imik',\n m: 'minuḍ',\n mm: '%d minuḍ',\n h: 'saɛa',\n hh: '%d tassaɛin',\n d: 'ass',\n dd: '%d ossan',\n M: 'ayowr',\n MM: '%d iyyirn',\n y: 'asgas',\n yy: '%d isgasn'\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return tzmLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js language configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var ugCn = moment.defineLocale('ug-cn', {\n months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split('_'),\n monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split('_'),\n weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split('_'),\n weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm'\n },\n meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'يېرىم كېچە' || meridiem === 'سەھەر' || meridiem === 'چۈشتىن بۇرۇن') {\n return hour;\n } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n return hour + 12;\n } else {\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return 'يېرىم كېچە';\n } else if (hm < 900) {\n return 'سەھەر';\n } else if (hm < 1130) {\n return 'چۈشتىن بۇرۇن';\n } else if (hm < 1230) {\n return 'چۈش';\n } else if (hm < 1800) {\n return 'چۈشتىن كېيىن';\n } else {\n return 'كەچ';\n }\n },\n calendar: {\n sameDay: '[بۈگۈن سائەت] LT',\n nextDay: '[ئەتە سائەت] LT',\n nextWeek: '[كېلەركى] dddd [سائەت] LT',\n lastDay: '[تۆنۈگۈن] LT',\n lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s كېيىن',\n past: '%s بۇرۇن',\n s: 'نەچچە سېكونت',\n ss: '%d سېكونت',\n m: 'بىر مىنۇت',\n mm: '%d مىنۇت',\n h: 'بىر سائەت',\n hh: '%d سائەت',\n d: 'بىر كۈن',\n dd: '%d كۈن',\n M: 'بىر ئاي',\n MM: '%d ئاي',\n y: 'بىر يىل',\n yy: '%d يىل'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '-كۈنى';\n\n case 'w':\n case 'W':\n return number + '-ھەپتە';\n\n default:\n return number;\n }\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 1st is the first week of the year.\n\n }\n });\n return ugCn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n 'ss': withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n 'dd': 'день_дні_днів',\n 'MM': 'місяць_місяці_місяців',\n 'yy': 'рік_роки_років'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n } else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n function weekdaysCaseReplace(m, format) {\n var weekdays = {\n 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),\n 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),\n 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')\n };\n\n if (m === true) {\n return weekdays['nominative'].slice(1, 7).concat(weekdays['nominative'].slice(0, 1));\n }\n\n if (!m) {\n return weekdays['nominative'];\n }\n\n var nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format) ? 'accusative' : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format) ? 'genitive' : 'nominative';\n return weekdays[nounCase][m.day()];\n }\n\n function processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n }\n\n var uk = moment.defineLocale('uk', {\n months: {\n 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),\n 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')\n },\n monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),\n weekdays: weekdaysCaseReplace,\n weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY р.',\n LLL: 'D MMMM YYYY р., HH:mm',\n LLLL: 'dddd, D MMMM YYYY р., HH:mm'\n },\n calendar: {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'за %s',\n past: '%s тому',\n s: 'декілька секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'годину',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'місяць',\n MM: relativeTimeWithPlural,\n y: 'рік',\n yy: relativeTimeWithPlural\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function isPM(input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n\n case 'D':\n return number + '-го';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return uk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var months = ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'];\n var days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n var ur = moment.defineLocale('ur', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm'\n },\n meridiemParse: /صبح|شام/,\n isPM: function isPM(input) {\n return 'شام' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n\n return 'شام';\n },\n calendar: {\n sameDay: '[آج بوقت] LT',\n nextDay: '[کل بوقت] LT',\n nextWeek: 'dddd [بوقت] LT',\n lastDay: '[گذشتہ روز بوقت] LT',\n lastWeek: '[گذشتہ] dddd [بوقت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s بعد',\n past: '%s قبل',\n s: 'چند سیکنڈ',\n ss: '%d سیکنڈ',\n m: 'ایک منٹ',\n mm: '%d منٹ',\n h: 'ایک گھنٹہ',\n hh: '%d گھنٹے',\n d: 'ایک دن',\n dd: '%d دن',\n M: 'ایک ماہ',\n MM: '%d ماہ',\n y: 'ایک سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ur;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var uz = moment.defineLocale('uz', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm'\n },\n calendar: {\n sameDay: '[Бугун соат] LT [да]',\n nextDay: '[Эртага] LT [да]',\n nextWeek: 'dddd [куни соат] LT [да]',\n lastDay: '[Кеча соат] LT [да]',\n lastWeek: '[Утган] dddd [куни соат] LT [да]',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'Якин %s ичида',\n past: 'Бир неча %s олдин',\n s: 'фурсат',\n ss: '%d фурсат',\n m: 'бир дакика',\n mm: '%d дакика',\n h: 'бир соат',\n hh: '%d соат',\n d: 'бир кун',\n dd: '%d кун',\n M: 'бир ой',\n MM: '%d ой',\n y: 'бир йил',\n yy: '%d йил'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return uz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var uzLatn = moment.defineLocale('uz-latn', {\n months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),\n monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),\n weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm'\n },\n calendar: {\n sameDay: '[Bugun soat] LT [da]',\n nextDay: '[Ertaga] LT [da]',\n nextWeek: 'dddd [kuni soat] LT [da]',\n lastDay: '[Kecha soat] LT [da]',\n lastWeek: '[O\\'tgan] dddd [kuni soat] LT [da]',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'Yaqin %s ichida',\n past: 'Bir necha %s oldin',\n s: 'soniya',\n ss: '%d soniya',\n m: 'bir daqiqa',\n mm: '%d daqiqa',\n h: 'bir soat',\n hh: '%d soat',\n d: 'bir kun',\n dd: '%d kun',\n M: 'bir oy',\n MM: '%d oy',\n y: 'bir yil',\n yy: '%d yil'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return uzLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var vi = moment.defineLocale('vi', {\n months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),\n monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),\n monthsParseExact: true,\n weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),\n weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /sa|ch/i,\n isPM: function isPM(input) {\n return /^ch$/i.test(input);\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [năm] YYYY',\n LLL: 'D MMMM [năm] YYYY HH:mm',\n LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n l: 'DD/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần rồi lúc] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s tới',\n past: '%s trước',\n s: 'vài giây',\n ss: '%d giây',\n m: 'một phút',\n mm: '%d phút',\n h: 'một giờ',\n hh: '%d giờ',\n d: 'một ngày',\n dd: '%d ngày',\n M: 'một tháng',\n MM: '%d tháng',\n y: 'một năm',\n yy: '%d năm'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function ordinal(number) {\n return number;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return vi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var xPseudo = moment.defineLocale('x-pseudo', {\n months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),\n monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),\n monthsParseExact: true,\n weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),\n weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[T~ódá~ý át] LT',\n nextDay: '[T~ómó~rró~w át] LT',\n nextWeek: 'dddd [át] LT',\n lastDay: '[Ý~ést~érdá~ý át] LT',\n lastWeek: '[L~ást] dddd [át] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'í~ñ %s',\n past: '%s á~gó',\n s: 'á ~féw ~sécó~ñds',\n ss: '%d s~écóñ~ds',\n m: 'á ~míñ~úté',\n mm: '%d m~íñú~tés',\n h: 'á~ñ hó~úr',\n hh: '%d h~óúrs',\n d: 'á ~dáý',\n dd: '%d d~áýs',\n M: 'á ~móñ~th',\n MM: '%d m~óñt~hs',\n y: 'á ~ýéár',\n yy: '%d ý~éárs'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return xPseudo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var yo = moment.defineLocale('yo', {\n months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),\n monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Ònì ni] LT',\n nextDay: '[Ọ̀la ni] LT',\n nextWeek: 'dddd [Ọsẹ̀ tón\\'bọ] [ni] LT',\n lastDay: '[Àna ni] LT',\n lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ní %s',\n past: '%s kọjá',\n s: 'ìsẹjú aayá die',\n ss: 'aayá %d',\n m: 'ìsẹjú kan',\n mm: 'ìsẹjú %d',\n h: 'wákati kan',\n hh: 'wákati %d',\n d: 'ọjọ́ kan',\n dd: 'ọjọ́ %d',\n M: 'osù kan',\n MM: 'osù %d',\n y: 'ọdún kan',\n yy: 'ọdún %d'\n },\n dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n ordinal: 'ọjọ́ %d',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return yo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '周';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s内',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年'\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return zhCn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var zhHk = moment.defineLocale('zh-hk', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '週';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年'\n }\n });\n return zhHk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict';\n\n var zhTw = moment.defineLocale('zh-tw', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '週';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年'\n }\n });\n return zhTw;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var af = moment.defineLocale('af', {\n months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),\n weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM: function isPM(input) {\n return /^nm$/i.test(input);\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Vandag om] LT',\n nextDay: '[Môre om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[Gister om] LT',\n lastWeek: '[Laas] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'oor %s',\n past: '%s gelede',\n s: \"'n paar sekondes\",\n ss: '%d sekondes',\n m: \"'n minuut\",\n mm: '%d minute',\n h: \"'n uur\",\n hh: '%d ure',\n d: \"'n dag\",\n dd: '%d dae',\n M: \"'n maand\",\n MM: '%d maande',\n y: \"'n jaar\",\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week: {\n dow: 1,\n // Maandag is die eerste dag van die week.\n doy: 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n\n }\n });\n return af;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n },\n pluralForm = function pluralForm(n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n },\n plurals = {\n s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n },\n pluralize = function pluralize(u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n\n return str.replace(/%d/i, number);\n };\n },\n months = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];\n\n var ar = moment.defineLocale('ar', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: \"D/\\u200FM/\\u200FYYYY\",\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y')\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return ar;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var pluralForm = function pluralForm(n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n },\n plurals = {\n s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n },\n pluralize = function pluralize(u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n\n return str.replace(/%d/i, number);\n };\n },\n months = ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان', 'جويلية', 'أوت', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];\n\n var arDz = moment.defineLocale('ar-dz', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: \"D/\\u200FM/\\u200FYYYY\",\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y')\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return arDz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var arKw = moment.defineLocale('ar-kw', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return arKw;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Lybia) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '1',\n 2: '2',\n 3: '3',\n 4: '4',\n 5: '5',\n 6: '6',\n 7: '7',\n 8: '8',\n 9: '9',\n 0: '0'\n },\n pluralForm = function pluralForm(n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n },\n plurals = {\n s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n },\n pluralize = function pluralize(u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n\n return str.replace(/%d/i, number);\n };\n },\n months = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];\n\n var arLy = moment.defineLocale('ar-ly', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: \"D/\\u200FM/\\u200FYYYY\",\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y')\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return arLy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var arMa = moment.defineLocale('ar-ma', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return arMa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n };\n var arSa = moment.defineLocale('ar-sa', {\n months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return arSa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return arTn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı'\n };\n var az = moment.defineLocale('az', {\n months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),\n monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),\n weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[sabah saat] LT',\n nextWeek: '[gələn həftə] dddd [saat] LT',\n lastDay: '[dünən] LT',\n lastWeek: '[keçən həftə] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s əvvəl',\n s: 'bir neçə saniyə',\n ss: '%d saniyə',\n m: 'bir dəqiqə',\n mm: '%d dəqiqə',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir il',\n yy: '%d il'\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM: function isPM(input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal: function ordinal(number) {\n if (number === 0) {\n // special case for zero\n return number + '-ıncı';\n }\n\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return az;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n dd: 'дзень_дні_дзён',\n MM: 'месяц_месяцы_месяцаў',\n yy: 'год_гады_гадоў'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n } else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var be = moment.defineLocale('be', {\n months: {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),\n standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')\n },\n monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays: {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),\n standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),\n isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/\n },\n weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., HH:mm',\n LLLL: 'dddd, D MMMM YYYY г., HH:mm'\n },\n calendar: {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function nextWeek() {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'праз %s',\n past: '%s таму',\n s: 'некалькі секунд',\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithPlural,\n hh: relativeTimeWithPlural,\n d: 'дзень',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM: function isPM(input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) && number % 100 !== 12 && number % 100 !== 13 ? number + '-і' : number + '-ы';\n\n case 'D':\n return number + '-га';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return be;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var bg = moment.defineLocale('bg', {\n months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),\n monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),\n weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Днес в] LT',\n nextDay: '[Утре в] LT',\n nextWeek: 'dddd [в] LT',\n lastDay: '[Вчера в] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Миналата] dddd [в] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Миналия] dddd [в] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'след %s',\n past: 'преди %s',\n s: 'няколко секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дена',\n w: 'седмица',\n ww: '%d седмици',\n M: 'месец',\n MM: '%d месеца',\n y: 'година',\n yy: '%d години'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function ordinal(number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return bg;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var bm = moment.defineLocale('bm', {\n months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'),\n monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'MMMM [tile] D [san] YYYY',\n LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm'\n },\n calendar: {\n sameDay: '[Bi lɛrɛ] LT',\n nextDay: '[Sini lɛrɛ] LT',\n nextWeek: 'dddd [don lɛrɛ] LT',\n lastDay: '[Kunu lɛrɛ] LT',\n lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s kɔnɔ',\n past: 'a bɛ %s bɔ',\n s: 'sanga dama dama',\n ss: 'sekondi %d',\n m: 'miniti kelen',\n mm: 'miniti %d',\n h: 'lɛrɛ kelen',\n hh: 'lɛrɛ %d',\n d: 'tile kelen',\n dd: 'tile %d',\n M: 'kalo kelen',\n MM: 'kalo %d',\n y: 'san kelen',\n yy: 'san %d'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return bm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০'\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0'\n };\n var bn = moment.defineLocale('bn', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),\n monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়'\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর'\n },\n preparse: function preparse(string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'রাত' && hour >= 4 || meridiem === 'দুপুর' && hour < 5 || meridiem === 'বিকাল') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return bn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০'\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0'\n };\n var bnBd = moment.defineLocale('bn-bd', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),\n monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়'\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর'\n },\n preparse: function preparse(string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'রাত') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ভোর') {\n return hour;\n } else if (meridiem === 'সকাল') {\n return hour;\n } else if (meridiem === 'দুপুর') {\n return hour >= 3 ? hour : hour + 12;\n } else if (meridiem === 'বিকাল') {\n return hour + 12;\n } else if (meridiem === 'সন্ধ্যা') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 6) {\n return 'ভোর';\n } else if (hour < 12) {\n return 'সকাল';\n } else if (hour < 15) {\n return 'দুপুর';\n } else if (hour < 18) {\n return 'বিকাল';\n } else if (hour < 20) {\n return 'সন্ধ্যা';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return bnBd;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '༡',\n 2: '༢',\n 3: '༣',\n 4: '༤',\n 5: '༥',\n 6: '༦',\n 7: '༧',\n 8: '༨',\n 9: '༩',\n 0: '༠'\n },\n numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0'\n };\n var bo = moment.defineLocale('bo', {\n months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split('_'),\n monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n monthsParseExact: true,\n weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),\n weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[དི་རིང] LT',\n nextDay: '[སང་ཉིན] LT',\n nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay: '[ཁ་སང] LT',\n lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ལ་',\n past: '%s སྔན་ལ',\n s: 'ལམ་སང',\n ss: '%d སྐར་ཆ།',\n m: 'སྐར་མ་གཅིག',\n mm: '%d སྐར་མ',\n h: 'ཆུ་ཚོད་གཅིག',\n hh: '%d ཆུ་ཚོད',\n d: 'ཉིན་གཅིག',\n dd: '%d ཉིན་',\n M: 'ཟླ་བ་གཅིག',\n MM: '%d ཟླ་བ',\n y: 'ལོ་གཅིག',\n yy: '%d ལོ'\n },\n preparse: function preparse(string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'མཚན་མོ' && hour >= 4 || meridiem === 'ཉིན་གུང' && hour < 5 || meridiem === 'དགོང་དག') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return bo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n mm: 'munutenn',\n MM: 'miz',\n dd: 'devezh'\n };\n return number + ' ' + mutation(format[key], number);\n }\n\n function specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n\n default:\n return number + ' vloaz';\n }\n }\n\n function lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n\n return number;\n }\n\n function mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n\n return text;\n }\n\n function softMutation(text) {\n var mutationTable = {\n m: 'v',\n b: 'v',\n d: 'z'\n };\n\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n\n return mutationTable[text.charAt(0)] + text.substring(1);\n }\n\n var monthsParse = [/^gen/i, /^c[ʼ\\']hwe/i, /^meu/i, /^ebr/i, /^mae/i, /^(mez|eve)/i, /^gou/i, /^eos/i, /^gwe/i, /^her/i, /^du/i, /^ker/i],\n monthsRegex = /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n monthsStrictRegex = /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n monthsShortStrictRegex = /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n fullWeekdaysParse = [/^sul/i, /^lun/i, /^meurzh/i, /^merc[ʼ\\']her/i, /^yaou/i, /^gwener/i, /^sadorn/i],\n shortWeekdaysParse = [/^Sul/i, /^Lun/i, /^Meu/i, /^Mer/i, /^Yao/i, /^Gwe/i, /^Sad/i],\n minWeekdaysParse = [/^Su/i, /^Lu/i, /^Me([^r]|$)/i, /^Mer/i, /^Ya/i, /^Gw/i, /^Sa/i];\n var br = moment.defineLocale('br', {\n months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),\n monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParse: minWeekdaysParse,\n fullWeekdaysParse: fullWeekdaysParse,\n shortWeekdaysParse: shortWeekdaysParse,\n minWeekdaysParse: minWeekdaysParse,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [a viz] MMMM YYYY',\n LLL: 'D [a viz] MMMM YYYY HH:mm',\n LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Hiziv da] LT',\n nextDay: '[Warcʼhoazh da] LT',\n nextWeek: 'dddd [da] LT',\n lastDay: '[Decʼh da] LT',\n lastWeek: 'dddd [paset da] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'a-benn %s',\n past: '%s ʼzo',\n s: 'un nebeud segondennoù',\n ss: '%d eilenn',\n m: 'ur vunutenn',\n mm: relativeTimeWithMutation,\n h: 'un eur',\n hh: '%d eur',\n d: 'un devezh',\n dd: relativeTimeWithMutation,\n M: 'ur miz',\n MM: relativeTimeWithMutation,\n y: 'ur bloaz',\n yy: specialMutationForYears\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'añ' : 'vet';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n },\n meridiemParse: /a.m.|g.m./,\n // goude merenn | a-raok merenn\n isPM: function isPM(token) {\n return token === 'g.m.';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n return hour < 12 ? 'a.m.' : 'g.m.';\n }\n });\n return br;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n\n return result;\n\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n\n return result;\n\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n\n return result;\n\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n\n return result;\n }\n }\n\n var bs = moment.defineLocale('bs', {\n months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n\n case 6:\n return '[prošle] [subote] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return bs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ca = moment.defineLocale('ca', {\n months: {\n standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),\n format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split('_'),\n isFormat: /D[oD]?(\\s)+MMMM/\n },\n monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),\n weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a les] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n llll: 'ddd D MMM YYYY, H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextDay: function nextDay() {\n return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [passat a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'uns segons',\n ss: '%d segons',\n m: 'un minut',\n mm: '%d minuts',\n h: 'una hora',\n hh: '%d hores',\n d: 'un dia',\n dd: '%d dies',\n M: 'un mes',\n MM: '%d mesos',\n y: 'un any',\n yy: '%d anys'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function ordinal(number, period) {\n var output = number === 1 ? 'r' : number === 2 ? 'n' : number === 3 ? 'r' : number === 4 ? 't' : 'è';\n\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ca;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n monthsParse = [/^led/i, /^úno/i, /^bře/i, /^dub/i, /^kvě/i, /^(čvn|červen$|června)/i, /^(čvc|červenec|července)/i, /^srp/i, /^zář/i, /^říj/i, /^lis/i, /^pro/i],\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n function plural(n) {\n return n > 1 && n < 5 && ~~(n / 10) !== 1;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n\n case 'ss':\n // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekund');\n } else {\n return result + 'sekundami';\n }\n\n case 'm':\n // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n\n case 'mm':\n // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n\n case 'h':\n // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n\n case 'hh':\n // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n\n case 'd':\n // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'den' : 'dnem';\n\n case 'dd':\n // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n\n case 'M':\n // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n\n case 'MM':\n // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n\n case 'y':\n // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokem';\n\n case 'yy':\n // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n\n }\n }\n\n var cs = moment.defineLocale('cs', {\n months: months,\n monthsShort: monthsShort,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n l: 'D. M. YYYY'\n },\n calendar: {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n\n case 3:\n return '[ve středu v] LT';\n\n case 4:\n return '[ve čtvrtek v] LT';\n\n case 5:\n return '[v pátek v] LT';\n\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n\n case 3:\n return '[minulou středu v] LT';\n\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'před %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return cs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var cv = moment.defineLocale('cv', {\n months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),\n monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),\n weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'\n },\n calendar: {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(output) {\n var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';\n return output + affix;\n },\n past: '%s каялла',\n s: 'пӗр-ик ҫеккунт',\n ss: '%d ҫеккунт',\n m: 'пӗр минут',\n mm: '%d минут',\n h: 'пӗр сехет',\n hh: '%d сехет',\n d: 'пӗр кун',\n dd: '%d кун',\n M: 'пӗр уйӑх',\n MM: '%d уйӑх',\n y: 'пӗр ҫул',\n yy: '%d ҫул'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal: '%d-мӗш',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return cv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),\n weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n ss: '%d eiliad',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function ordinal(number) {\n var b = number,\n output = '',\n lookup = ['', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed\n 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed\n ];\n\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return cy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var da = moment.defineLocale('da', {\n months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'på dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[i] dddd[s kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'få sekunder',\n ss: '%d sekunder',\n m: 'et minut',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dage',\n M: 'en måned',\n MM: '%d måneder',\n y: 'et år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return da;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var de = moment.defineLocale('de', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return de;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deAt = moment.defineLocale('de-at', {\n months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return deAt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deCh = moment.defineLocale('de-ch', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return deCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['ޖެނުއަރީ', 'ފެބްރުއަރީ', 'މާރިޗު', 'އޭޕްރީލު', 'މޭ', 'ޖޫން', 'ޖުލައި', 'އޯގަސްޓު', 'ސެޕްޓެމްބަރު', 'އޮކްޓޯބަރު', 'ނޮވެމްބަރު', 'ޑިސެމްބަރު'],\n weekdays = ['އާދިއްތަ', 'ހޯމަ', 'އަންގާރަ', 'ބުދަ', 'ބުރާސްފަތި', 'ހުކުރު', 'ހޮނިހިރު'];\n var dv = moment.defineLocale('dv', {\n months: months,\n monthsShort: months,\n weekdays: weekdays,\n weekdaysShort: weekdays,\n weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/M/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /މކ|މފ/,\n isPM: function isPM(input) {\n return 'މފ' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar: {\n sameDay: '[މިއަދު] LT',\n nextDay: '[މާދަމާ] LT',\n nextWeek: 'dddd LT',\n lastDay: '[އިއްޔެ] LT',\n lastWeek: '[ފާއިތުވި] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ތެރޭގައި %s',\n past: 'ކުރިން %s',\n s: 'ސިކުންތުކޮޅެއް',\n ss: 'd% ސިކުންތު',\n m: 'މިނިޓެއް',\n mm: 'މިނިޓު %d',\n h: 'ގަޑިއިރެއް',\n hh: 'ގަޑިއިރު %d',\n d: 'ދުވަހެއް',\n dd: 'ދުވަސް %d',\n M: 'މަހެއް',\n MM: 'މަސް %d',\n y: 'އަހަރެއް',\n yy: 'އަހަރު %d'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 7,\n // Sunday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return dv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function isFunction(input) {\n return typeof Function !== 'undefined' && input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n var el = moment.defineLocale('el', {\n monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),\n monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),\n months: function months(momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) {\n // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),\n weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM: function isPM(input) {\n return (input + '').toLowerCase()[0] === 'μ';\n },\n meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendarEl: {\n sameDay: '[Σήμερα {}] LT',\n nextDay: '[Αύριο {}] LT',\n nextWeek: 'dddd [{}] LT',\n lastDay: '[Χθες {}] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse: 'L'\n },\n calendar: function calendar(key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n\n return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n },\n relativeTime: {\n future: 'σε %s',\n past: '%s πριν',\n s: 'λίγα δευτερόλεπτα',\n ss: '%d δευτερόλεπτα',\n m: 'ένα λεπτό',\n mm: '%d λεπτά',\n h: 'μία ώρα',\n hh: '%d ώρες',\n d: 'μία μέρα',\n dd: '%d μέρες',\n M: 'ένας μήνας',\n MM: '%d μήνες',\n y: 'ένας χρόνος',\n yy: '%d χρόνια'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4st is the first week of the year.\n\n }\n });\n return el;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enAu = moment.defineLocale('en-au', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enAu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enCa = moment.defineLocale('en-ca', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'YYYY-MM-DD',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n });\n return enCa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enGb = moment.defineLocale('en-gb', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enGb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enIe = moment.defineLocale('en-ie', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enIe;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n });\n return enIl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enIn = moment.defineLocale('en-in', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 1st is the first week of the year.\n\n }\n });\n return enIn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enNz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enSg = moment.defineLocale('en-sg', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enSg;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var eo = moment.defineLocale('eo', {\n months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),\n monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: '[la] D[-an de] MMMM, YYYY',\n LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm'\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function isPM(input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar: {\n sameDay: '[Hodiaŭ je] LT',\n nextDay: '[Morgaŭ je] LT',\n nextWeek: 'dddd[n je] LT',\n lastDay: '[Hieraŭ je] LT',\n lastWeek: '[pasintan] dddd[n je] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'post %s',\n past: 'antaŭ %s',\n s: 'kelkaj sekundoj',\n ss: '%d sekundoj',\n m: 'unu minuto',\n mm: '%d minutoj',\n h: 'unu horo',\n hh: '%d horoj',\n d: 'unu tago',\n //ne 'diurno', ĉar estas uzita por proksimumo\n dd: '%d tagoj',\n M: 'unu monato',\n MM: '%d monatoj',\n y: 'unu jaro',\n yy: '%d jaroj'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal: '%da',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return eo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i],\n monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var es = moment.defineLocale('es', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n },\n invalidDate: 'Fecha inválida'\n });\n return es;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i],\n monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esDo = moment.defineLocale('es-do', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return esDo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i],\n monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esMx = moment.defineLocale('es-mx', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n },\n invalidDate: 'Fecha inválida'\n });\n return esMx;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i],\n monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esUs = moment.defineLocale('es-us', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'MM/DD/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return esUs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n ss: [number + 'sekundi', number + 'sekundit'],\n m: ['ühe minuti', 'üks minut'],\n mm: [number + ' minuti', number + ' minutit'],\n h: ['ühe tunni', 'tund aega', 'üks tund'],\n hh: [number + ' tunni', number + ' tundi'],\n d: ['ühe päeva', 'üks päev'],\n M: ['kuu aja', 'kuu aega', 'üks kuu'],\n MM: [number + ' kuu', number + ' kuud'],\n y: ['ühe aasta', 'aasta', 'üks aasta'],\n yy: [number + ' aasta', number + ' aastat']\n };\n\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var et = moment.defineLocale('et', {\n months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),\n monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),\n weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Täna,] LT',\n nextDay: '[Homme,] LT',\n nextWeek: '[Järgmine] dddd LT',\n lastDay: '[Eile,] LT',\n lastWeek: '[Eelmine] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s pärast',\n past: '%s tagasi',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: '%d päeva',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return et;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var eu = moment.defineLocale('eu', {\n months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),\n monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),\n monthsParseExact: true,\n weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),\n weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY[ko] MMMM[ren] D[a]',\n LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l: 'YYYY-M-D',\n ll: 'YYYY[ko] MMM D[a]',\n lll: 'YYYY[ko] MMM D[a] HH:mm',\n llll: 'ddd, YYYY[ko] MMM D[a] HH:mm'\n },\n calendar: {\n sameDay: '[gaur] LT[etan]',\n nextDay: '[bihar] LT[etan]',\n nextWeek: 'dddd LT[etan]',\n lastDay: '[atzo] LT[etan]',\n lastWeek: '[aurreko] dddd LT[etan]',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s barru',\n past: 'duela %s',\n s: 'segundo batzuk',\n ss: '%d segundo',\n m: 'minutu bat',\n mm: '%d minutu',\n h: 'ordu bat',\n hh: '%d ordu',\n d: 'egun bat',\n dd: '%d egun',\n M: 'hilabete bat',\n MM: '%d hilabete',\n y: 'urte bat',\n yy: '%d urte'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return eu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '۱',\n 2: '۲',\n 3: '۳',\n 4: '۴',\n 5: '۵',\n 6: '۶',\n 7: '۷',\n 8: '۸',\n 9: '۹',\n 0: '۰'\n },\n numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0'\n };\n var fa = moment.defineLocale('fa', {\n months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n weekdays: \"\\u06CC\\u06A9\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062F\\u0648\\u0634\\u0646\\u0628\\u0647_\\u0633\\u0647\\u200C\\u0634\\u0646\\u0628\\u0647_\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647_\\u067E\\u0646\\u062C\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062C\\u0645\\u0639\\u0647_\\u0634\\u0646\\u0628\\u0647\".split('_'),\n weekdaysShort: \"\\u06CC\\u06A9\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062F\\u0648\\u0634\\u0646\\u0628\\u0647_\\u0633\\u0647\\u200C\\u0634\\u0646\\u0628\\u0647_\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647_\\u067E\\u0646\\u062C\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062C\\u0645\\u0639\\u0647_\\u0634\\u0646\\u0628\\u0647\".split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function isPM(input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar: {\n sameDay: '[امروز ساعت] LT',\n nextDay: '[فردا ساعت] LT',\n nextWeek: 'dddd [ساعت] LT',\n lastDay: '[دیروز ساعت] LT',\n lastWeek: 'dddd [پیش] [ساعت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'در %s',\n past: '%s پیش',\n s: 'چند ثانیه',\n ss: '%d ثانیه',\n m: 'یک دقیقه',\n mm: '%d دقیقه',\n h: 'یک ساعت',\n hh: '%d ساعت',\n d: 'یک روز',\n dd: '%d روز',\n M: 'یک ماه',\n MM: '%d ماه',\n y: 'یک سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal: '%dم',\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return fa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),\n numbersFuture = ['nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', numbersPast[7], numbersPast[8], numbersPast[9]];\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n\n case 'ss':\n result = isFuture ? 'sekunnin' : 'sekuntia';\n break;\n\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n }\n\n function verbalNumber(number, isFuture) {\n return number < 10 ? isFuture ? numbersFuture[number] : numbersPast[number] : number;\n }\n\n var fi = moment.defineLocale('fi', {\n months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),\n monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),\n weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),\n weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[ta] YYYY',\n LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l: 'D.M.YYYY',\n ll: 'Do MMM YYYY',\n lll: 'Do MMM YYYY, [klo] HH.mm',\n llll: 'ddd, Do MMM YYYY, [klo] HH.mm'\n },\n calendar: {\n sameDay: '[tänään] [klo] LT',\n nextDay: '[huomenna] [klo] LT',\n nextWeek: 'dddd [klo] LT',\n lastDay: '[eilen] [klo] LT',\n lastWeek: '[viime] dddd[na] [klo] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s päästä',\n past: '%s sitten',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var fil = moment.defineLocale('fil', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm'\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function ordinal(number) {\n return number;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fil;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var fo = moment.defineLocale('fo', {\n months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),\n weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D. MMMM, YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Í dag kl.] LT',\n nextDay: '[Í morgin kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[Í gjár kl.] LT',\n lastWeek: '[síðstu] dddd [kl] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'um %s',\n past: '%s síðani',\n s: 'fá sekund',\n ss: '%d sekundir',\n m: 'ein minuttur',\n mm: '%d minuttir',\n h: 'ein tími',\n hh: '%d tímar',\n d: 'ein dagur',\n dd: '%d dagar',\n M: 'ein mánaður',\n MM: '%d mánaðir',\n y: 'eitt ár',\n yy: '%d ár'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsStrictRegex = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsShortStrictRegex = /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n monthsRegex = /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsParse = [/^janv/i, /^févr/i, /^mars/i, /^avr/i, /^mai/i, /^juin/i, /^juil/i, /^août/i, /^sept/i, /^oct/i, /^nov/i, /^déc/i];\n var fr = moment.defineLocale('fr', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n w: 'une semaine',\n ww: '%d semaines',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n // Words with masculine grammatical gender: mois, trimestre, jour\n\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var frCa = moment.defineLocale('fr-ca', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n }\n });\n return frCa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var frCh = moment.defineLocale('fr-ch', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return frCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Meitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deireadh Fómhair', 'Samhain', 'Nollaig'],\n monthsShort = ['Ean', 'Feabh', 'Márt', 'Aib', 'Beal', 'Meith', 'Iúil', 'Lún', 'M.F.', 'D.F.', 'Samh', 'Noll'],\n weekdays = ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Sathairn'],\n weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n var ga = moment.defineLocale('ga', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Inniu ag] LT',\n nextDay: '[Amárach ag] LT',\n nextWeek: 'dddd [ag] LT',\n lastDay: '[Inné ag] LT',\n lastWeek: 'dddd [seo caite] [ag] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'i %s',\n past: '%s ó shin',\n s: 'cúpla soicind',\n ss: '%d soicind',\n m: 'nóiméad',\n mm: '%d nóiméad',\n h: 'uair an chloig',\n hh: '%d uair an chloig',\n d: 'lá',\n dd: '%d lá',\n M: 'mí',\n MM: '%d míonna',\n y: 'bliain',\n yy: '%d bliain'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ga;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'],\n monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'],\n weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'],\n weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n var gd = moment.defineLocale('gd', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[An-diugh aig] LT',\n nextDay: '[A-màireach aig] LT',\n nextWeek: 'dddd [aig] LT',\n lastDay: '[An-dè aig] LT',\n lastWeek: 'dddd [seo chaidh] [aig] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ann an %s',\n past: 'bho chionn %s',\n s: 'beagan diogan',\n ss: '%d diogan',\n m: 'mionaid',\n mm: '%d mionaidean',\n h: 'uair',\n hh: '%d uairean',\n d: 'latha',\n dd: '%d latha',\n M: 'mìos',\n MM: '%d mìosan',\n y: 'bliadhna',\n yy: '%d bliadhna'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return gd;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var gl = moment.defineLocale('gl', {\n months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),\n monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n lastDay: function lastDay() {\n return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n\n return 'en ' + str;\n },\n past: 'hai %s',\n s: 'uns segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'unha hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return gl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n m: ['एका मिणटान', 'एक मिनूट'],\n mm: [number + ' मिणटांनी', number + ' मिणटां'],\n h: ['एका वरान', 'एक वर'],\n hh: [number + ' वरांनी', number + ' वरां'],\n d: ['एका दिसान', 'एक दीस'],\n dd: [number + ' दिसांनी', number + ' दीस'],\n M: ['एका म्हयन्यान', 'एक म्हयनो'],\n MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n y: ['एका वर्सान', 'एक वर्स'],\n yy: [number + ' वर्सांनी', number + ' वर्सां']\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomDeva = moment.defineLocale('gom-deva', {\n months: {\n standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),\n format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split('_'),\n isFormat: /MMMM(\\s)+D[oD]?/\n },\n monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),\n monthsParseExact: true,\n weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [वाजतां]',\n LTS: 'A h:mm:ss [वाजतां]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]'\n },\n calendar: {\n sameDay: '[आयज] LT',\n nextDay: '[फाल्यां] LT',\n nextWeek: '[फुडलो] dddd[,] LT',\n lastDay: '[काल] LT',\n lastWeek: '[फाटलो] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s',\n past: '%s आदीं',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // the ordinal 'वेर' only applies to day of the month\n case 'D':\n return number + 'वेर';\n\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week\n doy: 3 // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n\n },\n meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'राती') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळीं') {\n return hour;\n } else if (meridiem === 'दनपारां') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'सांजे') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'राती';\n } else if (hour < 12) {\n return 'सकाळीं';\n } else if (hour < 16) {\n return 'दनपारां';\n } else if (hour < 20) {\n return 'सांजे';\n } else {\n return 'राती';\n }\n }\n });\n return gomDeva;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['thoddea sekondamni', 'thodde sekond'],\n ss: [number + ' sekondamni', number + ' sekond'],\n m: ['eka mintan', 'ek minut'],\n mm: [number + ' mintamni', number + ' mintam'],\n h: ['eka voran', 'ek vor'],\n hh: [number + ' voramni', number + ' voram'],\n d: ['eka disan', 'ek dis'],\n dd: [number + ' disamni', number + ' dis'],\n M: ['eka mhoinean', 'ek mhoino'],\n MM: [number + ' mhoineamni', number + ' mhoine'],\n y: ['eka vorsan', 'ek voros'],\n yy: [number + ' vorsamni', number + ' vorsam']\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomLatn = moment.defineLocale('gom-latn', {\n months: {\n standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),\n format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split('_'),\n isFormat: /MMMM(\\s)+D[oD]?/\n },\n monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [vazta]',\n LTS: 'A h:mm:ss [vazta]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [vazta]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]'\n },\n calendar: {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Fuddlo] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fattlo] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s',\n past: '%s adim',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week\n doy: 3 // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n\n },\n meridiemParse: /rati|sokallim|donparam|sanje/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokallim') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokallim';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n }\n });\n return gomLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '૧',\n 2: '૨',\n 3: '૩',\n 4: '૪',\n 5: '૫',\n 6: '૬',\n 7: '૭',\n 8: '૮',\n 9: '૯',\n 0: '૦'\n },\n numberMap = {\n '૧': '1',\n '૨': '2',\n '૩': '3',\n '૪': '4',\n '૫': '5',\n '૬': '6',\n '૭': '7',\n '૮': '8',\n '૯': '9',\n '૦': '0'\n };\n var gu = moment.defineLocale('gu', {\n months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'),\n monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'),\n monthsParseExact: true,\n weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'),\n weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm વાગ્યે',\n LTS: 'A h:mm:ss વાગ્યે',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે'\n },\n calendar: {\n sameDay: '[આજ] LT',\n nextDay: '[કાલે] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ગઇકાલે] LT',\n lastWeek: '[પાછલા] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s મા',\n past: '%s પહેલા',\n s: 'અમુક પળો',\n ss: '%d સેકંડ',\n m: 'એક મિનિટ',\n mm: '%d મિનિટ',\n h: 'એક કલાક',\n hh: '%d કલાક',\n d: 'એક દિવસ',\n dd: '%d દિવસ',\n M: 'એક મહિનો',\n MM: '%d મહિનો',\n y: 'એક વર્ષ',\n yy: '%d વર્ષ'\n },\n preparse: function preparse(string) {\n return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'રાત') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'સવાર') {\n return hour;\n } else if (meridiem === 'બપોર') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'સાંજ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'રાત';\n } else if (hour < 10) {\n return 'સવાર';\n } else if (hour < 17) {\n return 'બપોર';\n } else if (hour < 20) {\n return 'સાંજ';\n } else {\n return 'રાત';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return gu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var he = moment.defineLocale('he', {\n months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),\n monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [ב]MMMM YYYY',\n LLL: 'D [ב]MMMM YYYY HH:mm',\n LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n l: 'D/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[היום ב־]LT',\n nextDay: '[מחר ב־]LT',\n nextWeek: 'dddd [בשעה] LT',\n lastDay: '[אתמול ב־]LT',\n lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'בעוד %s',\n past: 'לפני %s',\n s: 'מספר שניות',\n ss: '%d שניות',\n m: 'דקה',\n mm: '%d דקות',\n h: 'שעה',\n hh: function hh(number) {\n if (number === 2) {\n return 'שעתיים';\n }\n\n return number + ' שעות';\n },\n d: 'יום',\n dd: function dd(number) {\n if (number === 2) {\n return 'יומיים';\n }\n\n return number + ' ימים';\n },\n M: 'חודש',\n MM: function MM(number) {\n if (number === 2) {\n return 'חודשיים';\n }\n\n return number + ' חודשים';\n },\n y: 'שנה',\n yy: function yy(number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n\n return number + ' שנים';\n }\n },\n meridiemParse: /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM: function isPM(input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n }\n });\n return he;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n },\n monthsParse = [/^जन/i, /^फ़र|फर/i, /^मार्च/i, /^अप्रै/i, /^मई/i, /^जून/i, /^जुल/i, /^अग/i, /^सितं|सित/i, /^अक्टू/i, /^नव|नवं/i, /^दिसं|दिस/i],\n shortMonthsParse = [/^जन/i, /^फ़र/i, /^मार्च/i, /^अप्रै/i, /^मई/i, /^जून/i, /^जुल/i, /^अग/i, /^सित/i, /^अक्टू/i, /^नव/i, /^दिस/i];\n var hi = moment.defineLocale('hi', {\n months: {\n format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),\n standalone: 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split('_')\n },\n monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm बजे',\n LTS: 'A h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'\n },\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: shortMonthsParse,\n monthsRegex: /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n monthsShortRegex: /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n monthsStrictRegex: /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n monthsShortStrictRegex: /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s में',\n past: '%s पहले',\n s: 'कुछ ही क्षण',\n ss: '%d सेकंड',\n m: 'एक मिनट',\n mm: '%d मिनट',\n h: 'एक घंटा',\n hh: '%d घंटे',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महीने',\n MM: '%d महीने',\n y: 'एक वर्ष',\n yy: '%d वर्ष'\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return hi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n\n return result;\n\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n\n return result;\n\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n\n return result;\n\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n\n return result;\n }\n }\n\n var hr = moment.defineLocale('hr', {\n months: {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),\n standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')\n },\n monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM YYYY',\n LLL: 'Do MMMM YYYY H:mm',\n LLLL: 'dddd, Do MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[prošlu] [nedjelju] [u] LT';\n\n case 3:\n return '[prošlu] [srijedu] [u] LT';\n\n case 6:\n return '[prošle] [subote] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return hr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt : https://github.com/passatgt\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n\n function translate(number, withoutSuffix, key, isFuture) {\n var num = number;\n\n switch (key) {\n case 's':\n return isFuture || withoutSuffix ? 'néhány másodperc' : 'néhány másodperce';\n\n case 'ss':\n return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce';\n\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n\n return '';\n }\n\n function week(isFuture) {\n return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';\n }\n\n var hu = moment.defineLocale('hu', {\n months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),\n monthsShort: 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY. MMMM D.',\n LLL: 'YYYY. MMMM D. H:mm',\n LLLL: 'YYYY. MMMM D., dddd H:mm'\n },\n meridiemParse: /de|du/i,\n isPM: function isPM(input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar: {\n sameDay: '[ma] LT[-kor]',\n nextDay: '[holnap] LT[-kor]',\n nextWeek: function nextWeek() {\n return week.call(this, true);\n },\n lastDay: '[tegnap] LT[-kor]',\n lastWeek: function lastWeek() {\n return week.call(this, false);\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s múlva',\n past: '%s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return hu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var hyAm = moment.defineLocale('hy-am', {\n months: {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),\n standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')\n },\n monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),\n weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY թ.',\n LLL: 'D MMMM YYYY թ., HH:mm',\n LLLL: 'dddd, D MMMM YYYY թ., HH:mm'\n },\n calendar: {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function nextWeek() {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function lastWeek() {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s հետո',\n past: '%s առաջ',\n s: 'մի քանի վայրկյան',\n ss: '%d վայրկյան',\n m: 'րոպե',\n mm: '%d րոպե',\n h: 'ժամ',\n hh: '%d ժամ',\n d: 'օր',\n dd: '%d օր',\n M: 'ամիս',\n MM: '%d ամիս',\n y: 'տարի',\n yy: '%d տարի'\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function isPM(input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem: function meridiem(hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n\n return number + '-րդ';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return hyAm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var id = moment.defineLocale('id', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Besok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kemarin pukul] LT',\n lastWeek: 'dddd [lalu pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lalu',\n s: 'beberapa detik',\n ss: '%d detik',\n m: 'semenit',\n mm: '%d menit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return id;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n\n return true;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';\n\n case 'ss':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum');\n }\n\n return result + 'sekúnda';\n\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n\n case 'mm':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n\n return result + 'mínútu';\n\n case 'hh':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');\n }\n\n return result + 'klukkustund';\n\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n\n return isFuture ? 'dag' : 'degi';\n\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n\n return result + (isFuture ? 'dag' : 'degi');\n\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n\n return isFuture ? 'mánuð' : 'mánuði';\n\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n\n return result + (isFuture ? 'mánuð' : 'mánuði');\n\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n }\n\n var is = moment.defineLocale('is', {\n months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),\n weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm'\n },\n calendar: {\n sameDay: '[í dag kl.] LT',\n nextDay: '[á morgun kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[í gær kl.] LT',\n lastWeek: '[síðasta] dddd [kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'eftir %s',\n past: 'fyrir %s síðan',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: 'klukkustund',\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return is;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[Oggi a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n },\n nextDay: function nextDay() {\n return '[Domani a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n },\n lastDay: function lastDay() {\n return '[Ieri a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n },\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[La scorsa] dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n\n default:\n return '[Lo scorso] dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return it;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return itCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ja = moment.defineLocale('ja', {\n eras: [{\n since: '2019-05-01',\n offset: 1,\n name: '令和',\n narrow: '㋿',\n abbr: 'R'\n }, {\n since: '1989-01-08',\n until: '2019-04-30',\n offset: 1,\n name: '平成',\n narrow: '㍻',\n abbr: 'H'\n }, {\n since: '1926-12-25',\n until: '1989-01-07',\n offset: 1,\n name: '昭和',\n narrow: '㍼',\n abbr: 'S'\n }, {\n since: '1912-07-30',\n until: '1926-12-24',\n offset: 1,\n name: '大正',\n narrow: '㍽',\n abbr: 'T'\n }, {\n since: '1873-01-01',\n until: '1912-07-29',\n offset: 6,\n name: '明治',\n narrow: '㍾',\n abbr: 'M'\n }, {\n since: '0001-01-01',\n until: '1873-12-31',\n offset: 1,\n name: '西暦',\n narrow: 'AD',\n abbr: 'AD'\n }, {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: '紀元前',\n narrow: 'BC',\n abbr: 'BC'\n }],\n eraYearOrdinalRegex: /(元|\\d+)年/,\n eraYearOrdinalParse: function eraYearOrdinalParse(input, match) {\n return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n },\n months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日 dddd HH:mm',\n l: 'YYYY/MM/DD',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日(ddd) HH:mm'\n },\n meridiemParse: /午前|午後/i,\n isPM: function isPM(input) {\n return input === '午後';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar: {\n sameDay: '[今日] LT',\n nextDay: '[明日] LT',\n nextWeek: function nextWeek(now) {\n if (now.week() !== this.week()) {\n return '[来週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n lastDay: '[昨日] LT',\n lastWeek: function lastWeek(now) {\n if (this.week() !== now.week()) {\n return '[先週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}日/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'y':\n return number === 1 ? '元年' : number + '年';\n\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '数秒',\n ss: '%d秒',\n m: '1分',\n mm: '%d分',\n h: '1時間',\n hh: '%d時間',\n d: '1日',\n dd: '%d日',\n M: '1ヶ月',\n MM: '%dヶ月',\n y: '1年',\n yy: '%d年'\n }\n });\n return ja;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var jv = moment.defineLocale('jv', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar: {\n sameDay: '[Dinten puniko pukul] LT',\n nextDay: '[Mbenjang pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kala wingi pukul] LT',\n lastWeek: 'dddd [kepengker pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'wonten ing %s',\n past: '%s ingkang kepengker',\n s: 'sawetawis detik',\n ss: '%d detik',\n m: 'setunggal menit',\n mm: '%d menit',\n h: 'setunggal jam',\n hh: '%d jam',\n d: 'sedinten',\n dd: '%d dinten',\n M: 'sewulan',\n MM: '%d wulan',\n y: 'setaun',\n yy: '%d taun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return jv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ka = moment.defineLocale('ka', {\n months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),\n monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays: {\n standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),\n isFormat: /(წინა|შემდეგ)/\n },\n weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[დღეს] LT[-ზე]',\n nextDay: '[ხვალ] LT[-ზე]',\n lastDay: '[გუშინ] LT[-ზე]',\n nextWeek: '[შემდეგ] dddd LT[-ზე]',\n lastWeek: '[წინა] dddd LT-ზე',\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(s) {\n return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function ($0, $1, $2) {\n return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n });\n },\n past: function past(s) {\n if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n return s.replace(/(ი|ე)$/, 'ის წინ');\n }\n\n if (/წელი/.test(s)) {\n return s.replace(/წელი$/, 'წლის წინ');\n }\n\n return s;\n },\n s: 'რამდენიმე წამი',\n ss: '%d წამი',\n m: 'წუთი',\n mm: '%d წუთი',\n h: 'საათი',\n hh: '%d საათი',\n d: 'დღე',\n dd: '%d დღე',\n M: 'თვე',\n MM: '%d თვე',\n y: 'წელი',\n yy: '%d წელი'\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal: function ordinal(number) {\n if (number === 0) {\n return number;\n }\n\n if (number === 1) {\n return number + '-ლი';\n }\n\n if (number < 20 || number <= 100 && number % 20 === 0 || number % 100 === 0) {\n return 'მე-' + number;\n }\n\n return number + '-ე';\n },\n week: {\n dow: 1,\n doy: 7\n }\n });\n return ka;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші'\n };\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return kk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '១',\n 2: '២',\n 3: '៣',\n 4: '៤',\n 5: '៥',\n 6: '៦',\n 7: '៧',\n 8: '៨',\n 9: '៩',\n 0: '០'\n },\n numberMap = {\n '១': '1',\n '២': '2',\n '៣': '3',\n '៤': '4',\n '៥': '5',\n '៦': '6',\n '៧': '7',\n '៨': '8',\n '៩': '9',\n '០': '0'\n };\n var km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /ព្រឹក|ល្ងាច/,\n isPM: function isPM(input) {\n return input === 'ល្ងាច';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ព្រឹក';\n } else {\n return 'ល្ងាច';\n }\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n ss: '%d វិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ'\n },\n dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n ordinal: 'ទី%d',\n preparse: function preparse(string) {\n return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return km;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '೧',\n 2: '೨',\n 3: '೩',\n 4: '೪',\n 5: '೫',\n 6: '೬',\n 7: '೭',\n 8: '೮',\n 9: '೯',\n 0: '೦'\n },\n numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0'\n };\n var kn = moment.defineLocale('kn', {\n months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),\n monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'),\n monthsParseExact: true,\n weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),\n weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[ಇಂದು] LT',\n nextDay: '[ನಾಳೆ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ನಿನ್ನೆ] LT',\n lastWeek: '[ಕೊನೆಯ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ನಂತರ',\n past: '%s ಹಿಂದೆ',\n s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n ss: '%d ಸೆಕೆಂಡುಗಳು',\n m: 'ಒಂದು ನಿಮಿಷ',\n mm: '%d ನಿಮಿಷ',\n h: 'ಒಂದು ಗಂಟೆ',\n hh: '%d ಗಂಟೆ',\n d: 'ಒಂದು ದಿನ',\n dd: '%d ದಿನ',\n M: 'ಒಂದು ತಿಂಗಳು',\n MM: '%d ತಿಂಗಳು',\n y: 'ಒಂದು ವರ್ಷ',\n yy: '%d ವರ್ಷ'\n },\n preparse: function preparse(string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal: function ordinal(number) {\n return number + 'ನೇ';\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return kn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee \n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ko = moment.defineLocale('ko', {\n months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY년 MMMM D일',\n LLL: 'YYYY년 MMMM D일 A h:mm',\n LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n l: 'YYYY.MM.DD.',\n ll: 'YYYY년 MMMM D일',\n lll: 'YYYY년 MMMM D일 A h:mm',\n llll: 'YYYY년 MMMM D일 dddd A h:mm'\n },\n calendar: {\n sameDay: '오늘 LT',\n nextDay: '내일 LT',\n nextWeek: 'dddd LT',\n lastDay: '어제 LT',\n lastWeek: '지난주 dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s 후',\n past: '%s 전',\n s: '몇 초',\n ss: '%d초',\n m: '1분',\n mm: '%d분',\n h: '한 시간',\n hh: '%d시간',\n d: '하루',\n dd: '%d일',\n M: '한 달',\n MM: '%d달',\n y: '일 년',\n yy: '%d년'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '일';\n\n case 'M':\n return number + '월';\n\n case 'w':\n case 'W':\n return number + '주';\n\n default:\n return number;\n }\n },\n meridiemParse: /오전|오후/,\n isPM: function isPM(token) {\n return token === '오후';\n },\n meridiem: function meridiem(hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n }\n });\n return ko;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n },\n months = ['کانونی دووەم', 'شوبات', 'ئازار', 'نیسان', 'ئایار', 'حوزەیران', 'تەمموز', 'ئاب', 'ئەیلوول', 'تشرینی یەكەم', 'تشرینی دووەم', 'كانونی یەکەم'];\n var ku = moment.defineLocale('ku', {\n months: months,\n monthsShort: months,\n weekdays: 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split('_'),\n weekdaysShort: 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /ئێواره|بهیانی/,\n isPM: function isPM(input) {\n return /ئێواره/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'بهیانی';\n } else {\n return 'ئێواره';\n }\n },\n calendar: {\n sameDay: '[ئهمرۆ كاتژمێر] LT',\n nextDay: '[بهیانی كاتژمێر] LT',\n nextWeek: 'dddd [كاتژمێر] LT',\n lastDay: '[دوێنێ كاتژمێر] LT',\n lastWeek: 'dddd [كاتژمێر] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'له %s',\n past: '%s',\n s: 'چهند چركهیهك',\n ss: 'چركه %d',\n m: 'یهك خولهك',\n mm: '%d خولهك',\n h: 'یهك كاتژمێر',\n hh: '%d كاتژمێر',\n d: 'یهك ڕۆژ',\n dd: '%d ڕۆژ',\n M: 'یهك مانگ',\n MM: '%d مانگ',\n y: 'یهك ساڵ',\n yy: '%d ساڵ'\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return ku;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү'\n };\n var ky = moment.defineLocale('ky', {\n months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),\n monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),\n weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Бүгүн саат] LT',\n nextDay: '[Эртең саат] LT',\n nextWeek: 'dddd [саат] LT',\n lastDay: '[Кечээ саат] LT',\n lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ичинде',\n past: '%s мурун',\n s: 'бирнече секунд',\n ss: '%d секунд',\n m: 'бир мүнөт',\n mm: '%d мүнөт',\n h: 'бир саат',\n hh: '%d саат',\n d: 'бир күн',\n dd: '%d күн',\n M: 'бир ай',\n MM: '%d ай',\n y: 'бир жыл',\n yy: '%d жыл'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ky;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eng Minutt', 'enger Minutt'],\n h: ['eng Stonn', 'enger Stonn'],\n d: ['een Dag', 'engem Dag'],\n M: ['ee Mount', 'engem Mount'],\n y: ['ee Joer', 'engem Joer']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n function processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n\n return 'an ' + string;\n }\n\n function processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n\n return 'virun ' + string;\n }\n /**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\n\n\n function eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n\n if (isNaN(number)) {\n return false;\n }\n\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10,\n firstDigit = number / 10;\n\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n }\n\n var lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function lastWeek() {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n\n default:\n return '[Leschte] dddd [um] LT';\n }\n }\n },\n relativeTime: {\n future: processFutureTime,\n past: processPastTime,\n s: 'e puer Sekonnen',\n ss: '%d Sekonnen',\n m: processRelativeTime,\n mm: '%d Minutten',\n h: processRelativeTime,\n hh: '%d Stonnen',\n d: processRelativeTime,\n dd: '%d Deeg',\n M: processRelativeTime,\n MM: '%d Méint',\n y: processRelativeTime,\n yy: '%d Joer'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var lo = moment.defineLocale('lo', {\n months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'ວັນdddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function isPM(input) {\n return input === 'ຕອນແລງ';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar: {\n sameDay: '[ມື້ນີ້ເວລາ] LT',\n nextDay: '[ມື້ອື່ນເວລາ] LT',\n nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ອີກ %s',\n past: '%sຜ່ານມາ',\n s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n ss: '%d ວິນາທີ',\n m: '1 ນາທີ',\n mm: '%d ນາທີ',\n h: '1 ຊົ່ວໂມງ',\n hh: '%d ຊົ່ວໂມງ',\n d: '1 ມື້',\n dd: '%d ມື້',\n M: '1 ເດືອນ',\n MM: '%d ເດືອນ',\n y: '1 ປີ',\n yy: '%d ປີ'\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal: function ordinal(number) {\n return 'ທີ່' + number;\n }\n });\n return lo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var units = {\n ss: 'sekundė_sekundžių_sekundes',\n m: 'minutė_minutės_minutę',\n mm: 'minutės_minučių_minutes',\n h: 'valanda_valandos_valandą',\n hh: 'valandos_valandų_valandas',\n d: 'diena_dienos_dieną',\n dd: 'dienos_dienų_dienas',\n M: 'mėnuo_mėnesio_mėnesį',\n MM: 'mėnesiai_mėnesių_mėnesius',\n y: 'metai_metų_metus',\n yy: 'metai_metų_metus'\n };\n\n function translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n }\n\n function translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix ? forms(key)[0] : isFuture ? forms(key)[1] : forms(key)[2];\n }\n\n function special(number) {\n return number % 10 === 0 || number > 10 && number < 20;\n }\n\n function forms(key) {\n return units[key].split('_');\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n if (number === 1) {\n return result + translateSingular(number, withoutSuffix, key[0], isFuture);\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n }\n\n var lt = moment.defineLocale('lt', {\n months: {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),\n standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/\n },\n monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays: {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),\n standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),\n isFormat: /dddd HH:mm/\n },\n weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY [m.] MMMM D [d.]',\n LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l: 'YYYY-MM-DD',\n ll: 'YYYY [m.] MMMM D [d.]',\n lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'\n },\n calendar: {\n sameDay: '[Šiandien] LT',\n nextDay: '[Rytoj] LT',\n nextWeek: 'dddd LT',\n lastDay: '[Vakar] LT',\n lastWeek: '[Praėjusį] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'po %s',\n past: 'prieš %s',\n s: translateSeconds,\n ss: translate,\n m: translateSingular,\n mm: translate,\n h: translateSingular,\n hh: translate,\n d: translateSingular,\n dd: translate,\n M: translateSingular,\n MM: translate,\n y: translateSingular,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal: function ordinal(number) {\n return number + '-oji';\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var units = {\n ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n h: 'stundas_stundām_stunda_stundas'.split('_'),\n hh: 'stundas_stundām_stunda_stundas'.split('_'),\n d: 'dienas_dienām_diena_dienas'.split('_'),\n dd: 'dienas_dienām_diena_dienas'.split('_'),\n M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n y: 'gada_gadiem_gads_gadi'.split('_'),\n yy: 'gada_gadiem_gads_gadi'.split('_')\n };\n /**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\n\n function format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n }\n\n function relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n }\n\n function relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n }\n\n var lv = moment.defineLocale('lv', {\n months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),\n monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),\n weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY.',\n LL: 'YYYY. [gada] D. MMMM',\n LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm'\n },\n calendar: {\n sameDay: '[Šodien pulksten] LT',\n nextDay: '[Rīt pulksten] LT',\n nextWeek: 'dddd [pulksten] LT',\n lastDay: '[Vakar pulksten] LT',\n lastWeek: '[Pagājušā] dddd [pulksten] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'pēc %s',\n past: 'pirms %s',\n s: relativeSeconds,\n ss: relativeTimeWithPlural,\n m: relativeTimeWithSingular,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithSingular,\n hh: relativeTimeWithPlural,\n d: relativeTimeWithSingular,\n dd: relativeTimeWithPlural,\n M: relativeTimeWithSingular,\n MM: relativeTimeWithPlural,\n y: relativeTimeWithSingular,\n yy: relativeTimeWithPlural\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač : https://github.com/miodragnikac\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekund', 'sekunda', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[prošle] [nedjelje] [u] LT', '[prošlog] [ponedjeljka] [u] LT', '[prošlog] [utorka] [u] LT', '[prošle] [srijede] [u] LT', '[prošlog] [četvrtka] [u] LT', '[prošlog] [petka] [u] LT', '[prošle] [subote] [u] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mjesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return me;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan : https://github.com/johnideal\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),\n monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm'\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n ss: '%d hēkona',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return mi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var mk = moment.defineLocale('mk', {\n months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),\n monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),\n weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Денес во] LT',\n nextDay: '[Утре во] LT',\n nextWeek: '[Во] dddd [во] LT',\n lastDay: '[Вчера во] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'за %s',\n past: 'пред %s',\n s: 'неколку секунди',\n ss: '%d секунди',\n m: 'една минута',\n mm: '%d минути',\n h: 'еден час',\n hh: '%d часа',\n d: 'еден ден',\n dd: '%d дена',\n M: 'еден месец',\n MM: '%d месеци',\n y: 'една година',\n yy: '%d години'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function ordinal(number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return mk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ml = moment.defineLocale('ml', {\n months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),\n monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),\n monthsParseExact: true,\n weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),\n weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm -നു',\n LTS: 'A h:mm:ss -നു',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm -നു',\n LLLL: 'dddd, D MMMM YYYY, A h:mm -നു'\n },\n calendar: {\n sameDay: '[ഇന്ന്] LT',\n nextDay: '[നാളെ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ഇന്നലെ] LT',\n lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s കഴിഞ്ഞ്',\n past: '%s മുൻപ്',\n s: 'അൽപ നിമിഷങ്ങൾ',\n ss: '%d സെക്കൻഡ്',\n m: 'ഒരു മിനിറ്റ്',\n mm: '%d മിനിറ്റ്',\n h: 'ഒരു മണിക്കൂർ',\n hh: '%d മണിക്കൂർ',\n d: 'ഒരു ദിവസം',\n dd: '%d ദിവസം',\n M: 'ഒരു മാസം',\n MM: '%d മാസം',\n y: 'ഒരു വർഷം',\n yy: '%d വർഷം'\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'രാത്രി' && hour >= 4 || meridiem === 'ഉച്ച കഴിഞ്ഞ്' || meridiem === 'വൈകുന്നേരം') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n }\n });\n return ml;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n\n default:\n return number;\n }\n }\n\n var mn = moment.defineLocale('mn', {\n months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'),\n monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'),\n monthsParseExact: true,\n weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY оны MMMMын D',\n LLL: 'YYYY оны MMMMын D HH:mm',\n LLLL: 'dddd, YYYY оны MMMMын D HH:mm'\n },\n meridiemParse: /ҮӨ|ҮХ/i,\n isPM: function isPM(input) {\n return input === 'ҮХ';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ҮӨ';\n } else {\n return 'ҮХ';\n }\n },\n calendar: {\n sameDay: '[Өнөөдөр] LT',\n nextDay: '[Маргааш] LT',\n nextWeek: '[Ирэх] dddd LT',\n lastDay: '[Өчигдөр] LT',\n lastWeek: '[Өнгөрсөн] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s дараа',\n past: '%s өмнө',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + ' өдөр';\n\n default:\n return number;\n }\n }\n });\n return mn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n };\n\n function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n var output = '';\n\n if (withoutSuffix) {\n switch (string) {\n case 's':\n output = 'काही सेकंद';\n break;\n\n case 'ss':\n output = '%d सेकंद';\n break;\n\n case 'm':\n output = 'एक मिनिट';\n break;\n\n case 'mm':\n output = '%d मिनिटे';\n break;\n\n case 'h':\n output = 'एक तास';\n break;\n\n case 'hh':\n output = '%d तास';\n break;\n\n case 'd':\n output = 'एक दिवस';\n break;\n\n case 'dd':\n output = '%d दिवस';\n break;\n\n case 'M':\n output = 'एक महिना';\n break;\n\n case 'MM':\n output = '%d महिने';\n break;\n\n case 'y':\n output = 'एक वर्ष';\n break;\n\n case 'yy':\n output = '%d वर्षे';\n break;\n }\n } else {\n switch (string) {\n case 's':\n output = 'काही सेकंदां';\n break;\n\n case 'ss':\n output = '%d सेकंदां';\n break;\n\n case 'm':\n output = 'एका मिनिटा';\n break;\n\n case 'mm':\n output = '%d मिनिटां';\n break;\n\n case 'h':\n output = 'एका तासा';\n break;\n\n case 'hh':\n output = '%d तासां';\n break;\n\n case 'd':\n output = 'एका दिवसा';\n break;\n\n case 'dd':\n output = '%d दिवसां';\n break;\n\n case 'M':\n output = 'एका महिन्या';\n break;\n\n case 'MM':\n output = '%d महिन्यां';\n break;\n\n case 'y':\n output = 'एका वर्षा';\n break;\n\n case 'yy':\n output = '%d वर्षां';\n break;\n }\n }\n\n return output.replace(/%d/i, number);\n }\n\n var mr = moment.defineLocale('mr', {\n months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),\n monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm वाजता',\n LTS: 'A h:mm:ss वाजता',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm वाजता',\n LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता'\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[उद्या] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n ss: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n return hour;\n } else if (meridiem === 'दुपारी' || meridiem === 'सायंकाळी' || meridiem === 'रात्री') {\n return hour >= 12 ? hour : hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour >= 0 && hour < 6) {\n return 'पहाटे';\n } else if (hour < 12) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return mr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ms = moment.defineLocale('ms', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ms;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var msMy = moment.defineLocale('ms-my', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return msMy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var mt = moment.defineLocale('mt', {\n months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'),\n monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'),\n weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Illum fil-]LT',\n nextDay: '[Għada fil-]LT',\n nextWeek: 'dddd [fil-]LT',\n lastDay: '[Il-bieraħ fil-]LT',\n lastWeek: 'dddd [li għadda] [fil-]LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'f’ %s',\n past: '%s ilu',\n s: 'ftit sekondi',\n ss: '%d sekondi',\n m: 'minuta',\n mm: '%d minuti',\n h: 'siegħa',\n hh: '%d siegħat',\n d: 'ġurnata',\n dd: '%d ġranet',\n M: 'xahar',\n MM: '%d xhur',\n y: 'sena',\n yy: '%d sni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return mt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '၁',\n 2: '၂',\n 3: '၃',\n 4: '၄',\n 5: '၅',\n 6: '၆',\n 7: '၇',\n 8: '၈',\n 9: '၉',\n 0: '၀'\n },\n numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0'\n };\n var my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n ss: '%d စက္ကန့်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်'\n },\n preparse: function preparse(string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return my;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n//! Stephen Ramthun : https://github.com/stephenramthun\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dager',\n w: 'en uke',\n ww: '%d uker',\n M: 'en måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n };\n var ne = moment.defineLocale('ne', {\n months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),\n monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),\n monthsParseExact: true,\n weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),\n weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'Aको h:mm बजे',\n LTS: 'Aको h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, Aको h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे'\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[भोलि] LT',\n nextWeek: '[आउँदो] dddd[,] LT',\n lastDay: '[हिजो] LT',\n lastWeek: '[गएको] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sमा',\n past: '%s अगाडि',\n s: 'केही क्षण',\n ss: '%d सेकेण्ड',\n m: 'एक मिनेट',\n mm: '%d मिनेट',\n h: 'एक घण्टा',\n hh: '%d घण्टा',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महिना',\n MM: '%d महिना',\n y: 'एक बर्ष',\n yy: '%d बर्ष'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return ne;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i],\n monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n var nl = moment.defineLocale('nl', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n w: 'één week',\n ww: '%d weken',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i],\n monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n var nlBe = moment.defineLocale('nl-be', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nlBe;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//! Stephen Ramthun : https://github.com/stephenramthun\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var nn = moment.defineLocale('nn', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s sidan',\n s: 'nokre sekund',\n ss: '%d sekund',\n m: 'eit minutt',\n mm: '%d minutt',\n h: 'ein time',\n hh: '%d timar',\n d: 'ein dag',\n dd: '%d dagar',\n w: 'ei veke',\n ww: '%d veker',\n M: 'ein månad',\n MM: '%d månader',\n y: 'eit år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ocLnc = moment.defineLocale('oc-lnc', {\n months: {\n standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split('_'),\n format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split('_'),\n isFormat: /D[oD]?(\\s)+MMMM/\n },\n monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split('_'),\n weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n llll: 'ddd D MMM YYYY, H:mm'\n },\n calendar: {\n sameDay: '[uèi a] LT',\n nextDay: '[deman a] LT',\n nextWeek: 'dddd [a] LT',\n lastDay: '[ièr a] LT',\n lastWeek: 'dddd [passat a] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'unas segondas',\n ss: '%d segondas',\n m: 'una minuta',\n mm: '%d minutas',\n h: 'una ora',\n hh: '%d oras',\n d: 'un jorn',\n dd: '%d jorns',\n M: 'un mes',\n MM: '%d meses',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function ordinal(number, period) {\n var output = number === 1 ? 'r' : number === 2 ? 'n' : number === 3 ? 'r' : number === 4 ? 't' : 'è';\n\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4\n }\n });\n return ocLnc;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '੧',\n 2: '੨',\n 3: '੩',\n 4: '੪',\n 5: '੫',\n 6: '੬',\n 7: '੭',\n 8: '੮',\n 9: '੯',\n 0: '੦'\n },\n numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0'\n };\n var paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),\n weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm ਵਜੇ',\n LTS: 'A h:mm:ss ਵਜੇ',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'\n },\n calendar: {\n sameDay: '[ਅਜ] LT',\n nextDay: '[ਕਲ] LT',\n nextWeek: '[ਅਗਲਾ] dddd, LT',\n lastDay: '[ਕਲ] LT',\n lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ਵਿੱਚ',\n past: '%s ਪਿਛਲੇ',\n s: 'ਕੁਝ ਸਕਿੰਟ',\n ss: '%d ਸਕਿੰਟ',\n m: 'ਇਕ ਮਿੰਟ',\n mm: '%d ਮਿੰਟ',\n h: 'ਇੱਕ ਘੰਟਾ',\n hh: '%d ਘੰਟੇ',\n d: 'ਇੱਕ ਦਿਨ',\n dd: '%d ਦਿਨ',\n M: 'ਇੱਕ ਮਹੀਨਾ',\n MM: '%d ਮਹੀਨੇ',\n y: 'ਇੱਕ ਸਾਲ',\n yy: '%d ਸਾਲ'\n },\n preparse: function preparse(string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return paIn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),\n monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'),\n monthsParse = [/^sty/i, /^lut/i, /^mar/i, /^kwi/i, /^maj/i, /^cze/i, /^lip/i, /^sie/i, /^wrz/i, /^paź/i, /^lis/i, /^gru/i];\n\n function plural(n) {\n return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n }\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n return result + (plural(number) ? 'sekundy' : 'sekund');\n\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n\n case 'ww':\n return result + (plural(number) ? 'tygodnie' : 'tygodni');\n\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n }\n\n var pl = moment.defineLocale('pl', {\n months: function months(momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[W niedzielę o] LT';\n\n case 2:\n return '[We wtorek o] LT';\n\n case 3:\n return '[W środę o] LT';\n\n case 6:\n return '[W sobotę o] LT';\n\n default:\n return '[W] dddd [o] LT';\n }\n },\n lastDay: '[Wczoraj o] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n\n case 3:\n return '[W zeszłą środę o] LT';\n\n case 6:\n return '[W zeszłą sobotę o] LT';\n\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: '%s temu',\n s: 'kilka sekund',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: '1 dzień',\n dd: '%d dni',\n w: 'tydzień',\n ww: translate,\n M: 'miesiąc',\n MM: translate,\n y: 'rok',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return pl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var pt = moment.defineLocale('pt', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function lastWeek() {\n return this.day() === 0 || this.day() === 6 ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n w: 'uma semana',\n ww: '%d semanas',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return pt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ptBr = moment.defineLocale('pt-br', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split('_'),\n weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function lastWeek() {\n return this.day() === 0 || this.day() === 6 ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'poucos segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n invalidDate: 'Data inválida'\n });\n return ptBr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: 'secunde',\n mm: 'minute',\n hh: 'ore',\n dd: 'zile',\n ww: 'săptămâni',\n MM: 'luni',\n yy: 'ani'\n },\n separator = ' ';\n\n if (number % 100 >= 20 || number >= 100 && number % 100 === 0) {\n separator = ' de ';\n }\n\n return number + separator + format[key];\n }\n\n var ro = moment.defineLocale('ro', {\n months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),\n monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'peste %s',\n past: '%s în urmă',\n s: 'câteva secunde',\n ss: relativeTimeWithPlural,\n m: 'un minut',\n mm: relativeTimeWithPlural,\n h: 'o oră',\n hh: relativeTimeWithPlural,\n d: 'o zi',\n dd: relativeTimeWithPlural,\n w: 'o săptămână',\n ww: relativeTimeWithPlural,\n M: 'o lună',\n MM: relativeTimeWithPlural,\n y: 'un an',\n yy: relativeTimeWithPlural\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ro;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n hh: 'час_часа_часов',\n dd: 'день_дня_дней',\n ww: 'неделя_недели_недель',\n MM: 'месяц_месяца_месяцев',\n yy: 'год_года_лет'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),\n standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),\n standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')\n },\n weekdays: {\n standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n // копия предыдущего\n monthsShortRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n // полные названия с падежами\n monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n // Выражение, которое соответствует только сокращённым формам\n monthsShortStrictRegex: /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm'\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function nextWeek(now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function lastWeek(now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n w: 'неделя',\n ww: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function isPM(input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n\n case 'D':\n return number + '-го';\n\n case 'w':\n case 'W':\n return number + '-я';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ru;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['جنوري', 'فيبروري', 'مارچ', 'اپريل', 'مئي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'],\n days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n var sd = moment.defineLocale('sd', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm'\n },\n meridiemParse: /صبح|شام/,\n isPM: function isPM(input) {\n return 'شام' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n\n return 'شام';\n },\n calendar: {\n sameDay: '[اڄ] LT',\n nextDay: '[سڀاڻي] LT',\n nextWeek: 'dddd [اڳين هفتي تي] LT',\n lastDay: '[ڪالهه] LT',\n lastWeek: '[گزريل هفتي] dddd [تي] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s پوء',\n past: '%s اڳ',\n s: 'چند سيڪنڊ',\n ss: '%d سيڪنڊ',\n m: 'هڪ منٽ',\n mm: '%d منٽ',\n h: 'هڪ ڪلاڪ',\n hh: '%d ڪلاڪ',\n d: 'هڪ ڏينهن',\n dd: '%d ڏينهن',\n M: 'هڪ مهينو',\n MM: '%d مهينا',\n y: 'هڪ سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sd;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var se = moment.defineLocale('se', {\n months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),\n monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),\n weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'MMMM D. [b.] YYYY',\n LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'\n },\n calendar: {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s geažes',\n past: 'maŋit %s',\n s: 'moadde sekunddat',\n ss: '%d sekunddat',\n m: 'okta minuhta',\n mm: '%d minuhtat',\n h: 'okta diimmu',\n hh: '%d diimmut',\n d: 'okta beaivi',\n dd: '%d beaivvit',\n M: 'okta mánnu',\n MM: '%d mánut',\n y: 'okta jahki',\n yy: '%d jagit'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return se;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n /*jshint -W100*/\n\n var si = moment.defineLocale('si', {\n months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),\n monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),\n weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),\n weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),\n weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'a h:mm',\n LTS: 'a h:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY MMMM D',\n LLL: 'YYYY MMMM D, a h:mm',\n LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'\n },\n calendar: {\n sameDay: '[අද] LT[ට]',\n nextDay: '[හෙට] LT[ට]',\n nextWeek: 'dddd LT[ට]',\n lastDay: '[ඊයේ] LT[ට]',\n lastWeek: '[පසුගිය] dddd LT[ට]',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sකින්',\n past: '%sකට පෙර',\n s: 'තත්පර කිහිපය',\n ss: 'තත්පර %d',\n m: 'මිනිත්තුව',\n mm: 'මිනිත්තු %d',\n h: 'පැය',\n hh: 'පැය %d',\n d: 'දිනය',\n dd: 'දින %d',\n M: 'මාසය',\n MM: 'මාස %d',\n y: 'වසර',\n yy: 'වසර %d'\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal: function ordinal(number) {\n return number + ' වැනි';\n },\n meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM: function isPM(input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n }\n });\n return si;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),\n monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n\n function plural(n) {\n return n > 1 && n < 5;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n\n case 'ss':\n // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekúnd');\n } else {\n return result + 'sekundami';\n }\n\n case 'm':\n // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n\n case 'mm':\n // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n\n case 'h':\n // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n\n case 'hh':\n // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n\n case 'd':\n // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'deň' : 'dňom';\n\n case 'dd':\n // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n\n case 'M':\n // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n\n case 'MM':\n // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n\n case 'y':\n // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokom';\n\n case 'yy':\n // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n\n }\n }\n\n var sk = moment.defineLocale('sk', {\n months: months,\n monthsShort: monthsShort,\n weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n\n case 3:\n return '[v stredu o] LT';\n\n case 4:\n return '[vo štvrtok o] LT';\n\n case 5:\n return '[v piatok o] LT';\n\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n\n case 3:\n return '[minulú stredu o] LT';\n\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'pred %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n\n return result;\n\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n\n return result;\n\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n\n return result;\n\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n\n return result;\n }\n }\n\n var sl = moment.defineLocale('sl', {\n months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD. MM. YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danes ob] LT',\n nextDay: '[jutri ob] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n\n case 3:\n return '[v] [sredo] [ob] LT';\n\n case 6:\n return '[v] [soboto] [ob] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay: '[včeraj ob] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'čez %s',\n past: 'pred %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var sq = moment.defineLocale('sq', {\n months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),\n monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),\n weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /PD|MD/,\n isPM: function isPM(input) {\n return input.charAt(0) === 'M';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Sot në] LT',\n nextDay: '[Nesër në] LT',\n nextWeek: 'dddd [në] LT',\n lastDay: '[Dje në] LT',\n lastWeek: 'dddd [e kaluar në] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'në %s',\n past: '%s më parë',\n s: 'disa sekonda',\n ss: '%d sekonda',\n m: 'një minutë',\n mm: '%d minuta',\n h: 'një orë',\n hh: '%d orë',\n d: 'një ditë',\n dd: '%d ditë',\n M: 'një muaj',\n MM: '%d muaj',\n y: 'një vit',\n yy: '%d vite'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sq;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković : https://github.com/milan-j\n//! author : Stefan Crnjaković : https://github.com/crnjakovic\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekunda', 'sekunde', 'sekundi'],\n m: ['jedan minut', 'jedne minute'],\n mm: ['minut', 'minute', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mesec', 'meseca', 'meseci'],\n yy: ['godina', 'godine', 'godina']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n\n case 3:\n return '[u] [sredu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[prošle] [nedelje] [u] LT', '[prošlog] [ponedeljka] [u] LT', '[prošlog] [utorka] [u] LT', '[prošle] [srede] [u] LT', '[prošlog] [četvrtka] [u] LT', '[prošlog] [petka] [u] LT', '[prošle] [subote] [u] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'pre %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković : https://github.com/milan-j\n//! author : Stefan Crnjaković : https://github.com/crnjakovic\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['секунда', 'секунде', 'секунди'],\n m: ['један минут', 'једне минуте'],\n mm: ['минут', 'минуте', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n dd: ['дан', 'дана', 'дана'],\n MM: ['месец', 'месеца', 'месеци'],\n yy: ['година', 'године', 'година']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),\n monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm'\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n\n case 3:\n return '[у] [среду] [у] LT';\n\n case 6:\n return '[у] [суботу] [у] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay: '[јуче у] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[прошле] [недеље] [у] LT', '[прошлог] [понедељка] [у] LT', '[прошлог] [уторка] [у] LT', '[прошле] [среде] [у] LT', '[прошлог] [четвртка] [у] LT', '[прошлог] [петка] [у] LT', '[прошле] [суботе] [у] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'за %s',\n past: 'пре %s',\n s: 'неколико секунди',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'дан',\n dd: translator.translate,\n M: 'месец',\n MM: translator.translate,\n y: 'годину',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 1st is the first week of the year.\n\n }\n });\n return srCyrl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies : https://github.com/nicolaidavies\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ss = moment.defineLocale('ss', {\n months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split('_'),\n monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),\n weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Namuhla nga] LT',\n nextDay: '[Kusasa nga] LT',\n nextWeek: 'dddd [nga] LT',\n lastDay: '[Itolo nga] LT',\n lastWeek: 'dddd [leliphelile] [nga] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'nga %s',\n past: 'wenteka nga %s',\n s: 'emizuzwana lomcane',\n ss: '%d mzuzwana',\n m: 'umzuzu',\n mm: '%d emizuzu',\n h: 'lihora',\n hh: '%d emahora',\n d: 'lilanga',\n dd: '%d emalanga',\n M: 'inyanga',\n MM: '%d tinyanga',\n y: 'umnyaka',\n yy: '%d iminyaka'\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: '%d',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ss;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var sv = moment.defineLocale('sv', {\n months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: 'för %s sedan',\n s: 'några sekunder',\n ss: '%d sekunder',\n m: 'en minut',\n mm: '%d minuter',\n h: 'en timme',\n hh: '%d timmar',\n d: 'en dag',\n dd: '%d dagar',\n M: 'en månad',\n MM: '%d månader',\n y: 'ett år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? ':e' : b === 1 ? ':a' : b === 2 ? ':a' : b === 3 ? ':e' : ':e';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'hh:mm A',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'siku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sw;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '௧',\n 2: '௨',\n 3: '௩',\n 4: '௪',\n 5: '௫',\n 6: '௬',\n 7: '௭',\n 8: '௮',\n 9: '௯',\n 0: '௦'\n },\n numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0'\n };\n var ta = moment.defineLocale('ta', {\n months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),\n weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),\n weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, HH:mm',\n LLLL: 'dddd, D MMMM YYYY, HH:mm'\n },\n calendar: {\n sameDay: '[இன்று] LT',\n nextDay: '[நாளை] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[நேற்று] LT',\n lastWeek: '[கடந்த வாரம்] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s இல்',\n past: '%s முன்',\n s: 'ஒரு சில விநாடிகள்',\n ss: '%d விநாடிகள்',\n m: 'ஒரு நிமிடம்',\n mm: '%d நிமிடங்கள்',\n h: 'ஒரு மணி நேரம்',\n hh: '%d மணி நேரம்',\n d: 'ஒரு நாள்',\n dd: '%d நாட்கள்',\n M: 'ஒரு மாதம்',\n MM: '%d மாதங்கள்',\n y: 'ஒரு வருடம்',\n yy: '%d ஆண்டுகள்'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal: function ordinal(number) {\n return number + 'வது';\n },\n preparse: function preparse(string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return ta;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var te = moment.defineLocale('te', {\n months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),\n monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),\n monthsParseExact: true,\n weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),\n weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[నేడు] LT',\n nextDay: '[రేపు] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[నిన్న] LT',\n lastWeek: '[గత] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s లో',\n past: '%s క్రితం',\n s: 'కొన్ని క్షణాలు',\n ss: '%d సెకన్లు',\n m: 'ఒక నిమిషం',\n mm: '%d నిమిషాలు',\n h: 'ఒక గంట',\n hh: '%d గంటలు',\n d: 'ఒక రోజు',\n dd: '%d రోజులు',\n M: 'ఒక నెల',\n MM: '%d నెలలు',\n y: 'ఒక సంవత్సరం',\n yy: '%d సంవత్సరాలు'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n ordinal: '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return te;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var tet = moment.defineLocale('tet', {\n months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'iha %s',\n past: '%s liuba',\n s: 'segundu balun',\n ss: 'segundu %d',\n m: 'minutu ida',\n mm: 'minutu %d',\n h: 'oras ida',\n hh: 'oras %d',\n d: 'loron ida',\n dd: 'loron %d',\n M: 'fulan ida',\n MM: 'fulan %d',\n y: 'tinan ida',\n yy: 'tinan %d'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tet;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ум',\n 1: '-ум',\n 2: '-юм',\n 3: '-юм',\n 4: '-ум',\n 5: '-ум',\n 6: '-ум',\n 7: '-ум',\n 8: '-ум',\n 9: '-ум',\n 10: '-ум',\n 12: '-ум',\n 13: '-ум',\n 20: '-ум',\n 30: '-юм',\n 40: '-ум',\n 50: '-ум',\n 60: '-ум',\n 70: '-ум',\n 80: '-ум',\n 90: '-ум',\n 100: '-ум'\n };\n var tg = moment.defineLocale('tg', {\n months: {\n format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split('_'),\n standalone: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_')\n },\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'),\n weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Имрӯз соати] LT',\n nextDay: '[Фардо соати] LT',\n lastDay: '[Дирӯз соати] LT',\n nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'баъди %s',\n past: '%s пеш',\n s: 'якчанд сония',\n m: 'як дақиқа',\n mm: '%d дақиқа',\n h: 'як соат',\n hh: '%d соат',\n d: 'як рӯз',\n dd: '%d рӯз',\n M: 'як моҳ',\n MM: '%d моҳ',\n y: 'як сол',\n yy: '%d сол'\n },\n meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'шаб') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'субҳ') {\n return hour;\n } else if (meridiem === 'рӯз') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'бегоҳ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'шаб';\n } else if (hour < 11) {\n return 'субҳ';\n } else if (hour < 16) {\n return 'рӯз';\n } else if (hour < 19) {\n return 'бегоҳ';\n } else {\n return 'шаб';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 1th is the first week of the year.\n\n }\n });\n return tg;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var th = moment.defineLocale('th', {\n months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),\n monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),\n monthsParseExact: true,\n weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'),\n // yes, three characters difference\n weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY เวลา H:mm',\n LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function isPM(input) {\n return input === 'หลังเที่ยง';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar: {\n sameDay: '[วันนี้ เวลา] LT',\n nextDay: '[พรุ่งนี้ เวลา] LT',\n nextWeek: 'dddd[หน้า เวลา] LT',\n lastDay: '[เมื่อวานนี้ เวลา] LT',\n lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'อีก %s',\n past: '%sที่แล้ว',\n s: 'ไม่กี่วินาที',\n ss: '%d วินาที',\n m: '1 นาที',\n mm: '%d นาที',\n h: '1 ชั่วโมง',\n hh: '%d ชั่วโมง',\n d: '1 วัน',\n dd: '%d วัน',\n w: '1 สัปดาห์',\n ww: '%d สัปดาห์',\n M: '1 เดือน',\n MM: '%d เดือน',\n y: '1 ปี',\n yy: '%d ปี'\n }\n });\n return th;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inji\",\n 5: \"'inji\",\n 8: \"'inji\",\n 70: \"'inji\",\n 80: \"'inji\",\n 2: \"'nji\",\n 7: \"'nji\",\n 20: \"'nji\",\n 50: \"'nji\",\n 3: \"'ünji\",\n 4: \"'ünji\",\n 100: \"'ünji\",\n 6: \"'njy\",\n 9: \"'unjy\",\n 10: \"'unjy\",\n 30: \"'unjy\",\n 60: \"'ynjy\",\n 90: \"'ynjy\"\n };\n var tk = moment.defineLocale('tk', {\n months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split('_'),\n monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split('_'),\n weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[bugün sagat] LT',\n nextDay: '[ertir sagat] LT',\n nextWeek: '[indiki] dddd [sagat] LT',\n lastDay: '[düýn] LT',\n lastWeek: '[geçen] dddd [sagat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s soň',\n past: '%s öň',\n s: 'birnäçe sekunt',\n m: 'bir minut',\n mm: '%d minut',\n h: 'bir sagat',\n hh: '%d sagat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir aý',\n MM: '%d aý',\n y: 'bir ýyl',\n yy: '%d ýyl'\n },\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'unjy\";\n }\n\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return tk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var tlPh = moment.defineLocale('tl-ph', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm'\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function ordinal(number) {\n return number;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tlPh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n function translateFuture(output) {\n var time = output;\n time = output.indexOf('jaj') !== -1 ? time.slice(0, -3) + 'leS' : output.indexOf('jar') !== -1 ? time.slice(0, -3) + 'waQ' : output.indexOf('DIS') !== -1 ? time.slice(0, -3) + 'nem' : time + ' pIq';\n return time;\n }\n\n function translatePast(output) {\n var time = output;\n time = output.indexOf('jaj') !== -1 ? time.slice(0, -3) + 'Hu’' : output.indexOf('jar') !== -1 ? time.slice(0, -3) + 'wen' : output.indexOf('DIS') !== -1 ? time.slice(0, -3) + 'ben' : time + ' ret';\n return time;\n }\n\n function translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n\n switch (string) {\n case 'ss':\n return numberNoun + ' lup';\n\n case 'mm':\n return numberNoun + ' tup';\n\n case 'hh':\n return numberNoun + ' rep';\n\n case 'dd':\n return numberNoun + ' jaj';\n\n case 'MM':\n return numberNoun + ' jar';\n\n case 'yy':\n return numberNoun + ' DIS';\n }\n }\n\n function numberAsNoun(number) {\n var hundred = Math.floor(number % 1000 / 100),\n ten = Math.floor(number % 100 / 10),\n one = number % 10,\n word = '';\n\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n\n if (ten > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n\n if (one > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[one];\n }\n\n return word === '' ? 'pagh' : word;\n }\n\n var tlh = moment.defineLocale('tlh', {\n months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),\n monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),\n monthsParseExact: true,\n weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L'\n },\n relativeTime: {\n future: translateFuture,\n past: translatePast,\n s: 'puS lup',\n ss: translate,\n m: 'wa’ tup',\n mm: translate,\n h: 'wa’ rep',\n hh: translate,\n d: 'wa’ jaj',\n dd: translate,\n M: 'wa’ jar',\n MM: translate,\n y: 'wa’ DIS',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tlh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//! Burak Yiğit Kaya: https://github.com/BYK\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inci\",\n 5: \"'inci\",\n 8: \"'inci\",\n 70: \"'inci\",\n 80: \"'inci\",\n 2: \"'nci\",\n 7: \"'nci\",\n 20: \"'nci\",\n 50: \"'nci\",\n 3: \"'üncü\",\n 4: \"'üncü\",\n 100: \"'üncü\",\n 6: \"'ncı\",\n 9: \"'uncu\",\n 10: \"'uncu\",\n 30: \"'uncu\",\n 60: \"'ıncı\",\n 90: \"'ıncı\"\n };\n var tr = moment.defineLocale('tr', {\n months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),\n monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),\n weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),\n weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'öö' : 'ÖÖ';\n } else {\n return isLower ? 'ös' : 'ÖS';\n }\n },\n meridiemParse: /öö|ÖÖ|ös|ÖS/,\n isPM: function isPM(input) {\n return input === 'ös' || input === 'ÖS';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s önce',\n s: 'birkaç saniye',\n ss: '%d saniye',\n m: 'bir dakika',\n mm: '%d dakika',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n w: 'bir hafta',\n ww: '%d hafta',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir yıl',\n yy: '%d yıl'\n },\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'ıncı\";\n }\n\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return tr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n // This is currently too difficult (maybe even impossible) to add.\n\n var tzl = moment.defineLocale('tzl', {\n months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),\n monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM [dallas] YYYY',\n LLL: 'D. MMMM [dallas] YYYY HH.mm',\n LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM: function isPM(input) {\n return \"d'o\" === input.toLowerCase();\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? \"d'o\" : \"D'O\";\n } else {\n return isLower ? \"d'a\" : \"D'A\";\n }\n },\n calendar: {\n sameDay: '[oxhi à] LT',\n nextDay: '[demà à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[ieiri à] LT',\n lastWeek: '[sür el] dddd [lasteu à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'osprei %s',\n past: 'ja%s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['viensas secunds', \"'iensas secunds\"],\n ss: [number + ' secunds', '' + number + ' secunds'],\n m: [\"'n míut\", \"'iens míut\"],\n mm: [number + ' míuts', '' + number + ' míuts'],\n h: [\"'n þora\", \"'iensa þora\"],\n hh: [number + ' þoras', '' + number + ' þoras'],\n d: [\"'n ziua\", \"'iensa ziua\"],\n dd: [number + ' ziuas', '' + number + ' ziuas'],\n M: [\"'n mes\", \"'iens mes\"],\n MM: [number + ' mesen', '' + number + ' mesen'],\n y: [\"'n ar\", \"'iens ar\"],\n yy: [number + ' ars', '' + number + ' ars']\n };\n return isFuture ? format[key][0] : withoutSuffix ? format[key][0] : format[key][1];\n }\n\n return tzl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var tzm = moment.defineLocale('tzm', {\n months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past: 'ⵢⴰⵏ %s',\n s: 'ⵉⵎⵉⴽ',\n ss: '%d ⵉⵎⵉⴽ',\n m: 'ⵎⵉⵏⵓⴺ',\n mm: '%d ⵎⵉⵏⵓⴺ',\n h: 'ⵙⴰⵄⴰ',\n hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d: 'ⴰⵙⵙ',\n dd: '%d oⵙⵙⴰⵏ',\n M: 'ⴰⵢoⵓⵔ',\n MM: '%d ⵉⵢⵢⵉⵔⵏ',\n y: 'ⴰⵙⴳⴰⵙ',\n yy: '%d ⵉⵙⴳⴰⵙⵏ'\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return tzm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var tzmLatn = moment.defineLocale('tzm-latn', {\n months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dadkh s yan %s',\n past: 'yan %s',\n s: 'imik',\n ss: '%d imik',\n m: 'minuḍ',\n mm: '%d minuḍ',\n h: 'saɛa',\n hh: '%d tassaɛin',\n d: 'ass',\n dd: '%d ossan',\n M: 'ayowr',\n MM: '%d iyyirn',\n y: 'asgas',\n yy: '%d isgasn'\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return tzmLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ugCn = moment.defineLocale('ug-cn', {\n months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split('_'),\n monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split('_'),\n weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split('_'),\n weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm'\n },\n meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'يېرىم كېچە' || meridiem === 'سەھەر' || meridiem === 'چۈشتىن بۇرۇن') {\n return hour;\n } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n return hour + 12;\n } else {\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return 'يېرىم كېچە';\n } else if (hm < 900) {\n return 'سەھەر';\n } else if (hm < 1130) {\n return 'چۈشتىن بۇرۇن';\n } else if (hm < 1230) {\n return 'چۈش';\n } else if (hm < 1800) {\n return 'چۈشتىن كېيىن';\n } else {\n return 'كەچ';\n }\n },\n calendar: {\n sameDay: '[بۈگۈن سائەت] LT',\n nextDay: '[ئەتە سائەت] LT',\n nextWeek: '[كېلەركى] dddd [سائەت] LT',\n lastDay: '[تۆنۈگۈن] LT',\n lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s كېيىن',\n past: '%s بۇرۇن',\n s: 'نەچچە سېكونت',\n ss: '%d سېكونت',\n m: 'بىر مىنۇت',\n mm: '%d مىنۇت',\n h: 'بىر سائەت',\n hh: '%d سائەت',\n d: 'بىر كۈن',\n dd: '%d كۈن',\n M: 'بىر ئاي',\n MM: '%d ئاي',\n y: 'بىر يىل',\n yy: '%d يىل'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '-كۈنى';\n\n case 'w':\n case 'W':\n return number + '-ھەپتە';\n\n default:\n return number;\n }\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 1st is the first week of the year.\n\n }\n });\n return ugCn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n dd: 'день_дні_днів',\n MM: 'місяць_місяці_місяців',\n yy: 'рік_роки_років'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n } else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n function weekdaysCaseReplace(m, format) {\n var weekdays = {\n nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),\n accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),\n genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')\n },\n nounCase;\n\n if (m === true) {\n return weekdays['nominative'].slice(1, 7).concat(weekdays['nominative'].slice(0, 1));\n }\n\n if (!m) {\n return weekdays['nominative'];\n }\n\n nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format) ? 'accusative' : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format) ? 'genitive' : 'nominative';\n return weekdays[nounCase][m.day()];\n }\n\n function processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n }\n\n var uk = moment.defineLocale('uk', {\n months: {\n format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),\n standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')\n },\n monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),\n weekdays: weekdaysCaseReplace,\n weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY р.',\n LLL: 'D MMMM YYYY р., HH:mm',\n LLLL: 'dddd, D MMMM YYYY р., HH:mm'\n },\n calendar: {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'за %s',\n past: '%s тому',\n s: 'декілька секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'годину',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'місяць',\n MM: relativeTimeWithPlural,\n y: 'рік',\n yy: relativeTimeWithPlural\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function isPM(input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n\n case 'D':\n return number + '-го';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return uk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'],\n days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n var ur = moment.defineLocale('ur', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm'\n },\n meridiemParse: /صبح|شام/,\n isPM: function isPM(input) {\n return 'شام' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n\n return 'شام';\n },\n calendar: {\n sameDay: '[آج بوقت] LT',\n nextDay: '[کل بوقت] LT',\n nextWeek: 'dddd [بوقت] LT',\n lastDay: '[گذشتہ روز بوقت] LT',\n lastWeek: '[گذشتہ] dddd [بوقت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s بعد',\n past: '%s قبل',\n s: 'چند سیکنڈ',\n ss: '%d سیکنڈ',\n m: 'ایک منٹ',\n mm: '%d منٹ',\n h: 'ایک گھنٹہ',\n hh: '%d گھنٹے',\n d: 'ایک دن',\n dd: '%d دن',\n M: 'ایک ماہ',\n MM: '%d ماہ',\n y: 'ایک سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ur;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var uz = moment.defineLocale('uz', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm'\n },\n calendar: {\n sameDay: '[Бугун соат] LT [да]',\n nextDay: '[Эртага] LT [да]',\n nextWeek: 'dddd [куни соат] LT [да]',\n lastDay: '[Кеча соат] LT [да]',\n lastWeek: '[Утган] dddd [куни соат] LT [да]',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'Якин %s ичида',\n past: 'Бир неча %s олдин',\n s: 'фурсат',\n ss: '%d фурсат',\n m: 'бир дакика',\n mm: '%d дакика',\n h: 'бир соат',\n hh: '%d соат',\n d: 'бир кун',\n dd: '%d кун',\n M: 'бир ой',\n MM: '%d ой',\n y: 'бир йил',\n yy: '%d йил'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return uz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var uzLatn = moment.defineLocale('uz-latn', {\n months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),\n monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),\n weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm'\n },\n calendar: {\n sameDay: '[Bugun soat] LT [da]',\n nextDay: '[Ertaga] LT [da]',\n nextWeek: 'dddd [kuni soat] LT [da]',\n lastDay: '[Kecha soat] LT [da]',\n lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n sameElse: 'L'\n },\n relativeTime: {\n future: 'Yaqin %s ichida',\n past: 'Bir necha %s oldin',\n s: 'soniya',\n ss: '%d soniya',\n m: 'bir daqiqa',\n mm: '%d daqiqa',\n h: 'bir soat',\n hh: '%d soat',\n d: 'bir kun',\n dd: '%d kun',\n M: 'bir oy',\n MM: '%d oy',\n y: 'bir yil',\n yy: '%d yil'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return uzLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var vi = moment.defineLocale('vi', {\n months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),\n monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split('_'),\n monthsParseExact: true,\n weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),\n weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /sa|ch/i,\n isPM: function isPM(input) {\n return /^ch$/i.test(input);\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [năm] YYYY',\n LLL: 'D MMMM [năm] YYYY HH:mm',\n LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n l: 'DD/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần trước lúc] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s tới',\n past: '%s trước',\n s: 'vài giây',\n ss: '%d giây',\n m: 'một phút',\n mm: '%d phút',\n h: 'một giờ',\n hh: '%d giờ',\n d: 'một ngày',\n dd: '%d ngày',\n w: 'một tuần',\n ww: '%d tuần',\n M: 'một tháng',\n MM: '%d tháng',\n y: 'một năm',\n yy: '%d năm'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function ordinal(number) {\n return number;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return vi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var xPseudo = moment.defineLocale('x-pseudo', {\n months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),\n monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),\n monthsParseExact: true,\n weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),\n weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[T~ódá~ý át] LT',\n nextDay: '[T~ómó~rró~w át] LT',\n nextWeek: 'dddd [át] LT',\n lastDay: '[Ý~ést~érdá~ý át] LT',\n lastWeek: '[L~ást] dddd [át] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'í~ñ %s',\n past: '%s á~gó',\n s: 'á ~féw ~sécó~ñds',\n ss: '%d s~écóñ~ds',\n m: 'á ~míñ~úté',\n mm: '%d m~íñú~tés',\n h: 'á~ñ hó~úr',\n hh: '%d h~óúrs',\n d: 'á ~dáý',\n dd: '%d d~áýs',\n M: 'á ~móñ~th',\n MM: '%d m~óñt~hs',\n y: 'á ~ýéár',\n yy: '%d ý~éárs'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return xPseudo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var yo = moment.defineLocale('yo', {\n months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),\n monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Ònì ni] LT',\n nextDay: '[Ọ̀la ni] LT',\n nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n lastDay: '[Àna ni] LT',\n lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ní %s',\n past: '%s kọjá',\n s: 'ìsẹjú aayá die',\n ss: 'aayá %d',\n m: 'ìsẹjú kan',\n mm: 'ìsẹjú %d',\n h: 'wákati kan',\n hh: 'wákati %d',\n d: 'ọjọ́ kan',\n dd: 'ọjọ́ %d',\n M: 'osù kan',\n MM: 'osù %d',\n y: 'ọdún kan',\n yy: 'ọdún %d'\n },\n dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n ordinal: 'ọjọ́ %d',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return yo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: function nextWeek(now) {\n if (now.week() !== this.week()) {\n return '[下]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n lastDay: '[昨天]LT',\n lastWeek: function lastWeek(now) {\n if (this.week() !== now.week()) {\n return '[上]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '周';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s后',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n w: '1 周',\n ww: '%d 周',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年'\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return zhCn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var zhHk = moment.defineLocale('zh-hk', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1200) {\n return '上午';\n } else if (hm === 1200) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '週';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年'\n }\n });\n return zhHk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var zhMo = moment.defineLocale('zh-mo', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'D/M/YYYY',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '週';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年'\n }\n });\n return zhMo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require(\"../moment\")) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var zhTw = moment.defineLocale('zh-tw', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '週';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年'\n }\n });\n return zhTw;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function (window, factory) {\n if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object') {\n module.exports = factory();\n } else if (typeof define === 'function' && define.amd) {\n define(factory);\n } else {\n window.jStat = factory();\n }\n})(this, function () {\n var jStat = function (Math, undefined) {\n // For quick reference.\n var concat = Array.prototype.concat;\n var slice = Array.prototype.slice;\n var toString = Object.prototype.toString; // Calculate correction for IEEE error\n // TODO: This calculation can be improved.\n\n function calcRdx(n, m) {\n var val = n > m ? n : m;\n return Math.pow(10, 17 - ~~(Math.log(val > 0 ? val : -val) * Math.LOG10E));\n }\n\n var isArray = Array.isArray || function isArray(arg) {\n return toString.call(arg) === '[object Array]';\n };\n\n function isFunction(arg) {\n return toString.call(arg) === '[object Function]';\n }\n\n function isNumber(num) {\n return typeof num === 'number' ? num - num === 0 : false;\n } // Converts the jStat matrix to vector.\n\n\n function toVector(arr) {\n return concat.apply([], arr);\n } // The one and only jStat constructor.\n\n\n function jStat() {\n return new jStat._init(arguments);\n } // TODO: Remove after all references in src files have been removed.\n\n\n jStat.fn = jStat.prototype; // By separating the initializer from the constructor it's easier to handle\n // always returning a new instance whether \"new\" was used or not.\n\n jStat._init = function _init(args) {\n // If first argument is an array, must be vector or matrix.\n if (isArray(args[0])) {\n // Check if matrix.\n if (isArray(args[0][0])) {\n // See if a mapping function was also passed.\n if (isFunction(args[1])) args[0] = jStat.map(args[0], args[1]); // Iterate over each is faster than this.push.apply(this, args[0].\n\n for (var i = 0; i < args[0].length; i++) {\n this[i] = args[0][i];\n }\n\n this.length = args[0].length; // Otherwise must be a vector.\n } else {\n this[0] = isFunction(args[1]) ? jStat.map(args[0], args[1]) : args[0];\n this.length = 1;\n } // If first argument is number, assume creation of sequence.\n\n } else if (isNumber(args[0])) {\n this[0] = jStat.seq.apply(null, args);\n this.length = 1; // Handle case when jStat object is passed to jStat.\n } else if (args[0] instanceof jStat) {\n // Duplicate the object and pass it back.\n return jStat(args[0].toArray()); // Unexpected argument value, return empty jStat object.\n // TODO: This is strange behavior. Shouldn't this throw or some such to let\n // the user know they had bad arguments?\n } else {\n this[0] = [];\n this.length = 1;\n }\n\n return this;\n };\n\n jStat._init.prototype = jStat.prototype;\n jStat._init.constructor = jStat; // Utility functions.\n // TODO: for internal use only?\n\n jStat.utils = {\n calcRdx: calcRdx,\n isArray: isArray,\n isFunction: isFunction,\n isNumber: isNumber,\n toVector: toVector\n };\n jStat._random_fn = Math.random;\n\n jStat.setRandom = function setRandom(fn) {\n if (typeof fn !== 'function') throw new TypeError('fn is not a function');\n jStat._random_fn = fn;\n }; // Easily extend the jStat object.\n // TODO: is this seriously necessary?\n\n\n jStat.extend = function extend(obj) {\n var i, j;\n\n if (arguments.length === 1) {\n for (j in obj) {\n jStat[j] = obj[j];\n }\n\n return this;\n }\n\n for (i = 1; i < arguments.length; i++) {\n for (j in arguments[i]) {\n obj[j] = arguments[i][j];\n }\n }\n\n return obj;\n }; // Returns the number of rows in the matrix.\n\n\n jStat.rows = function rows(arr) {\n return arr.length || 1;\n }; // Returns the number of columns in the matrix.\n\n\n jStat.cols = function cols(arr) {\n return arr[0].length || 1;\n }; // Returns the dimensions of the object { rows: i, cols: j }\n\n\n jStat.dimensions = function dimensions(arr) {\n return {\n rows: jStat.rows(arr),\n cols: jStat.cols(arr)\n };\n }; // Returns a specified row as a vector or return a sub matrix by pick some rows\n\n\n jStat.row = function row(arr, index) {\n if (isArray(index)) {\n return index.map(function (i) {\n return jStat.row(arr, i);\n });\n }\n\n return arr[index];\n }; // return row as array\n // rowa([[1,2],[3,4]],0) -> [1,2]\n\n\n jStat.rowa = function rowa(arr, i) {\n return jStat.row(arr, i);\n }; // Returns the specified column as a vector or return a sub matrix by pick some\n // columns\n\n\n jStat.col = function col(arr, index) {\n if (isArray(index)) {\n var submat = jStat.arange(arr.length).map(function () {\n return new Array(index.length);\n });\n index.forEach(function (ind, i) {\n jStat.arange(arr.length).forEach(function (j) {\n submat[j][i] = arr[j][ind];\n });\n });\n return submat;\n }\n\n var column = new Array(arr.length);\n\n for (var i = 0; i < arr.length; i++) {\n column[i] = [arr[i][index]];\n }\n\n return column;\n }; // return column as array\n // cola([[1,2],[3,4]],0) -> [1,3]\n\n\n jStat.cola = function cola(arr, i) {\n return jStat.col(arr, i).map(function (a) {\n return a[0];\n });\n }; // Returns the diagonal of the matrix\n\n\n jStat.diag = function diag(arr) {\n var nrow = jStat.rows(arr);\n var res = new Array(nrow);\n\n for (var row = 0; row < nrow; row++) {\n res[row] = [arr[row][row]];\n }\n\n return res;\n }; // Returns the anti-diagonal of the matrix\n\n\n jStat.antidiag = function antidiag(arr) {\n var nrow = jStat.rows(arr) - 1;\n var res = new Array(nrow);\n\n for (var i = 0; nrow >= 0; nrow--, i++) {\n res[i] = [arr[i][nrow]];\n }\n\n return res;\n }; // Transpose a matrix or array.\n\n\n jStat.transpose = function transpose(arr) {\n var obj = [];\n var objArr, rows, cols, j, i; // Make sure arr is in matrix format.\n\n if (!isArray(arr[0])) arr = [arr];\n rows = arr.length;\n cols = arr[0].length;\n\n for (i = 0; i < cols; i++) {\n objArr = new Array(rows);\n\n for (j = 0; j < rows; j++) {\n objArr[j] = arr[j][i];\n }\n\n obj.push(objArr);\n } // If obj is vector, return only single array.\n\n\n return obj.length === 1 ? obj[0] : obj;\n }; // Map a function to an array or array of arrays.\n // \"toAlter\" is an internal variable.\n\n\n jStat.map = function map(arr, func, toAlter) {\n var row, nrow, ncol, res, col;\n if (!isArray(arr[0])) arr = [arr];\n nrow = arr.length;\n ncol = arr[0].length;\n res = toAlter ? arr : new Array(nrow);\n\n for (row = 0; row < nrow; row++) {\n // if the row doesn't exist, create it\n if (!res[row]) res[row] = new Array(ncol);\n\n for (col = 0; col < ncol; col++) {\n res[row][col] = func(arr[row][col], row, col);\n }\n }\n\n return res.length === 1 ? res[0] : res;\n }; // Cumulatively combine the elements of an array or array of arrays using a function.\n\n\n jStat.cumreduce = function cumreduce(arr, func, toAlter) {\n var row, nrow, ncol, res, col;\n if (!isArray(arr[0])) arr = [arr];\n nrow = arr.length;\n ncol = arr[0].length;\n res = toAlter ? arr : new Array(nrow);\n\n for (row = 0; row < nrow; row++) {\n // if the row doesn't exist, create it\n if (!res[row]) res[row] = new Array(ncol);\n if (ncol > 0) res[row][0] = arr[row][0];\n\n for (col = 1; col < ncol; col++) {\n res[row][col] = func(res[row][col - 1], arr[row][col]);\n }\n }\n\n return res.length === 1 ? res[0] : res;\n }; // Destructively alter an array.\n\n\n jStat.alter = function alter(arr, func) {\n return jStat.map(arr, func, true);\n }; // Generate a rows x cols matrix according to the supplied function.\n\n\n jStat.create = function create(rows, cols, func) {\n var res = new Array(rows);\n var i, j;\n\n if (isFunction(cols)) {\n func = cols;\n cols = rows;\n }\n\n for (i = 0; i < rows; i++) {\n res[i] = new Array(cols);\n\n for (j = 0; j < cols; j++) {\n res[i][j] = func(i, j);\n }\n }\n\n return res;\n };\n\n function retZero() {\n return 0;\n } // Generate a rows x cols matrix of zeros.\n\n\n jStat.zeros = function zeros(rows, cols) {\n if (!isNumber(cols)) cols = rows;\n return jStat.create(rows, cols, retZero);\n };\n\n function retOne() {\n return 1;\n } // Generate a rows x cols matrix of ones.\n\n\n jStat.ones = function ones(rows, cols) {\n if (!isNumber(cols)) cols = rows;\n return jStat.create(rows, cols, retOne);\n }; // Generate a rows x cols matrix of uniformly random numbers.\n\n\n jStat.rand = function rand(rows, cols) {\n if (!isNumber(cols)) cols = rows;\n return jStat.create(rows, cols, jStat._random_fn);\n };\n\n function retIdent(i, j) {\n return i === j ? 1 : 0;\n } // Generate an identity matrix of size row x cols.\n\n\n jStat.identity = function identity(rows, cols) {\n if (!isNumber(cols)) cols = rows;\n return jStat.create(rows, cols, retIdent);\n }; // Tests whether a matrix is symmetric\n\n\n jStat.symmetric = function symmetric(arr) {\n var size = arr.length;\n var row, col;\n if (arr.length !== arr[0].length) return false;\n\n for (row = 0; row < size; row++) {\n for (col = 0; col < size; col++) {\n if (arr[col][row] !== arr[row][col]) return false;\n }\n }\n\n return true;\n }; // Set all values to zero.\n\n\n jStat.clear = function clear(arr) {\n return jStat.alter(arr, retZero);\n }; // Generate sequence.\n\n\n jStat.seq = function seq(min, max, length, func) {\n if (!isFunction(func)) func = false;\n var arr = [];\n var hival = calcRdx(min, max);\n var step = (max * hival - min * hival) / ((length - 1) * hival);\n var current = min;\n var cnt; // Current is assigned using a technique to compensate for IEEE error.\n // TODO: Needs better implementation.\n\n for (cnt = 0; current <= max && cnt < length; cnt++, current = (min * hival + step * hival * cnt) / hival) {\n arr.push(func ? func(current, cnt) : current);\n }\n\n return arr;\n }; // arange(5) -> [0,1,2,3,4]\n // arange(1,5) -> [1,2,3,4]\n // arange(5,1,-1) -> [5,4,3,2]\n\n\n jStat.arange = function arange(start, end, step) {\n var rl = [];\n var i;\n step = step || 1;\n\n if (end === undefined) {\n end = start;\n start = 0;\n }\n\n if (start === end || step === 0) {\n return [];\n }\n\n if (start < end && step < 0) {\n return [];\n }\n\n if (start > end && step > 0) {\n return [];\n }\n\n if (step > 0) {\n for (i = start; i < end; i += step) {\n rl.push(i);\n }\n } else {\n for (i = start; i > end; i += step) {\n rl.push(i);\n }\n }\n\n return rl;\n }; // A=[[1,2,3],[4,5,6],[7,8,9]]\n // slice(A,{row:{end:2},col:{start:1}}) -> [[2,3],[5,6]]\n // slice(A,1,{start:1}) -> [5,6]\n // as numpy code A[:2,1:]\n\n\n jStat.slice = function () {\n function _slice(list, start, end, step) {\n // note it's not equal to range.map mode it's a bug\n var i;\n var rl = [];\n var length = list.length;\n\n if (start === undefined && end === undefined && step === undefined) {\n return jStat.copy(list);\n }\n\n start = start || 0;\n end = end || list.length;\n start = start >= 0 ? start : length + start;\n end = end >= 0 ? end : length + end;\n step = step || 1;\n\n if (start === end || step === 0) {\n return [];\n }\n\n if (start < end && step < 0) {\n return [];\n }\n\n if (start > end && step > 0) {\n return [];\n }\n\n if (step > 0) {\n for (i = start; i < end; i += step) {\n rl.push(list[i]);\n }\n } else {\n for (i = start; i > end; i += step) {\n rl.push(list[i]);\n }\n }\n\n return rl;\n }\n\n function slice(list, rcSlice) {\n var colSlice, rowSlice;\n rcSlice = rcSlice || {};\n\n if (isNumber(rcSlice.row)) {\n if (isNumber(rcSlice.col)) return list[rcSlice.row][rcSlice.col];\n var row = jStat.rowa(list, rcSlice.row);\n colSlice = rcSlice.col || {};\n return _slice(row, colSlice.start, colSlice.end, colSlice.step);\n }\n\n if (isNumber(rcSlice.col)) {\n var col = jStat.cola(list, rcSlice.col);\n rowSlice = rcSlice.row || {};\n return _slice(col, rowSlice.start, rowSlice.end, rowSlice.step);\n }\n\n rowSlice = rcSlice.row || {};\n colSlice = rcSlice.col || {};\n\n var rows = _slice(list, rowSlice.start, rowSlice.end, rowSlice.step);\n\n return rows.map(function (row) {\n return _slice(row, colSlice.start, colSlice.end, colSlice.step);\n });\n }\n\n return slice;\n }(); // A=[[1,2,3],[4,5,6],[7,8,9]]\n // sliceAssign(A,{row:{start:1},col:{start:1}},[[0,0],[0,0]])\n // A=[[1,2,3],[4,0,0],[7,0,0]]\n\n\n jStat.sliceAssign = function sliceAssign(A, rcSlice, B) {\n var nl, ml;\n\n if (isNumber(rcSlice.row)) {\n if (isNumber(rcSlice.col)) return A[rcSlice.row][rcSlice.col] = B;\n rcSlice.col = rcSlice.col || {};\n rcSlice.col.start = rcSlice.col.start || 0;\n rcSlice.col.end = rcSlice.col.end || A[0].length;\n rcSlice.col.step = rcSlice.col.step || 1;\n nl = jStat.arange(rcSlice.col.start, Math.min(A.length, rcSlice.col.end), rcSlice.col.step);\n var m = rcSlice.row;\n nl.forEach(function (n, i) {\n A[m][n] = B[i];\n });\n return A;\n }\n\n if (isNumber(rcSlice.col)) {\n rcSlice.row = rcSlice.row || {};\n rcSlice.row.start = rcSlice.row.start || 0;\n rcSlice.row.end = rcSlice.row.end || A.length;\n rcSlice.row.step = rcSlice.row.step || 1;\n ml = jStat.arange(rcSlice.row.start, Math.min(A[0].length, rcSlice.row.end), rcSlice.row.step);\n var n = rcSlice.col;\n ml.forEach(function (m, j) {\n A[m][n] = B[j];\n });\n return A;\n }\n\n if (B[0].length === undefined) {\n B = [B];\n }\n\n rcSlice.row.start = rcSlice.row.start || 0;\n rcSlice.row.end = rcSlice.row.end || A.length;\n rcSlice.row.step = rcSlice.row.step || 1;\n rcSlice.col.start = rcSlice.col.start || 0;\n rcSlice.col.end = rcSlice.col.end || A[0].length;\n rcSlice.col.step = rcSlice.col.step || 1;\n ml = jStat.arange(rcSlice.row.start, Math.min(A.length, rcSlice.row.end), rcSlice.row.step);\n nl = jStat.arange(rcSlice.col.start, Math.min(A[0].length, rcSlice.col.end), rcSlice.col.step);\n ml.forEach(function (m, i) {\n nl.forEach(function (n, j) {\n A[m][n] = B[i][j];\n });\n });\n return A;\n }; // [1,2,3] ->\n // [[1,0,0],[0,2,0],[0,0,3]]\n\n\n jStat.diagonal = function diagonal(diagArray) {\n var mat = jStat.zeros(diagArray.length, diagArray.length);\n diagArray.forEach(function (t, i) {\n mat[i][i] = t;\n });\n return mat;\n }; // return copy of A\n\n\n jStat.copy = function copy(A) {\n return A.map(function (row) {\n if (isNumber(row)) return row;\n return row.map(function (t) {\n return t;\n });\n });\n }; // TODO: Go over this entire implementation. Seems a tragic waste of resources\n // doing all this work. Instead, and while ugly, use new Function() to generate\n // a custom function for each static method.\n // Quick reference.\n\n\n var jProto = jStat.prototype; // Default length.\n\n jProto.length = 0; // For internal use only.\n // TODO: Check if they're actually used, and if they are then rename them\n // to _*\n\n jProto.push = Array.prototype.push;\n jProto.sort = Array.prototype.sort;\n jProto.splice = Array.prototype.splice;\n jProto.slice = Array.prototype.slice; // Return a clean array.\n\n jProto.toArray = function toArray() {\n return this.length > 1 ? slice.call(this) : slice.call(this)[0];\n }; // Map a function to a matrix or vector.\n\n\n jProto.map = function map(func, toAlter) {\n return jStat(jStat.map(this, func, toAlter));\n }; // Cumulatively combine the elements of a matrix or vector using a function.\n\n\n jProto.cumreduce = function cumreduce(func, toAlter) {\n return jStat(jStat.cumreduce(this, func, toAlter));\n }; // Destructively alter an array.\n\n\n jProto.alter = function alter(func) {\n jStat.alter(this, func);\n return this;\n }; // Extend prototype with methods that have no argument.\n\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n jProto[passfunc] = function (func) {\n var self = this,\n results; // Check for callback.\n\n if (func) {\n setTimeout(function () {\n func.call(self, jProto[passfunc].call(self));\n });\n return this;\n }\n\n results = jStat[passfunc](this);\n return isArray(results) ? jStat(results) : results;\n };\n })(funcs[i]);\n }\n })('transpose clear symmetric rows cols dimensions diag antidiag'.split(' ')); // Extend prototype with methods that have one argument.\n\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n jProto[passfunc] = function (index, func) {\n var self = this; // check for callback\n\n if (func) {\n setTimeout(function () {\n func.call(self, jProto[passfunc].call(self, index));\n });\n return this;\n }\n\n return jStat(jStat[passfunc](this, index));\n };\n })(funcs[i]);\n }\n })('row col'.split(' ')); // Extend prototype with simple shortcut methods.\n\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n jProto[passfunc] = function () {\n return jStat(jStat[passfunc].apply(null, arguments));\n };\n })(funcs[i]);\n }\n })('create zeros ones rand identity'.split(' ')); // Exposing jStat.\n\n\n return jStat;\n }(Math);\n\n (function (jStat, Math) {\n var isFunction = jStat.utils.isFunction; // Ascending functions for sort\n\n function ascNum(a, b) {\n return a - b;\n }\n\n function clip(arg, min, max) {\n return Math.max(min, Math.min(arg, max));\n } // sum of an array\n\n\n jStat.sum = function sum(arr) {\n var sum = 0;\n var i = arr.length;\n\n while (--i >= 0) {\n sum += arr[i];\n }\n\n return sum;\n }; // sum squared\n\n\n jStat.sumsqrd = function sumsqrd(arr) {\n var sum = 0;\n var i = arr.length;\n\n while (--i >= 0) {\n sum += arr[i] * arr[i];\n }\n\n return sum;\n }; // sum of squared errors of prediction (SSE)\n\n\n jStat.sumsqerr = function sumsqerr(arr) {\n var mean = jStat.mean(arr);\n var sum = 0;\n var i = arr.length;\n var tmp;\n\n while (--i >= 0) {\n tmp = arr[i] - mean;\n sum += tmp * tmp;\n }\n\n return sum;\n }; // sum of an array in each row\n\n\n jStat.sumrow = function sumrow(arr) {\n var sum = 0;\n var i = arr.length;\n\n while (--i >= 0) {\n sum += arr[i];\n }\n\n return sum;\n }; // product of an array\n\n\n jStat.product = function product(arr) {\n var prod = 1;\n var i = arr.length;\n\n while (--i >= 0) {\n prod *= arr[i];\n }\n\n return prod;\n }; // minimum value of an array\n\n\n jStat.min = function min(arr) {\n var low = arr[0];\n var i = 0;\n\n while (++i < arr.length) {\n if (arr[i] < low) low = arr[i];\n }\n\n return low;\n }; // maximum value of an array\n\n\n jStat.max = function max(arr) {\n var high = arr[0];\n var i = 0;\n\n while (++i < arr.length) {\n if (arr[i] > high) high = arr[i];\n }\n\n return high;\n }; // unique values of an array\n\n\n jStat.unique = function unique(arr) {\n var hash = {},\n _arr = [];\n\n for (var i = 0; i < arr.length; i++) {\n if (!hash[arr[i]]) {\n hash[arr[i]] = true;\n\n _arr.push(arr[i]);\n }\n }\n\n return _arr;\n }; // mean value of an array\n\n\n jStat.mean = function mean(arr) {\n return jStat.sum(arr) / arr.length;\n }; // mean squared error (MSE)\n\n\n jStat.meansqerr = function meansqerr(arr) {\n return jStat.sumsqerr(arr) / arr.length;\n }; // geometric mean of an array\n\n\n jStat.geomean = function geomean(arr) {\n return Math.pow(jStat.product(arr), 1 / arr.length);\n }; // median of an array\n\n\n jStat.median = function median(arr) {\n var arrlen = arr.length;\n\n var _arr = arr.slice().sort(ascNum); // check if array is even or odd, then return the appropriate\n\n\n return !(arrlen & 1) ? (_arr[arrlen / 2 - 1] + _arr[arrlen / 2]) / 2 : _arr[arrlen / 2 | 0];\n }; // cumulative sum of an array\n\n\n jStat.cumsum = function cumsum(arr) {\n return jStat.cumreduce(arr, function (a, b) {\n return a + b;\n });\n }; // cumulative product of an array\n\n\n jStat.cumprod = function cumprod(arr) {\n return jStat.cumreduce(arr, function (a, b) {\n return a * b;\n });\n }; // successive differences of a sequence\n\n\n jStat.diff = function diff(arr) {\n var diffs = [];\n var arrLen = arr.length;\n var i;\n\n for (i = 1; i < arrLen; i++) {\n diffs.push(arr[i] - arr[i - 1]);\n }\n\n return diffs;\n }; // ranks of an array\n\n\n jStat.rank = function (arr) {\n var i;\n var distinctNumbers = [];\n var numberCounts = {};\n\n for (i = 0; i < arr.length; i++) {\n var number = arr[i];\n\n if (numberCounts[number]) {\n numberCounts[number]++;\n } else {\n numberCounts[number] = 1;\n distinctNumbers.push(number);\n }\n }\n\n var sortedDistinctNumbers = distinctNumbers.sort(ascNum);\n var numberRanks = {};\n var currentRank = 1;\n\n for (i = 0; i < sortedDistinctNumbers.length; i++) {\n var number = sortedDistinctNumbers[i];\n var count = numberCounts[number];\n var first = currentRank;\n var last = currentRank + count - 1;\n var rank = (first + last) / 2;\n numberRanks[number] = rank;\n currentRank += count;\n }\n\n return arr.map(function (number) {\n return numberRanks[number];\n });\n }; // mode of an array\n // if there are multiple modes of an array, return all of them\n // is this the appropriate way of handling it?\n\n\n jStat.mode = function mode(arr) {\n var arrLen = arr.length;\n\n var _arr = arr.slice().sort(ascNum);\n\n var count = 1;\n var maxCount = 0;\n var numMaxCount = 0;\n var mode_arr = [];\n var i;\n\n for (i = 0; i < arrLen; i++) {\n if (_arr[i] === _arr[i + 1]) {\n count++;\n } else {\n if (count > maxCount) {\n mode_arr = [_arr[i]];\n maxCount = count;\n numMaxCount = 0;\n } // are there multiple max counts\n else if (count === maxCount) {\n mode_arr.push(_arr[i]);\n numMaxCount++;\n } // resetting count for new value in array\n\n\n count = 1;\n }\n }\n\n return numMaxCount === 0 ? mode_arr[0] : mode_arr;\n }; // range of an array\n\n\n jStat.range = function range(arr) {\n return jStat.max(arr) - jStat.min(arr);\n }; // variance of an array\n // flag = true indicates sample instead of population\n\n\n jStat.variance = function variance(arr, flag) {\n return jStat.sumsqerr(arr) / (arr.length - (flag ? 1 : 0));\n }; // pooled variance of an array of arrays\n\n\n jStat.pooledvariance = function pooledvariance(arr) {\n var sumsqerr = arr.reduce(function (a, samples) {\n return a + jStat.sumsqerr(samples);\n }, 0);\n var count = arr.reduce(function (a, samples) {\n return a + samples.length;\n }, 0);\n return sumsqerr / (count - arr.length);\n }; // deviation of an array\n\n\n jStat.deviation = function (arr) {\n var mean = jStat.mean(arr);\n var arrlen = arr.length;\n var dev = new Array(arrlen);\n\n for (var i = 0; i < arrlen; i++) {\n dev[i] = arr[i] - mean;\n }\n\n return dev;\n }; // standard deviation of an array\n // flag = true indicates sample instead of population\n\n\n jStat.stdev = function stdev(arr, flag) {\n return Math.sqrt(jStat.variance(arr, flag));\n }; // pooled standard deviation of an array of arrays\n\n\n jStat.pooledstdev = function pooledstdev(arr) {\n return Math.sqrt(jStat.pooledvariance(arr));\n }; // mean deviation (mean absolute deviation) of an array\n\n\n jStat.meandev = function meandev(arr) {\n var mean = jStat.mean(arr);\n var a = [];\n\n for (var i = arr.length - 1; i >= 0; i--) {\n a.push(Math.abs(arr[i] - mean));\n }\n\n return jStat.mean(a);\n }; // median deviation (median absolute deviation) of an array\n\n\n jStat.meddev = function meddev(arr) {\n var median = jStat.median(arr);\n var a = [];\n\n for (var i = arr.length - 1; i >= 0; i--) {\n a.push(Math.abs(arr[i] - median));\n }\n\n return jStat.median(a);\n }; // coefficient of variation\n\n\n jStat.coeffvar = function coeffvar(arr) {\n return jStat.stdev(arr) / jStat.mean(arr);\n }; // quartiles of an array\n\n\n jStat.quartiles = function quartiles(arr) {\n var arrlen = arr.length;\n\n var _arr = arr.slice().sort(ascNum);\n\n return [_arr[Math.round(arrlen / 4) - 1], _arr[Math.round(arrlen / 2) - 1], _arr[Math.round(arrlen * 3 / 4) - 1]];\n }; // Arbitary quantiles of an array. Direct port of the scipy.stats\n // implementation by Pierre GF Gerard-Marchant.\n\n\n jStat.quantiles = function quantiles(arr, quantilesArray, alphap, betap) {\n var sortedArray = arr.slice().sort(ascNum);\n var quantileVals = [quantilesArray.length];\n var n = arr.length;\n var i, p, m, aleph, k, gamma;\n if (typeof alphap === 'undefined') alphap = 3 / 8;\n if (typeof betap === 'undefined') betap = 3 / 8;\n\n for (i = 0; i < quantilesArray.length; i++) {\n p = quantilesArray[i];\n m = alphap + p * (1 - alphap - betap);\n aleph = n * p + m;\n k = Math.floor(clip(aleph, 1, n - 1));\n gamma = clip(aleph - k, 0, 1);\n quantileVals[i] = (1 - gamma) * sortedArray[k - 1] + gamma * sortedArray[k];\n }\n\n return quantileVals;\n }; // Return the k-th percentile of values in a range, where k is in the range 0..1, inclusive.\n // Passing true for the exclusive parameter excludes both endpoints of the range.\n\n\n jStat.percentile = function percentile(arr, k, exclusive) {\n var _arr = arr.slice().sort(ascNum);\n\n var realIndex = k * (_arr.length + (exclusive ? 1 : -1)) + (exclusive ? 0 : 1);\n var index = parseInt(realIndex);\n var frac = realIndex - index;\n\n if (index + 1 < _arr.length) {\n return _arr[index - 1] + frac * (_arr[index] - _arr[index - 1]);\n } else {\n return _arr[index - 1];\n }\n }; // The percentile rank of score in a given array. Returns the percentage\n // of all values in the input array that are less than (kind='strict') or\n // less or equal than (kind='weak') score. Default is weak.\n\n\n jStat.percentileOfScore = function percentileOfScore(arr, score, kind) {\n var counter = 0;\n var len = arr.length;\n var strict = false;\n var value, i;\n if (kind === 'strict') strict = true;\n\n for (i = 0; i < len; i++) {\n value = arr[i];\n\n if (strict && value < score || !strict && value <= score) {\n counter++;\n }\n }\n\n return counter / len;\n }; // Histogram (bin count) data\n\n\n jStat.histogram = function histogram(arr, binCnt) {\n binCnt = binCnt || 4;\n var first = jStat.min(arr);\n var binWidth = (jStat.max(arr) - first) / binCnt;\n var len = arr.length;\n var bins = [];\n var i;\n\n for (i = 0; i < binCnt; i++) {\n bins[i] = 0;\n }\n\n for (i = 0; i < len; i++) {\n bins[Math.min(Math.floor((arr[i] - first) / binWidth), binCnt - 1)] += 1;\n }\n\n return bins;\n }; // covariance of two arrays\n\n\n jStat.covariance = function covariance(arr1, arr2) {\n var u = jStat.mean(arr1);\n var v = jStat.mean(arr2);\n var arr1Len = arr1.length;\n var sq_dev = new Array(arr1Len);\n var i;\n\n for (i = 0; i < arr1Len; i++) {\n sq_dev[i] = (arr1[i] - u) * (arr2[i] - v);\n }\n\n return jStat.sum(sq_dev) / (arr1Len - 1);\n }; // (pearson's) population correlation coefficient, rho\n\n\n jStat.corrcoeff = function corrcoeff(arr1, arr2) {\n return jStat.covariance(arr1, arr2) / jStat.stdev(arr1, 1) / jStat.stdev(arr2, 1);\n }; // (spearman's) rank correlation coefficient, sp\n\n\n jStat.spearmancoeff = function (arr1, arr2) {\n arr1 = jStat.rank(arr1);\n arr2 = jStat.rank(arr2); //return pearson's correlation of the ranks:\n\n return jStat.corrcoeff(arr1, arr2);\n }; // statistical standardized moments (general form of skew/kurt)\n\n\n jStat.stanMoment = function stanMoment(arr, n) {\n var mu = jStat.mean(arr);\n var sigma = jStat.stdev(arr);\n var len = arr.length;\n var skewSum = 0;\n\n for (var i = 0; i < len; i++) {\n skewSum += Math.pow((arr[i] - mu) / sigma, n);\n }\n\n return skewSum / arr.length;\n }; // (pearson's) moment coefficient of skewness\n\n\n jStat.skewness = function skewness(arr) {\n return jStat.stanMoment(arr, 3);\n }; // (pearson's) (excess) kurtosis\n\n\n jStat.kurtosis = function kurtosis(arr) {\n return jStat.stanMoment(arr, 4) - 3;\n };\n\n var jProto = jStat.prototype; // Extend jProto with method for calculating cumulative sums and products.\n // This differs from the similar extension below as cumsum and cumprod should\n // not be run again in the case fullbool === true.\n // If a matrix is passed, automatically assume operation should be done on the\n // columns.\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n // If a matrix is passed, automatically assume operation should be done on\n // the columns.\n jProto[passfunc] = function (fullbool, func) {\n var arr = [];\n var i = 0;\n var tmpthis = this; // Assignment reassignation depending on how parameters were passed in.\n\n if (isFunction(fullbool)) {\n func = fullbool;\n fullbool = false;\n } // Check if a callback was passed with the function.\n\n\n if (func) {\n setTimeout(function () {\n func.call(tmpthis, jProto[passfunc].call(tmpthis, fullbool));\n });\n return this;\n } // Check if matrix and run calculations.\n\n\n if (this.length > 1) {\n tmpthis = fullbool === true ? this : this.transpose();\n\n for (; i < tmpthis.length; i++) {\n arr[i] = jStat[passfunc](tmpthis[i]);\n }\n\n return arr;\n } // Pass fullbool if only vector, not a matrix. for variance and stdev.\n\n\n return jStat[passfunc](this[0], fullbool);\n };\n })(funcs[i]);\n }\n })('cumsum cumprod'.split(' ')); // Extend jProto with methods which don't require arguments and work on columns.\n\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n // If a matrix is passed, automatically assume operation should be done on\n // the columns.\n jProto[passfunc] = function (fullbool, func) {\n var arr = [];\n var i = 0;\n var tmpthis = this; // Assignment reassignation depending on how parameters were passed in.\n\n if (isFunction(fullbool)) {\n func = fullbool;\n fullbool = false;\n } // Check if a callback was passed with the function.\n\n\n if (func) {\n setTimeout(function () {\n func.call(tmpthis, jProto[passfunc].call(tmpthis, fullbool));\n });\n return this;\n } // Check if matrix and run calculations.\n\n\n if (this.length > 1) {\n if (passfunc !== 'sumrow') tmpthis = fullbool === true ? this : this.transpose();\n\n for (; i < tmpthis.length; i++) {\n arr[i] = jStat[passfunc](tmpthis[i]);\n }\n\n return fullbool === true ? jStat[passfunc](jStat.utils.toVector(arr)) : arr;\n } // Pass fullbool if only vector, not a matrix. for variance and stdev.\n\n\n return jStat[passfunc](this[0], fullbool);\n };\n })(funcs[i]);\n }\n })(('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(' ')); // Extend jProto with functions that take arguments. Operations on matrices are\n // done on columns.\n\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n jProto[passfunc] = function () {\n var arr = [];\n var i = 0;\n var tmpthis = this;\n var args = Array.prototype.slice.call(arguments);\n var callbackFunction; // If the last argument is a function, we assume it's a callback; we\n // strip the callback out and call the function again.\n\n if (isFunction(args[args.length - 1])) {\n callbackFunction = args[args.length - 1];\n var argsToPass = args.slice(0, args.length - 1);\n setTimeout(function () {\n callbackFunction.call(tmpthis, jProto[passfunc].apply(tmpthis, argsToPass));\n });\n return this; // Otherwise we curry the function args and call normally.\n } else {\n callbackFunction = undefined;\n\n var curriedFunction = function curriedFunction(vector) {\n return jStat[passfunc].apply(tmpthis, [vector].concat(args));\n };\n } // If this is a matrix, run column-by-column.\n\n\n if (this.length > 1) {\n tmpthis = tmpthis.transpose();\n\n for (; i < tmpthis.length; i++) {\n arr[i] = curriedFunction(tmpthis[i]);\n }\n\n return arr;\n } // Otherwise run on the vector.\n\n\n return curriedFunction(this[0]);\n };\n })(funcs[i]);\n }\n })('quantiles percentileOfScore'.split(' '));\n })(jStat, Math); // Special functions //\n\n\n (function (jStat, Math) {\n // Log-gamma function\n jStat.gammaln = function gammaln(x) {\n var j = 0;\n var cof = [76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5];\n var ser = 1.000000000190015;\n var xx, y, tmp;\n tmp = (y = xx = x) + 5.5;\n tmp -= (xx + 0.5) * Math.log(tmp);\n\n for (; j < 6; j++) {\n ser += cof[j] / ++y;\n }\n\n return Math.log(2.5066282746310005 * ser / xx) - tmp;\n };\n /*\n * log-gamma function to support poisson distribution sampling. The\n * algorithm comes from SPECFUN by Shanjie Zhang and Jianming Jin and their\n * book \"Computation of Special Functions\", 1996, John Wiley & Sons, Inc.\n */\n\n\n jStat.loggam = function loggam(x) {\n var x0, x2, xp, gl, gl0;\n var k, n;\n var a = [8.333333333333333e-02, -2.777777777777778e-03, 7.936507936507937e-04, -5.952380952380952e-04, 8.417508417508418e-04, -1.917526917526918e-03, 6.410256410256410e-03, -2.955065359477124e-02, 1.796443723688307e-01, -1.39243221690590e+00];\n x0 = x;\n n = 0;\n\n if (x == 1.0 || x == 2.0) {\n return 0.0;\n }\n\n if (x <= 7.0) {\n n = Math.floor(7 - x);\n x0 = x + n;\n }\n\n x2 = 1.0 / (x0 * x0);\n xp = 2 * Math.PI;\n gl0 = a[9];\n\n for (k = 8; k >= 0; k--) {\n gl0 *= x2;\n gl0 += a[k];\n }\n\n gl = gl0 / x0 + 0.5 * Math.log(xp) + (x0 - 0.5) * Math.log(x0) - x0;\n\n if (x <= 7.0) {\n for (k = 1; k <= n; k++) {\n gl -= Math.log(x0 - 1.0);\n x0 -= 1.0;\n }\n }\n\n return gl;\n }; // gamma of x\n\n\n jStat.gammafn = function gammafn(x) {\n var p = [-1.716185138865495, 24.76565080557592, -379.80425647094563, 629.3311553128184, 866.9662027904133, -31451.272968848367, -36144.413418691176, 66456.14382024054];\n var q = [-30.8402300119739, 315.35062697960416, -1015.1563674902192, -3107.771671572311, 22538.118420980151, 4755.8462775278811, -134659.9598649693, -115132.2596755535];\n var fact = false;\n var n = 0;\n var xden = 0;\n var xnum = 0;\n var y = x;\n var i, z, yi, res;\n\n if (x > 171.6243769536076) {\n return Infinity;\n }\n\n if (y <= 0) {\n res = y % 1 + 3.6e-16;\n\n if (res) {\n fact = (!(y & 1) ? 1 : -1) * Math.PI / Math.sin(Math.PI * res);\n y = 1 - y;\n } else {\n return Infinity;\n }\n }\n\n yi = y;\n\n if (y < 1) {\n z = y++;\n } else {\n z = (y -= n = (y | 0) - 1) - 1;\n }\n\n for (i = 0; i < 8; ++i) {\n xnum = (xnum + p[i]) * z;\n xden = xden * z + q[i];\n }\n\n res = xnum / xden + 1;\n\n if (yi < y) {\n res /= yi;\n } else if (yi > y) {\n for (i = 0; i < n; ++i) {\n res *= y;\n y++;\n }\n }\n\n if (fact) {\n res = fact / res;\n }\n\n return res;\n }; // lower incomplete gamma function, which is usually typeset with a\n // lower-case greek gamma as the function symbol\n\n\n jStat.gammap = function gammap(a, x) {\n return jStat.lowRegGamma(a, x) * jStat.gammafn(a);\n }; // The lower regularized incomplete gamma function, usually written P(a,x)\n\n\n jStat.lowRegGamma = function lowRegGamma(a, x) {\n var aln = jStat.gammaln(a);\n var ap = a;\n var sum = 1 / a;\n var del = sum;\n var b = x + 1 - a;\n var c = 1 / 1.0e-30;\n var d = 1 / b;\n var h = d;\n var i = 1; // calculate maximum number of itterations required for a\n\n var ITMAX = -~(Math.log(a >= 1 ? a : 1 / a) * 8.5 + a * 0.4 + 17);\n var an;\n\n if (x < 0 || a <= 0) {\n return NaN;\n } else if (x < a + 1) {\n for (; i <= ITMAX; i++) {\n sum += del *= x / ++ap;\n }\n\n return sum * Math.exp(-x + a * Math.log(x) - aln);\n }\n\n for (; i <= ITMAX; i++) {\n an = -i * (i - a);\n b += 2;\n d = an * d + b;\n c = b + an / c;\n d = 1 / d;\n h *= d * c;\n }\n\n return 1 - h * Math.exp(-x + a * Math.log(x) - aln);\n }; // natural log factorial of n\n\n\n jStat.factorialln = function factorialln(n) {\n return n < 0 ? NaN : jStat.gammaln(n + 1);\n }; // factorial of n\n\n\n jStat.factorial = function factorial(n) {\n return n < 0 ? NaN : jStat.gammafn(n + 1);\n }; // combinations of n, m\n\n\n jStat.combination = function combination(n, m) {\n // make sure n or m don't exceed the upper limit of usable values\n return n > 170 || m > 170 ? Math.exp(jStat.combinationln(n, m)) : jStat.factorial(n) / jStat.factorial(m) / jStat.factorial(n - m);\n };\n\n jStat.combinationln = function combinationln(n, m) {\n return jStat.factorialln(n) - jStat.factorialln(m) - jStat.factorialln(n - m);\n }; // permutations of n, m\n\n\n jStat.permutation = function permutation(n, m) {\n return jStat.factorial(n) / jStat.factorial(n - m);\n }; // beta function\n\n\n jStat.betafn = function betafn(x, y) {\n // ensure arguments are positive\n if (x <= 0 || y <= 0) return undefined; // make sure x + y doesn't exceed the upper limit of usable values\n\n return x + y > 170 ? Math.exp(jStat.betaln(x, y)) : jStat.gammafn(x) * jStat.gammafn(y) / jStat.gammafn(x + y);\n }; // natural logarithm of beta function\n\n\n jStat.betaln = function betaln(x, y) {\n return jStat.gammaln(x) + jStat.gammaln(y) - jStat.gammaln(x + y);\n }; // Evaluates the continued fraction for incomplete beta function by modified\n // Lentz's method.\n\n\n jStat.betacf = function betacf(x, a, b) {\n var fpmin = 1e-30;\n var m = 1;\n var qab = a + b;\n var qap = a + 1;\n var qam = a - 1;\n var c = 1;\n var d = 1 - qab * x / qap;\n var m2, aa, del, h; // These q's will be used in factors that occur in the coefficients\n\n if (Math.abs(d) < fpmin) d = fpmin;\n d = 1 / d;\n h = d;\n\n for (; m <= 100; m++) {\n m2 = 2 * m;\n aa = m * (b - m) * x / ((qam + m2) * (a + m2)); // One step (the even one) of the recurrence\n\n d = 1 + aa * d;\n if (Math.abs(d) < fpmin) d = fpmin;\n c = 1 + aa / c;\n if (Math.abs(c) < fpmin) c = fpmin;\n d = 1 / d;\n h *= d * c;\n aa = -(a + m) * (qab + m) * x / ((a + m2) * (qap + m2)); // Next step of the recurrence (the odd one)\n\n d = 1 + aa * d;\n if (Math.abs(d) < fpmin) d = fpmin;\n c = 1 + aa / c;\n if (Math.abs(c) < fpmin) c = fpmin;\n d = 1 / d;\n del = d * c;\n h *= del;\n if (Math.abs(del - 1.0) < 3e-7) break;\n }\n\n return h;\n }; // Returns the inverse of the lower regularized inomplete gamma function\n\n\n jStat.gammapinv = function gammapinv(p, a) {\n var j = 0;\n var a1 = a - 1;\n var EPS = 1e-8;\n var gln = jStat.gammaln(a);\n var x, err, t, u, pp, lna1, afac;\n if (p >= 1) return Math.max(100, a + 100 * Math.sqrt(a));\n if (p <= 0) return 0;\n\n if (a > 1) {\n lna1 = Math.log(a1);\n afac = Math.exp(a1 * (lna1 - 1) - gln);\n pp = p < 0.5 ? p : 1 - p;\n t = Math.sqrt(-2 * Math.log(pp));\n x = (2.30753 + t * 0.27061) / (1 + t * (0.99229 + t * 0.04481)) - t;\n if (p < 0.5) x = -x;\n x = Math.max(1e-3, a * Math.pow(1 - 1 / (9 * a) - x / (3 * Math.sqrt(a)), 3));\n } else {\n t = 1 - a * (0.253 + a * 0.12);\n if (p < t) x = Math.pow(p / t, 1 / a);else x = 1 - Math.log(1 - (p - t) / (1 - t));\n }\n\n for (; j < 12; j++) {\n if (x <= 0) return 0;\n err = jStat.lowRegGamma(a, x) - p;\n if (a > 1) t = afac * Math.exp(-(x - a1) + a1 * (Math.log(x) - lna1));else t = Math.exp(-x + a1 * Math.log(x) - gln);\n u = err / t;\n x -= t = u / (1 - 0.5 * Math.min(1, u * ((a - 1) / x - 1)));\n if (x <= 0) x = 0.5 * (x + t);\n if (Math.abs(t) < EPS * x) break;\n }\n\n return x;\n }; // Returns the error function erf(x)\n\n\n jStat.erf = function erf(x) {\n var cof = [-1.3026537197817094, 6.4196979235649026e-1, 1.9476473204185836e-2, -9.561514786808631e-3, -9.46595344482036e-4, 3.66839497852761e-4, 4.2523324806907e-5, -2.0278578112534e-5, -1.624290004647e-6, 1.303655835580e-6, 1.5626441722e-8, -8.5238095915e-8, 6.529054439e-9, 5.059343495e-9, -9.91364156e-10, -2.27365122e-10, 9.6467911e-11, 2.394038e-12, -6.886027e-12, 8.94487e-13, 3.13092e-13, -1.12708e-13, 3.81e-16, 7.106e-15, -1.523e-15, -9.4e-17, 1.21e-16, -2.8e-17];\n var j = cof.length - 1;\n var isneg = false;\n var d = 0;\n var dd = 0;\n var t, ty, tmp, res;\n\n if (x < 0) {\n x = -x;\n isneg = true;\n }\n\n t = 2 / (2 + x);\n ty = 4 * t - 2;\n\n for (; j > 0; j--) {\n tmp = d;\n d = ty * d - dd + cof[j];\n dd = tmp;\n }\n\n res = t * Math.exp(-x * x + 0.5 * (cof[0] + ty * d) - dd);\n return isneg ? res - 1 : 1 - res;\n }; // Returns the complmentary error function erfc(x)\n\n\n jStat.erfc = function erfc(x) {\n return 1 - jStat.erf(x);\n }; // Returns the inverse of the complementary error function\n\n\n jStat.erfcinv = function erfcinv(p) {\n var j = 0;\n var x, err, t, pp;\n if (p >= 2) return -100;\n if (p <= 0) return 100;\n pp = p < 1 ? p : 2 - p;\n t = Math.sqrt(-2 * Math.log(pp / 2));\n x = -0.70711 * ((2.30753 + t * 0.27061) / (1 + t * (0.99229 + t * 0.04481)) - t);\n\n for (; j < 2; j++) {\n err = jStat.erfc(x) - pp;\n x += err / (1.12837916709551257 * Math.exp(-x * x) - x * err);\n }\n\n return p < 1 ? x : -x;\n }; // Returns the inverse of the incomplete beta function\n\n\n jStat.ibetainv = function ibetainv(p, a, b) {\n var EPS = 1e-8;\n var a1 = a - 1;\n var b1 = b - 1;\n var j = 0;\n var lna, lnb, pp, t, u, err, x, al, h, w, afac;\n if (p <= 0) return 0;\n if (p >= 1) return 1;\n\n if (a >= 1 && b >= 1) {\n pp = p < 0.5 ? p : 1 - p;\n t = Math.sqrt(-2 * Math.log(pp));\n x = (2.30753 + t * 0.27061) / (1 + t * (0.99229 + t * 0.04481)) - t;\n if (p < 0.5) x = -x;\n al = (x * x - 3) / 6;\n h = 2 / (1 / (2 * a - 1) + 1 / (2 * b - 1));\n w = x * Math.sqrt(al + h) / h - (1 / (2 * b - 1) - 1 / (2 * a - 1)) * (al + 5 / 6 - 2 / (3 * h));\n x = a / (a + b * Math.exp(2 * w));\n } else {\n lna = Math.log(a / (a + b));\n lnb = Math.log(b / (a + b));\n t = Math.exp(a * lna) / a;\n u = Math.exp(b * lnb) / b;\n w = t + u;\n if (p < t / w) x = Math.pow(a * w * p, 1 / a);else x = 1 - Math.pow(b * w * (1 - p), 1 / b);\n }\n\n afac = -jStat.gammaln(a) - jStat.gammaln(b) + jStat.gammaln(a + b);\n\n for (; j < 10; j++) {\n if (x === 0 || x === 1) return x;\n err = jStat.ibeta(x, a, b) - p;\n t = Math.exp(a1 * Math.log(x) + b1 * Math.log(1 - x) + afac);\n u = err / t;\n x -= t = u / (1 - 0.5 * Math.min(1, u * (a1 / x - b1 / (1 - x))));\n if (x <= 0) x = 0.5 * (x + t);\n if (x >= 1) x = 0.5 * (x + t + 1);\n if (Math.abs(t) < EPS * x && j > 0) break;\n }\n\n return x;\n }; // Returns the incomplete beta function I_x(a,b)\n\n\n jStat.ibeta = function ibeta(x, a, b) {\n // Factors in front of the continued fraction.\n var bt = x === 0 || x === 1 ? 0 : Math.exp(jStat.gammaln(a + b) - jStat.gammaln(a) - jStat.gammaln(b) + a * Math.log(x) + b * Math.log(1 - x));\n if (x < 0 || x > 1) return false;\n if (x < (a + 1) / (a + b + 2)) // Use continued fraction directly.\n return bt * jStat.betacf(x, a, b) / a; // else use continued fraction after making the symmetry transformation.\n\n return 1 - bt * jStat.betacf(1 - x, b, a) / b;\n }; // Returns a normal deviate (mu=0, sigma=1).\n // If n and m are specified it returns a object of normal deviates.\n\n\n jStat.randn = function randn(n, m) {\n var u, v, x, y, q;\n if (!m) m = n;\n if (n) return jStat.create(n, m, function () {\n return jStat.randn();\n });\n\n do {\n u = jStat._random_fn();\n v = 1.7156 * (jStat._random_fn() - 0.5);\n x = u - 0.449871;\n y = Math.abs(v) + 0.386595;\n q = x * x + y * (0.19600 * y - 0.25472 * x);\n } while (q > 0.27597 && (q > 0.27846 || v * v > -4 * Math.log(u) * u * u));\n\n return v / u;\n }; // Returns a gamma deviate by the method of Marsaglia and Tsang.\n\n\n jStat.randg = function randg(shape, n, m) {\n var oalph = shape;\n var a1, a2, u, v, x, mat;\n if (!m) m = n;\n if (!shape) shape = 1;\n\n if (n) {\n mat = jStat.zeros(n, m);\n mat.alter(function () {\n return jStat.randg(shape);\n });\n return mat;\n }\n\n if (shape < 1) shape += 1;\n a1 = shape - 1 / 3;\n a2 = 1 / Math.sqrt(9 * a1);\n\n do {\n do {\n x = jStat.randn();\n v = 1 + a2 * x;\n } while (v <= 0);\n\n v = v * v * v;\n u = jStat._random_fn();\n } while (u > 1 - 0.331 * Math.pow(x, 4) && Math.log(u) > 0.5 * x * x + a1 * (1 - v + Math.log(v))); // alpha > 1\n\n\n if (shape == oalph) return a1 * v; // alpha < 1\n\n do {\n u = jStat._random_fn();\n } while (u === 0);\n\n return Math.pow(u, 1 / oalph) * a1 * v;\n }; // making use of static methods on the instance\n\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n jStat.fn[passfunc] = function () {\n return jStat(jStat.map(this, function (value) {\n return jStat[passfunc](value);\n }));\n };\n })(funcs[i]);\n }\n })('gammaln gammafn factorial factorialln'.split(' '));\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n jStat.fn[passfunc] = function () {\n return jStat(jStat[passfunc].apply(null, arguments));\n };\n })(funcs[i]);\n }\n })('randn'.split(' '));\n })(jStat, Math);\n\n (function (jStat, Math) {\n // generate all distribution instance methods\n (function (list) {\n for (var i = 0; i < list.length; i++) {\n (function (func) {\n // distribution instance method\n jStat[func] = function f(a, b, c) {\n if (!(this instanceof f)) return new f(a, b, c);\n this._a = a;\n this._b = b;\n this._c = c;\n return this;\n }; // distribution method to be used on a jStat instance\n\n\n jStat.fn[func] = function (a, b, c) {\n var newthis = jStat[func](a, b, c);\n newthis.data = this;\n return newthis;\n }; // sample instance method\n\n\n jStat[func].prototype.sample = function (arr) {\n var a = this._a;\n var b = this._b;\n var c = this._c;\n if (arr) return jStat.alter(arr, function () {\n return jStat[func].sample(a, b, c);\n });else return jStat[func].sample(a, b, c);\n }; // generate the pdf, cdf and inv instance methods\n\n\n (function (vals) {\n for (var i = 0; i < vals.length; i++) {\n (function (fnfunc) {\n jStat[func].prototype[fnfunc] = function (x) {\n var a = this._a;\n var b = this._b;\n var c = this._c;\n if (!x && x !== 0) x = this.data;\n\n if (typeof x !== 'number') {\n return jStat.fn.map.call(x, function (x) {\n return jStat[func][fnfunc](x, a, b, c);\n });\n }\n\n return jStat[func][fnfunc](x, a, b, c);\n };\n })(vals[i]);\n }\n })('pdf cdf inv'.split(' ')); // generate the mean, median, mode and variance instance methods\n\n\n (function (vals) {\n for (var i = 0; i < vals.length; i++) {\n (function (fnfunc) {\n jStat[func].prototype[fnfunc] = function () {\n return jStat[func][fnfunc](this._a, this._b, this._c);\n };\n })(vals[i]);\n }\n })('mean median mode variance'.split(' '));\n })(list[i]);\n }\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(' ')); // extend beta function with static methods\n\n\n jStat.extend(jStat.beta, {\n pdf: function pdf(x, alpha, beta) {\n // PDF is zero outside the support\n if (x > 1 || x < 0) return 0; // PDF is one for the uniform case\n\n if (alpha == 1 && beta == 1) return 1;\n\n if (alpha < 512 && beta < 512) {\n return Math.pow(x, alpha - 1) * Math.pow(1 - x, beta - 1) / jStat.betafn(alpha, beta);\n } else {\n return Math.exp((alpha - 1) * Math.log(x) + (beta - 1) * Math.log(1 - x) - jStat.betaln(alpha, beta));\n }\n },\n cdf: function cdf(x, alpha, beta) {\n return x > 1 || x < 0 ? (x > 1) * 1 : jStat.ibeta(x, alpha, beta);\n },\n inv: function inv(x, alpha, beta) {\n return jStat.ibetainv(x, alpha, beta);\n },\n mean: function mean(alpha, beta) {\n return alpha / (alpha + beta);\n },\n median: function median(alpha, beta) {\n return jStat.ibetainv(0.5, alpha, beta);\n },\n mode: function mode(alpha, beta) {\n return (alpha - 1) / (alpha + beta - 2);\n },\n // return a random sample\n sample: function sample(alpha, beta) {\n var u = jStat.randg(alpha);\n return u / (u + jStat.randg(beta));\n },\n variance: function variance(alpha, beta) {\n return alpha * beta / (Math.pow(alpha + beta, 2) * (alpha + beta + 1));\n }\n }); // extend F function with static methods\n\n jStat.extend(jStat.centralF, {\n // This implementation of the pdf function avoids float overflow\n // See the way that R calculates this value:\n // https://svn.r-project.org/R/trunk/src/nmath/df.c\n pdf: function pdf(x, df1, df2) {\n var p, q, f;\n if (x < 0) return 0;\n\n if (df1 <= 2) {\n if (x === 0 && df1 < 2) {\n return Infinity;\n }\n\n if (x === 0 && df1 === 2) {\n return 1;\n }\n\n return 1 / jStat.betafn(df1 / 2, df2 / 2) * Math.pow(df1 / df2, df1 / 2) * Math.pow(x, df1 / 2 - 1) * Math.pow(1 + df1 / df2 * x, -(df1 + df2) / 2);\n }\n\n p = df1 * x / (df2 + x * df1);\n q = df2 / (df2 + x * df1);\n f = df1 * q / 2.0;\n return f * jStat.binomial.pdf((df1 - 2) / 2, (df1 + df2 - 2) / 2, p);\n },\n cdf: function cdf(x, df1, df2) {\n if (x < 0) return 0;\n return jStat.ibeta(df1 * x / (df1 * x + df2), df1 / 2, df2 / 2);\n },\n inv: function inv(x, df1, df2) {\n return df2 / (df1 * (1 / jStat.ibetainv(x, df1 / 2, df2 / 2) - 1));\n },\n mean: function mean(df1, df2) {\n return df2 > 2 ? df2 / (df2 - 2) : undefined;\n },\n mode: function mode(df1, df2) {\n return df1 > 2 ? df2 * (df1 - 2) / (df1 * (df2 + 2)) : undefined;\n },\n // return a random sample\n sample: function sample(df1, df2) {\n var x1 = jStat.randg(df1 / 2) * 2;\n var x2 = jStat.randg(df2 / 2) * 2;\n return x1 / df1 / (x2 / df2);\n },\n variance: function variance(df1, df2) {\n if (df2 <= 4) return undefined;\n return 2 * df2 * df2 * (df1 + df2 - 2) / (df1 * (df2 - 2) * (df2 - 2) * (df2 - 4));\n }\n }); // extend cauchy function with static methods\n\n jStat.extend(jStat.cauchy, {\n pdf: function pdf(x, local, scale) {\n if (scale < 0) {\n return 0;\n }\n\n return scale / (Math.pow(x - local, 2) + Math.pow(scale, 2)) / Math.PI;\n },\n cdf: function cdf(x, local, scale) {\n return Math.atan((x - local) / scale) / Math.PI + 0.5;\n },\n inv: function inv(p, local, scale) {\n return local + scale * Math.tan(Math.PI * (p - 0.5));\n },\n median: function median(local\n /*, scale*/\n ) {\n return local;\n },\n mode: function mode(local\n /*, scale*/\n ) {\n return local;\n },\n sample: function sample(local, scale) {\n return jStat.randn() * Math.sqrt(1 / (2 * jStat.randg(0.5))) * scale + local;\n }\n }); // extend chisquare function with static methods\n\n jStat.extend(jStat.chisquare, {\n pdf: function pdf(x, dof) {\n if (x < 0) return 0;\n return x === 0 && dof === 2 ? 0.5 : Math.exp((dof / 2 - 1) * Math.log(x) - x / 2 - dof / 2 * Math.log(2) - jStat.gammaln(dof / 2));\n },\n cdf: function cdf(x, dof) {\n if (x < 0) return 0;\n return jStat.lowRegGamma(dof / 2, x / 2);\n },\n inv: function inv(p, dof) {\n return 2 * jStat.gammapinv(p, 0.5 * dof);\n },\n mean: function mean(dof) {\n return dof;\n },\n // TODO: this is an approximation (is there a better way?)\n median: function median(dof) {\n return dof * Math.pow(1 - 2 / (9 * dof), 3);\n },\n mode: function mode(dof) {\n return dof - 2 > 0 ? dof - 2 : 0;\n },\n sample: function sample(dof) {\n return jStat.randg(dof / 2) * 2;\n },\n variance: function variance(dof) {\n return 2 * dof;\n }\n }); // extend exponential function with static methods\n\n jStat.extend(jStat.exponential, {\n pdf: function pdf(x, rate) {\n return x < 0 ? 0 : rate * Math.exp(-rate * x);\n },\n cdf: function cdf(x, rate) {\n return x < 0 ? 0 : 1 - Math.exp(-rate * x);\n },\n inv: function inv(p, rate) {\n return -Math.log(1 - p) / rate;\n },\n mean: function mean(rate) {\n return 1 / rate;\n },\n median: function median(rate) {\n return 1 / rate * Math.log(2);\n },\n mode: function mode()\n /*rate*/\n {\n return 0;\n },\n sample: function sample(rate) {\n return -1 / rate * Math.log(jStat._random_fn());\n },\n variance: function variance(rate) {\n return Math.pow(rate, -2);\n }\n }); // extend gamma function with static methods\n\n jStat.extend(jStat.gamma, {\n pdf: function pdf(x, shape, scale) {\n if (x < 0) return 0;\n return x === 0 && shape === 1 ? 1 / scale : Math.exp((shape - 1) * Math.log(x) - x / scale - jStat.gammaln(shape) - shape * Math.log(scale));\n },\n cdf: function cdf(x, shape, scale) {\n if (x < 0) return 0;\n return jStat.lowRegGamma(shape, x / scale);\n },\n inv: function inv(p, shape, scale) {\n return jStat.gammapinv(p, shape) * scale;\n },\n mean: function mean(shape, scale) {\n return shape * scale;\n },\n mode: function mode(shape, scale) {\n if (shape > 1) return (shape - 1) * scale;\n return undefined;\n },\n sample: function sample(shape, scale) {\n return jStat.randg(shape) * scale;\n },\n variance: function variance(shape, scale) {\n return shape * scale * scale;\n }\n }); // extend inverse gamma function with static methods\n\n jStat.extend(jStat.invgamma, {\n pdf: function pdf(x, shape, scale) {\n if (x <= 0) return 0;\n return Math.exp(-(shape + 1) * Math.log(x) - scale / x - jStat.gammaln(shape) + shape * Math.log(scale));\n },\n cdf: function cdf(x, shape, scale) {\n if (x <= 0) return 0;\n return 1 - jStat.lowRegGamma(shape, scale / x);\n },\n inv: function inv(p, shape, scale) {\n return scale / jStat.gammapinv(1 - p, shape);\n },\n mean: function mean(shape, scale) {\n return shape > 1 ? scale / (shape - 1) : undefined;\n },\n mode: function mode(shape, scale) {\n return scale / (shape + 1);\n },\n sample: function sample(shape, scale) {\n return scale / jStat.randg(shape);\n },\n variance: function variance(shape, scale) {\n if (shape <= 2) return undefined;\n return scale * scale / ((shape - 1) * (shape - 1) * (shape - 2));\n }\n }); // extend kumaraswamy function with static methods\n\n jStat.extend(jStat.kumaraswamy, {\n pdf: function pdf(x, alpha, beta) {\n if (x === 0 && alpha === 1) return beta;else if (x === 1 && beta === 1) return alpha;\n return Math.exp(Math.log(alpha) + Math.log(beta) + (alpha - 1) * Math.log(x) + (beta - 1) * Math.log(1 - Math.pow(x, alpha)));\n },\n cdf: function cdf(x, alpha, beta) {\n if (x < 0) return 0;else if (x > 1) return 1;\n return 1 - Math.pow(1 - Math.pow(x, alpha), beta);\n },\n inv: function inv(p, alpha, beta) {\n return Math.pow(1 - Math.pow(1 - p, 1 / beta), 1 / alpha);\n },\n mean: function mean(alpha, beta) {\n return beta * jStat.gammafn(1 + 1 / alpha) * jStat.gammafn(beta) / jStat.gammafn(1 + 1 / alpha + beta);\n },\n median: function median(alpha, beta) {\n return Math.pow(1 - Math.pow(2, -1 / beta), 1 / alpha);\n },\n mode: function mode(alpha, beta) {\n if (!(alpha >= 1 && beta >= 1 && alpha !== 1 && beta !== 1)) return undefined;\n return Math.pow((alpha - 1) / (alpha * beta - 1), 1 / alpha);\n },\n variance: function variance()\n /*alpha, beta*/\n {\n throw new Error('variance not yet implemented'); // TODO: complete this\n }\n }); // extend lognormal function with static methods\n\n jStat.extend(jStat.lognormal, {\n pdf: function pdf(x, mu, sigma) {\n if (x <= 0) return 0;\n return Math.exp(-Math.log(x) - 0.5 * Math.log(2 * Math.PI) - Math.log(sigma) - Math.pow(Math.log(x) - mu, 2) / (2 * sigma * sigma));\n },\n cdf: function cdf(x, mu, sigma) {\n if (x < 0) return 0;\n return 0.5 + 0.5 * jStat.erf((Math.log(x) - mu) / Math.sqrt(2 * sigma * sigma));\n },\n inv: function inv(p, mu, sigma) {\n return Math.exp(-1.41421356237309505 * sigma * jStat.erfcinv(2 * p) + mu);\n },\n mean: function mean(mu, sigma) {\n return Math.exp(mu + sigma * sigma / 2);\n },\n median: function median(mu\n /*, sigma*/\n ) {\n return Math.exp(mu);\n },\n mode: function mode(mu, sigma) {\n return Math.exp(mu - sigma * sigma);\n },\n sample: function sample(mu, sigma) {\n return Math.exp(jStat.randn() * sigma + mu);\n },\n variance: function variance(mu, sigma) {\n return (Math.exp(sigma * sigma) - 1) * Math.exp(2 * mu + sigma * sigma);\n }\n }); // extend noncentralt function with static methods\n\n jStat.extend(jStat.noncentralt, {\n pdf: function pdf(x, dof, ncp) {\n var tol = 1e-14;\n if (Math.abs(ncp) < tol) // ncp approx 0; use student-t\n return jStat.studentt.pdf(x, dof);\n\n if (Math.abs(x) < tol) {\n // different formula for x == 0\n return Math.exp(jStat.gammaln((dof + 1) / 2) - ncp * ncp / 2 - 0.5 * Math.log(Math.PI * dof) - jStat.gammaln(dof / 2));\n } // formula for x != 0\n\n\n return dof / x * (jStat.noncentralt.cdf(x * Math.sqrt(1 + 2 / dof), dof + 2, ncp) - jStat.noncentralt.cdf(x, dof, ncp));\n },\n cdf: function cdf(x, dof, ncp) {\n var tol = 1e-14;\n var min_iterations = 200;\n if (Math.abs(ncp) < tol) // ncp approx 0; use student-t\n return jStat.studentt.cdf(x, dof); // turn negative x into positive and flip result afterwards\n\n var flip = false;\n\n if (x < 0) {\n flip = true;\n ncp = -ncp;\n }\n\n var prob = jStat.normal.cdf(-ncp, 0, 1);\n var value = tol + 1; // use value at last two steps to determine convergence\n\n var lastvalue = value;\n var y = x * x / (x * x + dof);\n var j = 0;\n var p = Math.exp(-ncp * ncp / 2);\n var q = Math.exp(-ncp * ncp / 2 - 0.5 * Math.log(2) - jStat.gammaln(3 / 2)) * ncp;\n\n while (j < min_iterations || lastvalue > tol || value > tol) {\n lastvalue = value;\n\n if (j > 0) {\n p *= ncp * ncp / (2 * j);\n q *= ncp * ncp / (2 * (j + 1 / 2));\n }\n\n value = p * jStat.beta.cdf(y, j + 0.5, dof / 2) + q * jStat.beta.cdf(y, j + 1, dof / 2);\n prob += 0.5 * value;\n j++;\n }\n\n return flip ? 1 - prob : prob;\n }\n }); // extend normal function with static methods\n\n jStat.extend(jStat.normal, {\n pdf: function pdf(x, mean, std) {\n return Math.exp(-0.5 * Math.log(2 * Math.PI) - Math.log(std) - Math.pow(x - mean, 2) / (2 * std * std));\n },\n cdf: function cdf(x, mean, std) {\n return 0.5 * (1 + jStat.erf((x - mean) / Math.sqrt(2 * std * std)));\n },\n inv: function inv(p, mean, std) {\n return -1.41421356237309505 * std * jStat.erfcinv(2 * p) + mean;\n },\n mean: function mean(_mean\n /*, std*/\n ) {\n return _mean;\n },\n median: function median(mean\n /*, std*/\n ) {\n return mean;\n },\n mode: function mode(mean\n /*, std*/\n ) {\n return mean;\n },\n sample: function sample(mean, std) {\n return jStat.randn() * std + mean;\n },\n variance: function variance(mean, std) {\n return std * std;\n }\n }); // extend pareto function with static methods\n\n jStat.extend(jStat.pareto, {\n pdf: function pdf(x, scale, shape) {\n if (x < scale) return 0;\n return shape * Math.pow(scale, shape) / Math.pow(x, shape + 1);\n },\n cdf: function cdf(x, scale, shape) {\n if (x < scale) return 0;\n return 1 - Math.pow(scale / x, shape);\n },\n inv: function inv(p, scale, shape) {\n return scale / Math.pow(1 - p, 1 / shape);\n },\n mean: function mean(scale, shape) {\n if (shape <= 1) return undefined;\n return shape * Math.pow(scale, shape) / (shape - 1);\n },\n median: function median(scale, shape) {\n return scale * (shape * Math.SQRT2);\n },\n mode: function mode(scale\n /*, shape*/\n ) {\n return scale;\n },\n variance: function variance(scale, shape) {\n if (shape <= 2) return undefined;\n return scale * scale * shape / (Math.pow(shape - 1, 2) * (shape - 2));\n }\n }); // extend studentt function with static methods\n\n jStat.extend(jStat.studentt, {\n pdf: function pdf(x, dof) {\n dof = dof > 1e100 ? 1e100 : dof;\n return 1 / (Math.sqrt(dof) * jStat.betafn(0.5, dof / 2)) * Math.pow(1 + x * x / dof, -((dof + 1) / 2));\n },\n cdf: function cdf(x, dof) {\n var dof2 = dof / 2;\n return jStat.ibeta((x + Math.sqrt(x * x + dof)) / (2 * Math.sqrt(x * x + dof)), dof2, dof2);\n },\n inv: function inv(p, dof) {\n var x = jStat.ibetainv(2 * Math.min(p, 1 - p), 0.5 * dof, 0.5);\n x = Math.sqrt(dof * (1 - x) / x);\n return p > 0.5 ? x : -x;\n },\n mean: function mean(dof) {\n return dof > 1 ? 0 : undefined;\n },\n median: function median()\n /*dof*/\n {\n return 0;\n },\n mode: function mode()\n /*dof*/\n {\n return 0;\n },\n sample: function sample(dof) {\n return jStat.randn() * Math.sqrt(dof / (2 * jStat.randg(dof / 2)));\n },\n variance: function variance(dof) {\n return dof > 2 ? dof / (dof - 2) : dof > 1 ? Infinity : undefined;\n }\n }); // extend weibull function with static methods\n\n jStat.extend(jStat.weibull, {\n pdf: function pdf(x, scale, shape) {\n if (x < 0 || scale < 0 || shape < 0) return 0;\n return shape / scale * Math.pow(x / scale, shape - 1) * Math.exp(-Math.pow(x / scale, shape));\n },\n cdf: function cdf(x, scale, shape) {\n return x < 0 ? 0 : 1 - Math.exp(-Math.pow(x / scale, shape));\n },\n inv: function inv(p, scale, shape) {\n return scale * Math.pow(-Math.log(1 - p), 1 / shape);\n },\n mean: function mean(scale, shape) {\n return scale * jStat.gammafn(1 + 1 / shape);\n },\n median: function median(scale, shape) {\n return scale * Math.pow(Math.log(2), 1 / shape);\n },\n mode: function mode(scale, shape) {\n if (shape <= 1) return 0;\n return scale * Math.pow((shape - 1) / shape, 1 / shape);\n },\n sample: function sample(scale, shape) {\n return scale * Math.pow(-Math.log(jStat._random_fn()), 1 / shape);\n },\n variance: function variance(scale, shape) {\n return scale * scale * jStat.gammafn(1 + 2 / shape) - Math.pow(jStat.weibull.mean(scale, shape), 2);\n }\n }); // extend uniform function with static methods\n\n jStat.extend(jStat.uniform, {\n pdf: function pdf(x, a, b) {\n return x < a || x > b ? 0 : 1 / (b - a);\n },\n cdf: function cdf(x, a, b) {\n if (x < a) return 0;else if (x < b) return (x - a) / (b - a);\n return 1;\n },\n inv: function inv(p, a, b) {\n return a + p * (b - a);\n },\n mean: function mean(a, b) {\n return 0.5 * (a + b);\n },\n median: function median(a, b) {\n return jStat.mean(a, b);\n },\n mode: function mode()\n /*a, b*/\n {\n throw new Error('mode is not yet implemented');\n },\n sample: function sample(a, b) {\n return a / 2 + b / 2 + (b / 2 - a / 2) * (2 * jStat._random_fn() - 1);\n },\n variance: function variance(a, b) {\n return Math.pow(b - a, 2) / 12;\n }\n }); // Got this from http://www.math.ucla.edu/~tom/distributions/binomial.html\n\n function betinc(x, a, b, eps) {\n var a0 = 0;\n var b0 = 1;\n var a1 = 1;\n var b1 = 1;\n var m9 = 0;\n var a2 = 0;\n var c9;\n\n while (Math.abs((a1 - a2) / a1) > eps) {\n a2 = a1;\n c9 = -(a + m9) * (a + b + m9) * x / (a + 2 * m9) / (a + 2 * m9 + 1);\n a0 = a1 + c9 * a0;\n b0 = b1 + c9 * b0;\n m9 = m9 + 1;\n c9 = m9 * (b - m9) * x / (a + 2 * m9 - 1) / (a + 2 * m9);\n a1 = a0 + c9 * a1;\n b1 = b0 + c9 * b1;\n a0 = a0 / b1;\n b0 = b0 / b1;\n a1 = a1 / b1;\n b1 = 1;\n }\n\n return a1 / a;\n } // extend uniform function with static methods\n\n\n jStat.extend(jStat.binomial, {\n pdf: function pdf(k, n, p) {\n return p === 0 || p === 1 ? n * p === k ? 1 : 0 : jStat.combination(n, k) * Math.pow(p, k) * Math.pow(1 - p, n - k);\n },\n cdf: function cdf(x, n, p) {\n var betacdf;\n var eps = 1e-10;\n if (x < 0) return 0;\n if (x >= n) return 1;\n if (p < 0 || p > 1 || n <= 0) return NaN;\n x = Math.floor(x);\n var z = p;\n var a = x + 1;\n var b = n - x;\n var s = a + b;\n var bt = Math.exp(jStat.gammaln(s) - jStat.gammaln(b) - jStat.gammaln(a) + a * Math.log(z) + b * Math.log(1 - z));\n if (z < (a + 1) / (s + 2)) betacdf = bt * betinc(z, a, b, eps);else betacdf = 1 - bt * betinc(1 - z, b, a, eps);\n return Math.round((1 - betacdf) * (1 / eps)) / (1 / eps);\n }\n }); // extend uniform function with static methods\n\n jStat.extend(jStat.negbin, {\n pdf: function pdf(k, r, p) {\n if (k !== k >>> 0) return false;\n if (k < 0) return 0;\n return jStat.combination(k + r - 1, r - 1) * Math.pow(1 - p, k) * Math.pow(p, r);\n },\n cdf: function cdf(x, r, p) {\n var sum = 0,\n k = 0;\n if (x < 0) return 0;\n\n for (; k <= x; k++) {\n sum += jStat.negbin.pdf(k, r, p);\n }\n\n return sum;\n }\n }); // extend uniform function with static methods\n\n jStat.extend(jStat.hypgeom, {\n pdf: function pdf(k, N, m, n) {\n // Hypergeometric PDF.\n // A simplification of the CDF algorithm below.\n // k = number of successes drawn\n // N = population size\n // m = number of successes in population\n // n = number of items drawn from population\n if (k !== k | 0) {\n return false;\n } else if (k < 0 || k < m - (N - n)) {\n // It's impossible to have this few successes drawn.\n return 0;\n } else if (k > n || k > m) {\n // It's impossible to have this many successes drawn.\n return 0;\n } else if (m * 2 > N) {\n // More than half the population is successes.\n if (n * 2 > N) {\n // More than half the population is sampled.\n return jStat.hypgeom.pdf(N - m - n + k, N, N - m, N - n);\n } else {\n // Half or less of the population is sampled.\n return jStat.hypgeom.pdf(n - k, N, N - m, n);\n }\n } else if (n * 2 > N) {\n // Half or less is successes.\n return jStat.hypgeom.pdf(m - k, N, m, N - n);\n } else if (m < n) {\n // We want to have the number of things sampled to be less than the\n // successes available. So swap the definitions of successful and sampled.\n return jStat.hypgeom.pdf(k, N, n, m);\n } else {\n // If we get here, half or less of the population was sampled, half or\n // less of it was successes, and we had fewer sampled things than\n // successes. Now we can do this complicated iterative algorithm in an\n // efficient way.\n // The basic premise of the algorithm is that we partially normalize our\n // intermediate product to keep it in a numerically good region, and then\n // finish the normalization at the end.\n // This variable holds the scaled probability of the current number of\n // successes.\n var scaledPDF = 1; // This keeps track of how much we have normalized.\n\n var samplesDone = 0;\n\n for (var i = 0; i < k; i++) {\n // For every possible number of successes up to that observed...\n while (scaledPDF > 1 && samplesDone < n) {\n // Intermediate result is growing too big. Apply some of the\n // normalization to shrink everything.\n scaledPDF *= 1 - m / (N - samplesDone); // Say we've normalized by this sample already.\n\n samplesDone++;\n } // Work out the partially-normalized hypergeometric PDF for the next\n // number of successes\n\n\n scaledPDF *= (n - i) * (m - i) / ((i + 1) * (N - m - n + i + 1));\n }\n\n for (; samplesDone < n; samplesDone++) {\n // Apply all the rest of the normalization\n scaledPDF *= 1 - m / (N - samplesDone);\n } // Bound answer sanely before returning.\n\n\n return Math.min(1, Math.max(0, scaledPDF));\n }\n },\n cdf: function cdf(x, N, m, n) {\n // Hypergeometric CDF.\n // This algorithm is due to Prof. Thomas S. Ferguson, ,\n // and comes from his hypergeometric test calculator at\n // .\n // x = number of successes drawn\n // N = population size\n // m = number of successes in population\n // n = number of items drawn from population\n if (x < 0 || x < m - (N - n)) {\n // It's impossible to have this few successes drawn or fewer.\n return 0;\n } else if (x >= n || x >= m) {\n // We will always have this many successes or fewer.\n return 1;\n } else if (m * 2 > N) {\n // More than half the population is successes.\n if (n * 2 > N) {\n // More than half the population is sampled.\n return jStat.hypgeom.cdf(N - m - n + x, N, N - m, N - n);\n } else {\n // Half or less of the population is sampled.\n return 1 - jStat.hypgeom.cdf(n - x - 1, N, N - m, n);\n }\n } else if (n * 2 > N) {\n // Half or less is successes.\n return 1 - jStat.hypgeom.cdf(m - x - 1, N, m, N - n);\n } else if (m < n) {\n // We want to have the number of things sampled to be less than the\n // successes available. So swap the definitions of successful and sampled.\n return jStat.hypgeom.cdf(x, N, n, m);\n } else {\n // If we get here, half or less of the population was sampled, half or\n // less of it was successes, and we had fewer sampled things than\n // successes. Now we can do this complicated iterative algorithm in an\n // efficient way.\n // The basic premise of the algorithm is that we partially normalize our\n // intermediate sum to keep it in a numerically good region, and then\n // finish the normalization at the end.\n // Holds the intermediate, scaled total CDF.\n var scaledCDF = 1; // This variable holds the scaled probability of the current number of\n // successes.\n\n var scaledPDF = 1; // This keeps track of how much we have normalized.\n\n var samplesDone = 0;\n\n for (var i = 0; i < x; i++) {\n // For every possible number of successes up to that observed...\n while (scaledCDF > 1 && samplesDone < n) {\n // Intermediate result is growing too big. Apply some of the\n // normalization to shrink everything.\n var factor = 1 - m / (N - samplesDone);\n scaledPDF *= factor;\n scaledCDF *= factor; // Say we've normalized by this sample already.\n\n samplesDone++;\n } // Work out the partially-normalized hypergeometric PDF for the next\n // number of successes\n\n\n scaledPDF *= (n - i) * (m - i) / ((i + 1) * (N - m - n + i + 1)); // Add to the CDF answer.\n\n scaledCDF += scaledPDF;\n }\n\n for (; samplesDone < n; samplesDone++) {\n // Apply all the rest of the normalization\n scaledCDF *= 1 - m / (N - samplesDone);\n } // Bound answer sanely before returning.\n\n\n return Math.min(1, Math.max(0, scaledCDF));\n }\n }\n }); // extend uniform function with static methods\n\n jStat.extend(jStat.poisson, {\n pdf: function pdf(k, l) {\n if (l < 0 || k % 1 !== 0 || k < 0) {\n return 0;\n }\n\n return Math.pow(l, k) * Math.exp(-l) / jStat.factorial(k);\n },\n cdf: function cdf(x, l) {\n var sumarr = [],\n k = 0;\n if (x < 0) return 0;\n\n for (; k <= x; k++) {\n sumarr.push(jStat.poisson.pdf(k, l));\n }\n\n return jStat.sum(sumarr);\n },\n mean: function mean(l) {\n return l;\n },\n variance: function variance(l) {\n return l;\n },\n sampleSmall: function sampleSmall(l) {\n var p = 1,\n k = 0,\n L = Math.exp(-l);\n\n do {\n k++;\n p *= jStat._random_fn();\n } while (p > L);\n\n return k - 1;\n },\n sampleLarge: function sampleLarge(l) {\n var lam = l;\n var k;\n var U, V, slam, loglam, a, b, invalpha, vr, us;\n slam = Math.sqrt(lam);\n loglam = Math.log(lam);\n b = 0.931 + 2.53 * slam;\n a = -0.059 + 0.02483 * b;\n invalpha = 1.1239 + 1.1328 / (b - 3.4);\n vr = 0.9277 - 3.6224 / (b - 2);\n\n while (1) {\n U = Math.random() - 0.5;\n V = Math.random();\n us = 0.5 - Math.abs(U);\n k = Math.floor((2 * a / us + b) * U + lam + 0.43);\n\n if (us >= 0.07 && V <= vr) {\n return k;\n }\n\n if (k < 0 || us < 0.013 && V > us) {\n continue;\n }\n /* log(V) == log(0.0) ok here */\n\n /* if U==0.0 so that us==0.0, log is ok since always returns */\n\n\n if (Math.log(V) + Math.log(invalpha) - Math.log(a / (us * us) + b) <= -lam + k * loglam - jStat.loggam(k + 1)) {\n return k;\n }\n }\n },\n sample: function sample(l) {\n if (l < 10) return this.sampleSmall(l);else return this.sampleLarge(l);\n }\n }); // extend triangular function with static methods\n\n jStat.extend(jStat.triangular, {\n pdf: function pdf(x, a, b, c) {\n if (b <= a || c < a || c > b) {\n return NaN;\n } else {\n if (x < a || x > b) {\n return 0;\n } else if (x < c) {\n return 2 * (x - a) / ((b - a) * (c - a));\n } else if (x === c) {\n return 2 / (b - a);\n } else {\n // x > c\n return 2 * (b - x) / ((b - a) * (b - c));\n }\n }\n },\n cdf: function cdf(x, a, b, c) {\n if (b <= a || c < a || c > b) return NaN;\n if (x <= a) return 0;else if (x >= b) return 1;\n if (x <= c) return Math.pow(x - a, 2) / ((b - a) * (c - a));else // x > c\n return 1 - Math.pow(b - x, 2) / ((b - a) * (b - c));\n },\n inv: function inv(p, a, b, c) {\n if (b <= a || c < a || c > b) {\n return NaN;\n } else {\n if (p <= (c - a) / (b - a)) {\n return a + (b - a) * Math.sqrt(p * ((c - a) / (b - a)));\n } else {\n // p > ((c - a) / (b - a))\n return a + (b - a) * (1 - Math.sqrt((1 - p) * (1 - (c - a) / (b - a))));\n }\n }\n },\n mean: function mean(a, b, c) {\n return (a + b + c) / 3;\n },\n median: function median(a, b, c) {\n if (c <= (a + b) / 2) {\n return b - Math.sqrt((b - a) * (b - c)) / Math.sqrt(2);\n } else if (c > (a + b) / 2) {\n return a + Math.sqrt((b - a) * (c - a)) / Math.sqrt(2);\n }\n },\n mode: function mode(a, b, c) {\n return c;\n },\n sample: function sample(a, b, c) {\n var u = jStat._random_fn();\n\n if (u < (c - a) / (b - a)) return a + Math.sqrt(u * (b - a) * (c - a));\n return b - Math.sqrt((1 - u) * (b - a) * (b - c));\n },\n variance: function variance(a, b, c) {\n return (a * a + b * b + c * c - a * b - a * c - b * c) / 18;\n }\n }); // extend arcsine function with static methods\n\n jStat.extend(jStat.arcsine, {\n pdf: function pdf(x, a, b) {\n if (b <= a) return NaN;\n return x <= a || x >= b ? 0 : 2 / Math.PI * Math.pow(Math.pow(b - a, 2) - Math.pow(2 * x - a - b, 2), -0.5);\n },\n cdf: function cdf(x, a, b) {\n if (x < a) return 0;else if (x < b) return 2 / Math.PI * Math.asin(Math.sqrt((x - a) / (b - a)));\n return 1;\n },\n inv: function inv(p, a, b) {\n return a + (0.5 - 0.5 * Math.cos(Math.PI * p)) * (b - a);\n },\n mean: function mean(a, b) {\n if (b <= a) return NaN;\n return (a + b) / 2;\n },\n median: function median(a, b) {\n if (b <= a) return NaN;\n return (a + b) / 2;\n },\n mode: function mode()\n /*a, b*/\n {\n throw new Error('mode is not yet implemented');\n },\n sample: function sample(a, b) {\n return (a + b) / 2 + (b - a) / 2 * Math.sin(2 * Math.PI * jStat.uniform.sample(0, 1));\n },\n variance: function variance(a, b) {\n if (b <= a) return NaN;\n return Math.pow(b - a, 2) / 8;\n }\n });\n\n function laplaceSign(x) {\n return x / Math.abs(x);\n }\n\n jStat.extend(jStat.laplace, {\n pdf: function pdf(x, mu, b) {\n return b <= 0 ? 0 : Math.exp(-Math.abs(x - mu) / b) / (2 * b);\n },\n cdf: function cdf(x, mu, b) {\n if (b <= 0) {\n return 0;\n }\n\n if (x < mu) {\n return 0.5 * Math.exp((x - mu) / b);\n } else {\n return 1 - 0.5 * Math.exp(-(x - mu) / b);\n }\n },\n mean: function mean(mu\n /*, b*/\n ) {\n return mu;\n },\n median: function median(mu\n /*, b*/\n ) {\n return mu;\n },\n mode: function mode(mu\n /*, b*/\n ) {\n return mu;\n },\n variance: function variance(mu, b) {\n return 2 * b * b;\n },\n sample: function sample(mu, b) {\n var u = jStat._random_fn() - 0.5;\n return mu - b * laplaceSign(u) * Math.log(1 - 2 * Math.abs(u));\n }\n });\n\n function tukeyWprob(w, rr, cc) {\n var nleg = 12;\n var ihalf = 6;\n var C1 = -30;\n var C2 = -50;\n var C3 = 60;\n var bb = 8;\n var wlar = 3;\n var wincr1 = 2;\n var wincr2 = 3;\n var xleg = [0.981560634246719250690549090149, 0.904117256370474856678465866119, 0.769902674194304687036893833213, 0.587317954286617447296702418941, 0.367831498998180193752691536644, 0.125233408511468915472441369464];\n var aleg = [0.047175336386511827194615961485, 0.106939325995318430960254718194, 0.160078328543346226334652529543, 0.203167426723065921749064455810, 0.233492536538354808760849898925, 0.249147045813402785000562436043];\n var qsqz = w * 0.5; // if w >= 16 then the integral lower bound (occurs for c=20)\n // is 0.99999999999995 so return a value of 1.\n\n if (qsqz >= bb) return 1.0; // find (f(w/2) - 1) ^ cc\n // (first term in integral of hartley's form).\n\n var pr_w = 2 * jStat.normal.cdf(qsqz, 0, 1, 1, 0) - 1; // erf(qsqz / M_SQRT2)\n // if pr_w ^ cc < 2e-22 then set pr_w = 0\n\n if (pr_w >= Math.exp(C2 / cc)) pr_w = Math.pow(pr_w, cc);else pr_w = 0.0; // if w is large then the second component of the\n // integral is small, so fewer intervals are needed.\n\n var wincr;\n if (w > wlar) wincr = wincr1;else wincr = wincr2; // find the integral of second term of hartley's form\n // for the integral of the range for equal-length\n // intervals using legendre quadrature. limits of\n // integration are from (w/2, 8). two or three\n // equal-length intervals are used.\n // blb and bub are lower and upper limits of integration.\n\n var blb = qsqz;\n var binc = (bb - qsqz) / wincr;\n var bub = blb + binc;\n var einsum = 0.0; // integrate over each interval\n\n var cc1 = cc - 1.0;\n\n for (var wi = 1; wi <= wincr; wi++) {\n var elsum = 0.0;\n var a = 0.5 * (bub + blb); // legendre quadrature with order = nleg\n\n var b = 0.5 * (bub - blb);\n\n for (var jj = 1; jj <= nleg; jj++) {\n var j, xx;\n\n if (ihalf < jj) {\n j = nleg - jj + 1;\n xx = xleg[j - 1];\n } else {\n j = jj;\n xx = -xleg[j - 1];\n }\n\n var c = b * xx;\n var ac = a + c; // if exp(-qexpo/2) < 9e-14,\n // then doesn't contribute to integral\n\n var qexpo = ac * ac;\n if (qexpo > C3) break;\n var pplus = 2 * jStat.normal.cdf(ac, 0, 1, 1, 0);\n var pminus = 2 * jStat.normal.cdf(ac, w, 1, 1, 0); // if rinsum ^ (cc-1) < 9e-14,\n // then doesn't contribute to integral\n\n var rinsum = pplus * 0.5 - pminus * 0.5;\n\n if (rinsum >= Math.exp(C1 / cc1)) {\n rinsum = aleg[j - 1] * Math.exp(-(0.5 * qexpo)) * Math.pow(rinsum, cc1);\n elsum += rinsum;\n }\n }\n\n elsum *= 2.0 * b * cc / Math.sqrt(2 * Math.PI);\n einsum += elsum;\n blb = bub;\n bub += binc;\n } // if pr_w ^ rr < 9e-14, then return 0\n\n\n pr_w += einsum;\n if (pr_w <= Math.exp(C1 / rr)) return 0;\n pr_w = Math.pow(pr_w, rr);\n if (pr_w >= 1) // 1 was iMax was eps\n return 1;\n return pr_w;\n }\n\n function tukeyQinv(p, c, v) {\n var p0 = 0.322232421088;\n var q0 = 0.993484626060e-01;\n var p1 = -1.0;\n var q1 = 0.588581570495;\n var p2 = -0.342242088547;\n var q2 = 0.531103462366;\n var p3 = -0.204231210125;\n var q3 = 0.103537752850;\n var p4 = -0.453642210148e-04;\n var q4 = 0.38560700634e-02;\n var c1 = 0.8832;\n var c2 = 0.2368;\n var c3 = 1.214;\n var c4 = 1.208;\n var c5 = 1.4142;\n var vmax = 120.0;\n var ps = 0.5 - 0.5 * p;\n var yi = Math.sqrt(Math.log(1.0 / (ps * ps)));\n var t = yi + ((((yi * p4 + p3) * yi + p2) * yi + p1) * yi + p0) / ((((yi * q4 + q3) * yi + q2) * yi + q1) * yi + q0);\n if (v < vmax) t += (t * t * t + t) / v / 4.0;\n var q = c1 - c2 * t;\n if (v < vmax) q += -c3 / v + c4 * t / v;\n return t * (q * Math.log(c - 1.0) + c5);\n }\n\n jStat.extend(jStat.tukey, {\n cdf: function cdf(q, nmeans, df) {\n // Identical implementation as the R ptukey() function as of commit 68947\n var rr = 1;\n var cc = nmeans;\n var nlegq = 16;\n var ihalfq = 8;\n var eps1 = -30.0;\n var eps2 = 1.0e-14;\n var dhaf = 100.0;\n var dquar = 800.0;\n var deigh = 5000.0;\n var dlarg = 25000.0;\n var ulen1 = 1.0;\n var ulen2 = 0.5;\n var ulen3 = 0.25;\n var ulen4 = 0.125;\n var xlegq = [0.989400934991649932596154173450, 0.944575023073232576077988415535, 0.865631202387831743880467897712, 0.755404408355003033895101194847, 0.617876244402643748446671764049, 0.458016777657227386342419442984, 0.281603550779258913230460501460, 0.950125098376374401853193354250e-1];\n var alegq = [0.271524594117540948517805724560e-1, 0.622535239386478928628438369944e-1, 0.951585116824927848099251076022e-1, 0.124628971255533872052476282192, 0.149595988816576732081501730547, 0.169156519395002538189312079030, 0.182603415044923588866763667969, 0.189450610455068496285396723208];\n if (q <= 0) return 0; // df must be > 1\n // there must be at least two values\n\n if (df < 2 || rr < 1 || cc < 2) return NaN;\n if (!Number.isFinite(q)) return 1;\n if (df > dlarg) return tukeyWprob(q, rr, cc); // calculate leading constant\n\n var f2 = df * 0.5;\n var f2lf = f2 * Math.log(df) - df * Math.log(2) - jStat.gammaln(f2);\n var f21 = f2 - 1.0; // integral is divided into unit, half-unit, quarter-unit, or\n // eighth-unit length intervals depending on the value of the\n // degrees of freedom.\n\n var ff4 = df * 0.25;\n var ulen;\n if (df <= dhaf) ulen = ulen1;else if (df <= dquar) ulen = ulen2;else if (df <= deigh) ulen = ulen3;else ulen = ulen4;\n f2lf += Math.log(ulen); // integrate over each subinterval\n\n var ans = 0.0;\n\n for (var i = 1; i <= 50; i++) {\n var otsum = 0.0; // legendre quadrature with order = nlegq\n // nodes (stored in xlegq) are symmetric around zero.\n\n var twa1 = (2 * i - 1) * ulen;\n\n for (var jj = 1; jj <= nlegq; jj++) {\n var j, t1;\n\n if (ihalfq < jj) {\n j = jj - ihalfq - 1;\n t1 = f2lf + f21 * Math.log(twa1 + xlegq[j] * ulen) - (xlegq[j] * ulen + twa1) * ff4;\n } else {\n j = jj - 1;\n t1 = f2lf + f21 * Math.log(twa1 - xlegq[j] * ulen) + (xlegq[j] * ulen - twa1) * ff4;\n } // if exp(t1) < 9e-14, then doesn't contribute to integral\n\n\n var qsqz;\n\n if (t1 >= eps1) {\n if (ihalfq < jj) {\n qsqz = q * Math.sqrt((xlegq[j] * ulen + twa1) * 0.5);\n } else {\n qsqz = q * Math.sqrt((-(xlegq[j] * ulen) + twa1) * 0.5);\n } // call wprob to find integral of range portion\n\n\n var wprb = tukeyWprob(qsqz, rr, cc);\n var rotsum = wprb * alegq[j] * Math.exp(t1);\n otsum += rotsum;\n } // end legendre integral for interval i\n // L200:\n\n } // if integral for interval i < 1e-14, then stop.\n // However, in order to avoid small area under left tail,\n // at least 1 / ulen intervals are calculated.\n\n\n if (i * ulen >= 1.0 && otsum <= eps2) break; // end of interval i\n // L330:\n\n ans += otsum;\n }\n\n if (otsum > eps2) {\n // not converged\n throw new Error('tukey.cdf failed to converge');\n }\n\n if (ans > 1) ans = 1;\n return ans;\n },\n inv: function inv(p, nmeans, df) {\n // Identical implementation as the R qtukey() function as of commit 68947\n var rr = 1;\n var cc = nmeans;\n var eps = 0.0001;\n var maxiter = 50; // df must be > 1 ; there must be at least two values\n\n if (df < 2 || rr < 1 || cc < 2) return NaN;\n if (p < 0 || p > 1) return NaN;\n if (p === 0) return 0;\n if (p === 1) return Infinity; // Initial value\n\n var x0 = tukeyQinv(p, cc, df); // Find prob(value < x0)\n\n var valx0 = jStat.tukey.cdf(x0, nmeans, df) - p; // Find the second iterate and prob(value < x1).\n // If the first iterate has probability value\n // exceeding p then second iterate is 1 less than\n // first iterate; otherwise it is 1 greater.\n\n var x1;\n if (valx0 > 0.0) x1 = Math.max(0.0, x0 - 1.0);else x1 = x0 + 1.0;\n var valx1 = jStat.tukey.cdf(x1, nmeans, df) - p; // Find new iterate\n\n var ans;\n\n for (var iter = 1; iter < maxiter; iter++) {\n ans = x1 - valx1 * (x1 - x0) / (valx1 - valx0);\n valx0 = valx1; // New iterate must be >= 0\n\n x0 = x1;\n\n if (ans < 0.0) {\n ans = 0.0;\n valx1 = -p;\n } // Find prob(value < new iterate)\n\n\n valx1 = jStat.tukey.cdf(ans, nmeans, df) - p;\n x1 = ans; // If the difference between two successive\n // iterates is less than eps, stop\n\n var xabs = Math.abs(x1 - x0);\n if (xabs < eps) return ans;\n }\n\n throw new Error('tukey.inv failed to converge');\n }\n });\n })(jStat, Math);\n /* Provides functions for the solution of linear system of equations, integration, extrapolation,\n * interpolation, eigenvalue problems, differential equations and PCA analysis. */\n\n\n (function (jStat, Math) {\n var push = Array.prototype.push;\n var isArray = jStat.utils.isArray;\n\n function isUsable(arg) {\n return isArray(arg) || arg instanceof jStat;\n }\n\n jStat.extend({\n // add a vector/matrix to a vector/matrix or scalar\n add: function add(arr, arg) {\n // check if arg is a vector or scalar\n if (isUsable(arg)) {\n if (!isUsable(arg[0])) arg = [arg];\n return jStat.map(arr, function (value, row, col) {\n return value + arg[row][col];\n });\n }\n\n return jStat.map(arr, function (value) {\n return value + arg;\n });\n },\n // subtract a vector or scalar from the vector\n subtract: function subtract(arr, arg) {\n // check if arg is a vector or scalar\n if (isUsable(arg)) {\n if (!isUsable(arg[0])) arg = [arg];\n return jStat.map(arr, function (value, row, col) {\n return value - arg[row][col] || 0;\n });\n }\n\n return jStat.map(arr, function (value) {\n return value - arg;\n });\n },\n // matrix division\n divide: function divide(arr, arg) {\n if (isUsable(arg)) {\n if (!isUsable(arg[0])) arg = [arg];\n return jStat.multiply(arr, jStat.inv(arg));\n }\n\n return jStat.map(arr, function (value) {\n return value / arg;\n });\n },\n // matrix multiplication\n multiply: function multiply(arr, arg) {\n var row, col, nrescols, sum, nrow, ncol, res, rescols; // eg: arr = 2 arg = 3 -> 6 for res[0][0] statement closure\n\n if (arr.length === undefined && arg.length === undefined) {\n return arr * arg;\n }\n\n nrow = arr.length, ncol = arr[0].length, res = jStat.zeros(nrow, nrescols = isUsable(arg) ? arg[0].length : ncol), rescols = 0;\n\n if (isUsable(arg)) {\n for (; rescols < nrescols; rescols++) {\n for (row = 0; row < nrow; row++) {\n sum = 0;\n\n for (col = 0; col < ncol; col++) {\n sum += arr[row][col] * arg[col][rescols];\n }\n\n res[row][rescols] = sum;\n }\n }\n\n return nrow === 1 && rescols === 1 ? res[0][0] : res;\n }\n\n return jStat.map(arr, function (value) {\n return value * arg;\n });\n },\n // outer([1,2,3],[4,5,6])\n // ===\n // [[1],[2],[3]] times [[4,5,6]]\n // ->\n // [[4,5,6],[8,10,12],[12,15,18]]\n outer: function outer(A, B) {\n return jStat.multiply(A.map(function (t) {\n return [t];\n }), [B]);\n },\n // Returns the dot product of two matricies\n dot: function dot(arr, arg) {\n if (!isUsable(arr[0])) arr = [arr];\n if (!isUsable(arg[0])) arg = [arg]; // convert column to row vector\n\n var left = arr[0].length === 1 && arr.length !== 1 ? jStat.transpose(arr) : arr,\n right = arg[0].length === 1 && arg.length !== 1 ? jStat.transpose(arg) : arg,\n res = [],\n row = 0,\n nrow = left.length,\n ncol = left[0].length,\n sum,\n col;\n\n for (; row < nrow; row++) {\n res[row] = [];\n sum = 0;\n\n for (col = 0; col < ncol; col++) {\n sum += left[row][col] * right[row][col];\n }\n\n res[row] = sum;\n }\n\n return res.length === 1 ? res[0] : res;\n },\n // raise every element by a scalar\n pow: function pow(arr, arg) {\n return jStat.map(arr, function (value) {\n return Math.pow(value, arg);\n });\n },\n // exponentiate every element\n exp: function exp(arr) {\n return jStat.map(arr, function (value) {\n return Math.exp(value);\n });\n },\n // generate the natural log of every element\n log: function exp(arr) {\n return jStat.map(arr, function (value) {\n return Math.log(value);\n });\n },\n // generate the absolute values of the vector\n abs: function abs(arr) {\n return jStat.map(arr, function (value) {\n return Math.abs(value);\n });\n },\n // computes the p-norm of the vector\n // In the case that a matrix is passed, uses the first row as the vector\n norm: function norm(arr, p) {\n var nnorm = 0,\n i = 0; // check the p-value of the norm, and set for most common case\n\n if (isNaN(p)) p = 2; // check if multi-dimensional array, and make vector correction\n\n if (isUsable(arr[0])) arr = arr[0]; // vector norm\n\n for (; i < arr.length; i++) {\n nnorm += Math.pow(Math.abs(arr[i]), p);\n }\n\n return Math.pow(nnorm, 1 / p);\n },\n // computes the angle between two vectors in rads\n // In case a matrix is passed, this uses the first row as the vector\n angle: function angle(arr, arg) {\n return Math.acos(jStat.dot(arr, arg) / (jStat.norm(arr) * jStat.norm(arg)));\n },\n // augment one matrix by another\n // Note: this function returns a matrix, not a jStat object\n aug: function aug(a, b) {\n var newarr = [];\n var i;\n\n for (i = 0; i < a.length; i++) {\n newarr.push(a[i].slice());\n }\n\n for (i = 0; i < newarr.length; i++) {\n push.apply(newarr[i], b[i]);\n }\n\n return newarr;\n },\n // The inv() function calculates the inverse of a matrix\n // Create the inverse by augmenting the matrix by the identity matrix of the\n // appropriate size, and then use G-J elimination on the augmented matrix.\n inv: function inv(a) {\n var rows = a.length;\n var cols = a[0].length;\n var b = jStat.identity(rows, cols);\n var c = jStat.gauss_jordan(a, b);\n var result = [];\n var i = 0;\n var j; //We need to copy the inverse portion to a new matrix to rid G-J artifacts\n\n for (; i < rows; i++) {\n result[i] = [];\n\n for (j = cols; j < c[0].length; j++) {\n result[i][j - cols] = c[i][j];\n }\n }\n\n return result;\n },\n // calculate the determinant of a matrix\n det: function det(a) {\n var alen = a.length,\n alend = alen * 2,\n vals = new Array(alend),\n rowshift = alen - 1,\n colshift = alend - 1,\n mrow = rowshift - alen + 1,\n mcol = colshift,\n i = 0,\n result = 0,\n j; // check for special 2x2 case\n\n if (alen === 2) {\n return a[0][0] * a[1][1] - a[0][1] * a[1][0];\n }\n\n for (; i < alend; i++) {\n vals[i] = 1;\n }\n\n for (i = 0; i < alen; i++) {\n for (j = 0; j < alen; j++) {\n vals[mrow < 0 ? mrow + alen : mrow] *= a[i][j];\n vals[mcol < alen ? mcol + alen : mcol] *= a[i][j];\n mrow++;\n mcol--;\n }\n\n mrow = --rowshift - alen + 1;\n mcol = --colshift;\n }\n\n for (i = 0; i < alen; i++) {\n result += vals[i];\n }\n\n for (; i < alend; i++) {\n result -= vals[i];\n }\n\n return result;\n },\n gauss_elimination: function gauss_elimination(a, b) {\n var i = 0,\n j = 0,\n n = a.length,\n m = a[0].length,\n factor = 1,\n sum = 0,\n x = [],\n maug,\n pivot,\n temp,\n k;\n a = jStat.aug(a, b);\n maug = a[0].length;\n\n for (i = 0; i < n; i++) {\n pivot = a[i][i];\n j = i;\n\n for (k = i + 1; k < m; k++) {\n if (pivot < Math.abs(a[k][i])) {\n pivot = a[k][i];\n j = k;\n }\n }\n\n if (j != i) {\n for (k = 0; k < maug; k++) {\n temp = a[i][k];\n a[i][k] = a[j][k];\n a[j][k] = temp;\n }\n }\n\n for (j = i + 1; j < n; j++) {\n factor = a[j][i] / a[i][i];\n\n for (k = i; k < maug; k++) {\n a[j][k] = a[j][k] - factor * a[i][k];\n }\n }\n }\n\n for (i = n - 1; i >= 0; i--) {\n sum = 0;\n\n for (j = i + 1; j <= n - 1; j++) {\n sum = sum + x[j] * a[i][j];\n }\n\n x[i] = (a[i][maug - 1] - sum) / a[i][i];\n }\n\n return x;\n },\n gauss_jordan: function gauss_jordan(a, b) {\n var m = jStat.aug(a, b);\n var h = m.length;\n var w = m[0].length;\n var c = 0;\n var x, y, y2; // find max pivot\n\n for (y = 0; y < h; y++) {\n var maxrow = y;\n\n for (y2 = y + 1; y2 < h; y2++) {\n if (Math.abs(m[y2][y]) > Math.abs(m[maxrow][y])) maxrow = y2;\n }\n\n var tmp = m[y];\n m[y] = m[maxrow];\n m[maxrow] = tmp;\n\n for (y2 = y + 1; y2 < h; y2++) {\n c = m[y2][y] / m[y][y];\n\n for (x = y; x < w; x++) {\n m[y2][x] -= m[y][x] * c;\n }\n }\n } // backsubstitute\n\n\n for (y = h - 1; y >= 0; y--) {\n c = m[y][y];\n\n for (y2 = 0; y2 < y; y2++) {\n for (x = w - 1; x > y - 1; x--) {\n m[y2][x] -= m[y][x] * m[y2][y] / c;\n }\n }\n\n m[y][y] /= c;\n\n for (x = h; x < w; x++) {\n m[y][x] /= c;\n }\n }\n\n return m;\n },\n // solve equation\n // Ax=b\n // A is upper triangular matrix\n // A=[[1,2,3],[0,4,5],[0,6,7]]\n // b=[1,2,3]\n // triaUpSolve(A,b) // -> [2.666,0.1666,1.666]\n // if you use matrix style\n // A=[[1,2,3],[0,4,5],[0,6,7]]\n // b=[[1],[2],[3]]\n // will return [[2.666],[0.1666],[1.666]]\n triaUpSolve: function triaUpSolve(A, b) {\n var size = A[0].length;\n var x = jStat.zeros(1, size)[0];\n var parts;\n var matrix_mode = false;\n\n if (b[0].length != undefined) {\n b = b.map(function (i) {\n return i[0];\n });\n matrix_mode = true;\n }\n\n jStat.arange(size - 1, -1, -1).forEach(function (i) {\n parts = jStat.arange(i + 1, size).map(function (j) {\n return x[j] * A[i][j];\n });\n x[i] = (b[i] - jStat.sum(parts)) / A[i][i];\n });\n if (matrix_mode) return x.map(function (i) {\n return [i];\n });\n return x;\n },\n triaLowSolve: function triaLowSolve(A, b) {\n // like to triaUpSolve but A is lower triangular matrix\n var size = A[0].length;\n var x = jStat.zeros(1, size)[0];\n var parts;\n var matrix_mode = false;\n\n if (b[0].length != undefined) {\n b = b.map(function (i) {\n return i[0];\n });\n matrix_mode = true;\n }\n\n jStat.arange(size).forEach(function (i) {\n parts = jStat.arange(i).map(function (j) {\n return A[i][j] * x[j];\n });\n x[i] = (b[i] - jStat.sum(parts)) / A[i][i];\n });\n if (matrix_mode) return x.map(function (i) {\n return [i];\n });\n return x;\n },\n // A -> [L,U]\n // A=LU\n // L is lower triangular matrix\n // U is upper triangular matrix\n lu: function lu(A) {\n var size = A.length; //var L=jStat.diagonal(jStat.ones(1,size)[0]);\n\n var L = jStat.identity(size);\n var R = jStat.zeros(A.length, A[0].length);\n var parts;\n jStat.arange(size).forEach(function (t) {\n R[0][t] = A[0][t];\n });\n jStat.arange(1, size).forEach(function (l) {\n jStat.arange(l).forEach(function (i) {\n parts = jStat.arange(i).map(function (jj) {\n return L[l][jj] * R[jj][i];\n });\n L[l][i] = (A[l][i] - jStat.sum(parts)) / R[i][i];\n });\n jStat.arange(l, size).forEach(function (j) {\n parts = jStat.arange(l).map(function (jj) {\n return L[l][jj] * R[jj][j];\n });\n R[l][j] = A[parts.length][j] - jStat.sum(parts);\n });\n });\n return [L, R];\n },\n // A -> T\n // A=TT'\n // T is lower triangular matrix\n cholesky: function cholesky(A) {\n var size = A.length;\n var T = jStat.zeros(A.length, A[0].length);\n var parts;\n jStat.arange(size).forEach(function (i) {\n parts = jStat.arange(i).map(function (t) {\n return Math.pow(T[i][t], 2);\n });\n T[i][i] = Math.sqrt(A[i][i] - jStat.sum(parts));\n jStat.arange(i + 1, size).forEach(function (j) {\n parts = jStat.arange(i).map(function (t) {\n return T[i][t] * T[j][t];\n });\n T[j][i] = (A[i][j] - jStat.sum(parts)) / T[i][i];\n });\n });\n return T;\n },\n gauss_jacobi: function gauss_jacobi(a, b, x, r) {\n var i = 0;\n var j = 0;\n var n = a.length;\n var l = [];\n var u = [];\n var d = [];\n var xv, c, h, xk;\n\n for (; i < n; i++) {\n l[i] = [];\n u[i] = [];\n d[i] = [];\n\n for (j = 0; j < n; j++) {\n if (i > j) {\n l[i][j] = a[i][j];\n u[i][j] = d[i][j] = 0;\n } else if (i < j) {\n u[i][j] = a[i][j];\n l[i][j] = d[i][j] = 0;\n } else {\n d[i][j] = a[i][j];\n l[i][j] = u[i][j] = 0;\n }\n }\n }\n\n h = jStat.multiply(jStat.multiply(jStat.inv(d), jStat.add(l, u)), -1);\n c = jStat.multiply(jStat.inv(d), b);\n xv = x;\n xk = jStat.add(jStat.multiply(h, x), c);\n i = 2;\n\n while (Math.abs(jStat.norm(jStat.subtract(xk, xv))) > r) {\n xv = xk;\n xk = jStat.add(jStat.multiply(h, xv), c);\n i++;\n }\n\n return xk;\n },\n gauss_seidel: function gauss_seidel(a, b, x, r) {\n var i = 0;\n var n = a.length;\n var l = [];\n var u = [];\n var d = [];\n var j, xv, c, h, xk;\n\n for (; i < n; i++) {\n l[i] = [];\n u[i] = [];\n d[i] = [];\n\n for (j = 0; j < n; j++) {\n if (i > j) {\n l[i][j] = a[i][j];\n u[i][j] = d[i][j] = 0;\n } else if (i < j) {\n u[i][j] = a[i][j];\n l[i][j] = d[i][j] = 0;\n } else {\n d[i][j] = a[i][j];\n l[i][j] = u[i][j] = 0;\n }\n }\n }\n\n h = jStat.multiply(jStat.multiply(jStat.inv(jStat.add(d, l)), u), -1);\n c = jStat.multiply(jStat.inv(jStat.add(d, l)), b);\n xv = x;\n xk = jStat.add(jStat.multiply(h, x), c);\n i = 2;\n\n while (Math.abs(jStat.norm(jStat.subtract(xk, xv))) > r) {\n xv = xk;\n xk = jStat.add(jStat.multiply(h, xv), c);\n i = i + 1;\n }\n\n return xk;\n },\n SOR: function SOR(a, b, x, r, w) {\n var i = 0;\n var n = a.length;\n var l = [];\n var u = [];\n var d = [];\n var j, xv, c, h, xk;\n\n for (; i < n; i++) {\n l[i] = [];\n u[i] = [];\n d[i] = [];\n\n for (j = 0; j < n; j++) {\n if (i > j) {\n l[i][j] = a[i][j];\n u[i][j] = d[i][j] = 0;\n } else if (i < j) {\n u[i][j] = a[i][j];\n l[i][j] = d[i][j] = 0;\n } else {\n d[i][j] = a[i][j];\n l[i][j] = u[i][j] = 0;\n }\n }\n }\n\n h = jStat.multiply(jStat.inv(jStat.add(d, jStat.multiply(l, w))), jStat.subtract(jStat.multiply(d, 1 - w), jStat.multiply(u, w)));\n c = jStat.multiply(jStat.multiply(jStat.inv(jStat.add(d, jStat.multiply(l, w))), b), w);\n xv = x;\n xk = jStat.add(jStat.multiply(h, x), c);\n i = 2;\n\n while (Math.abs(jStat.norm(jStat.subtract(xk, xv))) > r) {\n xv = xk;\n xk = jStat.add(jStat.multiply(h, xv), c);\n i++;\n }\n\n return xk;\n },\n householder: function householder(a) {\n var m = a.length;\n var n = a[0].length;\n var i = 0;\n var w = [];\n var p = [];\n var alpha, r, k, j, factor;\n\n for (; i < m - 1; i++) {\n alpha = 0;\n\n for (j = i + 1; j < n; j++) {\n alpha += a[j][i] * a[j][i];\n }\n\n factor = a[i + 1][i] > 0 ? -1 : 1;\n alpha = factor * Math.sqrt(alpha);\n r = Math.sqrt((alpha * alpha - a[i + 1][i] * alpha) / 2);\n w = jStat.zeros(m, 1);\n w[i + 1][0] = (a[i + 1][i] - alpha) / (2 * r);\n\n for (k = i + 2; k < m; k++) {\n w[k][0] = a[k][i] / (2 * r);\n }\n\n p = jStat.subtract(jStat.identity(m, n), jStat.multiply(jStat.multiply(w, jStat.transpose(w)), 2));\n a = jStat.multiply(p, jStat.multiply(a, p));\n }\n\n return a;\n },\n // A -> [Q,R]\n // Q is orthogonal matrix\n // R is upper triangular\n QR: function () {\n // x -> Q\n // find a orthogonal matrix Q st.\n // Qx=y\n // y is [||x||,0,0,...]\n // quick ref\n var sum = jStat.sum;\n var range = jStat.arange;\n\n function qr2(x) {\n // quick impletation\n // https://www.stat.wisc.edu/~larget/math496/qr.html\n var n = x.length;\n var p = x[0].length;\n var r = jStat.zeros(p, p);\n x = jStat.copy(x);\n var i, j, k;\n\n for (j = 0; j < p; j++) {\n r[j][j] = Math.sqrt(sum(range(n).map(function (i) {\n return x[i][j] * x[i][j];\n })));\n\n for (i = 0; i < n; i++) {\n x[i][j] = x[i][j] / r[j][j];\n }\n\n for (k = j + 1; k < p; k++) {\n r[j][k] = sum(range(n).map(function (i) {\n return x[i][j] * x[i][k];\n }));\n\n for (i = 0; i < n; i++) {\n x[i][k] = x[i][k] - x[i][j] * r[j][k];\n }\n }\n }\n\n return [x, r];\n }\n\n return qr2;\n }(),\n lstsq: function () {\n // solve least squard problem for Ax=b as QR decomposition way if b is\n // [[b1],[b2],[b3]] form will return [[x1],[x2],[x3]] array form solution\n // else b is [b1,b2,b3] form will return [x1,x2,x3] array form solution\n function R_I(A) {\n A = jStat.copy(A);\n var size = A.length;\n var I = jStat.identity(size);\n jStat.arange(size - 1, -1, -1).forEach(function (i) {\n jStat.sliceAssign(I, {\n row: i\n }, jStat.divide(jStat.slice(I, {\n row: i\n }), A[i][i]));\n jStat.sliceAssign(A, {\n row: i\n }, jStat.divide(jStat.slice(A, {\n row: i\n }), A[i][i]));\n jStat.arange(i).forEach(function (j) {\n var c = jStat.multiply(A[j][i], -1);\n var Aj = jStat.slice(A, {\n row: j\n });\n var cAi = jStat.multiply(jStat.slice(A, {\n row: i\n }), c);\n jStat.sliceAssign(A, {\n row: j\n }, jStat.add(Aj, cAi));\n var Ij = jStat.slice(I, {\n row: j\n });\n var cIi = jStat.multiply(jStat.slice(I, {\n row: i\n }), c);\n jStat.sliceAssign(I, {\n row: j\n }, jStat.add(Ij, cIi));\n });\n });\n return I;\n }\n\n function qr_solve(A, b) {\n var array_mode = false;\n\n if (b[0].length === undefined) {\n // [c1,c2,c3] mode\n b = b.map(function (x) {\n return [x];\n });\n array_mode = true;\n }\n\n var QR = jStat.QR(A);\n var Q = QR[0];\n var R = QR[1];\n var attrs = A[0].length;\n var Q1 = jStat.slice(Q, {\n col: {\n end: attrs\n }\n });\n var R1 = jStat.slice(R, {\n row: {\n end: attrs\n }\n });\n var RI = R_I(R1);\n var Q2 = jStat.transpose(Q1);\n\n if (Q2[0].length === undefined) {\n Q2 = [Q2]; // The confusing jStat.multifly implementation threat nature process again.\n }\n\n var x = jStat.multiply(jStat.multiply(RI, Q2), b);\n\n if (x.length === undefined) {\n x = [[x]]; // The confusing jStat.multifly implementation threat nature process again.\n }\n\n if (array_mode) return x.map(function (i) {\n return i[0];\n });\n return x;\n }\n\n return qr_solve;\n }(),\n jacobi: function jacobi(a) {\n var condition = 1;\n var n = a.length;\n var e = jStat.identity(n, n);\n var ev = [];\n var b, i, j, p, q, maxim, theta, s; // condition === 1 only if tolerance is not reached\n\n while (condition === 1) {\n maxim = a[0][1];\n p = 0;\n q = 1;\n\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n if (i != j) {\n if (maxim < Math.abs(a[i][j])) {\n maxim = Math.abs(a[i][j]);\n p = i;\n q = j;\n }\n }\n }\n }\n\n if (a[p][p] === a[q][q]) theta = a[p][q] > 0 ? Math.PI / 4 : -Math.PI / 4;else theta = Math.atan(2 * a[p][q] / (a[p][p] - a[q][q])) / 2;\n s = jStat.identity(n, n);\n s[p][p] = Math.cos(theta);\n s[p][q] = -Math.sin(theta);\n s[q][p] = Math.sin(theta);\n s[q][q] = Math.cos(theta); // eigen vector matrix\n\n e = jStat.multiply(e, s);\n b = jStat.multiply(jStat.multiply(jStat.inv(s), a), s);\n a = b;\n condition = 0;\n\n for (i = 1; i < n; i++) {\n for (j = 1; j < n; j++) {\n if (i != j && Math.abs(a[i][j]) > 0.001) {\n condition = 1;\n }\n }\n }\n }\n\n for (i = 0; i < n; i++) {\n ev.push(a[i][i]);\n } //returns both the eigenvalue and eigenmatrix\n\n\n return [e, ev];\n },\n rungekutta: function rungekutta(f, h, p, t_j, u_j, order) {\n var k1, k2, u_j1, k3, k4;\n\n if (order === 2) {\n while (t_j <= p) {\n k1 = h * f(t_j, u_j);\n k2 = h * f(t_j + h, u_j + k1);\n u_j1 = u_j + (k1 + k2) / 2;\n u_j = u_j1;\n t_j = t_j + h;\n }\n }\n\n if (order === 4) {\n while (t_j <= p) {\n k1 = h * f(t_j, u_j);\n k2 = h * f(t_j + h / 2, u_j + k1 / 2);\n k3 = h * f(t_j + h / 2, u_j + k2 / 2);\n k4 = h * f(t_j + h, u_j + k3);\n u_j1 = u_j + (k1 + 2 * k2 + 2 * k3 + k4) / 6;\n u_j = u_j1;\n t_j = t_j + h;\n }\n }\n\n return u_j;\n },\n romberg: function romberg(f, a, b, order) {\n var i = 0;\n var h = (b - a) / 2;\n var x = [];\n var h1 = [];\n var g = [];\n var m, a1, j, k, I;\n\n while (i < order / 2) {\n I = f(a);\n\n for (j = a, k = 0; j <= b; j = j + h, k++) {\n x[k] = j;\n }\n\n m = x.length;\n\n for (j = 1; j < m - 1; j++) {\n I += (j % 2 !== 0 ? 4 : 2) * f(x[j]);\n }\n\n I = h / 3 * (I + f(b));\n g[i] = I;\n h /= 2;\n i++;\n }\n\n a1 = g.length;\n m = 1;\n\n while (a1 !== 1) {\n for (j = 0; j < a1 - 1; j++) {\n h1[j] = (Math.pow(4, m) * g[j + 1] - g[j]) / (Math.pow(4, m) - 1);\n }\n\n a1 = h1.length;\n g = h1;\n h1 = [];\n m++;\n }\n\n return g;\n },\n richardson: function richardson(X, f, x, h) {\n function pos(X, x) {\n var i = 0;\n var n = X.length;\n var p;\n\n for (; i < n; i++) {\n if (X[i] === x) p = i;\n }\n\n return p;\n }\n\n var h_min = Math.abs(x - X[pos(X, x) + 1]);\n var i = 0;\n var g = [];\n var h1 = [];\n var y1, y2, m, a, j;\n\n while (h >= h_min) {\n y1 = pos(X, x + h);\n y2 = pos(X, x);\n g[i] = (f[y1] - 2 * f[y2] + f[2 * y2 - y1]) / (h * h);\n h /= 2;\n i++;\n }\n\n a = g.length;\n m = 1;\n\n while (a != 1) {\n for (j = 0; j < a - 1; j++) {\n h1[j] = (Math.pow(4, m) * g[j + 1] - g[j]) / (Math.pow(4, m) - 1);\n }\n\n a = h1.length;\n g = h1;\n h1 = [];\n m++;\n }\n\n return g;\n },\n simpson: function simpson(f, a, b, n) {\n var h = (b - a) / n;\n var I = f(a);\n var x = [];\n var j = a;\n var k = 0;\n var i = 1;\n var m;\n\n for (; j <= b; j = j + h, k++) {\n x[k] = j;\n }\n\n m = x.length;\n\n for (; i < m - 1; i++) {\n I += (i % 2 !== 0 ? 4 : 2) * f(x[i]);\n }\n\n return h / 3 * (I + f(b));\n },\n hermite: function hermite(X, F, dF, value) {\n var n = X.length;\n var p = 0;\n var i = 0;\n var l = [];\n var dl = [];\n var A = [];\n var B = [];\n var j;\n\n for (; i < n; i++) {\n l[i] = 1;\n\n for (j = 0; j < n; j++) {\n if (i != j) l[i] *= (value - X[j]) / (X[i] - X[j]);\n }\n\n dl[i] = 0;\n\n for (j = 0; j < n; j++) {\n if (i != j) dl[i] += 1 / (X[i] - X[j]);\n }\n\n A[i] = (1 - 2 * (value - X[i]) * dl[i]) * (l[i] * l[i]);\n B[i] = (value - X[i]) * (l[i] * l[i]);\n p += A[i] * F[i] + B[i] * dF[i];\n }\n\n return p;\n },\n lagrange: function lagrange(X, F, value) {\n var p = 0;\n var i = 0;\n var j, l;\n var n = X.length;\n\n for (; i < n; i++) {\n l = F[i];\n\n for (j = 0; j < n; j++) {\n // calculating the lagrange polynomial L_i\n if (i != j) l *= (value - X[j]) / (X[i] - X[j]);\n } // adding the lagrange polynomials found above\n\n\n p += l;\n }\n\n return p;\n },\n cubic_spline: function cubic_spline(X, F, value) {\n var n = X.length;\n var i = 0,\n j;\n var A = [];\n var B = [];\n var alpha = [];\n var c = [];\n var h = [];\n var b = [];\n var d = [];\n\n for (; i < n - 1; i++) {\n h[i] = X[i + 1] - X[i];\n }\n\n alpha[0] = 0;\n\n for (i = 1; i < n - 1; i++) {\n alpha[i] = 3 / h[i] * (F[i + 1] - F[i]) - 3 / h[i - 1] * (F[i] - F[i - 1]);\n }\n\n for (i = 1; i < n - 1; i++) {\n A[i] = [];\n B[i] = [];\n A[i][i - 1] = h[i - 1];\n A[i][i] = 2 * (h[i - 1] + h[i]);\n A[i][i + 1] = h[i];\n B[i][0] = alpha[i];\n }\n\n c = jStat.multiply(jStat.inv(A), B);\n\n for (j = 0; j < n - 1; j++) {\n b[j] = (F[j + 1] - F[j]) / h[j] - h[j] * (c[j + 1][0] + 2 * c[j][0]) / 3;\n d[j] = (c[j + 1][0] - c[j][0]) / (3 * h[j]);\n }\n\n for (j = 0; j < n; j++) {\n if (X[j] > value) break;\n }\n\n j -= 1;\n return F[j] + (value - X[j]) * b[j] + jStat.sq(value - X[j]) * c[j] + (value - X[j]) * jStat.sq(value - X[j]) * d[j];\n },\n gauss_quadrature: function gauss_quadrature() {\n throw new Error('gauss_quadrature not yet implemented');\n },\n PCA: function PCA(X) {\n var m = X.length;\n var n = X[0].length;\n var i = 0;\n var j, temp1;\n var u = [];\n var D = [];\n var result = [];\n var temp2 = [];\n var Y = [];\n var Bt = [];\n var B = [];\n var C = [];\n var V = [];\n var Vt = [];\n\n for (i = 0; i < m; i++) {\n u[i] = jStat.sum(X[i]) / n;\n }\n\n for (i = 0; i < n; i++) {\n B[i] = [];\n\n for (j = 0; j < m; j++) {\n B[i][j] = X[j][i] - u[j];\n }\n }\n\n B = jStat.transpose(B);\n\n for (i = 0; i < m; i++) {\n C[i] = [];\n\n for (j = 0; j < m; j++) {\n C[i][j] = jStat.dot([B[i]], [B[j]]) / (n - 1);\n }\n }\n\n result = jStat.jacobi(C);\n V = result[0];\n D = result[1];\n Vt = jStat.transpose(V);\n\n for (i = 0; i < D.length; i++) {\n for (j = i; j < D.length; j++) {\n if (D[i] < D[j]) {\n temp1 = D[i];\n D[i] = D[j];\n D[j] = temp1;\n temp2 = Vt[i];\n Vt[i] = Vt[j];\n Vt[j] = temp2;\n }\n }\n }\n\n Bt = jStat.transpose(B);\n\n for (i = 0; i < m; i++) {\n Y[i] = [];\n\n for (j = 0; j < Bt.length; j++) {\n Y[i][j] = jStat.dot([Vt[i]], [Bt[j]]);\n }\n }\n\n return [X, D, Vt, Y];\n }\n }); // extend jStat.fn with methods that require one argument\n\n (function (funcs) {\n for (var i = 0; i < funcs.length; i++) {\n (function (passfunc) {\n jStat.fn[passfunc] = function (arg, func) {\n var tmpthis = this; // check for callback\n\n if (func) {\n setTimeout(function () {\n func.call(tmpthis, jStat.fn[passfunc].call(tmpthis, arg));\n }, 15);\n return this;\n }\n\n if (typeof jStat[passfunc](this, arg) === 'number') return jStat[passfunc](this, arg);else return jStat(jStat[passfunc](this, arg));\n };\n })(funcs[i]);\n }\n })('add divide multiply subtract dot pow exp log abs norm angle'.split(' '));\n })(jStat, Math);\n\n (function (jStat, Math) {\n var slice = [].slice;\n var isNumber = jStat.utils.isNumber;\n var isArray = jStat.utils.isArray; // flag==true denotes use of sample standard deviation\n // Z Statistics\n\n jStat.extend({\n // 2 different parameter lists:\n // (value, mean, sd)\n // (value, array, flag)\n zscore: function zscore() {\n var args = slice.call(arguments);\n\n if (isNumber(args[1])) {\n return (args[0] - args[1]) / args[2];\n }\n\n return (args[0] - jStat.mean(args[1])) / jStat.stdev(args[1], args[2]);\n },\n // 3 different paramter lists:\n // (value, mean, sd, sides)\n // (zscore, sides)\n // (value, array, sides, flag)\n ztest: function ztest() {\n var args = slice.call(arguments);\n var z;\n\n if (isArray(args[1])) {\n // (value, array, sides, flag)\n z = jStat.zscore(args[0], args[1], args[3]);\n return args[2] === 1 ? jStat.normal.cdf(-Math.abs(z), 0, 1) : jStat.normal.cdf(-Math.abs(z), 0, 1) * 2;\n } else {\n if (args.length > 2) {\n // (value, mean, sd, sides)\n z = jStat.zscore(args[0], args[1], args[2]);\n return args[3] === 1 ? jStat.normal.cdf(-Math.abs(z), 0, 1) : jStat.normal.cdf(-Math.abs(z), 0, 1) * 2;\n } else {\n // (zscore, sides)\n z = args[0];\n return args[1] === 1 ? jStat.normal.cdf(-Math.abs(z), 0, 1) : jStat.normal.cdf(-Math.abs(z), 0, 1) * 2;\n }\n }\n }\n });\n jStat.extend(jStat.fn, {\n zscore: function zscore(value, flag) {\n return (value - this.mean()) / this.stdev(flag);\n },\n ztest: function ztest(value, sides, flag) {\n var zscore = Math.abs(this.zscore(value, flag));\n return sides === 1 ? jStat.normal.cdf(-zscore, 0, 1) : jStat.normal.cdf(-zscore, 0, 1) * 2;\n }\n }); // T Statistics\n\n jStat.extend({\n // 2 parameter lists\n // (value, mean, sd, n)\n // (value, array)\n tscore: function tscore() {\n var args = slice.call(arguments);\n return args.length === 4 ? (args[0] - args[1]) / (args[2] / Math.sqrt(args[3])) : (args[0] - jStat.mean(args[1])) / (jStat.stdev(args[1], true) / Math.sqrt(args[1].length));\n },\n // 3 different paramter lists:\n // (value, mean, sd, n, sides)\n // (tscore, n, sides)\n // (value, array, sides)\n ttest: function ttest() {\n var args = slice.call(arguments);\n var tscore;\n\n if (args.length === 5) {\n tscore = Math.abs(jStat.tscore(args[0], args[1], args[2], args[3]));\n return args[4] === 1 ? jStat.studentt.cdf(-tscore, args[3] - 1) : jStat.studentt.cdf(-tscore, args[3] - 1) * 2;\n }\n\n if (isNumber(args[1])) {\n tscore = Math.abs(args[0]);\n return args[2] == 1 ? jStat.studentt.cdf(-tscore, args[1] - 1) : jStat.studentt.cdf(-tscore, args[1] - 1) * 2;\n }\n\n tscore = Math.abs(jStat.tscore(args[0], args[1]));\n return args[2] == 1 ? jStat.studentt.cdf(-tscore, args[1].length - 1) : jStat.studentt.cdf(-tscore, args[1].length - 1) * 2;\n }\n });\n jStat.extend(jStat.fn, {\n tscore: function tscore(value) {\n return (value - this.mean()) / (this.stdev(true) / Math.sqrt(this.cols()));\n },\n ttest: function ttest(value, sides) {\n return sides === 1 ? 1 - jStat.studentt.cdf(Math.abs(this.tscore(value)), this.cols() - 1) : jStat.studentt.cdf(-Math.abs(this.tscore(value)), this.cols() - 1) * 2;\n }\n }); // F Statistics\n\n jStat.extend({\n // Paramter list is as follows:\n // (array1, array2, array3, ...)\n // or it is an array of arrays\n // array of arrays conversion\n anovafscore: function anovafscore() {\n var args = slice.call(arguments),\n expVar,\n sample,\n sampMean,\n sampSampMean,\n tmpargs,\n unexpVar,\n i,\n j;\n\n if (args.length === 1) {\n tmpargs = new Array(args[0].length);\n\n for (i = 0; i < args[0].length; i++) {\n tmpargs[i] = args[0][i];\n }\n\n args = tmpargs;\n } // Builds sample array\n\n\n sample = new Array();\n\n for (i = 0; i < args.length; i++) {\n sample = sample.concat(args[i]);\n }\n\n sampMean = jStat.mean(sample); // Computes the explained variance\n\n expVar = 0;\n\n for (i = 0; i < args.length; i++) {\n expVar = expVar + args[i].length * Math.pow(jStat.mean(args[i]) - sampMean, 2);\n }\n\n expVar /= args.length - 1; // Computes unexplained variance\n\n unexpVar = 0;\n\n for (i = 0; i < args.length; i++) {\n sampSampMean = jStat.mean(args[i]);\n\n for (j = 0; j < args[i].length; j++) {\n unexpVar += Math.pow(args[i][j] - sampSampMean, 2);\n }\n }\n\n unexpVar /= sample.length - args.length;\n return expVar / unexpVar;\n },\n // 2 different paramter setups\n // (array1, array2, array3, ...)\n // (anovafscore, df1, df2)\n anovaftest: function anovaftest() {\n var args = slice.call(arguments),\n df1,\n df2,\n n,\n i;\n\n if (isNumber(args[0])) {\n return 1 - jStat.centralF.cdf(args[0], args[1], args[2]);\n }\n\n var anovafscore = jStat.anovafscore(args);\n df1 = args.length - 1;\n n = 0;\n\n for (i = 0; i < args.length; i++) {\n n = n + args[i].length;\n }\n\n df2 = n - df1 - 1;\n return 1 - jStat.centralF.cdf(anovafscore, df1, df2);\n },\n ftest: function ftest(fscore, df1, df2) {\n return 1 - jStat.centralF.cdf(fscore, df1, df2);\n }\n });\n jStat.extend(jStat.fn, {\n anovafscore: function anovafscore() {\n return jStat.anovafscore(this.toArray());\n },\n anovaftes: function anovaftes() {\n var n = 0;\n var i;\n\n for (i = 0; i < this.length; i++) {\n n = n + this[i].length;\n }\n\n return jStat.ftest(this.anovafscore(), this.length - 1, n - this.length);\n }\n }); // Tukey's range test\n\n jStat.extend({\n // 2 parameter lists\n // (mean1, mean2, n1, n2, sd)\n // (array1, array2, sd)\n qscore: function qscore() {\n var args = slice.call(arguments);\n var mean1, mean2, n1, n2, sd;\n\n if (isNumber(args[0])) {\n mean1 = args[0];\n mean2 = args[1];\n n1 = args[2];\n n2 = args[3];\n sd = args[4];\n } else {\n mean1 = jStat.mean(args[0]);\n mean2 = jStat.mean(args[1]);\n n1 = args[0].length;\n n2 = args[1].length;\n sd = args[2];\n }\n\n return Math.abs(mean1 - mean2) / (sd * Math.sqrt((1 / n1 + 1 / n2) / 2));\n },\n // 3 different parameter lists:\n // (qscore, n, k)\n // (mean1, mean2, n1, n2, sd, n, k)\n // (array1, array2, sd, n, k)\n qtest: function qtest() {\n var args = slice.call(arguments);\n var qscore;\n\n if (args.length === 3) {\n qscore = args[0];\n args = args.slice(1);\n } else if (args.length === 7) {\n qscore = jStat.qscore(args[0], args[1], args[2], args[3], args[4]);\n args = args.slice(5);\n } else {\n qscore = jStat.qscore(args[0], args[1], args[2]);\n args = args.slice(3);\n }\n\n var n = args[0];\n var k = args[1];\n return 1 - jStat.tukey.cdf(qscore, k, n - k);\n },\n tukeyhsd: function tukeyhsd(arrays) {\n var sd = jStat.pooledstdev(arrays);\n var means = arrays.map(function (arr) {\n return jStat.mean(arr);\n });\n var n = arrays.reduce(function (n, arr) {\n return n + arr.length;\n }, 0);\n var results = [];\n\n for (var i = 0; i < arrays.length; ++i) {\n for (var j = i + 1; j < arrays.length; ++j) {\n var p = jStat.qtest(means[i], means[j], arrays[i].length, arrays[j].length, sd, n, arrays.length);\n results.push([[i, j], p]);\n }\n }\n\n return results;\n }\n }); // Error Bounds\n\n jStat.extend({\n // 2 different parameter setups\n // (value, alpha, sd, n)\n // (value, alpha, array)\n normalci: function normalci() {\n var args = slice.call(arguments),\n ans = new Array(2),\n change;\n\n if (args.length === 4) {\n change = Math.abs(jStat.normal.inv(args[1] / 2, 0, 1) * args[2] / Math.sqrt(args[3]));\n } else {\n change = Math.abs(jStat.normal.inv(args[1] / 2, 0, 1) * jStat.stdev(args[2]) / Math.sqrt(args[2].length));\n }\n\n ans[0] = args[0] - change;\n ans[1] = args[0] + change;\n return ans;\n },\n // 2 different parameter setups\n // (value, alpha, sd, n)\n // (value, alpha, array)\n tci: function tci() {\n var args = slice.call(arguments),\n ans = new Array(2),\n change;\n\n if (args.length === 4) {\n change = Math.abs(jStat.studentt.inv(args[1] / 2, args[3] - 1) * args[2] / Math.sqrt(args[3]));\n } else {\n change = Math.abs(jStat.studentt.inv(args[1] / 2, args[2].length - 1) * jStat.stdev(args[2], true) / Math.sqrt(args[2].length));\n }\n\n ans[0] = args[0] - change;\n ans[1] = args[0] + change;\n return ans;\n },\n significant: function significant(pvalue, alpha) {\n return pvalue < alpha;\n }\n });\n jStat.extend(jStat.fn, {\n normalci: function normalci(value, alpha) {\n return jStat.normalci(value, alpha, this.toArray());\n },\n tci: function tci(value, alpha) {\n return jStat.tci(value, alpha, this.toArray());\n }\n }); // internal method for calculating the z-score for a difference of proportions test\n\n function differenceOfProportions(p1, n1, p2, n2) {\n if (p1 > 1 || p2 > 1 || p1 <= 0 || p2 <= 0) {\n throw new Error(\"Proportions should be greater than 0 and less than 1\");\n }\n\n var pooled = (p1 * n1 + p2 * n2) / (n1 + n2);\n var se = Math.sqrt(pooled * (1 - pooled) * (1 / n1 + 1 / n2));\n return (p1 - p2) / se;\n } // Difference of Proportions\n\n\n jStat.extend(jStat.fn, {\n oneSidedDifferenceOfProportions: function oneSidedDifferenceOfProportions(p1, n1, p2, n2) {\n var z = differenceOfProportions(p1, n1, p2, n2);\n return jStat.ztest(z, 1);\n },\n twoSidedDifferenceOfProportions: function twoSidedDifferenceOfProportions(p1, n1, p2, n2) {\n var z = differenceOfProportions(p1, n1, p2, n2);\n return jStat.ztest(z, 2);\n }\n });\n })(jStat, Math);\n\n jStat.models = function () {\n function sub_regress(exog) {\n var var_count = exog[0].length;\n var modelList = jStat.arange(var_count).map(function (endog_index) {\n var exog_index = jStat.arange(var_count).filter(function (i) {\n return i !== endog_index;\n });\n return ols(jStat.col(exog, endog_index).map(function (x) {\n return x[0];\n }), jStat.col(exog, exog_index));\n });\n return modelList;\n } // do OLS model regress\n // exog have include const columns ,it will not generate it .In fact, exog is\n // \"design matrix\" look at\n //https://en.wikipedia.org/wiki/Design_matrix\n\n\n function ols(endog, exog) {\n var nobs = endog.length;\n var df_model = exog[0].length - 1;\n var df_resid = nobs - df_model - 1;\n var coef = jStat.lstsq(exog, endog);\n var predict = jStat.multiply(exog, coef.map(function (x) {\n return [x];\n })).map(function (p) {\n return p[0];\n });\n var resid = jStat.subtract(endog, predict);\n var ybar = jStat.mean(endog); // constant cause problem\n // var SST = jStat.sum(endog.map(function(y) {\n // return Math.pow(y-ybar,2);\n // }));\n\n var SSE = jStat.sum(predict.map(function (f) {\n return Math.pow(f - ybar, 2);\n }));\n var SSR = jStat.sum(endog.map(function (y, i) {\n return Math.pow(y - predict[i], 2);\n }));\n var SST = SSE + SSR;\n var R2 = SSE / SST;\n return {\n exog: exog,\n endog: endog,\n nobs: nobs,\n df_model: df_model,\n df_resid: df_resid,\n coef: coef,\n predict: predict,\n resid: resid,\n ybar: ybar,\n SST: SST,\n SSE: SSE,\n SSR: SSR,\n R2: R2\n };\n } // H0: b_I=0\n // H1: b_I!=0\n\n\n function t_test(model) {\n var subModelList = sub_regress(model.exog); //var sigmaHat=jStat.stdev(model.resid);\n\n var sigmaHat = Math.sqrt(model.SSR / model.df_resid);\n var seBetaHat = subModelList.map(function (mod) {\n var SST = mod.SST;\n var R2 = mod.R2;\n return sigmaHat / Math.sqrt(SST * (1 - R2));\n });\n var tStatistic = model.coef.map(function (coef, i) {\n return (coef - 0) / seBetaHat[i];\n });\n var pValue = tStatistic.map(function (t) {\n var leftppf = jStat.studentt.cdf(t, model.df_resid);\n return (leftppf > 0.5 ? 1 - leftppf : leftppf) * 2;\n });\n var c = jStat.studentt.inv(0.975, model.df_resid);\n var interval95 = model.coef.map(function (coef, i) {\n var d = c * seBetaHat[i];\n return [coef - d, coef + d];\n });\n return {\n se: seBetaHat,\n t: tStatistic,\n p: pValue,\n sigmaHat: sigmaHat,\n interval95: interval95\n };\n }\n\n function F_test(model) {\n var F_statistic = model.R2 / model.df_model / ((1 - model.R2) / model.df_resid);\n\n var fcdf = function fcdf(x, n1, n2) {\n return jStat.beta.cdf(x / (n2 / n1 + x), n1 / 2, n2 / 2);\n };\n\n var pvalue = 1 - fcdf(F_statistic, model.df_model, model.df_resid);\n return {\n F_statistic: F_statistic,\n pvalue: pvalue\n };\n }\n\n function ols_wrap(endog, exog) {\n var model = ols(endog, exog);\n var ttest = t_test(model);\n var ftest = F_test(model); // Provide the Wherry / Ezekiel / McNemar / Cohen Adjusted R^2\n // Which matches the 'adjusted R^2' provided by R's lm package\n\n var adjust_R2 = 1 - (1 - model.R2) * ((model.nobs - 1) / model.df_resid);\n model.t = ttest;\n model.f = ftest;\n model.adjust_R2 = adjust_R2;\n return model;\n }\n\n return {\n ols: ols_wrap\n };\n }(); //To regress, simply build X matrix\n //(append column of 1's) using\n //buildxmatrix and build the Y\n //matrix using buildymatrix\n //(simply the transpose)\n //and run regress.\n //Regressions\n\n\n jStat.extend({\n buildxmatrix: function buildxmatrix() {\n //Parameters will be passed in as such\n //(array1,array2,array3,...)\n //as (x1,x2,x3,...)\n //needs to be (1,x1,x2,x3,...)\n var matrixRows = new Array(arguments.length);\n\n for (var i = 0; i < arguments.length; i++) {\n var array = [1];\n matrixRows[i] = array.concat(arguments[i]);\n }\n\n return jStat(matrixRows);\n },\n builddxmatrix: function builddxmatrix() {\n //Paramters will be passed in as such\n //([array1,array2,...]\n var matrixRows = new Array(arguments[0].length);\n\n for (var i = 0; i < arguments[0].length; i++) {\n var array = [1];\n matrixRows[i] = array.concat(arguments[0][i]);\n }\n\n return jStat(matrixRows);\n },\n buildjxmatrix: function buildjxmatrix(jMat) {\n //Builds from jStat Matrix\n var pass = new Array(jMat.length);\n\n for (var i = 0; i < jMat.length; i++) {\n pass[i] = jMat[i];\n }\n\n return jStat.builddxmatrix(pass);\n },\n buildymatrix: function buildymatrix(array) {\n return jStat(array).transpose();\n },\n buildjymatrix: function buildjymatrix(jMat) {\n return jMat.transpose();\n },\n matrixmult: function matrixmult(A, B) {\n var i, j, k, result, sum;\n\n if (A.cols() == B.rows()) {\n if (B.rows() > 1) {\n result = [];\n\n for (i = 0; i < A.rows(); i++) {\n result[i] = [];\n\n for (j = 0; j < B.cols(); j++) {\n sum = 0;\n\n for (k = 0; k < A.cols(); k++) {\n sum += A.toArray()[i][k] * B.toArray()[k][j];\n }\n\n result[i][j] = sum;\n }\n }\n\n return jStat(result);\n }\n\n result = [];\n\n for (i = 0; i < A.rows(); i++) {\n result[i] = [];\n\n for (j = 0; j < B.cols(); j++) {\n sum = 0;\n\n for (k = 0; k < A.cols(); k++) {\n sum += A.toArray()[i][k] * B.toArray()[j];\n }\n\n result[i][j] = sum;\n }\n }\n\n return jStat(result);\n }\n },\n //regress and regresst to be fixed\n regress: function regress(jMatX, jMatY) {\n //print(\"regressin!\");\n //print(jMatX.toArray());\n var innerinv = jStat.xtranspxinv(jMatX); //print(innerinv);\n\n var xtransp = jMatX.transpose();\n var next = jStat.matrixmult(jStat(innerinv), xtransp);\n return jStat.matrixmult(next, jMatY);\n },\n regresst: function regresst(jMatX, jMatY, sides) {\n var beta = jStat.regress(jMatX, jMatY);\n var compile = {};\n compile.anova = {};\n var jMatYBar = jStat.jMatYBar(jMatX, beta);\n compile.yBar = jMatYBar;\n var yAverage = jMatY.mean();\n compile.anova.residuals = jStat.residuals(jMatY, jMatYBar);\n compile.anova.ssr = jStat.ssr(jMatYBar, yAverage);\n compile.anova.msr = compile.anova.ssr / (jMatX[0].length - 1);\n compile.anova.sse = jStat.sse(jMatY, jMatYBar);\n compile.anova.mse = compile.anova.sse / (jMatY.length - (jMatX[0].length - 1) - 1);\n compile.anova.sst = jStat.sst(jMatY, yAverage);\n compile.anova.mst = compile.anova.sst / (jMatY.length - 1);\n compile.anova.r2 = 1 - compile.anova.sse / compile.anova.sst;\n if (compile.anova.r2 < 0) compile.anova.r2 = 0;\n compile.anova.fratio = compile.anova.msr / compile.anova.mse;\n compile.anova.pvalue = jStat.anovaftest(compile.anova.fratio, jMatX[0].length - 1, jMatY.length - (jMatX[0].length - 1) - 1);\n compile.anova.rmse = Math.sqrt(compile.anova.mse);\n compile.anova.r2adj = 1 - compile.anova.mse / compile.anova.mst;\n if (compile.anova.r2adj < 0) compile.anova.r2adj = 0;\n compile.stats = new Array(jMatX[0].length);\n var covar = jStat.xtranspxinv(jMatX);\n var sds, ts, ps;\n\n for (var i = 0; i < beta.length; i++) {\n sds = Math.sqrt(compile.anova.mse * Math.abs(covar[i][i]));\n ts = Math.abs(beta[i] / sds);\n ps = jStat.ttest(ts, jMatY.length - jMatX[0].length - 1, sides);\n compile.stats[i] = [beta[i], sds, ts, ps];\n }\n\n compile.regress = beta;\n return compile;\n },\n xtranspx: function xtranspx(jMatX) {\n return jStat.matrixmult(jMatX.transpose(), jMatX);\n },\n xtranspxinv: function xtranspxinv(jMatX) {\n var inner = jStat.matrixmult(jMatX.transpose(), jMatX);\n var innerinv = jStat.inv(inner);\n return innerinv;\n },\n jMatYBar: function jMatYBar(jMatX, beta) {\n var yBar = jStat.matrixmult(jMatX, beta);\n return new jStat(yBar);\n },\n residuals: function residuals(jMatY, jMatYBar) {\n return jStat.matrixsubtract(jMatY, jMatYBar);\n },\n ssr: function ssr(jMatYBar, yAverage) {\n var ssr = 0;\n\n for (var i = 0; i < jMatYBar.length; i++) {\n ssr += Math.pow(jMatYBar[i] - yAverage, 2);\n }\n\n return ssr;\n },\n sse: function sse(jMatY, jMatYBar) {\n var sse = 0;\n\n for (var i = 0; i < jMatY.length; i++) {\n sse += Math.pow(jMatY[i] - jMatYBar[i], 2);\n }\n\n return sse;\n },\n sst: function sst(jMatY, yAverage) {\n var sst = 0;\n\n for (var i = 0; i < jMatY.length; i++) {\n sst += Math.pow(jMatY[i] - yAverage, 2);\n }\n\n return sst;\n },\n matrixsubtract: function matrixsubtract(A, B) {\n var ans = new Array(A.length);\n\n for (var i = 0; i < A.length; i++) {\n ans[i] = new Array(A[i].length);\n\n for (var j = 0; j < A[i].length; j++) {\n ans[i][j] = A[i][j] - B[i][j];\n }\n }\n\n return jStat(ans);\n }\n }); // Make it compatible with previous version.\n\n jStat.jStat = jStat;\n return jStat;\n});","var utils = require(\"./utils/common\");\n\nvar error = require(\"./utils/error\");\n\nexports.UNIQUE = function () {\n var result = [];\n\n for (var i = 0; i < arguments.length; ++i) {\n var hasElement = false;\n var element = arguments[i]; // Check if we've already seen this element.\n\n for (var j = 0; j < result.length; ++j) {\n hasElement = result[j] === element;\n\n if (hasElement) {\n break;\n }\n } // If we did not find it, add it to the result.\n\n\n if (!hasElement) {\n result.push(element);\n }\n }\n\n return result;\n};\n\nexports.FLATTEN = utils.flatten;\n\nexports.ARGS2ARRAY = function () {\n return Array.prototype.slice.call(arguments, 0);\n};\n\nexports.REFERENCE = function (context, reference) {\n if (!arguments.length) {\n return error.error;\n }\n\n try {\n var path = reference.split('.');\n var result = context;\n\n for (var i = 0; i < path.length; ++i) {\n var step = path[i];\n\n if (step[step.length - 1] === ']') {\n var opening = step.indexOf('[');\n var index = step.substring(opening + 1, step.length - 1);\n result = result[step.substring(0, opening)][index];\n } else {\n result = result[step];\n }\n }\n\n return result;\n } catch (error) {}\n};\n\nexports.JOIN = function (array, separator) {\n return array.join(separator);\n};\n\nexports.NUMBERS = function () {\n var possibleNumbers = utils.flatten(arguments);\n return possibleNumbers.filter(function (el) {\n return typeof el === 'number';\n });\n};","var error = require(\"./utils/error\");\n\nvar jStat = require('jstat');\n\nvar text = require(\"./text\");\n\nvar utils = require(\"./utils/common\");\n\nvar bessel = require('bessel');\n\nfunction isValidBinaryNumber(number) {\n return /^[01]{1,10}$/.test(number);\n}\n\nexports.BESSELI = function (x, n) {\n x = utils.parseNumber(x);\n n = utils.parseNumber(n);\n\n if (utils.anyIsError(x, n)) {\n return error.value;\n }\n\n return bessel.besseli(x, n);\n};\n\nexports.BESSELJ = function (x, n) {\n x = utils.parseNumber(x);\n n = utils.parseNumber(n);\n\n if (utils.anyIsError(x, n)) {\n return error.value;\n }\n\n return bessel.besselj(x, n);\n};\n\nexports.BESSELK = function (x, n) {\n x = utils.parseNumber(x);\n n = utils.parseNumber(n);\n\n if (utils.anyIsError(x, n)) {\n return error.value;\n }\n\n return bessel.besselk(x, n);\n};\n\nexports.BESSELY = function (x, n) {\n x = utils.parseNumber(x);\n n = utils.parseNumber(n);\n\n if (utils.anyIsError(x, n)) {\n return error.value;\n }\n\n return bessel.bessely(x, n);\n};\n\nexports.BIN2DEC = function (number) {\n // Return error if number is not binary or contains more than 10 characters (10 digits)\n if (!isValidBinaryNumber(number)) {\n return error.num;\n } // Convert binary number to decimal\n\n\n var result = parseInt(number, 2); // Handle negative numbers\n\n var stringified = number.toString();\n\n if (stringified.length === 10 && stringified.substring(0, 1) === '1') {\n return parseInt(stringified.substring(1), 2) - 512;\n } else {\n return result;\n }\n};\n\nexports.BIN2HEX = function (number, places) {\n // Return error if number is not binary or contains more than 10 characters (10 digits)\n if (!isValidBinaryNumber(number)) {\n return error.num;\n } // Ignore places and return a 10-character hexadecimal number if number is negative\n\n\n var stringified = number.toString();\n\n if (stringified.length === 10 && stringified.substring(0, 1) === '1') {\n return (1099511627264 + parseInt(stringified.substring(1), 2)).toString(16);\n } // Convert binary number to hexadecimal\n\n\n var result = parseInt(number, 2).toString(16); // Return hexadecimal number using the minimum number of characters necessary if places is undefined\n\n if (places === undefined) {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};\n\nexports.BIN2OCT = function (number, places) {\n // Return error if number is not binary or contains more than 10 characters (10 digits)\n if (!isValidBinaryNumber(number)) {\n return error.num;\n } // Ignore places and return a 10-character octal number if number is negative\n\n\n var stringified = number.toString();\n\n if (stringified.length === 10 && stringified.substring(0, 1) === '1') {\n return (1073741312 + parseInt(stringified.substring(1), 2)).toString(8);\n } // Convert binary number to octal\n\n\n var result = parseInt(number, 2).toString(8); // Return octal number using the minimum number of characters necessary if places is undefined\n\n if (places === undefined) {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};\n\nexports.BITAND = function (number1, number2) {\n // Return error if either number is a non-numeric value\n number1 = utils.parseNumber(number1);\n number2 = utils.parseNumber(number2);\n\n if (utils.anyIsError(number1, number2)) {\n return error.value;\n } // Return error if either number is less than 0\n\n\n if (number1 < 0 || number2 < 0) {\n return error.num;\n } // Return error if either number is a non-integer\n\n\n if (Math.floor(number1) !== number1 || Math.floor(number2) !== number2) {\n return error.num;\n } // Return error if either number is greater than (2^48)-1\n\n\n if (number1 > 281474976710655 || number2 > 281474976710655) {\n return error.num;\n } // Return bitwise AND of two numbers\n\n\n return number1 & number2;\n};\n\nexports.BITLSHIFT = function (number, shift) {\n number = utils.parseNumber(number);\n shift = utils.parseNumber(shift);\n\n if (utils.anyIsError(number, shift)) {\n return error.value;\n } // Return error if number is less than 0\n\n\n if (number < 0) {\n return error.num;\n } // Return error if number is a non-integer\n\n\n if (Math.floor(number) !== number) {\n return error.num;\n } // Return error if number is greater than (2^48)-1\n\n\n if (number > 281474976710655) {\n return error.num;\n } // Return error if the absolute value of shift is greater than 53\n\n\n if (Math.abs(shift) > 53) {\n return error.num;\n } // Return number shifted by shift bits to the left or to the right if shift is negative\n\n\n return shift >= 0 ? number << shift : number >> -shift;\n};\n\nexports.BITOR = function (number1, number2) {\n number1 = utils.parseNumber(number1);\n number2 = utils.parseNumber(number2);\n\n if (utils.anyIsError(number1, number2)) {\n return error.value;\n } // Return error if either number is less than 0\n\n\n if (number1 < 0 || number2 < 0) {\n return error.num;\n } // Return error if either number is a non-integer\n\n\n if (Math.floor(number1) !== number1 || Math.floor(number2) !== number2) {\n return error.num;\n } // Return error if either number is greater than (2^48)-1\n\n\n if (number1 > 281474976710655 || number2 > 281474976710655) {\n return error.num;\n } // Return bitwise OR of two numbers\n\n\n return number1 | number2;\n};\n\nexports.BITRSHIFT = function (number, shift) {\n number = utils.parseNumber(number);\n shift = utils.parseNumber(shift);\n\n if (utils.anyIsError(number, shift)) {\n return error.value;\n } // Return error if number is less than 0\n\n\n if (number < 0) {\n return error.num;\n } // Return error if number is a non-integer\n\n\n if (Math.floor(number) !== number) {\n return error.num;\n } // Return error if number is greater than (2^48)-1\n\n\n if (number > 281474976710655) {\n return error.num;\n } // Return error if the absolute value of shift is greater than 53\n\n\n if (Math.abs(shift) > 53) {\n return error.num;\n } // Return number shifted by shift bits to the right or to the left if shift is negative\n\n\n return shift >= 0 ? number >> shift : number << -shift;\n};\n\nexports.BITXOR = function (number1, number2) {\n number1 = utils.parseNumber(number1);\n number2 = utils.parseNumber(number2);\n\n if (utils.anyIsError(number1, number2)) {\n return error.value;\n } // Return error if either number is less than 0\n\n\n if (number1 < 0 || number2 < 0) {\n return error.num;\n } // Return error if either number is a non-integer\n\n\n if (Math.floor(number1) !== number1 || Math.floor(number2) !== number2) {\n return error.num;\n } // Return error if either number is greater than (2^48)-1\n\n\n if (number1 > 281474976710655 || number2 > 281474976710655) {\n return error.num;\n } // Return bitwise XOR of two numbers\n\n\n return number1 ^ number2;\n};\n\nexports.COMPLEX = function (real, imaginary, suffix) {\n real = utils.parseNumber(real);\n imaginary = utils.parseNumber(imaginary);\n\n if (utils.anyIsError(real, imaginary)) {\n return real;\n } // Set suffix\n\n\n suffix = suffix === undefined ? 'i' : suffix; // Return error if suffix is neither \"i\" nor \"j\"\n\n if (suffix !== 'i' && suffix !== 'j') {\n return error.value;\n } // Return complex number\n\n\n if (real === 0 && imaginary === 0) {\n return 0;\n } else if (real === 0) {\n return imaginary === 1 ? suffix : imaginary.toString() + suffix;\n } else if (imaginary === 0) {\n return real.toString();\n } else {\n var sign = imaginary > 0 ? '+' : '';\n return real.toString() + sign + (imaginary === 1 ? suffix : imaginary.toString() + suffix);\n }\n};\n\nexports.CONVERT = function (number, from_unit, to_unit) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n } // List of units supported by CONVERT and units defined by the International System of Units\n // [Name, Symbol, Alternate symbols, Quantity, ISU, CONVERT, Conversion ratio]\n\n\n var units = [[\"a.u. of action\", \"?\", null, \"action\", false, false, 1.05457168181818e-34], [\"a.u. of charge\", \"e\", null, \"electric_charge\", false, false, 1.60217653141414e-19], [\"a.u. of energy\", \"Eh\", null, \"energy\", false, false, 4.35974417757576e-18], [\"a.u. of length\", \"a?\", null, \"length\", false, false, 5.29177210818182e-11], [\"a.u. of mass\", \"m?\", null, \"mass\", false, false, 9.10938261616162e-31], [\"a.u. of time\", \"?/Eh\", null, \"time\", false, false, 2.41888432650516e-17], [\"admiralty knot\", \"admkn\", null, \"speed\", false, true, 0.514773333], [\"ampere\", \"A\", null, \"electric_current\", true, false, 1], [\"ampere per meter\", \"A/m\", null, \"magnetic_field_intensity\", true, false, 1], [\"ångström\", \"Å\", [\"ang\"], \"length\", false, true, 1e-10], [\"are\", \"ar\", null, \"area\", false, true, 100], [\"astronomical unit\", \"ua\", null, \"length\", false, false, 1.49597870691667e-11], [\"bar\", \"bar\", null, \"pressure\", false, false, 100000], [\"barn\", \"b\", null, \"area\", false, false, 1e-28], [\"becquerel\", \"Bq\", null, \"radioactivity\", true, false, 1], [\"bit\", \"bit\", [\"b\"], \"information\", false, true, 1], [\"btu\", \"BTU\", [\"btu\"], \"energy\", false, true, 1055.05585262], [\"byte\", \"byte\", null, \"information\", false, true, 8], [\"candela\", \"cd\", null, \"luminous_intensity\", true, false, 1], [\"candela per square metre\", \"cd/m?\", null, \"luminance\", true, false, 1], [\"coulomb\", \"C\", null, \"electric_charge\", true, false, 1], [\"cubic ångström\", \"ang3\", [\"ang^3\"], \"volume\", false, true, 1e-30], [\"cubic foot\", \"ft3\", [\"ft^3\"], \"volume\", false, true, 0.028316846592], [\"cubic inch\", \"in3\", [\"in^3\"], \"volume\", false, true, 0.000016387064], [\"cubic light-year\", \"ly3\", [\"ly^3\"], \"volume\", false, true, 8.46786664623715e-47], [\"cubic metre\", \"m?\", null, \"volume\", true, true, 1], [\"cubic mile\", \"mi3\", [\"mi^3\"], \"volume\", false, true, 4168181825.44058], [\"cubic nautical mile\", \"Nmi3\", [\"Nmi^3\"], \"volume\", false, true, 6352182208], [\"cubic Pica\", \"Pica3\", [\"Picapt3\", \"Pica^3\", \"Picapt^3\"], \"volume\", false, true, 7.58660370370369e-8], [\"cubic yard\", \"yd3\", [\"yd^3\"], \"volume\", false, true, 0.764554857984], [\"cup\", \"cup\", null, \"volume\", false, true, 0.0002365882365], [\"dalton\", \"Da\", [\"u\"], \"mass\", false, false, 1.66053886282828e-27], [\"day\", \"d\", [\"day\"], \"time\", false, true, 86400], [\"degree\", \"°\", null, \"angle\", false, false, 0.0174532925199433], [\"degrees Rankine\", \"Rank\", null, \"temperature\", false, true, 0.555555555555556], [\"dyne\", \"dyn\", [\"dy\"], \"force\", false, true, 0.00001], [\"electronvolt\", \"eV\", [\"ev\"], \"energy\", false, true, 1.60217656514141], [\"ell\", \"ell\", null, \"length\", false, true, 1.143], [\"erg\", \"erg\", [\"e\"], \"energy\", false, true, 1e-7], [\"farad\", \"F\", null, \"electric_capacitance\", true, false, 1], [\"fluid ounce\", \"oz\", null, \"volume\", false, true, 0.0000295735295625], [\"foot\", \"ft\", null, \"length\", false, true, 0.3048], [\"foot-pound\", \"flb\", null, \"energy\", false, true, 1.3558179483314], [\"gal\", \"Gal\", null, \"acceleration\", false, false, 0.01], [\"gallon\", \"gal\", null, \"volume\", false, true, 0.003785411784], [\"gauss\", \"G\", [\"ga\"], \"magnetic_flux_density\", false, true, 1], [\"grain\", \"grain\", null, \"mass\", false, true, 0.0000647989], [\"gram\", \"g\", null, \"mass\", false, true, 0.001], [\"gray\", \"Gy\", null, \"absorbed_dose\", true, false, 1], [\"gross registered ton\", \"GRT\", [\"regton\"], \"volume\", false, true, 2.8316846592], [\"hectare\", \"ha\", null, \"area\", false, true, 10000], [\"henry\", \"H\", null, \"inductance\", true, false, 1], [\"hertz\", \"Hz\", null, \"frequency\", true, false, 1], [\"horsepower\", \"HP\", [\"h\"], \"power\", false, true, 745.69987158227], [\"horsepower-hour\", \"HPh\", [\"hh\", \"hph\"], \"energy\", false, true, 2684519.538], [\"hour\", \"h\", [\"hr\"], \"time\", false, true, 3600], [\"imperial gallon (U.K.)\", \"uk_gal\", null, \"volume\", false, true, 0.00454609], [\"imperial hundredweight\", \"lcwt\", [\"uk_cwt\", \"hweight\"], \"mass\", false, true, 50.802345], [\"imperial quart (U.K)\", \"uk_qt\", null, \"volume\", false, true, 0.0011365225], [\"imperial ton\", \"brton\", [\"uk_ton\", \"LTON\"], \"mass\", false, true, 1016.046909], [\"inch\", \"in\", null, \"length\", false, true, 0.0254], [\"international acre\", \"uk_acre\", null, \"area\", false, true, 4046.8564224], [\"IT calorie\", \"cal\", null, \"energy\", false, true, 4.1868], [\"joule\", \"J\", null, \"energy\", true, true, 1], [\"katal\", \"kat\", null, \"catalytic_activity\", true, false, 1], [\"kelvin\", \"K\", [\"kel\"], \"temperature\", true, true, 1], [\"kilogram\", \"kg\", null, \"mass\", true, true, 1], [\"knot\", \"kn\", null, \"speed\", false, true, 0.514444444444444], [\"light-year\", \"ly\", null, \"length\", false, true, 9460730472580800], [\"litre\", \"L\", [\"l\", \"lt\"], \"volume\", false, true, 0.001], [\"lumen\", \"lm\", null, \"luminous_flux\", true, false, 1], [\"lux\", \"lx\", null, \"illuminance\", true, false, 1], [\"maxwell\", \"Mx\", null, \"magnetic_flux\", false, false, 1e-18], [\"measurement ton\", \"MTON\", null, \"volume\", false, true, 1.13267386368], [\"meter per hour\", \"m/h\", [\"m/hr\"], \"speed\", false, true, 0.00027777777777778], [\"meter per second\", \"m/s\", [\"m/sec\"], \"speed\", true, true, 1], [\"meter per second squared\", \"m?s??\", null, \"acceleration\", true, false, 1], [\"parsec\", \"pc\", [\"parsec\"], \"length\", false, true, 30856775814671900], [\"meter squared per second\", \"m?/s\", null, \"kinematic_viscosity\", true, false, 1], [\"metre\", \"m\", null, \"length\", true, true, 1], [\"miles per hour\", \"mph\", null, \"speed\", false, true, 0.44704], [\"millimetre of mercury\", \"mmHg\", null, \"pressure\", false, false, 133.322], [\"minute\", \"?\", null, \"angle\", false, false, 0.000290888208665722], [\"minute\", \"min\", [\"mn\"], \"time\", false, true, 60], [\"modern teaspoon\", \"tspm\", null, \"volume\", false, true, 0.000005], [\"mole\", \"mol\", null, \"amount_of_substance\", true, false, 1], [\"morgen\", \"Morgen\", null, \"area\", false, true, 2500], [\"n.u. of action\", \"?\", null, \"action\", false, false, 1.05457168181818e-34], [\"n.u. of mass\", \"m?\", null, \"mass\", false, false, 9.10938261616162e-31], [\"n.u. of speed\", \"c?\", null, \"speed\", false, false, 299792458], [\"n.u. of time\", \"?/(me?c??)\", null, \"time\", false, false, 1.28808866778687e-21], [\"nautical mile\", \"M\", [\"Nmi\"], \"length\", false, true, 1852], [\"newton\", \"N\", null, \"force\", true, true, 1], [\"œrsted\", \"Oe \", null, \"magnetic_field_intensity\", false, false, 79.5774715459477], [\"ohm\", \"Ω\", null, \"electric_resistance\", true, false, 1], [\"ounce mass\", \"ozm\", null, \"mass\", false, true, 0.028349523125], [\"pascal\", \"Pa\", null, \"pressure\", true, false, 1], [\"pascal second\", \"Pa?s\", null, \"dynamic_viscosity\", true, false, 1], [\"pferdestärke\", \"PS\", null, \"power\", false, true, 735.49875], [\"phot\", \"ph\", null, \"illuminance\", false, false, 0.0001], [\"pica (1/6 inch)\", \"pica\", null, \"length\", false, true, 0.00035277777777778], [\"pica (1/72 inch)\", \"Pica\", [\"Picapt\"], \"length\", false, true, 0.00423333333333333], [\"poise\", \"P\", null, \"dynamic_viscosity\", false, false, 0.1], [\"pond\", \"pond\", null, \"force\", false, true, 0.00980665], [\"pound force\", \"lbf\", null, \"force\", false, true, 4.4482216152605], [\"pound mass\", \"lbm\", null, \"mass\", false, true, 0.45359237], [\"quart\", \"qt\", null, \"volume\", false, true, 0.000946352946], [\"radian\", \"rad\", null, \"angle\", true, false, 1], [\"second\", \"?\", null, \"angle\", false, false, 0.00000484813681109536], [\"second\", \"s\", [\"sec\"], \"time\", true, true, 1], [\"short hundredweight\", \"cwt\", [\"shweight\"], \"mass\", false, true, 45.359237], [\"siemens\", \"S\", null, \"electrical_conductance\", true, false, 1], [\"sievert\", \"Sv\", null, \"equivalent_dose\", true, false, 1], [\"slug\", \"sg\", null, \"mass\", false, true, 14.59390294], [\"square ångström\", \"ang2\", [\"ang^2\"], \"area\", false, true, 1e-20], [\"square foot\", \"ft2\", [\"ft^2\"], \"area\", false, true, 0.09290304], [\"square inch\", \"in2\", [\"in^2\"], \"area\", false, true, 0.00064516], [\"square light-year\", \"ly2\", [\"ly^2\"], \"area\", false, true, 8.95054210748189e+31], [\"square meter\", \"m?\", null, \"area\", true, true, 1], [\"square mile\", \"mi2\", [\"mi^2\"], \"area\", false, true, 2589988.110336], [\"square nautical mile\", \"Nmi2\", [\"Nmi^2\"], \"area\", false, true, 3429904], [\"square Pica\", \"Pica2\", [\"Picapt2\", \"Pica^2\", \"Picapt^2\"], \"area\", false, true, 0.00001792111111111], [\"square yard\", \"yd2\", [\"yd^2\"], \"area\", false, true, 0.83612736], [\"statute mile\", \"mi\", null, \"length\", false, true, 1609.344], [\"steradian\", \"sr\", null, \"solid_angle\", true, false, 1], [\"stilb\", \"sb\", null, \"luminance\", false, false, 0.0001], [\"stokes\", \"St\", null, \"kinematic_viscosity\", false, false, 0.0001], [\"stone\", \"stone\", null, \"mass\", false, true, 6.35029318], [\"tablespoon\", \"tbs\", null, \"volume\", false, true, 0.0000147868], [\"teaspoon\", \"tsp\", null, \"volume\", false, true, 0.00000492892], [\"tesla\", \"T\", null, \"magnetic_flux_density\", true, true, 1], [\"thermodynamic calorie\", \"c\", null, \"energy\", false, true, 4.184], [\"ton\", \"ton\", null, \"mass\", false, true, 907.18474], [\"tonne\", \"t\", null, \"mass\", false, false, 1000], [\"U.K. pint\", \"uk_pt\", null, \"volume\", false, true, 0.00056826125], [\"U.S. bushel\", \"bushel\", null, \"volume\", false, true, 0.03523907], [\"U.S. oil barrel\", \"barrel\", null, \"volume\", false, true, 0.158987295], [\"U.S. pint\", \"pt\", [\"us_pt\"], \"volume\", false, true, 0.000473176473], [\"U.S. survey mile\", \"survey_mi\", null, \"length\", false, true, 1609.347219], [\"U.S. survey/statute acre\", \"us_acre\", null, \"area\", false, true, 4046.87261], [\"volt\", \"V\", null, \"voltage\", true, false, 1], [\"watt\", \"W\", null, \"power\", true, true, 1], [\"watt-hour\", \"Wh\", [\"wh\"], \"energy\", false, true, 3600], [\"weber\", \"Wb\", null, \"magnetic_flux\", true, false, 1], [\"yard\", \"yd\", null, \"length\", false, true, 0.9144], [\"year\", \"yr\", null, \"time\", false, true, 31557600]]; // Binary prefixes\n // [Name, Prefix power of 2 value, Previx value, Abbreviation, Derived from]\n\n var binary_prefixes = {\n Yi: [\"yobi\", 80, 1208925819614629174706176, \"Yi\", \"yotta\"],\n Zi: [\"zebi\", 70, 1180591620717411303424, \"Zi\", \"zetta\"],\n Ei: [\"exbi\", 60, 1152921504606846976, \"Ei\", \"exa\"],\n Pi: [\"pebi\", 50, 1125899906842624, \"Pi\", \"peta\"],\n Ti: [\"tebi\", 40, 1099511627776, \"Ti\", \"tera\"],\n Gi: [\"gibi\", 30, 1073741824, \"Gi\", \"giga\"],\n Mi: [\"mebi\", 20, 1048576, \"Mi\", \"mega\"],\n ki: [\"kibi\", 10, 1024, \"ki\", \"kilo\"]\n }; // Unit prefixes\n // [Name, Multiplier, Abbreviation]\n\n var unit_prefixes = {\n Y: [\"yotta\", 1e+24, \"Y\"],\n Z: [\"zetta\", 1e+21, \"Z\"],\n E: [\"exa\", 1e+18, \"E\"],\n P: [\"peta\", 1e+15, \"P\"],\n T: [\"tera\", 1e+12, \"T\"],\n G: [\"giga\", 1e+09, \"G\"],\n M: [\"mega\", 1e+06, \"M\"],\n k: [\"kilo\", 1e+03, \"k\"],\n h: [\"hecto\", 1e+02, \"h\"],\n e: [\"dekao\", 1e+01, \"e\"],\n d: [\"deci\", 1e-01, \"d\"],\n c: [\"centi\", 1e-02, \"c\"],\n m: [\"milli\", 1e-03, \"m\"],\n u: [\"micro\", 1e-06, \"u\"],\n n: [\"nano\", 1e-09, \"n\"],\n p: [\"pico\", 1e-12, \"p\"],\n f: [\"femto\", 1e-15, \"f\"],\n a: [\"atto\", 1e-18, \"a\"],\n z: [\"zepto\", 1e-21, \"z\"],\n y: [\"yocto\", 1e-24, \"y\"]\n }; // Initialize units and multipliers\n\n var from = null;\n var to = null;\n var base_from_unit = from_unit;\n var base_to_unit = to_unit;\n var from_multiplier = 1;\n var to_multiplier = 1;\n var alt; // Lookup from and to units\n\n for (var i = 0; i < units.length; i++) {\n alt = units[i][2] === null ? [] : units[i][2];\n\n if (units[i][1] === base_from_unit || alt.indexOf(base_from_unit) >= 0) {\n from = units[i];\n }\n\n if (units[i][1] === base_to_unit || alt.indexOf(base_to_unit) >= 0) {\n to = units[i];\n }\n } // Lookup from prefix\n\n\n if (from === null) {\n var from_binary_prefix = binary_prefixes[from_unit.substring(0, 2)];\n var from_unit_prefix = unit_prefixes[from_unit.substring(0, 1)]; // Handle dekao unit prefix (only unit prefix with two characters)\n\n if (from_unit.substring(0, 2) === 'da') {\n from_unit_prefix = [\"dekao\", 1e+01, \"da\"];\n } // Handle binary prefixes first (so that 'Yi' is processed before 'Y')\n\n\n if (from_binary_prefix) {\n from_multiplier = from_binary_prefix[2];\n base_from_unit = from_unit.substring(2);\n } else if (from_unit_prefix) {\n from_multiplier = from_unit_prefix[1];\n base_from_unit = from_unit.substring(from_unit_prefix[2].length);\n } // Lookup from unit\n\n\n for (var j = 0; j < units.length; j++) {\n alt = units[j][2] === null ? [] : units[j][2];\n\n if (units[j][1] === base_from_unit || alt.indexOf(base_from_unit) >= 0) {\n from = units[j];\n }\n }\n } // Lookup to prefix\n\n\n if (to === null) {\n var to_binary_prefix = binary_prefixes[to_unit.substring(0, 2)];\n var to_unit_prefix = unit_prefixes[to_unit.substring(0, 1)]; // Handle dekao unit prefix (only unit prefix with two characters)\n\n if (to_unit.substring(0, 2) === 'da') {\n to_unit_prefix = [\"dekao\", 1e+01, \"da\"];\n } // Handle binary prefixes first (so that 'Yi' is processed before 'Y')\n\n\n if (to_binary_prefix) {\n to_multiplier = to_binary_prefix[2];\n base_to_unit = to_unit.substring(2);\n } else if (to_unit_prefix) {\n to_multiplier = to_unit_prefix[1];\n base_to_unit = to_unit.substring(to_unit_prefix[2].length);\n } // Lookup to unit\n\n\n for (var k = 0; k < units.length; k++) {\n alt = units[k][2] === null ? [] : units[k][2];\n\n if (units[k][1] === base_to_unit || alt.indexOf(base_to_unit) >= 0) {\n to = units[k];\n }\n }\n } // Return error if a unit does not exist\n\n\n if (from === null || to === null) {\n return error.na;\n } // Return error if units represent different quantities\n\n\n if (from[3] !== to[3]) {\n return error.na;\n } // Return converted number\n\n\n return number * from[6] * from_multiplier / (to[6] * to_multiplier);\n};\n\nexports.DEC2BIN = function (number, places) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n } // Return error if number is not decimal, is lower than -512, or is greater than 511\n\n\n if (!/^-?[0-9]{1,3}$/.test(number) || number < -512 || number > 511) {\n return error.num;\n } // Ignore places and return a 10-character binary number if number is negative\n\n\n if (number < 0) {\n return '1' + text.REPT('0', 9 - (512 + number).toString(2).length) + (512 + number).toString(2);\n } // Convert decimal number to binary\n\n\n var result = parseInt(number, 10).toString(2); // Return binary number using the minimum number of characters necessary if places is undefined\n\n if (typeof places === 'undefined') {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};\n\nexports.DEC2HEX = function (number, places) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n } // Return error if number is not decimal, is lower than -549755813888, or is greater than 549755813887\n\n\n if (!/^-?[0-9]{1,12}$/.test(number) || number < -549755813888 || number > 549755813887) {\n return error.num;\n } // Ignore places and return a 10-character hexadecimal number if number is negative\n\n\n if (number < 0) {\n return (1099511627776 + number).toString(16);\n } // Convert decimal number to hexadecimal\n\n\n var result = parseInt(number, 10).toString(16); // Return hexadecimal number using the minimum number of characters necessary if places is undefined\n\n if (typeof places === 'undefined') {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};\n\nexports.DEC2OCT = function (number, places) {\n number = utils.parseNumber(number);\n\n if (number instanceof Error) {\n return number;\n } // Return error if number is not decimal, is lower than -549755813888, or is greater than 549755813887\n\n\n if (!/^-?[0-9]{1,9}$/.test(number) || number < -536870912 || number > 536870911) {\n return error.num;\n } // Ignore places and return a 10-character octal number if number is negative\n\n\n if (number < 0) {\n return (1073741824 + number).toString(8);\n } // Convert decimal number to octal\n\n\n var result = parseInt(number, 10).toString(8); // Return octal number using the minimum number of characters necessary if places is undefined\n\n if (typeof places === 'undefined') {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};\n\nexports.DELTA = function (number1, number2) {\n // Set number2 to zero if undefined\n number2 = number2 === undefined ? 0 : number2;\n number1 = utils.parseNumber(number1);\n number2 = utils.parseNumber(number2);\n\n if (utils.anyIsError(number1, number2)) {\n return error.value;\n } // Return delta\n\n\n return number1 === number2 ? 1 : 0;\n}; // TODO: why is upper_bound not used ? The excel documentation has no examples with upper_bound\n\n\nexports.ERF = function (lower_bound, upper_bound) {\n // Set number2 to zero if undefined\n upper_bound = upper_bound === undefined ? 0 : upper_bound;\n lower_bound = utils.parseNumber(lower_bound);\n upper_bound = utils.parseNumber(upper_bound);\n\n if (utils.anyIsError(lower_bound, upper_bound)) {\n return error.value;\n }\n\n return jStat.erf(lower_bound);\n}; // TODO\n\n\nexports.ERF.PRECISE = function () {\n throw new Error('ERF.PRECISE is not implemented');\n};\n\nexports.ERFC = function (x) {\n // Return error if x is not a number\n if (isNaN(x)) {\n return error.value;\n }\n\n return jStat.erfc(x);\n}; // TODO\n\n\nexports.ERFC.PRECISE = function () {\n throw new Error('ERFC.PRECISE is not implemented');\n};\n\nexports.GESTEP = function (number, step) {\n step = step || 0;\n number = utils.parseNumber(number);\n\n if (utils.anyIsError(step, number)) {\n return number;\n } // Return delta\n\n\n return number >= step ? 1 : 0;\n};\n\nexports.HEX2BIN = function (number, places) {\n // Return error if number is not hexadecimal or contains more than ten characters (10 digits)\n if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) {\n return error.num;\n } // Check if number is negative\n\n\n var negative = number.length === 10 && number.substring(0, 1).toLowerCase() === 'f' ? true : false; // Convert hexadecimal number to decimal\n\n var decimal = negative ? parseInt(number, 16) - 1099511627776 : parseInt(number, 16); // Return error if number is lower than -512 or greater than 511\n\n if (decimal < -512 || decimal > 511) {\n return error.num;\n } // Ignore places and return a 10-character binary number if number is negative\n\n\n if (negative) {\n return '1' + text.REPT('0', 9 - (512 + decimal).toString(2).length) + (512 + decimal).toString(2);\n } // Convert decimal number to binary\n\n\n var result = decimal.toString(2); // Return binary number using the minimum number of characters necessary if places is undefined\n\n if (places === undefined) {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};\n\nexports.HEX2DEC = function (number) {\n // Return error if number is not hexadecimal or contains more than ten characters (10 digits)\n if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) {\n return error.num;\n } // Convert hexadecimal number to decimal\n\n\n var decimal = parseInt(number, 16); // Return decimal number\n\n return decimal >= 549755813888 ? decimal - 1099511627776 : decimal;\n};\n\nexports.HEX2OCT = function (number, places) {\n // Return error if number is not hexadecimal or contains more than ten characters (10 digits)\n if (!/^[0-9A-Fa-f]{1,10}$/.test(number)) {\n return error.num;\n } // Convert hexadecimal number to decimal\n\n\n var decimal = parseInt(number, 16); // Return error if number is positive and greater than 0x1fffffff (536870911)\n\n if (decimal > 536870911 && decimal < 1098974756864) {\n return error.num;\n } // Ignore places and return a 10-character octal number if number is negative\n\n\n if (decimal >= 1098974756864) {\n return (decimal - 1098437885952).toString(8);\n } // Convert decimal number to octal\n\n\n var result = decimal.toString(8); // Return octal number using the minimum number of characters necessary if places is undefined\n\n if (places === undefined) {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};\n\nexports.IMABS = function (inumber) {\n // Lookup real and imaginary coefficients using exports.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber); // Return error if either coefficient is not a number\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Return absolute value of complex number\n\n\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n};\n\nexports.IMAGINARY = function (inumber) {\n if (inumber === undefined || inumber === true || inumber === false) {\n return error.value;\n } // Return 0 if inumber is equal to 0\n\n\n if (inumber === 0 || inumber === '0') {\n return 0;\n } // Handle special cases\n\n\n if (['i', 'j'].indexOf(inumber) >= 0) {\n return 1;\n } // Normalize imaginary coefficient\n\n\n inumber = inumber.replace('+i', '+1i').replace('-i', '-1i').replace('+j', '+1j').replace('-j', '-1j'); // Lookup sign\n\n var plus = inumber.indexOf('+');\n var minus = inumber.indexOf('-');\n\n if (plus === 0) {\n plus = inumber.indexOf('+', 1);\n }\n\n if (minus === 0) {\n minus = inumber.indexOf('-', 1);\n } // Lookup imaginary unit\n\n\n var last = inumber.substring(inumber.length - 1, inumber.length);\n var unit = last === 'i' || last === 'j';\n\n if (plus >= 0 || minus >= 0) {\n // Return error if imaginary unit is neither i nor j\n if (!unit) {\n return error.num;\n } // Return imaginary coefficient of complex number\n\n\n if (plus >= 0) {\n return isNaN(inumber.substring(0, plus)) || isNaN(inumber.substring(plus + 1, inumber.length - 1)) ? error.num : Number(inumber.substring(plus + 1, inumber.length - 1));\n } else {\n return isNaN(inumber.substring(0, minus)) || isNaN(inumber.substring(minus + 1, inumber.length - 1)) ? error.num : -Number(inumber.substring(minus + 1, inumber.length - 1));\n }\n } else {\n if (unit) {\n return isNaN(inumber.substring(0, inumber.length - 1)) ? error.num : inumber.substring(0, inumber.length - 1);\n } else {\n return isNaN(inumber) ? error.num : 0;\n }\n }\n};\n\nexports.IMARGUMENT = function (inumber) {\n // Lookup real and imaginary coefficients using exports.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber); // Return error if either coefficient is not a number\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Return error if inumber is equal to zero\n\n\n if (x === 0 && y === 0) {\n return error.div0;\n } // Return PI/2 if x is equal to zero and y is positive\n\n\n if (x === 0 && y > 0) {\n return Math.PI / 2;\n } // Return -PI/2 if x is equal to zero and y is negative\n\n\n if (x === 0 && y < 0) {\n return -Math.PI / 2;\n } // Return zero if x is negative and y is equal to zero\n\n\n if (y === 0 && x > 0) {\n return 0;\n } // Return zero if x is negative and y is equal to zero\n\n\n if (y === 0 && x < 0) {\n return -Math.PI;\n } // Return argument of complex number\n\n\n if (x > 0) {\n return Math.atan(y / x);\n } else if (x < 0 && y >= 0) {\n return Math.atan(y / x) + Math.PI;\n } else {\n return Math.atan(y / x) - Math.PI;\n }\n};\n\nexports.IMCONJUGATE = function (inumber) {\n // Lookup real and imaginary coefficients using exports.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return conjugate of complex number\n\n return y !== 0 ? exports.COMPLEX(x, -y, unit) : inumber;\n};\n\nexports.IMCOS = function (inumber) {\n // Lookup real and imaginary coefficients using exports.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return cosine of complex number\n\n return exports.COMPLEX(Math.cos(x) * (Math.exp(y) + Math.exp(-y)) / 2, -Math.sin(x) * (Math.exp(y) - Math.exp(-y)) / 2, unit);\n};\n\nexports.IMCOSH = function (inumber) {\n // Lookup real and imaginary coefficients using exports.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return hyperbolic cosine of complex number\n\n return exports.COMPLEX(Math.cos(y) * (Math.exp(x) + Math.exp(-x)) / 2, Math.sin(y) * (Math.exp(x) - Math.exp(-x)) / 2, unit);\n};\n\nexports.IMCOT = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Return cotangent of complex number\n\n\n return exports.IMDIV(exports.IMCOS(inumber), exports.IMSIN(inumber));\n};\n\nexports.IMDIV = function (inumber1, inumber2) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var a = exports.IMREAL(inumber1);\n var b = exports.IMAGINARY(inumber1);\n var c = exports.IMREAL(inumber2);\n var d = exports.IMAGINARY(inumber2);\n\n if (utils.anyIsError(a, b, c, d)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit1 = inumber1.substring(inumber1.length - 1);\n var unit2 = inumber2.substring(inumber2.length - 1);\n var unit = 'i';\n\n if (unit1 === 'j') {\n unit = 'j';\n } else if (unit2 === 'j') {\n unit = 'j';\n } // Return error if inumber2 is null\n\n\n if (c === 0 && d === 0) {\n return error.num;\n } // Return exponential of complex number\n\n\n var den = c * c + d * d;\n return exports.COMPLEX((a * c + b * d) / den, (b * c - a * d) / den, unit);\n};\n\nexports.IMEXP = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return exponential of complex number\n\n var e = Math.exp(x);\n return exports.COMPLEX(e * Math.cos(y), e * Math.sin(y), unit);\n};\n\nexports.IMLN = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return exponential of complex number\n\n return exports.COMPLEX(Math.log(Math.sqrt(x * x + y * y)), Math.atan(y / x), unit);\n};\n\nexports.IMLOG10 = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return exponential of complex number\n\n return exports.COMPLEX(Math.log(Math.sqrt(x * x + y * y)) / Math.log(10), Math.atan(y / x) / Math.log(10), unit);\n};\n\nexports.IMLOG2 = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return exponential of complex number\n\n return exports.COMPLEX(Math.log(Math.sqrt(x * x + y * y)) / Math.log(2), Math.atan(y / x) / Math.log(2), unit);\n};\n\nexports.IMPOWER = function (inumber, number) {\n number = utils.parseNumber(number);\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(number, x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Calculate power of modulus\n\n var p = Math.pow(exports.IMABS(inumber), number); // Calculate argument\n\n var t = exports.IMARGUMENT(inumber); // Return exponential of complex number\n\n return exports.COMPLEX(p * Math.cos(number * t), p * Math.sin(number * t), unit);\n};\n\nexports.IMPRODUCT = function () {\n // Initialize result\n var result = arguments[0];\n\n if (!arguments.length) {\n return error.value;\n } // Loop on all numbers\n\n\n for (var i = 1; i < arguments.length; i++) {\n // Lookup coefficients of two complex numbers\n var a = exports.IMREAL(result);\n var b = exports.IMAGINARY(result);\n var c = exports.IMREAL(arguments[i]);\n var d = exports.IMAGINARY(arguments[i]);\n\n if (utils.anyIsError(a, b, c, d)) {\n return error.value;\n } // Complute product of two complex numbers\n\n\n result = exports.COMPLEX(a * c - b * d, a * d + b * c);\n } // Return product of complex numbers\n\n\n return result;\n};\n\nexports.IMREAL = function (inumber) {\n if (inumber === undefined || inumber === true || inumber === false) {\n return error.value;\n } // Return 0 if inumber is equal to 0\n\n\n if (inumber === 0 || inumber === '0') {\n return 0;\n } // Handle special cases\n\n\n if (['i', '+i', '1i', '+1i', '-i', '-1i', 'j', '+j', '1j', '+1j', '-j', '-1j'].indexOf(inumber) >= 0) {\n return 0;\n } // Lookup sign\n\n\n var plus = inumber.indexOf('+');\n var minus = inumber.indexOf('-');\n\n if (plus === 0) {\n plus = inumber.indexOf('+', 1);\n }\n\n if (minus === 0) {\n minus = inumber.indexOf('-', 1);\n } // Lookup imaginary unit\n\n\n var last = inumber.substring(inumber.length - 1, inumber.length);\n var unit = last === 'i' || last === 'j';\n\n if (plus >= 0 || minus >= 0) {\n // Return error if imaginary unit is neither i nor j\n if (!unit) {\n return error.num;\n } // Return real coefficient of complex number\n\n\n if (plus >= 0) {\n return isNaN(inumber.substring(0, plus)) || isNaN(inumber.substring(plus + 1, inumber.length - 1)) ? error.num : Number(inumber.substring(0, plus));\n } else {\n return isNaN(inumber.substring(0, minus)) || isNaN(inumber.substring(minus + 1, inumber.length - 1)) ? error.num : Number(inumber.substring(0, minus));\n }\n } else {\n if (unit) {\n return isNaN(inumber.substring(0, inumber.length - 1)) ? error.num : 0;\n } else {\n return isNaN(inumber) ? error.num : inumber;\n }\n }\n};\n\nexports.IMSEC = function (inumber) {\n // Return error if inumber is a logical value\n if (inumber === true || inumber === false) {\n return error.value;\n } // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n\n\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Return secant of complex number\n\n\n return exports.IMDIV('1', exports.IMCOS(inumber));\n};\n\nexports.IMSECH = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Return hyperbolic secant of complex number\n\n\n return exports.IMDIV('1', exports.IMCOSH(inumber));\n};\n\nexports.IMSIN = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return sine of complex number\n\n return exports.COMPLEX(Math.sin(x) * (Math.exp(y) + Math.exp(-y)) / 2, Math.cos(x) * (Math.exp(y) - Math.exp(-y)) / 2, unit);\n};\n\nexports.IMSINH = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Return hyperbolic sine of complex number\n\n return exports.COMPLEX(Math.cos(y) * (Math.exp(x) - Math.exp(-x)) / 2, Math.sin(y) * (Math.exp(x) + Math.exp(-x)) / 2, unit);\n};\n\nexports.IMSQRT = function (inumber) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit = inumber.substring(inumber.length - 1);\n unit = unit === 'i' || unit === 'j' ? unit : 'i'; // Calculate power of modulus\n\n var s = Math.sqrt(exports.IMABS(inumber)); // Calculate argument\n\n var t = exports.IMARGUMENT(inumber); // Return exponential of complex number\n\n return exports.COMPLEX(s * Math.cos(t / 2), s * Math.sin(t / 2), unit);\n};\n\nexports.IMCSC = function (inumber) {\n // Return error if inumber is a logical value\n if (inumber === true || inumber === false) {\n return error.value;\n } // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n\n\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber); // Return error if either coefficient is not a number\n\n if (utils.anyIsError(x, y)) {\n return error.num;\n } // Return cosecant of complex number\n\n\n return exports.IMDIV('1', exports.IMSIN(inumber));\n};\n\nexports.IMCSCH = function (inumber) {\n // Return error if inumber is a logical value\n if (inumber === true || inumber === false) {\n return error.value;\n } // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n\n\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber); // Return error if either coefficient is not a number\n\n if (utils.anyIsError(x, y)) {\n return error.num;\n } // Return hyperbolic cosecant of complex number\n\n\n return exports.IMDIV('1', exports.IMSINH(inumber));\n};\n\nexports.IMSUB = function (inumber1, inumber2) {\n // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n var a = this.IMREAL(inumber1);\n var b = this.IMAGINARY(inumber1);\n var c = this.IMREAL(inumber2);\n var d = this.IMAGINARY(inumber2);\n\n if (utils.anyIsError(a, b, c, d)) {\n return error.value;\n } // Lookup imaginary unit\n\n\n var unit1 = inumber1.substring(inumber1.length - 1);\n var unit2 = inumber2.substring(inumber2.length - 1);\n var unit = 'i';\n\n if (unit1 === 'j') {\n unit = 'j';\n } else if (unit2 === 'j') {\n unit = 'j';\n } // Return _ of two complex numbers\n\n\n return this.COMPLEX(a - c, b - d, unit);\n};\n\nexports.IMSUM = function () {\n if (!arguments.length) {\n return error.value;\n }\n\n var args = utils.flatten(arguments); // Initialize result\n\n var result = args[0]; // Loop on all numbers\n\n for (var i = 1; i < args.length; i++) {\n // Lookup coefficients of two complex numbers\n var a = this.IMREAL(result);\n var b = this.IMAGINARY(result);\n var c = this.IMREAL(args[i]);\n var d = this.IMAGINARY(args[i]);\n\n if (utils.anyIsError(a, b, c, d)) {\n return error.value;\n } // Complute product of two complex numbers\n\n\n result = this.COMPLEX(a + c, b + d);\n } // Return sum of complex numbers\n\n\n return result;\n};\n\nexports.IMTAN = function (inumber) {\n // Return error if inumber is a logical value\n if (inumber === true || inumber === false) {\n return error.value;\n } // Lookup real and imaginary coefficients using Formula.js [http://formulajs.org]\n\n\n var x = exports.IMREAL(inumber);\n var y = exports.IMAGINARY(inumber);\n\n if (utils.anyIsError(x, y)) {\n return error.value;\n } // Return tangent of complex number\n\n\n return this.IMDIV(this.IMSIN(inumber), this.IMCOS(inumber));\n};\n\nexports.OCT2BIN = function (number, places) {\n // Return error if number is not hexadecimal or contains more than ten characters (10 digits)\n if (!/^[0-7]{1,10}$/.test(number)) {\n return error.num;\n } // Check if number is negative\n\n\n var negative = number.length === 10 && number.substring(0, 1) === '7' ? true : false; // Convert octal number to decimal\n\n var decimal = negative ? parseInt(number, 8) - 1073741824 : parseInt(number, 8); // Return error if number is lower than -512 or greater than 511\n\n if (decimal < -512 || decimal > 511) {\n return error.num;\n } // Ignore places and return a 10-character binary number if number is negative\n\n\n if (negative) {\n return '1' + text.REPT('0', 9 - (512 + decimal).toString(2).length) + (512 + decimal).toString(2);\n } // Convert decimal number to binary\n\n\n var result = decimal.toString(2); // Return binary number using the minimum number of characters necessary if places is undefined\n\n if (typeof places === 'undefined') {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};\n\nexports.OCT2DEC = function (number) {\n // Return error if number is not octal or contains more than ten characters (10 digits)\n if (!/^[0-7]{1,10}$/.test(number)) {\n return error.num;\n } // Convert octal number to decimal\n\n\n var decimal = parseInt(number, 8); // Return decimal number\n\n return decimal >= 536870912 ? decimal - 1073741824 : decimal;\n};\n\nexports.OCT2HEX = function (number, places) {\n // Return error if number is not octal or contains more than ten characters (10 digits)\n if (!/^[0-7]{1,10}$/.test(number)) {\n return error.num;\n } // Convert octal number to decimal\n\n\n var decimal = parseInt(number, 8); // Ignore places and return a 10-character octal number if number is negative\n\n if (decimal >= 536870912) {\n return 'ff' + (decimal + 3221225472).toString(16);\n } // Convert decimal number to hexadecimal\n\n\n var result = decimal.toString(16); // Return hexadecimal number using the minimum number of characters necessary if places is undefined\n\n if (places === undefined) {\n return result;\n } else {\n // Return error if places is nonnumeric\n if (isNaN(places)) {\n return error.value;\n } // Return error if places is negative\n\n\n if (places < 0) {\n return error.num;\n } // Truncate places in case it is not an integer\n\n\n places = Math.floor(places); // Pad return value with leading 0s (zeros) if necessary (using Underscore.string)\n\n return places >= result.length ? text.REPT('0', places - result.length) + result : error.num;\n }\n};","var scope = typeof global !== \"undefined\" && global || typeof self !== \"undefined\" && self || window;\nvar apply = Function.prototype.apply; // DOM APIs, for completeness\n\nexports.setTimeout = function () {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\n\nexports.setInterval = function () {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\n\nexports.clearTimeout = exports.clearInterval = function (timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\n\nTimeout.prototype.unref = Timeout.prototype.ref = function () {};\n\nTimeout.prototype.close = function () {\n this._clearFn.call(scope, this._id);\n}; // Does not start the time, just sets up the members needed.\n\n\nexports.enroll = function (item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function (item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function (item) {\n clearTimeout(item._idleTimeoutId);\n var msecs = item._idleTimeout;\n\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout) item._onTimeout();\n }, msecs);\n }\n}; // setimmediate attaches itself to the global object\n\n\nrequire(\"setimmediate\"); // On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\n\n\nexports.setImmediate = typeof self !== \"undefined\" && self.setImmediate || typeof global !== \"undefined\" && global.setImmediate || this && this.setImmediate;\nexports.clearImmediate = typeof self !== \"undefined\" && self.clearImmediate || typeof global !== \"undefined\" && global.clearImmediate || this && this.clearImmediate;","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n } // Copy function arguments\n\n\n var args = new Array(arguments.length - 1);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n } // Store and register the task\n\n\n var task = {\n callback: callback,\n args: args\n };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n\n switch (args.length) {\n case 0:\n callback();\n break;\n\n case 1:\n callback(args[0]);\n break;\n\n case 2:\n callback(args[0], args[1]);\n break;\n\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n\n if (task) {\n currentlyRunningATask = true;\n\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function registerImmediate(handle) {\n process.nextTick(function () {\n runIfPresent(handle);\n });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n\n global.onmessage = function () {\n postMessageIsAsynchronous = false;\n };\n\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n\n var onGlobalMessage = function onGlobalMessage(event) {\n if (event.source === global && typeof event.data === \"string\" && event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function registerImmediate(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n\n channel.port1.onmessage = function (event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function registerImmediate(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n\n registerImmediate = function registerImmediate(handle) {\n // Create a \n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./job_applications.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./job_applications.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./job_applications.vue?vue&type=template&id=23df17c0&scoped=true&\"\nimport script from \"./job_applications.vue?vue&type=script&lang=js&\"\nexport * from \"./job_applications.vue?vue&type=script&lang=js&\"\nimport style0 from \"./job_applications.vue?vue&type=style&index=0&id=23df17c0&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"23df17c0\",\n null\n \n)\n\nexport default component.exports","var map = {\n\t\"./af\": 587,\n\t\"./af.js\": 587,\n\t\"./ar\": 588,\n\t\"./ar-dz\": 589,\n\t\"./ar-dz.js\": 589,\n\t\"./ar-kw\": 590,\n\t\"./ar-kw.js\": 590,\n\t\"./ar-ly\": 591,\n\t\"./ar-ly.js\": 591,\n\t\"./ar-ma\": 592,\n\t\"./ar-ma.js\": 592,\n\t\"./ar-sa\": 593,\n\t\"./ar-sa.js\": 593,\n\t\"./ar-tn\": 594,\n\t\"./ar-tn.js\": 594,\n\t\"./ar.js\": 588,\n\t\"./az\": 595,\n\t\"./az.js\": 595,\n\t\"./be\": 596,\n\t\"./be.js\": 596,\n\t\"./bg\": 597,\n\t\"./bg.js\": 597,\n\t\"./bm\": 598,\n\t\"./bm.js\": 598,\n\t\"./bn\": 599,\n\t\"./bn.js\": 599,\n\t\"./bo\": 600,\n\t\"./bo.js\": 600,\n\t\"./br\": 601,\n\t\"./br.js\": 601,\n\t\"./bs\": 602,\n\t\"./bs.js\": 602,\n\t\"./ca\": 603,\n\t\"./ca.js\": 603,\n\t\"./cs\": 604,\n\t\"./cs.js\": 604,\n\t\"./cv\": 605,\n\t\"./cv.js\": 605,\n\t\"./cy\": 606,\n\t\"./cy.js\": 606,\n\t\"./da\": 607,\n\t\"./da.js\": 607,\n\t\"./de\": 608,\n\t\"./de-at\": 609,\n\t\"./de-at.js\": 609,\n\t\"./de-ch\": 610,\n\t\"./de-ch.js\": 610,\n\t\"./de.js\": 608,\n\t\"./dv\": 611,\n\t\"./dv.js\": 611,\n\t\"./el\": 612,\n\t\"./el.js\": 612,\n\t\"./en-SG\": 613,\n\t\"./en-SG.js\": 613,\n\t\"./en-au\": 614,\n\t\"./en-au.js\": 614,\n\t\"./en-ca\": 615,\n\t\"./en-ca.js\": 615,\n\t\"./en-gb\": 616,\n\t\"./en-gb.js\": 616,\n\t\"./en-ie\": 617,\n\t\"./en-ie.js\": 617,\n\t\"./en-il\": 618,\n\t\"./en-il.js\": 618,\n\t\"./en-nz\": 619,\n\t\"./en-nz.js\": 619,\n\t\"./eo\": 620,\n\t\"./eo.js\": 620,\n\t\"./es\": 621,\n\t\"./es-do\": 622,\n\t\"./es-do.js\": 622,\n\t\"./es-us\": 623,\n\t\"./es-us.js\": 623,\n\t\"./es.js\": 621,\n\t\"./et\": 624,\n\t\"./et.js\": 624,\n\t\"./eu\": 625,\n\t\"./eu.js\": 625,\n\t\"./fa\": 626,\n\t\"./fa.js\": 626,\n\t\"./fi\": 627,\n\t\"./fi.js\": 627,\n\t\"./fo\": 628,\n\t\"./fo.js\": 628,\n\t\"./fr\": 629,\n\t\"./fr-ca\": 630,\n\t\"./fr-ca.js\": 630,\n\t\"./fr-ch\": 631,\n\t\"./fr-ch.js\": 631,\n\t\"./fr.js\": 629,\n\t\"./fy\": 632,\n\t\"./fy.js\": 632,\n\t\"./ga\": 633,\n\t\"./ga.js\": 633,\n\t\"./gd\": 634,\n\t\"./gd.js\": 634,\n\t\"./gl\": 635,\n\t\"./gl.js\": 635,\n\t\"./gom-latn\": 636,\n\t\"./gom-latn.js\": 636,\n\t\"./gu\": 637,\n\t\"./gu.js\": 637,\n\t\"./he\": 638,\n\t\"./he.js\": 638,\n\t\"./hi\": 639,\n\t\"./hi.js\": 639,\n\t\"./hr\": 640,\n\t\"./hr.js\": 640,\n\t\"./hu\": 641,\n\t\"./hu.js\": 641,\n\t\"./hy-am\": 642,\n\t\"./hy-am.js\": 642,\n\t\"./id\": 643,\n\t\"./id.js\": 643,\n\t\"./is\": 644,\n\t\"./is.js\": 644,\n\t\"./it\": 645,\n\t\"./it-ch\": 646,\n\t\"./it-ch.js\": 646,\n\t\"./it.js\": 645,\n\t\"./ja\": 647,\n\t\"./ja.js\": 647,\n\t\"./jv\": 648,\n\t\"./jv.js\": 648,\n\t\"./ka\": 649,\n\t\"./ka.js\": 649,\n\t\"./kk\": 650,\n\t\"./kk.js\": 650,\n\t\"./km\": 651,\n\t\"./km.js\": 651,\n\t\"./kn\": 652,\n\t\"./kn.js\": 652,\n\t\"./ko\": 653,\n\t\"./ko.js\": 653,\n\t\"./ku\": 654,\n\t\"./ku.js\": 654,\n\t\"./ky\": 655,\n\t\"./ky.js\": 655,\n\t\"./lb\": 656,\n\t\"./lb.js\": 656,\n\t\"./lo\": 657,\n\t\"./lo.js\": 657,\n\t\"./lt\": 658,\n\t\"./lt.js\": 658,\n\t\"./lv\": 659,\n\t\"./lv.js\": 659,\n\t\"./me\": 660,\n\t\"./me.js\": 660,\n\t\"./mi\": 661,\n\t\"./mi.js\": 661,\n\t\"./mk\": 662,\n\t\"./mk.js\": 662,\n\t\"./ml\": 663,\n\t\"./ml.js\": 663,\n\t\"./mn\": 664,\n\t\"./mn.js\": 664,\n\t\"./mr\": 665,\n\t\"./mr.js\": 665,\n\t\"./ms\": 666,\n\t\"./ms-my\": 667,\n\t\"./ms-my.js\": 667,\n\t\"./ms.js\": 666,\n\t\"./mt\": 668,\n\t\"./mt.js\": 668,\n\t\"./my\": 669,\n\t\"./my.js\": 669,\n\t\"./nb\": 670,\n\t\"./nb.js\": 670,\n\t\"./ne\": 671,\n\t\"./ne.js\": 671,\n\t\"./nl\": 672,\n\t\"./nl-be\": 673,\n\t\"./nl-be.js\": 673,\n\t\"./nl.js\": 672,\n\t\"./nn\": 674,\n\t\"./nn.js\": 674,\n\t\"./pa-in\": 675,\n\t\"./pa-in.js\": 675,\n\t\"./pl\": 676,\n\t\"./pl.js\": 676,\n\t\"./pt\": 677,\n\t\"./pt-br\": 678,\n\t\"./pt-br.js\": 678,\n\t\"./pt.js\": 677,\n\t\"./ro\": 679,\n\t\"./ro.js\": 679,\n\t\"./ru\": 680,\n\t\"./ru.js\": 680,\n\t\"./sd\": 681,\n\t\"./sd.js\": 681,\n\t\"./se\": 682,\n\t\"./se.js\": 682,\n\t\"./si\": 683,\n\t\"./si.js\": 683,\n\t\"./sk\": 684,\n\t\"./sk.js\": 684,\n\t\"./sl\": 685,\n\t\"./sl.js\": 685,\n\t\"./sq\": 686,\n\t\"./sq.js\": 686,\n\t\"./sr\": 687,\n\t\"./sr-cyrl\": 688,\n\t\"./sr-cyrl.js\": 688,\n\t\"./sr.js\": 687,\n\t\"./ss\": 689,\n\t\"./ss.js\": 689,\n\t\"./sv\": 690,\n\t\"./sv.js\": 690,\n\t\"./sw\": 691,\n\t\"./sw.js\": 691,\n\t\"./ta\": 692,\n\t\"./ta.js\": 692,\n\t\"./te\": 693,\n\t\"./te.js\": 693,\n\t\"./tet\": 694,\n\t\"./tet.js\": 694,\n\t\"./tg\": 695,\n\t\"./tg.js\": 695,\n\t\"./th\": 696,\n\t\"./th.js\": 696,\n\t\"./tl-ph\": 697,\n\t\"./tl-ph.js\": 697,\n\t\"./tlh\": 698,\n\t\"./tlh.js\": 698,\n\t\"./tr\": 699,\n\t\"./tr.js\": 699,\n\t\"./tzl\": 700,\n\t\"./tzl.js\": 700,\n\t\"./tzm\": 701,\n\t\"./tzm-latn\": 702,\n\t\"./tzm-latn.js\": 702,\n\t\"./tzm.js\": 701,\n\t\"./ug-cn\": 703,\n\t\"./ug-cn.js\": 703,\n\t\"./uk\": 704,\n\t\"./uk.js\": 704,\n\t\"./ur\": 705,\n\t\"./ur.js\": 705,\n\t\"./uz\": 706,\n\t\"./uz-latn\": 707,\n\t\"./uz-latn.js\": 707,\n\t\"./uz.js\": 706,\n\t\"./vi\": 708,\n\t\"./vi.js\": 708,\n\t\"./x-pseudo\": 709,\n\t\"./x-pseudo.js\": 709,\n\t\"./yo\": 710,\n\t\"./yo.js\": 710,\n\t\"./zh-cn\": 711,\n\t\"./zh-cn.js\": 711,\n\t\"./zh-hk\": 712,\n\t\"./zh-hk.js\": 712,\n\t\"./zh-tw\": 713,\n\t\"./zh-tw.js\": 713\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 889;","var map = {\n\t\"./af\": 714,\n\t\"./af.js\": 714,\n\t\"./ar\": 715,\n\t\"./ar-dz\": 716,\n\t\"./ar-dz.js\": 716,\n\t\"./ar-kw\": 717,\n\t\"./ar-kw.js\": 717,\n\t\"./ar-ly\": 718,\n\t\"./ar-ly.js\": 718,\n\t\"./ar-ma\": 719,\n\t\"./ar-ma.js\": 719,\n\t\"./ar-sa\": 720,\n\t\"./ar-sa.js\": 720,\n\t\"./ar-tn\": 721,\n\t\"./ar-tn.js\": 721,\n\t\"./ar.js\": 715,\n\t\"./az\": 722,\n\t\"./az.js\": 722,\n\t\"./be\": 723,\n\t\"./be.js\": 723,\n\t\"./bg\": 724,\n\t\"./bg.js\": 724,\n\t\"./bm\": 725,\n\t\"./bm.js\": 725,\n\t\"./bn\": 726,\n\t\"./bn-bd\": 727,\n\t\"./bn-bd.js\": 727,\n\t\"./bn.js\": 726,\n\t\"./bo\": 728,\n\t\"./bo.js\": 728,\n\t\"./br\": 729,\n\t\"./br.js\": 729,\n\t\"./bs\": 730,\n\t\"./bs.js\": 730,\n\t\"./ca\": 731,\n\t\"./ca.js\": 731,\n\t\"./cs\": 732,\n\t\"./cs.js\": 732,\n\t\"./cv\": 733,\n\t\"./cv.js\": 733,\n\t\"./cy\": 734,\n\t\"./cy.js\": 734,\n\t\"./da\": 735,\n\t\"./da.js\": 735,\n\t\"./de\": 736,\n\t\"./de-at\": 737,\n\t\"./de-at.js\": 737,\n\t\"./de-ch\": 738,\n\t\"./de-ch.js\": 738,\n\t\"./de.js\": 736,\n\t\"./dv\": 739,\n\t\"./dv.js\": 739,\n\t\"./el\": 740,\n\t\"./el.js\": 740,\n\t\"./en-au\": 741,\n\t\"./en-au.js\": 741,\n\t\"./en-ca\": 742,\n\t\"./en-ca.js\": 742,\n\t\"./en-gb\": 743,\n\t\"./en-gb.js\": 743,\n\t\"./en-ie\": 744,\n\t\"./en-ie.js\": 744,\n\t\"./en-il\": 745,\n\t\"./en-il.js\": 745,\n\t\"./en-in\": 746,\n\t\"./en-in.js\": 746,\n\t\"./en-nz\": 747,\n\t\"./en-nz.js\": 747,\n\t\"./en-sg\": 748,\n\t\"./en-sg.js\": 748,\n\t\"./eo\": 749,\n\t\"./eo.js\": 749,\n\t\"./es\": 750,\n\t\"./es-do\": 751,\n\t\"./es-do.js\": 751,\n\t\"./es-mx\": 752,\n\t\"./es-mx.js\": 752,\n\t\"./es-us\": 753,\n\t\"./es-us.js\": 753,\n\t\"./es.js\": 750,\n\t\"./et\": 754,\n\t\"./et.js\": 754,\n\t\"./eu\": 755,\n\t\"./eu.js\": 755,\n\t\"./fa\": 756,\n\t\"./fa.js\": 756,\n\t\"./fi\": 757,\n\t\"./fi.js\": 757,\n\t\"./fil\": 758,\n\t\"./fil.js\": 758,\n\t\"./fo\": 759,\n\t\"./fo.js\": 759,\n\t\"./fr\": 760,\n\t\"./fr-ca\": 761,\n\t\"./fr-ca.js\": 761,\n\t\"./fr-ch\": 762,\n\t\"./fr-ch.js\": 762,\n\t\"./fr.js\": 760,\n\t\"./fy\": 763,\n\t\"./fy.js\": 763,\n\t\"./ga\": 764,\n\t\"./ga.js\": 764,\n\t\"./gd\": 765,\n\t\"./gd.js\": 765,\n\t\"./gl\": 766,\n\t\"./gl.js\": 766,\n\t\"./gom-deva\": 767,\n\t\"./gom-deva.js\": 767,\n\t\"./gom-latn\": 768,\n\t\"./gom-latn.js\": 768,\n\t\"./gu\": 769,\n\t\"./gu.js\": 769,\n\t\"./he\": 770,\n\t\"./he.js\": 770,\n\t\"./hi\": 771,\n\t\"./hi.js\": 771,\n\t\"./hr\": 772,\n\t\"./hr.js\": 772,\n\t\"./hu\": 773,\n\t\"./hu.js\": 773,\n\t\"./hy-am\": 774,\n\t\"./hy-am.js\": 774,\n\t\"./id\": 775,\n\t\"./id.js\": 775,\n\t\"./is\": 776,\n\t\"./is.js\": 776,\n\t\"./it\": 777,\n\t\"./it-ch\": 778,\n\t\"./it-ch.js\": 778,\n\t\"./it.js\": 777,\n\t\"./ja\": 779,\n\t\"./ja.js\": 779,\n\t\"./jv\": 780,\n\t\"./jv.js\": 780,\n\t\"./ka\": 781,\n\t\"./ka.js\": 781,\n\t\"./kk\": 782,\n\t\"./kk.js\": 782,\n\t\"./km\": 783,\n\t\"./km.js\": 783,\n\t\"./kn\": 784,\n\t\"./kn.js\": 784,\n\t\"./ko\": 785,\n\t\"./ko.js\": 785,\n\t\"./ku\": 786,\n\t\"./ku.js\": 786,\n\t\"./ky\": 787,\n\t\"./ky.js\": 787,\n\t\"./lb\": 788,\n\t\"./lb.js\": 788,\n\t\"./lo\": 789,\n\t\"./lo.js\": 789,\n\t\"./lt\": 790,\n\t\"./lt.js\": 790,\n\t\"./lv\": 791,\n\t\"./lv.js\": 791,\n\t\"./me\": 792,\n\t\"./me.js\": 792,\n\t\"./mi\": 793,\n\t\"./mi.js\": 793,\n\t\"./mk\": 794,\n\t\"./mk.js\": 794,\n\t\"./ml\": 795,\n\t\"./ml.js\": 795,\n\t\"./mn\": 796,\n\t\"./mn.js\": 796,\n\t\"./mr\": 797,\n\t\"./mr.js\": 797,\n\t\"./ms\": 798,\n\t\"./ms-my\": 799,\n\t\"./ms-my.js\": 799,\n\t\"./ms.js\": 798,\n\t\"./mt\": 800,\n\t\"./mt.js\": 800,\n\t\"./my\": 801,\n\t\"./my.js\": 801,\n\t\"./nb\": 802,\n\t\"./nb.js\": 802,\n\t\"./ne\": 803,\n\t\"./ne.js\": 803,\n\t\"./nl\": 804,\n\t\"./nl-be\": 805,\n\t\"./nl-be.js\": 805,\n\t\"./nl.js\": 804,\n\t\"./nn\": 806,\n\t\"./nn.js\": 806,\n\t\"./oc-lnc\": 807,\n\t\"./oc-lnc.js\": 807,\n\t\"./pa-in\": 808,\n\t\"./pa-in.js\": 808,\n\t\"./pl\": 809,\n\t\"./pl.js\": 809,\n\t\"./pt\": 810,\n\t\"./pt-br\": 811,\n\t\"./pt-br.js\": 811,\n\t\"./pt.js\": 810,\n\t\"./ro\": 812,\n\t\"./ro.js\": 812,\n\t\"./ru\": 813,\n\t\"./ru.js\": 813,\n\t\"./sd\": 814,\n\t\"./sd.js\": 814,\n\t\"./se\": 815,\n\t\"./se.js\": 815,\n\t\"./si\": 816,\n\t\"./si.js\": 816,\n\t\"./sk\": 817,\n\t\"./sk.js\": 817,\n\t\"./sl\": 818,\n\t\"./sl.js\": 818,\n\t\"./sq\": 819,\n\t\"./sq.js\": 819,\n\t\"./sr\": 820,\n\t\"./sr-cyrl\": 821,\n\t\"./sr-cyrl.js\": 821,\n\t\"./sr.js\": 820,\n\t\"./ss\": 822,\n\t\"./ss.js\": 822,\n\t\"./sv\": 823,\n\t\"./sv.js\": 823,\n\t\"./sw\": 824,\n\t\"./sw.js\": 824,\n\t\"./ta\": 825,\n\t\"./ta.js\": 825,\n\t\"./te\": 826,\n\t\"./te.js\": 826,\n\t\"./tet\": 827,\n\t\"./tet.js\": 827,\n\t\"./tg\": 828,\n\t\"./tg.js\": 828,\n\t\"./th\": 829,\n\t\"./th.js\": 829,\n\t\"./tk\": 830,\n\t\"./tk.js\": 830,\n\t\"./tl-ph\": 831,\n\t\"./tl-ph.js\": 831,\n\t\"./tlh\": 832,\n\t\"./tlh.js\": 832,\n\t\"./tr\": 833,\n\t\"./tr.js\": 833,\n\t\"./tzl\": 834,\n\t\"./tzl.js\": 834,\n\t\"./tzm\": 835,\n\t\"./tzm-latn\": 836,\n\t\"./tzm-latn.js\": 836,\n\t\"./tzm.js\": 835,\n\t\"./ug-cn\": 837,\n\t\"./ug-cn.js\": 837,\n\t\"./uk\": 838,\n\t\"./uk.js\": 838,\n\t\"./ur\": 839,\n\t\"./ur.js\": 839,\n\t\"./uz\": 840,\n\t\"./uz-latn\": 841,\n\t\"./uz-latn.js\": 841,\n\t\"./uz.js\": 840,\n\t\"./vi\": 842,\n\t\"./vi.js\": 842,\n\t\"./x-pseudo\": 843,\n\t\"./x-pseudo.js\": 843,\n\t\"./yo\": 844,\n\t\"./yo.js\": 844,\n\t\"./zh-cn\": 845,\n\t\"./zh-cn.js\": 845,\n\t\"./zh-hk\": 846,\n\t\"./zh-hk.js\": 846,\n\t\"./zh-mo\": 847,\n\t\"./zh-mo.js\": 847,\n\t\"./zh-tw\": 848,\n\t\"./zh-tw.js\": 848\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 890;","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 891;","var $ = require('../internals/export');\nvar lastIndexOf = require('../internals/array-last-index-of');\n\n// `Array.prototype.lastIndexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\n// eslint-disable-next-line es/no-array-prototype-lastindexof -- required for testing\n$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {\n lastIndexOf: lastIndexOf\n});\n","var mathTrig = require(\"./math-trig\");\n\nvar statistical = require(\"./statistical\");\n\nvar engineering = require(\"./engineering\");\n\nvar dateTime = require(\"./date-time\");\n\nfunction set(fn, root) {\n if (root) {\n for (var i in root) {\n fn[i] = root[i];\n }\n }\n\n return fn;\n}\n\nexports.BETADIST = statistical.BETA.DIST;\nexports.BETAINV = statistical.BETA.INV;\nexports.BINOMDIST = statistical.BINOM.DIST;\nexports.CEILING = exports.ISOCEILING = set(mathTrig.CEILING.MATH, mathTrig.CEILING);\nexports.CEILINGMATH = mathTrig.CEILING.MATH;\nexports.CEILINGPRECISE = mathTrig.CEILING.PRECISE;\nexports.CHIDIST = statistical.CHISQ.DIST;\nexports.CHIDISTRT = statistical.CHISQ.DIST.RT;\nexports.CHIINV = statistical.CHISQ.INV;\nexports.CHIINVRT = statistical.CHISQ.INV.RT;\nexports.CHITEST = statistical.CHISQ.TEST;\nexports.CONFIDENCE = set(statistical.CONFIDENCE.NORM, statistical.CONFIDENCE);\nexports.COVAR = statistical.COVARIANCE.P;\nexports.COVARIANCEP = statistical.COVARIANCE.P;\nexports.COVARIANCES = statistical.COVARIANCE.S;\nexports.CRITBINOM = statistical.BINOM.INV;\nexports.EXPONDIST = statistical.EXPON.DIST;\nexports.ERFCPRECISE = engineering.ERFC.PRECISE;\nexports.ERFPRECISE = engineering.ERF.PRECISE;\nexports.FDIST = statistical.F.DIST;\nexports.FDISTRT = statistical.F.DIST.RT;\nexports.FINVRT = statistical.F.INV.RT;\nexports.FINV = statistical.F.INV;\nexports.FLOOR = set(mathTrig.FLOOR.MATH, mathTrig.FLOOR);\nexports.FLOORMATH = mathTrig.FLOOR.MATH;\nexports.FLOORPRECISE = mathTrig.FLOOR.PRECISE;\nexports.FTEST = statistical.F.TEST;\nexports.GAMMADIST = statistical.GAMMA.DIST;\nexports.GAMMAINV = statistical.GAMMA.INV;\nexports.GAMMALNPRECISE = statistical.GAMMALN.PRECISE;\nexports.HYPGEOMDIST = statistical.HYPGEOM.DIST;\nexports.LOGINV = statistical.LOGNORM.INV;\nexports.LOGNORMINV = statistical.LOGNORM.INV;\nexports.LOGNORMDIST = statistical.LOGNORM.DIST;\nexports.MODE = set(statistical.MODE.SNGL, statistical.MODE);\nexports.MODEMULT = statistical.MODE.MULT;\nexports.MODESNGL = statistical.MODE.SNGL;\nexports.NEGBINOMDIST = statistical.NEGBINOM.DIST;\nexports.NETWORKDAYSINTL = dateTime.NETWORKDAYS.INTL;\nexports.NORMDIST = statistical.NORM.DIST;\nexports.NORMINV = statistical.NORM.INV;\nexports.NORMSDIST = statistical.NORM.S.DIST;\nexports.NORMSINV = statistical.NORM.S.INV;\nexports.PERCENTILE = set(statistical.PERCENTILE.EXC, statistical.PERCENTILE);\nexports.PERCENTILEEXC = statistical.PERCENTILE.EXC;\nexports.PERCENTILEINC = statistical.PERCENTILE.INC;\nexports.PERCENTRANK = set(statistical.PERCENTRANK.INC, statistical.PERCENTRANK);\nexports.PERCENTRANKEXC = statistical.PERCENTRANK.EXC;\nexports.PERCENTRANKINC = statistical.PERCENTRANK.INC;\nexports.POISSON = set(statistical.POISSON.DIST, statistical.POISSON);\nexports.POISSONDIST = statistical.POISSON.DIST;\nexports.QUARTILE = set(statistical.QUARTILE.INC, statistical.QUARTILE);\nexports.QUARTILEEXC = statistical.QUARTILE.EXC;\nexports.QUARTILEINC = statistical.QUARTILE.INC;\nexports.RANK = set(statistical.RANK.EQ, statistical.RANK);\nexports.RANKAVG = statistical.RANK.AVG;\nexports.RANKEQ = statistical.RANK.EQ;\nexports.SKEWP = statistical.SKEW.P;\nexports.STDEV = set(statistical.STDEV.S, statistical.STDEV);\nexports.STDEVP = statistical.STDEV.P;\nexports.STDEVS = statistical.STDEV.S;\nexports.TDIST = statistical.T.DIST;\nexports.TDISTRT = statistical.T.DIST.RT;\nexports.TINV = statistical.T.INV;\nexports.TTEST = statistical.T.TEST;\nexports.VAR = set(statistical.VAR.S, statistical.VAR);\nexports.VARP = statistical.VAR.P;\nexports.VARS = statistical.VAR.S;\nexports.WEIBULL = set(statistical.WEIBULL.DIST, statistical.WEIBULL);\nexports.WEIBULLDIST = statistical.WEIBULL.DIST;\nexports.WORKDAYINTL = dateTime.WORKDAY.INTL;\nexports.ZTEST = statistical.Z.TEST;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* bessel.js (C) 2013-present SheetJS -- http://sheetjs.com */\n\n/* vim: set ts=2: */\n\n/*exported BESSEL */\nvar BESSEL;\n\n(function (factory) {\n /*jshint ignore:start */\n if (typeof DO_NOT_EXPORT_BESSEL === 'undefined') {\n if ('object' === (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports))) {\n factory(exports);\n } else if ('function' === typeof define && define.amd) {\n define(function () {\n var module = {};\n factory(module);\n return module;\n });\n } else {\n factory(BESSEL = {});\n }\n } else {\n factory(BESSEL = {});\n }\n /*jshint ignore:end */\n\n})(function (BESSEL) {\n BESSEL.version = '1.0.2';\n var M = Math;\n\n function _horner(arr, v) {\n for (var i = 0, z = 0; i < arr.length; ++i) {\n z = v * z + arr[i];\n }\n\n return z;\n }\n\n function _bessel_iter(x, n, f0, f1, sign) {\n if (n === 0) return f0;\n if (n === 1) return f1;\n var tdx = 2 / x,\n f2 = f1;\n\n for (var o = 1; o < n; ++o) {\n f2 = f1 * o * tdx + sign * f0;\n f0 = f1;\n f1 = f2;\n }\n\n return f2;\n }\n\n function _bessel_wrap(bessel0, bessel1, name, nonzero, sign) {\n return function bessel(x, n) {\n if (nonzero) {\n if (x === 0) return nonzero == 1 ? -Infinity : Infinity;else if (x < 0) return NaN;\n }\n\n if (n === 0) return bessel0(x);\n if (n === 1) return bessel1(x);\n if (n < 0) return NaN;\n n |= 0;\n var b0 = bessel0(x),\n b1 = bessel1(x);\n return _bessel_iter(x, n, b0, b1, sign);\n };\n }\n\n var besselj = function () {\n var W = 0.636619772; // 2 / Math.PI\n\n var b0_a1a = [57568490574.0, -13362590354.0, 651619640.7, -11214424.18, 77392.33017, -184.9052456].reverse();\n var b0_a2a = [57568490411.0, 1029532985.0, 9494680.718, 59272.64853, 267.8532712, 1.0].reverse();\n var b0_a1b = [1.0, -0.1098628627e-2, 0.2734510407e-4, -0.2073370639e-5, 0.2093887211e-6].reverse();\n var b0_a2b = [-0.1562499995e-1, 0.1430488765e-3, -0.6911147651e-5, 0.7621095161e-6, -0.934935152e-7].reverse();\n\n function bessel0(x) {\n var a = 0,\n a1 = 0,\n a2 = 0,\n y = x * x;\n\n if (x < 8) {\n a1 = _horner(b0_a1a, y);\n a2 = _horner(b0_a2a, y);\n a = a1 / a2;\n } else {\n var xx = x - 0.785398164;\n y = 64 / y;\n a1 = _horner(b0_a1b, y);\n a2 = _horner(b0_a2b, y);\n a = M.sqrt(W / x) * (M.cos(xx) * a1 - M.sin(xx) * a2 * 8 / x);\n }\n\n return a;\n }\n\n var b1_a1a = [72362614232.0, -7895059235.0, 242396853.1, -2972611.439, 15704.48260, -30.16036606].reverse();\n var b1_a2a = [144725228442.0, 2300535178.0, 18583304.74, 99447.43394, 376.9991397, 1.0].reverse();\n var b1_a1b = [1.0, 0.183105e-2, -0.3516396496e-4, 0.2457520174e-5, -0.240337019e-6].reverse();\n var b1_a2b = [0.04687499995, -0.2002690873e-3, 0.8449199096e-5, -0.88228987e-6, 0.105787412e-6].reverse();\n\n function bessel1(x) {\n var a = 0,\n a1 = 0,\n a2 = 0,\n y = x * x,\n xx = M.abs(x) - 2.356194491;\n\n if (Math.abs(x) < 8) {\n a1 = x * _horner(b1_a1a, y);\n a2 = _horner(b1_a2a, y);\n a = a1 / a2;\n } else {\n y = 64 / y;\n a1 = _horner(b1_a1b, y);\n a2 = _horner(b1_a2b, y);\n a = M.sqrt(W / M.abs(x)) * (M.cos(xx) * a1 - M.sin(xx) * a2 * 8 / M.abs(x));\n if (x < 0) a = -a;\n }\n\n return a;\n }\n\n return function besselj(x, n) {\n n = Math.round(n);\n if (!isFinite(x)) return isNaN(x) ? x : 0;\n if (n < 0) return (n % 2 ? -1 : 1) * besselj(x, -n);\n if (x < 0) return (n % 2 ? -1 : 1) * besselj(-x, n);\n if (n === 0) return bessel0(x);\n if (n === 1) return bessel1(x);\n if (x === 0) return 0;\n var ret = 0.0;\n\n if (x > n) {\n ret = _bessel_iter(x, n, bessel0(x), bessel1(x), -1);\n } else {\n var m = 2 * M.floor((n + M.floor(M.sqrt(40 * n))) / 2);\n var jsum = false;\n var bjp = 0.0,\n sum = 0.0;\n var bj = 1.0,\n bjm = 0.0;\n var tox = 2 / x;\n\n for (var j = m; j > 0; j--) {\n bjm = j * tox * bj - bjp;\n bjp = bj;\n bj = bjm;\n\n if (M.abs(bj) > 1E10) {\n bj *= 1E-10;\n bjp *= 1E-10;\n ret *= 1E-10;\n sum *= 1E-10;\n }\n\n if (jsum) sum += bj;\n jsum = !jsum;\n if (j == n) ret = bjp;\n }\n\n sum = 2.0 * sum - bj;\n ret /= sum;\n }\n\n return ret;\n };\n }();\n\n var bessely = function () {\n var W = 0.636619772;\n var b0_a1a = [-2957821389.0, 7062834065.0, -512359803.6, 10879881.29, -86327.92757, 228.4622733].reverse();\n var b0_a2a = [40076544269.0, 745249964.8, 7189466.438, 47447.26470, 226.1030244, 1.0].reverse();\n var b0_a1b = [1.0, -0.1098628627e-2, 0.2734510407e-4, -0.2073370639e-5, 0.2093887211e-6].reverse();\n var b0_a2b = [-0.1562499995e-1, 0.1430488765e-3, -0.6911147651e-5, 0.7621095161e-6, -0.934945152e-7].reverse();\n\n function bessel0(x) {\n var a = 0,\n a1 = 0,\n a2 = 0,\n y = x * x,\n xx = x - 0.785398164;\n\n if (x < 8) {\n a1 = _horner(b0_a1a, y);\n a2 = _horner(b0_a2a, y);\n a = a1 / a2 + W * besselj(x, 0) * M.log(x);\n } else {\n y = 64 / y;\n a1 = _horner(b0_a1b, y);\n a2 = _horner(b0_a2b, y);\n a = M.sqrt(W / x) * (M.sin(xx) * a1 + M.cos(xx) * a2 * 8 / x);\n }\n\n return a;\n }\n\n var b1_a1a = [-0.4900604943e13, 0.1275274390e13, -0.5153438139e11, 0.7349264551e9, -0.4237922726e7, 0.8511937935e4].reverse();\n var b1_a2a = [0.2499580570e14, 0.4244419664e12, 0.3733650367e10, 0.2245904002e8, 0.1020426050e6, 0.3549632885e3, 1].reverse();\n var b1_a1b = [1.0, 0.183105e-2, -0.3516396496e-4, 0.2457520174e-5, -0.240337019e-6].reverse();\n var b1_a2b = [0.04687499995, -0.2002690873e-3, 0.8449199096e-5, -0.88228987e-6, 0.105787412e-6].reverse();\n\n function bessel1(x) {\n var a = 0,\n a1 = 0,\n a2 = 0,\n y = x * x,\n xx = x - 2.356194491;\n\n if (x < 8) {\n a1 = x * _horner(b1_a1a, y);\n a2 = _horner(b1_a2a, y);\n a = a1 / a2 + W * (besselj(x, 1) * M.log(x) - 1 / x);\n } else {\n y = 64 / y;\n a1 = _horner(b1_a1b, y);\n a2 = _horner(b1_a2b, y);\n a = M.sqrt(W / x) * (M.sin(xx) * a1 + M.cos(xx) * a2 * 8 / x);\n }\n\n return a;\n }\n\n return _bessel_wrap(bessel0, bessel1, 'BESSELY', 1, -1);\n }();\n\n var besseli = function () {\n var b0_a = [1.0, 3.5156229, 3.0899424, 1.2067492, 0.2659732, 0.360768e-1, 0.45813e-2].reverse();\n var b0_b = [0.39894228, 0.1328592e-1, 0.225319e-2, -0.157565e-2, 0.916281e-2, -0.2057706e-1, 0.2635537e-1, -0.1647633e-1, 0.392377e-2].reverse();\n\n function bessel0(x) {\n if (x <= 3.75) return _horner(b0_a, x * x / (3.75 * 3.75));\n return M.exp(M.abs(x)) / M.sqrt(M.abs(x)) * _horner(b0_b, 3.75 / M.abs(x));\n }\n\n var b1_a = [0.5, 0.87890594, 0.51498869, 0.15084934, 0.2658733e-1, 0.301532e-2, 0.32411e-3].reverse();\n var b1_b = [0.39894228, -0.3988024e-1, -0.362018e-2, 0.163801e-2, -0.1031555e-1, 0.2282967e-1, -0.2895312e-1, 0.1787654e-1, -0.420059e-2].reverse();\n\n function bessel1(x) {\n if (x < 3.75) return x * _horner(b1_a, x * x / (3.75 * 3.75));\n return (x < 0 ? -1 : 1) * M.exp(M.abs(x)) / M.sqrt(M.abs(x)) * _horner(b1_b, 3.75 / M.abs(x));\n }\n\n return function besseli(x, n) {\n n = Math.round(n);\n if (n === 0) return bessel0(x);\n if (n === 1) return bessel1(x);\n if (n < 0) return NaN;\n if (M.abs(x) === 0) return 0;\n if (x == Infinity) return Infinity;\n var ret = 0.0,\n j,\n tox = 2 / M.abs(x),\n bip = 0.0,\n bi = 1.0,\n bim = 0.0;\n var m = 2 * M.round((n + M.round(M.sqrt(40 * n))) / 2);\n\n for (j = m; j > 0; j--) {\n bim = j * tox * bi + bip;\n bip = bi;\n bi = bim;\n\n if (M.abs(bi) > 1E10) {\n bi *= 1E-10;\n bip *= 1E-10;\n ret *= 1E-10;\n }\n\n if (j == n) ret = bip;\n }\n\n ret *= besseli(x, 0) / bi;\n return x < 0 && n % 2 ? -ret : ret;\n };\n }();\n\n var besselk = function () {\n var b0_a = [-0.57721566, 0.42278420, 0.23069756, 0.3488590e-1, 0.262698e-2, 0.10750e-3, 0.74e-5].reverse();\n var b0_b = [1.25331414, -0.7832358e-1, 0.2189568e-1, -0.1062446e-1, 0.587872e-2, -0.251540e-2, 0.53208e-3].reverse();\n\n function bessel0(x) {\n if (x <= 2) return -M.log(x / 2) * besseli(x, 0) + _horner(b0_a, x * x / 4);\n return M.exp(-x) / M.sqrt(x) * _horner(b0_b, 2 / x);\n }\n\n var b1_a = [1.0, 0.15443144, -0.67278579, -0.18156897, -0.1919402e-1, -0.110404e-2, -0.4686e-4].reverse();\n var b1_b = [1.25331414, 0.23498619, -0.3655620e-1, 0.1504268e-1, -0.780353e-2, 0.325614e-2, -0.68245e-3].reverse();\n\n function bessel1(x) {\n if (x <= 2) return M.log(x / 2) * besseli(x, 1) + 1 / x * _horner(b1_a, x * x / 4);\n return M.exp(-x) / M.sqrt(x) * _horner(b1_b, 2 / x);\n }\n\n return _bessel_wrap(bessel0, bessel1, 'BESSELK', 2, 1);\n }();\n\n BESSEL.besselj = besselj;\n BESSEL.bessely = bessely;\n BESSEL.besseli = besseli;\n BESSEL.besselk = besselk;\n});","var error = require(\"./utils/error\");\n\nvar stats = require(\"./statistical\");\n\nvar maths = require(\"./math-trig\");\n\nvar utils = require(\"./utils/common\");\n\nvar evalExpression = require(\"./utils/criteria-eval\");\n\nfunction compact(array) {\n var result = [];\n utils.arrayEach(array, function (value) {\n if (value) {\n result.push(value);\n }\n });\n return result;\n}\n\nexports.FINDFIELD = function (database, title) {\n var index = null;\n utils.arrayEach(database, function (value, i) {\n if (value[0] === title) {\n index = i;\n return false;\n }\n }); // Return error if the input field title is incorrect\n\n if (index == null) {\n return error.value;\n }\n\n return index;\n};\n\nfunction findResultIndex(database, criterias) {\n var matches = {};\n\n for (var i = 1; i < database[0].length; ++i) {\n matches[i] = true;\n }\n\n var maxCriteriaLength = criterias[0].length;\n\n for (i = 1; i < criterias.length; ++i) {\n if (criterias[i].length > maxCriteriaLength) {\n maxCriteriaLength = criterias[i].length;\n }\n }\n\n for (var k = 1; k < database.length; ++k) {\n for (var l = 1; l < database[k].length; ++l) {\n var currentCriteriaResult = false;\n var hasMatchingCriteria = false;\n\n for (var j = 0; j < criterias.length; ++j) {\n var criteria = criterias[j];\n\n if (criteria.length < maxCriteriaLength) {\n continue;\n }\n\n var criteriaField = criteria[0];\n\n if (database[k][0] !== criteriaField) {\n continue;\n }\n\n hasMatchingCriteria = true;\n\n for (var p = 1; p < criteria.length; ++p) {\n if (!currentCriteriaResult) {\n var isWildcard = criteria[p] === void 0 || criteria[p] === '*';\n\n if (isWildcard) {\n currentCriteriaResult = true;\n } else {\n var tokenizedCriteria = evalExpression.parse(criteria[p] + '');\n var tokens = [evalExpression.createToken(database[k][l], evalExpression.TOKEN_TYPE_LITERAL)].concat(tokenizedCriteria);\n currentCriteriaResult = evalExpression.compute(tokens);\n }\n }\n }\n }\n\n if (hasMatchingCriteria) {\n matches[l] = matches[l] && currentCriteriaResult;\n }\n }\n }\n\n var result = [];\n\n for (var n = 0; n < database[0].length; ++n) {\n if (matches[n]) {\n result.push(n - 1);\n }\n }\n\n return result;\n} // Database functions\n\n\nexports.DAVERAGE = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var sum = 0;\n utils.arrayEach(resultIndexes, function (value) {\n sum += targetFields[value];\n });\n return resultIndexes.length === 0 ? error.div0 : sum / resultIndexes.length;\n};\n\nexports.DCOUNT = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var targetValues = [];\n utils.arrayEach(resultIndexes, function (value) {\n targetValues.push(targetFields[value]);\n });\n return stats.COUNT(targetValues);\n};\n\nexports.DCOUNTA = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var targetValues = [];\n utils.arrayEach(resultIndexes, function (value) {\n targetValues.push(targetFields[value]);\n });\n return stats.COUNTA(targetValues);\n};\n\nexports.DGET = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n } // Return error if no record meets the criteria\n\n\n if (resultIndexes.length === 0) {\n return error.value;\n } // Returns the #NUM! error value because more than one record meets the\n // criteria\n\n\n if (resultIndexes.length > 1) {\n return error.num;\n }\n\n return targetFields[resultIndexes[0]];\n};\n\nexports.DMAX = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var maxValue = targetFields[resultIndexes[0]];\n utils.arrayEach(resultIndexes, function (value) {\n if (maxValue < targetFields[value]) {\n maxValue = targetFields[value];\n }\n });\n return maxValue;\n};\n\nexports.DMIN = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var minValue = targetFields[resultIndexes[0]];\n utils.arrayEach(resultIndexes, function (value) {\n if (minValue > targetFields[value]) {\n minValue = targetFields[value];\n }\n });\n return minValue;\n};\n\nexports.DPRODUCT = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var targetValues = [];\n utils.arrayEach(resultIndexes, function (value) {\n targetValues.push(targetFields[value]);\n });\n targetValues = compact(targetValues);\n var result = 1;\n utils.arrayEach(targetValues, function (value) {\n result *= value;\n });\n return result;\n};\n\nexports.DSTDEV = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var targetValues = [];\n utils.arrayEach(resultIndexes, function (value) {\n targetValues.push(targetFields[value]);\n });\n targetValues = compact(targetValues);\n return stats.STDEV.S(targetValues);\n};\n\nexports.DSTDEVP = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var targetValues = [];\n utils.arrayEach(resultIndexes, function (value) {\n targetValues.push(targetFields[value]);\n });\n targetValues = compact(targetValues);\n return stats.STDEV.P(targetValues);\n};\n\nexports.DSUM = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var targetValues = [];\n utils.arrayEach(resultIndexes, function (value) {\n targetValues.push(targetFields[value]);\n });\n return maths.SUM(targetValues);\n};\n\nexports.DVAR = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var targetValues = [];\n utils.arrayEach(resultIndexes, function (value) {\n targetValues.push(targetFields[value]);\n });\n return stats.VAR.S(targetValues);\n};\n\nexports.DVARP = function (database, field, criteria) {\n // Return error if field is not a number and not a string\n if (isNaN(field) && typeof field !== \"string\") {\n return error.value;\n }\n\n var resultIndexes = findResultIndex(database, criteria);\n var targetFields = [];\n\n if (typeof field === \"string\") {\n var index = exports.FINDFIELD(database, field);\n targetFields = utils.rest(database[index]);\n } else {\n targetFields = utils.rest(database[field]);\n }\n\n var targetValues = [];\n utils.arrayEach(resultIndexes, function (value) {\n targetValues.push(targetFields[value]);\n });\n return stats.VAR.P(targetValues);\n};","var error = require(\"./utils/error\");\n\nvar utils = require(\"./utils/common\");\n\nvar information = require(\"./information\");\n\nexports.AND = function () {\n var args = utils.flatten(arguments);\n var result = true;\n\n for (var i = 0; i < args.length; i++) {\n if (!args[i]) {\n result = false;\n }\n }\n\n return result;\n};\n\nexports.CHOOSE = function () {\n if (arguments.length < 2) {\n return error.na;\n }\n\n var index = arguments[0];\n\n if (index < 1 || index > 254) {\n return error.value;\n }\n\n if (arguments.length < index + 1) {\n return error.value;\n }\n\n return arguments[index];\n};\n\nexports.FALSE = function () {\n return false;\n};\n\nexports.IF = function (test, then_value, otherwise_value) {\n return test ? then_value : otherwise_value;\n};\n\nexports.IFERROR = function (value, valueIfError) {\n if (information.ISERROR(value)) {\n return valueIfError;\n }\n\n return value;\n};\n\nexports.IFNA = function (value, value_if_na) {\n return value === error.na ? value_if_na : value;\n};\n\nexports.NOT = function (logical) {\n return !logical;\n};\n\nexports.OR = function () {\n var args = utils.flatten(arguments);\n var result = false;\n\n for (var i = 0; i < args.length; i++) {\n if (args[i]) {\n result = true;\n }\n }\n\n return result;\n};\n\nexports.TRUE = function () {\n return true;\n};\n\nexports.XOR = function () {\n var args = utils.flatten(arguments);\n var result = 0;\n\n for (var i = 0; i < args.length; i++) {\n if (args[i]) {\n result++;\n }\n }\n\n return Math.floor(Math.abs(result)) & 1 ? true : false;\n};\n\nexports.SWITCH = function () {\n var result;\n\n if (arguments.length > 0) {\n var targetValue = arguments[0];\n var argc = arguments.length - 1;\n var switchCount = Math.floor(argc / 2);\n var switchSatisfied = false;\n var hasDefaultClause = argc % 2 !== 0;\n var defaultClause = argc % 2 === 0 ? null : arguments[arguments.length - 1];\n\n if (switchCount) {\n for (var index = 0; index < switchCount; index++) {\n if (targetValue === arguments[index * 2 + 1]) {\n result = arguments[index * 2 + 2];\n switchSatisfied = true;\n break;\n }\n }\n }\n\n if (!switchSatisfied) {\n result = hasDefaultClause ? defaultClause : error.na;\n }\n } else {\n result = error.value;\n }\n\n return result;\n};","var error = require(\"./utils/error\");\n\nvar dateTime = require(\"./date-time\");\n\nvar utils = require(\"./utils/common\");\n\nfunction validDate(d) {\n return d && d.getTime && !isNaN(d.getTime());\n}\n\nfunction ensureDate(d) {\n return d instanceof Date ? d : new Date(d);\n}\n\nexports.ACCRINT = function (issue, first, settlement, rate, par, frequency, basis) {\n // Return error if either date is invalid\n issue = ensureDate(issue);\n first = ensureDate(first);\n settlement = ensureDate(settlement);\n\n if (!validDate(issue) || !validDate(first) || !validDate(settlement)) {\n return error.value;\n } // Return error if either rate or par are lower than or equal to zero\n\n\n if (rate <= 0 || par <= 0) {\n return error.num;\n } // Return error if frequency is neither 1, 2, or 4\n\n\n if ([1, 2, 4].indexOf(frequency) === -1) {\n return error.num;\n } // Return error if basis is neither 0, 1, 2, 3, or 4\n\n\n if ([0, 1, 2, 3, 4].indexOf(basis) === -1) {\n return error.num;\n } // Return error if settlement is before or equal to issue\n\n\n if (settlement <= issue) {\n return error.num;\n } // Set default values\n\n\n par = par || 0;\n basis = basis || 0; // Compute accrued interest\n\n return par * rate * dateTime.YEARFRAC(issue, settlement, basis);\n}; // TODO\n\n\nexports.ACCRINTM = function () {\n throw new Error('ACCRINTM is not implemented');\n}; // TODO\n\n\nexports.AMORDEGRC = function () {\n throw new Error('AMORDEGRC is not implemented');\n}; // TODO\n\n\nexports.AMORLINC = function () {\n throw new Error('AMORLINC is not implemented');\n}; // TODO\n\n\nexports.COUPDAYBS = function () {\n throw new Error('COUPDAYBS is not implemented');\n}; // TODO\n\n\nexports.COUPDAYS = function () {\n throw new Error('COUPDAYS is not implemented');\n}; // TODO\n\n\nexports.COUPDAYSNC = function () {\n throw new Error('COUPDAYSNC is not implemented');\n}; // TODO\n\n\nexports.COUPNCD = function () {\n throw new Error('COUPNCD is not implemented');\n}; // TODO\n\n\nexports.COUPNUM = function () {\n throw new Error('COUPNUM is not implemented');\n}; // TODO\n\n\nexports.COUPPCD = function () {\n throw new Error('COUPPCD is not implemented');\n};\n\nexports.CUMIPMT = function (rate, periods, value, start, end, type) {\n // Credits: algorithm inspired by Apache OpenOffice\n // Credits: Hannes Stiebitzhofer for the translations of function and variable names\n // Requires exports.FV() and exports.PMT() from exports.js [http://stoic.com/exports/]\n rate = utils.parseNumber(rate);\n periods = utils.parseNumber(periods);\n value = utils.parseNumber(value);\n\n if (utils.anyIsError(rate, periods, value)) {\n return error.value;\n } // Return error if either rate, periods, or value are lower than or equal to zero\n\n\n if (rate <= 0 || periods <= 0 || value <= 0) {\n return error.num;\n } // Return error if start < 1, end < 1, or start > end\n\n\n if (start < 1 || end < 1 || start > end) {\n return error.num;\n } // Return error if type is neither 0 nor 1\n\n\n if (type !== 0 && type !== 1) {\n return error.num;\n } // Compute cumulative interest\n\n\n var payment = exports.PMT(rate, periods, value, 0, type);\n var interest = 0;\n\n if (start === 1) {\n if (type === 0) {\n interest = -value;\n start++;\n }\n }\n\n for (var i = start; i <= end; i++) {\n if (type === 1) {\n interest += exports.FV(rate, i - 2, payment, value, 1) - payment;\n } else {\n interest += exports.FV(rate, i - 1, payment, value, 0);\n }\n }\n\n interest *= rate; // Return cumulative interest\n\n return interest;\n};\n\nexports.CUMPRINC = function (rate, periods, value, start, end, type) {\n // Credits: algorithm inspired by Apache OpenOffice\n // Credits: Hannes Stiebitzhofer for the translations of function and variable names\n rate = utils.parseNumber(rate);\n periods = utils.parseNumber(periods);\n value = utils.parseNumber(value);\n\n if (utils.anyIsError(rate, periods, value)) {\n return error.value;\n } // Return error if either rate, periods, or value are lower than or equal to zero\n\n\n if (rate <= 0 || periods <= 0 || value <= 0) {\n return error.num;\n } // Return error if start < 1, end < 1, or start > end\n\n\n if (start < 1 || end < 1 || start > end) {\n return error.num;\n } // Return error if type is neither 0 nor 1\n\n\n if (type !== 0 && type !== 1) {\n return error.num;\n } // Compute cumulative principal\n\n\n var payment = exports.PMT(rate, periods, value, 0, type);\n var principal = 0;\n\n if (start === 1) {\n if (type === 0) {\n principal = payment + value * rate;\n } else {\n principal = payment;\n }\n\n start++;\n }\n\n for (var i = start; i <= end; i++) {\n if (type > 0) {\n principal += payment - (exports.FV(rate, i - 2, payment, value, 1) - payment) * rate;\n } else {\n principal += payment - exports.FV(rate, i - 1, payment, value, 0) * rate;\n }\n } // Return cumulative principal\n\n\n return principal;\n};\n\nexports.DB = function (cost, salvage, life, period, month) {\n // Initialize month\n month = month === undefined ? 12 : month;\n cost = utils.parseNumber(cost);\n salvage = utils.parseNumber(salvage);\n life = utils.parseNumber(life);\n period = utils.parseNumber(period);\n month = utils.parseNumber(month);\n\n if (utils.anyIsError(cost, salvage, life, period, month)) {\n return error.value;\n } // Return error if any of the parameters is negative\n\n\n if (cost < 0 || salvage < 0 || life < 0 || period < 0) {\n return error.num;\n } // Return error if month is not an integer between 1 and 12\n\n\n if ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].indexOf(month) === -1) {\n return error.num;\n } // Return error if period is greater than life\n\n\n if (period > life) {\n return error.num;\n } // Return 0 (zero) if salvage is greater than or equal to cost\n\n\n if (salvage >= cost) {\n return 0;\n } // Rate is rounded to three decimals places\n\n\n var rate = (1 - Math.pow(salvage / cost, 1 / life)).toFixed(3); // Compute initial depreciation\n\n var initial = cost * rate * month / 12; // Compute total depreciation\n\n var total = initial;\n var current = 0;\n var ceiling = period === life ? life - 1 : period;\n\n for (var i = 2; i <= ceiling; i++) {\n current = (cost - total) * rate;\n total += current;\n } // Depreciation for the first and last periods are special cases\n\n\n if (period === 1) {\n // First period\n return initial;\n } else if (period === life) {\n // Last period\n return (cost - total) * rate;\n } else {\n return current;\n }\n};\n\nexports.DDB = function (cost, salvage, life, period, factor) {\n // Initialize factor\n factor = factor === undefined ? 2 : factor;\n cost = utils.parseNumber(cost);\n salvage = utils.parseNumber(salvage);\n life = utils.parseNumber(life);\n period = utils.parseNumber(period);\n factor = utils.parseNumber(factor);\n\n if (utils.anyIsError(cost, salvage, life, period, factor)) {\n return error.value;\n } // Return error if any of the parameters is negative or if factor is null\n\n\n if (cost < 0 || salvage < 0 || life < 0 || period < 0 || factor <= 0) {\n return error.num;\n } // Return error if period is greater than life\n\n\n if (period > life) {\n return error.num;\n } // Return 0 (zero) if salvage is greater than or equal to cost\n\n\n if (salvage >= cost) {\n return 0;\n } // Compute depreciation\n\n\n var total = 0;\n var current = 0;\n\n for (var i = 1; i <= period; i++) {\n current = Math.min((cost - total) * (factor / life), cost - salvage - total);\n total += current;\n } // Return depreciation\n\n\n return current;\n}; // TODO\n\n\nexports.DISC = function () {\n throw new Error('DISC is not implemented');\n};\n\nexports.DOLLARDE = function (dollar, fraction) {\n // Credits: algorithm inspired by Apache OpenOffice\n dollar = utils.parseNumber(dollar);\n fraction = utils.parseNumber(fraction);\n\n if (utils.anyIsError(dollar, fraction)) {\n return error.value;\n } // Return error if fraction is negative\n\n\n if (fraction < 0) {\n return error.num;\n } // Return error if fraction is greater than or equal to 0 and less than 1\n\n\n if (fraction >= 0 && fraction < 1) {\n return error.div0;\n } // Truncate fraction if it is not an integer\n\n\n fraction = parseInt(fraction, 10); // Compute integer part\n\n var result = parseInt(dollar, 10); // Add decimal part\n\n result += dollar % 1 * Math.pow(10, Math.ceil(Math.log(fraction) / Math.LN10)) / fraction; // Round result\n\n var power = Math.pow(10, Math.ceil(Math.log(fraction) / Math.LN2) + 1);\n result = Math.round(result * power) / power; // Return converted dollar price\n\n return result;\n};\n\nexports.DOLLARFR = function (dollar, fraction) {\n // Credits: algorithm inspired by Apache OpenOffice\n dollar = utils.parseNumber(dollar);\n fraction = utils.parseNumber(fraction);\n\n if (utils.anyIsError(dollar, fraction)) {\n return error.value;\n } // Return error if fraction is negative\n\n\n if (fraction < 0) {\n return error.num;\n } // Return error if fraction is greater than or equal to 0 and less than 1\n\n\n if (fraction >= 0 && fraction < 1) {\n return error.div0;\n } // Truncate fraction if it is not an integer\n\n\n fraction = parseInt(fraction, 10); // Compute integer part\n\n var result = parseInt(dollar, 10); // Add decimal part\n\n result += dollar % 1 * Math.pow(10, -Math.ceil(Math.log(fraction) / Math.LN10)) * fraction; // Return converted dollar price\n\n return result;\n}; // TODO\n\n\nexports.DURATION = function () {\n throw new Error('DURATION is not implemented');\n};\n\nexports.EFFECT = function (rate, periods) {\n rate = utils.parseNumber(rate);\n periods = utils.parseNumber(periods);\n\n if (utils.anyIsError(rate, periods)) {\n return error.value;\n } // Return error if rate <=0 or periods < 1\n\n\n if (rate <= 0 || periods < 1) {\n return error.num;\n } // Truncate periods if it is not an integer\n\n\n periods = parseInt(periods, 10); // Return effective annual interest rate\n\n return Math.pow(1 + rate / periods, periods) - 1;\n};\n\nexports.FV = function (rate, periods, payment, value, type) {\n // Credits: algorithm inspired by Apache OpenOffice\n value = value || 0;\n type = type || 0;\n rate = utils.parseNumber(rate);\n periods = utils.parseNumber(periods);\n payment = utils.parseNumber(payment);\n value = utils.parseNumber(value);\n type = utils.parseNumber(type);\n\n if (utils.anyIsError(rate, periods, payment, value, type)) {\n return error.value;\n } // Return future value\n\n\n var result;\n\n if (rate === 0) {\n result = value + payment * periods;\n } else {\n var term = Math.pow(1 + rate, periods);\n\n if (type === 1) {\n result = value * term + payment * (1 + rate) * (term - 1) / rate;\n } else {\n result = value * term + payment * (term - 1) / rate;\n }\n }\n\n return -result;\n};\n\nexports.FVSCHEDULE = function (principal, schedule) {\n principal = utils.parseNumber(principal);\n schedule = utils.parseNumberArray(utils.flatten(schedule));\n\n if (utils.anyIsError(principal, schedule)) {\n return error.value;\n }\n\n var n = schedule.length;\n var future = principal; // Apply all interests in schedule\n\n for (var i = 0; i < n; i++) {\n // Apply scheduled interest\n future *= 1 + schedule[i];\n } // Return future value\n\n\n return future;\n}; // TODO\n\n\nexports.INTRATE = function () {\n throw new Error('INTRATE is not implemented');\n};\n\nexports.IPMT = function (rate, period, periods, present, future, type) {\n // Credits: algorithm inspired by Apache OpenOffice\n future = future || 0;\n type = type || 0;\n rate = utils.parseNumber(rate);\n period = utils.parseNumber(period);\n periods = utils.parseNumber(periods);\n present = utils.parseNumber(present);\n future = utils.parseNumber(future);\n type = utils.parseNumber(type);\n\n if (utils.anyIsError(rate, period, periods, present, future, type)) {\n return error.value;\n } // Compute payment\n\n\n var payment = exports.PMT(rate, periods, present, future, type); // Compute interest\n\n var interest;\n\n if (period === 1) {\n if (type === 1) {\n interest = 0;\n } else {\n interest = -present;\n }\n } else {\n if (type === 1) {\n interest = exports.FV(rate, period - 2, payment, present, 1) - payment;\n } else {\n interest = exports.FV(rate, period - 1, payment, present, 0);\n }\n } // Return interest\n\n\n return interest * rate;\n};\n\nexports.IRR = function (values, guess) {\n // Credits: algorithm inspired by Apache OpenOffice\n guess = guess || 0;\n values = utils.parseNumberArray(utils.flatten(values));\n guess = utils.parseNumber(guess);\n\n if (utils.anyIsError(values, guess)) {\n return error.value;\n } // Calculates the resulting amount\n\n\n var irrResult = function irrResult(values, dates, rate) {\n var r = rate + 1;\n var result = values[0];\n\n for (var i = 1; i < values.length; i++) {\n result += values[i] / Math.pow(r, (dates[i] - dates[0]) / 365);\n }\n\n return result;\n }; // Calculates the first derivation\n\n\n var irrResultDeriv = function irrResultDeriv(values, dates, rate) {\n var r = rate + 1;\n var result = 0;\n\n for (var i = 1; i < values.length; i++) {\n var frac = (dates[i] - dates[0]) / 365;\n result -= frac * values[i] / Math.pow(r, frac + 1);\n }\n\n return result;\n }; // Initialize dates and check that values contains at least one positive value and one negative value\n\n\n var dates = [];\n var positive = false;\n var negative = false;\n\n for (var i = 0; i < values.length; i++) {\n dates[i] = i === 0 ? 0 : dates[i - 1] + 365;\n\n if (values[i] > 0) {\n positive = true;\n }\n\n if (values[i] < 0) {\n negative = true;\n }\n } // Return error if values does not contain at least one positive value and one negative value\n\n\n if (!positive || !negative) {\n return error.num;\n } // Initialize guess and resultRate\n\n\n guess = guess === undefined ? 0.1 : guess;\n var resultRate = guess; // Set maximum epsilon for end of iteration\n\n var epsMax = 1e-10; // Implement Newton's method\n\n var newRate, epsRate, resultValue;\n var contLoop = true;\n\n do {\n resultValue = irrResult(values, dates, resultRate);\n newRate = resultRate - resultValue / irrResultDeriv(values, dates, resultRate);\n epsRate = Math.abs(newRate - resultRate);\n resultRate = newRate;\n contLoop = epsRate > epsMax && Math.abs(resultValue) > epsMax;\n } while (contLoop); // Return internal rate of return\n\n\n return resultRate;\n};\n\nexports.ISPMT = function (rate, period, periods, value) {\n rate = utils.parseNumber(rate);\n period = utils.parseNumber(period);\n periods = utils.parseNumber(periods);\n value = utils.parseNumber(value);\n\n if (utils.anyIsError(rate, period, periods, value)) {\n return error.value;\n } // Return interest\n\n\n return value * rate * (period / periods - 1);\n}; // TODO\n\n\nexports.MDURATION = function () {\n throw new Error('MDURATION is not implemented');\n};\n\nexports.MIRR = function (values, finance_rate, reinvest_rate) {\n values = utils.parseNumberArray(utils.flatten(values));\n finance_rate = utils.parseNumber(finance_rate);\n reinvest_rate = utils.parseNumber(reinvest_rate);\n\n if (utils.anyIsError(values, finance_rate, reinvest_rate)) {\n return error.value;\n } // Initialize number of values\n\n\n var n = values.length; // Lookup payments (negative values) and incomes (positive values)\n\n var payments = [];\n var incomes = [];\n\n for (var i = 0; i < n; i++) {\n if (values[i] < 0) {\n payments.push(values[i]);\n } else {\n incomes.push(values[i]);\n }\n } // Return modified internal rate of return\n\n\n var num = -exports.NPV(reinvest_rate, incomes) * Math.pow(1 + reinvest_rate, n - 1);\n var den = exports.NPV(finance_rate, payments) * (1 + finance_rate);\n return Math.pow(num / den, 1 / (n - 1)) - 1;\n};\n\nexports.NOMINAL = function (rate, periods) {\n rate = utils.parseNumber(rate);\n periods = utils.parseNumber(periods);\n\n if (utils.anyIsError(rate, periods)) {\n return error.value;\n } // Return error if rate <=0 or periods < 1\n\n\n if (rate <= 0 || periods < 1) {\n return error.num;\n } // Truncate periods if it is not an integer\n\n\n periods = parseInt(periods, 10); // Return nominal annual interest rate\n\n return (Math.pow(rate + 1, 1 / periods) - 1) * periods;\n};\n\nexports.NPER = function (rate, payment, present, future, type) {\n type = type === undefined ? 0 : type;\n future = future === undefined ? 0 : future;\n rate = utils.parseNumber(rate);\n payment = utils.parseNumber(payment);\n present = utils.parseNumber(present);\n future = utils.parseNumber(future);\n type = utils.parseNumber(type);\n\n if (utils.anyIsError(rate, payment, present, future, type)) {\n return error.value;\n } // Return number of periods\n\n\n var num = payment * (1 + rate * type) - future * rate;\n var den = present * rate + payment * (1 + rate * type);\n return Math.log(num / den) / Math.log(1 + rate);\n};\n\nexports.NPV = function () {\n var args = utils.parseNumberArray(utils.flatten(arguments));\n\n if (args instanceof Error) {\n return args;\n } // Lookup rate\n\n\n var rate = args[0]; // Initialize net present value\n\n var value = 0; // Loop on all values\n\n for (var j = 1; j < args.length; j++) {\n value += args[j] / Math.pow(1 + rate, j);\n } // Return net present value\n\n\n return value;\n}; // TODO\n\n\nexports.ODDFPRICE = function () {\n throw new Error('ODDFPRICE is not implemented');\n}; // TODO\n\n\nexports.ODDFYIELD = function () {\n throw new Error('ODDFYIELD is not implemented');\n}; // TODO\n\n\nexports.ODDLPRICE = function () {\n throw new Error('ODDLPRICE is not implemented');\n}; // TODO\n\n\nexports.ODDLYIELD = function () {\n throw new Error('ODDLYIELD is not implemented');\n};\n\nexports.PDURATION = function (rate, present, future) {\n rate = utils.parseNumber(rate);\n present = utils.parseNumber(present);\n future = utils.parseNumber(future);\n\n if (utils.anyIsError(rate, present, future)) {\n return error.value;\n } // Return error if rate <=0\n\n\n if (rate <= 0) {\n return error.num;\n } // Return number of periods\n\n\n return (Math.log(future) - Math.log(present)) / Math.log(1 + rate);\n};\n\nexports.PMT = function (rate, periods, present, future, type) {\n // Credits: algorithm inspired by Apache OpenOffice\n future = future || 0;\n type = type || 0;\n rate = utils.parseNumber(rate);\n periods = utils.parseNumber(periods);\n present = utils.parseNumber(present);\n future = utils.parseNumber(future);\n type = utils.parseNumber(type);\n\n if (utils.anyIsError(rate, periods, present, future, type)) {\n return error.value;\n } // Return payment\n\n\n var result;\n\n if (rate === 0) {\n result = (present + future) / periods;\n } else {\n var term = Math.pow(1 + rate, periods);\n\n if (type === 1) {\n result = (future * rate / (term - 1) + present * rate / (1 - 1 / term)) / (1 + rate);\n } else {\n result = future * rate / (term - 1) + present * rate / (1 - 1 / term);\n }\n }\n\n return -result;\n};\n\nexports.PPMT = function (rate, period, periods, present, future, type) {\n future = future || 0;\n type = type || 0;\n rate = utils.parseNumber(rate);\n periods = utils.parseNumber(periods);\n present = utils.parseNumber(present);\n future = utils.parseNumber(future);\n type = utils.parseNumber(type);\n\n if (utils.anyIsError(rate, periods, present, future, type)) {\n return error.value;\n }\n\n return exports.PMT(rate, periods, present, future, type) - exports.IPMT(rate, period, periods, present, future, type);\n}; // TODO\n\n\nexports.PRICE = function () {\n throw new Error('PRICE is not implemented');\n}; // TODO\n\n\nexports.PRICEDISC = function () {\n throw new Error('PRICEDISC is not implemented');\n}; // TODO\n\n\nexports.PRICEMAT = function () {\n throw new Error('PRICEMAT is not implemented');\n};\n\nexports.PV = function (rate, periods, payment, future, type) {\n future = future || 0;\n type = type || 0;\n rate = utils.parseNumber(rate);\n periods = utils.parseNumber(periods);\n payment = utils.parseNumber(payment);\n future = utils.parseNumber(future);\n type = utils.parseNumber(type);\n\n if (utils.anyIsError(rate, periods, payment, future, type)) {\n return error.value;\n } // Return present value\n\n\n if (rate === 0) {\n return -payment * periods - future;\n } else {\n return ((1 - Math.pow(1 + rate, periods)) / rate * payment * (1 + rate * type) - future) / Math.pow(1 + rate, periods);\n }\n};\n\nexports.RATE = function (periods, payment, present, future, type, guess) {\n // Credits: rabugento\n guess = guess === undefined ? 0.01 : guess;\n future = future === undefined ? 0 : future;\n type = type === undefined ? 0 : type;\n periods = utils.parseNumber(periods);\n payment = utils.parseNumber(payment);\n present = utils.parseNumber(present);\n future = utils.parseNumber(future);\n type = utils.parseNumber(type);\n guess = utils.parseNumber(guess);\n\n if (utils.anyIsError(periods, payment, present, future, type, guess)) {\n return error.value;\n } // Set maximum epsilon for end of iteration\n\n\n var epsMax = 1e-10; // Set maximum number of iterations\n\n var iterMax = 50; // Implement Newton's method\n\n var y,\n y0,\n y1,\n x0,\n x1 = 0,\n f = 0,\n i = 0;\n var rate = guess;\n\n if (Math.abs(rate) < epsMax) {\n y = present * (1 + periods * rate) + payment * (1 + rate * type) * periods + future;\n } else {\n f = Math.exp(periods * Math.log(1 + rate));\n y = present * f + payment * (1 / rate + type) * (f - 1) + future;\n }\n\n y0 = present + payment * periods + future;\n y1 = present * f + payment * (1 / rate + type) * (f - 1) + future;\n i = x0 = 0;\n x1 = rate;\n\n while (Math.abs(y0 - y1) > epsMax && i < iterMax) {\n rate = (y1 * x0 - y0 * x1) / (y1 - y0);\n x0 = x1;\n x1 = rate;\n\n if (Math.abs(rate) < epsMax) {\n y = present * (1 + periods * rate) + payment * (1 + rate * type) * periods + future;\n } else {\n f = Math.exp(periods * Math.log(1 + rate));\n y = present * f + payment * (1 / rate + type) * (f - 1) + future;\n }\n\n y0 = y1;\n y1 = y;\n ++i;\n }\n\n return rate;\n}; // TODO\n\n\nexports.RECEIVED = function () {\n throw new Error('RECEIVED is not implemented');\n};\n\nexports.RRI = function (periods, present, future) {\n periods = utils.parseNumber(periods);\n present = utils.parseNumber(present);\n future = utils.parseNumber(future);\n\n if (utils.anyIsError(periods, present, future)) {\n return error.value;\n } // Return error if periods or present is equal to 0 (zero)\n\n\n if (periods === 0 || present === 0) {\n return error.num;\n } // Return equivalent interest rate\n\n\n return Math.pow(future / present, 1 / periods) - 1;\n};\n\nexports.SLN = function (cost, salvage, life) {\n cost = utils.parseNumber(cost);\n salvage = utils.parseNumber(salvage);\n life = utils.parseNumber(life);\n\n if (utils.anyIsError(cost, salvage, life)) {\n return error.value;\n } // Return error if life equal to 0 (zero)\n\n\n if (life === 0) {\n return error.num;\n } // Return straight-line depreciation\n\n\n return (cost - salvage) / life;\n};\n\nexports.SYD = function (cost, salvage, life, period) {\n // Return error if any of the parameters is not a number\n cost = utils.parseNumber(cost);\n salvage = utils.parseNumber(salvage);\n life = utils.parseNumber(life);\n period = utils.parseNumber(period);\n\n if (utils.anyIsError(cost, salvage, life, period)) {\n return error.value;\n } // Return error if life equal to 0 (zero)\n\n\n if (life === 0) {\n return error.num;\n } // Return error if period is lower than 1 or greater than life\n\n\n if (period < 1 || period > life) {\n return error.num;\n } // Truncate period if it is not an integer\n\n\n period = parseInt(period, 10); // Return straight-line depreciation\n\n return (cost - salvage) * (life - period + 1) * 2 / (life * (life + 1));\n};\n\nexports.TBILLEQ = function (settlement, maturity, discount) {\n settlement = utils.parseDate(settlement);\n maturity = utils.parseDate(maturity);\n discount = utils.parseNumber(discount);\n\n if (utils.anyIsError(settlement, maturity, discount)) {\n return error.value;\n } // Return error if discount is lower than or equal to zero\n\n\n if (discount <= 0) {\n return error.num;\n } // Return error if settlement is greater than maturity\n\n\n if (settlement > maturity) {\n return error.num;\n } // Return error if maturity is more than one year after settlement\n\n\n if (maturity - settlement > 365 * 24 * 60 * 60 * 1000) {\n return error.num;\n } // Return bond-equivalent yield\n\n\n return 365 * discount / (360 - discount * dateTime.DAYS360(settlement, maturity, false));\n};\n\nexports.TBILLPRICE = function (settlement, maturity, discount) {\n settlement = utils.parseDate(settlement);\n maturity = utils.parseDate(maturity);\n discount = utils.parseNumber(discount);\n\n if (utils.anyIsError(settlement, maturity, discount)) {\n return error.value;\n } // Return error if discount is lower than or equal to zero\n\n\n if (discount <= 0) {\n return error.num;\n } // Return error if settlement is greater than maturity\n\n\n if (settlement > maturity) {\n return error.num;\n } // Return error if maturity is more than one year after settlement\n\n\n if (maturity - settlement > 365 * 24 * 60 * 60 * 1000) {\n return error.num;\n } // Return bond-equivalent yield\n\n\n return 100 * (1 - discount * dateTime.DAYS360(settlement, maturity, false) / 360);\n};\n\nexports.TBILLYIELD = function (settlement, maturity, price) {\n settlement = utils.parseDate(settlement);\n maturity = utils.parseDate(maturity);\n price = utils.parseNumber(price);\n\n if (utils.anyIsError(settlement, maturity, price)) {\n return error.value;\n } // Return error if price is lower than or equal to zero\n\n\n if (price <= 0) {\n return error.num;\n } // Return error if settlement is greater than maturity\n\n\n if (settlement > maturity) {\n return error.num;\n } // Return error if maturity is more than one year after settlement\n\n\n if (maturity - settlement > 365 * 24 * 60 * 60 * 1000) {\n return error.num;\n } // Return bond-equivalent yield\n\n\n return (100 - price) * 360 / (price * dateTime.DAYS360(settlement, maturity, false));\n}; // TODO\n\n\nexports.VDB = function () {\n throw new Error('VDB is not implemented');\n}; // TODO needs better support for date\n// exports.XIRR = function(values, dates, guess) {\n// // Credits: algorithm inspired by Apache OpenOffice\n//\n// values = utils.parseNumberArray(utils.flatten(values));\n// dates = utils.parseDateArray(utils.flatten(dates));\n// guess = utils.parseNumber(guess);\n//\n// if (utils.anyIsError(values, dates, guess)) {\n// return error.value;\n// }\n//\n// // Calculates the resulting amount\n// var irrResult = function(values, dates, rate) {\n// var r = rate + 1;\n// var result = values[0];\n// for (var i = 1; i < values.length; i++) {\n// result += values[i] / Math.pow(r, dateTime.DAYS(dates[i], dates[0]) / 365);\n// }\n// return result;\n// };\n//\n// // Calculates the first derivation\n// var irrResultDeriv = function(values, dates, rate) {\n// var r = rate + 1;\n// var result = 0;\n// for (var i = 1; i < values.length; i++) {\n// var frac = dateTime.DAYS(dates[i], dates[0]) / 365;\n// result -= frac * values[i] / Math.pow(r, frac + 1);\n// }\n// return result;\n// };\n//\n// // Check that values contains at least one positive value and one negative value\n// var positive = false;\n// var negative = false;\n// for (var i = 0; i < values.length; i++) {\n// if (values[i] > 0) {\n// positive = true;\n// }\n// if (values[i] < 0) {\n// negative = true;\n// }\n// }\n//\n// // Return error if values does not contain at least one positive value and one negative value\n// if (!positive || !negative) {\n// return error.num;\n// }\n//\n// // Initialize guess and resultRate\n// guess = guess || 0.1;\n// var resultRate = guess;\n//\n// // Set maximum epsilon for end of iteration\n// var epsMax = 1e-10;\n//\n// // Implement Newton's method\n// var newRate, epsRate, resultValue;\n// var contLoop = true;\n// do {\n// resultValue = irrResult(values, dates, resultRate);\n// newRate = resultRate - resultValue / irrResultDeriv(values, dates, resultRate);\n// epsRate = Math.abs(newRate - resultRate);\n// resultRate = newRate;\n// contLoop = (epsRate > epsMax) && (Math.abs(resultValue) > epsMax);\n// } while (contLoop);\n//\n// // Return internal rate of return\n// return resultRate;\n// };\n\n\nexports.XNPV = function (rate, values, dates) {\n rate = utils.parseNumber(rate);\n values = utils.parseNumberArray(utils.flatten(values));\n dates = utils.parseDateArray(utils.flatten(dates));\n\n if (utils.anyIsError(rate, values, dates)) {\n return error.value;\n }\n\n var result = 0;\n\n for (var i = 0; i < values.length; i++) {\n result += values[i] / Math.pow(1 + rate, dateTime.DAYS(dates[i], dates[0]) / 365);\n }\n\n return result;\n}; // TODO\n\n\nexports.YIELD = function () {\n throw new Error('YIELD is not implemented');\n}; // TODO\n\n\nexports.YIELDDISC = function () {\n throw new Error('YIELDDISC is not implemented');\n}; // TODO\n\n\nexports.YIELDMAT = function () {\n throw new Error('YIELDMAT is not implemented');\n};","var error = require(\"./utils/error\");\n\nvar utils = require(\"./utils/common\");\n\nexports.MATCH = function (lookupValue, lookupArray, matchType) {\n if (!lookupValue && !lookupArray) {\n return error.na;\n }\n\n if (arguments.length === 2) {\n matchType = 1;\n }\n\n if (!(lookupArray instanceof Array)) {\n return error.na;\n }\n\n if (matchType !== -1 && matchType !== 0 && matchType !== 1) {\n return error.na;\n }\n\n var index;\n var indexValue;\n\n for (var idx = 0; idx < lookupArray.length; idx++) {\n if (matchType === 1) {\n if (lookupArray[idx] === lookupValue) {\n return idx + 1;\n } else if (lookupArray[idx] < lookupValue) {\n if (!indexValue) {\n index = idx + 1;\n indexValue = lookupArray[idx];\n } else if (lookupArray[idx] > indexValue) {\n index = idx + 1;\n indexValue = lookupArray[idx];\n }\n }\n } else if (matchType === 0) {\n if (typeof lookupValue === 'string') {\n lookupValue = lookupValue.replace(/\\?/g, '.');\n\n if (lookupArray[idx].toLowerCase().match(lookupValue.toLowerCase())) {\n return idx + 1;\n }\n } else {\n if (lookupArray[idx] === lookupValue) {\n return idx + 1;\n }\n }\n } else if (matchType === -1) {\n if (lookupArray[idx] === lookupValue) {\n return idx + 1;\n } else if (lookupArray[idx] > lookupValue) {\n if (!indexValue) {\n index = idx + 1;\n indexValue = lookupArray[idx];\n } else if (lookupArray[idx] < indexValue) {\n index = idx + 1;\n indexValue = lookupArray[idx];\n }\n }\n }\n }\n\n return index ? index : error.na;\n};\n\nexports.VLOOKUP = function (needle, table, index, rangeLookup) {\n if (!needle || !table || !index) {\n return error.na;\n }\n\n rangeLookup = rangeLookup || false;\n\n for (var i = 0; i < table.length; i++) {\n var row = table[i];\n\n if (!rangeLookup && row[0] === needle || row[0] === needle || rangeLookup && typeof row[0] === \"string\" && row[0].toLowerCase().indexOf(needle.toLowerCase()) !== -1) {\n return index < row.length + 1 ? row[index - 1] : error.ref;\n }\n }\n\n return error.na;\n};\n\nexports.HLOOKUP = function (needle, table, index, rangeLookup) {\n if (!needle || !table || !index) {\n return error.na;\n }\n\n rangeLookup = rangeLookup || false;\n var transposedTable = utils.transpose(table);\n\n for (var i = 0; i < transposedTable.length; i++) {\n var row = transposedTable[i];\n\n if (!rangeLookup && row[0] === needle || row[0] === needle || rangeLookup && typeof row[0] === \"string\" && row[0].toLowerCase().indexOf(needle.toLowerCase()) !== -1) {\n return index < row.length + 1 ? row[index - 1] : error.ref;\n }\n }\n\n return error.na;\n};","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--2-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--2-2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal.vue?vue&type=style&index=0&id=81279c68&scoped=true&lang=css&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--2-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--2-2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./modal_form.vue?vue&type=style&index=0&id=68a0cffe&scoped=true&lang=css&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--2-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--2-2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./materialize_checkboxes.vue?vue&type=style&index=0&lang=css&\"","module.exports = __webpack_public_path__ + \"media/home/logo_dark-6ab49ab5.svg\";","module.exports = __webpack_public_path__ + \"media/home/logo_white-f2e0513a.svg\";","module.exports = __webpack_public_path__ + \"media/home/logo-12a285f6.svg\";","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--2-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--2-2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./form_field.vue?vue&type=style&index=0&scooped=true&lang=css&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./job_applications.vue?vue&type=style&index=0&id=23df17c0&scoped=true&lang=scss&\"","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*! Lity - v2.4.1 - 2020-04-26\n* http://sorgalla.com/lity/\n* Copyright (c) 2015-2020 Jan Sorgalla; Licensed MIT */\n(function (window, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], function ($) {\n return factory(window, $);\n });\n } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && _typeof(module.exports) === 'object') {\n module.exports = factory(window, require('jquery'));\n } else {\n window.lity = factory(window, window.jQuery || window.Zepto);\n }\n})(typeof window !== \"undefined\" ? window : this, function (window, $) {\n 'use strict';\n\n var document = window.document;\n\n var _win = $(window);\n\n var _deferred = $.Deferred;\n\n var _html = $('html');\n\n var _instances = [];\n var _attrAriaHidden = 'aria-hidden';\n\n var _dataAriaHidden = 'lity-' + _attrAriaHidden;\n\n var _focusableElementsSelector = 'a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^=\"-\"])';\n var _defaultOptions = {\n esc: true,\n handler: null,\n handlers: {\n image: imageHandler,\n inline: inlineHandler,\n youtube: youtubeHandler,\n vimeo: vimeoHandler,\n googlemaps: googlemapsHandler,\n facebookvideo: facebookvideoHandler,\n iframe: iframeHandler\n },\n template: ''\n };\n var _imageRegexp = /(^data:image\\/)|(\\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\\?\\S*)?$)/i;\n var _youtubeRegex = /(youtube(-nocookie)?\\.com|youtu\\.be)\\/(watch\\?v=|v\\/|u\\/|embed\\/?)?([\\w-]{11})(.*)?/i;\n var _vimeoRegex = /(vimeo(pro)?.com)\\/(?:[^\\d]+)?(\\d+)\\??(.*)?$/;\n var _googlemapsRegex = /((maps|www)\\.)?google\\.([^\\/\\?]+)\\/?((maps\\/?)?\\?)(.*)/i;\n var _facebookvideoRegex = /(facebook\\.com)\\/([a-z0-9_-]*)\\/videos\\/([0-9]*)(.*)?$/i;\n\n var _transitionEndEvent = function () {\n var el = document.createElement('div');\n var transEndEventNames = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n };\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return transEndEventNames[name];\n }\n }\n\n return false;\n }();\n\n function transitionEnd(element) {\n var deferred = _deferred();\n\n if (!_transitionEndEvent || !element.length) {\n deferred.resolve();\n } else {\n element.one(_transitionEndEvent, deferred.resolve);\n setTimeout(deferred.resolve, 500);\n }\n\n return deferred.promise();\n }\n\n function settings(currSettings, key, value) {\n if (arguments.length === 1) {\n return $.extend({}, currSettings);\n }\n\n if (typeof key === 'string') {\n if (typeof value === 'undefined') {\n return typeof currSettings[key] === 'undefined' ? null : currSettings[key];\n }\n\n currSettings[key] = value;\n } else {\n $.extend(currSettings, key);\n }\n\n return this;\n }\n\n function parseQueryParams(params) {\n var pairs = decodeURI(params.split('#')[0]).split('&');\n var obj = {},\n p;\n\n for (var i = 0, n = pairs.length; i < n; i++) {\n if (!pairs[i]) {\n continue;\n }\n\n p = pairs[i].split('=');\n obj[p[0]] = p[1];\n }\n\n return obj;\n }\n\n function appendQueryParams(url, params) {\n return url + (url.indexOf('?') > -1 ? '&' : '?') + $.param(params);\n }\n\n function transferHash(originalUrl, newUrl) {\n var pos = originalUrl.indexOf('#');\n\n if (-1 === pos) {\n return newUrl;\n }\n\n if (pos > 0) {\n originalUrl = originalUrl.substr(pos);\n }\n\n return newUrl + originalUrl;\n }\n\n function error(msg) {\n return $(' ').append(msg);\n }\n\n function imageHandler(target, instance) {\n var desc = instance.opener() && instance.opener().data('lity-desc') || 'Image with no description';\n var img = $(' ');\n\n var deferred = _deferred();\n\n var failed = function failed() {\n deferred.reject(error('Failed loading image'));\n };\n\n img.on('load', function () {\n if (this.naturalWidth === 0) {\n return failed();\n }\n\n deferred.resolve(img);\n }).on('error', failed);\n return deferred.promise();\n }\n\n imageHandler.test = function (target) {\n return _imageRegexp.test(target);\n };\n\n function inlineHandler(target, instance) {\n var el, placeholder, hasHideClass;\n\n try {\n el = $(target);\n } catch (e) {\n return false;\n }\n\n if (!el.length) {\n return false;\n }\n\n placeholder = $(' ');\n hasHideClass = el.hasClass('lity-hide');\n instance.element().one('lity:remove', function () {\n placeholder.before(el).remove();\n\n if (hasHideClass && !el.closest('.lity-content').length) {\n el.addClass('lity-hide');\n }\n });\n return el.removeClass('lity-hide').after(placeholder);\n }\n\n function youtubeHandler(target) {\n var matches = _youtubeRegex.exec(target);\n\n if (!matches) {\n return false;\n }\n\n return iframeHandler(transferHash(target, appendQueryParams('https://www.youtube' + (matches[2] || '') + '.com/embed/' + matches[4], $.extend({\n autoplay: 1\n }, parseQueryParams(matches[5] || '')))));\n }\n\n function vimeoHandler(target) {\n var matches = _vimeoRegex.exec(target);\n\n if (!matches) {\n return false;\n }\n\n return iframeHandler(transferHash(target, appendQueryParams('https://player.vimeo.com/video/' + matches[3], $.extend({\n autoplay: 1\n }, parseQueryParams(matches[4] || '')))));\n }\n\n function facebookvideoHandler(target) {\n var matches = _facebookvideoRegex.exec(target);\n\n if (!matches) {\n return false;\n }\n\n if (0 !== target.indexOf('http')) {\n target = 'https:' + target;\n }\n\n return iframeHandler(transferHash(target, appendQueryParams('https://www.facebook.com/plugins/video.php?href=' + target, $.extend({\n autoplay: 1\n }, parseQueryParams(matches[4] || '')))));\n }\n\n function googlemapsHandler(target) {\n var matches = _googlemapsRegex.exec(target);\n\n if (!matches) {\n return false;\n }\n\n return iframeHandler(transferHash(target, appendQueryParams('https://www.google.' + matches[3] + '/maps?' + matches[6], {\n output: matches[6].indexOf('layer=c') > 0 ? 'svembed' : 'embed'\n })));\n }\n\n function iframeHandler(target) {\n return '
';\n }\n\n function winHeight() {\n return document.documentElement.clientHeight ? document.documentElement.clientHeight : Math.round(_win.height());\n }\n\n function keydown(e) {\n var current = currentInstance();\n\n if (!current) {\n return;\n } // ESC key\n\n\n if (e.keyCode === 27 && !!current.options('esc')) {\n current.close();\n } // TAB key\n\n\n if (e.keyCode === 9) {\n handleTabKey(e, current);\n }\n }\n\n function handleTabKey(e, instance) {\n var focusableElements = instance.element().find(_focusableElementsSelector);\n var focusedIndex = focusableElements.index(document.activeElement);\n\n if (e.shiftKey && focusedIndex <= 0) {\n focusableElements.get(focusableElements.length - 1).focus();\n e.preventDefault();\n } else if (!e.shiftKey && focusedIndex === focusableElements.length - 1) {\n focusableElements.get(0).focus();\n e.preventDefault();\n }\n }\n\n function resize() {\n $.each(_instances, function (i, instance) {\n instance.resize();\n });\n }\n\n function registerInstance(instanceToRegister) {\n if (1 === _instances.unshift(instanceToRegister)) {\n _html.addClass('lity-active');\n\n _win.on({\n resize: resize,\n keydown: keydown\n });\n }\n\n $('body > *').not(instanceToRegister.element()).addClass('lity-hidden').each(function () {\n var el = $(this);\n\n if (undefined !== el.data(_dataAriaHidden)) {\n return;\n }\n\n el.data(_dataAriaHidden, el.attr(_attrAriaHidden) || null);\n }).attr(_attrAriaHidden, 'true');\n }\n\n function removeInstance(instanceToRemove) {\n var show;\n instanceToRemove.element().attr(_attrAriaHidden, 'true');\n\n if (1 === _instances.length) {\n _html.removeClass('lity-active');\n\n _win.off({\n resize: resize,\n keydown: keydown\n });\n }\n\n _instances = $.grep(_instances, function (instance) {\n return instanceToRemove !== instance;\n });\n\n if (!!_instances.length) {\n show = _instances[0].element();\n } else {\n show = $('.lity-hidden');\n }\n\n show.removeClass('lity-hidden').each(function () {\n var el = $(this),\n oldAttr = el.data(_dataAriaHidden);\n\n if (!oldAttr) {\n el.removeAttr(_attrAriaHidden);\n } else {\n el.attr(_attrAriaHidden, oldAttr);\n }\n\n el.removeData(_dataAriaHidden);\n });\n }\n\n function currentInstance() {\n if (0 === _instances.length) {\n return null;\n }\n\n return _instances[0];\n }\n\n function factory(target, instance, handlers, preferredHandler) {\n var handler = 'inline',\n content;\n var currentHandlers = $.extend({}, handlers);\n\n if (preferredHandler && currentHandlers[preferredHandler]) {\n content = currentHandlers[preferredHandler](target, instance);\n handler = preferredHandler;\n } else {\n // Run inline and iframe handlers after all other handlers\n $.each(['inline', 'iframe'], function (i, name) {\n delete currentHandlers[name];\n currentHandlers[name] = handlers[name];\n });\n $.each(currentHandlers, function (name, currentHandler) {\n // Handler might be \"removed\" by setting callback to null\n if (!currentHandler) {\n return true;\n }\n\n if (currentHandler.test && !currentHandler.test(target, instance)) {\n return true;\n }\n\n content = currentHandler(target, instance);\n\n if (false !== content) {\n handler = name;\n return false;\n }\n });\n }\n\n return {\n handler: handler,\n content: content || ''\n };\n }\n\n function Lity(target, options, opener, activeElement) {\n var self = this;\n var result;\n var isReady = false;\n var isClosed = false;\n var element;\n var content;\n options = $.extend({}, _defaultOptions, options);\n element = $(options.template); // -- API --\n\n self.element = function () {\n return element;\n };\n\n self.opener = function () {\n return opener;\n };\n\n self.options = $.proxy(settings, self, options);\n self.handlers = $.proxy(settings, self, options.handlers);\n\n self.resize = function () {\n if (!isReady || isClosed) {\n return;\n }\n\n content.css('max-height', winHeight() + 'px').trigger('lity:resize', [self]);\n };\n\n self.close = function () {\n if (!isReady || isClosed) {\n return;\n }\n\n isClosed = true;\n removeInstance(self);\n\n var deferred = _deferred(); // We return focus only if the current focus is inside this instance\n\n\n if (activeElement && (document.activeElement === element[0] || $.contains(element[0], document.activeElement))) {\n try {\n activeElement.focus();\n } catch (e) {// Ignore exceptions, eg. for SVG elements which can't be\n // focused in IE11\n }\n }\n\n content.trigger('lity:close', [self]);\n element.removeClass('lity-opened').addClass('lity-closed');\n transitionEnd(content.add(element)).always(function () {\n content.trigger('lity:remove', [self]);\n element.remove();\n element = undefined;\n deferred.resolve();\n });\n return deferred.promise();\n }; // -- Initialization --\n\n\n result = factory(target, self, options.handlers, options.handler);\n element.attr(_attrAriaHidden, 'false').addClass('lity-loading lity-opened lity-' + result.handler).appendTo('body').focus().on('click', '[data-lity-close]', function (e) {\n if ($(e.target).is('[data-lity-close]')) {\n self.close();\n }\n }).trigger('lity:open', [self]);\n registerInstance(self);\n $.when(result.content).always(ready);\n\n function ready(result) {\n content = $(result).css('max-height', winHeight() + 'px');\n element.find('.lity-loader').each(function () {\n var loader = $(this);\n transitionEnd(loader).always(function () {\n loader.remove();\n });\n });\n element.removeClass('lity-loading').find('.lity-content').empty().append(content);\n isReady = true;\n content.trigger('lity:ready', [self]);\n }\n }\n\n function lity(target, options, opener) {\n if (!target.preventDefault) {\n opener = $(opener);\n } else {\n target.preventDefault();\n opener = $(this);\n target = opener.data('lity-target') || opener.attr('href') || opener.attr('src');\n }\n\n var instance = new Lity(target, $.extend({}, opener.data('lity-options') || opener.data('lity'), options), opener, document.activeElement);\n\n if (!target.preventDefault) {\n return instance;\n }\n }\n\n lity.version = '2.4.1';\n lity.options = $.proxy(settings, lity, _defaultOptions);\n lity.handlers = $.proxy(settings, lity, _defaultOptions.handlers);\n lity.current = currentInstance;\n $(document).on('click.lity', '[data-lity]', lity);\n return lity;\n});","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\n\nconst channels = require.context('.', true, /_channel\\.js$/)\nchannels.keys().forEach(channels)\n","var map = {\n\t\"./ra08_channel.js\": 923\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 922;","import { getGlobalObject } from \"./misc\";\nimport { dynamicRequire, isNodeEnv } from \"./node\";\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\n\nvar dateTimestampSource = {\n nowSeconds: function nowSeconds() {\n return Date.now() / 1000;\n }\n};\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\n\nfunction getBrowserPerformance() {\n var performance = getGlobalObject().performance;\n\n if (!performance || !performance.now) {\n return undefined;\n } // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n\n\n var timeOrigin = Date.now() - performance.now();\n return {\n now: function now() {\n return performance.now();\n },\n timeOrigin: timeOrigin\n };\n}\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\n\n\nfunction getNodePerformance() {\n try {\n var perfHooks = dynamicRequire(module, 'perf_hooks');\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n/**\n * The Performance API implementation for the current platform, if available.\n */\n\n\nvar platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\nvar timestampSource = platformPerformance === undefined ? dateTimestampSource : {\n nowSeconds: function nowSeconds() {\n return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000;\n }\n};\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\n\nexport var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\n\nexport var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource); // Re-exported with an old name for backwards-compatibility.\n\nexport var timestampWithMs = timestampInSeconds;\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\n\nexport var usingPerformanceAPI = platformPerformance !== undefined;\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\n\nexport var _browserPerformanceTimeOriginMode;\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\n\nexport var browserPerformanceTimeOrigin = function () {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n var performance = getGlobalObject().performance;\n\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n var threshold = 3600 * 1000;\n var performanceNow = performance.now();\n var dateNow = Date.now(); // if timeOrigin isn't available set delta to threshold so it isn't used\n\n var timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold;\n var timeOriginIsReliable = timeOriginDelta < threshold; // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n\n var navigationStart = performance.timing && performance.timing.navigationStart;\n var hasNavigationStart = typeof navigationStart === 'number'; // if navigationStart isn't available set delta to threshold so it isn't used\n\n var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n var navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n } // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n\n\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n}();","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./visitors_form.vue?vue&type=style&index=0&lang=scss&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../node_modules/css-loader/dist/cjs.js??ref--3-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--3-2!../../../node_modules/sass-loader/dist/cjs.js??ref--3-3!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./jss_calculator.vue?vue&type=style&index=0&id=a8066938&scoped=true&lang=scss&\"","\n \n
{{visitorTemplate.name}}
\n
\n \n\n\n \n \n
\n\n \n \n
Basic Information \n
\n
\n
0\">\n
{{getCurrentDateTime()}}
\n
\n
\n \n
\n
\n
\n
\n
Disclaimer: \n
\n By providing personal data through this declaration form, you authorise {{visitor.company_name}} to collect, use, process and disclose personal data provided for the purpose of verifying your identity, screening your health status and maintaining records of visitors to {{visitor.company_name}} premises for contact tracing purposes, to ensure our safety and security. The information collated will be securely discarded after 1 month. \n \n
\n\n
\n \n \n {{ backText }}\n \n \n Next\n \n \n Submit\n \n \n \n
\n \n\n\n\n\n\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./visitors_form.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./visitors_form.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./visitors_form.vue?vue&type=template&id=88cc9242&\"\nimport script from \"./visitors_form.vue?vue&type=script&lang=js&\"\nexport * from \"./visitors_form.vue?vue&type=script&lang=js&\"\nimport style0 from \"./visitors_form.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\",style:(_vm.steps === 1 ? 'padding-bottom: 0.5rem' : 'padding-bottom: 4.5rem')},[_c('p',{staticStyle:{\"font-size\":\"1.5rem\",\"font-weight\":\"600\"}},[_vm._v(_vm._s(_vm.visitorTemplate.name))]),_vm._v(\" \"),_c('materialize-form',{ref:\"form\",staticClass:\"form-font-size\",attrs:{\"action\":_vm.formEndpoint,\"modelName\":\"visitor\"},scopedSlots:_vm._u([{key:\"footer\",fn:function(){return [_c('a',{staticClass:\"btn btn-default \",on:{\"click\":function($event){$event.preventDefault();return _vm.goBack($event)}}},[_vm._v(\"\\n \"+_vm._s(_vm.backText)+\"\\n \")]),_vm._v(\" \"),(_vm.steps == 1)?_c('button',{staticClass:\"btn btn-default\",on:{\"click\":function($event){$event.preventDefault();return _vm.goNext($event)}}},[_vm._v(\"\\n Next\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.steps == 2)?_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"submit\"},on:{\"click\":function($event){$event.preventDefault();return _vm.goNext($event)}}},[_vm._v(\"\\n Submit\\n \")]):_vm._e()]},proxy:true}]),model:{value:(_vm.visitor),callback:function ($$v) {_vm.visitor=$$v},expression:\"visitor\"}},[_c('div',{staticClass:\"company-name-header-container\"},[_c('p',[_vm._v(_vm._s(_vm.visitor.company_name))]),_vm._v(\" \"),_c('div',_vm._l((_vm.outletNamesArr),function(outletName){return _c('small',{key:outletName},[_vm._v(\"\\n \"+_vm._s(outletName)+\"\\n \")])}),0)]),_vm._v(\" \"),(_vm.steps == 1)?_c('div',{staticClass:\"card-panel\"},[_c('materialize-input',{staticClass:\"col s12 m6\",attrs:{\"label\":\"Mobile Number\",\"errors\":_vm.visitor.errors.phone_number,\"required\":true,\"type\":\"number\"},model:{value:(_vm.visitor.phone_number),callback:function ($$v) {_vm.$set(_vm.visitor, \"phone_number\", $$v)},expression:\"visitor.phone_number\"}})],1):_vm._e(),_vm._v(\" \"),(_vm.steps == 2)?_c('div',{staticClass:\"card-panel\"},[_c('h5',[_vm._v(\"Basic Information\")]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('div',{staticClass:\"form-inputs row\"},[_c('materialize-input',{staticClass:\"col s12 m6\",attrs:{\"label\":\"Name (as per NRIC)\",\"errors\":_vm.visitor.errors.name,\"required\":true,\"disabled\":this.visitor.id != null},model:{value:(_vm.visitor.name),callback:function ($$v) {_vm.$set(_vm.visitor, \"name\", $$v)},expression:\"visitor.name\"}}),_vm._v(\" \"),_c('materialize-input',{staticClass:\"col s12 m6\",attrs:{\"label\":\"Mobile Number\",\"errors\":_vm.visitor.errors.phone_number,\"required\":true,\"disabled\":true,\"type\":\"number\"},model:{value:(_vm.visitor.phone_number),callback:function ($$v) {_vm.$set(_vm.visitor, \"phone_number\", $$v)},expression:\"visitor.phone_number\"}}),_vm._v(\" \"),(_vm.visitor.visitor_form_records[_vm.visitor.visitor_form_records.length - 1].visitor_template.identity_number_enabled)?_c('materialize-input',{staticClass:\"col s12 m6\",attrs:{\"label\":\"Primary Identity Number\",\"disabled\":this.visitor.id != null,\"errors\":_vm.visitor.errors.identity_number,\"required\":_vm.visitor.visitor_form_records[_vm.visitor.visitor_form_records.length - 1].visitor_template.identity_number_required},model:{value:(_vm.visitor.identity_number),callback:function ($$v) {_vm.$set(_vm.visitor, \"identity_number\", $$v)},expression:\"visitor.identity_number\"}}):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),(_vm.showPhotoField)?_c('span',[(this.visitor.id == null)?_c('div',{staticClass:\"col s12 m6\",staticStyle:{\"margin-bottom\":\"1rem\"}},[_c('label',{attrs:{\"for\":\"image-file\"}},[_vm._v(\"Upload your selfie image\")]),_vm._v(\" \"),_c('input',{staticClass:\"photo-upload\",attrs:{\"id\":\"image-file\",\"type\":\"file\",\"accept\":\"image/*\"},on:{\"change\":function($event){return _vm.createPhoto($event)}}}),_vm._v(\" \"),(_vm.visitor.errors.photo)?_c('span',{staticClass:\"error-block\"},[_vm._v(_vm._s(_vm.visitor.errors.photo[0]))]):_vm._e()]):_c('div',{staticClass:\"col m12 l4\"},[_c('img',{attrs:{\"id\":\"photo_id\",\"src\":_vm.visitor.photo.url,\"alt\":\"photo\",\"width\":\"100%\"}})])]):_vm._e()],1),_vm._v(\" \"),(_vm.visitor.visitor_form_records[_vm.visitor.visitor_form_records.length - 1].visitor_template.questions.length > 0)?_c('div',{staticClass:\"card-panel visitor-form-fields\",staticStyle:{\"padding\":\"1rem\"}},[_c('div',[_vm._v(_vm._s(_vm.getCurrentDateTime()))]),_vm._v(\" \"),_c('div',{staticClass:\"divider\"}),_vm._v(\" \"),_vm._l((_vm.visitor.visitor_form_records[_vm.visitor.visitor_form_records.length - 1].visitor_template.questions),function(question,question_index){return _c('div',{key:question_index},[_c('form-field',{staticStyle:{\"margin\":\"1.5rem\"},attrs:{\"field\":question,\"answer\":_vm.visitor.visitor_form_records[_vm.visitor.visitor_form_records.length - 1].answers.find(function (answer) { return answer.question_id === question.id; }),\"canEdit\":true}})],1)})],2):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"divider\"}),_vm._v(\" \"),_c('div',{staticClass:\"description\"},[_c('strong',[_vm._v(\"Disclaimer:\")]),_vm._v(\" \"),_c('ul',[_c('li',[_vm._v(\"By providing personal data through this declaration form, you authorise \"+_vm._s(_vm.visitor.company_name)+\" to collect, use, process and disclose personal data provided for the purpose of verifying your identity, screening your health status and maintaining records of visitors to \"+_vm._s(_vm.visitor.company_name)+\" premises for contact tracing purposes, to ensure our safety and security. The information collated will be securely discarded after 1 month.\")])])])]):_vm._e()])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contact_us.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./contact_us.vue?vue&type=script&lang=js&\"","\n \n \n Tell us what you need \n We'll get back to you in 48 hours or call us at (+65) 9684 8620
\n \n \n
\n \n \n \n \n
\n
\n \n
\n
\n \n \n\n\n","import { render, staticRenderFns } from \"./contact_us.vue?vue&type=template&id=41f9e7f2&\"\nimport script from \"./contact_us.vue?vue&type=script&lang=js&\"\nexport * from \"./contact_us.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('modal-form',{attrs:{\"action\":\"contact\",\"modelName\":\"contact\",\"submitText\":\"Submit\",\"showModal\":_vm.showModal},on:{\"close\":function($event){_vm.showModal = false},\"success\":_vm.onSuccess},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_c('h4',[_vm._v(\"Tell us what you need\")]),_vm._v(\" \"),_c('p',[_vm._v(\"We'll get back to you in 48 hours or call us at (+65) 9684 8620\")])]},proxy:true}]),model:{value:(_vm.contact),callback:function ($$v) {_vm.contact=$$v},expression:\"contact\"}},[_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col s12 m4\"},[_c('materialize-input',{attrs:{\"label\":\"Your Company\",\"errors\":_vm.contact.errors.company,\"placeholder\":\"ACME Pte. Ltd.\",\"required\":true},model:{value:(_vm.contact.company),callback:function ($$v) {_vm.$set(_vm.contact, \"company\", $$v)},expression:\"contact.company\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Your Name\",\"errors\":_vm.contact.errors.name,\"placeholder\":\"John Smith\",\"required\":true},model:{value:(_vm.contact.name),callback:function ($$v) {_vm.$set(_vm.contact, \"name\", $$v)},expression:\"contact.name\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Email\",\"errors\":_vm.contact.errors.email,\"placeholder\":\"rick@morty.com\",\"required\":true},model:{value:(_vm.contact.email),callback:function ($$v) {_vm.$set(_vm.contact, \"email\", $$v)},expression:\"contact.email\"}}),_vm._v(\" \"),_c('materialize-input',{attrs:{\"label\":\"Phone Number\",\"errors\":_vm.contact.errors.phone_number,\"placeholder\":\"91238888\"},model:{value:(_vm.contact.phone_number),callback:function ($$v) {_vm.$set(_vm.contact, \"phone_number\", $$v)},expression:\"contact.phone_number\"}})],1),_vm._v(\" \"),_c('div',{staticClass:\"col s12 m8\"},[_c('materialize-input',{attrs:{\"label\":\"Your Message\",\"errors\":_vm.contact.errors.message,\"type\":\"textarea\",\"placeholder\":\"Hi!\",\"required\":true},model:{value:(_vm.contact.message),callback:function ($$v) {_vm.$set(_vm.contact, \"message\", $$v)},expression:\"contact.message\"}})],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./jss_calculator.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--7-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./jss_calculator.vue?vue&type=script&lang=js&\"","\n \n
\n
\n \n
\n
\n
\n Payout Month: \n \n \n \n {{payoutMonthOption}}\n \n \n
\n
\n Payout Tier: \n \n \n \n {{tierOption}}\n \n \n
\n
\n
\n\n
\n\n
\n \n
\n
\n
Total Gross Salary: ${{this.totalGrossSalary}} \n \n \n {{this.hotSettings.colHeaders[0]}} Eligible Gross Salary ${{this.colATotal}} \n \n {{this.hotSettings.colHeaders[1]}} Eligible Gross Salary ${{this.colBTotal}} \n \n {{this.hotSettings.colHeaders[2]}} Eligible Gross Salary ${{this.colCTotal}} \n \n {{this.hotSettings.colHeaders[3]}} Eligible Gross Salary ${{this.colDTotal}} \n \n \n {{this.hotSettings.colHeaders[0]}} Support ({{this.percentage[0]}}): ${{this.supportAmount[0]}} \n \n {{this.hotSettings.colHeaders[1]}} Support ({{this.percentage[1]}}): ${{this.supportAmount[1]}} \n \n {{this.hotSettings.colHeaders[2]}} Support ({{this.percentage[2]}}): ${{this.supportAmount[2]}} \n \n {{this.hotSettings.colHeaders[3]}} Support ({{this.percentage[3]}}): ${{this.supportAmount[3]}} \n \n \n Total JSS Payout: ${{this.totalJSSPayout}} \n \n
\n
\n
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./jss_calculator.vue?vue&type=template&id=a8066938&scoped=true&\"\nimport script from \"./jss_calculator.vue?vue&type=script&lang=js&\"\nexport * from \"./jss_calculator.vue?vue&type=script&lang=js&\"\nimport style0 from \"./jss_calculator.vue?vue&type=style&index=0&id=a8066938&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"a8066938\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"section\"},[_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"step-1\",staticStyle:{\"margin-bottom\":\"50px\"}},[_c('h3',{staticClass:\"header-text\"},[_vm._v(\"Step 1\")]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',{staticClass:\"step-1-content\"},[_c('div',{staticClass:\"select-container\"},[_c('label',{staticClass:\"select-label\"},[_vm._v(\"Payout Month:\")]),_vm._v(\" \"),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedPayoutMonth),expression:\"selectedPayoutMonth\"}],staticClass:\"select\",on:{\"change\":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.selectedPayoutMonth=$event.target.multiple ? $$selectedVal : $$selectedVal[0]},this.updateTotal]}},_vm._l((_vm.payoutMonthOptions),function(payoutMonthOption){return _c('option',{key:payoutMonthOption,attrs:{\"disabled\":((_vm.selectedPayoutTier == 'Tier 3A' || _vm.selectedPayoutTier == 'Tier 3B') &&\n (payoutMonthOption == 'Apr 2020' || payoutMonthOption == 'May 2020' || payoutMonthOption == 'Jul 2020' || payoutMonthOption == 'Oct 2020')) ||\n (_vm.selectedPayoutTier == 'Tier 3' && (payoutMonthOption == 'Mar 2021' || payoutMonthOption == 'Jun 2021')) || (_vm.selectedPayoutTier == 'Tier 3B' && payoutMonthOption == 'Jun 2021')}},[_vm._v(\"\\n \"+_vm._s(payoutMonthOption)+\"\\n \")])}),0)]),_vm._v(\" \"),_c('div',{staticClass:\"select-container\"},[_c('label',{staticClass:\"select-label\"},[_vm._v(\"Payout Tier:\")]),_vm._v(\" \"),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedPayoutTier),expression:\"selectedPayoutTier\"}],staticClass:\"select\",attrs:{\"disabled\":_vm.selectedPayoutMonth == 'May 2020'},on:{\"change\":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.selectedPayoutTier=$event.target.multiple ? $$selectedVal : $$selectedVal[0]},this.updateTotal]}},_vm._l((_vm.tierOptions),function(tierOption){return _c('option',{key:tierOption,attrs:{\"disabled\":((tierOption == 'Tier 3A' || tierOption == 'Tier 3B') &&\n (_vm.selectedPayoutMonth == 'Apr 2020' || _vm.selectedPayoutMonth == 'Jul 2020' || _vm.selectedPayoutMonth == 'Oct 2020')) ||\n (tierOption == 'Tier 3' && _vm.selectedPayoutMonth == 'Mar 2021') || (tierOption == 'Tier 3B' && _vm.selectedPayoutMonth == 'Jun 2021')}},[_vm._v(\"\\n \"+_vm._s(tierOption)+\"\\n \")])}),0)])])]),_vm._v(\" \"),_c('div',{staticClass:\"step-2\",staticStyle:{\"margin-bottom\":\"50px\"}},[_c('h3',{staticClass:\"header-text\"},[_vm._v(\"Step 2\")]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',{staticClass:\"table-container\"},[_c('hot-table',{ref:\"hotTable\",staticClass:\"hot-table\",attrs:{\"data\":_vm.data,\"settings\":_vm.hotSettings,\"licenseKey\":\"non-commercial-and-evaluation\"}})],1)]),_vm._v(\" \"),_c('div',{staticClass:\"step-3\",staticStyle:{\"margin-bottom\":\"50px\"}},[_c('h3',{staticClass:\"header-text\"},[_vm._v(\"Result\")]),_vm._v(\" \"),_c('hr'),_vm._v(\" \"),_c('div',{staticClass:\"step-3-content\"},[_c('h5',[_c('strong',[_vm._v(\"Total Gross Salary:\")]),_vm._v(\" $\"+_vm._s(this.totalGrossSalary))]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('h5',[_c('strong',[_vm._v(_vm._s(this.hotSettings.colHeaders[0])+\" Eligible Gross Salary\")]),_vm._v(\" $\"+_vm._s(this.colATotal))]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),(this.hotSettings.colHeaders[1] != null)?_c('h5',[_c('strong',[_vm._v(_vm._s(this.hotSettings.colHeaders[1])+\" Eligible Gross Salary\")]),_vm._v(\" $\"+_vm._s(this.colBTotal))]):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),(this.hotSettings.colHeaders[2] != null)?_c('h5',[_c('strong',[_vm._v(_vm._s(this.hotSettings.colHeaders[2])+\" Eligible Gross Salary\")]),_vm._v(\" $\"+_vm._s(this.colCTotal))]):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),(this.hotSettings.colHeaders[3] != null)?_c('h5',[_c('strong',[_vm._v(_vm._s(this.hotSettings.colHeaders[3])+\" Eligible Gross Salary\")]),_vm._v(\" $\"+_vm._s(this.colDTotal))]):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('h5',[_c('strong',[_vm._v(_vm._s(this.hotSettings.colHeaders[0])+\" Support (\"+_vm._s(this.percentage[0])+\"):\")]),_vm._v(\" $\"+_vm._s(this.supportAmount[0]))]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),(this.hotSettings.colHeaders[1] != null)?_c('h5',[_c('strong',[_vm._v(_vm._s(this.hotSettings.colHeaders[1])+\" Support (\"+_vm._s(this.percentage[1])+\"):\")]),_vm._v(\" $\"+_vm._s(this.supportAmount[1]))]):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),(this.hotSettings.colHeaders[2] != null)?_c('h5',[_c('strong',[_vm._v(_vm._s(this.hotSettings.colHeaders[2])+\" Support (\"+_vm._s(this.percentage[2])+\"):\")]),_vm._v(\" $\"+_vm._s(this.supportAmount[2]))]):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),(this.hotSettings.colHeaders[3] != null)?_c('h5',[_c('strong',[_vm._v(_vm._s(this.hotSettings.colHeaders[3])+\" Support (\"+_vm._s(this.percentage[3])+\"):\")]),_vm._v(\" $\"+_vm._s(this.supportAmount[3]))]):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('h5',[_c('strong',[_vm._v(\"Total JSS Payout:\")]),_vm._v(\" $\"+_vm._s(this.totalJSSPayout))])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. This pack is used for public pages in the home controller.\n//\n// This file is referenced by adding <%= javascript_pack_tag 'public' %> to the\n// layout file in app/views/layouts/application.html.erb\n\nimport \"core-js/stable\";\nimport \"regenerator-runtime/runtime\";\nimport 'lity';\nimport 'lity/dist/lity.min.css';\nimport Vue from 'vue';\nimport '../styles/tooltip.scss';\nimport '../util/setup';\nimport Tooltip from 'tooltip.js/dist/esm/tooltip';\nimport VueScrollTo from 'vue-scrollto';\nimport VModal from 'vue-js-modal'\nimport VTooltip from 'v-tooltip';\nimport JobApplicationsForm from '../forms/job_applications.vue';\nimport VisitorsForm from '../forms/visitors/visitors_form.vue';\n\nimport ContactUsForm from '../forms/contact_us.vue';\nimport JssCalculator from '../forms/jss_calculator.vue';\nimport \"channels\";\n\n// import RegisterForm from '../forms/register.vue';\n\n\nVue.use(VueScrollTo); // auto-scroll to element on page\nVue.use(VTooltip, { delay: 0, defaultClass: 'payboy-tooltip' });\nVue.use(VModal)\nwindow.Tooltip = Tooltip;\n\ndocument.addEventListener('turbolinks:load', () => {\n if (document.getElementById('contact-us-form')) {\n const contactUsForm = new Vue(ContactUsForm).$mount('#contact-us-form');\n document.getElementById('contact-us-modal-trigger').addEventListener('click', () => {\n contactUsForm.openModal();\n });\n } else if (document.getElementById('job-applications-form')) {\n new Vue({ render: h => h(JobApplicationsForm) }).$mount('#job-applications-form');\n } else if (document.getElementById('visitors-form')) {\n new Vue({ render: h => h(VisitorsForm) }).$mount('#visitors-form');\n } else if (document.getElementById('jss-calculator')) {\n new Vue({ render: h => h(JssCalculator) }).$mount('#jss-calculator');\n };\n});\n\n//Confirm modal for Job Application Upload Documents remove button\n(function() {\n window.swalConfirm = function(title, text) {\n if (text == null) {\n text = '';\n }\n return swal({\n title: title,\n text: text,\n type: 'warning',\n confirmButtonText: 'OK',\n confirmButtonColor: '#5d7885',\n showCancelButton: true\n });\n };\n\n}).call(this);"],"sourceRoot":""}