text: //>>built
  require({cache:{"put-selector/put":function(){(function(w){var l,d=/[-+,> ]/;w([],l=function(m,p){function t(g){function q(){f&&(r&&f!=r)&&(r==g&&(c||(c=d.test(x)&&m.createDocumentFragment()))?c:r).insertBefore(f,A||null)}for(var c,n,A,r,f,k=arguments,b=k[0],C=0;C<k.length;C++){var x=k[C];if("object"==typeof x){n=!1;if(x instanceof Array){f=m.createDocumentFragment();for(var y=0;y<x.length;y++)f.appendChild(t(x[y]));x=f}if(x.nodeType)f=x,q(),r=x,A=0;else for(y in x)f[y]=x[y]}else if(n)n=!1,f.appendChild(m.createTextNode(x));
  else{1>C&&(g=null);n=!0;if(b=x.replace(u,function(b,c,d,y,s,n){c&&(q(),"-"==c||"+"==c?(r=(A=f||r).parentNode,f=null,"+"==c&&(A=A.nextSibling)):("\x3c"==c?r=f=(f||r).parentNode:(","==c?r=g:f&&(r=f),f=null),A=0),f&&(r=f));if((b=!d&&y)||!f&&(d||s))"$"==b?(b=k[++C],r.appendChild(m.createTextNode(b))):(b=b||t.defaultTag,(c=a&&k[C+1]&&k[C+1].name)&&(b="\x3c"+b+' name\x3d"'+c+'"\x3e'),f=e&&~(h=b.indexOf("|"))?m.createElementNS(e[b.slice(0,h)],b.slice(h+1)):m.createElement(b));if(d)if("$"==y&&(y=k[++C]),
  "#"==d)f.id=y;else if(c=(b=f.className)&&(" "+b+" ").replace(" "+y+" "," "),"."==d)f.className=b?(c+y).substring(1):y;else if("!"==x){var p;a?t("div",f,"\x3c").innerHTML="":(p=f.parentNode)&&p.removeChild(f)}else c=c.substring(1,c.length-1),c!=b&&(f.className=c);s&&("$"==n&&(n=k[++C]),"style"==s?f.style.cssText=n:(d="!"==s.charAt(0)?(s=s.substring(1))&&"removeAttribute":"setAttribute",n=""===n?s:n,e&&~(h=s.indexOf("|"))?f[d+"NS"](e[s.slice(0,h)],s.slice(h+1),n):f[d](s,n)));return""}))throw new SyntaxError("Unexpected char "+
  b+" in "+x);q();r=b=f||r}}g&&c&&g.appendChild(c);return b}d=p||d;var u=/(?:\s*([-+ ,<>]))?\s*(\.|!\.?|#)?([-\w%$|]+)?(?:\[([^\]=]+)=?['"]?([^\]'"]*)['"]?\])?/g,h,e=!1;m=m||document;var a="object"==typeof m.createElement;t.addNamespace=function(a,h){m.createElementNS?(e||(e={}))[a]=h:m.namespaces.add(a,h)};t.defaultTag="div";t.forDocument=l;return t})})(function(w,l,d){d=d||l;"function"===typeof define?define([],function(){return d()}):"undefined"==typeof window?require("./node-html")(module,d):put=
  d()})},"xstyle/has-class":function(){define(["dojo/has"],function(w){var l={};return function(){for(var d,m=arguments,p=0;p<m.length;p++)if(d=m[p],!l[d]){l[d]=!0;var t=d.match(/^(no-)?(.+?)((-[\d\.]+)(-[\d\.]+)?)?$/),u=w(t[2]),h=-t[4];if((0<h?h<=u&&(-t[5]||h)>=u:!!u)==!t[1])document.documentElement.className+=" has-"+d}}})},"xstyle/css":function(){define(["require"],function(w){function l(d,m,p){var l=document.documentElement;d=l.insertBefore(document.createElement(d),l.firstChild);d.id=m;m=(d.currentStyle||
  getComputedStyle(d,null))[p];l.removeChild(d);return m}return{load:function(d,m,p,t){function u(){var a=l("x-parse",null,"content");a&&"none"!=a?m([eval(a)],p):p()}var h=m.toUrl(d),e=m.cache&&m.cache["url:"+h];if(e)return e.xCss&&(e=e.cssText),w(["./util/createStyleSheet"],function(a){a(e)}),u();if("none"==l("div",d.replace(/\//g,"-").replace(/\..*/,"")+"-loaded","display"))return u();w(["./core/load-css"],function(a){a(h,u)})}}})},"dgrid/List":function(){define("dojo/_base/kernel dojo/_base/declare dojo/on dojo/has ./util/misc dojo/has!touch?./TouchScroll xstyle/has-class put-selector/put dojo/_base/sniff xstyle/css!./css/dgrid.css".split(" "),
  function(w,l,d,m,p,t,u,h){function e(b,a){var c=document.body,g;h(c,b,".dgrid-scrollbar-measure");g=b["offset"+a]-b["client"+a];h(b,"!dgrid-scrollbar-measure");c.removeChild(b);return g}function a(b){var a=b?"."+b.replace(f,"."):"";this._class&&(a="!"+this._class.replace(f,"!")+a);h(this.domNode,a);this._class=b}function g(){return this._class}function q(){return{x:this.bodyNode.scrollLeft,y:this.bodyNode.scrollTop}}function c(b){"undefined"!==typeof b.x&&(this.bodyNode.scrollLeft=b.x);"undefined"!==
  typeof b.y&&(this.bodyNode.scrollTop=b.y)}u("mozilla","opera","webkit","ie","ie-6","ie-6-7","quirks","no-quirks","touch");var n,A;m.add("dom-scrollbar-width",function(b,a,c){return e(c,"Width")});m.add("dom-scrollbar-height",function(b,a,c){return e(c,"Height")});var r=0,f=/ +/g,k=7>m("ie")&&!m("quirks")?function(){var b,a,c;if(this._started&&(b=document.documentElement,a=b.clientWidth,b=b.clientHeight,c=this._prevWinDims||[],c[0]!==a||c[1]!==b))this.resize(),this._prevWinDims=[a,b]}:function(){this._started&&
  this.resize()};return l(m("touch")?t:null,{tabableHeader:!1,showHeader:!1,showFooter:!1,maintainOddEven:!0,cleanAddedRules:!0,useTouchScroll:!0,cleanEmptyObservers:!0,highlightDuration:250,postscript:function(b,a){var c=this;(this._Row=function(b,a,c){this.id=b;this.data=a;this.element=c}).prototype.remove=function(){c.removeRow(this.element)};a&&(this.srcNodeRef=a=a.nodeType?a:document.getElementById(a));this.create(b,a)},listType:"list",create:function(b,c){var g=this.domNode=c||h("div"),e;b?(this.params=
  b,l.safeMixin(this,b),e=b["class"]||b.className||g.className,this._sort=b.sort||[],delete this.sort):this._sort=[];this.observers=[];this._numObservers=0;this._listeners=[];this._rowIdToObject={};this.postMixInProperties&&this.postMixInProperties();this.id=g.id=g.id||this.id||"dgrid_"+r++;this.buildRendering();e&&a.call(this,e);this.postCreate();delete this.srcNodeRef;this.domNode.offsetHeight&&this.startup()},buildRendering:function(){var b=this.domNode,a=this,c,g,e,f;f=this.isRTL="rtl"==(document.body.dir||
  document.documentElement.dir||document.body.style.direction).toLowerCase();b.className="";h(b,"[role\x3dgrid].ui-widget.dgrid.dgrid-"+this.listType);c=this.headerNode=h(b,"div.dgrid-header.dgrid-header-row.ui-widget-header"+(this.showHeader?"":".dgrid-header-hidden"));(m("quirks")||8>m("ie"))&&h(b,"div.dgrid-spacer");g=this.bodyNode=h(b,"div.dgrid-scroller");g.tabIndex=-1;this.headerScrollNode=h(b,"div.dgrid-header-scroll.dgrid-scrollbar-width.ui-widget-header");e=this.footerNode=h("div.dgrid-footer"+
  (this.showFooter?"":".dgrid-footer-hidden"));h(b,e);f&&(b.className+=" dgrid-rtl"+(m("webkit")?"":" dgrid-rtl-nonwebkit"));d(g,"scroll",function(h){a.showHeader&&(c.scrollLeft=h.scrollLeft||g.scrollLeft);h.stopPropagation();d.emit(b,"scroll",{scrollTarget:g})});this.configStructure();this.renderHeader();this.contentNode=this.touchNode=h(this.bodyNode,"div.dgrid-content.ui-widget-content");this._listeners.push(this._resizeHandle=d(window,"resize",p.throttleDelayed(k,this)))},postCreate:m("touch")?
  function(){this.useTouchScroll&&this.inherited(arguments)}:function(){},startup:function(){this._started||(this.inherited(arguments),this._started=!0,this.resize(),this.set("sort",this._sort))},configStructure:function(){},resize:function(){var b=this.bodyNode,a=this.headerNode,c=this.footerNode,g=a.offsetHeight,h=this.showFooter?c.offsetHeight:0,e=m("quirks")||7>m("ie");this.headerScrollNode.style.height=b.style.marginTop=g+"px";b.style.marginBottom=h+"px";e&&(b.style.height="",b.style.height=Math.max(this.domNode.offsetHeight-
  g-h,0)+"px",h&&(c.style.bottom="1px",setTimeout(function(){c.style.bottom=""},0)));n||(n=m("dom-scrollbar-width"),A=m("dom-scrollbar-height"),m("ie")&&(n++,A++),p.addCssRule(".dgrid-scrollbar-width","width: "+n+"px"),p.addCssRule(".dgrid-scrollbar-height","height: "+A+"px"),17!=n&&!e&&(p.addCssRule(".dgrid-header","right: "+n+"px"),p.addCssRule(".dgrid-rtl-nonwebkit .dgrid-header","left: "+n+"px")));e&&(a.style.width=b.clientWidth+"px",setTimeout(function(){a.scrollLeft=b.scrollLeft},0))},addCssRule:function(b,
  a){var c=p.addCssRule(b,a);this.cleanAddedRules&&this._listeners.push(c);return c},on:function(b,a){var c=d(this.domNode,b,a);m("dom-addeventlistener")||this._listeners.push(c);return c},cleanup:function(){var b=this.observers,a;for(a in this._rowIdToObject)if(this._rowIdToObject[a]!=this.columns){var c=document.getElementById(a);c&&this.removeRow(c,!0)}for(a=0;a<b.length;a++)(c=b[a])&&c.cancel();this.observers=[];this._numObservers=0;this.preload=null},destroy:function(){if(this._listeners){for(var b=
  this._listeners.length;b--;)this._listeners[b].remove();delete this._listeners}this.cleanup();h(this.domNode,"!");this.inherited(arguments)},refresh:function(){this.cleanup();this._rowIdToObject={};this._autoId=0;this.contentNode.innerHTML="";this.scrollTo({x:0,y:0})},newRow:function(b,a,c,g,e){if(a){var f=this.insertRow(b,a,c,g,e);h(f,".ui-state-highlight");setTimeout(function(){h(f,"!ui-state-highlight")},this.highlightDuration);return f}},adjustRowIndices:function(b){var a=b.rowIndex;if(-1<a){do-1<
  b.rowIndex&&(this.maintainOddEven&&-1<(b.className+" ").indexOf("dgrid-row ")&&h(b,"."+(1==a%2?"dgrid-row-odd":"dgrid-row-even")+"!"+(0==a%2?"dgrid-row-odd":"dgrid-row-even")),b.rowIndex=a++);while((b=b.nextSibling)&&b.rowIndex!=a)}},renderArray:function(b,a,c){function g(b){l=f.insertRow(b,r,null,d++,c);l.observerIndex=n;return l}function h(b){"undefined"!==typeof n&&(q[n].cancel(),q[n]=0,f._numObservers--);if(b)throw b;}function e(b){(m=a?a.parentNode:f.contentNode)&&m.parentNode&&(m!==f.contentNode||
  b.length)?(m.insertBefore(r,a||null),(l=b[b.length-1])&&f.adjustRowIndices(l)):q[n]&&f.cleanEmptyObservers&&h();return k=b}c=c||{};var f=this,d=c.start||0,q=this.observers,k,m,n;a||(this._lastCollection=b);b.observe&&(f._numObservers++,n=q.push(b.observe(function(b,g,h){var e,q,d;-1<g&&k[g]&&(e=k.splice(g,1)[0],e.parentNode==m&&((q=e.nextSibling)&&g!=h&&q.rowIndex--,f.removeRow(e)),f._processScroll&&f._processScroll());if(-1<h){if(k.length){if(d=k[h],!d&&(d=k[h-1]))d=(d.connected||d).nextSibling}else d=
  f._getFirstRowSibling&&f._getFirstRowSibling(m);e&&(d&&e.id===d.id)&&(d=(d.connected||d).nextSibling);d&&!d.parentNode&&(d=document.getElementById(d.id));e=a&&a.parentNode||d&&d.parentNode||f.contentNode;if(e=f.newRow(b,e,d,c.start+h,c))if(e.observerIndex=n,k.splice(h,0,e),!q||h<g)q=e.previousSibling,q=!q||q.rowIndex+1==e.rowIndex||0==e.rowIndex?e:q;c.count++}g!=h&&q&&f.adjustRowIndices(q);f._onNotification(k,b,g,h)},!0))-1);var r=document.createDocumentFragment(),l;if(b.map){if(k=b.map(g,console.error),
  k.then)return k.then(e,h)}else{k=[];for(var p=0,A=b.length;p<A;p++)k[p]=g(b[p])}return e(k)},_onNotification:function(b,a,c,g){},renderHeader:function(){},_autoId:0,insertRow:function(b,a,c,g,e){var h=e.parentId,h=this.id+"-row-"+(h?h+"-":"")+(this.store&&this.store.getIdentity?this.store.getIdentity(b):this._autoId++),f=document.getElementById(h),d=f&&f.previousSibling;f&&this.removeRow(f);f=this.renderRow(b,e);f.className=(f.className||"")+" ui-state-default dgrid-row "+(1==g%2?"dgrid-row-odd":
  "dgrid-row-even");this._rowIdToObject[f.id=h]=b;a.insertBefore(f,c||null);d&&this.adjustRowIndices(d);f.rowIndex=g;return f},renderRow:function(b,a){return h("div",""+b)},removeRow:function(b,a){b=b.element||b;delete this._rowIdToObject[b.id];a||h(b,"!")},row:function(b){var a;if(b instanceof this._Row)return b;b.target&&b.target.nodeType&&(b=b.target);if(b.nodeType){do{var c=b.id;if(a=this._rowIdToObject[c])return new this._Row(c.substring(this.id.length+5),a,b);b=b.parentNode}while(b&&b!=this.domNode)
  }else return"object"==typeof b?a=this.store.getIdentity(b):(a=b,b=this._rowIdToObject[this.id+"-row-"+a]),new this._Row(a,b,document.getElementById(this.id+"-row-"+a))},cell:function(b){return{row:this.row(b)}},_move:function(b,a,c,g){var f,e;e=f=b.element;a=a||1;do if(b=f[0>a?"previousSibling":"nextSibling"]){do if((f=b)&&-1<(f.className+" ").indexOf(c+" ")){e=f;a+=0>a?1:-1;break}while(b=(!g||!f.hidden)&&f[0>a?"lastChild":"firstChild"])}else if(f=f.parentNode,f===this.bodyNode||f===this.headerNode)break;
  while(a);return e},up:function(b,a,c){b.element||(b=this.row(b));return this.row(this._move(b,-(a||1),"dgrid-row",c))},down:function(b,a,c){b.element||(b=this.row(b));return this.row(this._move(b,a||1,"dgrid-row",c))},scrollTo:m("touch")?function(a){return this.useTouchScroll?this.inherited(arguments):c.call(this,a)}:c,getScrollPosition:m("touch")?function(){return this.useTouchScroll?this.inherited(arguments):q.call(this)}:q,get:function(a){var c="_get"+a.charAt(0).toUpperCase()+a.slice(1);return"function"===
  typeof this[c]?this[c].apply(this,[].slice.call(arguments,1)):this[a]},set:function(a,c){if("object"===typeof a)for(var g in a)this.set(g,a[g]);else g="_set"+a.charAt(0).toUpperCase()+a.slice(1),"function"===typeof this[g]?this[g].apply(this,[].slice.call(arguments,1)):this[a]=c;return this},_getClass:g,_setClass:a,_getClassName:g,_setClassName:a,_setSort:function(a,c){this._sort="string"!=typeof a?a:[{attribute:a,descending:c}];this.refresh();this._lastCollection&&(a.length&&("string"!=typeof a&&
  (c=a[0].descending,a=a[0].attribute),this._lastCollection.sort(function(g,f){var e=g[a],h=f[a];void 0===e&&(e="");void 0===h&&(h="");return e==h?0:e>h==!c?1:-1})),this.renderArray(this._lastCollection))},sort:function(a,c){w.deprecated("sort(...)",'use set("sort", ...) instead',"dgrid 0.4");this.set("sort",a,c)},_getSort:function(){return this._sort},_setShowHeader:function(a){var c=this.headerNode;this.showHeader=a;h(c,(a?"!":".")+"dgrid-header-hidden");this.renderHeader();this.resize();a&&(c.scrollLeft=
  this.getScrollPosition().x)},setShowHeader:function(a){w.deprecated("setShowHeader(...)",'use set("showHeader", ...) instead',"dgrid 0.4");this.set("showHeader",a)},_setShowFooter:function(a){this.showFooter=a;h(this.footerNode,(a?"!":".")+"dgrid-footer-hidden");this.resize()}})})},"dgrid/util/misc":function(){define(["put-selector/put"],function(w){var l=[],d,m,p,t=/([^A-Za-z0-9_\u00A0-\uFFFF-])/g,u={defaultDelay:15,throttle:function(h,e,a){var g=!1;a=a||u.defaultDelay;return function(){g||(g=!0,
  h.apply(e,arguments),setTimeout(function(){g=!1},a))}},throttleDelayed:function(h,e,a){var g=!1;a=a||u.defaultDelay;return function(){if(!g){g=!0;var d=arguments;setTimeout(function(){g=!1;h.apply(e,d)},a)}}},debounce:function(h,e,a){var g;a=a||u.defaultDelay;return function(){g&&(clearTimeout(g),g=null);var d=arguments;g=setTimeout(function(){h.apply(e,d)},a)}},each:function(h,e,a){var g,d;if(h)if("number"===typeof h.length){g=0;for(d=h.length;g<d;g++)e.call(a,h[g],g,h)}else for(g in h)e.call(a,
  h[g],g,h)},addCssRule:function(h,e){d||(d=w(document.getElementsByTagName("head")[0],"style"),d=d.sheet||d.styleSheet,m=d.deleteRule?"deleteRule":"removeRule",p=d.cssRules?"cssRules":"rules");var a=l.length;l[a]=(d.cssRules||d.rules).length;d.addRule?d.addRule(h,e):d.insertRule(h+"{"+e+"}",l[a]);return{get:function(g){return d[p][l[a]].style[g]},set:function(g,e){"undefined"!==typeof l[a]&&(d[p][l[a]].style[g]=e)},remove:function(){var g=l[a],e,c;if(void 0!==g){d[m](g);l[a]=void 0;e=a+1;for(c=l.length;e<
  c;e++)l[e]>g&&l[e]--}}}},escapeCssIdentifier:function(h){return h.replace(t,"\\$1")}};return u})},"dgrid/OnDemandList":function(){define("./List ./_StoreMixin dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/on ./util/misc put-selector/put".split(" "),function(w,l,d,m,p,t,u,h){return d([w,l],{minRowsPerPage:25,maxRowsPerPage:250,maxEmptySpace:Infinity,bufferRows:10,farOffRemoval:2E3,queryRowsOverlap:1,pagingMethod:"debounce",pagingDelay:u.defaultDelay,keepScrollPosition:!1,rowHeight:22,
  postCreate:function(){this.inherited(arguments);var e=this;t(this.bodyNode,"scroll",u[this.pagingMethod](function(a){e._processScroll(a)},null,this.pagingDelay))},renderQuery:function(e,a,g){function d(a){h(k,"!");if(a)throw c._refreshDeferred&&(c._refreshDeferred.reject(a),delete c._refreshDeferred),a;}var c=this,n={query:e,count:0,node:a,options:g},l=this.preload,r;if(!a){var f={node:h(this.contentNode,"div.dgrid-preload",{rowIndex:0}),count:0,query:e,next:n,options:g};f.node.style.height="0";n.node=
  a=h(this.contentNode,"div.dgrid-preload");n.previous=f}a.rowIndex=this.minRowsPerPage;l?((n.next=l.next)&&this.bodyNode.scrollTop>=l.node.offsetTop?n.previous=l:(n.next=l,n.previous=l.previous),n.previous.next=n,n.next.previous=n):this.preload=n;var k=h(a,"-div.dgrid-loading");h(k,"div.dgrid-below").innerHTML=this.loadingMessage;g=m.mixin(this.get("queryOptions"),g,{start:0,count:this.minRowsPerPage},"level"in e?{queryLevel:e.level}:null);this._trackError(function(){return r=e(g)});if("undefined"===
  typeof r)d();else return p.when(c.renderArray(r,a,g),function(b){return p.when("undefined"===typeof r.total?r.length:r.total,function(e){var f=b.length,d=a.parentNode,q=c.noDataNode;h(k,"!");"queryLevel"in g||(c._total=e);0===e&&(q&&(h(q,"!"),delete c.noDataNode),c.noDataNode=q=h("div.dgrid-no-data"),d.insertBefore(q,c._getFirstRowSibling(d)),q.innerHTML=c.noDataMessage);for(q=d=0;q<f;q++)d+=c._calcRowHeight(b[q]);f&&d&&(c.rowHeight=d/f);e-=f;n.count=e;a.rowIndex=f;e?a.style.height=Math.min(e*c.rowHeight,
  c.maxEmptySpace)+"px":a.style.display="none";c._previousScrollPosition&&(c.scrollTo(c._previousScrollPosition),delete c._previousScrollPosition);c._processScroll();c._refreshDeferred&&(c._refreshDeferred.resolve(r),delete c._refreshDeferred);return b},d)},d),r},refresh:function(e){var a=this,g=e&&e.keepScrollPosition,d;"undefined"===typeof g&&(g=this.keepScrollPosition);g&&(this._previousScrollPosition=this.getScrollPosition());this.inherited(arguments);if(this.store)return g=this._refreshDeferred=
  new p,d=a.renderQuery(function(c){return a.store.query(a.query,c)}),"undefined"===typeof d&&g.reject(),g.then(function(c){setTimeout(function(){t.emit(a.domNode,"dgrid-refresh-complete",{bubbles:!0,cancelable:!1,grid:a,results:c})},0);delete a._refreshDeferred;return c},function(c){delete a._refreshDeferred;throw c;})},resize:function(){this.inherited(arguments);this._processScroll()},_getFirstRowSibling:function(e){return e.lastChild},_calcRowHeight:function(e){var a=e.previousSibling;return(a=a&&
  !/\bdgrid-preload\b/.test(a.className)&&a)?e.offsetTop-a.offsetTop:e.offsetHeight},lastScrollTop:0,_processScroll:function(e){function a(a,b,e,f){var d=c.farOffRemoval,k=a.node;if(b>2*d){for(var q,m=k[e],n=0,l=0,p=[];q=m;){var r=c._calcRowHeight(q);if(n+r+d>b||0>m.className.indexOf("dgrid-row")&&0>m.className.indexOf("dgrid-loading"))break;m=q[e];n+=r;l+=q.count||1;c.removeRow(q,!0);p.push(q)}a.count+=l;f?(k.rowIndex-=l,g(a)):k.style.height=k.offsetHeight+n+"px";var s=h("div",p);setTimeout(function(){h(s,
  "!")},1)}}function g(a,b){a.node.style.height=Math.min(a.count*c.rowHeight,b?Infinity:c.maxEmptySpace)+"px"}function d(a,b){do a=b?a.next:a.previous;while(a&&!a.node.offsetWidth);return a}var c=this,n=c.bodyNode;e=e&&e.scrollTop||this.getScrollPosition().y;var l=n.offsetHeight+e,r,f,k=c.preload,b=c.lastScrollTop,t=c.bufferRows*c.rowHeight,x=t-c.rowHeight,u,w,H,I=!0;for(c.lastScrollTop=e;k&&!k.node.offsetWidth;)k=k.previous;for(;k&&k!=r;){r=c.preload;c.preload=k;f=k.node;var v=f.offsetTop;if(l+1+x<
  v)k=d(k,I=!1);else if(e-1-x>v+f.offsetHeight)k=d(k,I=!0);else{var s=((f.rowIndex?e-t:l)-v)/c.rowHeight,v=(l-e+2*t)/c.rowHeight,F=Math.max(Math.min((e-b)*c.rowHeight,c.maxRowsPerPage/2),c.maxRowsPerPage/-2),v=v+Math.min(Math.abs(F),10);0==f.rowIndex&&(s-=v);s=Math.max(s,0);10>s&&(0<s&&v+s<c.maxRowsPerPage)&&(v+=Math.max(0,s),s=0);v=Math.min(Math.max(v,c.minRowsPerPage),c.maxRowsPerPage,k.count);if(0==v)k=d(k,I);else{var v=Math.ceil(v),s=Math.min(Math.floor(s),k.count-v),z=m.mixin(c.get("queryOptions"),
  k.options);k.count-=v;var B=f,G,D=c.queryRowsOverlap;if(F=0<f.rowIndex&&k){var E=k.previous;E&&(a(E,e-(E.node.offsetTop+E.node.offsetHeight),"nextSibling"),0<s&&E.node==f.previousSibling?(s=Math.min(k.count,s),k.previous.count+=s,g(k.previous,!0),f.rowIndex+=s,D=0):v+=s,k.count-=s);z.start=f.rowIndex-D;z.count=Math.min(v+D,c.maxRowsPerPage);f.rowIndex=z.start+z.count}else k.next&&(a(k.next,k.next.node.offsetTop-l,"previousSibling",!0),B=f.nextSibling,B==k.next.node?(k.next.count+=k.count-s,k.next.node.rowIndex=
  s+v,g(k.next),k.count=s,D=0):G=!0),z.start=k.count,z.count=Math.min(v+D,c.maxRowsPerPage);G&&(B&&B.offsetWidth)&&(G=B.offsetTop);g(k);f=h(B,"-div.dgrid-loading[style\x3dheight:"+v*c.rowHeight+"px]");h(f,"div.dgrid-"+(F?"below":"above")).innerHTML=c.loadingMessage;f.count=v;"level"in k.query&&(z.queryLevel=k.query.level);if("queryLevel"in z||!(z.start>c._total||0>z.count)){var J=k.query(z);if(void 0===c._trackError(function(){return J})){h(f,"!");return}(function(a,b,e,f,d){H=p.when(c.renderArray(d,
  a,z),function(b){w=d;B=a.nextSibling;h(a,"!");if(f&&B&&B.offsetWidth){var k=c.getScrollPosition();c.scrollTo({x:k.x,y:k.y+B.offsetTop-f,preserveMomentum:!0})}p.when(d.total||d.length,function(a){"queryLevel"in z||(c._total=a);e&&(e.count=a-e.node.rowIndex,g(e))});c._processScroll();return b},function(b){h(a,"!");throw b;})}).call(this,f,n,F,G,J);k=k.previous}}}}if(H&&(u=this._refreshDeferred))delete this._refreshDeferred,p.when(H,function(){u.resolve(w)})},removeRow:function(e,a){if(e){var g=e.previousSibling,
  d=e.nextSibling,g=g&&(null!=g.observerIndex?g.observerIndex:g.previousObserverIndex),c=d&&(null!=d.observerIndex?d.observerIndex:d.nextObserverIndex),d=e.observerIndex;e.observerIndex=void 0;a&&(e.nextObserverIndex=c,e.previousObserverIndex=g);if(this.cleanEmptyObservers&&(-1<d&&d!==g&&d!==c)&&(g=this.observers,c=g[d]))c.cancel(),this._numObservers--,g[d]=0}this.inherited(arguments)}})})},"dgrid/_StoreMixin":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/Deferred dojo/on dojo/aspect put-selector/put".split(" "),
  function(w,l,d,m,p,t,u){function h(a){return a}function e(a){if("object"!==typeof a)a=Error(a);else if("cancel"===a.dojoType)return;a.grid=this;p.emit(this.domNode,"dgrid-error",{grid:this,error:a,cancelable:!0,bubbles:!0})&&console.error(a)}return l(null,{store:null,query:null,queryOptions:null,getBeforePut:!0,noDataMessage:"",loadingMessage:"",constructor:function(){this.query={};this.queryOptions={};this.dirty={};this._updating={};this._columnsWithSet={};t.before(this,"configStructure",d.hitch(this,
  function(){this._columnsWithSet={}}))},postCreate:function(){this.inherited(arguments);this.store&&this._updateNotifyHandle(this.store)},destroy:function(){this.inherited(arguments);this._notifyHandle&&this._notifyHandle.remove()},_configColumn:function(a){a.set&&(this._columnsWithSet[a.field]=a)},_updateNotifyHandle:function(a){this._notifyHandle&&(this._notifyHandle.remove(),delete this._notifyHandle);a&&"function"===typeof a.notify&&(this._notifyHandle=t.after(a,"notify",d.hitch(this,"_onNotify"),
  !0))},_setStore:function(a,g,d){this._updateNotifyHandle(a);this.store=a;this.dirty={};this.set("query",g,d)},_setQuery:function(a,g){var d=g&&g.sort;this.query=void 0!==a?a:this.query;this.queryOptions=g||this.queryOptions;d?this.set("sort",d):this.refresh()},setStore:function(a,d,e){w.deprecated("setStore(...)",'use set("store", ...) instead',"dgrid 0.4");this.set("store",a,d,e)},setQuery:function(a,d){w.deprecated("setQuery(...)",'use set("query", ...) instead',"dgrid 0.4");this.set("query",a,
  d)},_getQueryOptions:function(){var a=d.delegate(this.queryOptions,{});this._sort.length&&(a.sort=this._sort);return a},_getQuery:function(){var a=this.query;return"object"==typeof a&&null!=a?d.delegate(a,{}):a},_setSort:function(a,d){this.store&&(this._lastCollection=null);this.inherited(arguments)},_onNotify:function(a,d){this.inherited(arguments);a&&1>this._numObservers&&this.refresh({keepScrollPosition:!0})},insertRow:function(a,e,h,c,m){var l=this.store,p=this.dirty,l=l&&l.getIdentity(a),f;l in
  p&&!(l in this._updating)&&(f=p[l]);f&&(a=d.delegate(a,f));return this.inherited(arguments)},updateDirty:function(a,d,e){var c=this.dirty,h=c[a];h||(h=c[a]={});h[d]=e},setDirty:function(a,d,e){w.deprecated("setDirty(...)","use updateDirty() instead","dgrid 0.4");this.updateDirty(a,d,e)},save:function(){function a(a,f){return function(h){var k=d._columnsWithSet,l=d._updating,n,p;if("function"===typeof h.set)h.set(f);else for(n in f)h[n]=f[n];for(n in k)p=k[n].set(h),void 0!==p&&(h[n]=p);l[a]=!0;return m.when(e.put(h),
  function(){delete c[a];delete l[a]})}}var d=this,e=this.store,c=this.dirty,h=new m,l=h.promise,p=function(a){var c;return d.getBeforePut||!(c=d.row(a).data)?function(){return e.get(a)}:function(){return c}},f;for(f in c)var k=a(f,c[f]),l=l.then(p(f)).then(k);h.resolve();return l},revert:function(){this.dirty={};this.refresh()},_trackError:function(a){var g;"string"==typeof a&&(a=d.hitch(this,a));try{g=a()}catch(l){e.call(this,l)}return m.when(g,h,d.hitch(this,e))},newRow:function(){var a=this.inherited(arguments);
  this.noDataNode&&(u(this.noDataNode,"!"),delete this.noDataNode);return a},removeRow:function(a,d){var e={element:a};!d&&(this.noDataMessage&&this.up(e).element===a&&this.down(e).element===a)&&(this.noDataNode=u(this.contentNode,"div.dgrid-no-data"),this.noDataNode.innerHTML=this.noDataMessage);return this.inherited(arguments)}})})}}});define("dojorama/layers/dgrid-common",[],1);
  //@ sourceMappingURL=dgrid-common.js.map