diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml new file mode 100644 index 00000000..714a5853 --- /dev/null +++ b/.idea/jsLibraryMappings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/cookbook/static/tabulator/tabulator.min.js b/cookbook/static/tabulator/tabulator.min.js new file mode 100644 index 00000000..623efb1e --- /dev/null +++ b/cookbook/static/tabulator/tabulator.min.js @@ -0,0 +1,11 @@ +/* Tabulator v4.5.1 (c) Oliver Folkerd */ +var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Tabulator=e()}(this,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;no?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},t.prototype.generateColumnsFromRowData=function(t){var e,o,i=[];if(t&&t.length){e=t[0];for(var n in e){var s={field:n,title:n},r=e[n];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}s.sorter=o,i.push(s)}this.table.options.columns=i,this.setColumns(this.table.options.columns)}},t.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),o.redraw(!0)},t.prototype._addColumn=function(t,e,o){var n=new i(t,this),s=n.getElement(),r=o?this.findColumnIndex(o):o;if(o&&r>-1){var a=this.columns.indexOf(o.getTopColumn()),l=o.getElement();e?(this.columns.splice(a,0,n),l.parentNode.insertBefore(s,l)):(this.columns.splice(a+1,0,n),l.parentNode.insertBefore(s,l.nextSibling))}else e?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement())),n.columnRendered();return n},t.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},t.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)}),t.rowManager.adjustTableSize()},t.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof i)return t;if(t instanceof o)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},t.prototype.getColumnByField=function(t){return this.columnsByField[t]},t.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])}),o},t.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},t.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex(function(t){return t.visible});return t>-1&&this.columnsByIndex[t]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},t.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},t.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},t.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},t.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.moveColumnActual=function(t,e,o){this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(t,e,o,i,n){var s,r=t.indexOf(e);r>-1&&(t.splice(r,1),s=t.indexOf(o),s>-1?i&&(s+=1):s=r,t.splice(s,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(r,1)[0];t.cells.splice(s,0,e)}}))},t.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,s=0,r=0,a=t.getElement();return new Promise(function(l,c){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":r=-i.element.clientWidth/2;break;case"right":r=a.clientWidth-i.headersElement.clientWidth}if(!o&&(s=a.offsetLeft)>0&&s+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,r;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),r="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=r>s?r:s)}),o},t.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(),"fitColumns"!=i.table.modules.layout.getMode()&&r.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),n(r)})},t.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},t.prototype.redraw=function(t){t&&(u.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(t){this._column=t,this.type="ColumnComponent"};o.prototype.getElement=function(){return this._column.getElement()},o.prototype.getDefinition=function(){return this._column.getDefinition()},o.prototype.getField=function(){return this._column.getField()},o.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},o.prototype.getVisibility=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){return this._column.delete()},o.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},o.prototype.getParentColumn=function(){return this._column.parent instanceof i&&this._column.parent.getComponent()},o.prototype._getSelf=function(){return this._column},o.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},o.prototype.getTable=function(){return this._column.table},o.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},o.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},o.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},o.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},o.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},o.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},o.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)};var i=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};i.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},i.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},i.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach(function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)})},i.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNesteData:this._setFlatData},i.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},i.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},i.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},i.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput"))},i.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},i.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},i.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},i.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(t,t.contentElement),o.modExists("format")&&o.modules.format.initializeColumn(t),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(t),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(t),o.modExists("mutator")&&o.modules.mutator.initializeColumn(t),o.modExists("accessor")&&o.modules.accessor.initializeColumn(t),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:parseInt(e.minWidth)),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},i.prototype._buildColumnHeaderContent=function(){var t=this,e=(t.definition,t.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),e.appendChild(t._buildColumnHeaderTitle()),e},i.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},i.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,s,r,a=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),r=function(t){a.titleFormatterRendered=t},s={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,s,n,r),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},i.prototype._buildGroupHeader=function(){var t=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}this.element.appendChild(this.groupElement)},i.prototype._getFlatData=function(t){return t[this.field]},i.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;s-1&&this._nextVisibleColumn(t+1)},i.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},i.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},i.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},i.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},i.prototype.fitToData=function(){var t=this;this.widthFixed||(this.element.style.width="",t.cells.forEach(function(t){t.clearWidth()}));var e=this.element.offsetWidth;t.width&&this.widthFixed||(t.cells.forEach(function(t){var o=t.getWidth();o>e&&(e=o)}),e&&t.setWidthActual(e+1))},i.prototype.updateDefinition=function(t){var e=this;return new Promise(function(o,i){var n;e.isGroup?(console.warn("Column Update Error - The updateDefintion function is only available on columns, not column groups"),i("Column Update Error - The updateDefintion function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then(function(t){n.field==e.field&&(e.field=!1),e.delete().then(function(){o(t.getComponent())}).catch(function(t){i(t)})}).catch(function(t){i(t)}))})},i.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},i.prototype.defaultOptionList=["title","field","columns","visible","align","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print"],i.prototype.getComponent=function(){return new o(this)};var n=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1, +this.renderMode="classic",this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};n.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},n.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},n.prototype.getElement=function(){return this.element},n.prototype.getTableElement=function(){return this.tableElement},n.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},n.prototype.setColumnManager=function(t){this.columnManager=t},n.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e})},n.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof r)return t;if(t instanceof s)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},n.prototype.getRowFromDataObject=function(t){return this.rows.find(function(e){return e.data===t})||!1},n.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},n.prototype.scrollToRow=function(t,e,o){var i,n=this,s=this.getDisplayRows().indexOf(t),r=t.getElement(),a=0;return new Promise(function(t,l){if(s>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=u.prototype.helpers.elOffset(r).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&u.prototype.helpers.elVisible(r)&&(a=u.prototype.helpers.elOffset(r).top-u.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),e||this.reRenderInPosition(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},n.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},n.prototype.addRows=function(t,e,o){var i=this,n=this,s=0,r=[];return new Promise(function(a,l){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),s=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var s=n.addRow(t,e,o,!0);r.push(s)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),a(r)})},n.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},n.prototype.addRowActual=function(t,e,o,i){var n,s=t instanceof r?t:new r(t||{},this),a=this.findAddRowPos(e);if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(n=this.getDisplayRows(),a?n.length?o=n[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):n.length&&(o=n[n.length-1],a=!(n.length1&&(!o||o&&-1==l.indexOf(o)?a?l[0]!==s&&(o=l[0],this._moveRowInArray(s.getGroup().rows,s,o,!a)):l[l.length-1]!==s&&(o=l[l.length-1],this._moveRowInArray(s.getGroup().rows,s,o,!a)):this._moveRowInArray(s.getGroup().rows,s,o,!a))}if(o){var c=this.rows.indexOf(o),u=this.activeRows.indexOf(o);this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),u>-1&&this.activeRows.splice(a?u:u+1,0,s),c>-1&&this.rows.splice(a?c:c+1,0,s)}else a?(this.displayRowIterator(function(t){t.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(t){t.push(s)}),this.activeRows.push(s),this.rows.push(s));return this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),s},n.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{pos:this.getRowPosition(t),to:e,after:o}),this.moveRowActual(t,e,o),this.table.options.rowMoved.call(this.table,t.getComponent())},n.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){var n=e.getGroup(),s=t.getGroup();n===s?this._moveRowInArray(n.rows,t,e,o):(s&&s.removeRow(t),n.insertRow(t,e,o))}},n.prototype._moveRowInArray=function(t,e,o,i){var n,s,r,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),s=t.indexOf(o),s>-1?i?t.splice(s+1,0,e):t.splice(s,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){r=nn?s:n+1;for(var l=r;l<=a;l++)t[l]&&this.styleRow(t[l],l)}},n.prototype.clearData=function(){this.setData([])},n.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},n.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},n.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},n.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach(function(t){o.push(t.getData(e||"data"))}),o},n.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach(function(t){e.push(t.getComponent())}),e},n.prototype.getDataCount=function(t){return this.getRows(t).length},n.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=t.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=t.table.modules.filter.getFilters(!0,!0);i[t.table.modules.page.paginationDataSentNames.filters]=s}t.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t.setData(e)}).catch(function(t){})},n.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},n.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},n.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},n.prototype.refreshActiveData=function(t,e,o){var i,n=this,s=this,r=this.table,a=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||a.indexOf(t)=0))break;s=a}else if(e-r[a].getElement().offsetTop>=0)n=a;else{if(i=!0,!(o-r[a].getElement().offsetTop>=0))break;s=a}}else n=this.vDomTop,s=this.vDomBottom;return r.slice(n,s+1)},n.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},n.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"visible":e=this.getVisibleRows(!0);break;default:e=this.rows}return e},n.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(s[r]){var a=e-s[r].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*g),"group"!==f.type&&(d=!1),i.vDomBottom++,c++}t?(i.vDomTopPad=e?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-l,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-a-l,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((a+l)/c),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=l+a+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",e&&(this.scrollTop=i.vDomTopPad+l+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=d?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll()},n.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer&&this._removeBottomRow(-o)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),o>=0&&this._addBottomRow(o))},n.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],r=s.getHeight()||this.vDomRowHeight;t>=r&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=r,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=r,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},n.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},n.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=r&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=r,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=r,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},n.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},n.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},n.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},n.prototype.adjustTableSize=function(){if("virtual"===this.renderMode){this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;var t=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"}},n.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},n.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},n.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},n.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},n.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var s=function(t){this._row=t};s.prototype.getData=function(t){return this._row.getData(t)},s.prototype.getElement=function(){return this._row.getElement()},s.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},s.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},s.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},s.prototype.delete=function(){return this._row.delete()},s.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},s.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},s.prototype.move=function(t,e){this._row.moveToRow(t,e)},s.prototype.update=function(t){return this._row.updateData(t)},s.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},s.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},s.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},s.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},s.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},s.prototype._getSelf=function(){return this._row},s.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},s.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},s.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},s.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},s.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},s.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},s.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},s.prototype.reformat=function(){return this._row.reinitialize()},s.prototype.getGroup=function(){return this._row.getGroup().getComponent()},s.prototype.getTable=function(){return this._row.table},s.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},s.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var r=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(t),this.generateElement()};r.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},r.prototype.getElement=function(){return this.element},r.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},r.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(t){i.table.options.rowMouseEnter(t,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(t){i.table.options.rowMouseLeave(t,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(t){i.table.options.rowMouseOver(t,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(t){i.table.options.rowMouseOut(t,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(t){i.table.options.rowMouseMove(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null, +i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},r.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},r.prototype.initialize=function(t){var e=this;if(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this),"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},r.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},r.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0)},r.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(t){var o=t.getHeight();o>e&&(e=o)}),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},r.prototype.setCellHeight=function(){this.cells.forEach(function(t){t.setHeight()}),this.heightInitialized=!0},r.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},r.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},r.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},r.prototype.getHeight=function(){return this.outerHeight},r.prototype.getWidth=function(){return this.element.offsetWidth},r.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},r.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data",t)),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},r.prototype.updateData=function(t){var e=this,o=u.prototype.helpers.elVisible(this.element),i={};return new Promise(function(n,s){"string"==typeof t&&(t=JSON.parse(t)),e.table.options.reactiveData&&e.table.modExists("reactiveData",!0)&&e.table.modules.reactiveData.block(),e.table.modExists("mutator")&&(i=Object.assign(i,e.data),i=Object.assign(i,t),t=e.table.modules.mutator.transformRow(i,"data",t));for(var r in t)e.data[r]=t[r];e.table.options.reactiveData&&e.table.modExists("reactiveData",!0)&&e.table.modules.reactiveData.unblock();for(var r in t){e.table.columnManager.getColumnsByFieldRoot(r).forEach(function(i){var n=e.getCell(i.getField());if(n){var s=i.getFieldValue(t);n.getValue()!=s&&(n.setValueProcessData(s),o&&n.cellRendered())}})}o?(e.normalizeHeight(),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent())):(e.initialized=!1,e.height=0,e.heightStyled=""),!1!==e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.redrawNeeded(t)&&(e.table.modules.dataTree.initializeRow(e),e.table.modules.dataTree.layoutRow(e),e.table.rowManager.refreshActiveData("tree",!1,!0)),e.table.options.rowUpdated.call(e.table,e.getComponent()),n()})},r.prototype.getData=function(t){var e=this;return t?e.table.modExists("accessor")?e.table.modules.accessor.transformRow(e.data,t):void 0:this.data},r.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},r.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},r.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&u.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},r.prototype.getCells=function(){return this.cells},r.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},r.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},r.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},r.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(n=t.getGroup().rows,(i=n.indexOf(t))&&(i=n[i-1])):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()})},r.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},r.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e-1?(this.browser="ie", +this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},u.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},u.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},u.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",function(t){var s,r=n.files[0],a=new FileReader;a.readAsText(r),a.onload=function(t){try{s=JSON.parse(a.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e._setData(s).then(function(t){o(t)}).catch(function(t){o(t)})},a.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},u.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o)},u.prototype._setData=function(t,e,o,i){var n=this;return"string"!=typeof t?t?n.rowManager.setData(t,i):n.modExists("ajax")&&(n.modules.ajax.getUrl||n.options.ajaxURLGenerator)?"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i):n.rowManager.setData([],i):0==t.indexOf("{")||0==t.indexOf("[")?n.rowManager.setData(JSON.parse(t),i):n.modExists("ajax",!0)?(e&&n.modules.ajax.setParams(e),o&&n.modules.ajax.setConfig(o),n.modules.ajax.setUrl(t),"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i)):void 0},u.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},u.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},u.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},u.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},u.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},u.prototype.getHtml=function(t,e,o){if(this.modExists("htmlTableExport",!0))return this.modules.htmlTableExport.getHtml(t,e,o)},u.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},u.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},u.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},u.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},u.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},u.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(s,r){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||s(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||s(i)})}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})},u.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},u.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},u.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){function n(){++s==t.length&&r&&(a.rowManager.reRenderInPosition(),o())}var s=0,r=0,a=e;Array.isArray(t)||(t=[t]),t.forEach(function(t){var o=e.rowManager.findRow(t,!0);o?o.delete().then(function(){r++,n()}).catch(function(t){n(),i(t)}):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),n())})})},u.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,s){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},u.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())}).catch(function(t){n(t)}):s=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},u.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then(function(){i(s.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},u.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.rowManager.findRow(t);r?i.rowManager.scrollToRow(r,e,o).then(function(){n()}).catch(function(t){s(t)}):(console.warn("Scroll Error - No matching row found:",t),s("Scroll Error - No matching row found"))})},u.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},u.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},u.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},u.prototype.copyToClipboard=function(t,e,o,i){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t,e,o,i)},u.prototype.setColumns=function(t){this.columnManager.setColumns(t)},u.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},u.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},u.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},u.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},u.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},u.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},u.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},u.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},u.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,r).then(function(t){n(t.getComponent())}).catch(function(t){s(t)})})},u.prototype.deleteColumn=function(t){var e=this;return new Promise(function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Column Delete Error - No matching column found:",t),i())})},u.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise(function(e,i){var n=o.columnManager.findColumn(t);n?n.updateDefinition().then(function(t){e(t)}).catch(function(t){i(t)}):(console.warn("Column Update Error - No matching column found:",t),i())})},u.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},u.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.columnManager.findColumn(t);r?i.columnManager.scrollToColumn(r,e,o).then(function(){n()}).catch(function(t){s(t)}):(console.warn("Scroll Error - No matching column found:",t),s("Scroll Error - No matching column found"))})},u.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},u.prototype.getLocale=function(){return this.modules.localize.getLocale()},u.prototype.getLang=function(t){return this.modules.localize.getLang(t)},u.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},u.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},u.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},u.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},u.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},u.prototype.setFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},u.prototype.addFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o),this.rowManager.filterRefresh())},u.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},u.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},u.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},u.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},u.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},u.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},u.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},u.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},u.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},u.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},u.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},u.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},u.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},u.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise(function(t,e){e()})},u.prototype.setPageToRow=function(t){var e=this;return new Promise(function(o,i){e.options.pagination&&e.modExists("page")?(t=e.rowManager.findRow(t),t?e.modules.page.setPageToRow(t).then(function(){o()}).catch(function(){i()}):i()):i()})},u.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then(function(){}).catch(function(){})},u.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},u.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},u.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},u.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},u.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},u.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},u.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},u.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},u.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},u.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},u.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},u.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},u.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},u.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},u.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},u.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},u.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},u.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},u.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},u.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},u.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},u.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},u.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},u.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},u.prototype.moduleBindings={},u.prototype.extendModule=function(t,e,o){if(u.prototype.moduleBindings[t]){var i=u.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},u.prototype.registerModule=function(t,e){u.prototype.moduleBindings[t]=e},u.prototype.bindModules=function(){this.modules={};for(var t in u.prototype.moduleBindings)this.modules[t]=new u.prototype.moduleBindings[t](this)},u.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},u.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Array.isArray(t)?[]:{};for(var o in t)null!=t[o]&&"object"===_typeof(t[o])?t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]):e[o]=t[o];return e}},u.prototype.comms={tables:[],register:function(t){u.prototype.comms.tables.push(t)},deregister:function(t){var e=u.prototype.comms.tables.indexOf(t);e>-1&&u.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if(o=document.querySelectorAll(t),o.length)for(var s=0;s0?s.setWidth(n):column.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){function e(t){return"string"==typeof t?t.indexOf("%")>-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,s){function r(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var l=[],c=0,u=0,d=0,h=0,p=0,m=[];return t.forEach(function(t,e){var o=s?a(t):r(t);t.column.minWidth>=o?l.push(t):(m.push(t),p+=s?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),l.length?(l.forEach(function(t){c+=s?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),u=i-c,d=p?Math.floor(u/p):u,h=u-d*p,h+=o(m,u,d,s)):(h=p?i-Math.floor(i/p)*p:i,m.forEach(function(t){t.width=s?a(t):r(t)})),h}var i=this,n=i.table.element.clientWidth,s=0,r=0,a=0,l=0,c=[],u=[],d=0,h=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),s+=n>i?n:i,t.definition.widthShrink&&(u.push({column:t,width:n>i?n:i}),d+=t.definition.widthShrink)):(c.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),r=n-s,l=Math.floor(r/a);var p=o(c,r,l,!1);c.length&&p>0&&(c[c.length-1].width+=+p),c.forEach(function(t){r-=t.width}),h=Math.abs(p)+r,h>0&&d&&(p=o(u,h,Math.floor(h/d),!0)),u.length&&(u[u.length-1].width-=p),c.forEach(function(t){t.column.setWidth(t.width)}),u.forEach(function(t){t.column.setWidth(t.width)})}},u.prototype.registerModule("layout",d);var h=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};h.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},h.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},h.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},h.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},h.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langs[t]){var i=t.split("-")[0];o.langs[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=u.prototype.helpers.deepClone(o.langs.default||{}),"default"!=t&&e(o.langs[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},h.prototype.getLocale=function(t){return self.locale},h.prototype.getLang=function(t){return t?this.langs[t]:this.lang},h.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},h.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},h.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},h.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},h.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},u.prototype.registerModule("localize",h);var p=function(t){this.table=t};p.prototype.getConnections=function(t){var e,o=this,i=[];return e=u.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},p.prototype.send=function(t,e,o,i){var n=this,s=this.getConnections(t);s.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!s.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},p.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},u.prototype.registerModule("comms",p);var m=function(t){this.table=t,this.allowedTypes=["","data","download","clipboard"]};m.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(s=e.lookupAccessor(t.definition[r]))&&(o=!0,i[r]={accessor:s,params:t.definition[r+"Params"]||{}})}),o&&(t.modules.accessor=i)},m.prototype.lookupAccessor=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.accessors[t]?e=this.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":e=t}return e},m.prototype.transformRow=function(t,e){var o=this,i="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),n=u.prototype.helpers.deepClone(t||{});return o.table.columnManager.traverse(function(t){var o,s,r,a;t.modules.accessor&&(s=t.modules.accessor[i]||t.modules.accessor.accessor||!1)&&"undefined"!=(o=t.getFieldValue(n))&&(a=t.getComponent(),r="function"==typeof s.params?s.params(o,n,e,a):s.params,t.setFieldValue(n,s.accessor(o,n,e,r,a)))}),n},m.prototype.accessors={},u.prototype.registerModule("accessor",m);var f=function(t){this.table=t,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};f.prototype.initialize=function(){var t;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(t=document.createElement("template"),t.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=t.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(t=document.createElement("template"),t.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=t.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},f.prototype.createLoaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader"),t},f.prototype.createMsgElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader-msg"),t.setAttribute("role","alert"),t},f.prototype.setParams=function(t,e){if(e){this.params=this.params||{};for(var o in t)this.params[o]=t[o]}else this.params=t},f.prototype.getParams=function(){return this.params||{}},f.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.method=t;else for(var e in t)this.config[e]=t[e]},f.prototype._loadDefaultConfig=function(t){var e=this;if(!e.config||t){e.config={};for(var o in e.defaultConfig)e.config[o]=e.defaultConfig[o]}},f.prototype.setUrl=function(t){this.url=t},f.prototype.getUrl=function(){return this.url},f.prototype.loadData=function(t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(t)},f.prototype.nextPage=function(t){var e;this.loading||(e=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,ti||null===i)&&(i=t)}),null!==i?!1!==n?i.toFixed(n):i:""},min:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach(function(t){((t=Number(t))t&&(t=o)}),i.forEach(function(e){var o=e.length;if(o1&&(e.colSpan=t.width),t.height>1&&(e.rowSpan=t.height),e.innerHTML=t.title,v.mapElementStyles(t.element,e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.appendChild(e)}),v.mapElementStyles(v.table.columnManager.getHeadersElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.appendChild(o)}),v.htmlElement.appendChild(e)}(y)}else!function(){var t=document.createElement("tr");e.forEach(function(e){var o=document.createElement("th");o.innerHTML=e.definition.title,v.mapElementStyles(e.getElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.appendChild(o)}),v.mapElementStyles(v.table.columnManager.getHeadersElement(),t,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),v.htmlElement.appendChild(document.createElement("thead").appendChild(t))}();u=document.createElement("tbody"),window.getComputedStyle&&(d=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),h=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),p=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),m=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),g=this.table.element.getElementsByClassName("tabulator-group")[0],m&&(b=m.getElementsByClassName("tabulator-cell"),f=b[0],b[b.length-1])),i.rowGroups?t.forEach(function(t){c(t,o||{})}):(i.columnCalcs&&a(o,"top"),l(t),i.columnCalcs&&a(o,"bottom")),this.htmlElement.appendChild(u)},b.prototype.mapElementStyles=function(t,e,o){var i={"background-color":"backgroundColor",color:"fontColor","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach(function(t){e.style[i[t]]=n.getPropertyValue(t)})}},b.prototype.copySelectors={userSelection:function(t,e){return e},selected:function(t,e){var o=[];return this.table.modExists("selectRow",!0)&&(o=this.table.modules.selectRow.getSelectedRows()),t.rowGroups&&console.warn("Clipboard Warning - select coptSelector does not support row groups"),this.buildOutput(o,t,e)},table:function(t,e){return t.rowGroups&&console.warn("Clipboard Warning - table coptSelector does not support row groups"),this.buildOutput(this.table.rowManager.getComponents(),t,e)},active:function(t,e){var o;return o=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents("active"),this.buildOutput(o,t,e)},visible:function(t,e){var o;return o=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents("visible"),this.buildOutput(o,t,e)}},b.prototype.copyFormatters={raw:function(t,e){return t},table:function(t,e){var o=[];return t.forEach(function(t){var e=[];t.forEach(function(t){void 0===t&&(t=""),t=void 0===t||null===t?"":t.toString(),t.match(/\r|\n/)&&(t=t.split('"').join('""'),t='"'+t+'"'),e.push(t)}),o.push(e.join("\t"))}),o.join("\n")}},b.prototype.pasteParsers={table:function(t){var e=[],o=!0,i=this.table.columnManager.columns,n=[],s=[];return t=t.split("\n"),t.forEach(function(t){e.push(t.split("\t"))}),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach(function(t){var e=i.find(function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()});e?n.push(e):o=!1}),o||(o=!0,n=[],e[0].forEach(function(t){var e=i.find(function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()});e?n.push(e):o=!1}),o||(n=this.table.columnManager.columnsByIndex)),o&&e.shift(),e.forEach(function(t){var e={};t.forEach(function(t,o){n[o]&&(e[n[o].field]=t)}),s.push(e)}),s)}},b.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},u.prototype.registerModule("clipboard",b);var v=function(t){this.table=t,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};v.prototype.initialize=function(){var t=null,e=this.table.columnManager.getFirstVisibileColumn(),o=this.table.options;switch(this.field=o.dataTreeChildField,this.indent=o.dataTreeChildIndent,this.elementField=o.dataTreeElementColumn||!!e&&e.field,o.dataTreeBranchElement&&(!0===o.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof o.dataTreeBranchElement?(t=document.createElement("div"),t.innerHTML=o.dataTreeBranchElement,this.branchEl=t.firstChild):this.branchEl=o.dataTreeBranchElement),o.dataTreeCollapseElement?"string"==typeof o.dataTreeCollapseElement?(t=document.createElement("div"),t.innerHTML=o.dataTreeCollapseElement,this.collapseEl=t.firstChild):this.collapseEl=o.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="
"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?(t=document.createElement("div"),t.innerHTML=o.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,e){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(t,e){return o.dataTreeStartExpanded[e]}}},v.prototype.initializeRow=function(t){var e=t.getData()[this.field],o=Array.isArray(e),i=o||!o&&"object"===(void 0===e?"undefined":_typeof(e))&&null!==e;t.modules.dataTree={index:0,open:!!i&&this.startOpen(t.getComponent(),0),controlEl:!1,branchEl:!1,parent:!1,children:i}},v.prototype.layoutRow=function(t){var e=this.elementField?t.getCell(this.elementField):t.getCells()[0],o=e.getElement(),i=t.modules.dataTree;i.branchEl&&i.branchEl.parentNode.removeChild(i.branchEl),this.generateControlElement(t,o),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")},v.prototype.generateControlElement=function(t,e){var o=this,i=t.modules.dataTree,e=e||t.getCells()[0].getElement(),n=i.controlEl;!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(e){e.stopPropagation(),o.collapseRow(t)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(e){e.stopPropagation(),o.expandRow(t)})),i.controlEl.addEventListener("mousedown",function(t){t.stopPropagation()}),n&&n.parentNode===e?n.parentNode.replaceChild(i.controlEl,n):e.insertBefore(i.controlEl,e.firstChild))},v.prototype.setDisplayIndex=function(t){this.displayIndex=t},v.prototype.getDisplayIndex=function(){return this.displayIndex},v.prototype.getRows=function(t){var e=this,o=[];return t.forEach(function(t,i){var n,s;o.push(t),t instanceof r&&(n=t.modules.dataTree.children,n.index||!1===n.children||(s=e.getChildren(t),s.forEach(function(t){o.push(t)})))}),o},v.prototype.getChildren=function(t){var e=this,o=t.modules.dataTree,i=[],n=[];return!1!==o.children&&o.open&&(Array.isArray(o.children)||(o.children=this.generateChildren(t)),i=this.table.modExists("filter")?this.table.modules.filter.filter(o.children):o.children,this.table.modExists("sort")&&this.table.modules.sort.sort(i),i.forEach(function(t){n.push(t),e.getChildren(t).forEach(function(t){n.push(t)})})),n},v.prototype.generateChildren=function(t){var e=this,o=[],i=t.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(function(i){var n=new r(i||{},e.table.rowManager);n.modules.dataTree.index=t.modules.dataTree.index+1,n.modules.dataTree.parent=t,n.modules.dataTree.children&&(n.modules.dataTree.open=e.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)}),o},v.prototype.expandRow=function(t,e){var o=t.modules.dataTree;!1!==o.children&&(o.open=!0,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index))},v.prototype.collapseRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open=!1,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index))},v.prototype.toggleRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))},v.prototype.getTreeParent=function(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()},v.prototype.getTreeChildren=function(t){var e=t.modules.dataTree,o=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),e.children.forEach(function(t){t instanceof r&&o.push(t.getComponent())})),o},v.prototype.checkForRestyle=function(t){t.row.cells.indexOf(t)||!1!==t.row.modules.dataTree.children&&t.row.reinitialize()},v.prototype.getChildField=function(){return this.field},v.prototype.redrawNeeded=function(t){return!!this.field&&void 0!==t[this.field]||!!this.elementField&&void 0!==t[this.elementField]},u.prototype.registerModule("dataTree",v) +;var y=function(t){this.table=t,this.fields={},this.columnsByIndex=[],this.columnsByField={},this.config={}};y.prototype.download=function(t,e,o,i,n){function s(o,i){n?!0===n?r.triggerDownload(o,i,t,e,!0):n(o):r.triggerDownload(o,i,t,e)}var r=this,a=!1;this.processConfig(),"function"==typeof t?a=t:r.downloaders[t]?a=r.downloaders[t]:console.warn("Download Error - No such download type found: ",t),this.processColumns(),a&&a.call(this,r.processDefinitions(),r.processData(i||"active"),o||{},s,this.config)},y.prototype.processConfig=function(){var t={columnGroups:!0,rowGroups:!0,columnCalcs:!0};if(this.table.options.downloadConfig)for(var e in this.table.options.downloadConfig)t[e]=this.table.options.downloadConfig[e];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnGroups&&this.table.columnManager.columns.length!=this.table.columnManager.columnsByIndex.length&&(this.config.columnGroups=!0),t.columnCalcs&&this.table.modExists("columnCalcs")&&(this.config.columnCalcs=!0)},y.prototype.processColumns=function(){var t=this;t.columnsByIndex=[],t.columnsByField={},t.table.columnManager.columnsByIndex.forEach(function(e){e.field&&!1!==e.definition.download&&(e.visible||!e.visible&&e.definition.download)&&(t.columnsByIndex.push(e),t.columnsByField[e.field]=e)})},y.prototype.processDefinitions=function(){var t=this,e=[];return this.config.columnGroups?t.table.columnManager.columns.forEach(function(o){var i=t.processColumnGroup(o);i&&e.push(i)}):t.columnsByIndex.forEach(function(o){!1!==o.download&&e.push(t.processDefinition(o))}),e},y.prototype.processColumnGroup=function(t){var e=this,o=t.columns,i=0,n=this.processDefinition(t),s={type:"group",title:n.title,depth:1};if(o.length){if(s.subGroups=[],s.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o.depth>i&&(i=o.depth),o&&(s.width+=o.width,s.subGroups.push(o))}),s.depth+=i,!s.width)return!1}else{if(!t.field||!1===t.definition.download||!(t.visible||!t.visible&&t.definition.download))return!1;s.width=1,s.definition=n}return s},y.prototype.processDefinition=function(t){var e={};for(var o in t.definition)e[o]=t.definition[o];return void 0!==t.definition.downloadTitle&&(e.title=t.definition.downloadTitle),e},y.prototype.processData=function(t){var e=this,o=this,i=[],n=[],s=!1,r={};return this.config.rowGroups?("visible"==t?(s=o.table.rowManager.getRows(t),s.forEach(function(t){if("row"==t.type){var e=t.getGroup();-1===n.indexOf(e)&&n.push(e)}})):n=this.table.modules.groupRows.getGroups(),n.forEach(function(t){i.push(e.processGroupData(t,s))})):i=o.table.rowManager.getData(t,"download"),this.config.columnCalcs&&(r=this.table.getCalcResults(),i={calcs:r,data:i}),"function"==typeof o.table.options.downloadDataFormatter&&(i=o.table.options.downloadDataFormatter(i)),i},y.prototype.processGroupData=function(t,e){var o=this,i=t.getSubGroups(),n={type:"group",key:t.key};return i.length?(n.subGroups=[],i.forEach(function(t){n.subGroups.push(o.processGroupData(t,e))})):e?(n.rows=[],t.rows.forEach(function(t){e.indexOf(t)>-1&&n.rows.push(t.getData("download"))})):n.rows=t.getData(!0,"download"),n},y.prototype.triggerDownload=function(t,e,o,i,n){var s=document.createElement("a"),r=new Blob([t],{type:e}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(r=this.table.options.downloadReady.call(this.table,t,r))&&(n?window.open(window.URL.createObjectURL(r)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,i):(s.setAttribute("href",window.URL.createObjectURL(r)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},y.prototype.getFieldValue=function(t,e){var o=this.columnsByField[t];return!!o&&o.getFieldValue(e)},y.prototype.commsReceived=function(t,e,o){switch(e){case"intercept":this.download(o.type,"",o.options,o.intercept)}},y.prototype.downloaders={csv:function(t,e,o,i,n){function s(t,e){t.subGroups?t.subGroups.forEach(function(t){s(t,e+1)}):(d.push('"'+String(t.title).split('"').join('""')+'"'),h.push(t.definition.field))}function r(t){t.forEach(function(t){var e=[];h.forEach(function(o){var i=u.getFieldValue(o,t);switch(void 0===i?"undefined":_typeof(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}e.push('"'+String(i).split('"').join('""')+'"')}),l.push(e.join(p))})}function a(t){t.subGroups?t.subGroups.forEach(function(t){a(t)}):r(t.rows)}var l,c,u=this,d=[],h=[],p=o&&o.delimiter?o.delimiter:",";n.columnGroups?(console.warn("Download Warning - CSV downloader cannot process column groups"),t.forEach(function(t){s(t,0)})):function(){t.forEach(function(t){d.push('"'+String(t.title).split('"').join('""')+'"'),h.push(t.field)})}(),l=[d.join(p)],n.columnCalcs&&(console.warn("Download Warning - CSV downloader cannot process column calculations"),e=e.data),n.rowGroups?(console.warn("Download Warning - CSV downloader cannot process row groups"),e.forEach(function(t){a(t)})):r(e),c=l.join("\n"),o.bom&&(c="\ufeff"+c),i(c,"text/csv")},json:function(t,e,o,i,n){var s;n.columnCalcs&&(console.warn("Download Warning - CSV downloader cannot process column calculations"),e=e.data),s=JSON.stringify(e,null,"\t"),i(s,"application/json")},pdf:function(t,e,o,i,n){function s(t,e){var o=t.width,i=1,n={content:t.title||""};if(t.subGroups?(t.subGroups.forEach(function(t){s(t,e+1)}),i=1):(h.push(t.definition.field),i=g-e),n.rowSpan=i,p[e].push(n),o--,i>1)for(var r=e+1;rg&&(g=t.depth)});for(var C=0;C1&&h[e].push({type:"hoz",start:f[e].length,end:f[e].length+t.width-1}),f[e].push(t.title),t.subGroups?t.subGroups.forEach(function(t){o(t,e+1)}):(g.push(t.definition.field),i(g.length),h[e].push({type:"vert",start:g.length-1}))}function i(){var t=0;f.forEach(function(e){var o=e.length;o>t&&(t=o)}),f.forEach(function(e){var o=e.length;if(o0&&l(C[e-1]));break;case 40:e=C.indexOf(x),("editor"==v||"hybrid"==v&&e-1||String(e.title).toLowerCase().indexOf(String(t).toLowerCase())>-1)&&o.push(e)}),x=o,l(e)}function l(t){for(var e=!1;C.firstChild;)C.removeChild(C.firstChild);x.forEach(function(o){var i=o.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=o.title,i.addEventListener("click",function(){c(o),d()}),i.addEventListener("mousedown",function(){L=!1,setTimeout(function(){L=!0},10)}),o.element=i,t&&o.value==v&&(E.value=o.title,o.element.classList.add("active"),e=!0),o===D&&(o.element.classList.add("active"),e=!0)),C.appendChild(i)}),e||c(!1)}function c(t,e){D&&D.element&&D.element.classList.remove("active"),D=t,t&&t.element&&t.element.classList.add("active")}function d(){m(),D?v!==D.value?(v=D.value,E.value=D.title,o(D.value)):i():n.freetext?(v=E.value,o(E.value)):n.allowEmpty&&""===E.value?(v=E.value,o(E.value)):i()}function h(){m(),i()}function p(){if(!C.parentNode){for(;C.firstChild;)C.removeChild(C.firstChild);M=!0===n.values?s():"string"==typeof n.values?s(n.values):n.values||[],r(M,v);var t=u.prototype.helpers.elOffset(b);C.style.minWidth=b.offsetWidth+"px",C.style.top=t.top+b.offsetHeight+"px",C.style.left=t.left+"px",document.body.appendChild(C)}}function m(){C.parentNode&&C.parentNode.removeChild(C),f()}function f(){g.table.rowManager.element.removeEventListener("scroll",h)}var g=this,b=t.getElement(),v=t.getValue(),y=n.verticalNavigation||"editor",w=void 0!==v||null===v?v:void 0!==n.defaultValue?n.defaultValue:"",E=document.createElement("input"),C=document.createElement("div"),R=[],x=[],M=[],D={},L=!0;if(this.table.rowManager.element.addEventListener("scroll",h),E.setAttribute("type","search"),E.style.padding="4px",E.style.width="100%",E.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var T in n.elementAttributes)"+"==T.charAt(0)?(T=T.slice(1),E.setAttribute(T,E.getAttribute(T)+n.elementAttributes["+"+T])):E.setAttribute(T,n.elementAttributes[T]);return E.addEventListener("keydown",function(t){var e;switch(t.keyCode){case 38:e=x.indexOf(D),("editor"==y||"hybrid"==y&&e)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),c(e>0?x[e-1]:!1));break;case 40:e=x.indexOf(D),("editor"==y||"hybrid"==y&&e'):("ie"==a.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='')})}function r(t){c=t,s(t)}var a=this,l=t.getElement(),c=t.getValue(),u=l.getElementsByTagName("svg").length||5,d=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],p=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");if(l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",m.setAttribute("width",d),m.setAttribute("height",d),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);for(var g=1;g<=u;g++)!function(t){var e=document.createElement("span"),i=m.cloneNode(!0);h.push(i),e.addEventListener("mouseenter",function(e){e.stopPropagation(),e.stopImmediatePropagation(),s(t)}),e.addEventListener("mousemove",function(t){t.stopPropagation(),t.stopImmediatePropagation()}),e.addEventListener("click",function(e){e.stopPropagation(),e.stopImmediatePropagation(),o(t)}),e.appendChild(i),p.appendChild(e)}(g);return c=Math.min(parseInt(c),u),s(c),p.addEventListener("mousemove",function(t){s(0)}),p.addEventListener("click",function(t){o(0)}),l.addEventListener("blur",function(t){i()}),l.addEventListener("keydown",function(t){switch(t.keyCode){case 39:r(c+1);break;case 37:r(c-1);break;case 13:o(c);break;case 27:i()}}),p},progress:function(t,e,o,i,n){function s(){var t=d*Math.round(m.offsetWidth/(l.clientWidth/100))+u;o(t),l.setAttribute("aria-valuenow",t),l.setAttribute("aria-label",h)}var r,a,l=t.getElement(),c=void 0===n.max?l.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?l.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,d=(c-u)/100,h=t.getValue()||0,p=document.createElement("div"),m=document.createElement("div");if(p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),m.setAttribute(f,m.getAttribute(f)+n.elementAttributes["+"+f])):m.setAttribute(f,n.elementAttributes[f]);return l.style.padding="4px 4px",h=Math.min(parseFloat(h),c),h=Math.max(parseFloat(h),u),h=Math.round((h-u)/d),m.style.width=h+"%",l.setAttribute("aria-valuemin",u),l.setAttribute("aria-valuemax",c),m.appendChild(p),p.addEventListener("mousedown",function(t){r=t.screenX,a=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(t){r&&(m.style.width=a+t.screenX-r+"px")}),l.addEventListener("mouseup",function(t){r&&(t.stopPropagation(),t.stopImmediatePropagation(),r=!1,a=!1,s())}),l.addEventListener("keydown",function(t){switch(t.keyCode){case 39:m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(t,e,o,i,n){function s(t){return l?t?u?c:a.checked:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,c):(u=!1,a.checked):a.checked}var r=t.getValue(),a=document.createElement("input"),l=n.tristate,c=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box", +n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),a.setAttribute(d,a.getAttribute(d)+n.elementAttributes["+"+d])):a.setAttribute(d,n.elementAttributes[d]);return a.value=r,!l||void 0!==r&&r!==c&&""!==r||(u=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&e(function(){a.focus()}),a.checked=!0===r||"true"===r||"True"===r||1===r,a.addEventListener("change",function(t){o(s())}),a.addEventListener("blur",function(t){o(s(!0))}),a.addEventListener("keydown",function(t){13==t.keyCode&&o(s()),27==t.keyCode&&i()}),a}},u.prototype.registerModule("edit",w);var E=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.changed=!1};E.prototype.initializeColumn=function(t,e){function o(e){var o,s="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",r="";if(void 0===t.modules.filter.prevSuccess||t.modules.filter.prevSuccess!==e){if(t.modules.filter.prevSuccess=e,t.modules.filter.emptyFunc(e))delete i.headerFilters[n];else{switch(t.modules.filter.value=e,_typeof(t.definition.headerFilterFunc)){case"string":i.filters[t.definition.headerFilterFunc]?(r=t.definition.headerFilterFunc,o=function(o){var n=t.definition.headerFilterFuncParams||{},s=t.getFieldValue(o);return n="function"==typeof n?n(e,s,o):n,i.filters[t.definition.headerFilterFunc](e,s,o,n)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":o=function(o){var i=t.definition.headerFilterFuncParams||{},n=t.getFieldValue(o);return i="function"==typeof i?i(e,n,o):i,t.definition.headerFilterFunc(e,n,o,i)},r=o}if(!o)switch(s){case"partial":o=function(o){var i=t.getFieldValue(o);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(e).toLowerCase())>-1},r="like";break;default:o=function(o){return t.getFieldValue(o)==e},r="="}i.headerFilters[n]={value:e,func:o,type:r}}i.changed=!0,i.table.rowManager.filterRefresh()}return!0}var i=this,n=t.getField();t.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)},E.prototype.generateHeaderFilterElement=function(t,e,o){function i(){}var n,s,r,a,l,c,u,d=this,h=this,p=t.modules.filter.success,m=t.getField();if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.contentElement.removeChild(t.modules.filter.headerElement.parentNode),m){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&"0"!==t},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(t.definition.headerFilter)){case"string":h.table.modules.edit.editors[t.definition.headerFilter]?(s=h.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":s=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?s=t.modules.edit.editor:t.definition.formatter&&h.table.modules.edit.editors[t.definition.formatter]?(s=h.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):s=h.table.modules.edit.editors.input}if(s){if(a={getValue:function(){return void 0!==e?e:""},getField:function(){return t.definition.field},getElement:function(){return n},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=t.definition.headerFilterParams||{},u="function"==typeof u?u.call(h.table):u,!(r=s.call(this.table.modules.edit,a,function(){},p,i,u)))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor returned a value of false");if(!(r instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor should return an instance of Node, the editor returned:",r);m?h.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,function(t){r.setAttribute("placeholder",void 0!==t&&t?t:h.table.modules.localize.getText("headerFilters|default"))}):h.table.modules.localize.bind("headerFilters|default",function(t){r.setAttribute("placeholder",void 0!==h.column.definition.headerFilterPlaceholder&&h.column.definition.headerFilterPlaceholder?h.column.definition.headerFilterPlaceholder:t)}),r.addEventListener("click",function(t){t.stopPropagation(),r.focus()}),r.addEventListener("focus",function(t){var e=d.table.columnManager.element.scrollLeft;e!==d.table.rowManager.element.scrollLeft&&(d.table.rowManager.scrollHorizontal(e),d.table.columnManager.scrollHorizontal(e))}),l=!1,c=function(t){l&&clearTimeout(l),l=setTimeout(function(){p(r.value)},300)},t.modules.filter.headerElement=r,t.modules.filter.attrType=r.hasAttribute("type")?r.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=r.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter&&("autocomplete"!==t.definition.editor&&"tickCross"!==t.definition.editor||!0!==t.definition.headerFilter)&&(r.addEventListener("keyup",c),r.addEventListener("search",c),"number"==t.modules.filter.attrType&&r.addEventListener("change",function(t){p(r.value)}),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&r.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||r.addEventListener("mousedown",function(t){t.stopPropagation()})),n.appendChild(r),t.contentElement.appendChild(n),o||h.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)},E.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="none")})},E.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="")})},E.prototype.setHeaderFilterFocus=function(t){t.modules.filter&&t.modules.filter.headerElement?t.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())},E.prototype.setHeaderFilterValue=function(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e,!0),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},E.prototype.reloadHeaderFilter=function(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},E.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},E.prototype.setFilter=function(t,e,o){var i=this;i.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o}]),i.addFilter(t)},E.prototype.addFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){(t=i.findFilter(t))&&(i.filterList.push(t),i.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},E.prototype.findFilter=function(t){var e,o=this;if(Array.isArray(t))return this.findSubFilters(t);var i=!1;return"function"==typeof t.field?i=function(e){return t.field(e,t.type||{})}:o.filters[t.type]?(e=o.table.columnManager.getColumnByField(t.field),i=e?function(i){return o.filters[t.type](t.value,e.getFieldValue(i))}:function(e){return o.filters[t.type](t.value,e[t.field])}):console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t},E.prototype.findSubFilters=function(t){var e=this,o=[];return t.forEach(function(t){(t=e.findFilter(t))&&o.push(t)}),!!o.length&&o},E.prototype.getFilters=function(t,e){var o=[];return t&&(o=this.getHeaderFilters()),e&&o.forEach(function(t){"function"==typeof t.type&&(t.type="function")}),o=o.concat(this.filtersToArray(this.filterList,e))},E.prototype.filtersToArray=function(t,e){var o=this,i=[];return t.forEach(function(t){var n;Array.isArray(t)?i.push(o.filtersToArray(t,e)):(n={field:t.field,type:t.type,value:t.value},e&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},E.prototype.getHeaderFilters=function(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t},E.prototype.removeFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){var e=-1;e="object"==_typeof(t.field)?i.filterList.findIndex(function(e){return t===e}):i.filterList.findIndex(function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value}),e>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},E.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},E.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={},this.headerFilterColumns.forEach(function(e){e.modules.filter.value=null,e.modules.filter.prevSuccess=void 0,t.reloadHeaderFilter(e)}),this.changed=!0},E.prototype.search=function(t,e,o,i){var n=this,s=[],r=[];return Array.isArray(e)||(e=[{field:e,type:o,value:i}]),e.forEach(function(t){(t=n.findFilter(t))&&r.push(t)}),this.table.rowManager.rows.forEach(function(e){var o=!0;r.forEach(function(t){n.filterRecurse(t,e.getData())||(o=!1)}),o&&s.push("data"===t?e.getData("data"):e.getComponent())}),s},E.prototype.filter=function(t,e){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=t.slice(0):t.forEach(function(t){o.filterRow(t)&&i.push(t)}),o.table.options.dataFiltered&&(i.forEach(function(t){n.push(t.getComponent())}),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},E.prototype.filterRow=function(t,e){var o=this,i=!0,n=t.getData();o.filterList.forEach(function(t){o.filterRecurse(t,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},E.prototype.filterRecurse=function(t,e){var o=this,i=!1;return Array.isArray(t)?t.forEach(function(t){o.filterRecurse(t,e)&&(i=!0)}):i=t.func(e),i},E.prototype.filters={"=":function(t,e,o,i){return e==t},"<":function(t,e,o,i){return e":function(t,e,o,i){return e>t},">=":function(t,e,o,i){return e>=t},"!=":function(t,e,o,i){return e!=t},regex:function(t,e,o,i){return"string"==typeof t&&(t=new RegExp(t)),t.test(e)},like:function(t,e,o,i){return null===t||void 0===t?e===t:void 0!==e&&null!==e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},in:function(t,e,o,i){return Array.isArray(t)?t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}},u.prototype.registerModule("filter",E);var C=function(t){this.table=t};C.prototype.initializeColumn=function(t){var e=this,o={params:t.definition.formatterParams||{}};switch(_typeof(t.definition.formatter)){case"string":"tick"===t.definition.formatter&&(t.definition.formatter="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),e.formatters[t.definition.formatter]?o.formatter=e.formatters[t.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",t.definition.formatter),o.formatter=e.formatters.plaintext);break;case"function":o.formatter=t.definition.formatter;break;default:o.formatter=e.formatters.plaintext}t.modules.format=o},C.prototype.cellRendered=function(t){t.modules.format&&t.modules.format.renderedCallback&&t.modules.format.renderedCallback()},C.prototype.formatValue=function(t){function e(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e}var o=t.getComponent(),i="function"==typeof t.column.modules.format.params?t.column.modules.format.params(o):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,o,i,e)},C.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}return t},C.prototype.emptyToSpace=function(t){return null===t||void 0===t?" ":t},C.prototype.getFormatter=function(t){var t;switch(void 0===t?"undefined":_typeof(t)){case"string":this.formatters[t]?t=this.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=this.formatters.plaintext);break;case"function":t=t;break;default:t=this.formatters.plaintext}return t},C.prototype.formatters={plaintext:function(t,e,o){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e,o){return t.getValue()},textarea:function(t,e,o){return t.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e,o){var i,n,s,r,a=parseFloat(t.getValue()),l=e.decimal||".",c=e.thousand||",",u=e.symbol||"",d=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(i=!1!==h?a.toFixed(h):a,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1"+c+"$2");return d?n+s+u:u+n+s},link:function(t,e,o){var i,n=t.getValue(),s=e.urlPrefix||"",r=e.download,a=n,l=document.createElement("a");if(e.labelField&&(i=t.getData(),a=i[e.labelField]),e.label)switch(_typeof(e.label)){case"string":a=e.label;break;case"function":a=e.label(t)}if(a){if(e.urlField&&(i=t.getData(),n=i[e.urlField]),e.url)switch(_typeof(e.url)){case"string":n=e.url;break;case"function":n=e.url(t)}return l.setAttribute("href",s+n),e.target&&l.setAttribute("target",e.target),e.download&&(r="function"==typeof r?r(t):!0===r?"":r,l.setAttribute("download",r)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),l}return" "},image:function(t,e,o){var i=document.createElement("img");switch(i.setAttribute("src",t.getValue()),_typeof(e.height)){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height}switch(_typeof(e.width)){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width}return i.addEventListener("load",function(){t.getRow().normalizeHeight()}),i},tickCross:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e.allowEmpty,r=e.allowTruthy,a=void 0!==e.tickElement?e.tickElement:'',l=void 0!==e.crossElement?e.crossElement:'';return r&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),a||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=e.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",r=t.getValue(),a=moment(r,i);return a.isValid()?a.format(n):!0===s?r:"function"==typeof s?s(r):s},datetimediff:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",s=void 0!==e.suffix&&e.suffix,r=void 0!==e.unit?e.unit:void 0,a=void 0!==e.humanize&&e.humanize,l=void 0!==e.date?e.date:moment(),c=t.getValue(),u=moment(c,i);return u.isValid()?a?moment.duration(u.diff(l)).humanize(s):u.diff(l,r)+(s?" "+s:""):!0===n?c:"function"==typeof n?n(c):n},lookup:function(t,e,o){var i=t.getValue();return void 0===e[i]?(console.warn("Missing display value for "+i),i):e[i]},star:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e&&e.stars?e.stars:5,r=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",a.setAttribute("width","14"),a.setAttribute("height","14"),a.setAttribute("viewBox","0 0 512 512"),a.setAttribute("xml:space","preserve"),a.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var c=a.cloneNode(!0);c.innerHTML=l<=i?'':'',r.appendChild(c)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),r},traffic:function(t,e,o){var i,n,s=this.sanitizeHTML(t.getValue())||0,r=document.createElement("span"),a=e&&e.max?e.max:100,l=e&&e.min?e.min:0,c=e&&void 0!==e.color?e.color:["red","orange","green"],u="#666666";if(!isNaN(s)&&void 0!==t.getValue()){switch(r.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=a?parseFloat(s):a,n=parseFloat(n)>=l?parseFloat(n):l,i=(a-l)/100,n=Math.round((n-l)/i),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(s);break;case"object":if(Array.isArray(c)){var d=100/c.length,h=Math.floor(n/d);h=Math.min(h,c.length-1),h=Math.max(h,0),u=c[h];break}}return r.style.backgroundColor=u,r}},progress:function(t,e,o){var i,n,s,r,a,l=this.sanitizeHTML(t.getValue())||0,c=t.getElement(),u=e&&e.max?e.max:100,d=e&&e.min?e.min:0,h=e&&e.legendAlign?e.legendAlign:"center";switch(n=parseFloat(l)<=u?parseFloat(l):u,n=parseFloat(n)>=d?parseFloat(n):d,i=(u-d)/100,n=Math.round((n-d)/i),_typeof(e.color)){case"string":s=e.color;break;case"function":s=e.color(l);break;case"object":if(Array.isArray(e.color)){var p=100/e.color.length,m=Math.floor(n/p);m=Math.min(m,e.color.length-1),m=Math.max(m,0),s=e.color[m];break}default:s="#2DC214"}switch(_typeof(e.legend)){case"string":r=e.legend;break;case"function":r=e.legend(l);break;case"boolean":r=l;break;default:r=!1}switch(_typeof(e.legendColor)){case"string":a=e.legendColor;break;case"function":a=e.legendColor(l);break;case"object":if(Array.isArray(e.legendColor)){var p=100/e.legendColor.length,m=Math.floor(n/p);m=Math.min(m,e.legendColor.length-1),m=Math.max(m,0),a=e.legendColor[m]}break;default:a="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",n);var f=document.createElement("div");if(f.style.display="inline-block",f.style.position="relative",f.style.width=n+"%",f.style.backgroundColor=s,f.style.height="100%",f.setAttribute("data-max",u),f.setAttribute("data-min",d),r){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=h,g.style.width="100%",g.style.color=a,g.innerHTML=r}return o(function(){c.appendChild(f),r&&c.appendChild(g)}),""},color:function(t,e,o){return t.getElement().style.backgroundColor=this.sanitizeHTML(t.getValue()),""},buttonTick:function(t,e,o){return''},buttonCross:function(t,e,o){return''},rownum:function(t,e,o){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e,o){return t.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(t,e,o){function i(t){var e=s.element;s.open=t,e&&(s.open?(n.classList.add("open"),e.style.display=""):(n.classList.remove("open"),e.style.display="none"))}var n=document.createElement("div"),s=t.getRow()._row.modules.responsiveLayout;return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="+-",t.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",function(t){t.stopImmediatePropagation(),i(!s.open)}),i(s.open),n},rowSelection:function(t){var e=this,o=document.createElement("input");if(o.type="checkbox",this.table.modExists("selectRow",!0))if(o.addEventListener("click",function(t){t.stopPropagation()}),"function"==typeof t.getRow){var i=t.getRow();o.addEventListener("change",function(t){i.toggleSelect()}),o.checked=i.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(i,o)}else o.addEventListener("change",function(t){e.table.modules.selectRow.selectedRows.length?e.table.deselectRow():e.table.selectRow()}),this.table.modules.selectRow.registerHeaderSelectCheckbox(o);return o}},u.prototype.registerModule("format",C);var R=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};R.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},R.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right"},R.prototype.scrollHorizontal=function(){var t,e=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){e.layout()},100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},R.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},R.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},R.prototype.layoutColumnPosition=function(t){var e=this;this.leftColumns.forEach(function(o,i){o.modules.frozen.margin=e._calcSpace(e.leftColumns,i)+e.table.columnManager.scrollLeft+"px",i==e.leftColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,e.layoutElement(o.getElement(),o),t&&o.cells.forEach(function(t){e.layoutElement(t.getElement(),o)})}),this.rightColumns.forEach(function(o,i){o.modules.frozen.margin=e.rightPadding-e._calcSpace(e.rightColumns,i+1)+"px",i==e.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,e.layoutElement(o.getElement(),o),t&&o.cells.forEach(function(t){e.layoutElement(t.getElement(),o)})})},R.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},R.prototype.layoutRow=function(t){var e=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(),o)}),this.rightColumns.forEach(function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(),o)})},R.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},R.prototype._calcSpace=function(t,e){for(var o=0,i=0;i-1&&e.splice(o,1)}),e},x.prototype.freezeRow=function(t){t.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(t.modules.frozen=!0,this.topElement.appendChild(t.getElement()),t.initialize(),t.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(t),this.table.rowManager.refreshActiveData("display"),this.styleRows())},x.prototype.unfreezeRow=function(t){var e=this.rows.indexOf(t);if(t.modules.frozen){t.modules.frozen=!1;var o=t.getElement();o.parentNode.removeChild(o),this.table.rowManager.adjustTableSize(),this.rows.splice(e,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},x.prototype.styleRows=function(t){var e=this;this.rows.forEach(function(t,o){e.table.rowManager.styleRow(t,o)})},u.prototype.registerModule("frozenRows",x);var M=function(t){this._group=t,this.type="GroupComponent"};M.prototype.getKey=function(){return this._group.key},M.prototype.getField=function(){return this._group.field},M.prototype.getElement=function(){return this._group.element},M.prototype.getRows=function(){return this._group.getRows(!0)},M.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},M.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},M.prototype.getVisibility=function(){return this._group.visible},M.prototype.show=function(){this._group.show()},M.prototype.hide=function(){this._group.hide()},M.prototype.toggle=function(){this._group.toggleVisibility()},M.prototype._getSelf=function(){return this._group},M.prototype.getTable=function(){return this._group.groupManager.table};var D=function(t,e,o,i,n,s,r){this.groupManager=t,this.parent=e,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o-1?o?this.rows.splice(n+1,0,t):this.rows.splice(n,0,t):o?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},D.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach(function(e){e.scrollHeader(t)})},D.prototype.getRowIndex=function(t){},D.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},D.prototype.removeRow=function(t){var e=this.rows.indexOf(t),o=t.getElement();e>-1&&this.rows.splice(e,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},D.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],e=this.groupList.indexOf(t),e>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},D.prototype.getHeadersAndRows=function(t){var e=[];return e.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(o){e=e.concat(o.getHeadersAndRows(t))}):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top))),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom)))),e},D.prototype.getData=function(t,e){var o=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){o.push(t.getData(e||"data"))}),o},D.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(e){t+=e.getRowCount()}):t=this.rows.length,t},D.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},D.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){t.detachElement()})}):this.rows.forEach(function(t){var e=t.getElement();e.parentNode.removeChild(e)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},D.prototype.show=function(){var t=this;if(t.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var e=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var o=t.getElement();e.parentNode.insertBefore(o,e.nextSibling),t.initialize(),e=o})}):t.rows.forEach(function(t){var o=t.getElement();e.parentNode.insertBefore(o,e.nextSibling),t.initialize(),e=o}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},D.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(e){t.push(e.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},D.prototype.getRowGroup=function(t){var e=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}):this.rows.find(function(e){return e===t})&&(e=this),e},D.prototype.getSubGroups=function(t){var e=[];return this.groupList.forEach(function(o){e.push(t?o.getComponent():o)}),e},D.prototype.getRows=function(t){var e=[];return this.rows.forEach(function(o){e.push(t?o.getComponent():o)}),e},D.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(e){t.push(e.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},D.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;ti.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(e,o){t.headerGenerator[0]=function(t,i,n){return(void 0===t?"":t)+"("+i+" "+(1===i?e:o.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(e)||e)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.forEach(function(e){e.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach(function(e,o){var i,n;"function"==typeof e?i=e:(n=t.table.columnManager.getColumnByField(e),i=n?function(t){return n.getFieldValue(t)}:function(t){return t[e]}),t.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!t.allowedValues&&t.allowedValues[o]})}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=o),i&&(t.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},L.prototype.setDisplayIndex=function(t){this.displayIndex=t},L.prototype.getDisplayIndex=function(){return this.displayIndex},L.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},L.prototype.getGroups=function(t){var e=[];return this.groupList.forEach(function(o){e.push(t?o.getComponent():o)}),e},L.prototype.wipe=function(){this.groupList.forEach(function(t){t.wipe()})},L.prototype.pullGroupListData=function(t){var e=this,o=[];return t.forEach(function(t){var i={};i.level=0,i.rowCount=0,i.headerContent="";var n=[];t.hasSubGroups?(n=e.pullGroupListData(t.groupList),i.level=t.level,i.rowCount=n.length-t.groupList.length,i.headerContent=t.generator(t.key,i.rowCount,t.rows,t),o.push(i),o=o.concat(n)):(i.level=t.level,i.headerContent=t.generator(t.key,t.rows.length,t.rows,t),i.rowCount=t.getRows().length,o.push(i),t.getRows().forEach(function(t){o.push(t.getData("data"))}))}),o},L.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},L.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}),e},L.prototype.countGroups=function(){return this.groupList.length},L.prototype.generateGroups=function(t){var e=this,o=e.groups;e.groups={},e.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){e.createGroup(t,0,o)}),t.forEach(function(t){e.assignRowToExistingGroup(t,o)})):t.forEach(function(t){e.assignRowToGroup(t,o)})},L.prototype.createGroup=function(t,e,o){var i,n=e+"_"+t;o=o||[],i=new D(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},L.prototype.assignRowToExistingGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(t)},L.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,e),this.groups["0_"+o].addRow(t),!i},L.prototype.updateGroupRows=function(t){var e=this,o=[];if(e.groupList.forEach(function(t){o=o.concat(t.getHeadersAndRows())}),t){var i=e.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),e.table.rowManager.refreshActiveData("group",!0,!0)}return o},L.prototype.scrollHeaders=function(t){t+="px",this.groupList.forEach(function(e){e.scrollHeader(t)})},L.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1))},u.prototype.registerModule("groupRows",L);var T=function(t){this.table=t,this.history=[],this.index=-1};T.prototype.clear=function(){this.history=[],this.index=-1},T.prototype.action=function(t,e,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:e,data:o}),this.index++},T.prototype.getHistoryUndoSize=function(){return this.index+1},T.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},T.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},T.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},T.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},T.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},T.prototype._rebindRow=function(t,e){this.history.forEach(function(o){if(o.component instanceof r)o.component===t&&(o.component=e);else if(o.component instanceof l&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}})},u.prototype.registerModule("history",T);var k=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};k.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,i=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],s=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),i.length?t._extractHeaders(i,n):t._generateBlankHeaders(i,n);for(var r=0;ri&&(i=o.depth))}),n.depth+=i,!n.width)return!1}else{if(!this.columnVisCheck(t))return!1;n.width=1}return n},S.prototype.groupHeadersToRows=function(t){function e(t,n){var s=i-n;void 0===o[n]&&(o[n]=[]),t.height=t.subGroups?1:s-t.depth+1,o[n].push(t),t.subGroups&&t.subGroups.forEach(function(t){e(t,n+1)})}var o=[],i=0;return t.forEach(function(t){t.depth>i&&(i=t.depth)}),t.forEach(function(t){e(t,0)}),o},S.prototype.generateHeaderElements=function(){var t=this,e=document.createElement("thead");return this.groupHeadersToRows(this.generateColumnGroupHeaders()).forEach(function(o){var i=document.createElement("tr");t.mapElementStyles(t.table.columnManager.getHeadersElement(),e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.forEach(function(e){var o=document.createElement("th"),n=e.column.definition.cssClass?e.column.definition.cssClass.split(" "):[];o.colSpan=e.width,o.rowSpan=e.height,o.innerHTML=e.column.definition.title,t.cloneTableStyle&&(o.style.boxSizing="border-box"),n.forEach(function(t){o.classList.add(t)}),t.mapElementStyles(e.column.getElement(),o,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.mapElementStyles(e.column.contentElement,o,["padding-top","padding-left","padding-right","padding-bottom"]),e.column.visible?t.mapElementStyles(e.column.getElement(),o,["width"]):e.column.definition.width&&(o.style.width=e.column.definition.width+"px"),e.column.parent&&t.mapElementStyles(e.column.parent.groupElement,o,["border-top"]),i.appendChild(o)}),e.appendChild(i)}),e},S.prototype.generateBodyElements=function(t){var e,o,i,n,s,r,a,l,c=this;this.cloneTableStyle&&window.getComputedStyle&&(e=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),o=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),i=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),n=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),r=this.table.element.getElementsByClassName("tabulator-group")[0],n&&(a=n.getElementsByClassName("tabulator-cell"),s=a[0],a[a.length-1]));var u=document.createElement("tbody"),d=t?this.table.rowManager.getVisibleRows(!0):this.table.rowManager.getDisplayRows(),h=[];return!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&d.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&d.push(this.table.modules.columnCalcs.botRow)),this.table.columnManager.columnsByIndex.forEach(function(t){c.columnVisCheck(t)&&h.push(t)}),d=d.filter(function(t){switch(t.type){case"group":return!1!==c.config.rowGroups;case"calc":return!1!==c.config.columnCalcs}return!0}),d.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),d.forEach(function(t,n){var a=t.getData(),d=document.createElement("tr");switch(d.classList.add("tabulator-print-table-row"),t.type){case"group":var p=document.createElement("td");p.colSpan=h.length,p.innerHTML=t.key,d.classList.add("tabulator-print-table-group"),c.mapElementStyles(r,d,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),c.mapElementStyles(r,p,["padding-top","padding-left","padding-right","padding-bottom"]),d.appendChild(p);break;case"calc":d.classList.add("tabulator-print-table-calcs");case"row":h.forEach(function(e){var o=document.createElement("td"),i=e.getFieldValue(a),n={modules:{},getValue:function(){return i},getField:function(){return e.definition.field},getElement:function(){return o},getColumn:function(){return e.getComponent()},getData:function(){return a},getRow:function(){return t.getComponent()},getComponent:function(){return n},column:e};if((e.definition.cssClass?e.definition.cssClass.split(" "):[]).forEach(function(t){o.classList.add(t)}),c.table.modExists("format"))i=c.table.modules.format.formatValue(n);else switch(void 0===i?"undefined":_typeof(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}i instanceof Node?o.appendChild(i):o.innerHTML=i,s&&c.mapElementStyles(s,o,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"]),d.appendChild(o)}),l="calc"==t.type?i:n%2&&o?o:e,c.mapElementStyles(l,d,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"])}u.appendChild(d)}),u},S.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},S.prototype.getHtml=function(t,e,o){var i=document.createElement("div");return i.appendChild(this.genereateTable(o||this.table.options.htmlOutputConfig,e,t,"htmlOutput")),i.innerHTML},S.prototype.mapElementStyles=function(t,e,o){if(this.cloneTableStyle&&t&&e){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach(function(t){e.style[i[t]]=n.getPropertyValue(t)})}}},u.prototype.registerModule("htmlTableExport",S);var z=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};z.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var o in this.bindings)e[o]=this.bindings[o];if(Object.keys(t).length)for(var i in t)e[i]=t[i];this.mapBindings(e),this.bindEvents()}},z.prototype.mapBindings=function(t){var e=this,o=this;for(var i in t)!function(i){e.actions[i]?t[i]&&("object"!==_typeof(t[i])&&(t[i]=[t[i]]),t[i].forEach(function(t){o.mapBinding(i,t)})):console.warn("Key Binding Error - no such action:",i)}(i)},z.prototype.mapBinding=function(t,e){var o=this,i={action:this.actions[t],keys:[],ctrl:!1,shift:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;default:t=parseInt(t),i.keys.push(t),o.watchKeys[t]||(o.watchKeys[t]=[]),o.watchKeys[t].push(i)}})},z.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var o=e.keyCode,i=t.watchKeys[o];i&&(t.pressedKeys.push(o),i.forEach(function(o){t.checkBinding(e,o)}))},this.keydownBinding=function(e){var o=e.keyCode;if(t.watchKeys[o]){var i=t.pressedKeys.indexOf(o);i>-1&&t.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},z.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},z.prototype.checkBinding=function(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)}),i&&e.action.call(o,t),!0)},z.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},z.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,o=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o>=0?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,o=e.scrollTop+e.height,i=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o<=i?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(t.preventDefault(),e=o.nav(),e.next()||i&&(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(i),i.then(function(){e.next()})))},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(this.table.options.selectable&&"highlight"!=this.table.options.selectable?"selected":"active",null,null,null,!0)}},u.prototype.registerModule("keybindings",z);var F=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};F.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t},F.prototype.initializeColumn=function(t){var e,o=this,i={};t.modules.frozen||(e=t.getElement(),i.mousemove=function(i){t.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-u.prototype.helpers.elOffset(e).left+o.table.columnManager.element.scrollLeft>t.getWidth()/2?o.toCol===t&&o.toColAfter||(e.parentNode.insertBefore(o.placeholderElement,e.nextSibling),o.moveColumn(t,!0)):(o.toCol!==t||o.toColAfter)&&(e.parentNode.insertBefore(o.placeholderElement,e),o.moveColumn(t,!1)))}.bind(o),e.addEventListener("mousedown",function(e){o.touchMove=!1,1===e.which&&(o.checkTimeout=setTimeout(function(){o.startMove(e,t)},o.checkPeriod))}), +e.addEventListener("mouseup",function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(t)),t.modules.moveColumn=i},F.prototype.bindTouchEvents=function(t){var e,o,i,n,s,r,a,l=this,c=t.getElement(),u=!1;c.addEventListener("touchstart",function(c){l.checkTimeout=setTimeout(function(){l.touchMove=!0,e=t,o=t.nextColumn(),n=o?o.getWidth()/2:0,i=t.prevColumn(),s=i?i.getWidth()/2:0,r=0,a=0,u=!1,l.startMove(c,t)},l.checkPeriod)},{passive:!0}),c.addEventListener("touchmove",function(c){var d,h;l.moving&&(l.moveHover(c),u||(u=c.touches[0].pageX),d=c.touches[0].pageX-u,d>0?o&&d-r>n&&(h=o)!==t&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveColumn(h,!0)):i&&-d-a>s&&(h=i)!==t&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveColumn(h,!1)),h&&(e=h,o=h.nextColumn(),r=n,n=o?o.getWidth()/2:0,i=h.prevColumn(),a=s,s=i?i.getWidth()/2:0))},{passive:!0}),c.addEventListener("touchend",function(t){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&l.endMove(t)})},F.prototype.startMove=function(t,e){var o=e.getElement();this.moving=e,this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-u.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(t)},F.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)})},F.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)})},F.prototype.moveColumn=function(t,e){var o=this.moving.getCells();this.toCol=t,this.toColAfter=e,e?t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(o[e].getElement(),i.nextSibling)}):t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(o[e].getElement(),i)})},F.prototype.endMove=function(t){(1===t.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},F.prototype.moveHover=function(t){var e,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?t.touches[0].pageX:t.pageX)-u.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-nt.getHeight()/2){if(e.toRow!==t||!e.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(e.placeholderElement,i.nextSibling),e.moveRow(t,!0)}}else if(e.toRow!==t||e.toRowAfter){var i=t.getElement();i.previousSibling&&(i.parentNode.insertBefore(e.placeholderElement,i),e.moveRow(t,!1))}}.bind(e),t.modules.moveRow=o},H.prototype.initializeRow=function(t){var e,o=this,i={};i.mouseup=function(e){o.tableRowDrop(e,t)}.bind(o),i.mousemove=function(e){if(e.pageY-u.prototype.helpers.elOffset(t.element).top+o.table.rowManager.element.scrollTop>t.getHeight()/2){if(o.toRow!==t||!o.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(t,!0)}}else if(o.toRow!==t||o.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(t,!1)}}.bind(o),this.hasHandle||(e=t.getElement(),e.addEventListener("mousedown",function(e){1===e.which&&(o.checkTimeout=setTimeout(function(){o.startMove(e,t)},o.checkPeriod))}),e.addEventListener("mouseup",function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(t,t.getElement())),t.modules.moveRow=i},H.prototype.initializeCell=function(t){var e=this,o=t.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(e.checkTimeout=setTimeout(function(){e.startMove(o,t.row)},e.checkPeriod))}),o.addEventListener("mouseup",function(t){1===t.which&&e.checkTimeout&&clearTimeout(e.checkTimeout)}),this.bindTouchEvents(t.row,t.getElement())},H.prototype.bindTouchEvents=function(t,e){var o,i,n,s,r,a,l,c=this,u=!1;e.addEventListener("touchstart",function(e){c.checkTimeout=setTimeout(function(){c.touchMove=!0,o=t,i=t.nextRow(),s=i?i.getHeight()/2:0,n=t.prevRow(),r=n?n.getHeight()/2:0,a=0,l=0,u=!1,c.startMove(e,t)},c.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,e.addEventListener("touchmove",function(e){var d,h;c.moving&&(e.preventDefault(),c.moveHover(e),u||(u=e.touches[0].pageY),d=e.touches[0].pageY-u,d>0?i&&d-a>s&&(h=i)!==t&&(u=e.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement().nextSibling),c.moveRow(h,!0)):n&&-d-l>r&&(h=n)!==t&&(u=e.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement()),c.moveRow(h,!1)),h&&(o=h,i=h.nextRow(),a=s,s=i?i.getHeight()/2:0,n=h.prevRow(),l=r,r=n?n.getHeight()/2:0))}),e.addEventListener("touchend",function(t){c.checkTimeout&&clearTimeout(c.checkTimeout),c.moving&&(c.endMove(t),c.touchMove=!1)})},H.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)})},H.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)})},H.prototype.startMove=function(t,e){var o=e.getElement();this.setStartPosition(t,e),this.moving=e,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(e)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},H.prototype.setStartPosition=function(t,e){var o,i,n=this.touchMove?t.touches[0].pageX:t.pageX,s=this.touchMove?t.touches[0].pageY:t.pageY;o=e.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},H.prototype.endMove=function(t){t&&1!==t.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},H.prototype.moveRow=function(t,e){this.toRow=t,this.toRowAfter=e},H.prototype.moveHover=function(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)},H.prototype.moveHoverTable=function(t){var e=this.table.rowManager.getElement(),o=e.scrollTop,i=(this.touchMove?t.touches[0].pageY:t.pageY)-e.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},H.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+(this.touchMove?t.touches[0].pageX:t.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?t.touches[0].pageY:t.pageY)+"px"},H.prototype.connectToTables=function(t){var e=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStart.call(this.table,e),this.table.modules.comms.send(this.connection,"moveRow","connect",{row:t})},H.prototype.disconnectFromTables=function(){var t=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStop.call(this.table,t),this.table.modules.comms.send(this.connection,"moveRow","disconnect")},H.prototype.connect=function(t,e){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=t,this.connectedRow=e,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,e,t),!0)},H.prototype.disconnect=function(t){var e=this;t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),e.table.element.removeEventListener("mouseup",e.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,t)):console.warn("Move Row Error - trying to disconnect from non connected table")},H.prototype.dropComplete=function(t,e,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),e?e.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t);this.endMove()},H.prototype.tableRowDrop=function(t,e){var o=!1,i=!1;switch(t.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:e,success:i})},H.prototype.receivers={insert:function(t,e,o){return this.table.addRow(t.getData(),void 0,e),!0},add:function(t,e,o){return this.table.addRow(t.getData()),!0},update:function(t,e,o){return!!e&&(e.update(t.getData()),!0)},replace:function(t,e,o){return!!e&&(this.table.addRow(t.getData(),void 0,e),e.delete(),!0)}},H.prototype.senders={delete:function(t,e,o){t.delete()}},H.prototype.commsReceived=function(t,e,o){switch(e){case"connect":return this.connect(t,o.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,o.row,o.success)}},u.prototype.registerModule("moveRow",H);var _=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};_.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(s=e.lookupMutator(t.definition[r]))&&(o=!0,i[r]={mutator:s,params:t.definition[r+"Params"]||{}})}),o&&(t.modules.mutate=i)},_.prototype.lookupMutator=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?e=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":e=t}return e},_.prototype.transformRow=function(t,e,o){var i,n=this,s="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var r,a,l;n.modules.mutate&&(r=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&o&&void 0!==(i=n.getFieldValue(o))&&(l=n.getComponent(),a="function"==typeof r.params?r.params(i,t,e,l):r.params,n.setFieldValue(t,r.mutator(i,t,e,a,l)))}),t},_.prototype.transformCell=function(t,e){var o=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,t.row.getData()),t.column.setFieldValue(i,e),o.mutator(e,i,"edit",o.params,t.getComponent())):e},_.prototype.enable=function(){this.enabled=!0},_.prototype.disable=function(){this.enabled=!1},_.prototype.mutators={},u.prototype.registerModule("mutator",_);var A=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.pageSizes=[],this.createElements()};A.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),t=document.createElement("button"),t.classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},A.prototype.generatePageSizeSelectList=function(){var t=this,e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,-1==this.pageSizes.indexOf(this.size)&&e.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){e=[];for(var o=1;o<5;o++)e.push(this.size*o);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(function(e){var o=document.createElement("option");o.value=e,o.innerHTML=e,t.pageSizeSelect.appendChild(o)}),this.pageSizeSelect.value=this.size}},A.prototype.initialize=function(t){var e,o=this;for(var i in o.table.options.paginationDataSent)o.paginationDataSentNames[i]=o.table.options.paginationDataSent[i];for(var n in o.table.options.paginationDataReceived)o.paginationDataReceivedNames[n]=o.table.options.paginationDataReceived[n];o.table.modules.localize.bind("pagination|first",function(t){o.firstBut.innerHTML=t}),o.table.modules.localize.bind("pagination|first_title",function(t){o.firstBut.setAttribute("aria-label",t),o.firstBut.setAttribute("title",t)}),o.table.modules.localize.bind("pagination|prev",function(t){o.prevBut.innerHTML=t}),o.table.modules.localize.bind("pagination|prev_title",function(t){o.prevBut.setAttribute("aria-label",t),o.prevBut.setAttribute("title",t)}),o.table.modules.localize.bind("pagination|next",function(t){o.nextBut.innerHTML=t}),o.table.modules.localize.bind("pagination|next_title",function(t){o.nextBut.setAttribute("aria-label",t),o.nextBut.setAttribute("title",t)}),o.table.modules.localize.bind("pagination|last",function(t){o.lastBut.innerHTML=t}),o.table.modules.localize.bind("pagination|last_title",function(t){o.lastBut.setAttribute("aria-label",t),o.lastBut.setAttribute("title",t)}),o.firstBut.addEventListener("click",function(){o.setPage(1)}),o.prevBut.addEventListener("click",function(){o.previousPage()}),o.nextBut.addEventListener("click",function(){o.nextPage().then(function(){}).catch(function(){})}),o.lastBut.addEventListener("click",function(){o.setPage(o.max)}),o.table.options.paginationElement&&(o.element=o.table.options.paginationElement),this.pageSizeSelect&&(e=document.createElement("label"),o.table.modules.localize.bind("pagination|page_size",function(t){o.pageSizeSelect.setAttribute("aria-label",t),o.pageSizeSelect.setAttribute("title",t),e.innerHTML=t}),o.element.appendChild(e),o.element.appendChild(o.pageSizeSelect),o.pageSizeSelect.addEventListener("change",function(t){o.setPageSize(o.pageSizeSelect.value),o.setPage(1).then(function(){}).catch(function(){})})),o.element.appendChild(o.firstBut),o.element.appendChild(o.prevBut),o.element.appendChild(o.pagesElement),o.element.appendChild(o.nextBut),o.element.appendChild(o.lastBut),o.table.options.paginationElement||t||o.table.footerManager.append(o.element,o),o.mode=o.table.options.pagination,o.size=o.table.options.paginationSize||Math.floor(o.table.rowManager.getElement().clientHeight/24),o.count=o.table.options.paginationButtonCount,o.generatePageSizeSelectList()},A.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},A.prototype.setDisplayIndex=function(t){this.displayIndex=t},A.prototype.getDisplayIndex=function(){return this.displayIndex},A.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},A.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},A.prototype.setMaxPage=function(t){t=parseInt(t),this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},A.prototype.setPage=function(t){var e=this,o=this;return new Promise(function(i,n){t=parseInt(t),t>0&&t<=e.max?(e.page=t,e.trigger().then(function(){i()}).catch(function(){n()}),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),n())})},A.prototype.setPageToRow=function(t){var e=this;return new Promise(function(o,i){var n=e.table.rowManager.getDisplayRows(e.displayIndex-1),s=n.indexOf(t);if(s>-1){var r=Math.ceil((s+1)/e.size);e.setPage(r).then(function(){o()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},A.prototype.setPageSize=function(t){t=parseInt(t),t>0&&(this.size=t),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},A.prototype._setPageButtons=function(){for(var t=this,e=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&s<=t.max&&t.pagesElement.appendChild(t._generatePageButton(s));this.footerRedraw()},A.prototype._generatePageButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("tabulator-page"),t==e.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),o.setAttribute("aria-label","Show Page "+t),o.setAttribute("title","Show Page "+t),o.setAttribute("data-page",t),o.textContent=t,o.addEventListener("click",function(o){e.setPage(t)}),o},A.prototype.previousPage=function(){var t=this;return new Promise(function(e,o){t.page>1?(t.page--,t.trigger().then(function(){e()}).catch(function(){o()})):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},A.prototype.nextPage=function(){var t=this;return new Promise(function(e,o){t.pagen?i.splice(n,0,t):i.push(t))}),i},P.prototype._findColumn=function(t,e){var o=e.columns?"group":e.field?"field":"object";return t.find(function(t){switch(o){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}})},P.prototype.save=function(t){var e={};switch(t){case"columns":e=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":e=this.table.modules.filter.getFilters();break;case"sort":e=this.validateSorters(this.table.modules.sort.getSort());break;case"group":e=this.getGroupConfig();break;case"page":e=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,t,e)},P.prototype.validateSorters=function(t){return t.forEach(function(t){t.column=t.field,delete t.field}),t},P.prototype.getGroupConfig=function(){ +return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(data.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(data.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(data.groupHeader=this.table.options.groupHeader)),data},P.prototype.getPageConfig=function(){var t={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(t.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(t.paginationInitialPage=this.table.modules.page.getPage())),t},P.prototype.parseColumns=function(t){var e=this,o=[];return t.forEach(function(t){var i,n={},s=t.getDefinition();t.isGroup?(n.title=s.title,n.columns=e.parseColumns(t.getColumns())):(n.field=t.getField(),!0===e.config.columns?(i=Object.keys(s),i.push("width")):i=e.config.columns,i.forEach(function(e){switch(e){case"width":n.width=t.getWidth();break;case"visible":n.visible=t.visible;break;default:n[e]=s[e]}})),o.push(n)}),o},P.prototype.readers={local:function(t,e){var o=localStorage.getItem(t+"-"+e);return!!o&&JSON.parse(o)},cookie:function(t,e){var o,i=document.cookie,n=t+"-"+e,s=i.indexOf(n+"=");return s>-1&&(i=i.substr(s),o=i.indexOf(";"),o>-1&&(i=i.substr(0,o)),data=i.replace(n+"=","")),!!data&&JSON.parse(data)}},P.prototype.writers={local:function(t,e,o){localStorage.setItem(t+"-"+e,JSON.stringify(o))},cookie:function(t,e,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=t+"_"+e+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},u.prototype.registerModule("persistence",P);var B=function(t){this.table=t,this.element=!1,this.manualBlock=!1};B.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},B.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.htmlTableExport.genereateTable(this.table.options.printConfig,this.table.options.printCopyStyle,this.table.options.printVisibleRows,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},B.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},B.prototype.printFullscreen=function(t,e,o){var i,n,s=window.scrollX,r=window.scrollY,a=document.createElement("div"),l=document.createElement("div"),c=this.table.modules.htmlTableExport.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==e?e:this.table.options.printCopyStyle,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof i?a.innerHTML=i:a.appendChild(i),this.element.appendChild(a)),this.element.appendChild(c),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof n?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,c),window.print(),this.cleanup(),window.scrollTo(s,r),this.manualBlock=!1},u.prototype.registerModule("print",B);var N=function(t){this.table=t,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};N.prototype.watchData=function(t){var e,o=this;this.currentVersion++,e=this.currentVersion,o.unwatchData(),o.data=t,o.origFuncs.push=t.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||e!==o.currentVersion||i.forEach(function(t){o.table.rowManager.addRowActual(t,!1)}),o.origFuncs.push.apply(t,arguments)}}),o.origFuncs.unshift=t.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||e!==o.currentVersion||i.forEach(function(t){o.table.rowManager.addRowActual(t,!0)}),o.origFuncs.unshift.apply(t,arguments)}}),o.origFuncs.shift=t.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||e!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(t)}}),o.origFuncs.pop=t.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||e!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(t)}}),o.origFuncs.splice=t.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?t.length+n[0]:n[0],r=n[1],a=!!n[2]&&n.slice(2);if(!o.blocked&&e===o.currentVersion){if(a&&(i=!!t[s]&&o.table.rowManager.getRowFromDataObject(t[s]),i?a.forEach(function(t){o.table.rowManager.addRowActual(t,!0,i,!0)}):(a=a.slice().reverse(),a.forEach(function(t){o.table.rowManager.addRowActual(t,!0,!1,!0)}))),0!==r){var l=t.slice(s,void 0===n[1]?n[1]:s+r);l.forEach(function(t,e){var i=o.table.rowManager.getRowFromDataObject(t);i&&i.deleteActual(e!==l.length-1)})}(a||0!==r)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(t,arguments)}})},N.prototype.unwatchData=function(){if(!1!==this.data)for(var t in this.origFuncs)Object.defineProperty(this.data,t,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},N.prototype.watchRow=function(t){var e=t.getData();this.blocked=!0;for(var o in e)this.watchKey(t,e,o);this.blocked=!1},N.prototype.watchKey=function(t,e,o){var i=this,n=Object.getOwnPropertyDescriptor(e,o),s=e[o],r=this.currentVersion;Object.defineProperty(e,o,{set:function(e){if(s=e,!i.blocked&&r===i.currentVersion){var a={};a[o]=e,t.updateData(a)}n.set&&n.set(e)},get:function(){return n.get&&n.get(),s}})},N.prototype.unwatchRow=function(t){var e=t.getData();for(var o in e)Object.defineProperty(e,o,{value:e[o]})},N.prototype.block=function(){this.blocked=!0},N.prototype.unblock=function(){this.blocked=!1},u.prototype.registerModule("reactiveData",N);var I=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};I.prototype.initializeColumn=function(t,e,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===t&&(n="textarea"==e.definition.formatter||e.definition.variableHeight,e.modules.resize={variableHeight:n}),!0===s||s==t){var r=document.createElement("div");r.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",r.addEventListener("click",function(t){t.stopPropagation()});var l=function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=e,i._mouseDown(t,o,r))};r.addEventListener("mousedown",l),r.addEventListener("touchstart",l,{passive:!0}),r.addEventListener("dblclick",function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(t.stopPropagation(),o.reinitializeWidth(!0))}),a.addEventListener("click",function(t){t.stopPropagation()});var c=function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=e,i._mouseDown(t,s,a)))};a.addEventListener("mousedown",c),a.addEventListener("touchstart",c,{passive:!0}),a.addEventListener("dblclick",function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(t.stopPropagation(),s.reinitializeWidth(!0)))}),o.appendChild(r),o.appendChild(a)}},I.prototype._checkResizability=function(t){return void 0!==t.definition.resizable?t.definition.resizable:this.table.options.resizableColumns},I.prototype._mouseDown=function(t,e,o){function i(t){e.setWidth(s.startWidth+((void 0===t.screenX?t.touches[0].screenX:t.screenX)-s.startX)),!s.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function n(t){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,e.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===t.screenX?t.touches[0].screenX:t.screenX,s.startWidth=e.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},u.prototype.registerModule("resizeColumns",I);var O=function(t){this.table=t,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};O.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(t){t.stopPropagation()});var s=function(o){e.startRow=t,e._mouseDown(o,t,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",function(t){t.stopPropagation()});var r=function(o){var i=e.table.rowManager.prevDisplayRow(t);i&&(e.startRow=i,e._mouseDown(o,i,n))};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r,{passive:!0}),o.appendChild(i),o.appendChild(n)},O.prototype._mouseDown=function(t,e,o){function i(t){e.setHeight(s.startHeight+((void 0===t.screenY?t.touches[0].screenY:t.screenY)-s.startY))}function n(t){document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.rowResized.call(this.table,e.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),s.startY=void 0===t.screenY?t.touches[0].screenY:t.screenY,s.startHeight=e.getHeight(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},u.prototype.registerModule("resizeRows",O);var j=function(t){this.table=t,this.binding=!1,this.observer=!1};j.prototype.initialize=function(t){var e=this.table;"undefined"!=typeof ResizeObserver&&"virtual"===e.rowManager.getRenderMode()?(this.observer=new ResizeObserver(function(t){(!e.browserMobile||browserMobile&&!e.modules.edit.currentCell)&&e.redraw()}),this.observer.observe(e.element)):(this.binding=function(){(!e.browserMobile||browserMobile&&!e.modules.edit.currentCell)&&e.redraw()},window.addEventListener("resize",this.binding))},j.prototype.clearBindings=function(t){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element)},u.prototype.registerModule("resizeTable",j);var G=function(t){this.table=t,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};G.prototype.initialize=function(){var t=this,e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,e.push(o),o.visible||"collapse"!==t.mode||t.hiddenColumns.push(o))}),e=e.reverse(),e=e.sort(function(t,e){return e.modules.responsive.order-t.modules.responsive.order||e.modules.responsive.index-t.modules.responsive.index}),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0,o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if(n=o.next(),n.done)break;s=n.value}var r=s;if("responsiveCollapse"==r.definition.formatter){this.collapseHandleColumn=r;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},G.prototype.initializeColumn=function(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}},G.prototype.initializeRow=function(t){var e;"calc"!==t.type&&(e=document.createElement("div"),e.classList.add("tabulator-responsive-collapse"),t.modules.responsiveLayout={element:e,open:this.collapseStartOpen},this.collapseStartOpen||(e.style.display="none"))},G.prototype.layoutRow=function(t){var e=t.getElement();t.modules.responsiveLayout&&(e.appendChild(t.modules.responsiveLayout.element),this.generateCollapsedRowContent(t))},G.prototype.updateColumnVisibility=function(t,e){t.modules.responsive&&(t.modules.responsive.visible=e,this.initialize())},G.prototype.hideColumn=function(t){var e=this.hiddenColumns.length;t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent(),this.collapseHandleColumn&&!e&&this.collapseHandleColumn.show())},G.prototype.showColumn=function(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&(e=this.hiddenColumns.indexOf(t),e>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},G.prototype.update=function(){for(var t=this,e=!0;e;){var o="fitColumns"==t.table.modules.layout.getMode()?t.table.columnManager.getFlexBaseWidth():t.table.columnManager.getWidth(),i=(t.table.options.headerVisible?t.table.columnManager.element.clientWidth:t.table.element.clientWidth)-o;if(i<0){var n=t.columns[t.index];n?(t.hideColumn(n),t.index++):e=!1}else{var s=t.columns[t.index-1];s&&i>0&&i>=s.getWidth()?(t.showColumn(s),t.index--):e=!1}t.table.rowManager.activeRowsCount||t.table.rowManager.renderEmptyScroll()}},G.prototype.generateCollapsedContent=function(){var t=this;this.table.rowManager.getDisplayRows().forEach(function(e){t.generateCollapsedRowContent(e)})},G.prototype.generateCollapsedRowContent=function(t){var e,o;if(t.modules.responsiveLayout){for(e=t.modules.responsiveLayout.element;e.firstChild;)e.removeChild(e.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(t)),o&&e.appendChild(o)}},G.prototype.generateCollapsedRowData=function(t){var e,o=this,i=t.getData(),n=[];return this.hiddenColumns.forEach(function(s){var r=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(e={value:!1,data:{},getValue:function(){return r},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return s.getComponent()}},n.push({title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,e,s.modules.format.params)})):n.push({title:s.definition.title,value:r}))}),n},G.prototype.formatCollapsedData=function(t){var e=document.createElement("table"),o="";return t.forEach(function(t){var e=document.createElement("div");t.value instanceof Node&&(e.appendChild(t.value),t.value=e.innerHTML),o+=""+t.title+""+t.value+""}),e.innerHTML=o,Object.keys(t).length?e:""},u.prototype.registerModule("responsiveLayout",G);var V=function(t){this.table=t,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};V.prototype.clearSelectionData=function(t){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t||this._rowSelectionChanged()},V.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=function t(){setTimeout(function(){e.selecting=!1},50),document.body.removeEventListener("mouseup",t)};t.modules.select={selected:!1},e.table.options.selectableCheck.call(this.table,t.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),e.table.options.selectable&&"highlight"!=e.table.options.selectable&&("click"===e.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){e.table._clearSelection(),e.lastClickedRow=e.lastClickedRow||t;var i=e.table.rowManager.getDisplayRowIndex(e.lastClickedRow),n=e.table.rowManager.getDisplayRowIndex(t),s=i<=n?i:n,r=i>=n?i:n,a=e.table.rowManager.getDisplayRows().slice(0),l=a.splice(s,r-s+1);o.ctrlKey||o.metaKey?(l.forEach(function(o){o!==e.lastClickedRow&&(!0===e.table.options.selectable||e.isRowSelected(t)?e.toggleRow(o):e.selectedRows.lengthe.table.options.selectable&&(l=l.slice(0,e.table.options.selectable)),e.selectRows(l)),e.table._clearSelection()}else o.ctrlKey||o.metaKey?(e.toggleRow(t),e.lastClickedRow=t):(e.deselectRows(),e.selectRows(t),e.lastClickedRow=t)}):(o.addEventListener("click",function(o){e.table.modExists("edit")&&e.table.modules.edit.getCurrentCell()||e.table._clearSelection(),e.selecting||e.toggleRow(t)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return e.table._clearSelection(),e.selecting=!0,e.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),e.toggleRow(t),!1}),o.addEventListener("mouseenter",function(o){e.selecting&&(e.table._clearSelection(),e.toggleRow(t),e.selectPrev[1]==t&&e.toggleRow(e.selectPrev[0]))}),o.addEventListener("mouseout",function(o){e.selecting&&(e.table._clearSelection(),e.selectPrev.unshift(t))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},V.prototype.toggleRow=function(t){this.table.options.selectableCheck.call(this.table,t.getComponent())&&(t.modules.select&&t.modules.select.selected?this._deselectRow(t):this._selectRow(t))},V.prototype.selectRows=function(t){var e,o=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":this.table.rowManager.rows.forEach(function(t){o._selectRow(t,!0,!0)}),this._rowSelectionChanged();break;case"string":e=self.table.rowManager.findRow(t),e?this._selectRow(e,!0,!0):this.table.rowManager.getRows(t).forEach(function(t){o._selectRow(t,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(t)?(t.forEach(function(t){o._selectRow(t,!0,!0)}),this._rowSelectionChanged()):this._selectRow(t,!1,!0)}},V.prototype._selectRow=function(t,e,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(t);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),e||(this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged())):e||console.warn("Selection Error - No such row found, ignoring selection:"+t)},V.prototype.isRowSelected=function(t){return-1!==this.selectedRows.indexOf(t)},V.prototype.deselectRows=function(t){var e,o=this;if(void 0===t){e=o.selectedRows.length;for(var i=0;i-1&&(n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),n.getElement().classList.remove("tabulator-selected"),i.selectedRows.splice(o,1),e||(i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged())):e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)},V.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getData())}),t},V.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getComponent())}),t},V.prototype._rowSelectionChanged=function(){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},V.prototype.registerRowSelectCheckbox=function(t,e){t._row.modules.select||(t._row.modules.select={}),t._row.modules.select.checkboxEl=e},V.prototype.registerHeaderSelectCheckbox=function(t){this.headerCheckboxElement=t},u.prototype.registerModule("selectRow",V);var W=function(t){this.table=t,this.sortList=[],this.changed=!1};W.prototype.initializeColumn=function(t,e){var o,i,n=this,s=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?s=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":s=t.definition.sorter}t.modules.sort={sorter:s,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&(o=t.getElement(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-arrow"),e.appendChild(i),o.addEventListener("click",function(e){var o="",i=[],s=!1;if(t.modules.sort){if(t.modules.sort.tristate)o="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(i=n.getSort(),s=i.findIndex(function(e){return e.field===t.getField()}),s>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:t,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(t,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},W.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},W.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},W.prototype.setSort=function(t,e){var o=this,i=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=o.table.columnManager.findColumn(t.column),e?(t.column=e,i.push(t),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},W.prototype.clear=function(){this.setSort([])},W.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(e=t.getFieldValue(o),void 0===e?"undefined":_typeof(e)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},W.prototype.sort=function(t){var e,o=this;e=this.table.options.sortOrderReverse?o.sortList.slice().reverse():o.sortList,o.table.options.dataSorting&&o.table.options.dataSorting.call(o.table,o.getSort()),o.clearColumnHeaders(),o.table.options.ajaxSorting?e.forEach(function(t,e){o.setColumnHeader(t.column,t.dir)}):e.forEach(function(i,n){i.column&&i.column.modules.sort&&(i.column.modules.sort.sorter||(i.column.modules.sort.sorter=o.findSorter(i.column)),o._sortItem(t,i.column,i.dir,e,n)),o.setColumnHeader(i.column,i.dir)}),o.table.options.dataSorted&&o.table.options.dataSorted.call(o.table,o.getSort(),o.table.rowManager.getComponents("active"))},W.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},W.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},W.prototype._sortItem=function(t,e,o,i,n){var s=this,r="function"==typeof e.modules.sort.params?e.modules.sort.params(e.getComponent(),o):e.modules.sort.params;t.sort(function(t,a){var l=s._sortRow(t,a,e,o,r);if(0===l&&n)for(var c=n-1;c>=0&&0===(l=s._sortRow(t,a,i[c].column,i[c].dir,r));c--);return l})},W.prototype._sortRow=function(t,e,o,i,n){var s,r,a="asc"==i?t:e,l="asc"==i?e:t;return t=o.getFieldValue(a.getData()),e=o.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",s=a.getComponent(),r=l.getComponent(),o.modules.sort.sorter.call(this,t,e,s,r,o.getComponent(),i,n)},W.prototype.sorters={number:function(t,e,o,i,n,s,r){var a=r.alignEmptyValues,l=r.decimalSeparator||".",c=r.thousandSeparator||",",u=0;if(t=parseFloat(String(t).split(c).join("").split(l).join(".")),e=parseFloat(String(e).split(c).join("").split(l).join(".")),isNaN(t))u=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;u=1}return("top"===a&&"desc"===s||"bottom"===a&&"asc"===s)&&(u*=-1),u},string:function(t,e,o,i,n,s,r){var a,l=r.alignEmptyValues,c=0;if(t){if(e){switch(_typeof(r.locale)){case"boolean":r.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=r.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}c=1}else c=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c},date:function(t,e,o,i,n,s,r){return r.format||(r.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,o,i,n,s,r)},time:function(t,e,o,i,n,s,r){return r.format||(r.format="hh:mm"),this.sorters.datetime.call(this,t,e,o,i,n,s,r)},datetime:function(t,e,o,i,n,s,r){var a=r.format||"DD/MM/YYYY hh:mm:ss",l=r.alignEmptyValues,c=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;c=1}else c=e.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,o,i,n,s,r){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,o,i,n,s,r){function a(t){switch(u){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,c=0,u=r.type||"length",d=r.alignEmptyValues,h=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,c=e?a(e):0,l-c;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(t,e,o,i,n,s,r){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,o,i,n,s,r){var a,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=r.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),d=a.length>l.length?l.length:a.length;hu?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},u.prototype.registerModule("sort",W);var U=function(t){this.table=t};return U.prototype.initializeColumn=function(t){var e,o=this,i=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(e=o._extractValidator(t))&&i.push(e)}):(e=this._extractValidator(t.definition.validator))&&i.push(e),t.modules.validate=!!i.length&&i)},U.prototype._extractValidator=function(t){var e,o,i;switch(void 0===t?"undefined":_typeof(t)){case"string":return i=t.indexOf(":"),i>-1?(e=t.substring(0,i),o=t.substring(i+1)):e=t,this._buildValidator(e,o);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},U.prototype._buildValidator=function(t,e){var o="function"==typeof t?t:this.validators[t];return o?{type:"function"==typeof t?"function":t,func:o,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},U.prototype.validate=function(t,e,o){var i=this,n=[];return t&&t.forEach(function(t){t.func.call(i,e,o,t.params)||n.push({type:t.type,parameters:t.params})}),!n.length||n},U.prototype.validators={integer:function(t,e,o){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return""===e||null===e||void 0===e||!isNaN(e)},string:function(t,e,o){return""===e||null===e||void 0===e||isNaN(e)},max:function(t,e,o){return""===e||null===e||void 0===e||parseFloat(e)<=o},min:function(t,e,o){return""===e||null===e||void 0===e||parseFloat(e)>=o},minLength:function(t,e,o){return""===e||null===e||void 0===e||String(e).length>=o},maxLength:function(t,e,o){return""===e||null===e||void 0===e||String(e).length<=o},in:function(t,e,o){return""===e||null===e||void 0===e||("string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1)},regex:function(t,e,o){return""===e||null===e||void 0===e||new RegExp(o).test(e)},unique:function(t,e,o){if(""===e||null===e||void 0===e)return!0;var i=!0,n=t.getData(),s=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var o=t.getData();o!==n&&e==s.getFieldValue(o)&&(i=!1)}),i},required:function(t,e,o){return""!==e&&null!==e&&void 0!==e}},u.prototype.registerModule("validate",U),u}); \ No newline at end of file diff --git a/cookbook/static/tabulator/tabulator_bootstrap4.min.css b/cookbook/static/tabulator/tabulator_bootstrap4.min.css new file mode 100644 index 00000000..0454d48c --- /dev/null +++ b/cookbook/static/tabulator/tabulator_bootstrap4.min.css @@ -0,0 +1,3 @@ +/* Tabulator v4.5.1 (c) Oliver Folkerd */ +.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:1rem;text-align:left;width:100%;max-width:100%;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6;background-color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;background-color:#fff;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #dee2e6;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:.75rem}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #dee2e6}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:10}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #dee2e6}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #dee2e6}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:600%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#ececec!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #dee2e6}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #dee2e6}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:2px solid #dee2e6;text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-bottom:1px solid #dee2e6;border-top:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-paginator{font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page-size{display:inline-block;margin:0 5px;padding:2px 5px;border:1px solid #dee2e6;border-radius:3px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0;margin-top:5px;padding:8px 12px;border:1px solid #dee2e6;border-right:none;background:hsla(0,0%,100%,.2)}.tabulator .tabulator-footer .tabulator-page[data-page=first]{border-top-left-radius:4px;border-bottom-left-radius:4px}.tabulator .tabulator-footer .tabulator-page[data-page=last]{border:1px solid #dee2e6;border-top-right-radius:4px;border-bottom-right-radius:4px}.tabulator .tabulator-footer .tabulator-page.active{border-color:#007bff;background-color:#007bff;color:#fff}.tabulator .tabulator-footer .tabulator-page:disabled{border-color:#dee2e6;background:#fff;color:#6c757d}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;border-color:#dee2e6;background:#e9ecef;color:#0056b3}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:100;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.thead-dark .tabulator-header,.tabulator.thead-dark .tabulator-header .tabulator-col{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark{background-color:#212529}.tabulator.table-dark:not(.thead-light) .tabulator-header,.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark .tabulator-tableHolder{color:#fff}.tabulator.table-dark .tabulator-row{border-color:#32383e}.tabulator.table-dark .tabulator-row:hover{background-color:hsla(0,0%,100%,.075)!important}.tabulator.table-striped .tabulator-row:nth-child(2n){background-color:#f9f9f9}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selected{background-color:#9abcea}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selectable:hover{background-color:#f5f5f5;cursor:pointer}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator.table-striped.table-dark .tabulator-row:nth-child(2n){background-color:hsla(0,0%,100%,.05)}.tabulator.table-bordered{border:1px solid #dee2e6}.tabulator.table-bordered .tabulator-header .tabulator-col,.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #dee2e6}.tabulator.table-borderless .tabulator-header,.tabulator.table-borderless .tabulator-row{border:none}.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content{padding:.3rem!important}.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row{min-height:1.6rem}.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.3rem!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary{background:#b8daff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary{background:#d6d8db!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success{background:#c3e6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info{background:#bee5eb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning{background:#ffeeba!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger{background:#f5c6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light{background:#fdfdfe!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark{background:#c6c8ca!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary{background:#007bff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary{background:#6c757d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success{background:#28a745!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info{background:#17a2b8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning{background:#ffc107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger{background:#dc3545!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light{background:#f8f9fa!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark{background:#343a40!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary{background:#b8daff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary{background:#d6d8db!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success{background:#c3e6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info{background:#bee5eb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning{background:#ffeeba!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger{background:#f5c6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light{background:#fdfdfe!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark{background:#c6c8ca!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary{background:#007bff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary{background:#6c757d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success{background:#28a745!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info{background:#17a2b8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning{background:#ffc107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger{background:#dc3545!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light{background:#f8f9fa!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark{background:#343a40!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active{background:#f5f5f5!important}.tabulator-row{position:relative;box-sizing:border-box;min-height:2.5rem;background-color:#fff;border-bottom:1px solid #dee2e6}.tabulator-row.tabulator-selectable:hover{background-color:#f5f5f5;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;pointer-events:none!important;z-index:15}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:10}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #dee2e6}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #dee2e6}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:1rem}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.75rem;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #dee2e6;border-bottom:2px solid #dee2e6}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #ccc;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{display:inline-block;height:14px;width:14px;border-radius:14px}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #dee2e6;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #dee2e6;font-size:1rem;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:10000}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #dee2e6;padding:4px;padding-top:6px;font-weight:700}.tabulator-print-fullscreen{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse} +/*# sourceMappingURL=tabulator_bootstrap4.min.css.map */ diff --git a/cookbook/templates/forms/edit_internal_recipe.html b/cookbook/templates/forms/edit_internal_recipe.html index ca2ddb62..c0913402 100644 --- a/cookbook/templates/forms/edit_internal_recipe.html +++ b/cookbook/templates/forms/edit_internal_recipe.html @@ -2,15 +2,13 @@ {% load crispy_forms_tags %} {% load i18n %} {% load custom_tags %} +{% load static %} {% block title %}{% trans 'Edit Recipe' %}{% endblock %} {% block extra_head %} - - + + {% endblock %} {% block content %} @@ -45,6 +43,23 @@