(function(){function f(a){a=a.getGrid();var b;a&&a._nativebar&&(b=a.frozen)&&b._syncFrozen()}var g=function(){var a=zk.feature.pe;return function(){return a&&zk.isLoaded("zkex.grid")}}(),h=zul.grid.Rows=zk.$extends(zul.Widget,{_visibleItemCount:0,$init:function(){this.$supers("$init",arguments);this._groupsInfo=[]},$define:{visibleItemCount:null},getGrid:function(){return this.parent},getGroupCount:function(){return this._groupsInfo.length},getGroups:function(){return this._groupsInfo.$clone()},hasGroup:function(){return this._groupsInfo.length},
bind_:function(a,b,d){this.$supers(h,"bind_",arguments);var c=this.getGrid();c&&(c.ebodyrows=this.$n());zWatch.listen({onResponse:this});var e=this;d.push(function(){e.stripe();f(e)})},unbind_:function(){zWatch.unlisten({onResponse:this});this.$supers(h,"unbind_",arguments)},onResponse:function(){this.desktop&&this._shallStripe&&(this.stripe(),this.getGrid().onSize(),this.getGrid()._afterCalcSize())},replaceChildHTML_:function(a,b,d,c,e){if(a._renderdefer){var k=this.getGrid().getOddRowSclass(),l=
jq(b).hasClass(k);this.$supers("replaceChildHTML_",arguments);l&&jq(a).addClass(k)}else this.$supers("replaceChildHTML_",arguments)},_syncStripe:function(){this._shallStripe=!0},stripe:function(){var a=this.getGrid().getOddRowSclass();if(a){var b=this.$n();if(b){for(var d=0,c=this.firstChild,e=!(this._offset&1);c;c=c.nextSibling,++d)if(c.isVisible()&&c.isStripeable_()){for(;b.rows[d]&&b.rows[d].id!=c.uuid;++d);jq(b.rows[d])[e?"removeClass":"addClass"](a);c.fire("onStripe");e=!e}this._shallStripe=
!1}}},onChildAdded_:function(a){this.$supers("onChildAdded_",arguments);g()&&a.$instanceof(zkex.grid.Group)&&this._groupsInfo.push(a);var b;if(b=this.getGrid())b.fixForRowAdd_&&b.fixForRowAdd_(),b._syncEmpty();this._syncStripe();this.desktop&&f(this);b&&b._cssflex&&b.isChildrenFlex()&&b._syncSize()},onChildRemoved_:function(a){this.$supers("onChildRemoved_",arguments);g()&&a.$instanceof(zkex.grid.Group)&&this._groupsInfo.$remove(a);this.childReplacing_||this._syncStripe();var b=this.getGrid();b&&
b._syncEmpty()},deferRedrawHTML_:function(a){a.push("<tbody",this.domAttrs_({domClass:1}),' class="z-renderdefer"></tbody>')}})})();
