var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,u,m){l instanceof String&&(l=String(l));for(var v=l.length,t=0;t<v;t++){var a=l[t];if(u.call(m,a,t,l))return{i:t,v:a}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,u,m){l!=Array.prototype&&l!=Object.prototype&&(l[u]=m.value)};
$jscomp.getGlobal=function(l){return"undefined"!=typeof window&&window===l?l:"undefined"!=typeof global&&null!=global?global:l};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(l,u,m,v){if(u){m=$jscomp.global;l=l.split(".");for(v=0;v<l.length-1;v++){var t=l[v];t in m||(m[t]={});m=m[t]}l=l[l.length-1];v=m[l];u=u(v);u!=v&&null!=u&&$jscomp.defineProperty(m,l,{configurable:!0,writable:!0,value:u})}};
$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(l,m){return $jscomp.findInternal(this,l,m).v}},"es6","es3");$jscomp.checkStringArgs=function(l,u,m){if(null==l)throw new TypeError("The 'this' value for String.prototype."+m+" must not be null or undefined");if(u instanceof RegExp)throw new TypeError("First argument to String.prototype."+m+" must not be a regular expression");return l+""};
$jscomp.polyfill("String.prototype.endsWith",function(l){return l?l:function(l,m){var v=$jscomp.checkStringArgs(this,l,"endsWith");l+="";void 0===m&&(m=v.length);m=Math.max(0,Math.min(m|0,v.length));for(var t=l.length;0<t&&0<m;)if(v[--m]!=l[--t])return!1;return 0>=t}},"es6","es3");
(function(){function l(a,b){var c=a.isSizedByContent(),d="min"==a._hflex;if(!a.head&&(d||c)){var e=zk(a.$n()).padBorderWidth(),f=m(a)+(zk(a.ebody).hasVScroll()?jq.scrollbarWidth():0)+e;e=a.ebodytbl;var g=a._minWd.wds,h=g.length;b&&d&&a.setFlexSize_({width:f},!0);if((e=e.firstChild)&&(e=e.firstChild)){b=e.firstChild;for(f=0;b&&f<h;b=b.nextSibling)b.style.width=jq.px(g[f++]);c&&!d&&(c=e.lastChild,a=a.uuid+"-bdflex",c&&c.id==a||jq(e).append('<td id="'+a+'"></td>'))}}}function u(a){if("min"==a._hflex){var b=
m(a),c=a.$n();a._hflexsz=b+zk(c).padBorderWidth();c.style.width=jq.px0(a._hflexsz)}}function m(a){a._calcMinWds();var b=a.ebdfaker,c=[],d=a._minWd.wds;if(a.head&&b){var e=0;a=a.head.firstChild;for(var f=b.firstChild,g=0;a;a=a.nextSibling)b="min"==a._hflex?c[g]=d[g]+zk(a.$n()).padBorderWidth():a._width&&0<a._width.indexOf("px")?c[g]=zk.parseInt(a._width):c[g]=zk.parseInt(f.style.width),a._origWd=jq.px0(b),e+=b,++g,f=f.nextSibling}else e=a._minWd.width;return e}function v(a){if(a=(a=a.getBodyWidgetIterator().next())?
a.$n():null){for(var b=a,c,d=b.cells.length;a;a=a.nextSibling)(c=a.cells.length)>d&&(b=a,d=c);return b}}var t;zul.mesh.MeshWidget=zk.$extends(zul.Widget,{_rows:0,_pagingPosition:"bottom",_prehgh:-1,_minWd:null,$init:function(){this.$supers("$init",arguments);this.heads=[]},_innerWidth:"100%",_currentTop:0,_currentLeft:0,$define:{rows:function(a){this._rows&&!this._rowsOnFitSize&&(zWatch.listen({onFitSize:this}),this._rowsOnFitSize=!0);if(a=this.$n())a._lastsz=null,this.onSize()},pagingPosition:_zkf=
function(){this.rerender()},sizedByContent:_zkf,span:function(a){var b=!0===a||"true"==a,c=!1===a||"false"==a;this._span=b?!0:c?!1:a;a=b?-65500:c?0:zk.parseInt(a)+1;this._nspan=0>a&&-65500!=a?0:a;this.rerender()},autopaging:_zkf,paginal:null,model:null,innerWidth:function(a){null==a&&(this._innerWidth=a="100%");this.eheadtbl&&(this.eheadtbl.style.width=a);this.ebodytbl&&(this.ebodytbl.style.width=a);this.efoottbl&&(this.efoottbl.style.width=a)}},getPageSize:function(){return(this.paging||this._paginal).getPageSize()},
setPageSize:function(a){(this.paging||this._paginal).setPageSize(a)},getPageCount:function(){return(this.paging||this._paginal).getPageCount()},getActivePage:function(){return(this.paging||this._paginal).getActivePage()},setActivePage:function(a){(this.paging||this._paginal).setActivePage(a)},inPagingMold:function(){return"paging"==this.getMold()},setHeight:function(a){this.$supers("setHeight",arguments);this.desktop&&(this._setHgh(a),this.onSize())},setWidth:function(a){this.$supers("setWidth",arguments);
this.eheadtbl&&(this.eheadtbl.style.width="");this.efoottbl&&(this.efoottbl.style.width="");if(this.desktop)this.onSize()},setStyle:function(a){if(this._style!=a&&(this.$supers("setStyle",arguments),this.desktop))this.onSize()},getHeadWidget:function(){return this.head},getFocusCell:function(a){var b;jq([this.ebodytbl,this.eheadtbl,this.efoottbl]).each(function(c){if(this&&jq.isAncestor(this,a)){var d=jq(a).parents(1==c?"th":"td");c=0;for(var e=d.length;c<e;c++)if(b=d[c],jq(b).parents("table")[0]==
this)return!1}});return b},_moveToHidingFocusCell:function(a){var b=this.ehdfaker?this.ehdfaker.childNodes[a]:null,c=this.frozen;if(b&&c&&0==zk.parseInt(b.style.width)&&0<=(a-=c.getColumns())){if(this._nativebar)c.setStart(a);else if(b=this._scrollbar)c._doScrollNow(a),b.setBarPosition(a);t=!0}},_restoreFocus:function(){t&&zk.currentFocus&&(t=!1,zk.currentFocus.focus())},disableAutoSizing_:function(){this._span=!1;this._nspan=0;this._sizedByContent=!1},bind_:function(){this.$supers(zul.mesh.MeshWidget,
"bind_",arguments);this._bindDomNode();if(this.frozen||zk.ie)this._cssflex=!1;this._cssflex&&this.isChildrenFlex()?this.ehdfaker.style.display="none":"min"!=this._hflex&&this._fixHeaders();this.ehead&&this.domListen_(this.ehead,"onScroll","_doSyncScroll");var a=this.ebody;this._nativebar&&a&&(this.domListen_(a,"onScroll","_doScroll"),a.style.overflow="auto",this.efrozen&&jq(a).css("overflow-x","hidden"));zWatch.listen({onSize:this,onResponse:this})},unbind_:function(){this._rowsOnFitSize&&(zWatch.unlisten({onFitSize:this}),
delete this._rowsOnFitSize);zWatch.unlisten({onSize:this,onResponse:this});this.ehead&&this.domUnlisten_(this.ehead,"onScroll","_doSyncScroll");var a=this.ebody;this._nativebar&&a&&(this.domUnlisten_(a,"onScroll","_doScroll"),this.efrozen&&jq(a).css("overflow-x","auto"));this.$supers(zul.mesh.MeshWidget,"unbind_",arguments)},clearCache:function(){this.$supers("clearCache",arguments);this.ebody=this.ehead=this.efoot=this.efrozen=this.ebodytbl=this.eheadtbl=this.efoottbl=this.ebodyrows=this.ehdfaker=
this.ebdfaker=null},syncSize:function(){this.desktop&&(this.clearCachedSize_(),"min"==this._hflex?zFlex.onFitSize.apply(this):this._fixHeaders(),zWatch.fireDown("onSize",this))},onResponse:function(){this._shallSize&&(this.syncSize(),this._shallSize=!1)},_syncSize:function(){this.desktop&&(this._shallSize=!0)},_fixHeaders:function(a){if(this.head&&this.ehead&&(!this._cssflex||!this.isChildrenFlex())){for(var b=!0,c=!1,d="min"==this._hflex||this.isSizedByContent(),e=this.heads.length;0<e--;){for(var f=
this.heads[e],g=!0,h=0,k=f.firstChild;k;k=k.nextSibling){var p=this.ehdfaker.childNodes[h++];d&&p&&!p.style.width&&!k._nhflex&&(k._hflex="min",k._nhflex=-65500,k._nhflexbak=!0);!c&&k._nhflex&&(c=!0);if(k.getLabel()||k.getImage()||k.nChildren)b=g=!1}f._visible&&(k=f.$n())&&(k.style.display=g?"none":"")}d=this.ehead.style.display;a=a&&c&&this.isRealVisible();this.ehead.style.display=b?"none":"";for(k=this.head.firstChild;k;k=k.nextSibling)a&&k._nhflex&&k.fixFlex_(),k._nhflexbak&&(delete k._hflex,delete k._nhflex,
delete k._nhflexbak);return d!=this.ehead.style.display}},_adjFlexWd:function(){var a=this.head;if(a){var b=this.ebdfaker,c=this.ehdfaker.firstChild,d=b.firstChild,e=this.eftfaker;if(e)var f=e.firstChild;this.eheadtbl.style.width="";this.ebodytbl.style.width="";e=0;for(var g={},h=a.firstChild;h&&d;h=h.nextSibling)g[h.uuid]=h.$n().offsetWidth,d=d.nextSibling;d=b.firstChild;h=a.firstChild;for(var k;h&&d;h=h.nextSibling)a=g[h.uuid],h.isVisible()&&.1<a&&(h._origWd=jq.px0(a)),h.isVisible()&&void 0!==(k=
h._hflexWidth)&&(a=zk(d).revisedWidth(Math.round(k)),b=jq.px0(a),h._origWd=b,d.style.width=b,c.style.width=b,f&&(f.style.width=b),e+=a),d=d.nextSibling,c=c.nextSibling,f&&(f=f.nextSibling);this._isAllWidths()&&(c=this.eheadtbl,d=this.ebodytbl,f=this.efoottbl,c&&(e=jq.px0(e),c.style.width=e,d&&(d.style.width=e),f&&(f.style.width=e)));u(this);this._afterCalcSize()}},_bindDomNode:function(){this.ehead=this.$n("head");this.eheadtbl=this.$n("headtbl");this.ebody=this.$n("body");this.ebodytbl=this.$n("cave");
this.efoot=this.$n("foot");this.efoottbl=this.$n("foottbl");this.efrozen=this.$n("frozen");var a=this.$n("rows");this.ebody&&a&&(this.ebodyrows=a);this.ehead&&(this.eheadrows=this.$n("headrows"),this.ehdfaker=this.head.$n("hdfaker"),this.ebdfaker=this.head.$n("bdfaker"),this.efoot&&(this.eftfaker=this.head.$n("ftfaker")));this.efoot&&(this.efootrows=this.$n("footrows"))},replaceHTML:function(){var a=this._syncingbodyrows;this._syncingbodyrows=!0;try{this.$supers(zul.mesh.MeshWidget,"replaceHTML",
arguments)}finally{this._syncingbodyrows=a}},replaceChildHTML_:function(){var a=this._syncingbodyrows;this._syncingbodyrows=!0;try{this.$supers("replaceChildHTML_",arguments)}finally{this._syncingbodyrows=a}},fireOnRender:function(a){this._pendOnRender||(this._pendOnRender=!0,setTimeout(this.proxy(this._onRender),a?a:100))},_doScroll:function(){var a=zul.mesh.Scrollbar.getScrollPosV(this),b=zul.mesh.Scrollbar.getScrollPosH(this),c=b!=this._currentLeft,d=a!=this._currentTop||c,e=this.ebody,f=this.ehead,
g=this.efoot;jq(this).data("scrollable")&&zWatch.fireDown("onScroll",this);d&&!this.fire("onScroll",e.scrollLeft).stopped&&this._nativebar&&this._currentLeft!=e.scrollLeft&&(f&&(f.scrollLeft=e.scrollLeft),g&&(g.scrollLeft=e.scrollLeft));d&&(this._currentTop=a);d&&(this._currentLeft=b);this.paging||this._paginal||this.fireOnRender(zk.gecko?200:60);d&&this._fireOnScrollPos();this.frozen&&c&&this.frozen.syncScrollByParentBody()},_doSyncScroll:function(){var a=this.ehead,b=this.ebody,c=this.efoot;a&&
zk(a).isVisible()&&this._currentLeft!=a.scrollLeft&&(b&&(b.scrollLeft=a.scrollLeft),c&&(c.scrollLeft=a.scrollLeft))},_timeoutId:null,_fireOnScrollPos:function(a){clearTimeout(this._timeoutId);this._timeoutId=setTimeout(this.proxy(this._onScrollPos),0<=a?a:300)},_onScrollPos:function(){this.ebody&&(this._currentTop=zul.mesh.Scrollbar.getScrollPosV(this),this._currentLeft=zul.mesh.Scrollbar.getScrollPosH(this),this.fire("onScrollPos",{top:this._currentTop,left:this._currentLeft}))},_onRender:function(){if(this.$n()){this._pendOnRender=
!1;if(this._syncingbodyrows||zAu.processing())return this.fireOnRender(zk.gecko?200:60),!0;var a=this.ebodyrows?this.ebodyrows.rows:null;if(this.inPagingMold()&&this._autopaging&&a&&a.length){a:{var b=this.ebody;if(b){var c=b.offsetHeight;zk(b).hasHScroll()&&(c-=jq.scrollbarWidth());if(c==this._prehgh)c=!1;else{this._prehgh=c;b=this.ebodytbl;var d=b.offsetParent,e=b.offsetTop,f=0;b=0;for(var g=this.getBodyWidgetIterator({skipHidden:!0}),h=a.length;g.next()&&b<h;b++){var k=a[b];var p=k.offsetTop-(k.offsetParent==
d?e:0);if(p>c){--b;break}f=p}if(k&&(d=this.$n("pgib"),e=0,d&&(e=d.offsetHeight),d=c+e,p<=d&&(p=(this.paging?this.paging:this.getPaginal()).getTotalSize(),k=f+k.offsetHeight,c=Math.floor(b*c/k),k=Math.floor(b*d/k),b=p>k?c:k),0==b&&(b=1),b!=this.getPageSize())){this.fire("onPageSize",{size:b});c=!0;break a}c=void 0}}else c=void 0}if(c)return}zk.ie9&&void 0!==this._wsbak&&(this.$n().style.whiteSpace=this._wsbak,delete this._wsbak);if(this.desktop&&this._model&&a&&a.length&&(c=[],k=zul.mesh.Scrollbar.getScrollPosV(this),
b=k+this.ebody.offsetHeight,0!=k||0!=b)){p=0;f=this.getBodyWidgetIterator({skipHidden:!0});for(a=a.length;(d=f.next())&&p<a;p++)if(!(d._loaded||(e=d.$n(),null==e||(e=zk(e),g=e.offsetTop(),g+e.offsetHeight()<k)))){if(g>b)break;c.push(d)}c.length&&this.fire("onRender",{items:c},{implicit:!0})}}},onSize:function(){var a=zUtl.getDevicePixelRatio();if(this.isRealVisible()){var b=this.$n();b._lastsz&&b._lastsz.height==b.offsetHeight&&b._lastsz.width==b.offsetWidth&&this._lastDevicePixelRatio==a?this.fireOnRender(155):
(this._lastDevicePixelRatio=a,this._calcSize(),this.fireOnRender(155),this._nativebar&&(a=this.ebody,a.scrollHeight>=this._currentTop&&!this._adjustScrollTopLater&&(a.scrollTop=this._currentTop),a.scrollWidth>=this._currentLeft&&(a.scrollLeft=this._currentLeft,this.ehead&&(this.ehead.scrollLeft=this._currentLeft),this.efoot&&(this.efoot.scrollLeft=this._currentLeft))),this._shallSize=!1,this._keepScroll&&this._scrollToIndex(this._targetIndex))}},_vflexSize:function(){var a=this.$n(),b=0;if(this.paging){var c=
this.$n("pgit"),d=this.$n("pgib");c&&(b+=c.offsetHeight);d&&(b+=d.offsetHeight)}a=zk(a).contentHeight()-(this.ehead?this.ehead.offsetHeight:0)-(this.efoot?this.efoot.offsetHeight:0)-b;return this.frozen&&this._nativebar?a-this.efrozen.offsetHeight:a},setFlexSize_:function(a,b){if(!this._cssflex||null==this.parent.getFlexContainer_()||b){var c=this.$n(),d=this.$n("head");if(void 0!==a.height)if("auto"==a.height)c.style.height="",d&&(d.style.height="");else return this.$supers("setFlexSize_",arguments);
if(void 0!==a.width)if("auto"==a.width)"min"!=this._hflex&&(c.style.width=""),d&&(d.style.width="");else return this.$supers("setFlexSize_",arguments)}},_setHgh:function(a){var b=this.$n(),c=this.ebody.style;this.isVflex()||a&&"auto"!=a&&0>a.indexOf("%")?zk.webkit&&c.height==jq.px(this._vflexSize())||(c.height="",a=this._vflexSize(),0>a&&(a=0),"min"!=this._vflex&&(c.height=a+"px")):(c.height="",b.style.height=a)},_ignoreHghExt:function(){return!1},_calcSize:function(){this._beforeCalcSize();var a=
this.$n(),b=zk(a).contentWidth(),c=this.isSizedByContent(),d=this.ehead,e=this.ebody,f=this.ebodyrows,g=this.efoot,h=this.efootrows;zk.ie9_&&e&&b&&(e.style.width=b+"px");if(d)b&&(d.style.width=b+"px",e&&(e.style.width=b+"px"),g&&(g.style.width=b+"px")),c&&f?this._adjHeadWd():b&&g&&(g.style.width=b+"px");else if(g&&(b&&(g.style.width=b+"px"),h&&f&&(b=this.efootrows.rows[0],f=this.ebodyrows.rows,b&&f&&f.length&&b.cells.length))){g=b.cells.length;e=d=0;h=this.getBodyWidgetIterator({skipHidden:!0});for(var k;k=
h.next();)if(!this._modal||k._loaded){k=f[e++];var p=zk(k),F=k.cells,q=p.ncols();if((p=F.length==q&&p.isVisible())&&q>=g){d=g;var w=k;break}q>d?(w=p?k:null,d=q):q==d&&!w&&p&&(w=k)}if(d){if(g=!w){w=document.createElement("TR");w.style.height="0px";for(e=0;e<d;++e)w.appendChild(document.createElement("TD"));f[0].parentNode.appendChild(w)}for(e=d;e--;)b.cells[e].style.width="";f=0;for(e=d;e--;)h=b.cells[e],k=w.cells[e],zk.opera?(f+=k.offsetWidth,h.style.width=zk(k).contentWidth()):(h.style.width=k.offsetWidth+
"px",1<d&&(q=k.offsetWidth-h.offsetWidth,0!=q&&(q+=k.offsetWidth,0>q&&(q=0),h.style.width=q+"px")));zk.opera&&this.isSizedByContent()&&(b.parentNode.parentNode.style.width=f+"px");g&&w.parentNode.removeChild(w)}}this._adjSpanWd();l(this,!0);c&&this.getRows&&1<this.getRows()&&"function"==typeof this._calcHgh&&this.ebody.style.height&&this._calcHgh();a._lastsz={height:a.offsetHeight,width:a.offsetWidth};this._afterCalcSize()},_beforeCalcSize:function(){var a=this.ebody;this._nativebar||!a.scrollLeft&&
!a.scrollTop||(this._ebodyScrollPos={l:a.scrollLeft,t:a.scrollTop});this._calcHgh()},_afterCalcSize:function(){var a;var b=this._cssflex&&this.isChildrenFlex();this._ebodyScrollPos&&(this.ebody.scrollLeft=this._ebodyScrollPos.l,this.ebody.scrollTop=this._ebodyScrollPos.t,this._ebodyScrollPos=null);var c=this._isAllWidths();var d=(a=this.head)?a.$n("hdfaker-bar"):null,e=a?jq(this).find("."+a.$s("bar"))[0]:null,f=this.eftfaker?this.head.$n("ftfaker-bar"):null,g=jq.scrollbarWidth(),h=zk(this.ebody).hasVScroll();
if(h)d&&(b&&e?e.style.flex="0 1 "+g+"px":d.style.width=g+"px"),f&&(f.style.width=g+"px");else{var k=this.$class.WIDTH0;d&&(b&&e?e.style.flex="0 1 "+k+"px":d.style.width=k);f&&(f.style.width=k)}if(b)a.afterChildrenFlex_();else if(c){if(a=this.eheadtbl,c=this.ebodytbl,b=this.efoottbl,a){e=0;for(f=this.ehdfaker.firstChild;f;f=f.nextSibling)"none"==f.style.display||f.id.endsWith("hdfaker-bar")||(e+=zk.parseInt(f.style.width));if(0<e)a.style.width=d&&h&&(zk.chrome||zk.safari)&&!zk.edge?e+g+"px":e+"px",
c&&(c.style.width=e+"px"),b&&(b.style.width=e+"px");else{g=!0;for(h=this.head.firstChild;h;h=h.nextSibling)if(h.isVisible()){g=!1;break}g&&(a.style.visibility="hidden",c&&(c.style.visibility="hidden"),b&&(b.style.visibility="hidden"))}}}else this.frozen&&(e=this.ehead,a=this.eheadtbl,f=this.ebody,c=this.ebodytbl,d=this.efoot,b=this.efoottbl,e&&a&&(a.style.width=e.style.width),f&&c&&(a=f.style.width,c.style.width=h?jq.px0(parseInt(a)-g):a),d&&b&&(b.style.width=d.style.width),this.frozen._smooth||this._syncFaker())},
_syncFaker:function(){var a=this.head;if(a){for(var b=a.nChildren,c=zul.mesh.MeshWidget.WIDTH0,d=this.ebodytbl.clientWidth,e=0,f=0,g=a.firstChild,h=this.ehdfaker.firstChild;f<b;g=g.nextSibling,h=h.nextSibling,f++){var k=h.style.width;if(""==k)return;var p=(p=k==c)?parseFloat(g._origWd):parseFloat(k);g.getWidth()||g.getHflex()?d-=p:e+=p}if(!(1>Math.abs(d-e)))for(f=0,g=a.firstChild,h=this.ehdfaker.firstChild;f<b;g=g.nextSibling,h=h.nextSibling,f++)g.getWidth()||g.getHflex()||(k=h.style.width,a=d/e,
(p=k==c)?g._origWd=jq.px0(parseFloat(g._origWd)*a):(p=jq.px0(parseFloat(k)*a),k=g.$n("bdfaker"),a=g.$n("ftfaker"),h.style.width=p,k&&(k.style.width=p),a&&(a.style.width=p)))}},_isAllWidths:function(){if(this.isSizedByContent()&&this.ebodyrows&&this.ebodyrows.firstChild)return!0;if(!this.head)return!1;for(var a=!0,b=this.head.firstChild;b;b=b.nextSibling)if(a&&(void 0==b._width||0>=b._width.indexOf("px"))&&("min"!=b._hflex||void 0===b._hflexsz)&&b.isVisible()){a=!1;break}return a},domFaker_:function(a,
b){var c=this.head;a.push('<colgroup id="',c.uuid,b,'">');for(var d=c.firstChild;d;d=d.nextSibling){var e=this.$class._getWidth(d,d._hflexWidth?d._hflexWidth+"px":d.getWidth()),f=d.isVisible()?"":"visibility: collapse;";e=null!=e?"width: "+e+";":"";a.push('<col id="',d.uuid,b,'" style="',e,f,'"/>')}(0<b.indexOf("hd")||0<b.indexOf("ft"))&&a.push('<col id="',c.uuid,b,'-bar" style="width: 0px" />');a.push("</colgroup>")},onChildAdded_:function(a){this.$supers("onChildAdded_",arguments);if(a.$instanceof(this.getHeadWidgetClass()))this.head=
a,this._minWd=null;else if(!a.$instanceof(zul.mesh.Auxhead))return;var b=a.nextSibling;if(b)for(var c=this.heads,d=0,e=c.length;d<e;++d)if(c[d]==b){c.splice(d,0,a);return}this.heads.push(a)},onChildRemoved_:function(a){this.$supers("onChildRemoved_",arguments);a==this.head?(this._minWd=this.head=null,this.heads.$remove(a)):a.$instanceof(zul.mesh.Auxhead)?this.heads.$remove(a):a.$instanceof(zul.mesh.Frozen)&&(this.efrozen=null)},resetSize_:function(a){this.$supers("resetSize_",arguments);"w"==a&&(this.ehead&&
(this.ehead.style.width=""),this.ebody&&(this.ebody.style.width=""),this.efoot&&(this.efoot.style.width=""))},beforeMinFlex_:function(a){if(void 0===this._hflexsz&&"w"==a&&void 0===this._width){this.isSizedByContent()&&this._calcSize();if(this.head)for(this._fixHeaders(!0),a=this.head.firstChild;a;a=a.nextSibling)if("min"==a._hflex&&void 0===a.hflexsz)return null;l(this);return m(this)}return null},beforeParentMinFlex_:function(a){"w"==a?(this.isSizedByContent()&&this._calcSize(),this.head&&this._fixHeaders()):
this._calcSize()},clearCachedSize_:function(){this.$supers("clearCachedSize_",arguments);this._clearCachedSize();var a;if(!this.ebdfaker&&(a=v(this))){a=a.cells;for(var b=a.length;b--;)a[b].style.width=""}if(a=this.getHeadWidget())for(a=a.firstChild;a;a=a.nextSibling)delete a._hflexsz},_clearCachedSize:function(){var a;if(a=this.$n())a._lastsz=this._minWd=null},_calcMinWds:function(){if(!this._minWd){var a,b,c=this.$n(),d=c?c.style.whiteSpace:"";c&&(zk.ie9&&(this._wsbak=d),c.style.whiteSpace="nowrap");
var e=this.ehdfaker,f=this.ebdfaker,g=this.eftfaker,h=(b=this.head)?b.$n():null,k=[],p=[],l=[],q=[],w=[];if(this.eheadtbl&&h){this.ehead.style.width="";var m=this.getInnerWidth()||"";this.eheadtbl.width="";this.eheadtbl.style.width="";var t=this.eheadtbl.style.tableLayout;this.eheadtbl.style.tableLayout="";zk.chrome&&(this.ebodytbl.style.display="block");var y=e.firstChild;var r=h.firstChild;for(var n=0;y;y=y.nextSibling,n++)if(a=r?r.firstChild:null)k[n]=y.style.width,y.style.width="",q[n]=r.style.width,
r.style.width="",w[n]=a.style.width,a.style.width="",r=r.nextSibling}h&&(h.style.width="");if(this.efoottbl){this.efoot.style.width="";var u=m||this.efoottbl.width;this.efoottbl.width="";this.efoottbl.style.width="";var G=this.efoottbl.style.tableLayout;this.efoottbl.style.tableLayout="";zk.chrome&&(this.ebodytbl.style.display="block");if(g){a=g.firstChild;var x=this.efootrows;x=x?x.rows[0].cells:null;for(n=0;a;a=a.nextSibling)x&&x[n]&&(x[n].style.width=""),l[n++]=a.style.width,a.style.width=""}}if(this.ebodytbl){this.ebody.style.width=
"";var H=m||this.ebodytbl.width;this.ebodytbl.width="";this.ebodytbl.style.width="";var I=this.ebodytbl.style.tableLayout;this.ebodytbl.style.tableLayout="";zk.chrome&&(this.ebodytbl.style.display="block");if(f)for(a=f.firstChild,n=0;a;a=a.nextSibling)p[n++]=a.style.width,a.style.width=""}x=[];var A=0;a=b?b.nChildren:0;r=b?b.firstChild:null;y=this.getHeadWidget();if(f&&r){var D=this._getFirstRowCells(this.ebodyrows),C=g?this._getFirstRowCells(this.efootrows):null;for(n=0;n<a;n++){b=D&&D[n]?D[n].offsetWidth:
0;var z=zk(r.$n("cave"));z=r&&r.isVisible()?z.textSize()[0]+z.padBorderWidth()+zk(r.$n()).padBorderWidth():0;var E=C&&C[n]&&zk(C[n]).isVisible()?C[n].offsetWidth:0,B;(B=y.getChildAt(n))&&B.getWidth()&&(z=Math.max(z,E));z>b&&(b=z);E>b&&(b=E);x[n]=b;!this.frozen&&(4<zk.ff||8<zk.ie||zk.safari)&&++x[n];A+=x[n];r&&(r=r.nextSibling)}this._deleteFakeRow(this.ebodyrows);g&&this._deleteFakeRow(this.efootrows)}else if(n=v(this))for(B=n.cells,n=B.length;n--;)b=B[n].offsetWidth,x[n]=b,!this.frozen&&(4<zk.ff||
8<zk.ie)&&++x[n],A+=x[n];(n=this.$n("empty"))&&"none"!=n.style.display&&(n=n.offsetWidth,n>A&&(A=n));if(this.eheadtbl&&h)for(0>m.indexOf("%")?((n=jq(this.head.$n("hdfaker")).find("[id*=hdfaker-bar]")[0])&&(m=jq.px0(parseInt(m)+parseInt(n.style.width))),this.eheadtbl.style.width=m):this.eheadtbl.width=m||"",this.eheadtbl.style.tableLayout=t||"",zk.chrome&&(this.eheadtbl.style.display=""),y=e.firstChild,r=h.firstChild,n=0;y;y=y.nextSibling,n++)if(a=r?r.firstChild:null)y.style.width=k[n],r.style.width=
q[n],a.style.width=w[n],r=r.nextSibling;if(this.efoottbl&&(this.efoottbl.width=u||"",this.efoottbl.style.tableLayout=G||"",zk.chrome&&(this.efoottbl.style.display=""),g))for(a=g.firstChild,n=0;a;a=a.nextSibling)a.style.width=l[n++];if(this.ebodytbl&&(this.ebodytbl.width=H||"",this.ebodytbl.style.tableLayout=I||"",zk.chrome&&(this.ebodytbl.style.display=""),f))for(a=f.firstChild,n=0;a;a=a.nextSibling)a.style.width=p[n++];c&&(c.style.whiteSpace=d);this._minWd={width:A,wds:x}}return this._minWd},_adjSpanWd:function(){if(this._isAllWidths()&&
this.isSpan()){var a=this.ehdfaker,b=this.ebdfaker,c=this.eftfaker;if(a&&b&&this.head.$n()){this._calcMinWds();var d=[],e=0,f=a.firstChild,g=b.firstChild,h=this._minWd.wds,k=this.head.nChildren;var p=f;for(var l=this.head.firstChild,q=0;l;l=l.nextSibling,q++){if(zk(p).isVisible(!0)){var m=l._width;m="min"==l._hflex?d[q]=h[q]:m&&m.endsWith("px")?d[q]=zk.parseInt(m):d[q]=h[q];e+=m}p=p.nextSibling}l=c?c.firstChild:null;var t=this.ebody.clientWidth,u=t-e,v=t,r=-1;h=0;if(0>this._nspan){var n=this.frozen&&
this.frozen.getStart();for(q=0;f&&q<k;f=f.nextSibling,q++)zk(f).isVisible(!0)?(d[q]=n?0>=u?m=d[q]:f.style.width?m=zk.parseInt(f.style.width):m=Math.round(d[q]*t/e+.5||0):m=0>=u?d[q]:Math.round(d[q]*t/e+.5||0),p=jq.px0(m),v-=m,r=q,f.style.width=p,g.style.width=p,h+=m,g=g.nextSibling,l&&(l.style.width=p,l=l.nextSibling)):(g=g.nextSibling,l&&(l=l.nextSibling));0<u&&0!=v&&0<=r&&(h-=m,m=d[r]+v,p=jq.px0(m),h+=m,n||(b.childNodes[r].style.width=p,a.childNodes[r].style.width=p,c&&(c.childNodes[r].style.width=
p)))}else for(r=this._nspan-1,q=0;f&&q<k;f=f.nextSibling,q++)zk(f).isVisible(!0)?(m=r==q&&0<u?d[r]+u:d[q],p=jq.px0(m),f.style.width=p,g.style.width=p,h+=m,g=g.nextSibling,l&&(l.style.width=p,l=l.nextSibling)):(g=g.nextSibling,l&&(l=l.nextSibling));this._isAllWidths()&&(a=this.eheadtbl,b=this.ebodytbl,c=this.efoottbl,a&&(a.style.width=h+"px",b&&(b.style.width=h+"px"),c&&(c.style.width=h+"px")));zk.opera&&zk(this.$n()).redoCSS()}}},_adjHeadWd:function(){var a=this.ehdfaker,b=this.ebdfaker,c=this.eftfaker;
if(a&&b&&this.getBodyWidgetIterator().hasNext()){var d=this.eheadtbl;if(this.head.$n()){var e=this.ebodytbl,f=this._calcMinWds(),g=f.wds;f=f.width;a=a.firstChild;b=b.firstChild;for(var h=c?c.firstChild:null,k=this.head.firstChild,l=this.$class.WIDTH0,m=0;k;k=k.nextSibling,m++)if(k.isVisible())if(k._width||0==g[m])0==g[m]&&(a.style.width=l,b.style.width=l,h&&(h.style.width=l)),a=a.nextSibling,b=b.nextSibling,h&&(h=h.nextSibling);else{if(!this.frozen||!this.frozen.getStart()||""===a.style.width){var q=
jq.px(g[m]);a.style.width=b.style.width=q;a=a.nextSibling;b=b.nextSibling;h&&(h.style.width=q,h=h.nextSibling)}}else a.style.width=l,b.style.width=l,a=a.nextSibling,b=b.nextSibling,h&&(h.style.width=l,h=h.nextSibling);d.style.width=jq.px(f);e.style.width=jq.px(f);c&&(this.efoottbl.style.width=jq.px(f));u(this)}}},_getFirstRowCells:function(a){var b,c;if(a&&(c=a.rows)&&(b=c.length)){var d=c[0].cells,e=d.length,f=0;if(0<a.offsetHeight)for(var g=0;g<b;g++)if("none"!=jq(c[g]).css("display")){d=c[g].cells;
e=d.length;break}for(g=0;g<e;g++)b=d[g].colSpan,f+=1!=b?b:1;if(f==e)return d;a=""+('<tr id="'+a.id+'-fakeRow" style="visibility:hidden;height:0">');for(g=0;g<f;g++)a+="<td></td>";a+="</tr>";jq(c[0]).before(a);return c[0].cells}},_deleteFakeRow:function(a){a&&jq("#"+a.id+"-fakeRow").remove()},refreshBar_:function(a,b){var c=this._scrollbar;if(c){var d=this._currentLeft,e=this._currentTop;c.syncSize(a||this._shallShowScrollbar);delete this._shallShowScrollbar;b?c.scrollTo(0,0):c.scrollTo(d,e);a=this.frozen;
var f;a&&0!=(f=a._start)&&(a._doScrollNow(f),c.setBarPosition(f));this._afterCalcSize()}},onFitSize:function(){this._rows&&this._calcHgh()},_calcHgh:function(){var a=this.ebodyrows?this.ebodyrows.rows:[],b=this.$n(),c=b.style.height;if(c&&"auto"!=c&&0>c.indexOf("%")&&(c=zk.parseInt(c)-zk(b).padBorderHeight())){c-=this._headHgh(0);0>c&&(c=0);var d=0,e=0,f=a.length;a:for(;e<f;++d,++e){for(;;++e){if(e>=f)break a;var g=a[e];if(zk(g).isVisible())break}g=zk(g);var h=g.offsetTop()+g.offsetHeight();if(h>=
c){h>c+2&&++d;break}}d=Math.ceil(d&&h?c*d/h:c/this._headHgh(20));this._visibleRows(d);c-=this.efoot?this.efoot.offsetHeight:0;c-=this.efrozen&&this._nativebar?this.efrozen.offsetHeight:0;this.ebody.style.height=(0>c?0:c)+"px";return}h=0;var k=this.getRows(),l;e=0;for(f=a.length;e<f;++e)if(g=a[e],zk(g).isVisible()){++h;l||(l=g);if(k===h){var m=g;break}d=g}c=0;k||(this.isVflex()&&(c=this._vflexSize(b.style.height),11>zk.ie&&this._cachehgh!=c&&(this._cachehgh=--c),25>c&&(c=25),(a=l?zk(l).offsetHeight():
null)||(a=this._headHgh(20)),k=Math.round((c-2)/a)),this._visibleRows(k));k?(c||(h?k<=h?(c=zk(m),c=c.offsetTop()+c.offsetHeight()):(c=zk(d),c=c.offsetTop()+c.offsetHeight(),c=Math.ceil(k*c/h)):c=this._headHgh(20,!0)*k),this.ebody.style.height=c+"px"):(this.ebody.style.height="",c=this.$n("a"),(this.paging||this._paginal)&&c&&(c.style.top="0px"))},_visibleRows:function(a){if("number"==typeof a)this._visiRows=a;else return this.getRows()||this._visiRows||0},_headHgh:function(a,b){var c=this.getHeadWidget(),
d=this.ehead;b=b?c?c.$n().offsetHeight:0:d?d.offsetHeight:0;this.paging&&(c=this.$n("pgit"),d=this.$n("pgib"),c&&(b+=c.offsetHeight),d&&(b+=d.offsetHeight));return b?b:a},_scrollToIndex:function(a,b){var c=this._getFirstItemIndex(),d=this._getLastItemIndex(),e=this.ebody;this._targetIndex=a;this._keepScroll=!0;if(a>=c&&a<=d)for(b=this.getBodyWidgetIterator();b.hasNext();){if(c=b.next(),c._index==a){c.$n().scrollIntoView(!0);this._keepScroll=!1;this._topBoundary=this._bottomBoundary=void 0;break}}else void 0!=
b?e.scrollTop=e.scrollHeight*b:a<c?(this._bottomBoundary=e.scrollTop,this._topBoundary=void 0==this._topBoundary?0:this._topBoundary,e.scrollTop-=(e.scrollTop-this._topBoundary)/2):a>d&&(this._topBoundary=e.scrollTop,this._bottomBoundary=void 0==this._bottomBoundary?e.scrollHeight:this._bottomBoundary,e.scrollTop+=(this._bottomBoundary-e.scrollTop)/2)},getContentEdgeHeight_:function(){var a=this.$supers("getContentEdgeHeight_",arguments),b=this.efoot;b&&(b=zk(b),a+=b.padBorderHeight()+b.sumStyles("tb",
jq.margins));return a},afterChildrenMinFlex_:function(a){var b=this.$n();"h"==a&&(b.style.height=jq.px0(Math.ceil(this._vflexsz)))},isChildrenFlex:function(){if(this.head&&this.ehead)for(var a=this.heads.length;0<a--;)for(var b=this.heads[a].firstChild;b;b=b.nextSibling)if(b._hflex&&"min"!=b._hflex)return!0;return!1}},{WIDTH0:zk.webkit?"0.001px":"0px",_getWidth:function(a,b){return a.isVisible()?b:this.WIDTH0}});zul.mesh.Scrollbar={init:function(a){var b=!1!==jq(a.$n()).data("embedscrollbar"),c=a.frozen,
d=0;if(c&&(c=c.getColumns(),a.eheadtbl)){var e=a._getFirstRowCells(a.eheadrows);if(e)for(var f=0;f<c;f++)d+=e[f].offsetWidth;a._deleteFakeRow(a.eheadrows)}return new zul.Scrollbar(a.ebody,a.ebodytbl,{embed:b,startPositionX:d,onSyncPosition:function(){if(!this.frozen){var b=this.getCurrentPosition(),c=a.ehead,d=a.efoot;b&&this.hasHScroll()&&(c&&(c.scrollLeft=b.x),d&&(d.scrollLeft=b.x))}},onScrollEnd:function(){a._doScroll()}})},getScrollPosV:function(a){var b=a._scrollbar;return b?b.getCurrentPosition().y:
a.ebody.scrollTop},getScrollPosH:function(a){var b=a._scrollbar;return b?b.getCurrentPosition().x:a.ebody.scrollLeft}}})();
