Files
flights_web_raw/apps/angular/node_modules/primeng/bundles/primeng-table.umd.min.js
T

16 lines
92 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("primeng/api"),require("primeng/paginator"),require("primeng/dom"),require("primeng/utils"),require("rxjs"),require("@angular/cdk/scrolling")):"function"==typeof define&&define.amd?define("primeng/table",["exports","@angular/core","@angular/common","primeng/api","primeng/paginator","primeng/dom","primeng/utils","rxjs","@angular/cdk/scrolling"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.table={}),e.ng.core,e.ng.common,e.primeng.api,e.primeng.paginator,e.primeng.dom,e.primeng.utils,e.rxjs,e.ng.cdk.scrolling)}(this,(function(e,t,i,n,o,r,l,a,s){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */Object.create;function d(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)l.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return l}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}Object.create;var h=function(){function e(){this.sortSource=new a.Subject,this.selectionSource=new a.Subject,this.contextMenuSource=new a.Subject,this.valueSource=new a.Subject,this.totalRecordsSource=new a.Subject,this.columnsSource=new a.Subject,this.sortSource$=this.sortSource.asObservable(),this.selectionSource$=this.selectionSource.asObservable(),this.contextMenuSource$=this.contextMenuSource.asObservable(),this.valueSource$=this.valueSource.asObservable(),this.totalRecordsSource$=this.totalRecordsSource.asObservable(),this.columnsSource$=this.columnsSource.asObservable()}return e.prototype.onSort=function(e){this.sortSource.next(e)},e.prototype.onSelectionChange=function(){this.selectionSource.next()},e.prototype.onContextMenu=function(e){this.contextMenuSource.next(e)},e.prototype.onValueChange=function(e){this.valueSource.next(e)},e.prototype.onTotalRecordsChange=function(e){this.totalRecordsSource.next(e)},e.prototype.onColumnsChange=function(e){this.columnsSource.next(e)},e}();h.decorators=[{type:t.Injectable}];var u=function(){function e(e,i,n,o){this.el=e,this.zone=i,this.tableService=n,this.cd=o,this.pageLinks=5,this.alwaysShowPaginator=!0,this.paginatorPosition="bottom",this.paginatorDropdownScrollHeight="200px",this.currentPageReportTemplate="{currentPage} of {totalPages}",this.showPageLinks=!0,this.defaultSortOrder=1,this.sortMode="single",this.resetPageOnSort=!0,this.selectionChange=new t.EventEmitter,this.contextMenuSelectionChange=new t.EventEmitter,this.contextMenuSelectionMode="separate",this.rowTrackBy=function(e,t){return t},this.lazy=!1,this.lazyLoadOnInit=!0,this.compareSelectionBy="deepEquals",this.csvSeparator=",",this.exportFilename="download",this.filters={},this.filterDelay=300,this.expandedRowKeys={},this.editingRowKeys={},this.rowExpandMode="multiple",this.virtualScrollDelay=150,this.virtualRowHeight=28,this.columnResizeMode="fit",this.loadingIcon="pi pi-spinner",this.showLoader=!0,this.stateStorage="session",this.editMode="cell",this.onRowSelect=new t.EventEmitter,this.onRowUnselect=new t.EventEmitter,this.onPage=new t.EventEmitter,this.onSort=new t.EventEmitter,this.onFilter=new t.EventEmitter,this.onLazyLoad=new t.EventEmitter,this.onRowExpand=new t.EventEmitter,this.onRowCollapse=new t.EventEmitter,this.onContextMenuSelect=new t.EventEmitter,this.onColResize=new t.EventEmitter,this.onColReorder=new t.EventEmitter,this.onRowReorder=new t.EventEmitter,this.onEditInit=new t.EventEmitter,this.onEditComplete=new t.EventEmitter,this.onEditCancel=new t.EventEmitter,this.onHeaderCheckboxToggle=new t.EventEmitter,this.sortFunction=new t.EventEmitter,this.firstChange=new t.EventEmitter,this.rowsChange=new t.EventEmitter,this.onStateSave=new t.EventEmitter,this.onStateRestore=new t.EventEmitter,this._value=[],this._totalRecords=0,this._first=0,this.selectionKeys={},this._sortOrder=1}return e.prototype.ngOnInit=function(){this.lazy&&this.lazyLoadOnInit&&(this.virtualScroll||this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.restoringFilter&&(this.restoringFilter=!1)),this.initialized=!0},e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach((function(t){switch(t.getType()){case"caption":e.captionTemplate=t.template;break;case"header":e.headerTemplate=t.template;break;case"body":e.bodyTemplate=t.template;break;case"loadingbody":e.loadingBodyTemplate=t.template;break;case"footer":e.footerTemplate=t.template;break;case"summary":e.summaryTemplate=t.template;break;case"colgroup":e.colGroupTemplate=t.template;break;case"rowexpansion":e.expandedRowTemplate=t.template;break;case"frozenrows":e.frozenRowsTemplate=t.template;break;case"frozenheader":e.frozenHeaderTemplate=t.template;break;case"frozenbody":e.frozenBodyTemplate=t.template;break;case"frozenfooter":e.frozenFooterTemplate=t.template;break;case"frozencolgroup":e.frozenColGroupTemplate=t.template;break;case"emptymessage":e.emptyMessageTemplate=t.template;break;case"paginatorleft":e.paginatorLeftTemplate=t.template;break;case"paginatorright":e.paginatorRightTemplate=t.template}}))},e.prototype.ngAfterViewInit=function(){this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths()},e.prototype.clearCache=function(){this.scrollable&&(this.scrollableViewChild&&this.scrollableViewChild.clearCache(),this.scrollableFrozenViewChild&&this.scrollableViewChild.clearCache())},e.prototype.ngOnChanges=function(e){e.value&&(this.isStateful()&&!this.stateRestored&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.clearCache(),this.totalRecords=this._value?this._value.length:0,"single"==this.sortMode&&this.sortField?this.sortSingle():"multiple"==this.sortMode&&this.multiSortMeta?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&this.restoreColumnOrder()),e.sortField&&(this._sortField=e.sortField.currentValue,this.lazy&&!this.initialized||"single"===this.sortMode&&this.sortSingle()),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,this.lazy&&!this.initialized||"single"===this.sortMode&&this.sortSingle()),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,"multiple"===this.sortMode&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1)},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"first",{get:function(){return this._first},set:function(e){this._first=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._rows},set:function(e){this._rows=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalRecords",{get:function(){return this._totalRecords},set:function(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sortField",{get:function(){return this._sortField},set:function(e){this._sortField=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sortOrder",{get:function(){return this._sortOrder},set:function(e){this._sortOrder=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multiSortMeta",{get:function(){return this._multiSortMeta},set:function(e){this._multiSortMeta=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){return this._selection},set:function(e){this._selection=e},enumerable:!1,configurable:!0}),e.prototype.updateSelectionKeys=function(){var e,t;if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))try{for(var i=d(this._selection),n=i.next();!n.done;n=i.next()){var o=n.value;this.selectionKeys[String(l.ObjectUtils.resolveFieldData(o,this.dataKey))]=1}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}else this.selectionKeys[String(l.ObjectUtils.resolveFieldData(this._selection,this.dataKey))]=1},e.prototype.onPageChange=function(e){this.first=e.first,this.rows=e.rows,this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.onPage.emit({first:this.first,rows:this.rows}),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()},e.prototype.sort=function(e){var t=e.originalEvent;if("single"===this.sortMode&&(this._sortOrder=this.sortField===e.field?-1*this.sortOrder:this.defaultSortOrder,this._sortField=e.field,this.sortSingle(),this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())),"multiple"===this.sortMode){var i=t.metaKey||t.ctrlKey,n=this.getSortMeta(e.field);n?i?n.order=-1*n.order:(this._multiSortMeta=[{field:e.field,order:-1*n.order}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):(i&&this.multiSortMeta||(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null},e.prototype.sortSingle=function(){var e=this;if(this.sortField&&this.sortOrder){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:this.sortField,order:this.sortOrder}):(this.value.sort((function(t,i){var n=l.ObjectUtils.resolveFieldData(t,e.sortField),o=l.ObjectUtils.resolveFieldData(i,e.sortField),r=null;return r=null==n&&null!=o?-1:null!=n&&null==o?1:null==n&&null==o?0:"string"==typeof n&&"string"==typeof o?n.localeCompare(o):n<o?-1:n>o?1:0,e.sortOrder*r})),this._value=p(this.value)),this.hasFilter()&&this._filter());var t={field:this.sortField,order:this.sortOrder};this.onSort.emit(t),this.tableService.onSort(t)}},e.prototype.sortMultiple=function(){var e=this;this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((function(t,i){return e.multisortField(t,i,e.multiSortMeta,0)})),this._value=p(this.value)),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))},e.prototype.multisortField=function(e,t,i,n){var o=l.ObjectUtils.resolveFieldData(e,i[n].field),r=l.ObjectUtils.resolveFieldData(t,i[n].field),a=null;if(null==o&&null!=r)a=-1;else if(null!=o&&null==r)a=1;else if(null==o&&null==r)a=0;else if("string"==typeof o||o instanceof String){if(o.localeCompare&&o!=r)return i[n].order*o.localeCompare(r)}else a=o<r?-1:1;return o==r?i.length-1>n?this.multisortField(e,t,i,n+1):0:i[n].order*a},e.prototype.getSortMeta=function(e){if(this.multiSortMeta&&this.multiSortMeta.length)for(var t=0;t<this.multiSortMeta.length;t++)if(this.multiSortMeta[t].field===e)return this.multiSortMeta[t];return null},e.prototype.isSorted=function(e){if("single"===this.sortMode)return this.sortField&&this.sortField===e;if("multiple"===this.sortMode){var t=!1;if(this.multiSortMeta)for(var i=0;i<this.multiSortMeta.length;i++)if(this.multiSortMeta[i].field==e){t=!0;break}return t}},e.prototype.handleRowClick=function(e){var t=e.originalEvent.target,i=t.nodeName,n=t.parentElement&&t.parentElement.nodeName;if("INPUT"!=i&&"BUTTON"!=i&&"A"!=i&&"INPUT"!=n&&"BUTTON"!=n&&"A"!=n&&!r.DomHandler.hasClass(e.originalEvent.target,"p-clickable")){if(this.selectionMode){if(this.preventSelectionSetterPropagation=!0,this.isMultipleSelectionMode()&&e.originalEvent.shiftKey&&null!=this.anchorRowIndex)r.DomHandler.clearSelection(),null!=this.rangeRowIndex&&this.clearSelectionRange(e.originalEvent),this.rangeRowIndex=e.rowIndex,this.selectRange(e.originalEvent,e.rowIndex);else{var o=e.rowData,a=this.isSelected(o),s=!this.rowTouched&&this.metaKeySelection,d=this.dataKey?String(l.ObjectUtils.resolveFieldData(o,this.dataKey)):null;if(this.anchorRowIndex=e.rowIndex,this.rangeRowIndex=e.rowIndex,s){var c=e.originalEvent.metaKey||e.originalEvent.ctrlKey;if(a&&c){if(this.isSingleSelectionMode())this._selection=null,this.selectionKeys={},this.selectionChange.emit(null);else{var h=this.findIndexInSelection(o);this._selection=this.selection.filter((function(e,t){return t!=h})),this.selectionChange.emit(this.selection),d&&delete this.selectionKeys[d]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row"})}else this.isSingleSelectionMode()?(this._selection=o,this.selectionChange.emit(o),d&&(this.selectionKeys={},this.selectionKeys[d]=1)):this.isMultipleSelectionMode()&&(c?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=p(this.selection,[o]),this.selectionChange.emit(this.selection),d&&(this.selectionKeys[d]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:e.rowIndex})}else if("single"===this.selectionMode)a?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row"})):(this._selection=o,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:e.rowIndex}),d&&(this.selectionKeys={},this.selectionKeys[d]=1));else if("multiple"===this.selectionMode)if(a){var u=this.findIndexInSelection(o);this._selection=this.selection.filter((function(e,t){return t!=u})),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:o,type:"row"}),d&&delete this.selectionKeys[d]}else this._selection=this.selection?p(this.selection,[o]):[o],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:o,type:"row",index:e.rowIndex}),d&&(this.selectionKeys[d]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}},e.prototype.handleRowTouchEnd=function(e){this.rowTouched=!0},e.prototype.handleRowRightClick=function(e){if(this.contextMenu){var t=e.rowData;if("separate"===this.contextMenuSelectionMode)this.contextMenuSelection=t,this.contextMenuSelectionChange.emit(t),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:t,index:e.rowIndex}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(t);else if("joint"===this.contextMenuSelectionMode){this.preventSelectionSetterPropagation=!0;var i=this.isSelected(t),n=this.dataKey?String(l.ObjectUtils.resolveFieldData(t,this.dataKey)):null;i||(this.isSingleSelectionMode()?(this.selection=t,this.selectionChange.emit(t)):this.isMultipleSelectionMode()&&(this.selection=[t],this.selectionChange.emit(this.selection)),n&&(this.selectionKeys[n]=1)),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e,data:t,index:e.rowIndex})}}},e.prototype.selectRange=function(e,t){var i,n;this.anchorRowIndex>t?(i=t,n=this.anchorRowIndex):this.anchorRowIndex<t?(i=this.anchorRowIndex,n=t):(i=t,n=t),this.lazy&&this.paginator&&(i-=this.first,n-=this.first);for(var o=i;o<=n;o++){var r=this.filteredValue?this.filteredValue[o]:this.value[o];if(!this.isSelected(r)){this._selection=p(this.selection,[r]);var a=this.dataKey?String(l.ObjectUtils.resolveFieldData(r,this.dataKey)):null;a&&(this.selectionKeys[a]=1),this.onRowSelect.emit({originalEvent:e,data:r,type:"row"})}}this.selectionChange.emit(this.selection)},e.prototype.clearSelectionRange=function(e){var t,i;this.rangeRowIndex>this.anchorRowIndex?(t=this.anchorRowIndex,i=this.rangeRowIndex):this.rangeRowIndex<this.anchorRowIndex?(t=this.rangeRowIndex,i=this.anchorRowIndex):(t=this.rangeRowIndex,i=this.rangeRowIndex);for(var n=function(t){var i=o.value[t],n=o.findIndexInSelection(i);o._selection=o.selection.filter((function(e,t){return t!=n}));var r=o.dataKey?String(l.ObjectUtils.resolveFieldData(i,o.dataKey)):null;r&&delete o.selectionKeys[r],o.onRowUnselect.emit({originalEvent:e,data:i,type:"row"})},o=this,r=t;r<=i;r++)n(r)},e.prototype.isSelected=function(e){return!(!e||!this.selection)&&(this.dataKey?void 0!==this.selectionKeys[l.ObjectUtils.resolveFieldData(e,this.dataKey)]:this.selection instanceof Array?this.findIndexInSelection(e)>-1:this.equals(e,this.selection))},e.prototype.findIndexInSelection=function(e){var t=-1;if(this.selection&&this.selection.length)for(var i=0;i<this.selection.length;i++)if(this.equals(e,this.selection[i])){t=i;break}return t},e.prototype.toggleRowWithRadio=function(e,t){this.preventSelectionSetterPropagation=!0,this.selection!=t?(this._selection=t,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:t,type:"radiobutton"}),this.dataKey&&(this.selectionKeys={},this.selectionKeys[String(l.ObjectUtils.resolveFieldData(t,this.dataKey))]=1)):(this._selection=null,this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:t,type:"radiobutton"})),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()},e.prototype.toggleRowWithCheckbox=function(e,t){this.selection=this.selection||[];var i=this.isSelected(t),n=this.dataKey?String(l.ObjectUtils.resolveFieldData(t,this.dataKey)):null;if(this.preventSelectionSetterPropagation=!0,i){var o=this.findIndexInSelection(t);this._selection=this.selection.filter((function(e,t){return t!=o})),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:t,type:"checkbox"}),n&&delete this.selectionKeys[n]}else this._selection=this.selection?p(this.selection,[t]):[t],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:t,type:"checkbox"}),n&&(this.selectionKeys[n]=1);this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()},e.prototype.toggleRowsWithCheckbox=function(e,t){this._selection=t?this.filteredValue?this.filteredValue.slice():this.value.slice():[],this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:t}),this.isStateful()&&this.saveState()},e.prototype.equals=function(e,t){return"equals"===this.compareSelectionBy?e===t:l.ObjectUtils.equals(e,t,this.dataKey)},e.prototype.filter=function(e,t,i){var n=this;this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[t]&&delete this.filters[t]:this.filters[t]={value:e,matchMode:i},this.filterTimeout=setTimeout((function(){n._filter(),n.filterTimeout=null}),this.filterDelay),this.anchorRowIndex=null},e.prototype.filterGlobal=function(e,t){this.filter(e,"global",t)},e.prototype.isFilterBlank=function(e){return null==e||("string"==typeof e&&0==e.trim().length||e instanceof Array&&0==e.length)},e.prototype._filter=function(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(this.hasFilter()){var e=void 0;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(var t=0;t<this.value.length;t++){var i=!0,n=!1,o=!1;for(var r in this.filters)if(this.filters.hasOwnProperty(r)&&"global"!==r){o=!0;var a=this.filters[r],s=r,d=a.value,c=a.matchMode||"startsWith",p=l.ObjectUtils.resolveFieldData(this.value[t],s);if((0,l.FilterUtils[c])(p,d,this.filterLocale)||(i=!1),!i)break}if(this.filters.global&&!n&&e)for(var h=0;h<e.length;h++){var u=e[h].field||e[h];if(n=l.FilterUtils[this.filters.global.matchMode](l.ObjectUtils.resolveFieldData(this.value[t],u),this.filters.global.value,this.filterLocale))break}(this.filters.global?o?o&&i&&n:n:o&&i)&&this.filteredValue.push(this.value[t])}this.filteredValue.length===this.value.length&&(this.filteredValue=null),this.paginator&&(this.totalRecords=this.filteredValue?this.filteredValue.length:this.value?this.value.length:0)}else this.filteredValue=null,this.paginator&&(this.totalRecords=this.value?this.value.length:0)}this.onFilter.emit({filters:this.filters,filteredValue:this.filteredValue||this.value}),this.tableService.onValueChange(this.value),this.isStateful()&&!this.restoringFilter&&this.saveState(),this.restoringFilter&&(this.restoringFilter=!1),this.cd.markForCheck(),this.scrollable&&this.resetScrollTop()},e.prototype.hasFilter=function(){var e=!0;for(var t in this.filters)if(this.filters.hasOwnProperty(t)){e=!1;break}return!e},e.prototype.createLazyLoadMetadata=function(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta}},e.prototype.clear=function(){this._sortField=null,this._sortOrder=this.defaultSortOrder,this._multiSortMeta=null,this.tableService.onSort(null),this.filteredValue=null,this.filters={},this.first=0,this.firstChange.emit(this.first),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._value?this._value.length:0},e.prototype.reset=function(){console.warn("reset function is deprecated, use clear instead."),this.clear()},e.prototype.exportCSV=function(e){var t,i=this,n="",o=this.frozenColumns?p(this.frozenColumns,this.columns):this.columns;e&&e.selectionOnly?t=this.selection||[]:(t=this.filteredValue||this.value,this.frozenValue&&(t=t?p(this.frozenValue,t):this.frozenValue));for(var r=0;r<o.length;r++){var a=o[r];!1!==a.exportable&&a.field&&(n+='"'+(a.header||a.field)+'"',r<o.length-1&&(n+=this.csvSeparator))}t.forEach((function(e,t){n+="\n";for(var r=0;r<o.length;r++){var a=o[r];if(!1!==a.exportable&&a.field){var s=l.ObjectUtils.resolveFieldData(e,a.field);s=null!=s?i.exportFunction?i.exportFunction({data:s,field:a.field}):String(s).replace(/"/g,'""'):"",n+='"'+s+'"',r<o.length-1&&(n+=i.csvSeparator)}}}));var s=new Blob([n],{type:"text/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(s,this.exportFilename+".csv");else{var d=document.createElement("a");d.style.display="none",document.body.appendChild(d),void 0!==d.download?(d.setAttribute("href",URL.createObjectURL(s)),d.setAttribute("download",this.exportFilename+".csv"),d.click()):(n="data:text/csv;charset=utf-8,"+n,window.open(encodeURI(n))),document.body.removeChild(d)}},e.prototype.resetScrollTop=function(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})},e.prototype.scrollToVirtualIndex=function(e){this.scrollableViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e),this.scrollableFrozenViewChild&&this.scrollableFrozenViewChild.scrollToVirtualIndex(e)},e.prototype.scrollTo=function(e){this.scrollableViewChild&&this.scrollableViewChild.scrollTo(e),this.scrollableFrozenViewChild&&this.scrollableFrozenViewChild.scrollTo(e)},e.prototype.updateEditingCell=function(e,t,i,n){this.editingCell=e,this.editingCellData=t,this.editingCellField=i,this.editingCellRowIndex=n,this.bindDocumentEditListener()},e.prototype.isEditingCellValid=function(){return this.editingCell&&0===r.DomHandler.find(this.editingCell,".ng-invalid.ng-dirty").length},e.prototype.bindDocumentEditListener=function(){var e=this;this.documentEditListener||(this.documentEditListener=function(t){e.editingCell&&!e.editingCellClick&&e.isEditingCellValid()&&(r.DomHandler.removeClass(e.editingCell,"p-cell-editing"),e.editingCell=null,e.onEditComplete.emit({field:e.editingCellField,data:e.editingCellData,originalEvent:t,index:e.editingCellRowIndex}),e.editingCellField=null,e.editingCellData=null,e.editingCellRowIndex=null,e.unbindDocumentEditListener(),e.cd.markForCheck()),e.editingCellClick=!1},document.addEventListener("click",this.documentEditListener))},e.prototype.unbindDocumentEditListener=function(){this.documentEditListener&&(document.removeEventListener("click",this.documentEditListener),this.documentEditListener=null)},e.prototype.initRowEdit=function(e){var t=String(l.ObjectUtils.resolveFieldData(e,this.dataKey));this.editingRowKeys[t]=!0},e.prototype.saveRowEdit=function(e,t){if(0===r.DomHandler.find(t,".ng-invalid.ng-dirty").length){var i=String(l.ObjectUtils.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[i]}},e.prototype.cancelRowEdit=function(e){var t=String(l.ObjectUtils.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[t]},e.prototype.toggleRow=function(e,t){if(!this.dataKey)throw new Error("dataKey must be defined to use row expansion");var i=String(l.ObjectUtils.resolveFieldData(e,this.dataKey));null!=this.expandedRowKeys[i]?(delete this.expandedRowKeys[i],this.onRowCollapse.emit({originalEvent:t,data:e})):("single"===this.rowExpandMode&&(this.expandedRowKeys={}),this.expandedRowKeys[i]=!0,this.onRowExpand.emit({originalEvent:t,data:e})),t&&t.preventDefault(),this.isStateful()&&this.saveState()},e.prototype.isRowExpanded=function(e){return!0===this.expandedRowKeys[String(l.ObjectUtils.resolveFieldData(e,this.dataKey))]},e.prototype.isRowEditing=function(e){return!0===this.editingRowKeys[String(l.ObjectUtils.resolveFieldData(e,this.dataKey))]},e.prototype.isSingleSelectionMode=function(){return"single"===this.selectionMode},e.prototype.isMultipleSelectionMode=function(){return"multiple"===this.selectionMode},e.prototype.onColumnResizeBegin=function(e){var t=r.DomHandler.getOffset(this.containerViewChild.nativeElement).left;this.lastResizerHelperX=e.pageX-t+this.containerViewChild.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()},e.prototype.onColumnResize=function(e){var t=r.DomHandler.getOffset(this.containerViewChild.nativeElement).left;r.DomHandler.addClass(this.containerViewChild.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-t+this.containerViewChild.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"},e.prototype.onColumnResizeEnd=function(e,t){var i=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,n=t.offsetWidth,o=parseInt(t.style.minWidth||15);n+i<o&&(i=o-n);var l=n+i;if(l>=o){if("fit"===this.columnResizeMode){for(var a=t.nextElementSibling;!a.offsetParent;)a=a.nextElementSibling;if(a){var s=a.offsetWidth-i,d=a.style.minWidth||15;if(l>15&&s>parseInt(d))if(this.scrollable){var c=this.findParentScrollableView(t),p=r.DomHandler.findSingle(c,".p-datatable-scrollable-body table")||r.DomHandler.findSingle(c,".p-datatable-scrollable-body table"),h=r.DomHandler.findSingle(c,"table.p-datatable-scrollable-header-table"),u=r.DomHandler.findSingle(c,"table.p-datatable-scrollable-footer-table"),g=r.DomHandler.index(t);this.resizeColGroup(h,g,l,s),this.resizeColGroup(p,g,l,s),this.resizeColGroup(u,g,l,s)}else t.style.width=l+"px",a&&(a.style.width=s+"px")}}else if("expand"===this.columnResizeMode&&l>=o)if(this.scrollable)this.setScrollableItemsWidthOnExpandResize(t,l,i);else{this.tableViewChild.nativeElement.style.width=this.tableViewChild.nativeElement.offsetWidth+i+"px",t.style.width=l+"px";var f=this.tableViewChild.nativeElement.style.width;this.containerViewChild.nativeElement.style.width=f+"px"}this.onColResize.emit({element:t,delta:i}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",r.DomHandler.removeClass(this.containerViewChild.nativeElement,"p-unselectable-text")},e.prototype.setScrollableItemsWidthOnExpandResize=function(e,t,i){var n=e?this.findParentScrollableView(e):this.containerViewChild.nativeElement,o=r.DomHandler.findSingle(n,".p-datatable-scrollable-body")||r.DomHandler.findSingle(n,"cdk-virtual-scroll-viewport"),l=r.DomHandler.findSingle(n,".p-datatable-scrollable-header"),a=r.DomHandler.findSingle(n,".p-datatable-scrollable-footer"),s=r.DomHandler.findSingle(o,".p-datatable-scrollable-body table")||r.DomHandler.findSingle(n,"cdk-virtual-scroll-viewport table"),d=r.DomHandler.findSingle(l,"table.p-datatable-scrollable-header-table"),c=r.DomHandler.findSingle(a,"table.p-datatable-scrollable-footer-table"),p=e?s.offsetWidth+i:t,h=e?d.offsetWidth+i:t,u=this.containerViewChild.nativeElement.offsetWidth>=p,g=function(e,t,i,n){e&&t&&(e.style.width=n?i+r.DomHandler.calculateScrollbarWidth(o)+"px":"auto",t.style.width=i+"px")};if(g(o,s,p,u),g(l,d,h,u),g(a,c,h,u),e){var f=r.DomHandler.index(e);this.resizeColGroup(d,f,t,null),this.resizeColGroup(s,f,t,null),this.resizeColGroup(c,f,t,null)}},e.prototype.findParentScrollableView=function(e){if(e){for(var t=e.parentElement;t&&!r.DomHandler.hasClass(t,"p-datatable-scrollable-view");)t=t.parentElement;return t}return null},e.prototype.resizeColGroup=function(e,t,i,n){if(e){var o="COLGROUP"===e.children[0].nodeName?e.children[0]:null;if(!o)throw"Scrollable tables require a colgroup to support resizable columns";var r=o.children[t],l=r.nextElementSibling;r.style.width=i+"px",l&&n&&(l.style.width=n+"px")}},e.prototype.onColumnDragStart=function(e,t){this.reorderIconWidth=r.DomHandler.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild.nativeElement),this.reorderIconHeight=r.DomHandler.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild.nativeElement),this.draggedColumn=t,e.dataTransfer.setData("text","b")},e.prototype.onColumnDragEnter=function(e,t){if(this.reorderableColumns&&this.draggedColumn&&t){e.preventDefault();var i=r.DomHandler.getOffset(this.containerViewChild.nativeElement),n=r.DomHandler.getOffset(t);if(this.draggedColumn!=t){var o=r.DomHandler.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),l=r.DomHandler.indexWithinGroup(t,"preorderablecolumn"),a=n.left-i.left,s=(i.top,n.top,n.left+t.offsetWidth/2);this.reorderIndicatorUpViewChild.nativeElement.style.top=n.top-i.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=n.top-i.top+t.offsetHeight+"px",e.pageX>s?(this.reorderIndicatorUpViewChild.nativeElement.style.left=a+t.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=a+t.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=a-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=a-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),l-o==1&&-1===this.dropPosition||l-o==-1&&1===this.dropPosition?(this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none"):(this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block")}else e.dataTransfer.dropEffect="none"}},e.prototype.onColumnDragLeave=function(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")},e.prototype.onColumnDrop=function(e,t){var i=this;if(e.preventDefault(),this.draggedColumn){var n=r.DomHandler.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),o=r.DomHandler.indexWithinGroup(t,"preorderablecolumn"),a=n!=o;a&&(o-n==1&&-1===this.dropPosition||n-o==1&&1===this.dropPosition)&&(a=!1),a&&o<n&&1===this.dropPosition&&(o+=1),a&&o>n&&-1===this.dropPosition&&(o-=1),a&&(l.ObjectUtils.reorderArray(this.columns,n,o),this.onColReorder.emit({dragIndex:n,dropIndex:o,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular((function(){setTimeout((function(){i.saveState()}))}))),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}},e.prototype.onRowDragStart=function(e,t){this.rowDragging=!0,this.draggedRowIndex=t,e.dataTransfer.setData("text","b")},e.prototype.onRowDragOver=function(e,t,i){if(this.rowDragging&&this.draggedRowIndex!==t){var n=r.DomHandler.getOffset(i).top+r.DomHandler.getWindowScrollTop(),o=e.pageY,l=n+r.DomHandler.getOuterHeight(i)/2,a=i.previousElementSibling;o<l?(r.DomHandler.removeClass(i,"p-datatable-dragpoint-bottom"),this.droppedRowIndex=t,a?r.DomHandler.addClass(a,"p-datatable-dragpoint-bottom"):r.DomHandler.addClass(i,"p-datatable-dragpoint-top")):(a?r.DomHandler.removeClass(a,"p-datatable-dragpoint-bottom"):r.DomHandler.addClass(i,"p-datatable-dragpoint-top"),this.droppedRowIndex=t+1,r.DomHandler.addClass(i,"p-datatable-dragpoint-bottom"))}},e.prototype.onRowDragLeave=function(e,t){var i=t.previousElementSibling;i&&r.DomHandler.removeClass(i,"p-datatable-dragpoint-bottom"),r.DomHandler.removeClass(t,"p-datatable-dragpoint-bottom"),r.DomHandler.removeClass(t,"p-datatable-dragpoint-top")},e.prototype.onRowDragEnd=function(e){this.rowDragging=!1,this.draggedRowIndex=null,this.droppedRowIndex=null},e.prototype.onRowDrop=function(e,t){if(null!=this.droppedRowIndex){var i=this.draggedRowIndex>this.droppedRowIndex?this.droppedRowIndex:0===this.droppedRowIndex?0:this.droppedRowIndex-1;l.ObjectUtils.reorderArray(this.value,this.draggedRowIndex,i),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:i})}this.onRowDragLeave(e,t),this.onRowDragEnd(e)},e.prototype.isEmpty=function(){var e=this.filteredValue||this.value;return null==e||0==e.length},e.prototype.getBlockableElement=function(){return this.el.nativeElement.children[0]},e.prototype.getStorage=function(){switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}},e.prototype.isStateful=function(){return null!=this.stateKey},e.prototype.saveState=function(){var e=this.getStorage(),t={};this.paginator&&(t.first=this.first,t.rows=this.rows),this.sortField&&(t.sortField=this.sortField,t.sortOrder=this.sortOrder),this.multiSortMeta&&(t.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(t.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(t),this.reorderableColumns&&this.saveColumnOrder(t),this.selection&&(t.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(t.expandedRowKeys=this.expandedRowKeys),Object.keys(t).length&&e.setItem(this.stateKey,JSON.stringify(t)),this.onStateSave.emit(t)},e.prototype.clearState=function(){var e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)},e.prototype.restoreState=function(){var e=this,t=this.getStorage().getItem(this.stateKey);if(t){var i=JSON.parse(t);this.paginator&&(void 0!==this.first&&(this.first=i.first,this.firstChange.emit(this.first)),void 0!==this.rows&&(this.rows=i.rows,this.rowsChange.emit(this.rows))),i.sortField&&(this.restoringSort=!0,this._sortField=i.sortField,this._sortOrder=i.sortOrder),i.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=i.multiSortMeta),i.filters&&(this.restoringFilter=!0,this.filters=i.filters),this.resizableColumns&&(this.columnWidthsState=i.columnWidths,this.tableWidthState=i.tableWidth),i.expandedRowKeys&&(this.expandedRowKeys=i.expandedRowKeys),i.selection&&Promise.resolve(null).then((function(){return e.selectionChange.emit(i.selection)})),this.stateRestored=!0,this.onStateRestore.emit(i)}},e.prototype.saveColumnWidths=function(e){var t=[];r.DomHandler.find(this.containerViewChild.nativeElement,".p-datatable-thead > tr:first-child > th").map((function(e){return t.push(r.DomHandler.getOuterWidth(e))})),e.columnWidths=t.join(","),"expand"===this.columnResizeMode&&(e.tableWidth=this.scrollable?r.DomHandler.findSingle(this.containerViewChild.nativeElement,".p-datatable-scrollable-header-table").style.width:r.DomHandler.getOuterWidth(this.tableViewChild.nativeElement)+"px")},e.prototype.restoreColumnWidths=function(){if(this.columnWidthsState){var e=this.columnWidthsState.split(",");if("expand"===this.columnResizeMode&&this.tableWidthState&&(this.scrollable?this.setScrollableItemsWidthOnExpandResize(null,this.tableWidthState,0):(this.tableViewChild.nativeElement.style.width=this.tableWidthState,this.containerViewChild.nativeElement.style.width=this.tableWidthState)),this.scrollable){var t=r.DomHandler.find(this.containerViewChild.nativeElement,".p-datatable-scrollable-header-table > colgroup > col"),i=r.DomHandler.find(this.containerViewChild.nativeElement,".p-datatable-scrollable-body table > colgroup > col");t.map((function(t,i){return t.style.width=e[i]+"px"})),i.map((function(t,i){return t.style.width=e[i]+"px"}))}else{r.DomHandler.find(this.tableViewChild.nativeElement,".p-datatable-thead > tr:first-child > th").map((function(t,i){return t.style.width=e[i]+"px"}))}}},e.prototype.saveColumnOrder=function(e){if(this.columns){var t=[];this.columns.map((function(e){t.push(e.field||e.key)})),e.columnOrder=t}},e.prototype.restoreColumnOrder=function(){var e=this,t=this.getStorage().getItem(this.stateKey);if(t){var i=JSON.parse(t).columnOrder;if(i){var n=[];i.map((function(t){return n.push(e.findColumnByKey(t))})),this.columnOrderStateRestored=!0,this.columns=n}}},e.prototype.findColumnByKey=function(e){var t,i;if(!this.columns)return null;try{for(var n=d(this.columns),o=n.next();!o.done;o=n.next()){var r=o.value;if(r.key===e||r.field===e)return r}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.ngOnDestroy=function(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null},e}();u.decorators=[{type:t.Component,args:[{selector:"p-table",template:'\n <div #container [ngStyle]="style" [class]="styleClass" data-scrollselectors=".p-datatable-scrollable-body, .p-datatable-unfrozen-view .p-datatable-scrollable-body"\n [ngClass]="{\'p-datatable p-component\': true,\n \'p-datatable-hoverable-rows\': (rowHover||selectionMode),\n \'p-datatable-auto-layout\': autoLayout,\n \'p-datatable-resizable\': resizableColumns,\n \'p-datatable-resizable-fit\': (resizableColumns && columnResizeMode === \'fit\'),\n \'p-datatable-scrollable\': scrollable,\n \'p-datatable-flex-scrollable\': (scrollable && scrollHeight === \'flex\'),\n \'p-datatable-responsive\': responsive}">\n <div class="p-datatable-loading-overlay p-component-overlay" *ngIf="loading && showLoader">\n <i [class]="\'p-datatable-loading-icon pi-spin \' + loadingIcon"></i>\n </div>\n <div *ngIf="captionTemplate" class="p-datatable-header">\n <ng-container *ngTemplateOutlet="captionTemplate"></ng-container>\n </div>\n <p-paginator [rows]="rows" [first]="first" [totalRecords]="totalRecords" [pageLinkSize]="pageLinks" styleClass="p-paginator-top" [alwaysShow]="alwaysShowPaginator"\n (onPageChange)="onPageChange($event)" [rowsPerPageOptions]="rowsPerPageOptions" *ngIf="paginator && (paginatorPosition === \'top\' || paginatorPosition ==\'both\')"\n [templateLeft]="paginatorLeftTemplate" [templateRight]="paginatorRightTemplate" [dropdownAppendTo]="paginatorDropdownAppendTo" [dropdownScrollHeight]="paginatorDropdownScrollHeight"\n [currentPageReportTemplate]="currentPageReportTemplate" [showCurrentPageReport]="showCurrentPageReport" [showJumpToPageDropdown]="showJumpToPageDropdown" [showPageLinks]="showPageLinks"></p-paginator>\n\n <div class="p-datatable-wrapper" *ngIf="!scrollable">\n <table role="grid" #table [ngClass]="tableStyleClass" [ngStyle]="tableStyle">\n <ng-container *ngTemplateOutlet="colGroupTemplate; context {$implicit: columns}"></ng-container>\n <thead class="p-datatable-thead">\n <ng-container *ngTemplateOutlet="headerTemplate; context: {$implicit: columns}"></ng-container>\n </thead>\n <tbody class="p-datatable-tbody" [pTableBody]="columns" [pTableBodyTemplate]="bodyTemplate"></tbody>\n <tfoot *ngIf="footerTemplate" class="p-datatable-tfoot">\n <ng-container *ngTemplateOutlet="footerTemplate; context {$implicit: columns}"></ng-container>\n </tfoot>\n </table>\n </div>\n\n <div class="p-datatable-scrollable-wrapper" *ngIf="scrollable">\n <div class="p-datatable-scrollable-view p-datatable-frozen-view" *ngIf="frozenColumns||frozenBodyTemplate" #scrollableFrozenView [pScrollableView]="frozenColumns" [frozen]="true" [ngStyle]="{width: frozenWidth}" [scrollHeight]="scrollHeight"></div>\n <div class="p-datatable-scrollable-view" #scrollableView [pScrollableView]="columns" [frozen]="false" [scrollHeight]="scrollHeight" [ngStyle]="{left: frozenWidth, width: \'calc(100% - \'+frozenWidth+\')\'}"></div>\n </div>\n\n <p-paginator [rows]="rows" [first]="first" [totalRecords]="totalRecords" [pageLinkSize]="pageLinks" styleClass="p-paginator-bottom" [alwaysShow]="alwaysShowPaginator"\n (onPageChange)="onPageChange($event)" [rowsPerPageOptions]="rowsPerPageOptions" *ngIf="paginator && (paginatorPosition === \'bottom\' || paginatorPosition ==\'both\')"\n [templateLeft]="paginatorLeftTemplate" [templateRight]="paginatorRightTemplate" [dropdownAppendTo]="paginatorDropdownAppendTo" [dropdownScrollHeight]="paginatorDropdownScrollHeight"\n [currentPageReportTemplate]="currentPageReportTemplate" [showCurrentPageReport]="showCurrentPageReport" [showJumpToPageDropdown]="showJumpToPageDropdown" [showPageLinks]="showPageLinks"></p-paginator>\n\n <div *ngIf="summaryTemplate" class="p-datatable-footer">\n <ng-container *ngTemplateOutlet="summaryTemplate"></ng-container>\n </div>\n\n <div #resizeHelper class="p-column-resizer-helper" style="display:none" *ngIf="resizableColumns"></div>\n <span #reorderIndicatorUp class="pi pi-arrow-down p-datatable-reorder-indicator-up" style="display:none" *ngIf="reorderableColumns"></span>\n <span #reorderIndicatorDown class="pi pi-arrow-up p-datatable-reorder-indicator-down" style="display:none" *ngIf="reorderableColumns"></span>\n </div>\n ',providers:[h],changeDetection:t.ChangeDetectionStrategy.Default,encapsulation:t.ViewEncapsulation.None,styles:[".p-datatable{position:relative}.p-datatable table{border-collapse:collapse;table-layout:fixed;width:100%}.p-datatable .p-sortable-column{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:pointer;user-select:none}.p-datatable .p-sortable-column .p-column-title,.p-datatable .p-sortable-column .p-sortable-column-badge,.p-datatable .p-sortable-column .p-sortable-column-icon{vertical-align:middle}.p-datatable .p-sortable-column .p-sortable-column-badge{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;justify-content:center}.p-datatable-auto-layout>.p-datatable-wrapper{overflow-x:auto}.p-datatable-auto-layout>.p-datatable-wrapper>table{table-layout:auto}.p-datatable-hoverable-rows .p-selectable-row{cursor:pointer}.p-datatable-scrollable-wrapper{position:relative}.p-datatable-scrollable-footer,.p-datatable-scrollable-header{overflow:hidden}.p-datatable-scrollable-body{overflow:auto;position:relative}.p-datatable-scrollable-body>table>.p-datatable-tbody>tr:first-child>td{border-top:0}.p-datatable-virtual-table{position:absolute}.p-datatable-frozen-view .p-datatable-scrollable-body{overflow:hidden}.p-datatable-frozen-view>.p-datatable-scrollable-body>table>.p-datatable-tbody>tr>td:last-child{border-right:0}.p-datatable-unfrozen-view{position:absolute;top:0}.p-datatable-flex-scrollable,.p-datatable-flex-scrollable .p-datatable-scrollable-view,.p-datatable-flex-scrollable .p-datatable-scrollable-wrapper{-ms-flex:1;-ms-flex-direction:column;display:-ms-flexbox;display:flex;flex:1;flex-direction:column;height:100%}.p-datatable-flex-scrollable .p-datatable-scrollable-body,.p-datatable-flex-scrollable .p-datatable-virtual-scrollable-body{-ms-flex:1;flex:1}.p-datatable-resizable>.p-datatable-wrapper{overflow-x:auto}.p-datatable-resizable .p-datatable-tbody>tr>td,.p-datatable-resizable .p-datatable-tfoot>tr>td,.p-datatable-resizable .p-datatable-thead>tr>th{overflow:hidden;white-space:nowrap}.p-datatable-resizable .p-resizable-column{background-clip:padding-box;position:relative}.p-datatable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-datatable .p-column-resizer{border:1px solid rgba(0,0,0,0);cursor:col-resize;display:block;height:100%;margin:0;padding:0;position:absolute!important;right:0;top:0;width:.5rem}.p-datatable .p-column-resizer-helper{display:none;position:absolute;width:1px;z-index:10}.p-datatable .p-row-editor-cancel,.p-datatable .p-row-editor-init,.p-datatable .p-row-editor-save,.p-datatable .p-row-toggler{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;justify-content:center;overflow:hidden;position:relative}.p-datatable-reorder-indicator-down,.p-datatable-reorder-indicator-up{display:none;position:absolute}.p-datatable .p-datatable-loading-overlay{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;display:-ms-flexbox;display:flex;justify-content:center;position:absolute;z-index:2}.p-datatable.p-datatable-responsive .p-datatable-tbody>tr>td .p-column-title{display:none}@media screen and (max-width:40em){.p-datatable.p-datatable-responsive .p-datatable-tfoot>tr>td,.p-datatable.p-datatable-responsive .p-datatable-thead>tr>th{display:none!important}.p-datatable.p-datatable-responsive .p-datatable-tbody>tr>td{border:0;clear:left;display:block;float:left;text-align:left;width:100%}.p-datatable.p-datatable-responsive .p-datatable-tbody>tr>td .p-column-title{display:inline-block;font-weight:700;margin:-.4em 1em -.4em -.4rem;min-width:30%;padding:.4rem}}"]}]}],u.ctorParameters=function(){return[{type:t.ElementRef},{type:t.NgZone},{type:h},{type:t.ChangeDetectorRef}]},u.propDecorators={frozenColumns:[{type:t.Input}],frozenValue:[{type:t.Input}],style:[{type:t.Input}],styleClass:[{type:t.Input}],tableStyle:[{type:t.Input}],tableStyleClass:[{type:t.Input}],paginator:[{type:t.Input}],pageLinks:[{type:t.Input}],rowsPerPageOptions:[{type:t.Input}],alwaysShowPaginator:[{type:t.Input}],paginatorPosition:[{type:t.Input}],paginatorDropdownAppendTo:[{type:t.Input}],paginatorDropdownScrollHeight:[{type:t.Input}],currentPageReportTemplate:[{type:t.Input}],showCurrentPageReport:[{type:t.Input}],showJumpToPageDropdown:[{type:t.Input}],showPageLinks:[{type:t.Input}],defaultSortOrder:[{type:t.Input}],sortMode:[{type:t.Input}],resetPageOnSort:[{type:t.Input}],selectionMode:[{type:t.Input}],selectionChange:[{type:t.Output}],contextMenuSelection:[{type:t.Input}],contextMenuSelectionChange:[{type:t.Output}],contextMenuSelectionMode:[{type:t.Input}],dataKey:[{type:t.Input}],metaKeySelection:[{type:t.Input}],rowTrackBy:[{type:t.Input}],lazy:[{type:t.Input}],lazyLoadOnInit:[{type:t.Input}],compareSelectionBy:[{type:t.Input}],csvSeparator:[{type:t.Input}],exportFilename:[{type:t.Input}],filters:[{type:t.Input}],globalFilterFields:[{type:t.Input}],filterDelay:[{type:t.Input}],filterLocale:[{type:t.Input}],expandedRowKeys:[{type:t.Input}],editingRowKeys:[{type:t.Input}],rowExpandMode:[{type:t.Input}],scrollable:[{type:t.Input}],scrollHeight:[{type:t.Input}],virtualScroll:[{type:t.Input}],virtualScrollDelay:[{type:t.Input}],virtualRowHeight:[{type:t.Input}],frozenWidth:[{type:t.Input}],responsive:[{type:t.Input}],contextMenu:[{type:t.Input}],resizableColumns:[{type:t.Input}],columnResizeMode:[{type:t.Input}],reorderableColumns:[{type:t.Input}],loading:[{type:t.Input}],loadingIcon:[{type:t.Input}],showLoader:[{type:t.Input}],rowHover:[{type:t.Input}],customSort:[{type:t.Input}],autoLayout:[{type:t.Input}],exportFunction:[{type:t.Input}],stateKey:[{type:t.Input}],stateStorage:[{type:t.Input}],editMode:[{type:t.Input}],minBufferPx:[{type:t.Input}],maxBufferPx:[{type:t.Input}],onRowSelect:[{type:t.Output}],onRowUnselect:[{type:t.Output}],onPage:[{type:t.Output}],onSort:[{type:t.Output}],onFilter:[{type:t.Output}],onLazyLoad:[{type:t.Output}],onRowExpand:[{type:t.Output}],onRowCollapse:[{type:t.Output}],onContextMenuSelect:[{type:t.Output}],onColResize:[{type:t.Output}],onColReorder:[{type:t.Output}],onRowReorder:[{type:t.Output}],onEditInit:[{type:t.Output}],onEditComplete:[{type:t.Output}],onEditCancel:[{type:t.Output}],onHeaderCheckboxToggle:[{type:t.Output}],sortFunction:[{type:t.Output}],firstChange:[{type:t.Output}],rowsChange:[{type:t.Output}],onStateSave:[{type:t.Output}],onStateRestore:[{type:t.Output}],containerViewChild:[{type:t.ViewChild,args:["container"]}],resizeHelperViewChild:[{type:t.ViewChild,args:["resizeHelper"]}],reorderIndicatorUpViewChild:[{type:t.ViewChild,args:["reorderIndicatorUp"]}],reorderIndicatorDownViewChild:[{type:t.ViewChild,args:["reorderIndicatorDown"]}],tableViewChild:[{type:t.ViewChild,args:["table"]}],scrollableViewChild:[{type:t.ViewChild,args:["scrollableView"]}],scrollableFrozenViewChild:[{type:t.ViewChild,args:["scrollableFrozenView"]}],templates:[{type:t.ContentChildren,args:[n.PrimeTemplate]}],value:[{type:t.Input}],columns:[{type:t.Input}],first:[{type:t.Input}],rows:[{type:t.Input}],totalRecords:[{type:t.Input}],sortField:[{type:t.Input}],sortOrder:[{type:t.Input}],multiSortMeta:[{type:t.Input}],selection:[{type:t.Input}]};var g=function(){function e(e,t,i){var n=this;this.dt=e,this.tableService=t,this.cd=i,this.subscription=this.dt.tableService.valueSource$.subscribe((function(){n.dt.virtualScroll&&n.cd.detectChanges()}))}return e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();g.decorators=[{type:t.Component,args:[{selector:"[pTableBody]",template:'\n <ng-container *ngIf="!dt.expandedRowTemplate && !dt.virtualScroll">\n <ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="(dt.paginator && !dt.lazy) ? ((dt.filteredValue||dt.value) | slice:dt.first:(dt.first + dt.rows)) : (dt.filteredValue||dt.value)" [ngForTrackBy]="dt.rowTrackBy">\n <ng-container *ngTemplateOutlet="template; context: {$implicit: rowData, rowIndex: dt.paginator ? (dt.first + rowIndex) : rowIndex, columns: columns, editing: (dt.editMode === \'row\' && dt.isRowEditing(rowData))}"></ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngIf="!dt.expandedRowTemplate && dt.virtualScroll">\n <ng-template cdkVirtualFor let-rowData let-rowIndex="index" [cdkVirtualForOf]="dt.filteredValue||dt.value" [cdkVirtualForTrackBy]="dt.rowTrackBy" [cdkVirtualForTemplateCacheSize]="0">\n <ng-container *ngTemplateOutlet="rowData ? template: dt.loadingBodyTemplate; context: {$implicit: rowData, rowIndex: dt.paginator ? (dt.first + rowIndex) : rowIndex, columns: columns, editing: (dt.editMode === \'row\' && dt.isRowEditing(rowData))}"></ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngIf="dt.expandedRowTemplate">\n <ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="(dt.paginator && !dt.lazy) ? ((dt.filteredValue||dt.value) | slice:dt.first:(dt.first + dt.rows)) : (dt.filteredValue||dt.value)" [ngForTrackBy]="dt.rowTrackBy">\n <ng-container *ngTemplateOutlet="template; context: {$implicit: rowData, rowIndex: dt.paginator ? (dt.first + rowIndex) : rowIndex, columns: columns, expanded: dt.isRowExpanded(rowData), editing: (dt.editMode === \'row\' && dt.isRowEditing(rowData))}"></ng-container>\n <ng-container *ngIf="dt.isRowExpanded(rowData)">\n <ng-container *ngTemplateOutlet="dt.expandedRowTemplate; context: {$implicit: rowData, rowIndex: dt.paginator ? (dt.first + rowIndex) : rowIndex, columns: columns}"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-container *ngIf="dt.loading">\n <ng-container *ngTemplateOutlet="dt.loadingBodyTemplate; context: {$implicit: columns, frozen: frozen}"></ng-container>\n </ng-container>\n <ng-container *ngIf="dt.isEmpty() && !dt.loading">\n <ng-container *ngTemplateOutlet="dt.emptyMessageTemplate; context: {$implicit: columns, frozen: frozen}"></ng-container>\n </ng-container>\n ',changeDetection:t.ChangeDetectionStrategy.Default,encapsulation:t.ViewEncapsulation.None}]}],g.ctorParameters=function(){return[{type:u},{type:h},{type:t.ChangeDetectorRef}]},g.propDecorators={columns:[{type:t.Input,args:["pTableBody"]}],template:[{type:t.Input,args:["pTableBodyTemplate"]}],frozen:[{type:t.Input}]};var f=function(){function e(e,t,i){this.dt=e,this.el=t,this.zone=i,this.loadedPages=[]}return Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this._scrollHeight},set:function(e){this._scrollHeight=e,null!=e&&(e.includes("%")||e.includes("calc"))&&console.log('Percentage scroll height calculation is removed in favor of the more performant CSS based flex mode, use scrollHeight="flex" instead.'),this.dt.virtualScroll&&this.virtualScrollBody&&this.virtualScrollBody.checkViewportSize()},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){if(this.frozen)this.scrollableAlignerViewChild&&this.scrollableAlignerViewChild.nativeElement&&(this.scrollableAlignerViewChild.nativeElement.style.height=r.DomHandler.calculateScrollbarHeight()+"px");else{(this.dt.frozenColumns||this.dt.frozenBodyTemplate)&&r.DomHandler.addClass(this.el.nativeElement,"p-datatable-unfrozen-view");var e=this.el.nativeElement.previousElementSibling;e&&(this.dt.virtualScroll?this.frozenSiblingBody=r.DomHandler.findSingle(e,".p-datatable-virtual-scrollable-body"):this.frozenSiblingBody=r.DomHandler.findSingle(e,".p-datatable-scrollable-body"));var t=r.DomHandler.calculateScrollbarWidth();this.scrollHeaderBoxViewChild.nativeElement.style.paddingRight=t+"px",this.scrollFooterBoxViewChild&&this.scrollFooterBoxViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.paddingRight=t+"px")}this.bindEvents()},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular((function(){e.scrollHeaderViewChild&&e.scrollHeaderViewChild.nativeElement&&(e.headerScrollListener=e.onHeaderScroll.bind(e),e.scrollHeaderViewChild.nativeElement.addEventListener("scroll",e.headerScrollListener)),e.scrollFooterViewChild&&e.scrollFooterViewChild.nativeElement&&(e.footerScrollListener=e.onFooterScroll.bind(e),e.scrollFooterViewChild.nativeElement.addEventListener("scroll",e.footerScrollListener)),e.frozen||(e.bodyScrollListener=e.onBodyScroll.bind(e),e.dt.virtualScroll?e.virtualScrollBody.getElementRef().nativeElement.addEventListener("scroll",e.bodyScrollListener):e.scrollBodyViewChild.nativeElement.addEventListener("scroll",e.bodyScrollListener))}))},e.prototype.unbindEvents=function(){this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&this.scrollHeaderViewChild.nativeElement.removeEventListener("scroll",this.headerScrollListener),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&this.scrollFooterViewChild.nativeElement.removeEventListener("scroll",this.footerScrollListener),this.scrollBodyViewChild&&this.scrollBodyViewChild.nativeElement&&this.scrollBodyViewChild.nativeElement.removeEventListener("scroll",this.bodyScrollListener),this.virtualScrollBody&&this.virtualScrollBody.getElementRef()&&this.virtualScrollBody.getElementRef().nativeElement.removeEventListener("scroll",this.bodyScrollListener)},e.prototype.onHeaderScroll=function(){var e=this.scrollHeaderViewChild.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0},e.prototype.onFooterScroll=function(){var e=this.scrollFooterViewChild.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0},e.prototype.onBodyScroll=function(e){this.preventBodyScrollPropagation?this.preventBodyScrollPropagation=!1:(this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.frozenSiblingBody&&(this.frozenSiblingBody.scrollTop=e.target.scrollTop))},e.prototype.onScrollIndexChange=function(e){var t=this;this.dt.lazy&&this.createPageRange(Math.floor(e/this.dt.rows)).forEach((function(e){return t.loadPage(e)}))},e.prototype.createPageRange=function(e){var t=[];return 0!==e&&t.push(e-1),t.push(e),e!==this.getPageCount()-1&&t.push(e+1),t},e.prototype.loadPage=function(e){this.loadedPages.includes(e)||(this.dt.onLazyLoad.emit({first:this.dt.rows*e,rows:this.dt.rows,sortField:this.dt.sortField,sortOrder:this.dt.sortOrder,filters:this.dt.filters,globalFilter:this.dt.filters&&this.dt.filters.global?this.dt.filters.global.value:null,multiSortMeta:this.dt.multiSortMeta}),this.loadedPages.push(e))},e.prototype.clearCache=function(){this.loadedPages=[]},e.prototype.getPageCount=function(){var e=this.dt.filteredValue||this.dt.value,t=e?e.length:0;return Math.ceil(t/this.dt.rows)},e.prototype.scrollToVirtualIndex=function(e){this.virtualScrollBody&&this.virtualScrollBody.scrollToIndex(e)},e.prototype.scrollTo=function(e){this.virtualScrollBody?this.virtualScrollBody.scrollTo(e):this.scrollBodyViewChild.nativeElement.scrollTo?this.scrollBodyViewChild.nativeElement.scrollTo(e):(this.scrollBodyViewChild.nativeElement.scrollLeft=e.left,this.scrollBodyViewChild.nativeElement.scrollTop=e.top)},e.prototype.ngOnDestroy=function(){this.unbindEvents(),this.frozenSiblingBody=null},e}();f.decorators=[{type:t.Component,args:[{selector:"[pScrollableView]",template:'\n <div #scrollHeader class="p-datatable-scrollable-header">\n <div #scrollHeaderBox class="p-datatable-scrollable-header-box">\n <table class="p-datatable-scrollable-header-table" [ngClass]="dt.tableStyleClass" [ngStyle]="dt.tableStyle">\n <ng-container *ngTemplateOutlet="frozen ? dt.frozenColGroupTemplate||dt.colGroupTemplate : dt.colGroupTemplate; context {$implicit: columns}"></ng-container>\n <thead class="p-datatable-thead">\n <ng-container *ngTemplateOutlet="frozen ? dt.frozenHeaderTemplate||dt.headerTemplate : dt.headerTemplate; context {$implicit: columns}"></ng-container>\n </thead>\n <tbody class="p-datatable-tbody">\n <ng-template ngFor let-rowData let-rowIndex="index" [ngForOf]="dt.frozenValue" [ngForTrackBy]="dt.rowTrackBy">\n <ng-container *ngTemplateOutlet="dt.frozenRowsTemplate; context: {$implicit: rowData, rowIndex: rowIndex, columns: columns}"></ng-container>\n </ng-template>\n </tbody>\n </table>\n </div>\n </div>\n <ng-container *ngIf="!dt.virtualScroll; else virtualScrollTemplate">\n <div #scrollBody class="p-datatable-scrollable-body" [ngStyle]="{\'max-height\': dt.scrollHeight !== \'flex\' ? scrollHeight : undefined, \'overflow-y\': !frozen && dt.scrollHeight ? \'scroll\' : undefined}">\n <table #scrollTable [class]="dt.tableStyleClass" [ngStyle]="dt.tableStyle">\n <ng-container *ngTemplateOutlet="frozen ? dt.frozenColGroupTemplate||dt.colGroupTemplate : dt.colGroupTemplate; context {$implicit: columns}"></ng-container>\n <tbody class="p-datatable-tbody" [pTableBody]="columns" [pTableBodyTemplate]="frozen ? dt.frozenBodyTemplate||dt.bodyTemplate : dt.bodyTemplate" [frozen]="frozen"></tbody>\n </table>\n <div #scrollableAligner style="background-color:transparent" *ngIf="frozen"></div>\n </div>\n </ng-container>\n <ng-template #virtualScrollTemplate>\n <cdk-virtual-scroll-viewport [itemSize]="dt.virtualRowHeight" [style.height]="dt.scrollHeight !== \'flex\' ? scrollHeight : undefined"\n [minBufferPx]="dt.minBufferPx" [maxBufferPx]="dt.maxBufferPx" (scrolledIndexChange)="onScrollIndexChange($event)" class="p-datatable-virtual-scrollable-body">\n <table #scrollTable [class]="dt.tableStyleClass" [ngStyle]="dt.tableStyle">\n <ng-container *ngTemplateOutlet="frozen ? dt.frozenColGroupTemplate||dt.colGroupTemplate : dt.colGroupTemplate; context {$implicit: columns}"></ng-container>\n <tbody class="p-datatable-tbody" [pTableBody]="columns" [pTableBodyTemplate]="frozen ? dt.frozenBodyTemplate||dt.bodyTemplate : dt.bodyTemplate" [frozen]="frozen"></tbody>\n </table>\n <div #scrollableAligner style="background-color:transparent" *ngIf="frozen"></div>\n </cdk-virtual-scroll-viewport>\n </ng-template>\n <div #scrollFooter class="p-datatable-scrollable-footer">\n <div #scrollFooterBox class="p-datatable-scrollable-footer-box">\n <table class="p-datatable-scrollable-footer-table" [ngClass]="dt.tableStyleClass" [ngStyle]="dt.tableStyle">\n <ng-container *ngTemplateOutlet="frozen ? dt.frozenColGroupTemplate||dt.colGroupTemplate : dt.colGroupTemplate; context {$implicit: columns}"></ng-container>\n <tfoot class="p-datatable-tfoot">\n <ng-container *ngTemplateOutlet="frozen ? dt.frozenFooterTemplate||dt.footerTemplate : dt.footerTemplate; context {$implicit: columns}"></ng-container>\n </tfoot>\n </table>\n </div>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.Default,encapsulation:t.ViewEncapsulation.None}]}],f.ctorParameters=function(){return[{type:u},{type:t.ElementRef},{type:t.NgZone}]},f.propDecorators={columns:[{type:t.Input,args:["pScrollableView"]}],frozen:[{type:t.Input}],scrollHeaderViewChild:[{type:t.ViewChild,args:["scrollHeader"]}],scrollHeaderBoxViewChild:[{type:t.ViewChild,args:["scrollHeaderBox"]}],scrollBodyViewChild:[{type:t.ViewChild,args:["scrollBody"]}],scrollTableViewChild:[{type:t.ViewChild,args:["scrollTable"]}],scrollFooterViewChild:[{type:t.ViewChild,args:["scrollFooter"]}],scrollFooterBoxViewChild:[{type:t.ViewChild,args:["scrollFooterBox"]}],scrollableAlignerViewChild:[{type:t.ViewChild,args:["scrollableAligner"]}],virtualScrollBody:[{type:t.ViewChild,args:[s.CdkVirtualScrollViewport]}],scrollHeight:[{type:t.Input}]};var m=function(){function e(e){var t=this;this.dt=e,this.isEnabled()&&(this.subscription=this.dt.tableService.sortSource$.subscribe((function(e){t.updateSortState()})))}return e.prototype.ngOnInit=function(){this.isEnabled()&&this.updateSortState()},e.prototype.updateSortState=function(){this.sorted=this.dt.isSorted(this.field),this.sortOrder=this.sorted?1===this.dt.sortOrder?"ascending":"descending":"none"},e.prototype.onClick=function(e){this.isEnabled()&&(this.updateSortState(),this.dt.sort({originalEvent:e,field:this.field}),r.DomHandler.clearSelection())},e.prototype.onEnterKey=function(e){this.onClick(e)},e.prototype.isEnabled=function(){return!0!==this.pSortableColumnDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();m.decorators=[{type:t.Directive,args:[{selector:"[pSortableColumn]",host:{"[class.p-sortable-column]":"isEnabled()","[class.p-highlight]":"sorted","[attr.tabindex]":'isEnabled() ? "0" : null',"[attr.role]":'"columnheader"',"[attr.aria-sort]":"sortOrder"}}]}],m.ctorParameters=function(){return[{type:u}]},m.propDecorators={field:[{type:t.Input,args:["pSortableColumn"]}],pSortableColumnDisabled:[{type:t.Input}],onClick:[{type:t.HostListener,args:["click",["$event"]]}],onEnterKey:[{type:t.HostListener,args:["keydown.enter",["$event"]]}]};var b=function(){function e(e,t){var i=this;this.dt=e,this.cd=t,this.subscription=this.dt.tableService.sortSource$.subscribe((function(e){i.updateSortState()}))}return e.prototype.ngOnInit=function(){this.updateSortState()},e.prototype.onClick=function(e){e.preventDefault()},e.prototype.updateSortState=function(){if("single"===this.dt.sortMode)this.sortOrder=this.dt.isSorted(this.field)?this.dt.sortOrder:0;else if("multiple"===this.dt.sortMode){var e=this.dt.getSortMeta(this.field);this.sortOrder=e?e.order:0}this.cd.markForCheck()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();b.decorators=[{type:t.Component,args:[{selector:"p-sortIcon",template:"\n <i class=\"p-sortable-column-icon pi pi-fw\" [ngClass]=\"{'pi-sort-amount-up-alt': sortOrder === 1, 'pi-sort-amount-down': sortOrder === -1, 'pi-sort-alt': sortOrder === 0}\"></i>\n ",changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],b.ctorParameters=function(){return[{type:u},{type:t.ChangeDetectorRef}]},b.propDecorators={field:[{type:t.Input}]};var y=function(){function e(e,t){var i=this;this.dt=e,this.tableService=t,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe((function(){i.selected=i.dt.isSelected(i.data)})))}return e.prototype.ngOnInit=function(){this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))},e.prototype.onClick=function(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})},e.prototype.onTouchEnd=function(e){this.isEnabled()&&this.dt.handleRowTouchEnd(e)},e.prototype.onArrowDownKeyDown=function(e){if(this.isEnabled()){var t=e.currentTarget,i=this.findNextSelectableRow(t);i&&i.focus(),e.preventDefault()}},e.prototype.onArrowUpKeyDown=function(e){if(this.isEnabled()){var t=e.currentTarget,i=this.findPrevSelectableRow(t);i&&i.focus(),e.preventDefault()}},e.prototype.onEnterKeyDown=function(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})},e.prototype.findNextSelectableRow=function(e){var t=e.nextElementSibling;return t?r.DomHandler.hasClass(t,"p-selectable-row")?t:this.findNextSelectableRow(t):null},e.prototype.findPrevSelectableRow=function(e){var t=e.previousElementSibling;return t?r.DomHandler.hasClass(t,"p-selectable-row")?t:this.findPrevSelectableRow(t):null},e.prototype.isEnabled=function(){return!0!==this.pSelectableRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();y.decorators=[{type:t.Directive,args:[{selector:"[pSelectableRow]",host:{"[class.p-selectable-row]":"isEnabled()","[class.p-highlight]":"selected","[attr.tabindex]":"isEnabled() ? 0 : undefined"}}]}],y.ctorParameters=function(){return[{type:u},{type:h}]},y.propDecorators={data:[{type:t.Input,args:["pSelectableRow"]}],index:[{type:t.Input,args:["pSelectableRowIndex"]}],pSelectableRowDisabled:[{type:t.Input}],onClick:[{type:t.HostListener,args:["click",["$event"]]}],onTouchEnd:[{type:t.HostListener,args:["touchend",["$event"]]}],onArrowDownKeyDown:[{type:t.HostListener,args:["keydown.arrowdown",["$event"]]}],onArrowUpKeyDown:[{type:t.HostListener,args:["keydown.arrowup",["$event"]]}],onEnterKeyDown:[{type:t.HostListener,args:["keydown.enter",["$event"]]},{type:t.HostListener,args:["keydown.shift.enter",["$event"]]},{type:t.HostListener,args:["keydown.meta.enter",["$event"]]}]};var v=function(){function e(e,t){var i=this;this.dt=e,this.tableService=t,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe((function(){i.selected=i.dt.isSelected(i.data)})))}return e.prototype.ngOnInit=function(){this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))},e.prototype.onClick=function(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})},e.prototype.isEnabled=function(){return!0!==this.pSelectableRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();v.decorators=[{type:t.Directive,args:[{selector:"[pSelectableRowDblClick]",host:{"[class.p-selectable-row]":"isEnabled()","[class.p-highlight]":"selected"}}]}],v.ctorParameters=function(){return[{type:u},{type:h}]},v.propDecorators={data:[{type:t.Input,args:["pSelectableRowDblClick"]}],index:[{type:t.Input,args:["pSelectableRowIndex"]}],pSelectableRowDisabled:[{type:t.Input}],onClick:[{type:t.HostListener,args:["dblclick",["$event"]]}]};var w=function(){function e(e,t,i){var n=this;this.dt=e,this.tableService=t,this.el=i,this.isEnabled()&&(this.subscription=this.dt.tableService.contextMenuSource$.subscribe((function(e){n.selected=n.dt.equals(n.data,e)})))}return e.prototype.onContextMenu=function(e){this.isEnabled()&&(this.dt.handleRowRightClick({originalEvent:e,rowData:this.data,rowIndex:this.index}),this.el.nativeElement.focus(),e.preventDefault())},e.prototype.isEnabled=function(){return!0!==this.pContextMenuRowDisabled},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();w.decorators=[{type:t.Directive,args:[{selector:"[pContextMenuRow]",host:{"[class.p-highlight-contextmenu]":"selected","[attr.tabindex]":"isEnabled() ? 0 : undefined"}}]}],w.ctorParameters=function(){return[{type:u},{type:h},{type:t.ElementRef}]},w.propDecorators={data:[{type:t.Input,args:["pContextMenuRow"]}],index:[{type:t.Input,args:["pContextMenuRowIndex"]}],pContextMenuRowDisabled:[{type:t.Input}],onContextMenu:[{type:t.HostListener,args:["contextmenu",["$event"]]}]};var C=function(){function e(e){this.dt=e}return e.prototype.onClick=function(e){this.isEnabled()&&(this.dt.toggleRow(this.data,e),e.preventDefault())},e.prototype.isEnabled=function(){return!0!==this.pRowTogglerDisabled},e}();C.decorators=[{type:t.Directive,args:[{selector:"[pRowToggler]"}]}],C.ctorParameters=function(){return[{type:u}]},C.propDecorators={data:[{type:t.Input,args:["pRowToggler"]}],pRowTogglerDisabled:[{type:t.Input}],onClick:[{type:t.HostListener,args:["click",["$event"]]}]};var S=function(){function e(e,t,i){this.dt=e,this.el=t,this.zone=i}return e.prototype.ngAfterViewInit=function(){var e=this;this.isEnabled()&&(r.DomHandler.addClass(this.el.nativeElement,"p-resizable-column"),this.resizer=document.createElement("span"),this.resizer.className="p-column-resizer",this.el.nativeElement.appendChild(this.resizer),this.zone.runOutsideAngular((function(){e.resizerMouseDownListener=e.onMouseDown.bind(e),e.resizer.addEventListener("mousedown",e.resizerMouseDownListener)})))},e.prototype.bindDocumentEvents=function(){var e=this;this.zone.runOutsideAngular((function(){e.documentMouseMoveListener=e.onDocumentMouseMove.bind(e),document.addEventListener("mousemove",e.documentMouseMoveListener),e.documentMouseUpListener=e.onDocumentMouseUp.bind(e),document.addEventListener("mouseup",e.documentMouseUpListener)}))},e.prototype.unbindDocumentEvents=function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},e.prototype.onMouseDown=function(e){1===e.which&&(this.dt.onColumnResizeBegin(e),this.bindDocumentEvents())},e.prototype.onDocumentMouseMove=function(e){this.dt.onColumnResize(e)},e.prototype.onDocumentMouseUp=function(e){this.dt.onColumnResizeEnd(e,this.el.nativeElement),this.unbindDocumentEvents()},e.prototype.isEnabled=function(){return!0!==this.pResizableColumnDisabled},e.prototype.ngOnDestroy=function(){this.resizerMouseDownListener&&this.resizer.removeEventListener("mousedown",this.resizerMouseDownListener),this.unbindDocumentEvents()},e}();S.decorators=[{type:t.Directive,args:[{selector:"[pResizableColumn]"}]}],S.ctorParameters=function(){return[{type:u},{type:t.ElementRef},{type:t.NgZone}]},S.propDecorators={pResizableColumnDisabled:[{type:t.Input}]};var E=function(){function e(e,t,i){this.dt=e,this.el=t,this.zone=i}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&this.bindEvents()},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular((function(){e.mouseDownListener=e.onMouseDown.bind(e),e.el.nativeElement.addEventListener("mousedown",e.mouseDownListener),e.dragStartListener=e.onDragStart.bind(e),e.el.nativeElement.addEventListener("dragstart",e.dragStartListener),e.dragOverListener=e.onDragEnter.bind(e),e.el.nativeElement.addEventListener("dragover",e.dragOverListener),e.dragEnterListener=e.onDragEnter.bind(e),e.el.nativeElement.addEventListener("dragenter",e.dragEnterListener),e.dragLeaveListener=e.onDragLeave.bind(e),e.el.nativeElement.addEventListener("dragleave",e.dragLeaveListener)}))},e.prototype.unbindEvents=function(){this.mouseDownListener&&(document.removeEventListener("mousedown",this.mouseDownListener),this.mouseDownListener=null),this.dragOverListener&&(document.removeEventListener("dragover",this.dragOverListener),this.dragOverListener=null),this.dragEnterListener&&(document.removeEventListener("dragenter",this.dragEnterListener),this.dragEnterListener=null),this.dragEnterListener&&(document.removeEventListener("dragenter",this.dragEnterListener),this.dragEnterListener=null),this.dragLeaveListener&&(document.removeEventListener("dragleave",this.dragLeaveListener),this.dragLeaveListener=null)},e.prototype.onMouseDown=function(e){"INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName||r.DomHandler.hasClass(e.target,"p-column-resizer")?this.el.nativeElement.draggable=!1:this.el.nativeElement.draggable=!0},e.prototype.onDragStart=function(e){this.dt.onColumnDragStart(e,this.el.nativeElement)},e.prototype.onDragOver=function(e){e.preventDefault()},e.prototype.onDragEnter=function(e){this.dt.onColumnDragEnter(e,this.el.nativeElement)},e.prototype.onDragLeave=function(e){this.dt.onColumnDragLeave(e)},e.prototype.onDrop=function(e){this.isEnabled()&&this.dt.onColumnDrop(e,this.el.nativeElement)},e.prototype.isEnabled=function(){return!0!==this.pReorderableColumnDisabled},e.prototype.ngOnDestroy=function(){this.unbindEvents()},e}();E.decorators=[{type:t.Directive,args:[{selector:"[pReorderableColumn]"}]}],E.ctorParameters=function(){return[{type:u},{type:t.ElementRef},{type:t.NgZone}]},E.propDecorators={pReorderableColumnDisabled:[{type:t.Input}],onDrop:[{type:t.HostListener,args:["drop",["$event"]]}]};var x=function(){function e(e,t,i){this.dt=e,this.el=t,this.zone=i}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&r.DomHandler.addClass(this.el.nativeElement,"p-editable-column")},e.prototype.onClick=function(e){if(this.isEnabled())if(this.dt.editingCellClick=!0,this.dt.editingCell){if(this.dt.editingCell!==this.el.nativeElement){if(!this.dt.isEditingCellValid())return;this.closeEditingCell(!0,e),this.openCell()}}else this.openCell()},e.prototype.openCell=function(){var e=this;this.dt.updateEditingCell(this.el.nativeElement,this.data,this.field,this.rowIndex),r.DomHandler.addClass(this.el.nativeElement,"p-cell-editing"),this.dt.onEditInit.emit({field:this.field,data:this.data,index:this.rowIndex}),this.zone.runOutsideAngular((function(){setTimeout((function(){var t=e.pFocusCellSelector||"input, textarea, select",i=r.DomHandler.findSingle(e.el.nativeElement,t);i&&i.focus()}),50)}))},e.prototype.closeEditingCell=function(e,t){e?this.dt.onEditComplete.emit({field:this.dt.editingCellField,data:this.dt.editingCellData,originalEvent:t,index:this.rowIndex}):this.dt.onEditCancel.emit({field:this.dt.editingCellField,data:this.dt.editingCellData,originalEvent:t,index:this.rowIndex}),r.DomHandler.removeClass(this.dt.editingCell,"p-cell-editing"),this.dt.editingCell=null,this.dt.editingCellData=null,this.dt.editingCellField=null,this.dt.unbindDocumentEditListener()},e.prototype.onEnterKeyDown=function(e){this.isEnabled()&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),e.preventDefault())},e.prototype.onEscapeKeyDown=function(e){this.isEnabled()&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!1,e),e.preventDefault())},e.prototype.onShiftKeyDown=function(e){this.isEnabled()&&(e.shiftKey?this.moveToPreviousCell(e):this.moveToNextCell(e))},e.prototype.findCell=function(e){if(e){for(var t=e;t&&!r.DomHandler.hasClass(t,"p-cell-editing");)t=t.parentElement;return t}return null},e.prototype.moveToPreviousCell=function(e){var t=this.findCell(e.target);if(t){var i=this.findPreviousEditableColumn(t);i&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),r.DomHandler.invokeElementMethod(e.target,"blur"),r.DomHandler.invokeElementMethod(i,"click"),e.preventDefault())}},e.prototype.moveToNextCell=function(e){var t=this.findCell(e.target);if(t){var i=this.findNextEditableColumn(t);i&&(this.dt.isEditingCellValid()&&this.closeEditingCell(!0,e),r.DomHandler.invokeElementMethod(e.target,"blur"),r.DomHandler.invokeElementMethod(i,"click"),e.preventDefault())}},e.prototype.findPreviousEditableColumn=function(e){var t=e.previousElementSibling;if(!t){var i=e.parentElement.previousElementSibling;i&&(t=i.lastElementChild)}return t?r.DomHandler.hasClass(t,"p-editable-column")?t:this.findPreviousEditableColumn(t):null},e.prototype.findNextEditableColumn=function(e){var t=e.nextElementSibling;if(!t){var i=e.parentElement.nextElementSibling;i&&(t=i.firstElementChild)}return t?r.DomHandler.hasClass(t,"p-editable-column")?t:this.findNextEditableColumn(t):null},e.prototype.isEnabled=function(){return!0!==this.pEditableColumnDisabled},e}();x.decorators=[{type:t.Directive,args:[{selector:"[pEditableColumn]"}]}],x.ctorParameters=function(){return[{type:u},{type:t.ElementRef},{type:t.NgZone}]},x.propDecorators={data:[{type:t.Input,args:["pEditableColumn"]}],field:[{type:t.Input,args:["pEditableColumnField"]}],rowIndex:[{type:t.Input,args:["pEditableColumnRowIndex"]}],pEditableColumnDisabled:[{type:t.Input}],pFocusCellSelector:[{type:t.Input}],onClick:[{type:t.HostListener,args:["click",["$event"]]}],onEnterKeyDown:[{type:t.HostListener,args:["keydown.enter",["$event"]]}],onEscapeKeyDown:[{type:t.HostListener,args:["keydown.escape",["$event"]]}],onShiftKeyDown:[{type:t.HostListener,args:["keydown.tab",["$event"]]},{type:t.HostListener,args:["keydown.shift.tab",["$event"]]},{type:t.HostListener,args:["keydown.meta.tab",["$event"]]}]};var D=function(){function e(e){this.el=e}return e.prototype.isEnabled=function(){return!0!==this.pEditableRowDisabled},e}();D.decorators=[{type:t.Directive,args:[{selector:"[pEditableRow]"}]}],D.ctorParameters=function(){return[{type:t.ElementRef}]},D.propDecorators={data:[{type:t.Input,args:["pEditableRow"]}],pEditableRowDisabled:[{type:t.Input}]};var I=function(){function e(e,t){this.dt=e,this.editableRow=t}return e.prototype.onClick=function(e){this.dt.initRowEdit(this.editableRow.data),e.preventDefault()},e}();I.decorators=[{type:t.Directive,args:[{selector:"[pInitEditableRow]"}]}],I.ctorParameters=function(){return[{type:u},{type:D}]},I.propDecorators={onClick:[{type:t.HostListener,args:["click",["$event"]]}]};var R=function(){function e(e,t){this.dt=e,this.editableRow=t}return e.prototype.onClick=function(e){this.dt.saveRowEdit(this.editableRow.data,this.editableRow.el.nativeElement),e.preventDefault()},e}();R.decorators=[{type:t.Directive,args:[{selector:"[pSaveEditableRow]"}]}],R.ctorParameters=function(){return[{type:u},{type:D}]},R.propDecorators={onClick:[{type:t.HostListener,args:["click",["$event"]]}]};var L=function(){function e(e,t){this.dt=e,this.editableRow=t}return e.prototype.onClick=function(e){this.dt.cancelRowEdit(this.editableRow.data),e.preventDefault()},e}();L.decorators=[{type:t.Directive,args:[{selector:"[pCancelEditableRow]"}]}],L.ctorParameters=function(){return[{type:u},{type:D}]},L.propDecorators={onClick:[{type:t.HostListener,args:["click",["$event"]]}]};var V=function(){function e(e,t,i){this.dt=e,this.editableColumn=t,this.editableRow=i}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach((function(t){switch(t.getType()){case"input":e.inputTemplate=t.template;break;case"output":e.outputTemplate=t.template}}))},Object.defineProperty(e.prototype,"editing",{get:function(){return this.dt.editingCell&&this.editableColumn&&this.dt.editingCell===this.editableColumn.el.nativeElement||this.editableRow&&"row"===this.dt.editMode&&this.dt.isRowEditing(this.editableRow.data)},enumerable:!1,configurable:!0}),e}();V.decorators=[{type:t.Component,args:[{selector:"p-cellEditor",template:'\n <ng-container *ngIf="editing">\n <ng-container *ngTemplateOutlet="inputTemplate"></ng-container>\n </ng-container>\n <ng-container *ngIf="!editing">\n <ng-container *ngTemplateOutlet="outputTemplate"></ng-container>\n </ng-container>\n ',encapsulation:t.ViewEncapsulation.None}]}],V.ctorParameters=function(){return[{type:u},{type:x,decorators:[{type:t.Optional}]},{type:D,decorators:[{type:t.Optional}]}]},V.propDecorators={templates:[{type:t.ContentChildren,args:[n.PrimeTemplate]}]};var O=function(){function e(e,t,i){var n=this;this.dt=e,this.tableService=t,this.cd=i,this.subscription=this.dt.tableService.selectionSource$.subscribe((function(){n.checked=n.dt.isSelected(n.value),n.cd.markForCheck()}))}return e.prototype.ngOnInit=function(){this.checked=this.dt.isSelected(this.value)},e.prototype.onClick=function(e){this.disabled||this.dt.toggleRowWithRadio({originalEvent:e,rowIndex:this.index},this.value),r.DomHandler.clearSelection()},e.prototype.onFocus=function(){r.DomHandler.addClass(this.boxViewChild.nativeElement,"p-focus")},e.prototype.onBlur=function(){r.DomHandler.removeClass(this.boxViewChild.nativeElement,"p-focus")},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();O.decorators=[{type:t.Component,args:[{selector:"p-tableRadioButton",template:'\n <div class="p-radiobutton p-component" (click)="onClick($event)">\n <div class="p-hidden-accessible">\n <input type="radio" [attr.id]="inputId" [attr.name]="name" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()"\n [disabled]="disabled" [attr.aria-label]="ariaLabel">\n </div>\n <div #box [ngClass]="{\'p-radiobutton-box p-component\':true,\n \'p-highlight\':checked, \'p-disabled\':disabled}" role="radio" [attr.aria-checked]="checked">\n <div class="p-radiobutton-icon"></div>\n </div>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],O.ctorParameters=function(){return[{type:u},{type:h},{type:t.ChangeDetectorRef}]},O.propDecorators={disabled:[{type:t.Input}],value:[{type:t.Input}],index:[{type:t.Input}],inputId:[{type:t.Input}],name:[{type:t.Input}],ariaLabel:[{type:t.Input}],boxViewChild:[{type:t.ViewChild,args:["box"]}]};var z=function(){function e(e,t,i){var n=this;this.dt=e,this.tableService=t,this.cd=i,this.subscription=this.dt.tableService.selectionSource$.subscribe((function(){n.checked=n.dt.isSelected(n.value),n.cd.markForCheck()}))}return e.prototype.ngOnInit=function(){this.checked=this.dt.isSelected(this.value)},e.prototype.onClick=function(e){this.disabled||this.dt.toggleRowWithCheckbox({originalEvent:e,rowIndex:this.index},this.value),r.DomHandler.clearSelection()},e.prototype.onFocus=function(){r.DomHandler.addClass(this.boxViewChild.nativeElement,"p-focus")},e.prototype.onBlur=function(){r.DomHandler.removeClass(this.boxViewChild.nativeElement,"p-focus")},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();z.decorators=[{type:t.Component,args:[{selector:"p-tableCheckbox",template:'\n <div class="p-checkbox p-component" (click)="onClick($event)">\n <div class="p-hidden-accessible">\n <input type="checkbox" [attr.id]="inputId" [attr.name]="name" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" [disabled]="disabled"\n [attr.required]="required" [attr.aria-label]="ariaLabel">\n </div>\n <div #box [ngClass]="{\'p-checkbox-box p-component\':true,\n \'p-highlight\':checked, \'p-disabled\':disabled}" role="checkbox" [attr.aria-checked]="checked">\n <span class="p-checkbox-icon" [ngClass]="{\'pi pi-check\':checked}"></span>\n </div>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],z.ctorParameters=function(){return[{type:u},{type:h},{type:t.ChangeDetectorRef}]},z.propDecorators={disabled:[{type:t.Input}],value:[{type:t.Input}],index:[{type:t.Input}],inputId:[{type:t.Input}],name:[{type:t.Input}],required:[{type:t.Input}],ariaLabel:[{type:t.Input}],boxViewChild:[{type:t.ViewChild,args:["box"]}]};var k=function(){function e(e,t,i){var n=this;this.dt=e,this.tableService=t,this.cd=i,this.valueChangeSubscription=this.dt.tableService.valueSource$.subscribe((function(){n.checked=n.updateCheckedState()})),this.selectionChangeSubscription=this.dt.tableService.selectionSource$.subscribe((function(){n.checked=n.updateCheckedState()}))}return e.prototype.ngOnInit=function(){this.checked=this.updateCheckedState()},e.prototype.onClick=function(e){this.disabled||this.dt.value&&this.dt.value.length>0&&this.dt.toggleRowsWithCheckbox(e,!this.checked),r.DomHandler.clearSelection()},e.prototype.onFocus=function(){r.DomHandler.addClass(this.boxViewChild.nativeElement,"p-focus")},e.prototype.onBlur=function(){r.DomHandler.removeClass(this.boxViewChild.nativeElement,"p-focus")},e.prototype.isDisabled=function(){return this.disabled||!this.dt.value||!this.dt.value.length},e.prototype.ngOnDestroy=function(){this.selectionChangeSubscription&&this.selectionChangeSubscription.unsubscribe(),this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe()},e.prototype.updateCheckedState=function(){var e;return this.cd.markForCheck(),this.dt.filteredValue?(e=this.dt.filteredValue)&&e.length>0&&this.dt.selection&&this.dt.selection.length>0&&this.isAllFilteredValuesChecked():(e=this.dt.value)&&e.length>0&&this.dt.selection&&this.dt.selection.length>0&&this.dt.selection.length===e.length},e.prototype.isAllFilteredValuesChecked=function(){var e,t;if(this.dt.filteredValue){try{for(var i=d(this.dt.filteredValue),n=i.next();!n.done;n=i.next()){var o=n.value;if(!this.dt.isSelected(o))return!1}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return!0}return!1},e}();k.decorators=[{type:t.Component,args:[{selector:"p-tableHeaderCheckbox",template:'\n <div class="p-checkbox p-component" (click)="onClick($event)">\n <div class="p-hidden-accessible">\n <input #cb type="checkbox" [attr.id]="inputId" [attr.name]="name" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()"\n [disabled]="isDisabled()" [attr.aria-label]="ariaLabel">\n </div>\n <div #box [ngClass]="{\'p-checkbox-box\':true,\n \'p-highlight\':checked, \'p-disabled\': isDisabled()}" role="checkbox" [attr.aria-checked]="checked">\n <span class="p-checkbox-icon" [ngClass]="{\'pi pi-check\':checked}"></span>\n </div>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],k.ctorParameters=function(){return[{type:u},{type:h},{type:t.ChangeDetectorRef}]},k.propDecorators={boxViewChild:[{type:t.ViewChild,args:["box"]}],disabled:[{type:t.Input}],inputId:[{type:t.Input}],name:[{type:t.Input}],ariaLabel:[{type:t.Input}]};var T=function(){function e(e){this.el=e}return e.prototype.ngAfterViewInit=function(){r.DomHandler.addClass(this.el.nativeElement,"p-datatable-reorderablerow-handle")},e}();T.decorators=[{type:t.Directive,args:[{selector:"[pReorderableRowHandle]"}]}],T.ctorParameters=function(){return[{type:t.ElementRef}]},T.propDecorators={index:[{type:t.Input,args:["pReorderableRowHandle"]}]};var M=function(){function e(e,t,i){this.dt=e,this.el=t,this.zone=i}return e.prototype.ngAfterViewInit=function(){this.isEnabled()&&(this.el.nativeElement.droppable=!0,this.bindEvents())},e.prototype.bindEvents=function(){var e=this;this.zone.runOutsideAngular((function(){e.mouseDownListener=e.onMouseDown.bind(e),e.el.nativeElement.addEventListener("mousedown",e.mouseDownListener),e.dragStartListener=e.onDragStart.bind(e),e.el.nativeElement.addEventListener("dragstart",e.dragStartListener),e.dragEndListener=e.onDragEnd.bind(e),e.el.nativeElement.addEventListener("dragend",e.dragEndListener),e.dragOverListener=e.onDragOver.bind(e),e.el.nativeElement.addEventListener("dragover",e.dragOverListener),e.dragLeaveListener=e.onDragLeave.bind(e),e.el.nativeElement.addEventListener("dragleave",e.dragLeaveListener)}))},e.prototype.unbindEvents=function(){this.mouseDownListener&&(document.removeEventListener("mousedown",this.mouseDownListener),this.mouseDownListener=null),this.dragStartListener&&(document.removeEventListener("dragstart",this.dragStartListener),this.dragStartListener=null),this.dragEndListener&&(document.removeEventListener("dragend",this.dragEndListener),this.dragEndListener=null),this.dragOverListener&&(document.removeEventListener("dragover",this.dragOverListener),this.dragOverListener=null),this.dragLeaveListener&&(document.removeEventListener("dragleave",this.dragLeaveListener),this.dragLeaveListener=null)},e.prototype.onMouseDown=function(e){r.DomHandler.hasClass(e.target,"p-datatable-reorderablerow-handle")?this.el.nativeElement.draggable=!0:this.el.nativeElement.draggable=!1},e.prototype.onDragStart=function(e){this.dt.onRowDragStart(e,this.index)},e.prototype.onDragEnd=function(e){this.dt.onRowDragEnd(e),this.el.nativeElement.draggable=!1},e.prototype.onDragOver=function(e){this.dt.onRowDragOver(e,this.index,this.el.nativeElement),e.preventDefault()},e.prototype.onDragLeave=function(e){this.dt.onRowDragLeave(e,this.el.nativeElement)},e.prototype.isEnabled=function(){return!0!==this.pReorderableRowDisabled},e.prototype.onDrop=function(e){this.isEnabled()&&this.dt.rowDragging&&this.dt.onRowDrop(e,this.el.nativeElement),e.preventDefault()},e}();M.decorators=[{type:t.Directive,args:[{selector:"[pReorderableRow]"}]}],M.ctorParameters=function(){return[{type:u},{type:t.ElementRef},{type:t.NgZone}]},M.propDecorators={index:[{type:t.Input,args:["pReorderableRow"]}],pReorderableRowDisabled:[{type:t.Input}],onDrop:[{type:t.HostListener,args:["drop",["$event"]]}]};var H=function(){};H.decorators=[{type:t.NgModule,args:[{imports:[i.CommonModule,o.PaginatorModule,s.ScrollingModule],exports:[u,n.SharedModule,m,y,C,w,S,E,x,V,b,O,z,k,T,M,v,D,I,R,L,s.ScrollingModule],declarations:[u,m,y,C,w,S,E,x,V,g,f,b,O,z,k,T,M,v,D,I,R,L]}]}],e.CancelEditableRow=L,e.CellEditor=V,e.ContextMenuRow=w,e.EditableColumn=x,e.EditableRow=D,e.InitEditableRow=I,e.ReorderableColumn=E,e.ReorderableRow=M,e.ReorderableRowHandle=T,e.ResizableColumn=S,e.RowToggler=C,e.SaveEditableRow=R,e.ScrollableView=f,e.SelectableRow=y,e.SelectableRowDblClick=v,e.SortIcon=b,e.SortableColumn=m,e.Table=u,e.TableBody=g,e.TableCheckbox=z,e.TableHeaderCheckbox=k,e.TableModule=H,e.TableRadioButton=O,e.TableService=h,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=primeng-table.umd.min.js.map