UNPKG

@hpcc-js/dgrid-shim

Version:
2 lines 238 kB
/*! For license information please see index.min.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@hpcc-js/dgrid-shim"]=t():e["@hpcc-js/dgrid-shim"]=t()}(self,()=>(()=>{var __webpack_modules__={7957(e){e.exports=function(e,t,n,r){this.loaderVersion="1.17.3",function(e,t){var n=function(){return void 0!==u&&"function"!=typeof u?u:void 0!==r?r:"undefined"!=typeof self?self:this}(),o=function(){},i={}.toString,s=function(e){return"[object Function]"==i.call(e)},a=function(e,t){if(e)for(var n=0;n<e.length;)t(e[n++])},l=function(e,t){for(var n in t)e[n]=t[n];return e},c=1,d=function(e,t,n){return(void 0)(e,t,n,0,d)},u=n,h=u.document,f=h&&h.createElement("DiV"),p=d.has=function(e){return s(v[e])?v[e]=v[e](u,h,f):v[e]},v=p.cache=t.hasCache;for(var g in s(e)&&(e=e(n)),p.add=function(e,t,n,r){return(void 0===v[e]||r)&&(v[e]=t),n&&p(e)},e.has)p.add(g,e.has[g],0,1);d.async=1;var m=function(){};d.eval=function(e,t){return m(e+"\r\n//# sourceURL="+t)};var y,_={},b=(d.signal=function(e,t){var n=_[e];a(n&&n.slice(0),function(e){var n;e.apply(null,(n=t,"[object Array]"==i.call(n)?t:[t]))})},d.on=function(e,t){var n=_[e]||(_[e]=[]);return n.push(t),{remove:function(){for(var e=0;e<n.length;e++)if(n[e]===t)return void n.splice(e,1)}}}),w=[],x=[],N={},C=(d.map={},[]),j={},S="",T={};t.paths,x=t.pathsMapProg,N=t.packs,w=t.aliases,C=t.mapProgs,j=t.modules,T=t.cache,S=t.cacheBust,d.rawConfig=t;var E=function(e,t){if(t)for(var n=0;n<t.length;n++)if(t[n][2].test(e))return t[n];return 0},M=function(e){var t,n,r=[];for(e=e.replace(/\\/g,"/").split("/");e.length;)".."==(t=e.shift())&&r.length&&".."!=n?(r.pop(),n=r[r.length-1]):"."!=t&&r.push(n=t);return r.join("/")},A=function(e,t,n,r){return{pid:e,mid:t,pack:n,url:r,executed:0,def:0}},P=function(e,t,n,r,o,i,c,d,u,h){var f,p,v,g,m,_,b;if(b=/^\./.test(e),/(^\/)|(\:)|(\.js$)/.test(e)||b&&!t)return A(0,e,0,e);if(e=M(b?t.mid+"/../"+e:e),/^\./.test(e))throw function(e,t){return l(new Error(e),{src:"dojoLoader",info:t})}("irrationalPath",e);h||b||!i.star||(g=E(e,i.star[1])),!g&&t&&(g=(g=E(t.mid,i))&&E(e,g[1])),g&&(e=g[1]+e.substring(g[3])),(p=n[f=(y=e.match(/^([^\/]+)(\/(.+))?$/))?y[1]:""])?e=f+"/"+(v=y[3]||p.main):f="";var w=0;return a(d,function(t){var n=e.match(t[0]);n&&n.length>0&&(w=s(t[1])?e.replace(t[0],t[1]):t[1])}),w?P(w,0,n,r,o,i,c,d,u):(_=r[e])?u?A(_.pid,_.mid,_.pack,_.url):r[e]:(m=(g=E(e,c))?g[1]+e.substring(g[3]):f?("/"===p.location.slice(-1)?p.location.slice(0,-1):p.location)+"/"+v:e,/(^\/)|(\:)/.test(m)||(m=o+m),A(f,e,p,M(m+=".js")))},R=function(e,t,n){return P(e,t,N,j,d.baseUrl,C,x,w,void 0,n)},L=(d.toAbsMid=function(e,t){return R(e,t).mid},d.toUrl=function(e,t){var n=R(e+"/x",t),r=n.url;return L(0===n.pid?e:r.substring(0,r.length-5))},"function"==typeof e.fixupUrl?e.fixupUrl:function(e){return(e+="")+(S?(/\?/.test(e)?"&":"?")+S:"")});d.log=o,d.trace=o;var I=o;(l(l(d,t.loaderPatch),e.loaderPatch),b("error",function(e){try{if(console.error(e),e instanceof Error){for(var t in e)console.log(t+":",e[t]);console.log(".")}}catch(e){}}),l(d,{uid:function(){return"_"+c++},cache:T,packs:N}),u.define)||(u.define=I,u.require=d)}.call(this,e,t)}},1996(e,t,n){var r,o;n.dj.r;r=[n(6345),n(6323),n(8945),n(28),n(2075),n(6566),n(1172),n(6356),n(4975),n(3927)],o=function(e,t,n,r,o,i,s,a,l){a.add("event-mousewheel",function(e,t,n){return"onmousewheel"in n}),a.add("event-wheel",function(e,t,n){return"onwheel"in n});var c="data-dgrid-column-set-id";function d(e,t){var n=e._columnSetScrollLefts;s(".dgrid-column-set",t).forEach(function(e){e.scrollLeft=n[e.getAttribute(c)]})}function u(e,t){if(e&&e.length){for(var n=[],r=t+"-",o=0,i=e.length;o<i;o++){var s=e[o],a=[];a.className=s.className;for(var l=0,c=s.length;l<c;l++){var d=s[l];null!=d.id&&0===d.id.indexOf(r)&&a.push(d)}n.push(a)}return n}}function h(e,t){return t&&e===t||n.contains(e,"dgrid")}var f=a("event-mousewheel")||a("event-wheel")?function(e){return function(t,n){return o(t,a("event-wheel")?"wheel":"mousewheel",function(r){var o,i=function(e,t){for(1!==e.nodeType&&(e=e.parentNode);e&&!s.matches(e,".dgrid-column-set["+c+"]",t);){if(h(e,t))return null;e=e.parentNode}return e}(r.target,t);i&&(o=r.deltaX||-r.wheelDeltaX/3)&&n.call(null,e,i,o)})}}:function(e){return function(t,n){return o(t,".dgrid-column-set["+c+"]:MozMousePixelScroll",function(t){1===t.axis&&n.call(null,e,this,t.detail)})}};function p(e,t,n){var r=t.getAttribute(c),o=e._columnSetScrollers[r],i=o.scrollLeft+n;o.scrollLeft=i<0?0:i}return e(null,{constructor:function(){if("_editorInstances"in this)throw new Error("When used with Editor ColumnSet must be mixed in before Editor.")},postCreate:function(){var e=this;this.inherited(arguments),this.on(f(this),p),this.on(".dgrid-column-set:dgrid-cellfocusin",function(t){e._onColumnSetCellFocus(t,this)}),"function"==typeof this.expand&&this._listeners.push(i.after(this,"expand",function(t,n){return t.then(function(){var t=e.row(n[0]);e._expanded[t.id]&&d(e,t.element.connected)}),t}))},columnSets:[],createRowCells:function(e,t,n,o,i){for(var s=r.create("table",{className:"dgrid-row-table"}),a=r.create("tbody",null,s),l=r.create("tr",null,a),d=0,h=this.columnSets.length;d<h;d++){var f=r.create(e,{className:"dgrid-column-set-cell dgrid-column-set-"+d},l);(f=r.create("div",{className:"dgrid-column-set"},f)).setAttribute(c,d);var p=u(n||this.subRows,d)||this.columnSets[d];f.appendChild(this.inherited(arguments,[e,t,p,o,i]))}return s},renderArray:function(){for(var e=this.inherited(arguments),t=0;t<e.length;t++)d(this,e[t]);return e},insertRow:function(){var e=this.inherited(arguments);return d(this,e),e},renderHeader:function(){this.inherited(arguments);var e,t,n=this.columnSets,o=this._columnSetScrollers,s=this;function a(){s._positionScrollers()}if(this._columnSetScrollerContents={},this._columnSetScrollLefts={},o)for(e in o)r.destroy(o[e]);else this._listeners.push(i.after(this,"resize",a,!0),i.after(this,"styleColumn",a,!0)),this._columnSetScrollerNode=r.create("div",{className:"dgrid-column-set-scroller-container"},this.footerNode,"after");for(o=this._columnSetScrollers={},e=0,t=n.length;e<t;e++)this._putScroller(n[e],e);this._positionScrollers()},styleColumnSet:function(e,t){var n=this.addCssRule("#"+l.escapeCssIdentifier(this.domNode.id)+" .dgrid-column-set-"+l.escapeCssIdentifier(e,"-"),t);return this._positionScrollers(),n},configStructure:function(){this.columns={},this.subRows=[];for(var e=0,t=this.columnSets.length;e<t;e++)for(var n=this.columnSets[e],r=0;r<n.length;r++)n[r]=this._configColumns(e+"-"+r+"-",n[r]);this.inherited(arguments)},_positionScrollers:function(){var e,t,n,r,o=this.domNode,i=this._columnSetScrollers,l=this._columnSetScrollerContents,d=0,u=0;for(e=0,t=this.columnSets.length;e<t;e++)d=(n=s(".dgrid-column-set["+c+'="'+e+'"]',o)[0]).offsetWidth,r=n.firstChild.offsetWidth,l[e].style.width=r+"px",i[e].style.width=d+"px",a("ie")<9&&(i[e].style.overflowX=r>d?"scroll":"auto"),r>d&&u++;this._columnSetScrollerNode.style.bottom=this.showFooter?this.footerNode.offsetHeight+"px":"0",this.bodyNode.style.bottom=u?a("dom-scrollbar-height")+(a("ie")?1:0)+"px":"0"},_putScroller:function(e,n){var i=this._columnSetScrollers[n]=r.create("span",{className:"dgrid-column-set-scroller dgrid-column-set-scroller-"+n+(a("ie")<9?" dgrid-scrollbar-height":"")},this._columnSetScrollerNode);i.setAttribute(c,n),this._columnSetScrollerContents[n]=r.create("div",{className:"dgrid-column-set-scroller-content"},i),o(i,"scroll",t.hitch(this,"_onColumnSetScroll"))},_onColumnSetScroll:function(e){var t,n=e.target.scrollLeft,r=e.target.getAttribute(c);this._columnSetScrollLefts[r]!==n&&(s(".dgrid-column-set["+c+'="'+r+'"],.dgrid-column-set-scroller['+c+'="'+r+'"]',this.domNode).forEach(function(e,r){e.scrollLeft=n,r||(t=e.scrollLeft)}),this._columnSetScrollLefts[r]=t)},_setColumnSets:function(e){this._destroyColumns(),this.columnSets=e,this._updateColumns()},_scrollColumnSet:function(e,t){var n=e.tagName?e.getAttribute(c):e;this._columnSetScrollers[n].scrollLeft=t<0?0:t},_onColumnSetCellFocus:function(e,t){var n=e.target,r=t.getAttribute(c),o=this._columnSetScrollers[r];(n.offsetLeft-o.scrollLeft+n.offsetWidth>t.offsetWidth||o.scrollLeft>n.offsetLeft)&&this._scrollColumnSet(t,n.offsetLeft)}})}.apply(null,r),void 0===o||(e.exports=o)},1540(e,t,n){var r,o;n.dj.r;r=[n(6345),n(6323),n(28),n(8945),n(2075),n(6356),n(4624),n(4975),n(3927)],o=function(e,t,n,r,o,i,s,a){function l(e,t){t&&t.nodeType&&e.appendChild(t)}function c(e){return a.escapeCssIdentifier(e,"-")}var d=e(s,{columns:null,hasNeutralSort:!1,cellNavigation:!0,tabableHeader:!0,showHeader:!0,column:function(e){return"object"!=typeof e?this.columns[e]:this.cell(e).column},listType:"grid",cell:function(e,t){if(e.column&&e.element)return e;var n;if(e.target&&e.target.nodeType&&(e=e.target),e.nodeType)do{if(this._rowIdToObject[e.id])break;var r=e.columnId;if(r){t=r,n=e;break}e=e.parentNode}while(e&&e!==this.domNode);if(!n&&void 0!==t){var o=this.row(e),i=o&&o.element;if(i)for(var s=i.getElementsByTagName("td"),a=0;a<s.length;a++)if(s[a].columnId===t){n=s[a];break}}return null!=e?{row:o||this.row(e),column:t&&this.column(t),element:n}:void 0},createRowCells:function(e,t,r,o,s){var a,l,d,u,h,f,p,v,g,m,y,_,b,w=n.create("table",{className:"dgrid-row-table",role:"presentation"}),x=i("ie")<9?n.create("tbody",null,w):w;for(l=0,d=(r=r||this.subRows).length;l<d;l++)for(f=r[l],a=n.create("tr",null,x),f.className&&(a.className=f.className),u=0,h=f.length;u<h;u++)v=(p=f[u]).id,g=p.field?" field-"+c(p.field):"",(m="function"==typeof p.className?p.className(o):p.className)&&(g+=" "+m),(y=n.create(e,{className:"dgrid-cell"+(v?" dgrid-column-"+c(v):"")+g,role:"th"===e?"columnheader":"gridcell"})).columnId=v,(_=p.colSpan)&&(y.colSpan=_),(b=p.rowSpan)&&(y.rowSpan=b),t(y,p,o,s),a.appendChild(y);return w},_createBodyRowCell:function(e,t,n,r){var o=n;t.get?o=t.get(n):"field"in t&&"_item"!==t.field&&(o=n[t.field]),t.renderCell?l(e,t.renderCell(n,o,e,r)):this._defaultRenderCell.call(t,n,o,e,r)},_createHeaderRowCell:function(e,t){var n=t.headerNode=e,r=t.field;r&&(e.field=r),t.renderHeaderCell?l(n,t.renderHeaderCell(n)):("label"in t||t.field)&&n.appendChild(document.createTextNode("label"in t?t.label:t.field)),!1!==t.sortable&&r&&"_item"!==r&&(e.sortable=!0,e.className+=" dgrid-sortable")},left:function(e,t){return e.element||(e=this.cell(e)),this.cell(this._move(e,-(t||1),"dgrid-cell"))},right:function(e,t){return e.element||(e=this.cell(e)),this.cell(this._move(e,t||1,"dgrid-cell"))},_defaultRenderCell:function(e,t,n){if(this.formatter){var r=this.formatter,o=this.grid.formatterScope,i="string"==typeof r&&o?o[r](t,e):this.formatter(t,e);null!=i&&i.hasOwnProperty("html")?n.innerHTML=i.html:null!=i&&n.appendChild(document.createTextNode(i))}else null!=t&&n.appendChild(document.createTextNode(t))},renderRow:function(e,r){var o=this.createRowCells("td",t.hitch(this,"_createBodyRowCell"),r&&r.subRows,e,r),i=n.create("div",{role:"row"});return i.appendChild(o),i},renderHeader:function(){var e=this,r=this.headerNode;r.setAttribute("role","row"),n.empty(r);var s=this.createRowCells("th",t.hitch(this,"_createHeaderRowCell"),this.subRows&&this.subRows.headerRows);this._rowIdToObject[s.id=this.id+"-header"]=this.columns,r.appendChild(s),this._sortListener&&this._sortListener.remove(),this._sortListener=o(s,"click,keydown",function(t){if("click"===t.type||32===t.keyCode||!i("opera")&&13===t.keyCode){var n,s,a,l,c=t.target;do{if(c.sortable){n=c.field||c.columnId,s=e.sort[0],a=e.hasNeutralSort&&s&&s.property===n&&s.descending?[]:[{property:n,descending:s&&s.property===n&&!s.descending}],l={bubbles:!0,cancelable:!0,grid:e,parentType:t.type,sort:a},o.emit(t.target,"dgrid-sort",l)&&(e._sortNode=c,e.set("sort",a));break}}while((c=c.parentNode)&&c!==r)}})},resize:function(){var e,t=this.headerNode.firstChild,n=this.contentNode;this.inherited(arguments),n.style.width="",n&&t&&(e=t.offsetWidth)>n.offsetWidth&&(n.style.width=e+"px")},destroy:function(){this._destroyColumns(),this._sortListener&&this._sortListener.remove(),this.inherited(arguments)},_setSort:function(){this.inherited(arguments),this.updateSortArrow(this.sort)},_findSortArrowParent:function(e){var t=this.columns;for(var n in t){var r=t[n];if(r.field===e)return r.headerNode}},updateSortArrow:function(e,t){if(this._lastSortedArrow&&(this._lastSortedArrow.parentNode&&r.remove(this._lastSortedArrow.parentNode,"dgrid-sort-up dgrid-sort-down"),n.destroy(this._lastSortedArrow),delete this._lastSortedArrow),t&&(this.sort=e),e[0]){var o=e[0].property,i=e[0].descending,s=this._sortNode||this._findSortArrowParent(o);delete this._sortNode,s&&(s=s.contents||s,this._lastSortedArrow=n.create("div",{className:"dgrid-sort-arrow ui-icon",innerHTML:"&nbsp;",role:"presentation"},s,"first"),r.add(s,"dgrid-sort-"+(i?"down":"up")),this.resize())}},styleColumn:function(e,t){return this.addCssRule("#"+a.escapeCssIdentifier(this.domNode.id)+" .dgrid-column-"+c(e),t)},_configColumns:function(e,t){var n=[],r=t instanceof Array;return a.each(t,function(o,i){"string"==typeof o&&(t[i]=o={label:o}),r||o.field||(o.field=i),i=o.id=o.id||(isNaN(i)?i:e+i),this._configColumn&&(this._configColumn(o,t,e),i=o.id),r&&(this.columns[i]=o),o.grid?o.grid!==this&&console.warn("Sharing column definition objects with multiple grids is not supported.",o.grid,this):o.grid=this,n.push(o)},this),r?t:n},_destroyColumns:function(){this.cleanup()},configStructure:function(){var e=this.subRows,t=this._columns=this.columns;if(this.columns=!t||t instanceof Array?{}:t,e)for(var n=0;n<e.length;n++)e[n]=this._configColumns(n+"-",e[n]);else this.subRows=[this._configColumns("",t)]},_getColumns:function(){return this._columns||this.columns},_setColumns:function(e){this._destroyColumns(),this.subRows=null,this.columns=e,this._updateColumns()},_setSubRows:function(e){this._destroyColumns(),this.subRows=e,this._updateColumns()},_updateColumns:function(){this.configStructure(),this.renderHeader(),this.refresh(),this._lastCollection&&this.renderArray(this._lastCollection),this._started&&(this.sort.length?(this._lastSortedArrow=null,this.updateSortArrow(this.sort)):this.resize())}});return d.appendIfNode=l,d}.apply(null,r),void 0===o||(e.exports=o)},9173(e,t,n){var r,o;n.dj.r;r=[n(6345),n(6566),n(8945),n(2075),n(6323),n(6356),n(4975),n(3927)],o=function(e,t,n,r,o,i,s){var a={checkbox:1,radio:1,button:1},l=/\bdgrid-cell\b/,c=/\bdgrid-row\b/,d=e(null,{pageSkip:10,tabIndex:0,keyMap:null,headerKeyMap:null,mouseDownEventType:"mousedown",postMixInProperties:function(){this.inherited(arguments),this.keyMap||(this.keyMap=o.mixin({},d.defaultKeyMap)),this.headerKeyMap||(this.headerKeyMap=o.mixin({},d.defaultHeaderKeyMap))},postCreate:function(){this.inherited(arguments);var e=this;function n(e){var t=e.target;return t.type&&(!a[t.type]||32===e.keyCode)}function o(o){var i=e.cellNavigation,s=i?l:c,a=o===e.headerNode,d=o;function u(){if(e._focusedHeaderNode&&(e._focusedHeaderNode.tabIndex=-1),e.showHeader){if(i){for(var t,n=e.headerNode.getElementsByTagName("th"),r=0;t=n[r];++r)if(s.test(t.className)){e._focusedHeaderNode=d=t;break}}else e._focusedHeaderNode=d=e.headerNode;d&&(d.tabIndex=e.tabIndex)}}function h(){var t=e._focusedNode||d;if(!s.test(t.className)||!o.contains(t)){for(var n,r=o.getElementsByTagName("*"),i=0;n=r[i];++i)if(s.test(n.className)){t=e._focusedNode=n;break}d.tabIndex=-1,t.tabIndex=e.tabIndex}}a?(u(),e._listeners.push(t.after(e,"renderHeader",u,!0))):e._listeners.push(t.after(e,"renderArray",h,!0),t.after(e,"_onNotification",function(e,t){0===t.totalLength?o.tabIndex=0:1===t.totalLength&&"add"===t.type&&h()},!0)),e._listeners.push(r(o,e.mouseDownEventType,function(t){n(t)||e._focusOnNode(t.target,a,t)})),e._listeners.push(r(o,"keydown",function(t){if(!t.metaKey&&!t.altKey){var r=e[a?"headerKeyMap":"keyMap"][t.keyCode];r&&!n(t)&&r.call(e,t)}}))}this.tabableHeader&&(o(this.headerNode),r(this.headerNode,"dgrid-cellfocusin",function(){e.scrollTo({x:this.scrollLeft})})),o(this.contentNode),this._debouncedEnsureScroll=s.debounce(this._ensureScroll,this)},_pruneRow:function(){var e=this._focusedNode;this._focusedNode=null,this.inherited(arguments),this._focusedNode=e},removeRow:function(e){if(!this._focusedNode)return this.inherited(arguments);var t,n=this,r=document.activeElement===this._focusedNode,o=this[this.cellNavigation?"cell":"row"](this._focusedNode),i=o.row||o;(e=e.element||e)===i.element&&((t=this.down(i,1,!0))&&t.element!==e||(t=this.up(i,1,!0)),this._removedFocus={active:r,rowId:i.id,columnId:o.column&&o.column.id,siblingId:t&&t.element!==e?t.id:void 0},setTimeout(function(){n._removedFocus&&n._restoreFocus(i.id)},0),this._focusedNode=null),this.inherited(arguments)},insertRow:function(){var e=this.inherited(arguments);return this._removedFocus&&!this._removedFocus.wait&&this._restoreFocus(e),e},_restoreFocus:function(e){var t,r,o=this._removedFocus;if((t=(e=e&&this.row(e))&&e.element&&e.id===o.rowId?e:void 0!==o.siblingId&&this.row(o.siblingId))&&t.element){if(!t.element.parentNode.parentNode)return void(o.wait=!0);void 0!==o.columnId&&(r=this.cell(t,o.columnId))&&r.element&&(t=r),o.active&&0!==t.element.offsetHeight?this._focusOnNode(t,!1,null):(n.add(t.element,"dgrid-focus"),t.element.tabIndex=this.tabIndex,this._focusedNode=t.element)}delete this._removedFocus},addKeyHandler:function(e,n,r){var o=t.after(this[r?"headerKeyMap":"keyMap"],e,n,!0);return this._listeners.push(o),o},_ensureRowScroll:function(e){var t=this.getScrollPosition().y;t>e.offsetTop?this.scrollTo({y:e.offsetTop}):t+this.contentNode.offsetHeight<e.offsetTop+e.offsetHeight&&this.scrollTo({y:e.offsetTop-this.contentNode.offsetHeight+e.offsetHeight})},_ensureColumnScroll:function(e){var t=this.getScrollPosition().x,n=e.offsetLeft;if(t>n)this.scrollTo({x:n});else{var r=this.bodyNode.clientWidth,o=e.offsetWidth,i=n+o;t+r<i&&this.scrollTo({x:r>o?i-r:n})}},_ensureScroll:function(e,t){!e.column&&!e.row&&e.data&&e.element?this._ensureRowScroll(e.element):(this.cellNavigation&&(this.columnSets||this.subRows.length>1)&&!t&&this._ensureRowScroll(e.row.element),this.bodyNode.clientWidth<this.contentNode.offsetWidth&&this._ensureColumnScroll(e.element))},_focusOnNode:function(e,t,i){var s,a,d,u,h,f="_focused"+(t?"Header":"")+"Node",p=this[f],v=this.cellNavigation?"cell":"row",g=this[v](e);if(e=g&&g.element){if(this.cellNavigation)for(h=0,d=(s=e.getElementsByTagName("input")).length;h<d;h++)if((-1!==(a=s[h]).tabIndex||"_dgridLastValue"in a)&&!a.disabled){a.focus(),u=!0;break}null!==i&&((i=o.mixin({grid:this},i)).type&&(i.parentType=i.type),i.bubbles||(i.bubbles=!0)),p&&(n.remove(p,"dgrid-focus"),p.removeAttribute("tabindex"),i&&(i[v]=this[v](p),r.emit(p,"dgrid-cellfocusout",i))),p=this[f]=e,i&&(i[v]=g);var m=this.cellNavigation?l:c;!u&&m.test(e.className)&&(e.tabIndex=this.tabIndex,e.focus()),n.add(e,"dgrid-focus"),i&&r.emit(p,"dgrid-cellfocusin",i),this._debouncedEnsureScroll(g,t)}},focusHeader:function(e){this._focusOnNode(e||this._focusedHeaderNode,!0)},focus:function(e){var t=e||this._focusedNode;t?this._focusOnNode(t,!1):(this._removedFocus&&(this._removedFocus.active=!0),this.contentNode.focus())}}),u=d.moveFocusVertical=function(e,t){if(this._focusedNode&&e.target!==this.contentNode){var n=this.cellNavigation,r=this[n?"cell":"row"](e),o=n&&r.column.id,i=this.down(this._focusedNode,t,!0);n&&(i=this.cell(i,o)),this._focusOnNode(i,!1,e),e.preventDefault()}},h=d.moveFocusUp=function(e){u.call(this,e,-1)},f=d.moveFocusDown=function(e){u.call(this,e,1)},p=d.moveFocusPageUp=function(e){u.call(this,e,-this.pageSkip)},v=d.moveFocusPageDown=function(e){u.call(this,e,this.pageSkip)},g=d.moveFocusHorizontal=function(e,t){if(this.cellNavigation&&e.target!==this.contentNode){var n=!this.row(e),r=this["_focused"+(n?"Header":"")+"Node"];this._focusOnNode(this.right(r,t),n,e),e.preventDefault()}},m=d.moveFocusLeft=function(e){g.call(this,e,-1)},y=d.moveFocusRight=function(e){g.call(this,e,1)},_=d.moveHeaderFocusEnd=function(e,t){var n;this.cellNavigation&&(n=this.headerNode.getElementsByTagName("th"),this._focusOnNode(n[t?0:n.length-1],!0,e)),e.preventDefault()},b=d.moveHeaderFocusHome=function(e){_.call(this,e,!0)},w=d.moveFocusEnd=function(e,n){var r,s=this.cellNavigation,a=this.contentNode,l=n?0:a.scrollHeight,c=a.scrollTop+l,d=a[n?"firstChild":"lastChild"],u=d.className.indexOf("dgrid-preload")>-1,h=u?d[(n?"next":"previous")+"Sibling"]:d;if(e.preventDefault(),this.scrollTo({y:c}),u){for(;h&&h.className.indexOf("dgrid-row")<0;)h=h[(n?"next":"previous")+"Sibling"];if(!h)return}!u||d.offsetHeight<1?(s&&(h=this.cell(h,this.cell(e).column.id)),this._focusOnNode(h,!1,e)):(i("dom-addeventlistener")||(e=o.mixin({},e)),r=t.after(this,"renderArray",function(t){var o=t[n?0:t.length-1];return s&&(o=this.cell(o,this.cell(e).column.id)),this._focusOnNode(o,!1,e),r.remove(),t}),this._listeners.push(r))},x=d.moveFocusHome=function(e){w.call(this,e,!0)};function N(e){e.preventDefault()}return d.defaultKeyMap={32:N,33:p,34:v,35:w,36:x,37:m,38:h,39:y,40:f},d.defaultHeaderKeyMap={32:N,35:_,36:b,37:m,39:y},d}.apply(null,r),void 0===o||(e.exports=o)},4624(e,t,n){var r,o;n.dj.r;r=[n(6345),n(6323),n(8945),n(28),n(2075),n(1172),n(2616),n(4975)],o=function(e,t,n,r,o,i,s,a){var l=[];s("mozilla")&&l.push("has-mozilla"),n.add(document.documentElement,l),s.add("pointer",function(e){return"PointerEvent"in e?"pointer":"MSPointerEvent"in e&&"MSPointer"});var c,d,u="dgrid-row-odd",h="dgrid-row-even";function f(e,t){return i("#"+a.escapeCssIdentifier(e),t)[0]}function p(e){e.className="",e.parentNode&&document.body.removeChild(e)}function v(e,t){e.className="dgrid-scrollbar-measure",document.body.appendChild(e);var n=e["offset"+t]-e["client"+t];return p(e),n}s.add("dom-scrollbar-width",function(e,t,n){return v(n,"Width")}),s.add("dom-scrollbar-height",function(e,t,n){return v(n,"Height")}),s.add("dom-rtl-scrollbar-left",function(e,t,n){var o,i=document.createElement("div");return n.className="dgrid-scrollbar-measure",n.setAttribute("dir","rtl"),n.appendChild(i),document.body.appendChild(n),o=!!s("ie")||!!s("trident")||/\bEdge\//.test(navigator.userAgent)||i.offsetLeft>=s("dom-scrollbar-width"),p(n),r.destroy(i),n.removeAttribute("dir"),o});var g=0;function m(e){n.replace(this.domNode,e,this._class||""),this._class=e}function y(){return this._class}var _=function(){this._started&&this.resize()},b=e(null,{tabableHeader:!1,showHeader:!1,showFooter:!1,maintainOddEven:!0,cleanAddedRules:!0,addUiClasses:!0,highlightDuration:250,resizeThrottleDelay:a.defaultDelay,resizeThrottleMethod:"throttleDelayed",postscript:function(e,t){var n=this;(this._Row=function(e,t,n){this.id=e,this.data=t,this.element=n}).prototype.remove=function(){n.removeRow(this.element)},t&&(this.srcNodeRef=t=t.nodeType?t:f(t)),this.create(e,t)},listType:"list",create:function(t,n){var r,o=this.domNode=n||document.createElement("div");t&&(this.params=t,e.safeMixin(this,t),r=t.class||t.className||o.className),this.sort=this.sort||[],this._listeners=[],this._rowIdToObject={},this.postMixInProperties&&this.postMixInProperties(),this.id=o.id=o.id||this.id||b.autoIdPrefix+g++,this.buildRendering(),r&&m.call(this,r),this.postCreate(),delete this.srcNodeRef,this.domNode.offsetHeight&&this.startup()},buildRendering:function(){var e,i,l,c,d=this.domNode,u=this.addUiClasses,h=this;l=this.isRTL="rtl"===(document.body.dir||document.documentElement.dir||document.body.style.direction).toLowerCase(),d.className="",d.setAttribute("role","grid"),n.add(d,"dgrid dgrid-"+this.listType+(u?" ui-widget":"")),e=this.headerNode=r.create("div",{className:"dgrid-header dgrid-header-row"+(u?" ui-widget-header":"")+(this.showHeader?"":" dgrid-header-hidden")},d),i=this.bodyNode=r.create("div",{className:"dgrid-scroller"},d),s("ff")&&(i.tabIndex=-1),this.headerScrollNode=r.create("div",{className:"dgrid-header dgrid-header-scroll dgrid-scrollbar-width"+(u?" ui-widget-header":"")},d),this.footerNode=r.create("div",{className:"dgrid-footer"+(this.showFooter?"":" dgrid-footer-hidden")},d),l&&(d.className+=" dgrid-rtl"+(s("dom-rtl-scrollbar-left")?" dgrid-rtl-swap":"")),o(i,"scroll",function(t){h.showHeader&&(e.scrollLeft=t.scrollLeft||i.scrollLeft),t.stopPropagation(),o.emit(d,"scroll",{scrollTarget:i})}),this.configStructure(),this.renderHeader(),this.contentNode=this.touchNode=r.create("div",{className:"dgrid-content"+(u?" ui-widget-content":"")},this.bodyNode),"string"==typeof this.resizeThrottleMethod&&a[this.resizeThrottleMethod]?c=a[this.resizeThrottleMethod](_,this,this.resizeThrottleDelay):"function"==typeof this.resizeThrottleMethod?c=this.resizeThrottleMethod(t.hitch(this,_),this.resizeThrottleDelay):(console.warn("Invalid value specified for resizeThrottleMethod: "+this.resizeThrottleMethod),c=a.throttleDelayed(_,this,this.resizeThrottleDelay)),this._resizeHandle=o(window,"resize",c),this._listeners.push(this._resizeHandle)},postCreate:function(){},startup:function(){this._started||(this.inherited(arguments),this._started=!0,this.resize(),this.set("sort",this.sort))},configStructure:function(){},resize:function(){var e=this.bodyNode,t=this.headerNode,n=this.footerNode,r=t.offsetHeight,o=this.showFooter?n.offsetHeight:0;this.headerScrollNode.style.height=e.style.marginTop=r+"px",e.style.marginBottom=o+"px",c||(c=s("dom-scrollbar-width"),d=s("dom-scrollbar-height"),s("ie")&&(c++,d++),a.addCssRule(".dgrid-scrollbar-width","width: "+c+"px"),a.addCssRule(".dgrid-scrollbar-height","height: "+d+"px"),17!==c&&(a.addCssRule(".dgrid-header-row","right: "+c+"px"),a.addCssRule(".dgrid-rtl-swap .dgrid-header-row","left: "+c+"px")))},addCssRule:function(e,t){var n=a.addCssRule(e,t);return this.cleanAddedRules&&this._listeners.push(n),n},on:function(e,t){var n=o(this.domNode,e,t);return s("dom-addeventlistener")||this._listeners.push(n),n},cleanup:function(){var e;for(e in this._rowIdToObject)if(this._rowIdToObject[e]!==this.columns){var t=f(e,this.domNode);t&&this.removeRow(t,!0)}},destroy:function(){if(this._listeners){for(var e=this._listeners.length;e--;)this._listeners[e].remove();this._listeners=null}this._started=!1,this.cleanup(),r.destroy(this.domNode)},refresh:function(){this.cleanup(),this._rowIdToObject={},this._autoRowId=0,this.contentNode.innerHTML="",this.scrollTo({x:0,y:0})},highlightRow:function(e,t){var r="dgrid-highlight"+(this.addUiClasses?" ui-state-highlight":"");e=e.element||e,n.add(e,r),setTimeout(function(){n.remove(e,r)},t||this.highlightDuration)},adjustRowIndices:function(e){var t=e,n=t.rowIndex;if(n>-1)do{t.rowIndex>-1&&this.setRowIndex(t,n++,t.rowIndex)}while((t=t.nextSibling)&&t.rowIndex!==n)},renderArray:function(e,t,n){var r,o=this,i=(n=n||{}).start||0,s=document.createDocumentFragment(),a=[],l=0,c=e.length;for(t||(this._lastCollection=e);l<c;)a[l]=this.insertRow(e[l],s,null,i++,n),l++;return(r=t?t.parentNode:o.contentNode)&&r.parentNode&&(r!==o.contentNode||c)&&(r.insertBefore(s,t||null),c&&o.adjustRowIndices(a[c-1])),a},renderHeader:function(){},setRowIndex:function(e,t,r){if(e.rowIndex=t,this.maintainOddEven){var o=t%2==1?u:h;if(void 0!==r){var i=r%2==1?u:h;i!==o&&n.replace(e,i,o)}else n.add(e,o)}},_autoRowId:0,insertRow:function(e,t,n,r,o){var i=this.id+"-row-"+(this.collection&&this.collection.getIdentity?this.collection.getIdentity(e):this._autoRowId++),s=f(i,this.domNode),a=s&&s.previousSibling;return s&&(s===n&&(n=(n.connected||n).nextSibling),this.removeRow(s,!1,o)),(s=this.renderRow(e,o)).className=(s.className||"")+" dgrid-row "+(this.addUiClasses?" ui-state-default":""),this._rowIdToObject[s.id=i]=e,t.insertBefore(s,n||null),this.setRowIndex(s,r),a&&a.rowIndex!==s.rowIndex-1&&this.adjustRowIndices(a),s},renderRow:function(e){var t=document.createElement("div");return t.appendChild(document.createTextNode(e)),t},removeRow:function(e,t){e=e.element||e,delete this._rowIdToObject[e.id],t||r.destroy(e)},row:function(e){var t,n;if(e instanceof this._Row)return e;if(e.target&&e.target.nodeType&&(e=e.target),!e.nodeType)return"object"==typeof e?t=this.collection.getIdentity(e):(t=e,e=this._rowIdToObject[this.id+"-row-"+t]),new this._Row(t,e,f(this.id+"-row-"+t,this.domNode));do{var r=e.id;if(n=this._rowIdToObject[r])return new this._Row(r.substring(this.id.length+5),n,e);e=e.parentNode}while(e&&e!==this.domNode)},cell:function(e){return{row:this.row(e)}},_move:function(e,t,n,r){var o,i,s;s=i=e.element,t=t||1;do{if(o=i[t<0?"previousSibling":"nextSibling"]){do{if((i=o)&&(i.className+" ").indexOf(n+" ")>-1){s=i,t+=t<0?1:-1;break}}while(o=(!r||!i.hidden)&&i[t<0?"lastChild":"firstChild"])}else if(!(i=i.parentNode)||i===this.bodyNode||i===this.headerNode)break}while(t);return s},up:function(e,t,n){return e.element||(e=this.row(e)),this.row(this._move(e,-(t||1),"dgrid-row",n))},down:function(e,t,n){return e.element||(e=this.row(e)),this.row(this._move(e,t||1,"dgrid-row",n))},scrollTo:function(e){void 0!==e.x&&(this.bodyNode.scrollLeft=e.x),void 0!==e.y&&(this.bodyNode.scrollTop=e.y)},getScrollPosition:function(){return{x:this.bodyNode.scrollLeft,y:this.bodyNode.scrollTop}},get:function(e){var t="_get"+e.charAt(0).toUpperCase()+e.slice(1);return"function"==typeof this[t]?this[t].apply(this,[].slice.call(arguments,1)):(s("dojo-built")||"function"!=typeof this[t+"Attr"]||console.warn("dgrid: Use "+t+" instead of "+t+"Attr for getting "+e),this[e])},set:function(e,t){if("object"==typeof e)for(var n in e)this.set(n,e[n]);else{var r="_set"+e.charAt(0).toUpperCase()+e.slice(1);"function"==typeof this[r]?this[r].apply(this,[].slice.call(arguments,1)):(s("dojo-built")||"function"!=typeof this[r+"Attr"]||console.warn("dgrid: Use "+r+" instead of "+r+"Attr for setting "+e),this[e]=t)}return this},_getClass:y,_setClass:m,_getClassName:y,_setClassName:m,_setSort:function(e,t){this.sort="string"!=typeof e?e:[{property:e,descending:t}],this._applySort()},_applySort:function(){if(this.refresh(),this._lastCollection){var e=this.sort;if(e&&e.length>0){var t=e[0].property,n=!!e[0].descending;this._lastCollection.sort(function(e,r){var o=e[t],i=r[t];return void 0===o&&(o=""),void 0===i&&(i=""),o===i?0:o>i!==n?1:-1})}this.renderArray(this._lastCollection)}},_setShowHeader:function(e){var t=this.headerNode;this.showHeader=e,n.toggle(t,"dgrid-header-hidden",!e),this.renderHeader(),this.resize(),e&&(t.scrollLeft=this.getScrollPosition().x)},_setShowFooter:function(e){this.showFooter=e,n.toggle(this.footerNode,"dgrid-footer-hidden",!e),this.resize()}});return b.autoIdPrefix="dgrid_",b}.apply(null,r),void 0===o||(e.exports=o)},5602(e,t,n){var r,o;n.dj.r;r=[n(6345),n(1540),n(6850)],void 0===(o=function(e,t,n){return e([t,n],{})}.apply(null,r))||(e.exports=o)},6850(e,t,n){var r,o;n.dj.r;r=[n(4624),n(8301),n(6345),n(6323),n(28),n(2075),n(3534),n(1172),n(4975)],o=function(e,t,n,r,o,i,s,a,l){var c=0;function d(){return c++}function u(e){return e&&(e.className.indexOf("dgrid-row")>=0||e.className.indexOf("dgrid-loading")>=0)}function h(e){return e&&e.className.indexOf("dgrid-preload")>=0}return n([e,t],{minRowsPerPage:25,maxRowsPerPage:250,maxEmptySpace:1/0,bufferRows:10,farOffRemoval:2e3,queryRowsOverlap:0,pagingMethod:"debounce",pagingDelay:l.defaultDelay,keepScrollPosition:!1,rowHeight:0,_deleteQueue:[],postCreate:function(){this.inherited(arguments);var e=this;i(this.bodyNode,"scroll",l[this.pagingMethod](function(t){e._processScroll(t)},null,this.pagingDelay))},renderQuery:function(e,t){var n,i,a,l,c=this,u=t&&t.container||this.contentNode,h=0,f=t&&t.start||0;"level"in e&&(h=l=e.level),n={query:e,count:0,level:h,top:!1};var p={node:o.create("div",{className:"dgrid-preload",style:{height:"0"}},u),count:0,query:e,next:n,level:h,top:!0};(i=p.node).rowIndex=0,n.previous=p,a=n.node=o.create("div",{className:"dgrid-preload",style:{height:"0"}},u),p.id=d(),i.setAttribute("data-preloadid",p.id),n.id=d(),a.setAttribute("data-preloadid",n.id),a.rowIndex=this.minRowsPerPage,c._insertPreload(p);var v=o.create("div",{className:"dgrid-loading"},a,"before");return o.create("div",{className:"dgrid-below"},v).innerHTML=this.loadingMessage,t=r.mixin({start:0,count:this.minRowsPerPage},t),null!=l&&(t.queryLevel=l),this._trackError(function(){var r=e(t);return c.renderQueryResults(r,a,t).then(function(e){return r.totalLength.then(function(r){var l=e.length,d=a.parentNode;return c._rows&&!("queryLevel"in t)&&(c._rows.min=0,c._rows.max=l===r?1/0:l-1),o.destroy(v),"queryLevel"in t||(c._total=r),0===r&&d&&(c.noDataNode&&o.destroy(c.noDataNode),c._insertNoDataNode(d)),p.count=f,n.count=r-l-f,a.rowIndex=f+l,r?c._updatePreloadRowHeights(p):(a.style.display="none",i.style.display="none"),c._previousScrollPosition&&d&&d.offsetHeight&&(c.scrollTo(c._previousScrollPosition),delete c._previousScrollPosition),s(c._processScroll()).then(function(){return e})})}).otherwise(function(e){throw o.destroy(v),e})})},_insertPreload:function(e){var t=this.preload;if(t){for(;t.node.compareDocumentPosition(e.node)&Node.DOCUMENT_POSITION_PRECEDING;)if(null==(t=t.previous))return;for(;t.node.compareDocumentPosition(e.node)&Node.DOCUMENT_POSITION_FOLLOWING&&t.next;)t=t.next;t.previous.next=e,e.previous=t.previous;var n=e.next;n.next=t,t.previous=n}else this.preload=e},refresh:function(e){var t,n=this,r=e&&e.keepScrollPosition;if(void 0===r&&(r=this.keepScrollPosition),r&&(this._previousScrollPosition=this.getScrollPosition()),this.inherited(arguments),this._renderedCollection)return this.renderQuery(function(e){var r=n._renderedCollection.fetchRange({start:e.start,end:e.start+e.count});return r.then(function(e){t=e}),r}).then(function(){return n._emitRefreshComplete(),t})},resize:function(){this.inherited(arguments),this._processScroll()},cleanup:function(){this.inherited(arguments),this.preload=null},renderQueryResults:function(e){var t=this.inherited(arguments),n=this._getRenderedCollection(this.preload);return n&&n.releaseRange&&t.then(function(t){t[0]&&!t[0].parentNode.tagName&&e.totalLength.then(function(){n.releaseRange(t[0].rowIndex,t[t.length-1].rowIndex+1)})}),t},_getFirstRowSibling:function(e){return e.lastChild},_calcRowHeight:function(e){var t=e.nextSibling;return t&&!/\bdgrid-preload\b/.test(t.className)?t.offsetTop-e.offsetTop:e.offsetHeight},_calcAverageRowHeight:function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=this._calcRowHeight(e[r]);return t&&n?n/t:0},_updatePreloadRowHeights:function(){var e=this.preload,t=0;if(e){for(;e.previous;)e=e.previous;for(;e;)e.rowHeight||(e.rowHeight=this._calcAverageRowHeight(e.node.parentNode.querySelectorAll(".dgrid-row")),this._adjustPreloadHeight(e)),t=e?e.rowHeight:t,e=e.next;this.rowHeight=t}},lastScrollTop:0,_processScroll:function(e){var t,n=this.preload;if(this._updatePreloadRowHeights(),t=n&&n.rowHeight){var r,i,s,a=this,l=a.bodyNode,c=e&&e.scrollTop||this.getScrollPosition().y,d=l.offsetHeight+c,f=a.lastScrollTop,p=a.bufferRows*t,v=p-t,g=!0;for(a.lastScrollTop=c;n&&!n.node.offsetWidth;)n=n.previous;for(;n&&n!==r;){r=a.preload,a.preload=n;var m=(i=n.node).offsetTop;if(d+1+v<m)n=M(n,g=!1);else if(c-1-v>m+i.offsetHeight)n=M(n,g=!0);else{var y=((i.top?c-p:d)-m)/n.rowHeight,_=(d-c+2*p)/n.rowHeight,b=Math.max(Math.min((c-f)*n.rowHeight,a.maxRowsPerPage/2),a.maxRowsPerPage/-2);if(_+=Math.min(Math.abs(b),10),i.top&&(y-=_),(y=Math.max(y,0))<10&&y>0&&_+y<a.maxRowsPerPage&&(_+=Math.max(0,y),y=0),0===(_=Math.min(Math.max(_,a.minRowsPerPage),a.maxRowsPerPage,n.count))){n=M(n,g);continue}_=Math.ceil(_),y=Math.min(Math.floor(y),n.count-_);var w={};n.count-=_;var x,N=i,C=a.queryRowsOverlap,j=!n.top&&n;if(j)n.previous&&(E(n),y>0&&h(i.previousSibling)?(y=Math.min(n.count,y),n.previous.count+=y,a._adjustPreloadHeight(n.previous,!0),i.rowIndex+=y,C=0):_+=y,n.count-=y),w.start=i.rowIndex-C,w.count=Math.min(_+C,a.maxRowsPerPage),i.rowIndex=w.start+w.count;else n.next&&(N=i.nextSibling,E(n,!0),h(i.nextSibling)?(n.next.count+=n.count-y,n.next.node.rowIndex=y+_,a._adjustPreloadHeight(n.next),n.count=y,C=0,N=n.next.node):x=!0),w.start=n.count,w.count=Math.min(_+C,a.maxRowsPerPage),w.scrollingUp=!0;if(x&&N&&N.offsetWidth&&(x=N.offsetTop),a._adjustPreloadHeight(n),"level"in n.query&&(w.queryLevel=n.query.level),!("queryLevel"in w)&&(w.start>a._total||w.count<0))continue;var S=o.create("div",{className:"dgrid-loading",style:{height:_*n.rowHeight+"px"}},N,"before");o.create("div",{className:"dgrid-"+(j?"below":"above"),innerHTML:a.loadingMessage},S),S.count=_,a._trackError(function(){!function(e,t,r){var i=n.query(w);s=a.renderQueryResults(i,e,w).then(function(n){var s=a._rows;return s&&!("queryLevel"in w)&&n.length&&(t?(s.max<=s.min&&(s.min=n[0].rowIndex),s.max=n[n.length-1].rowIndex):(s.max<=s.min&&(s.max=n[n.length-1].rowIndex),s.min=n[0].rowIndex)),N=e.nextSibling,o.destroy(e),r&&N&&N.offsetWidth&&a.scrollTo({y:a.bodyNode.scrollTop+N.offsetTop-r}),i.totalLength.then(function(e){"queryLevel"in w||(a._total=e,a._rows&&a._rows.max>=a._total-1&&(a._rows.max=1/0)),t&&(t.count=e-t.node.rowIndex,a._adjustPreloadHeight(t))}),a._processScroll(),n},function(t){throw o.destroy(e),t})}(S,j,x)}),n=n.previous}}return s}function T(e,t){return t?e.node.offsetTop-d:c-(e.node.offsetTop+e.node.offsetHeight)}function E(e,t){var n=e;e=function(e,t){for(var n,r=t?"next":"previous";n=e[r];)e=n;return e}(e,t);var r,o,i=T(e,t),s=a.farOffRemoval,l=e.node,c=t?"previousSibling":"nextSibling",d=0,f=0;function p(){var r,o,s=function(){for(var n=!t,r=e;r=r[t?"previous":"next"];)if(n===r.top)return r}();if(s&&n!==s&&!h((o=s).top?o.node.nextSibling:o.node.previousSibling))return g(),l=(e=s).node,i=T(e,t),m(r=v(l)),r}function v(e){var t=h(e),n=e[c];return n&&(u(n)||(n=t&&h(n)?null:p()||v(n))),n}function g(){e.count+=d,t&&(l.rowIndex-=d),a._adjustPreloadHeight(e),d=0,a._releaseRange(e,t,r,o)}function m(e){r=e&&e.rowIndex,o=void 0}if(i>2*s){var y,_=v(l);for(m(_);(y=_)&&n!==e;){var b=a._calcRowHeight(y);f+b+s>i||!u(y)?_=p():(f+=b,d+=y.count||1,a._pruneRow(y,t),"rowIndex"in y&&(o=y.rowIndex),_=v(y))}g(),a._deleteNodeQueue()}}function M(e,t){do{e=t?e.next:e.previous}while(e&&!e.node.offsetWidth);return e}},_adjustPreloadHeight:function(e,t){e.node.style.height=this._calculatePreloadHeight(e,t)+"px"},_calculatePreloadHeight:function(e,t){return Math.min(e.count*e.rowHeight,t?1/0:this.maxEmptySpace)},_pruneRow:function(e,t,n){this.removeRow(e,!0,n),this._queueNodeForDeletion(e)},_queueNodeForDeletion:function(e){this._deleteQueue.push(e)},_deleteNodeQueue:function(){for(var e=document.createElement("div"),t=this._deleteQueue,n=t.length;n--;)e.appendChild(t[n]);this._deleteQueue=[],setTimeout(function(){o.destroy(e)},1)},_removePreloads:function(e){if(e&&e.length){var t=this,n=this._getHeadPreload();e.forEach(function(e){var r=t._findPreload(e,n);r&&(r.previous&&(r.previous.next=r.next),r.next&&(r.next.previous=r.previous))})}},_getHeadPreload:function(){var e=this.preload;if(e)for(;e.previous;)e=e.previous;return e},_findPreload:function(e,t){t||(t=this._getHeadPreload());for(var n=t;n;){if(n.node===e)return n;n=n.next}},_getRenderedCollection:function(){return this._renderedCollection},_releaseRange:function(e,t,n,r){if(e){var o=e.level,i=this._getRenderedCollection(e);null!=r&&i.releaseRange&&"number"==typeof n&&"number"==typeof r&&(t?i.releaseRange(r,n+1):i.releaseRange(n,r+1),this._rows&&!o&&(this._rows[t?"max":"min"]=r,this._rows.max>=this._total-1&&(this._rows.max=1/0)))}}})}.apply(null,r),void 0===o||(e.exports=o)},2348(e,t,n){var r,o;n.dj.r;r=[n(6345),n(6566),n(8945),n(8471),n(2075),n(2616),n.dj.h("touch?5892"),n(1172),n(2284)],o=function(e,t,n,r,o,i,s){i.add("dom-comparedocumentposition",function(e,t,n){return!!n.compareDocumentPosition}),i.add("dom-selectstart",void 0!==document.onselectstart);var a=i("mac")?"metaKey":"ctrlKey",l=i("css-user-select"),c=i("pointer"),d=c&&"MS"===c.slice(0,2),u=c?c+(d?"Down":"down"):"mousedown",h=c?c+(d?"Up":"up"):"mouseup";function f(e,t){for(var n=e.unselectable=t?"on":"",r=e.getElementsByTagName("*"),o=r.length;--o;)"INPUT"!==r[o].tagName&&"TEXTAREA"!==r[o].tagName&&(r[o].unselectable=n)}function p(e,n){var r=e.bodyNode,s=n?"text":i("ff")<21?"-moz-none":"none";l&&"msUserSelect"!==l?r.style[l]=s:i("dom-selectstart")?n||e._selectstartHandle?n&&e._selectstartHandle&&(e._selectstartHandle.remove(),delete e._selectstartHandle):e._selectstartHandle=o(r,"selectstart",function(e){var t=e.target&&e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&e.preventDefault()}):(f(r,!n),n||e._unselectableHandle?n&&e._unselectableHandle&&(e._unselectableHandle.remove(),delete e._unselectableHandle):e._unselectableHandle=t.after(e,"renderRow",function(e){return f(e,!0),e}))}return"WebkitUserSelect"===l&&void 0!==document.documentElement.style.msUserSelect&&(l=!1),e(null,{selectionDelegate:".dgrid-row",selectionEvents:u+","+h+",dgrid-cellfocusin",selectionTouchEvents:null,deselectOnRefresh:!0,allowSelectAll:!1,selection:{},selectionMode:"extended",allowTextSelection:void 0,_selectionTargetType:"rows",create:function(){return this.selection={},this.inherited(arguments)},postCreate:function(){this.inherited(arguments),this._initSelectionEvents();var e=this.selectionMode;this.selectionMode="",this._setSelectionMode(e)},destroy:function(){this.inherited(arguments),this._selectstartHandle&&this._selectstartHandle.remove(),this._unselectableHandle&&this._unselectableHandle.remove(),this._removeDeselectSignals&&this._removeDeselectSignals()},_setSelectionMode:function(e){e!==this.selectionMode&&(this.clearSelection(),this.selectionMode=e,this._selectionHandlerName="_"+e+"SelectionHandler",this._setAllowTextSelection(this.allowTextSelection))},_setAllowTextSelection:function(e){p(this,void 0!==e?e:"none"===this.selectionMode),this.allowTextSelection=e},_handleSelect:function(e,t){r.isRight(e)||!this[this._selectionHandlerName]||!this.allowSelect(this.row(t))||"dgrid-cellfocusin"===e.type&&"mousedown"===e.parentType||e.type===h&&t!==this._waitForMouseUp||(this._waitForMouseUp=null,this._selectionTriggerEvent=e,e.keyCode&&e.ctrlKey&&32!==e.keyCode||(!e.shiftKey&&e.type===u&&this.isSelected(t)?this._waitForMouseUp=t:this[this._selectionHandlerName](e,t)),this._selectionTriggerEvent=null)},_singleSelectionHandler:function(e,t){var n=e.keyCode?e.ctrlKey:e[a];this._lastSelected===t?this.select(t,null,!n||!this.isSelected(t)):(this.clearSelection(),this.select(t),this._lastSelected=t)},_multipleSelectionHandler:function(e,t){var n,r=this._lastSelected,o=e.keyCode?e.ctrlKey:e[a];e.shiftKey||(n=!o||null,r=null),this.select(t,r,n),r||(this._lastSelected=t)},_extendedSelectionHandler:function(e,t){!e[a]&&this.isSelected(t)&&1===this.getSelectedCount()||((2===e.button?this.isSelected(t):e.keyCode?e.ctrlKey:e[a])||this.clearSelection(null,!0),this._multipleSelectionHandler(e,t))},_toggleSelectionHandler:function(e,t){this.select(t,null,null)},_initSelectionEvents:function(){var e=this,n=this.contentNode,r=this.selectionDelegate;this._selectionEventQueues={deselect:[],select:[]},o(n,o.selector(r,this.selectionEvents),function(t){e._handleSelect(t,this)}),this.addKeyHandler&&this.addKeyHandler(32,function(t){e._handleSelect(t,t.target)}),this.allowSelectAll&&this.on("keydown",function(t){t[a]&&65===t.keyCode&&!/\bdgrid-input\b/.test(t.target.className)&&(t.preventDefault(),e[e.allSelected?"clearSelection":"selectAll"]())}),this._setCollection&&this._listeners.push(t.before(this,"_setCollection",function(t){e._updateDeselectionAspect(t)})),this._updateDeselectionAspect()},_updateDeselectionAspect:function(e){var n,r=this;function o(e,t){var n=r.row(e);n&&r.selection[n.id]&&r[t](n)}this._removeDeselectSignals&&this._removeDeselectSignals(),n=e&&e.track&&this._observeCollection?[t.before(this,"_observeCollection",function(e){n.push(e.on("delete",function(e){void 0===e.index&&o(e.id,"deselect")}))}),t.after(this,"_observeCollection",function(e){n.push(e.on("update",function(t){void 0!==t.index&&o(e.getIdentity(t.target),"select")}))},!0)]:[t.before(this,"removeRow",function(e,t){var n;t||(n=this.row(e))&&n.id in this.selection&&this.deselect(n)})],this._removeDeselectSignals=function(){for(var e=n.length;e--;)n[e].remove();n=[]}},allowSelect:function(){return!0},_fireSelectionEvent:function(e){var t,n=this._selectionEventQueues[e],r=this._selectionTriggerEvent;t={bubbles:!0,grid:this},r&&(t.parentType=r.type),t[this._selectionTargetType]=n,this._selectionEventQueues[e]=[],o.emit(this.contentNode,"dgrid-"+e,t)},_fireSelectionEvents:function(){var e,t=this._selectionEventQueues;for(e in t)t[e].length&&this._fireSelectionEvent(e)},_select:function(e,t,r){var o,i,s,a,l;if(void 0===r&&(r=!0),e.element||(e=this.row(e)),(!1===r||this.allowSelect(e))&&(i=!!(o=this.selection)[e.id],null===r&&(r=!i),s=e.element,r||this.allSelected?o[e.id]=r:delete this.selection[e.id],s&&(r?n.add(s,"dgrid-selected"+(this.addUiClasses?" ui-state-active":"")):n.remove(s,"dgrid-selected ui-state-active")),r!==i&&s&&this._selectionEventQueues[(r?"":"de")+"select"].push(e),t)){if(t.element||(t=this.row(t)),!t)return this._lastSelected=s,void console.warn("The selection range has been reset because the beginning of the selection is no longer in the DOM. If you are using OnDemandList, you may wish to increase farOffRemoval to avoid this, but note that keeping more nodes in the DOM may impact performance.");if(a=t.element)for((l=this._determineSelectionDirection(s,a))||(a=document.getElementById(a.id),l=this._determineSelectionDirection(s,a));e.element!==a&&(e=this[l](e));)this._select(e,null,r)}},_determineSelectionDirection:i("dom-comparedocumentposition")?function(e,t){var n=t.compareDocumentPosition(e);return!(1&n)&&(2===n?"down":"up")}:function(e,t){return!(t.sourceIndex<1)&&(t.sourceIndex>e.sourceIndex?"down":"up")},select:function(e,t,n){this._select(e,t,n),this._fireSelectionEvents()},deselect:function(e,t){this.select(e,t,!1)},clearSelection:function(e,t){for(var n in this.allSelected=!1,this.selection)e!==n&&this._select(n,null,!1);t||(this._lastSelected=null),this._fireSelectionEvents()},selectAll:function(){for(var e in this.allSelected=!0,this.selection={},this._rowIdToObject){var t=this.row(this._rowIdToObject[e]);this._select(t.id,null,!0)}this._fireSelectionEvents()},getSelectedCount:function(){var e=0;for(var t in this.selection)t&&(e+=1);return e},isSelected:function(e){return null!=e&&(e.element||(e=this.row(e)),e.id in this.selection?!!this.selection[e.id]:this.allSelected&&(!e.data||this.allowSelect(e)))},refresh:function(){return this.deselectOnRefresh&&this.clearSelection(),this._lastSelected=null,this.inherited(arguments)},renderArray:function(){var e,t,n,r=this.inherited(arguments),o=this.selection;for(e=0;e<r.length;e++)(n=(t=this.row(r[e])).id in o?o[t.id]:this.allSelected)&&this.select(t,null,n);return this._fireSelectionEvents(),r}})}.apply(null,r),void 0===o||(e.exports=o)},8301(e,t,n){var r,o;n.dj.r;r=[n(6345),n(6323),n(5625),n(6566),n(28),n(6356),n(2075),n(3534)],o=function(e,t,n,r,o,i,s,a){function l(e){if("object"!=typeof e)e=new Error(e);else if("cancel"===e.dojoType)return;s.emit(this.domNode,"dgrid-error",{grid:this,error:e,cancelable:!0,bubbles:!0})&&console.error(e)}return e(null,{collection:null,_renderedCollection:null,_rows:null,_observerHandle:null,_structureHandle:null,shouldTrackCollection:!0,getBeforePut:!0,noDataMessage:"",loadingMessage:"",_total:0,constructor:function(){this.dirty={},this._updating={},this._columnsWithSet={},this._structureHandle=r.before(this,"configStructure",t.hitch(this,function(){this._columnsWithSet={}}))},destroy:function(){this.inherited(arguments),this._structureHandle&&this._structureHandle.remove(),this._renderedCollection&&this._cleanupCollection(),this._refreshTimeout&&clearTimeout(this._refreshTimeout)},_configColumn:function(e){e.set&&(this._columnsWithSet[e.field]=e),this.inherited(arguments)},_setCollection:function(e){if(this._renderedCollection&&(this.cleanup(),this._cleanupCollection({shouldRevert:!e||e.storage!==this._renderedCollection.storage})),this.collection=e,this._started){if(e){var t=e;this.sort&&this.sort.length>0&&(t=e.sort(this.sort)),t.track&&this.shouldTrackCollection&&(t=t.track(),this._rows=[],this._observerHandle=this._observeCollection(t,this.contentNode,{rows:this._rows})),this._renderedCollection=t}this.refresh()}},_setStore:function(){this.collection||console.debug("set('store') call detected, but you probably meant set('collection')")},_getTotal:function(){return this._total},_cleanupCollection:function(e){e=e||{},this._observerHandle&&(this._observerHandle.remove(),this._observerHandle=this._rows=null),!1!==e.shouldRevert&&(this.dirty={}),this._renderedCollection=this.collection=null},_applySort:function(){this.collection?this.set("collection",this.collection):this.store&&console.debug("_StoreMixin found store property but not collection; this is often the sign of a mistake during migration from 0.3 to 0.4")},_emitRefreshComplete:function(){var e=this;this._refreshTimeout=setTimeout(function(){s.emit(e.domNode,"dgrid-refresh-complete",{bubbles:!0,cancelable:!1,grid:e}),e._refreshTimeout=null},0)},_insertNoDataNode:function(e){this._removeNoDataNode(),e=e||this.contentNode;var t=this.noDataNode=o.create("div",{className:"dgrid-no-data",innerHTML:this.noDataMessage});return e.insertBefore(t,this._getFirstRowSibling?this._getFirstRowSibling(e):null),t},_removeNoDataNode:function(){return!!this.noDataNode&&(o.destroy(this.noDataNode),delete this.noDataNode,!0)},row:function(){var e=this.inherited(arguments);return e&&e.data&&void 0!==e.id&&(e.id=this.collection.getIdentity(e.data)),e},refresh:function(){var e=this.inherited(arguments);return this.collection||this._insertNoDataNode(),e},refreshCell:function(e){if(!this.collection||!this._createBodyRowCell)throw new Error("refreshCell requires a Grid with a collection.");return this.inherited(arguments),this.collection.get(e.row.id).then(t.hitch(this,"_refreshCellFromItem",e))},_refreshCellFromItem:function(e,n,r){var i=e.element;o.empty(i);var s=this.dirty&&this.dirty[e.row.id];s&&(n=t.delegate(n,s)),this._cre