forked from angular-ui/ui-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathng-grid-2.0.5.min.js
2 lines (2 loc) · 59.2 KB
/
ng-grid-2.0.5.min.js
1
2
(function(e,n){"use strict";var t=6,o=4,r="asc",i="desc",l="_ng_field_",a="_ng_depth_",s="_ng_hidden_",c="_ng_column_",g=/CUSTOM_FILTERS/g,d=/COL_FIELD/g,u=/DISPLAY_CELL_TEMPLATE/g,f=/EDITABLE_CELL_TEMPLATE/g,p=/<.+>/;e.ngGrid={},e.ngGrid.i18n={};var h=angular.module("ngGrid.services",[]),m=angular.module("ngGrid.directives",[]),v=angular.module("ngGrid.filters",[]);angular.module("ngGrid",["ngGrid.services","ngGrid.directives","ngGrid.filters"]);var w=function(e,n,o,r){if(void 0===e.selectionProvider.selectedItems)return!0;var i,l=o.which||o.keyCode,a=!1,s=!1,c=e.selectionProvider.lastClickedRow.rowIndex,g=e.columns.filter(function(e){return e.visible}),d=e.columns.filter(function(e){return e.pinned});if(e.col&&(i=g.indexOf(e.col)),37!=l&&38!=l&&39!=l&&40!=l&&9!=l&&13!=l)return!0;if(e.enableCellSelection){9==l&&o.preventDefault();var u=e.showSelectionCheckbox?1==e.col.index:0==e.col.index,f=1==e.$index||0==e.$index,p=e.$index==e.renderedColumns.length-1||e.$index==e.renderedColumns.length-2,h=g.indexOf(e.col)==g.length-1,m=d.indexOf(e.col)==d.length-1;if(37==l||9==l&&o.shiftKey){var v=0;u||(i-=1),f?u&&9==l&&o.shiftKey?(v=r.$canvas.width(),i=g.length-1,s=!0):v=r.$viewport.scrollLeft()-e.col.width:d.length>0&&(v=r.$viewport.scrollLeft()-g[i].width),r.$viewport.scrollLeft(v)}else(39==l||9==l&&!o.shiftKey)&&(p?h&&9==l&&!o.shiftKey?(r.$viewport.scrollLeft(0),i=e.showSelectionCheckbox?1:0,a=!0):r.$viewport.scrollLeft(r.$viewport.scrollLeft()+e.col.width):m&&r.$viewport.scrollLeft(0),h||(i+=1))}var w;w=e.configGroups.length>0?r.rowFactory.parsedData.filter(function(e){return!e.isAggRow}):r.filteredRows;var C=0;if(0!=c&&(38==l||13==l&&o.shiftKey||9==l&&o.shiftKey&&s)?C=-1:c!=w.length-1&&(40==l||13==l&&!o.shiftKey||9==l&&a)&&(C=1),C){var b=w[c+C];b.beforeSelectionChange(b,o)&&(b.continueSelection(o),e.$emit("ngGridEventDigestGridParent"),e.selectionProvider.lastClickedRow.renderedRowIndex>=e.renderedRows.length-t-2?r.$viewport.scrollTop(r.$viewport.scrollTop()+e.rowHeight):t+2>=e.selectionProvider.lastClickedRow.renderedRowIndex&&r.$viewport.scrollTop(r.$viewport.scrollTop()-e.rowHeight))}return e.enableCellSelection&&setTimeout(function(){e.domAccessProvider.focusCellElement(e,e.renderedColumns.indexOf(g[i]))},3),!1};String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var n=this.length>>>0,t=Number(arguments[1])||0;for(t=0>t?Math.ceil(t):Math.floor(t),0>t&&(t+=n);n>t;t++)if(t in this&&this[t]===e)return t;return-1}),Array.prototype.filter||(Array.prototype.filter=function(e){var n=Object(this),t=n.length>>>0;if("function"!=typeof e)throw new TypeError;for(var o=[],r=arguments[1],i=0;t>i;i++)if(i in n){var l=n[i];e.call(r,l,i,n)&&o.push(l)}return o}),v.filter("checkmark",function(){return function(e){return e?"✔":"✘"}}),v.filter("ngColumns",function(){return function(e){return e.filter(function(e){return!e.isAggCol})}}),h.factory("$domUtilityService",["$utilityService",function(e){var t={},o={},r=function(){var e=n("<div></div>");e.appendTo("body"),e.height(100).width(100).css("position","absolute").css("overflow","scroll"),e.append('<div style="height: 400px; width: 400px;"></div>'),t.ScrollH=e.height()-e[0].clientHeight,t.ScrollW=e.width()-e[0].clientWidth,e.empty(),e.attr("style",""),e.append('<span style="font-family: Verdana, Helvetica, Sans-Serif; font-size: 14px;"><strong>M</strong></span>'),t.LetterW=e.children().first().width(),e.remove()};return t.eventStorage={},t.AssignGridContainers=function(e,o,r){r.$root=n(o),r.$topPanel=r.$root.find(".ngTopPanel"),r.$groupPanel=r.$root.find(".ngGroupPanel"),r.$headerContainer=r.$topPanel.find(".ngHeaderContainer"),e.$headerContainer=r.$headerContainer,r.$headerScroller=r.$topPanel.find(".ngHeaderScroller"),r.$headers=r.$headerScroller.children(),r.$viewport=r.$root.find(".ngViewport"),r.$canvas=r.$viewport.find(".ngCanvas"),r.$footerPanel=r.$root.find(".ngFooterPanel"),e.$watch(function(){return r.$viewport.scrollLeft()},function(e){return r.$headerContainer.scrollLeft(e)}),t.UpdateGridLayout(e,r)},t.getRealWidth=function(e){var t=0,o={visibility:"hidden",display:"block"},r=e.parents().andSelf().not(":visible");return n.swap(r[0],o,function(){t=e.outerWidth()}),t},t.UpdateGridLayout=function(e,n){var o=n.$viewport.scrollTop();n.elementDims.rootMaxW=n.$root.width(),n.$root.is(":hidden")&&(n.elementDims.rootMaxW=t.getRealWidth(n.$root)),n.elementDims.rootMaxH=n.$root.height(),n.refreshDomSizes(),e.adjustScrollTop(o,!0)},t.numberOfGrids=0,t.BuildStyles=function(o,r,i){var l,a=r.config.rowHeight,s=r.$styleSheet,c=r.gridId,g=o.columns,d=0;s||(s=n("#"+c),s[0]||(s=n("<style id='"+c+"' type='text/css' rel='stylesheet' />").appendTo(r.$root))),s.empty();var u=o.totalRowWidth();l="."+c+" .ngCanvas { width: "+u+"px; }"+"."+c+" .ngRow { width: "+u+"px; }"+"."+c+" .ngCanvas { width: "+u+"px; }"+"."+c+" .ngHeaderScroller { width: "+(u+t.ScrollH)+"px}";for(var f=0;g.length>f;f++){var p=g[f];if(p.visible!==!1){var h=p.pinned?r.$viewport.scrollLeft()+d:d;l+="."+c+" .col"+f+" { width: "+p.width+"px; left: "+h+"px; height: "+a+"px }"+"."+c+" .colt"+f+" { width: "+p.width+"px; }",d+=p.width}}e.isIe?s[0].styleSheet.cssText=l:s[0].appendChild(document.createTextNode(l)),r.$styleSheet=s,i&&(o.adjustScrollLeft(r.$viewport.scrollLeft()),t.digest(o))},t.setColLeft=function(n,t,r){if(r.$styleSheet){var i=o[n.index];i||(i=o[n.index]=RegExp(".col"+n.index+" { width: [0-9]+px; left: [0-9]+px"));var l=r.$styleSheet.html(),a=l.replace(i,".col"+n.index+" { width: "+n.width+"px; left: "+t+"px");e.isIe?setTimeout(function(){r.$styleSheet.html(a)}):r.$styleSheet.html(a)}},t.setColLeft.immediate=1,t.RebuildGrid=function(e,n){t.UpdateGridLayout(e,n),n.config.maintainColumnRatios&&n.configureColumnWidths(),e.adjustScrollLeft(n.$viewport.scrollLeft()),t.BuildStyles(e,n,!0)},t.digest=function(e){e.$root.$$phase||e.$digest()},t.ScrollH=17,t.ScrollW=17,t.LetterW=10,r(),t}]),h.factory("$sortService",["$parse",function(e){var n={};return n.colSortFnCache={},n.guessSortFn=function(e){var t=typeof e;switch(t){case"number":return n.sortNumber;case"boolean":return n.sortBool;case"string":return e.match(/^-?[£$¤]?[\d,.]+%?$/)?n.sortNumberStr:n.sortAlpha;default:return"[object Date]"===Object.prototype.toString.call(e)?n.sortDate:n.basicSort}},n.basicSort=function(e,n){return e==n?0:n>e?-1:1},n.sortNumber=function(e,n){return e-n},n.sortNumberStr=function(e,n){var t,o,r=!1,i=!1;return t=parseFloat(e.replace(/[^0-9.-]/g,"")),isNaN(t)&&(r=!0),o=parseFloat(n.replace(/[^0-9.-]/g,"")),isNaN(o)&&(i=!0),r&&i?0:r?1:i?-1:t-o},n.sortAlpha=function(e,n){var t=e.toLowerCase(),o=n.toLowerCase();return t==o?0:o>t?-1:1},n.sortDate=function(e,n){var t=e.getTime(),o=n.getTime();return t==o?0:o>t?-1:1},n.sortBool=function(e,n){return e&&n?0:e||n?e?1:-1:0},n.sortData=function(t,o){if(o&&t){var i,l,a=t.fields.length,s=t.fields,c=o.slice(0);o.sort(function(o,g){for(var d,u=0,f=0;0==u&&a>f;){i=t.columns[f],l=t.directions[f],d=n.getSortFn(i,c);var p=e(s[f])(o),h=e(s[f])(g);!p&&0!=p||!h&&0!=h?h||p?p?h||(u=-1):u=1:u=0:u=d(p,h),f++}return l===r?u:0-u})}},n.Sort=function(e,t){n.isSorting||(n.isSorting=!0,n.sortData(e,t),n.isSorting=!1)},n.getSortFn=function(t,o){var r,i=void 0;if(n.colSortFnCache[t.field])i=n.colSortFnCache[t.field];else if(void 0!=t.sortingAlgorithm)i=t.sortingAlgorithm,n.colSortFnCache[t.field]=t.sortingAlgorithm;else{if(r=o[0],!r)return i;i=n.guessSortFn(e(t.field)(r)),i?n.colSortFnCache[t.field]=i:i=n.sortAlpha}return i},n}]),h.factory("$utilityService",["$parse",function(t){var o=/function (.{1,})\(/,r={visualLength:function(e){var t=document.getElementById("testDataLength");return t||(t=document.createElement("SPAN"),t.id="testDataLength",t.style.visibility="hidden",document.body.appendChild(t)),n(t).css("font",n(e).css("font")),t.innerHTML=n(e).text(),t.offsetWidth},forIn:function(e,n){for(var t in e)e.hasOwnProperty(t)&&n(e[t],t)},evalProperty:function(e,n){return t(n)(e)},endsWith:function(e,n){return e&&n&&"string"==typeof e?-1!==e.indexOf(n,e.length-n.length):!1},isNullOrUndefined:function(e){return void 0===e||null===e?!0:!1},getElementsByClassName:function(e){for(var n=[],t=RegExp("\\b"+e+"\\b"),o=document.getElementsByTagName("*"),r=0;o.length>r;r++){var i=o[r].className;t.test(i)&&n.push(o[r])}return n},newId:function(){var e=(new Date).getTime();return function(){return e+=1}}(),seti18n:function(n,t){var o=e.ngGrid.i18n[t];for(var r in o)n.i18n[r]=o[r]},getInstanceType:function(e){var n=o.exec(""+e.constructor);return n&&n.length>1?n[1]:""},ieVersion:function(){for(var e=3,n=document.createElement("div"),t=n.getElementsByTagName("i");n.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->",t[0];);return e>4?e:void 0}()};return n.extend(r,{isIe:function(){return void 0!==r.ieVersion}()}),r}]);var C=function(e,n,t,o){var r=this;r.rowIndex=0,r.offsetTop=r.rowIndex*t,r.entity=e,r.label=e.gLabel,r.field=e.gField,r.depth=e.gDepth,r.parent=e.parent,r.children=e.children,r.aggChildren=e.aggChildren,r.aggIndex=e.aggIndex,r.collapsed=o,r.isAggRow=!0,r.offsetLeft=25*e.gDepth,r.aggLabelFilter=e.aggLabelFilter,r.toggleExpand=function(){r.collapsed=r.collapsed?!1:!0,r.orig&&(r.orig.collapsed=r.collapsed),r.notifyChildren()},r.setExpand=function(e){r.collapsed=e,r.notifyChildren()},r.notifyChildren=function(){for(var e=Math.max(n.aggCache.length,r.children.length),t=0;e>t;t++)if(r.aggChildren[t]&&(r.aggChildren[t].entity[s]=r.collapsed,r.collapsed&&r.aggChildren[t].setExpand(r.collapsed)),r.children[t]&&(r.children[t][s]=r.collapsed),t>r.aggIndex&&n.aggCache[t]){var o=n.aggCache[t],i=30*r.children.length;o.offsetTop=r.collapsed?o.offsetTop-i:o.offsetTop+i}n.renderedChange()},r.aggClass=function(){return r.collapsed?"ngAggArrowCollapsed":"ngAggArrowExpanded"},r.totalChildren=function(){if(r.aggChildren.length>0){var e=0,n=function(t){t.aggChildren.length>0?angular.forEach(t.aggChildren,function(e){n(e)}):e+=t.children.length};return n(r),e}return r.children.length},r.copy=function(){var e=new C(r.entity,n,t,o);return e.orig=r,e}},b=function(e,t,o,l,a,s){var c=this,d=e.colDef,u=500,f=0,h=null;c.colDef=e.colDef,c.width=d.width,c.groupIndex=0,c.isGroupedBy=!1,c.minWidth=d.minWidth?d.minWidth:50,c.maxWidth=d.maxWidth?d.maxWidth:9e3,c.enableCellEdit=e.enableCellEdit||d.enableCellEdit,c.headerRowHeight=e.headerRowHeight,c.displayName=d.displayName||d.field,c.index=e.index,c.isAggCol=e.isAggCol,c.cellClass=d.cellClass,c.sortPriority=void 0,c.cellFilter=d.cellFilter?d.cellFilter:"",c.field=d.field,c.aggLabelFilter=d.cellFilter||d.aggLabelFilter,c.visible=s.isNullOrUndefined(d.visible)||d.visible,c.sortable=!1,c.resizable=!1,c.pinnable=!1,c.pinned=e.enablePinning&&d.pinned,c.originalIndex=c.index,c.groupable=s.isNullOrUndefined(d.groupable)||d.groupable,e.enableSort&&(c.sortable=s.isNullOrUndefined(d.sortable)||d.sortable),e.enableResize&&(c.resizable=s.isNullOrUndefined(d.resizable)||d.resizable),e.enablePinning&&(c.pinnable=s.isNullOrUndefined(d.pinnable)||d.pinnable),c.sortDirection=void 0,c.sortingAlgorithm=d.sortFn,c.headerClass=d.headerClass,c.cursor=c.sortable?"pointer":"default",c.headerCellTemplate=d.headerCellTemplate||a.get("headerCellTemplate.html"),c.cellTemplate=d.cellTemplate||a.get("cellTemplate.html").replace(g,c.cellFilter?"|"+c.cellFilter:""),c.enableCellEdit&&(c.cellEditTemplate=a.get("cellEditTemplate.html"),c.editableCellTemplate=d.editableCellTemplate||a.get("editableCellTemplate.html")),d.cellTemplate&&!p.test(d.cellTemplate)&&(c.cellTemplate=n.ajax({type:"GET",url:d.cellTemplate,async:!1}).responseText),c.enableCellEdit&&d.editableCellTemplate&&!p.test(d.editableCellTemplate)&&(c.editableCellTemplate=n.ajax({type:"GET",url:d.editableCellTemplate,async:!1}).responseText),d.headerCellTemplate&&!p.test(d.headerCellTemplate)&&(c.headerCellTemplate=n.ajax({type:"GET",url:d.headerCellTemplate,async:!1}).responseText),c.colIndex=function(){var e=c.pinned?"pinned ":"";return e+="col"+c.index+" colt"+c.index,c.cellClass&&(e+=" "+c.cellClass),e},c.groupedByClass=function(){return c.isGroupedBy?"ngGroupedByIcon":"ngGroupIcon"},c.toggleVisible=function(){c.visible=!c.visible},c.showSortButtonUp=function(){return c.sortable?c.sortDirection===i:c.sortable},c.showSortButtonDown=function(){return c.sortable?c.sortDirection===r:c.sortable},c.noSortVisible=function(){return!c.sortDirection},c.sort=function(n){if(!c.sortable)return!0;var t=c.sortDirection===r?i:r;return c.sortDirection=t,e.sortCallback(c,n),!1},c.gripClick=function(){f++,1===f?h=setTimeout(function(){f=0},u):(clearTimeout(h),e.resizeOnDataCallback(c),f=0)},c.gripOnMouseDown=function(e){return e.ctrlKey&&!c.pinned?(c.toggleVisible(),l.BuildStyles(t,o),!0):(e.target.parentElement.style.cursor="col-resize",c.startMousePosition=e.clientX,c.origWidth=c.width,n(document).mousemove(c.onMouseMove),n(document).mouseup(c.gripOnMouseUp),!1)},c.onMouseMove=function(e){var n=e.clientX-c.startMousePosition,r=n+c.origWidth;return c.width=c.minWidth>r?c.minWidth:r>c.maxWidth?c.maxWidth:r,l.BuildStyles(t,o),!1},c.gripOnMouseUp=function(e){return n(document).off("mousemove",c.onMouseMove),n(document).off("mouseup",c.gripOnMouseUp),e.target.parentElement.style.cursor="default",t.adjustScrollLeft(0),l.digest(t),!1},c.copy=function(){var n=new b(e,t,o,l,a);return n.isClone=!0,n.orig=c,n},c.setVars=function(e){c.orig=e,c.width=e.width,c.groupIndex=e.groupIndex,c.isGroupedBy=e.isGroupedBy,c.displayName=e.displayName,c.index=e.index,c.isAggCol=e.isAggCol,c.cellClass=e.cellClass,c.cellFilter=e.cellFilter,c.field=e.field,c.aggLabelFilter=e.aggLabelFilter,c.visible=e.visible,c.sortable=e.sortable,c.resizable=e.resizable,c.pinnable=e.pinnable,c.pinned=e.pinned,c.originalIndex=e.originalIndex,c.sortDirection=e.sortDirection,c.sortingAlgorithm=e.sortingAlgorithm,c.headerClass=e.headerClass,c.headerCellTemplate=e.headerCellTemplate,c.cellTemplate=e.cellTemplate,c.cellEditTemplate=e.cellEditTemplate}},x=function(e){this.outerHeight=null,this.outerWidth=null,n.extend(this,e)},S=function(e){var n,t=this;t.selectInputElement=function(e){var n=e.nodeName.toLowerCase();("input"==n||"textarea"==n)&&e.select()},t.focusCellElement=function(t,o){if(t.selectionProvider.lastClickedRow){var r=void 0!=o?o:n,i=t.selectionProvider.lastClickedRow.clone?t.selectionProvider.lastClickedRow.clone.elm:t.selectionProvider.lastClickedRow.elm;if(void 0!=r&&i){var l=angular.element(i[0].children).filter(function(){return 8!=this.nodeType}),a=Math.max(Math.min(t.renderedColumns.length-1,r),0);e.config.showSelectionCheckbox&&angular.element(l[a]).scope()&&0==angular.element(l[a]).scope().col.index&&(a=1),l[a]&&l[a].children[0].focus(),n=r}}};var o=function(e,n){e.css({"-webkit-touch-callout":n,"-webkit-user-select":n,"-khtml-user-select":n,"-moz-user-select":"none"==n?"-moz-none":n,"-ms-user-select":n,"user-select":n})};t.selectionHandlers=function(n,t){var r=!1;t.bind("keydown",function(i){if(16==i.keyCode)return o(t,"none",i),!0;if(!r){r=!0;var l=w(n,t,i,e);return r=!1,l}return!0}),t.bind("keyup",function(e){return 16==e.keyCode&&o(t,"text",e),!0})}},y=function(t,o,r,i){var l=this;l.colToMove=void 0,l.groupToMove=void 0,l.assignEvents=function(){t.config.jqueryUIDraggable&&!t.config.enablePinning?t.$groupPanel.droppable({addClasses:!1,drop:function(e){l.onGroupDrop(e)}}):(t.$groupPanel.on("mousedown",l.onGroupMouseDown).on("dragover",l.dragOver).on("drop",l.onGroupDrop),t.$headerScroller.on("mousedown",l.onHeaderMouseDown).on("dragover",l.dragOver),t.config.enableColumnReordering&&!t.config.enablePinning&&t.$headerScroller.on("drop",l.onHeaderDrop),t.config.enableRowReordering&&t.$viewport.on("mousedown",l.onRowMouseDown).on("dragover",l.dragOver).on("drop",l.onRowDrop)),o.$watch("renderedColumns",function(){i(l.setDraggables)})},l.dragStart=function(e){e.dataTransfer.setData("text","")},l.dragOver=function(e){e.preventDefault()},l.setDraggables=function(){if(t.config.jqueryUIDraggable)t.$root.find(".ngHeaderSortColumn").draggable({helper:"clone",appendTo:"body",stack:"div",addClasses:!1,start:function(e){l.onHeaderMouseDown(e)}}).droppable({drop:function(e){l.onHeaderDrop(e)}});else{var e=t.$root.find(".ngHeaderSortColumn");angular.forEach(e,function(e){e.setAttribute("draggable","true"),e.addEventListener&&e.addEventListener("dragstart",l.dragStart)}),-1!=navigator.userAgent.indexOf("MSIE")&&t.$root.find(".ngHeaderSortColumn").bind("selectstart",function(){return this.dragDrop(),!1})}},l.onGroupMouseDown=function(e){var o=n(e.target);if("ngRemoveGroup"!=o[0].className){var r=angular.element(o).scope();r&&(t.config.jqueryUIDraggable||(o.attr("draggable","true"),this.addEventListener&&this.addEventListener("dragstart",l.dragStart),-1!=navigator.userAgent.indexOf("MSIE")&&o.bind("selectstart",function(){return this.dragDrop(),!1})),l.groupToMove={header:o,groupName:r.group,index:r.$index})}else l.groupToMove=void 0},l.onGroupDrop=function(e){e.stopPropagation();var r,i;l.groupToMove?(r=n(e.target).closest(".ngGroupElement"),"ngGroupPanel"==r.context.className?(o.configGroups.splice(l.groupToMove.index,1),o.configGroups.push(l.groupToMove.groupName)):(i=angular.element(r).scope(),i&&l.groupToMove.index!=i.$index&&(o.configGroups.splice(l.groupToMove.index,1),o.configGroups.splice(i.$index,0,l.groupToMove.groupName))),l.groupToMove=void 0,t.fixGroupIndexes()):l.colToMove&&(-1==o.configGroups.indexOf(l.colToMove.col)&&(r=n(e.target).closest(".ngGroupElement"),"ngGroupPanel"==r.context.className||"ngGroupPanelDescription ng-binding"==r.context.className?o.groupBy(l.colToMove.col):(i=angular.element(r).scope(),i&&o.removeGroup(i.$index))),l.colToMove=void 0),o.$$phase||o.$apply()},l.onHeaderMouseDown=function(e){var t=n(e.target).closest(".ngHeaderSortColumn"),o=angular.element(t).scope();o&&(l.colToMove={header:t,col:o.col})},l.onHeaderDrop=function(e){if(l.colToMove&&!l.colToMove.col.pinned){var i=n(e.target).closest(".ngHeaderSortColumn"),a=angular.element(i).scope();if(a){if(l.colToMove.col==a.col)return;o.columns.splice(l.colToMove.col.index,1),o.columns.splice(a.col.index,0,l.colToMove.col),t.fixColumnIndexes(),r.BuildStyles(o,t,!0),l.colToMove=void 0}}},l.onRowMouseDown=function(e){var t=n(e.target).closest(".ngRow"),o=angular.element(t).scope();o&&(t.attr("draggable","true"),r.eventStorage.rowToMove={targetRow:t,scope:o})},l.onRowDrop=function(e){var o=n(e.target).closest(".ngRow"),i=angular.element(o).scope();if(i){var l=r.eventStorage.rowToMove;if(l.scope.row==i.row)return;t.changeRowOrder(l.scope.row,i.row),t.searchProvider.evalFilter(),r.eventStorage.rowToMove=void 0,r.digest(i.$root)}},l.assignGridEventHandlers=function(){-1===t.config.tabIndex?(t.$viewport.attr("tabIndex",r.numberOfGrids),r.numberOfGrids++):t.$viewport.attr("tabIndex",t.config.tabIndex),n(e).resize(function(){r.RebuildGrid(o,t)}),n(t.$root.parent()).on("resize",function(){r.RebuildGrid(o,t)})},l.assignGridEventHandlers(),l.assignEvents()},T=function(e,n){e.maxRows=function(){var e=Math.max(n.config.totalServerItems,n.data.length);return e},e.multiSelect=n.config.enableRowSelection&&n.config.multiSelect,e.selectedItemCount=n.selectedItemCount,e.maxPages=function(){return Math.ceil(e.maxRows()/e.pagingOptions.pageSize)},e.pageForward=function(){var t=e.pagingOptions.currentPage;n.config.totalServerItems>0?e.pagingOptions.currentPage=Math.min(t+1,e.maxPages()):e.pagingOptions.currentPage++},e.pageBackward=function(){var n=e.pagingOptions.currentPage;e.pagingOptions.currentPage=Math.max(n-1,1)},e.pageToFirst=function(){e.pagingOptions.currentPage=1},e.pageToLast=function(){var n=e.maxPages();e.pagingOptions.currentPage=n},e.cantPageForward=function(){var t=e.pagingOptions.currentPage,o=e.maxPages();return n.config.totalServerItems>0?!(o>t):1>n.data.length},e.cantPageToLast=function(){return n.config.totalServerItems>0?e.cantPageForward():!0},e.cantPageBackward=function(){var n=e.pagingOptions.currentPage;return!(n>1)}},P=function(r,i,l,a,c,g,d,u,f,h,m){var v={aggregateTemplate:void 0,afterSelectionChange:function(){},beforeSelectionChange:function(){return!0},checkboxCellTemplate:void 0,checkboxHeaderTemplate:void 0,columnDefs:void 0,data:[],dataUpdated:function(){},enableCellEdit:!1,enableCellSelection:!1,enableColumnResize:!1,enableColumnReordering:!1,enableColumnHeavyVirt:!1,enablePaging:!1,enablePinning:!1,enableRowReordering:!1,enableRowSelection:!0,enableSorting:!0,enableHighlighting:!1,excludeProperties:[],filterOptions:{filterText:"",useExternalFilter:!1},footerRowHeight:55,footerTemplate:void 0,groups:[],groupsCollapsedByDefault:!0,headerRowHeight:30,headerRowTemplate:void 0,jqueryUIDraggable:!1,jqueryUITheme:!1,keepLastSelected:!0,maintainColumnRatios:void 0,menuTemplate:void 0,multiSelect:!0,pagingOptions:{pageSizes:[250,500,1e3],pageSize:250,currentPage:1},pinSelectionCheckbox:!1,plugins:[],primaryKey:void 0,rowHeight:30,rowTemplate:void 0,selectedItems:[],selectWithCheckboxOnly:!1,showColumnMenu:!1,showFilter:!1,showFooter:!1,showGroupPanel:!1,showSelectionCheckbox:!1,sortInfo:{fields:[],columns:[],directions:[]},tabIndex:-1,totalServerItems:0,useExternalSorting:!1,i18n:"en",virtualizationThreshold:50},w=this;w.maxCanvasHt=0,w.config=n.extend(v,e.ngGrid.config,i),w.config.showSelectionCheckbox=w.config.showSelectionCheckbox&&w.config.enableColumnHeavyVirt===!1,w.config.enablePinning=w.config.enablePinning&&w.config.enableColumnHeavyVirt===!1,w.config.selectWithCheckboxOnly=w.config.selectWithCheckboxOnly&&w.config.showSelectionCheckbox!==!1,w.config.pinSelectionCheckbox=w.config.enablePinning,"string"==typeof i.columnDefs&&(w.config.columnDefs=r.$eval(i.columnDefs)),w.rowCache=[],w.rowMap=[],w.gridId="ng"+d.newId(),w.$root=null,w.$groupPanel=null,w.$topPanel=null,w.$headerContainer=null,w.$headerScroller=null,w.$headers=null,w.$viewport=null,w.$canvas=null,w.rootDim=w.config.gridDim,w.data=[],w.lateBindColumns=!1,w.filteredRows=[],w.initTemplates=function(){var e=["rowTemplate","aggregateTemplate","headerRowTemplate","checkboxCellTemplate","checkboxHeaderTemplate","menuTemplate","footerTemplate"],n=[];return e.forEach(function(e){n.push(w.getTemplate(e))}),m.all(n)},w.getTemplate=function(e){var n=w.config[e],t=w.gridId+e+".html",o=m.defer();if(n&&!p.test(n))h.get(n,{cache:g}).success(function(e){g.put(t,e),o.resolve()}).error(function(){o.reject("Could not load template: "+n)});else if(n)g.put(t,n),o.resolve();else{var r=e+".html";g.put(t,g.get(r)),o.resolve()}return o.promise},"object"==typeof w.config.data&&(w.data=w.config.data),w.calcMaxCanvasHeight=function(){return w.config.groups.length>0?w.rowFactory.parsedData.filter(function(e){return!e[s]}).length*w.config.rowHeight:w.filteredRows.length*w.config.rowHeight},w.elementDims={scrollW:0,scrollH:0,rowIndexCellW:25,rowSelectedCellW:25,rootMaxW:0,rootMaxH:0},w.setRenderedRows=function(e){r.renderedRows.length=e.length;for(var n=0;e.length>n;n++)!r.renderedRows[n]||e[n].isAggRow||r.renderedRows[n].isAggRow?(r.renderedRows[n]=e[n].copy(),r.renderedRows[n].collapsed=e[n].collapsed,e[n].isAggRow||r.renderedRows[n].setVars(e[n])):r.renderedRows[n].setVars(e[n]),r.renderedRows[n].rowIndex=e[n].rowIndex,r.renderedRows[n].offsetTop=e[n].offsetTop,r.renderedRows[n].selected=e[n].selected,e[n].renderedRowIndex=n;w.refreshDomSizes(),r.$emit("ngGridEventRows",e)},w.minRowsToRender=function(){var e=r.viewportDimHeight()||1;return Math.floor(e/w.config.rowHeight)},w.refreshDomSizes=function(){var e=new x;e.outerWidth=w.elementDims.rootMaxW,e.outerHeight=w.elementDims.rootMaxH,w.rootDim=e,w.maxCanvasHt=w.calcMaxCanvasHeight()},w.buildColumnDefsFromData=function(){w.config.columnDefs=[];var e=w.data[0];return e?(d.forIn(e,function(e,n){-1==w.config.excludeProperties.indexOf(n)&&w.config.columnDefs.push({field:n})}),void 0):(w.lateBoundColumns=!0,void 0)},w.buildColumns=function(){var e=w.config.columnDefs,n=[];if(e||(w.buildColumnDefsFromData(),e=w.config.columnDefs),w.config.showSelectionCheckbox&&n.push(new b({colDef:{field:"✔",width:w.elementDims.rowSelectedCellW,sortable:!1,resizable:!1,groupable:!1,headerCellTemplate:g.get(r.gridId+"checkboxHeaderTemplate.html"),cellTemplate:g.get(r.gridId+"checkboxCellTemplate.html"),pinned:w.config.pinSelectionCheckbox},index:0,headerRowHeight:w.config.headerRowHeight,sortCallback:w.sortData,resizeOnDataCallback:w.resizeOnData,enableResize:w.config.enableColumnResize,enableSort:w.config.enableSorting,enablePinning:w.config.enablePinning},r,w,a,g,d)),e.length>0){var t=w.config.showSelectionCheckbox?w.config.groups.length+1:w.config.groups.length;r.configGroups.length=0,angular.forEach(e,function(e,o){o+=t;var i=new b({colDef:e,index:o,headerRowHeight:w.config.headerRowHeight,sortCallback:w.sortData,resizeOnDataCallback:w.resizeOnData,enableResize:w.config.enableColumnResize,enableSort:w.config.enableSorting,enablePinning:w.config.enablePinning,enableCellEdit:w.config.enableCellEdit},r,w,a,g,d),l=w.config.groups.indexOf(e.field);-1!=l&&(i.isGroupedBy=!0,r.configGroups.splice(l,0,i),i.groupIndex=r.configGroups.length),n.push(i)}),r.columns=n}},w.configureColumnWidths=function(){var e=w.config.columnDefs,n=w.config.showSelectionCheckbox?r.configGroups.length+1:r.configGroups.length,t=(e.length+n,[]),o=[],i=0,l=0;if(l+=w.config.showSelectionCheckbox?25:0,angular.forEach(e,function(e,a){a+=n;var s=!1,c=void 0;if(d.isNullOrUndefined(e.width)?e.width="*":(s=isNaN(e.width)?d.endsWith(e.width,"%"):!1,c=s?e.width:parseInt(e.width,10)),isNaN(c)){if(c=e.width,"auto"==c){r.columns[a].width=e.minWidth,l+=r.columns[a].width;var g=r.columns[a];return u(function(){w.resizeOnData(g,!0)}),void 0}if(-1!=c.indexOf("*"))return e.visible!==!1&&(i+=c.length),e.index=a,t.push(e),void 0;if(s)return e.index=a,o.push(e),void 0;throw'unable to parse column width, use percentage ("10%","20%", etc...) or "*" to use remaining width of grid'}e.visible!==!1&&(l+=r.columns[a].width=parseInt(e.width,10))}),t.length>0){w.config.maintainColumnRatios===!1?angular.noop():w.config.maintainColumnRatios=!0;var s=w.rootDim.outerWidth-l,c=Math.floor(s/i);angular.forEach(t,function(e){var n=e.width.length;r.columns[e.index].width=c*n;var t=1;w.maxCanvasHt>r.viewportDimHeight()&&(t+=a.ScrollW),r.columns[e.index].width-=t,e.visible!==!1&&(l+=r.columns[e.index].width)})}o.length>0&&angular.forEach(o,function(e){var n=e.width;r.columns[e.index].width=Math.floor(w.rootDim.outerWidth*(parseInt(n.slice(0,-1),10)/100))})},w.init=function(){return w.initTemplates().then(function(){r.selectionProvider=new L(w,r,f),r.domAccessProvider=new S(w),w.rowFactory=new $(w,r,a,g,d),w.searchProvider=new D(r,w,c),w.styleProvider=new G(r,w),r.$watch("configGroups",function(e){var n=[];angular.forEach(e,function(e){n.push(e.field||e)}),w.config.groups=n,w.rowFactory.filteredRowsChanged(),r.$emit("ngGridEventGroups",e)},!0),r.$watch("columns",function(e){a.BuildStyles(r,w,!0),r.$emit("ngGridEventColumns",e)},!0),r.$watch(function(){return i.i18n},function(e){d.seti18n(r,e)}),w.maxCanvasHt=w.calcMaxCanvasHeight(),w.config.sortInfo.fields&&w.config.sortInfo.fields.length>0&&(w.getColsFromFields(),w.sortActual())})},w.resizeOnData=function(e){var t=e.minWidth,o=d.getElementsByClassName("col"+e.index);angular.forEach(o,function(e,o){var r;if(0===o){var i=n(e).find(".ngHeaderText");r=d.visualLength(i)+10}else{var l=n(e).find(".ngCellText");r=d.visualLength(l)+10}r>t&&(t=r)}),e.width=e.longest=Math.min(e.maxWidth,t+7),a.BuildStyles(r,w,!0)},w.lastSortedColumns=[],w.changeRowOrder=function(e,n){var t=w.rowCache.indexOf(e),o=w.rowCache.indexOf(n);w.rowCache.splice(t,1),w.rowCache.splice(o,0,e),r.$emit("ngGridEventChangeOrder",w.rowCache)},w.sortData=function(e,t){if(t&&t.shiftKey&&w.config.sortInfo){var o=w.config.sortInfo.columns.indexOf(e);-1===o?(1==w.config.sortInfo.columns.length&&(w.config.sortInfo.columns[0].sortPriority=1),w.config.sortInfo.columns.push(e),e.sortPriority=w.config.sortInfo.columns.length,w.config.sortInfo.fields.push(e.field),w.config.sortInfo.directions.push(e.sortDirection),w.lastSortedColumns.push(e)):w.config.sortInfo.directions[o]=e.sortDirection}else{var i=n.isArray(e);w.config.sortInfo.columns.length=0,w.config.sortInfo.fields.length=0,w.config.sortInfo.directions.length=0;var l=function(e){w.config.sortInfo.columns.push(e),w.config.sortInfo.fields.push(e.field),w.config.sortInfo.directions.push(e.sortDirection),w.lastSortedColumns.push(e)};i?(w.clearSortingData(),angular.forEach(e,function(e,n){e.sortPriority=n+1,l(e)})):(w.clearSortingData(e),e.sortPriority=void 0,l(e))}w.sortActual(),w.searchProvider.evalFilter(),r.$emit("ngGridEventSorted",w.config.sortInfo)},w.getColsFromFields=function(){w.config.sortInfo.columns?w.config.sortInfo.columns.length=0:w.config.sortInfo.columns=[],angular.forEach(r.columns,function(e){var n=w.config.sortInfo.fields.indexOf(e.field);return-1!=n&&(e.sortDirection=w.config.sortInfo.directions[n]||"asc",w.config.sortInfo.columns.push(e)),!1})},w.sortActual=function(){if(!w.config.useExternalSorting){var e=w.data.slice(0);angular.forEach(e,function(e,n){var t=w.rowMap[n];if(void 0!=t){var o=w.rowCache[n];void 0!=o&&(e.preSortSelected=o.selected,e.preSortIndex=n)}}),l.Sort(w.config.sortInfo,e),angular.forEach(e,function(e,n){w.rowCache[n].entity=e,w.rowCache[n].selected=e.preSortSelected,w.rowMap[e.preSortIndex]=n,delete e.preSortSelected,delete e.preSortIndex})}},w.clearSortingData=function(e){e?(angular.forEach(w.lastSortedColumns,function(n){e.index!=n.index&&(n.sortDirection="",n.sortPriority=null)}),w.lastSortedColumns[0]=e,w.lastSortedColumns.length=1):(angular.forEach(w.lastSortedColumns,function(e){e.sortDirection="",e.sortPriority=null}),w.lastSortedColumns=[])},w.fixColumnIndexes=function(){for(var e=0;r.columns.length>e;e++)r.columns[e].visible!==!1&&(r.columns[e].index=e)},w.fixGroupIndexes=function(){angular.forEach(r.configGroups,function(e,n){e.groupIndex=n+1})},r.elementsNeedMeasuring=!0,r.columns=[],r.renderedRows=[],r.renderedColumns=[],r.headerRow=null,r.rowHeight=w.config.rowHeight,r.jqueryUITheme=w.config.jqueryUITheme,r.showSelectionCheckbox=w.config.showSelectionCheckbox,r.enableCellSelection=w.config.enableCellSelection,r.footer=null,r.selectedItems=w.config.selectedItems,r.multiSelect=w.config.multiSelect,r.showFooter=w.config.showFooter,r.footerRowHeight=r.showFooter?w.config.footerRowHeight:0,r.showColumnMenu=w.config.showColumnMenu,r.showMenu=!1,r.configGroups=[],r.gridId=w.gridId,r.enablePaging=w.config.enablePaging,r.pagingOptions=w.config.pagingOptions,r.i18n={},d.seti18n(r,w.config.i18n),r.adjustScrollLeft=function(e){for(var n=0,t=0,o=r.columns.length,i=[],l=!w.config.enableColumnHeavyVirt,s=0,c=function(e){l?i.push(e):r.renderedColumns[s]?r.renderedColumns[s].setVars(e):r.renderedColumns[s]=e.copy(),s++},g=0;o>g;g++){var d=r.columns[g];if(d.visible!==!1){var u=d.width+n;if(d.pinned){c(d);var f=g>0?e+t:e;a.setColLeft(d,f,w),t+=d.width}else u>=e&&e+w.rootDim.outerWidth>=n&&c(d);n+=d.width}}l&&(r.renderedColumns=i)},w.prevScrollTop=0,w.prevScrollIndex=0,r.adjustScrollTop=function(e,n){if(w.prevScrollTop!==e||n){e>0&&w.$viewport[0].scrollHeight-e<=w.$viewport.outerHeight()&&r.$emit("ngGridEventScroll");var i,l=Math.floor(e/w.config.rowHeight);if(w.filteredRows.length>w.config.virtualizationThreshold){if(e>w.prevScrollTop&&w.prevScrollIndex+o>l)return;if(w.prevScrollTop>e&&l>w.prevScrollIndex-o)return;i=new I(Math.max(0,l-t),l+w.minRowsToRender()+t)}else{var a=r.configGroups.length>0?w.rowFactory.parsedData.length:w.data.length;i=new I(0,Math.max(a,w.minRowsToRender()+t))}w.prevScrollTop=e,w.rowFactory.UpdateViewableRange(i),w.prevScrollIndex=l}},r.toggleShowMenu=function(){r.showMenu=!r.showMenu},r.toggleSelectAll=function(e){r.selectionProvider.toggleSelectAll(e)},r.totalFilteredItemsLength=function(){return w.filteredRows.length},r.showGroupPanel=function(){return w.config.showGroupPanel},r.topPanelHeight=function(){return w.config.showGroupPanel===!0?w.config.headerRowHeight+32:w.config.headerRowHeight},r.viewportDimHeight=function(){return Math.max(0,w.rootDim.outerHeight-r.topPanelHeight()-r.footerRowHeight-2)
},r.groupBy=function(e){if(!(1>w.data.length)&&e.groupable&&e.field){e.sortDirection||e.sort({shiftKey:r.configGroups.length>0?!0:!1});var n=r.configGroups.indexOf(e);-1==n?(e.isGroupedBy=!0,r.configGroups.push(e),e.groupIndex=r.configGroups.length):r.removeGroup(n),w.$viewport.scrollTop(0),a.digest(r)}},r.removeGroup=function(e){var n=r.columns.filter(function(n){return n.groupIndex==e+1})[0];n.isGroupedBy=!1,n.groupIndex=0,r.columns[e].isAggCol&&(r.columns.splice(e,1),r.configGroups.splice(e,1),w.fixGroupIndexes()),0===r.configGroups.length&&(w.fixColumnIndexes(),a.digest(r)),r.adjustScrollLeft(0)},r.togglePin=function(e){for(var n=e.index,t=0,o=0;r.columns.length>o&&r.columns[o].pinned;o++)t++;e.pinned&&(t=Math.max(e.originalIndex,t-1)),e.pinned=!e.pinned,r.columns.splice(n,1),r.columns.splice(t,0,e),w.fixColumnIndexes(),a.BuildStyles(r,w,!0),w.$viewport.scrollLeft(w.$viewport.scrollLeft()-e.width)},r.totalRowWidth=function(){for(var e=0,n=r.columns,t=0;n.length>t;t++)n[t].visible!==!1&&(e+=n[t].width);return e},r.headerScrollerDim=function(){var e=r.viewportDimHeight(),n=w.maxCanvasHt,t=n>e,o=new x;return o.autoFitHeight=!0,o.outerWidth=r.totalRowWidth(),t?o.outerWidth+=w.elementDims.scrollW:w.elementDims.scrollH>=n-e&&(o.outerWidth+=w.elementDims.scrollW),o}},I=function(e,n){this.topRow=e,this.bottomRow=n},R=function(e,n,t,o,r){var i=this,l=n.enableRowSelection;i.jqueryUITheme=n.jqueryUITheme,i.rowClasses=n.rowClasses,i.entity=e,i.selectionProvider=t,i.selected=t.getSelection(e),i.cursor=l?"pointer":"default",i.setSelection=function(e){i.selectionProvider.setSelection(i,e),i.selectionProvider.lastClickedRow=i},i.continueSelection=function(e){i.selectionProvider.ChangeSelection(i,e)},i.ensureEntity=function(e){i.entity!=e&&(i.entity=e,i.selected=i.selectionProvider.getSelection(i.entity))},i.toggleSelected=function(e){if(!l&&!n.enableCellSelection)return!0;var t=e.target||e;return"checkbox"==t.type&&"ngSelectionCell ng-scope"!=t.parentElement.className?!0:n.selectWithCheckboxOnly&&"checkbox"!=t.type?(i.selectionProvider.lastClickedRow=i,!0):(i.beforeSelectionChange(i,e)&&i.continueSelection(e),!1)},i.rowIndex=o,i.offsetTop=i.rowIndex*n.rowHeight,i.rowDisplayIndex=0,i.alternatingRowClass=function(){var e=0===i.rowIndex%2,n={ngRow:!0,selected:i.selected,even:e,odd:!e,"ui-state-default":i.jqueryUITheme&&e,"ui-state-active":i.jqueryUITheme&&!e};return n},i.beforeSelectionChange=n.beforeSelectionChangeCallback,i.afterSelectionChange=n.afterSelectionChangeCallback,i.getProperty=function(e){return r.evalProperty(i.entity,e)},i.copy=function(){return i.clone=new R(e,n,t,o,r),i.clone.isClone=!0,i.clone.elm=i.elm,i.clone.orig=i,i.clone},i.setVars=function(e){e.clone=i,i.entity=e.entity,i.selected=e.selected}},$=function(e,n,o,r,i){var g=this;g.aggCache={},g.parentCache=[],g.dataChanged=!0,g.parsedData=[],g.rowConfig={},g.selectionProvider=n.selectionProvider,g.rowHeight=30,g.numberOfAggregates=0,g.groupedData=void 0,g.rowHeight=e.config.rowHeight,g.rowConfig={enableRowSelection:e.config.enableRowSelection,rowClasses:e.config.rowClasses,selectedItems:n.selectedItems,selectWithCheckboxOnly:e.config.selectWithCheckboxOnly,beforeSelectionChangeCallback:e.config.beforeSelectionChange,afterSelectionChangeCallback:e.config.afterSelectionChange,jqueryUITheme:e.config.jqueryUITheme,enableCellSelection:e.config.enableCellSelection,rowHeight:e.config.rowHeight},g.renderedRange=new I(0,e.minRowsToRender()+t),g.buildEntityRow=function(e,n){return new R(e,g.rowConfig,g.selectionProvider,n,i)},g.buildAggregateRow=function(n,t){var o=g.aggCache[n.aggIndex];return o||(o=new C(n,g,g.rowConfig.rowHeight,e.config.groupsCollapsedByDefault),g.aggCache[n.aggIndex]=o),o.rowIndex=t,o.offsetTop=t*g.rowConfig.rowHeight,o},g.UpdateViewableRange=function(e){g.renderedRange=e,g.renderedChange()},g.filteredRowsChanged=function(){e.lateBoundColumns&&e.filteredRows.length>0&&(e.config.columnDefs=void 0,e.buildColumns(),e.lateBoundColumns=!1,n.$evalAsync(function(){n.adjustScrollLeft(0)})),g.dataChanged=!0,e.config.groups.length>0&&g.getGrouping(e.config.groups),g.UpdateViewableRange(g.renderedRange)},g.renderedChange=function(){if(!g.groupedData||1>e.config.groups.length)return g.renderedChangeNoGroups(),e.refreshDomSizes(),void 0;g.wasGrouped=!0,g.parentCache=[];var n=0,t=g.parsedData.filter(function(e){return e.isAggRow?e.parent&&e.parent.collapsed?!1:!0:(e[s]||(e.rowIndex=n++),!e[s])});g.totalRows=t.length;for(var o=[],r=g.renderedRange.topRow;g.renderedRange.bottomRow>r;r++)t[r]&&(t[r].offsetTop=r*e.config.rowHeight,o.push(t[r]));e.setRenderedRows(o)},g.renderedChangeNoGroups=function(){for(var n=[],t=g.renderedRange.topRow;g.renderedRange.bottomRow>t;t++)e.filteredRows[t]&&(e.filteredRows[t].rowIndex=t,e.filteredRows[t].offsetTop=t*e.config.rowHeight,n.push(e.filteredRows[t]));e.setRenderedRows(n)},g.fixRowCache=function(){var n=e.data.length,t=n-e.rowCache.length;if(0>t)e.rowCache.length=e.rowMap.length=n;else for(var o=e.rowCache.length;n>o;o++)e.rowCache[o]=e.rowFactory.buildEntityRow(e.data[o],o)},g.parseGroupData=function(e){if(e.values)for(var n=0;e.values.length>n;n++)g.parentCache[g.parentCache.length-1].children.push(e.values[n]),g.parsedData.push(e.values[n]);else for(var t in e)if(t!=l&&t!=a&&t!=c&&e.hasOwnProperty(t)){var o=g.buildAggregateRow({gField:e[l],gLabel:t,gDepth:e[a],isAggRow:!0,_ng_hidden_:!1,children:[],aggChildren:[],aggIndex:g.numberOfAggregates,aggLabelFilter:e[c].aggLabelFilter},0);g.numberOfAggregates++,o.parent=g.parentCache[o.depth-1],o.parent&&(o.parent.collapsed=!1,o.parent.aggChildren.push(o)),g.parsedData.push(o),g.parentCache[o.depth]=o,g.parseGroupData(e[t])}},g.getGrouping=function(t){g.aggCache=[],g.numberOfAggregates=0,g.groupedData={};for(var d=e.filteredRows,u=t.length,f=n.columns,p=0;d.length>p;p++){var h=d[p].entity;if(!h)return;d[p][s]=e.config.groupsCollapsedByDefault;for(var m=g.groupedData,v=0;t.length>v;v++){var w=t[v],C=f.filter(function(e){return e.field==w})[0],x=i.evalProperty(h,w);x=x?""+x:"null",m[x]||(m[x]={}),m[l]||(m[l]=w),m[a]||(m[a]=v),m[c]||(m[c]=C),m=m[x]}m.values||(m.values=[]),m.values.push(d[p])}for(var S=0;t.length>S;S++)!f[S].isAggCol&&u>=S&&f.splice(0,0,new b({colDef:{field:"",width:25,sortable:!1,resizable:!1,headerCellTemplate:'<div class="ngAggHeader"></div>',pinned:e.config.pinSelectionCheckbox},enablePinning:e.config.enablePinning,isAggCol:!0,headerRowHeight:e.config.headerRowHeight},n,e,o,r,i));o.BuildStyles(n,e,!0),e.fixColumnIndexes(),n.adjustScrollLeft(0),g.parsedData.length=0,g.parseGroupData(g.groupedData),g.fixRowCache()},e.config.groups.length>0&&e.filteredRows.length>0&&g.getGrouping(e.config.groups)},D=function(e,t,o){var r=this,i=[];r.extFilter=t.config.filterOptions.useExternalFilter,e.showFilter=t.config.showFilter,e.filterText="",r.fieldMap={},r.evalFilter=function(){var e=function(e){for(var n=0,t=i.length;t>n;n++){var a,s=i[n];if(!s.column){for(var c in e)if(e.hasOwnProperty(c)){var g=r.fieldMap[c];if(!g)continue;var d=null,u=null;g&&g.cellFilter&&(u=g.cellFilter.split(":"),d=o(u[0]));var f=e[c];if(null!=f){if("function"==typeof d){var p=""+d("object"==typeof f?l(f,g.field):f,u[1]);a=s.regex.test(p)}else a=s.regex.test("object"==typeof f?""+l(f,g.field):""+f);if(f&&a)return!0}}return!1}var h=r.fieldMap[s.columnDisplay];if(!h)return!1;var m=h.cellFilter.split(":"),v=h.cellFilter?o(m[0]):null,w=e[s.column]||e[h.field.split(".")[0]];if(null==w)return!1;if("function"==typeof v){var C=""+v("object"==typeof w?l(w,h.field):w,m[1]);a=s.regex.test(C)}else a=s.regex.test("object"==typeof w?""+l(w,h.field):""+w);if(!w||!a)return!1}return!0};t.filteredRows=0===i.length?t.rowCache:t.rowCache.filter(function(n){return e(n.entity)});for(var n=0;t.filteredRows.length>n;n++)t.filteredRows[n].rowIndex=n;t.rowFactory.filteredRowsChanged()};var l=function(e,n){if("object"!=typeof e||"string"!=typeof n)return e;var t=n.split("."),o=e;if(t.length>1){for(var r=1,i=t.length;i>r;r++)if(o=o[t[r]],!o)return e;return o}return e},a=function(e,n){try{return RegExp(e,n)}catch(t){return RegExp(e.replace(/(\^|\$|\(|\)|\<|\>|\[|\]|\{|\}|\\|\||\.|\*|\+|\?)/g,"\\$1"))}},s=function(e){i=[];var t;if(t=n.trim(e))for(var o=t.split(";"),r=0;o.length>r;r++){var l=o[r].split(":");if(l.length>1){var s=n.trim(l[0]),c=n.trim(l[1]);s&&c&&i.push({column:s,columnDisplay:s.replace(/\s+/g,"").toLowerCase(),regex:a(c,"i")})}else{var g=n.trim(l[0]);g&&i.push({column:"",regex:a(g,"i")})}}};e.$watch(function(){return t.config.filterOptions.filterText},function(n){e.filterText=n}),e.$watch("filterText",function(n){r.extFilter||(e.$emit("ngGridEventFilter",n),s(n),r.evalFilter())}),r.extFilter||e.$watch("columns",function(e){for(var n=0;e.length>n;n++){var t=e[n];t.field&&(r.fieldMap[t.field.split(".")[0]]=t),t.displayName&&(r.fieldMap[t.displayName.toLowerCase().replace(/\s+/g,"")]=t)}})},L=function(e,n,t){var o=this;o.multi=e.config.multiSelect,o.selectedItems=e.config.selectedItems,o.selectedIndex=e.config.selectedIndex,o.lastClickedRow=void 0,o.ignoreSelectedItemChanges=!1,o.pKeyParser=t(e.config.primaryKey),o.ChangeSelection=function(t,r){var i=r.which||r.keyCode,l=40===i||38===i;if(!r||r.keyCode&&!l||r.ctrlKey||r.shiftKey||o.toggleSelectAll(!1,!0),r&&r.shiftKey&&!r.keyCode&&o.multi&&e.config.enableRowSelection){if(o.lastClickedRow){var a;a=n.configGroups.length>0?e.rowFactory.parsedData.filter(function(e){return!e.isAggRow}):e.filteredRows;var s=t.rowIndex,c=o.lastClickedRow.rowIndex;if(o.lastClickedRow=t,s==c)return!1;c>s?(s^=c,c=s^c,s^=c,s--):c++;for(var g=[];s>=c;c++)g.push(a[c]);if(g[g.length-1].beforeSelectionChange(g,r)){for(var d=0;g.length>d;d++){var u=g[d],f=u.selected;u.selected=!f,u.clone&&(u.clone.selected=u.selected);var p=o.selectedItems.indexOf(u.entity);-1===p?o.selectedItems.push(u.entity):o.selectedItems.splice(p,1)}g[g.length-1].afterSelectionChange(g,r)}return!0}}else o.multi?(!r.keyCode||l)&&o.setSelection(t,!t.selected):o.lastClickedRow==t?o.setSelection(o.lastClickedRow,e.config.keepLastSelected?!0:!t.selected):(o.lastClickedRow&&o.setSelection(o.lastClickedRow,!1),o.setSelection(t,!t.selected));return o.lastClickedRow=t,!0},o.getSelection=function(n){var t=!1;if(e.config.primaryKey){var r=o.pKeyParser(n);angular.forEach(o.selectedItems,function(e){r==o.pKeyParser(e)&&(t=!0)})}else t=-1!==o.selectedItems.indexOf(n);return t},o.setSelection=function(n,t){if(e.config.enableRowSelection){if(t)-1===o.selectedItems.indexOf(n.entity)&&(!o.multi&&o.selectedItems.length>0&&o.toggleSelectAll(!1,!0),o.selectedItems.push(n.entity));else{var r=o.selectedItems.indexOf(n.entity);-1!=r&&o.selectedItems.splice(r,1)}n.selected=t,n.orig&&(n.orig.selected=t),n.clone&&(n.clone.selected=t),n.afterSelectionChange(n)}},o.toggleSelectAll=function(n,t){if(t||e.config.beforeSelectionChange(e.filteredRows,n)){var r=o.selectedItems.length;r>0&&(o.selectedItems.length=0);for(var i=0;e.filteredRows.length>i;i++)e.filteredRows[i].selected=n,e.filteredRows[i].clone&&(e.filteredRows[i].clone.selected=n),n&&o.selectedItems.push(e.filteredRows[i].entity);t||e.config.afterSelectionChange(e.filteredRows,n)}}},G=function(e,n){e.headerCellStyle=function(e){return{height:e.headerRowHeight+"px"}},e.rowStyle=function(n){var t={top:n.offsetTop+"px",height:e.rowHeight+"px"};return n.isAggRow&&(t.left=n.offsetLeft),t},e.canvasStyle=function(){return{height:""+n.maxCanvasHt+"px"}},e.headerScrollerStyle=function(){return{height:n.config.headerRowHeight+"px"}},e.topPanelStyle=function(){return{width:n.rootDim.outerWidth+"px",height:e.topPanelHeight()+"px"}},e.headerStyle=function(){return{width:n.rootDim.outerWidth+"px",height:n.config.headerRowHeight+"px"}},e.groupPanelStyle=function(){return{width:n.rootDim.outerWidth+"px",height:"32px"}},e.viewportStyle=function(){return{width:n.rootDim.outerWidth+"px",height:e.viewportDimHeight()+"px"}},e.footerStyle=function(){return{width:n.rootDim.outerWidth+"px",height:e.footerRowHeight+"px"}}};m.directive("ngCellHasFocus",["$domUtilityService",function(e){var n=function(n,t){n.isFocused=!0,e.digest(n);var o=angular.element(t[0].children).filter(function(){return 8!=this.nodeType}),r=angular.element(o[0].children[0]);r.length>0&&(angular.element(r).focus(),n.domAccessProvider.selectInputElement(r[0]),angular.element(r).bind("blur",function(){return n.isFocused=!1,e.digest(n),!0}))};return function(e,t){var o=!1;e.editCell=function(){setTimeout(function(){n(e,t)},0)},t.bind("mousedown",function(){return t.focus(),!0}),t.bind("focus",function(){return o=!0,!0}),t.bind("blur",function(){return o=!1,!0}),t.bind("keydown",function(r){return o&&37!=r.keyCode&&38!=r.keyCode&&39!=r.keyCode&&40!=r.keyCode&&9!=r.keyCode&&!r.shiftKey&&13!=r.keyCode&&n(e,t),27==r.keyCode&&t.focus(),!0})}}]),m.directive("ngCellText",function(){return function(e,n){n.bind("mouseover",function(e){e.preventDefault(),n.css({cursor:"text"})}),n.bind("mouseleave",function(e){e.preventDefault(),n.css({cursor:"default"})})}}),m.directive("ngCell",["$compile","$domUtilityService",function(e,n){var t={scope:!1,compile:function(){return{pre:function(n,t){var o,r=n.col.cellTemplate.replace(d,"$eval('row.entity.' + col.field)");n.col.enableCellEdit?(o=n.col.cellEditTemplate,o=o.replace(u,r),o=o.replace(f,n.col.editableCellTemplate.replace(d,"$eval('row.entity.' + col.field)"))):o=r;var i=e(o)(n);n.enableCellSelection&&-1==i[0].className.indexOf("ngSelectionCell")&&(i[0].setAttribute("tabindex",0),i.addClass("ngCellElement")),t.append(i)},post:function(e,t){e.enableCellSelection&&e.domAccessProvider.selectionHandlers(e,t),e.$on("ngGridEventDigestCell",function(){n.digest(e)})}}}};return t}]),m.directive("ngGridFooter",["$compile","$templateCache",function(e,n){var t={scope:!1,compile:function(){return{pre:function(t,o){0===o.children().length&&o.append(e(n.get(t.gridId+"footerTemplate.html"))(t))}}}};return t}]),m.directive("ngGridMenu",["$compile","$templateCache",function(e,n){var t={scope:!1,compile:function(){return{pre:function(t,o){0===o.children().length&&o.append(e(n.get(t.gridId+"menuTemplate.html"))(t))}}}};return t}]),m.directive("ngGrid",["$compile","$filter","$templateCache","$sortService","$domUtilityService","$utilityService","$timeout","$parse","$http","$q",function(e,t,o,r,i,l,a,s,c,g){var d={scope:!0,compile:function(){return{pre:function(d,u,f){var p=n(u),h=d.$eval(f.ngGrid);h.gridDim=new x({outerHeight:n(p).height(),outerWidth:n(p).width()});var m=new P(d,h,r,i,t,o,l,a,s,c,g);return m.init().then(function(){if("string"==typeof h.columnDefs?d.$parent.$watch(h.columnDefs,function(e){return e?(m.lateBoundColumns=!1,d.columns=[],m.config.columnDefs=e,m.buildColumns(),m.configureColumnWidths(),m.eventProvider.assignEvents(),i.RebuildGrid(d,m),void 0):(m.refreshDomSizes(),m.buildColumns(),void 0)},!0):m.buildColumns(),"string"==typeof h.data){var t=function(e){m.data=n.extend([],e),m.rowFactory.fixRowCache(),angular.forEach(m.data,function(e,n){var t=m.rowMap[n]||n;m.rowCache[t]&&m.rowCache[t].ensureEntity(e),m.rowMap[t]=n}),m.searchProvider.evalFilter(),m.configureColumnWidths(),m.refreshDomSizes(),m.config.sortInfo.fields.length>0&&(m.getColsFromFields(),m.sortActual(),m.searchProvider.evalFilter(),d.$emit("ngGridEventSorted",m.config.sortInfo)),d.$emit("ngGridEventData",m.gridId)};d.$parent.$watch(h.data,t),d.$parent.$watch(h.data+".length",function(){t(d.$eval(h.data))})}return m.footerController=new T(d,m),u.addClass("ngGrid").addClass(""+m.gridId),h.enableHighlighting||u.addClass("unselectable"),h.jqueryUITheme&&u.addClass("ui-widget"),u.append(e(o.get("gridTemplate.html"))(d)),i.AssignGridContainers(d,u,m),m.eventProvider=new y(m,d,i,a),h.selectRow=function(e,n){m.rowCache[e]&&(m.rowCache[e].clone&&m.rowCache[e].clone.setSelection(n?!0:!1),m.rowCache[e].setSelection(n?!0:!1))},h.selectItem=function(e,n){h.selectRow(m.rowMap[e],n)},h.selectAll=function(e){d.toggleSelectAll(e)},h.groupBy=function(e){if(e)d.groupBy(d.columns.filter(function(n){return n.field==e})[0]);else{var t=n.extend(!0,[],d.configGroups);angular.forEach(t,d.groupBy)}},h.sortBy=function(e){var n=d.columns.filter(function(n){return n.field==e})[0];n&&n.sort()},h.gridId=m.gridId,h.ngGrid=m,h.$gridScope=d,h.$gridServices={SortService:r,DomUtilityService:i},d.$on("ngGridEventDigestGrid",function(){i.digest(d.$parent)}),d.$on("ngGridEventDigestGridParent",function(){i.digest(d.$parent)}),d.$evalAsync(function(){d.adjustScrollLeft(0)}),angular.forEach(h.plugins,function(e){"function"==typeof e&&(e=e.call(this)),e.init(d.$new(),m,h.$gridServices),h.plugins[l.getInstanceType(e)]=e}),"function"==h.init&&h.init(m,d),null})}}}};return d}]),m.directive("ngHeaderCell",["$compile",function(e){var n={scope:!1,compile:function(){return{pre:function(n,t){t.append(e(n.col.headerCellTemplate)(n))}}}};return n}]),m.directive("ngIf",[function(){return{transclude:"element",priority:1e3,terminal:!0,restrict:"A",compile:function(e,n,t){return function(e,n,o){var r,i;e.$watch(o.ngIf,function(o){r&&(r.remove(),r=void 0),i&&(i.$destroy(),i=void 0),o&&(i=e.$new(),t(i,function(e){r=e,n.after(e)}))})}}}}]),m.directive("ngInput",["$parse",function(e){return function(n,t,o){var r=e(n.$eval(o.ngInput)),i=r.assign,l=r(n.row.entity);t.val(l),t.bind("keyup",function(){var e=t.val();n.$root.$$phase||n.$apply(function(){i(n.row.entity,e)})}),t.bind("keydown",function(e){switch(e.keyCode){case 37:case 38:case 39:case 40:e.stopPropagation();break;case 27:n.$root.$$phase||n.$apply(function(){i(n.row.entity,l),t.val(l),t.blur()});default:}return!0})}}]),m.directive("ngRow",["$compile","$domUtilityService","$templateCache",function(e,n,t){var o={scope:!1,compile:function(){return{pre:function(o,r){if(o.row.elm=r,o.row.clone&&(o.row.clone.elm=r),o.row.isAggRow){var i=t.get(o.gridId+"aggregateTemplate.html");i=o.row.aggLabelFilter?i.replace(g,"| "+o.row.aggLabelFilter):i.replace(g,""),r.append(e(i)(o))}else r.append(e(t.get(o.gridId+"rowTemplate.html"))(o));o.$on("ngGridEventDigestRow",function(){n.digest(o)})}}}};return o}]),m.directive("ngViewport",[function(){return function(e,n){var t,o,r=0;n.bind("scroll",function(n){var i=n.target.scrollLeft,l=n.target.scrollTop;return e.$headerContainer&&e.$headerContainer.scrollLeft(i),e.adjustScrollLeft(i),e.adjustScrollTop(l),e.$root.$$phase||e.$digest(),o=i,r=r,t=!1,!0}),n.bind("mousewheel DOMMouseScroll",function(){return t=!0,n.focus(),!0}),e.enableCellSelection||e.domAccessProvider.selectionHandlers(e,n)}}]),e.ngGrid.i18n.en={ngAggregateLabel:"items",ngGroupPanelDescription:"Drag a column header here and drop it to group by that column.",ngSearchPlaceHolder:"Search...",ngMenuText:"Choose Columns:",ngShowingItemsLabel:"Showing Items:",ngTotalItemsLabel:"Total Items:",ngSelectedItemsLabel:"Selected Items:",ngPageSizeLabel:"Page Size:",ngPagerFirstTitle:"First Page",ngPagerNextTitle:"Next Page",ngPagerPrevTitle:"Previous Page",ngPagerLastTitle:"Last Page"},e.ngGrid.i18n.fr={ngAggregateLabel:"articles",ngGroupPanelDescription:"Faites glisser un en-tête de colonne ici et déposez-le vers un groupe par cette colonne.",ngSearchPlaceHolder:"Recherche...",ngMenuText:"Choisir des colonnes:",ngShowingItemsLabel:"Articles Affichage des:",ngTotalItemsLabel:"Nombre total d'articles:",ngSelectedItemsLabel:"Éléments Articles:",ngPageSizeLabel:"Taille de page:",ngPagerFirstTitle:"Première page",ngPagerNextTitle:"Page Suivante",ngPagerPrevTitle:"Page précédente",ngPagerLastTitle:"Dernière page"},e.ngGrid.i18n.ge={ngAggregateLabel:"artikel",ngGroupPanelDescription:"Ziehen Sie eine Spaltenüberschrift hier und legen Sie es der Gruppe nach dieser Spalte.",ngSearchPlaceHolder:"Suche...",ngMenuText:"Spalten auswählen:",ngShowingItemsLabel:"Zeige Artikel:",ngTotalItemsLabel:"Meiste Artikel:",ngSelectedItemsLabel:"Ausgewählte Artikel:",ngPageSizeLabel:"Größe Seite:",ngPagerFirstTitle:"Erste Page",ngPagerNextTitle:"Nächste Page",ngPagerPrevTitle:"Vorherige Page",ngPagerLastTitle:"Letzte Page"},e.ngGrid.i18n.sp={ngAggregateLabel:"Artículos",ngGroupPanelDescription:"Arrastre un encabezado de columna aquí y soltarlo para agrupar por esa columna.",ngSearchPlaceHolder:"Buscar...",ngMenuText:"Elegir columnas:",ngShowingItemsLabel:"Artículos Mostrando:",ngTotalItemsLabel:"Artículos Totales:",ngSelectedItemsLabel:"Artículos Seleccionados:",ngPageSizeLabel:"Tamaño de Página:",ngPagerFirstTitle:"Primera Página",ngPagerNextTitle:"Página Siguiente",ngPagerPrevTitle:"Página Anterior",ngPagerLastTitle:"Última Página"},e.ngGrid.i18n["zh-cn"]={ngAggregateLabel:"条目",ngGroupPanelDescription:"拖曳表头到此处以进行分组",ngSearchPlaceHolder:"搜索...",ngMenuText:"数据分组与选择列:",ngShowingItemsLabel:"当前显示条目:",ngTotalItemsLabel:"条目总数:",ngSelectedItemsLabel:"选中条目:",ngPageSizeLabel:"每页显示数:",ngPagerFirstTitle:"回到首页",ngPagerNextTitle:"下一页",ngPagerPrevTitle:"上一页",ngPagerLastTitle:"前往尾页"},e.ngGrid.i18n["zh-tw"]={ngAggregateLabel:"筆",ngGroupPanelDescription:"拖拉表頭到此處以進行分組",ngSearchPlaceHolder:"搜尋...",ngMenuText:"選擇欄位:",ngShowingItemsLabel:"目前顯示筆數:",ngTotalItemsLabel:"總筆數:",ngSelectedItemsLabel:"選取筆數:",ngPageSizeLabel:"每頁顯示:",ngPagerFirstTitle:"第一頁",ngPagerNextTitle:"下一頁",ngPagerPrevTitle:"上一頁",ngPagerLastTitle:"最後頁"},angular.module("ngGrid").run(["$templateCache",function(e){e.put("aggregateTemplate.html",'<div ng-click="row.toggleExpand()" ng-style="rowStyle(row)" class="ngAggregate"> <span class="ngAggregateText">{{row.label CUSTOM_FILTERS}} ({{row.totalChildren()}} {{AggItemsLabel}})</span> <div class="{{row.aggClass()}}"></div></div>'),e.put("cellEditTemplate.html",'<div ng-cell-has-focus ng-dblclick="editCell()"> <div ng-if="!isFocused"> DISPLAY_CELL_TEMPLATE </div> <div ng-if="isFocused"> EDITABLE_CELL_TEMPLATE </div></div>'),e.put("cellTemplate.html",'<div class="ngCellText" ng-class="col.colIndex()"><span ng-cell-text>{{COL_FIELD CUSTOM_FILTERS}}</span></div>'),e.put("checkboxCellTemplate.html",'<div class="ngSelectionCell"><input tabindex="-1" class="ngSelectionCheckbox" type="checkbox" ng-checked="row.selected" /></div>'),e.put("checkboxHeaderTemplate.html",'<input class="ngSelectionHeader" type="checkbox" ng-show="multiSelect" ng-model="allSelected" ng-change="toggleSelectAll(allSelected)"/>'),e.put("editableCellTemplate.html",'<input ng-class="\'colt\' + col.index" ng-input="COL_FIELD" />'),e.put("footerTemplate.html",'<div ng-show="showFooter" class="ngFooterPanel" ng-class="{\'ui-widget-content\': jqueryUITheme, \'ui-corner-bottom\': jqueryUITheme}" ng-style="footerStyle()"> <div class="ngTotalSelectContainer" > <div class="ngFooterTotalItems" ng-class="{\'ngNoMultiSelect\': !multiSelect}" > <span class="ngLabel">{{i18n.ngTotalItemsLabel}} {{maxRows()}}</span><span ng-show="filterText.length > 0" class="ngLabel">({{i18n.ngShowingItemsLabel}} {{totalFilteredItemsLength()}})</span> </div> <div class="ngFooterSelectedItems" ng-show="multiSelect"> <span class="ngLabel">{{i18n.ngSelectedItemsLabel}} {{selectedItems.length}}</span> </div> </div> <div class="ngPagerContainer" style="float: right; margin-top: 10px;" ng-show="enablePaging" ng-class="{\'ngNoMultiSelect\': !multiSelect}"> <div style="float:left; margin-right: 10px;" class="ngRowCountPicker"> <span style="float: left; margin-top: 3px;" class="ngLabel">{{i18n.ngPageSizeLabel}}</span> <select style="float: left;height: 27px; width: 100px" ng-model="pagingOptions.pageSize" > <option ng-repeat="size in pagingOptions.pageSizes">{{size}}</option> </select> </div> <div style="float:left; margin-right: 10px; line-height:25px;" class="ngPagerControl" style="float: left; min-width: 135px;"> <button class="ngPagerButton" ng-click="pageToFirst()" ng-disabled="cantPageBackward()" title="{{i18n.ngPagerFirstTitle}}"><div class="ngPagerFirstTriangle"><div class="ngPagerFirstBar"></div></div></button> <button class="ngPagerButton" ng-click="pageBackward()" ng-disabled="cantPageBackward()" title="{{i18n.ngPagerPrevTitle}}"><div class="ngPagerFirstTriangle ngPagerPrevTriangle"></div></button> <input class="ngPagerCurrent" type="number" style="width:50px; height: 24px; margin-top: 1px; padding: 0 4px;" ng-model="pagingOptions.currentPage"/> <button class="ngPagerButton" ng-click="pageForward()" ng-disabled="cantPageForward()" title="{{i18n.ngPagerNextTitle}}"><div class="ngPagerLastTriangle ngPagerNextTriangle"></div></button> <button class="ngPagerButton" ng-click="pageToLast()" ng-disabled="cantPageToLast()" title="{{i18n.ngPagerLastTitle}}"><div class="ngPagerLastTriangle"><div class="ngPagerLastBar"></div></div></button> </div> </div></div>'),e.put("gridTemplate.html",'<div class="ngTopPanel" ng-class="{\'ui-widget-header\':jqueryUITheme, \'ui-corner-top\': jqueryUITheme}" ng-style="topPanelStyle()"> <div class="ngGroupPanel" ng-show="showGroupPanel()" ng-style="groupPanelStyle()"> <div class="ngGroupPanelDescription" ng-show="configGroups.length == 0">{{i18n.ngGroupPanelDescription}}</div> <ul ng-show="configGroups.length > 0" class="ngGroupList"> <li class="ngGroupItem" ng-repeat="group in configGroups"> <span class="ngGroupElement"> <span class="ngGroupName">{{group.displayName}} <span ng-click="removeGroup($index)" class="ngRemoveGroup">x</span> </span> <span ng-hide="$last" class="ngGroupArrow"></span> </span> </li> </ul> </div> <div class="ngHeaderContainer" ng-style="headerStyle()"> <div class="ngHeaderScroller" ng-style="headerScrollerStyle()" ng-include="gridId + \'headerRowTemplate.html\'"></div> </div> <div ng-grid-menu></div></div><div class="ngViewport" unselectable="on" ng-viewport ng-class="{\'ui-widget-content\': jqueryUITheme}" ng-style="viewportStyle()"> <div class="ngCanvas" ng-style="canvasStyle()"> <div ng-style="rowStyle(row)" ng-repeat="row in renderedRows" ng-click="row.toggleSelected($event)" ng-class="row.alternatingRowClass()" ng-row></div> </div></div><div ng-grid-footer></div>'),e.put("headerCellTemplate.html",'<div class="ngHeaderSortColumn {{col.headerClass}}" ng-style="{\'cursor\': col.cursor}" ng-class="{ \'ngSorted\': !noSortVisible }"> <div ng-click="col.sort($event)" ng-class="\'colt\' + col.index" class="ngHeaderText">{{col.displayName}}</div> <div class="ngSortButtonDown" ng-show="col.showSortButtonDown()"></div> <div class="ngSortButtonUp" ng-show="col.showSortButtonUp()"></div> <div class="ngSortPriority">{{col.sortPriority}}</div> <div ng-class="{ ngPinnedIcon: col.pinned, ngUnPinnedIcon: !col.pinned }" ng-click="togglePin(col)" ng-show="col.pinnable"></div></div><div ng-show="col.resizable" class="ngHeaderGrip" ng-click="col.gripClick($event)" ng-mousedown="col.gripOnMouseDown($event)"></div>'),e.put("headerRowTemplate.html",'<div ng-style="{ height: col.headerRowHeight }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngHeaderCell" ng-header-cell></div>'),e.put("menuTemplate.html",'<div ng-show="showColumnMenu || showFilter" class="ngHeaderButton" ng-click="toggleShowMenu()"> <div class="ngHeaderButtonArrow"></div></div><div ng-show="showMenu" class="ngColMenu"> <div ng-show="showFilter"> <input placeholder="{{i18n.ngSearchPlaceHolder}}" type="text" ng-model="filterText"/> </div> <div ng-show="showColumnMenu"> <span class="ngMenuText">{{i18n.ngMenuText}}</span> <ul class="ngColList"> <li class="ngColListItem" ng-repeat="col in columns | ngColumns"> <label><input ng-disabled="col.pinned" type="checkbox" class="ngColListCheckbox" ng-model="col.visible"/>{{col.displayName}}</label> <a title="Group By" ng-class="col.groupedByClass()" ng-show="col.groupable && col.visible" ng-click="groupBy(col)"></a> <span class="ngGroupingNumber" ng-show="col.groupIndex > 0">{{col.groupIndex}}</span> </li> </ul> </div></div>'),e.put("rowTemplate.html",'<div ng-style="{ \'cursor\': row.cursor }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell {{col.cellClass}}" ng-cell></div>')}])})(window,jQuery);