var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,p,q){l instanceof String&&(l=String(l));for(var x=l.length,n=0;n<x;n++){var a=l[n];if(p.call(q,a,n,l))return{i:n,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.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,p,q){if(l==Array.prototype||l==Object.prototype)return l;l[p]=q.value;return l};$jscomp.getGlobal=function(l){l=["object"==typeof globalThis&&globalThis,l,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var p=0;p<l.length;++p){var q=l[p];if(q&&q.Math==Math)return q}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(l,p){var q=$jscomp.propertyToPolyfillSymbol[p];if(null==q)return l[p];q=l[q];return void 0!==q?q:l[p]};
$jscomp.polyfill=function(l,p,q,x){p&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(l,p,q,x):$jscomp.polyfillUnisolated(l,p,q,x))};$jscomp.polyfillUnisolated=function(l,p,q,x){q=$jscomp.global;l=l.split(".");for(x=0;x<l.length-1;x++){var n=l[x];if(!(n in q))return;q=q[n]}l=l[l.length-1];x=q[l];p=p(x);p!=x&&null!=p&&$jscomp.defineProperty(q,l,{configurable:!0,writable:!0,value:p})};
$jscomp.polyfillIsolated=function(l,p,q,x){var n=l.split(".");l=1===n.length;x=n[0];x=!l&&x in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var a=0;a<n.length-1;a++){var b=n[a];if(!(b in x))return;x=x[b]}n=n[n.length-1];q=$jscomp.IS_SYMBOL_NATIVE&&"es6"===q?x[n]:null;p=p(q);null!=p&&(l?$jscomp.defineProperty($jscomp.polyfills,n,{configurable:!0,writable:!0,value:p}):p!==q&&(void 0===$jscomp.propertyToPolyfillSymbol[n]&&(q=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[n]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(n):$jscomp.POLYFILL_PREFIX+q+"$"+n),$jscomp.defineProperty(x,$jscomp.propertyToPolyfillSymbol[n],{configurable:!0,writable:!0,value:p})))};$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(p,q){return $jscomp.findInternal(this,p,q).v}},"es6","es3");
$jscomp.checkStringArgs=function(l,p,q){if(null==l)throw new TypeError("The 'this' value for String.prototype."+q+" must not be null or undefined");if(p instanceof RegExp)throw new TypeError("First argument to String.prototype."+q+" must not be a regular expression");return l+""};
$jscomp.polyfill("String.prototype.endsWith",function(l){return l?l:function(p,q){var x=$jscomp.checkStringArgs(this,p,"endsWith");p+="";void 0===q&&(q=x.length);q=Math.max(0,Math.min(q|0,x.length));for(var n=p.length;0<n&&0<q;)if(x[--q]!=p[--n])return!1;return 0>=n}},"es6","es3");$jscomp.arrayIteratorImpl=function(l){var p=0;return function(){return p<l.length?{done:!1,value:l[p++]}:{done:!0}}};$jscomp.arrayIterator=function(l){return{next:$jscomp.arrayIteratorImpl(l)}};
$jscomp.makeIterator=function(l){var p="undefined"!=typeof Symbol&&Symbol.iterator&&l[Symbol.iterator];return p?p.call(l):$jscomp.arrayIterator(l)};
$jscomp.polyfill("Promise",function(l){function p(){this.batch_=null}function q(b){return b instanceof n?b:new n(function(c,d){c(b)})}if(l&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return l;p.prototype.asyncExecute=function(b){if(null==this.batch_){this.batch_=[];var c=this;this.asyncExecuteFunction(function(){c.executeBatch_()})}this.batch_.push(b)};
var x=$jscomp.global.setTimeout;p.prototype.asyncExecuteFunction=function(b){x(b,0)};p.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var b=this.batch_;this.batch_=[];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(e){this.asyncThrow_(e)}}}this.batch_=null};p.prototype.asyncThrow_=function(b){this.asyncExecuteFunction(function(){throw b;})};var n=function(b){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var c=this.createResolveAndReject_();
try{b(c.resolve,c.reject)}catch(d){c.reject(d)}};n.prototype.createResolveAndReject_=function(){function b(e){return function(f){d||(d=!0,e.call(c,f))}}var c=this,d=!1;return{resolve:b(this.resolveTo_),reject:b(this.reject_)}};n.prototype.resolveTo_=function(b){if(b===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof n)this.settleSameAsPromise_(b);else{a:switch(typeof b){case "object":var c=null!=b;break a;case "function":c=!0;break a;default:c=!1}c?this.resolveToNonPromiseObj_(b):
this.fulfill_(b)}};n.prototype.resolveToNonPromiseObj_=function(b){var c=void 0;try{c=b.then}catch(d){this.reject_(d);return}"function"==typeof c?this.settleSameAsThenable_(c,b):this.fulfill_(b)};n.prototype.reject_=function(b){this.settle_(2,b)};n.prototype.fulfill_=function(b){this.settle_(1,b)};n.prototype.settle_=function(b,c){if(0!=this.state_)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.state_);this.state_=b;this.result_=c;2===this.state_&&this.scheduleUnhandledRejectionCheck_();
this.executeOnSettledCallbacks_()};n.prototype.scheduleUnhandledRejectionCheck_=function(){var b=this;x(function(){if(b.notifyUnhandledRejection_()){var c=$jscomp.global.console;"undefined"!==typeof c&&c.error(b.result_)}},1)};n.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var b=$jscomp.global.CustomEvent,c=$jscomp.global.Event,d=$jscomp.global.dispatchEvent;if("undefined"===typeof d)return!0;"function"===typeof b?b=new b("unhandledrejection",{cancelable:!0}):
"function"===typeof c?b=new c("unhandledrejection",{cancelable:!0}):(b=$jscomp.global.document.createEvent("CustomEvent"),b.initCustomEvent("unhandledrejection",!1,!0,b));b.promise=this;b.reason=this.result_;return d(b)};n.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var b=0;b<this.onSettledCallbacks_.length;++b)a.asyncExecute(this.onSettledCallbacks_[b]);this.onSettledCallbacks_=null}};var a=new p;n.prototype.settleSameAsPromise_=function(b){var c=this.createResolveAndReject_();
b.callWhenSettled_(c.resolve,c.reject)};n.prototype.settleSameAsThenable_=function(b,c){var d=this.createResolveAndReject_();try{b.call(c,d.resolve,d.reject)}catch(e){d.reject(e)}};n.prototype.then=function(b,c){function d(h,k){return"function"==typeof h?function(t){try{e(h(t))}catch(m){f(m)}}:k}var e,f,g=new n(function(h,k){e=h;f=k});this.callWhenSettled_(d(b,e),d(c,f));return g};n.prototype.catch=function(b){return this.then(void 0,b)};n.prototype.callWhenSettled_=function(b,c){function d(){switch(e.state_){case 1:b(e.result_);
break;case 2:c(e.result_);break;default:throw Error("Unexpected state: "+e.state_);}}var e=this;null==this.onSettledCallbacks_?a.asyncExecute(d):this.onSettledCallbacks_.push(d);this.isRejectionHandled_=!0};n.resolve=q;n.reject=function(b){return new n(function(c,d){d(b)})};n.race=function(b){return new n(function(c,d){for(var e=$jscomp.makeIterator(b),f=e.next();!f.done;f=e.next())q(f.value).callWhenSettled_(c,d)})};n.all=function(b){var c=$jscomp.makeIterator(b),d=c.next();return d.done?q([]):new n(function(e,
f){function g(t){return function(m){h[t]=m;k--;0==k&&e(h)}}var h=[],k=0;do h.push(void 0),k++,q(d.value).callWhenSettled_(g(h.length-1),f),d=c.next();while(!d.done)})};return n},"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=q(a)+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 p(a){if("min"==a._hflex){var b=q(a),c=a.$n();a._hflexsz=b+zk(c).padBorderWidth();
c.style.width=jq.px0(a._hflexsz)}}function q(a){a._calcMinWds();var b=a.ebdfaker,c=a._minWd.wds;if(a.head&&b){var d=0;for(var e=a.head.firstChild,f=b.firstChild,g=0;e;e=e.nextSibling)b="min"==e._hflex?c[g]+zk(e.$n()).padBorderWidth():e._width&&0<e._width.indexOf("px")?zk.parseInt(e._width):zk.parseInt(f.style.width),e._origWd=jq.px0(b),d+=b,++g,f=f.nextSibling}else d=a._minWd.width;return d+(zk(a.ebody).hasVScroll()?jq.scrollbarWidth():0)}function x(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 n;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(){var a=this.paging||this._paginal;return a?a.getPageSize():
0},setPageSize:function(a){var b=this.paging||this._paginal;b&&b.setPageSize(a)},getPageCount:function(){var a=this.paging||this._paginal;return a?a.getPageCount():1},getActivePage:function(){var a=this.paging||this._paginal;return a?a.getActivePage():0},setActivePage:function(a){var b=this.paging||this._paginal;b&&b.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,b,c){var d=this.ehdfaker?this.ehdfaker.childNodes[a]:null,e=this.frozen;if(d&&e&&(b||0==zk.parseInt(d.style.width))&&0<=(a-=e.getColumns())){if(this._nativebar)e.setStart(a);else if(b=this._scrollbar)e._doScrollNow(a),b.setBarPosition(a);n=!c}},_restoreFocus:function(){n&&zk.currentFocus&&(n=!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&&!zk.mobile&&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._shallClearTableWidth&&(this._clearTableWidth(),this._shallClearTableWidt=!1),this.syncSize(),this._shallSize=!1)},_syncSize:function(a){this.desktop&&(this._shallSize=!0,this._shallClearTableWidth=!!a)},_clearTableWidth:function(){if(this.desktop){var a=
this.eheadtbl,b=this.ebodytbl,c=this.efoottbl;a&&(a.style.width="");b&&(b.style.width="");c&&(c.style.width="")}},_fixHeaders:function(a){if(this.head&&this.ehead&&(!this._cssflex||!this.isChildrenFlex())){for(var b=!0,c=!1,d=!1,e=!this.frozen&&this.eheadtbl&&this.eheadtbl.style.width,f="min"==this._hflex||this.isSizedByContent(),g=this.heads.length;0<g--;){for(var h=this.heads[g],k=!0,t=0,m=h.firstChild;m;m=m.nextSibling){var w=this.ehdfaker.childNodes[t++];f&&w&&!w.style.width&&!m._nhflex&&(m._hflex=
"min",m._nhflex=-65500,m._nhflexbak=!0);!c&&m._nhflex&&(c=!0);if(m.getLabel()||m.getImage()||m.nChildren)b=k=!1;e&&!m.getWidth()&&(d=!0)}h._visible&&(m=h.$n())&&(m.style.display=k?"none":"")}e=this.ehead.style.display;a=a&&c&&this.isRealVisible();this.ehead.style.display=b?"none":"";for(m=this.head.firstChild;m;m=m.nextSibling)a&&m._nhflex&&m.fixFlex_(),m._nhflexbak&&(delete m._hflex,delete m._nhflex,delete m._nhflexbak);return d||e!=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=this.frozen;if(!h||h._smooth||!h.getStart()){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)));p(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),
zWatch.fire("_onSyncScroll",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 t=k.offsetTop-(k.offsetParent==d?e:0);if(t>c){--b;
break}f=t}if(k&&(d=this.$n("pgib"),e=0,d&&(e=d.offsetHeight),d=c+e,t<=d&&(t=this.paging?this.paging:this.getPaginal(),e=t.getTotalSize(),k=f+k.offsetHeight,c=Math.floor(b*c/k),k=Math.floor(b*d/k),b=e>k||!t.isAutohide()?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)){f=0;t=this.getBodyWidgetIterator({skipHidden:!0});for(a=a.length;(d=t.next())&&f<a;f++)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=this.isSizedByContent(),c=this.ebodyrows,d=this.efoot,e=this.efootrows;if(this.ehead)b&&c&&this._adjHeadWd();else if(d&&e&&c){c=this.efootrows.rows[0];var f=this.ebodyrows.rows;if(c&&f&&f.length&&c.cells.length){var g=c.cells.length;e=d=0;for(var h=this.getBodyWidgetIterator({skipHidden:!0}),k;k=h.next();)if(k._loaded&&!k.z_rod){k=f[e++];var t=zk(k),m=k.cells,w=t.ncols();if((t=m.length==w&&t.isVisible())&&w>=g){d=g;var u=k;break}w>d?(u=t?k:null,d=w):w==d&&!u&&t&&(u=k)}if(d){if(g=!u){u=
document.createElement("TR");u.style.height="0px";for(e=0;e<d;++e)u.appendChild(document.createElement("TD"));f[0].parentNode.appendChild(u)}for(e=d;e--;)c.cells[e].style.width="";f=0;for(e=d;e--;)h=c.cells[e],k=u.cells[e],zk.opera?(f+=k.offsetWidth,h.style.width=zk(k).contentWidth()):(h.style.width=k.offsetWidth+"px",1<d&&(w=k.offsetWidth-h.offsetWidth,0!=w&&(w+=k.offsetWidth,0>w&&(w=0),h.style.width=w+"px")));zk.opera&&this.isSizedByContent()&&(c.parentNode.parentNode.style.width=f+"px");g&&u.parentNode.removeChild(u)}}}this._adjSpanWd();
l(this,!0);b&&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=this._cssflex&&this.isChildrenFlex();this._ebodyScrollPos&&(this.ebody.scrollLeft=this._ebodyScrollPos.l,this.ebody.scrollTop=
this._ebodyScrollPos.t,this._ebodyScrollPos=null);var b=this._isAllWidths(),c=this.head,d=this.ebody,e=this.ebodyrows,f=c?c.$n("hdfaker-bar"):null,g=c?jq(this).find("."+c.$s("bar"))[0]:null,h=this.eftfaker?this.head.$n("ftfaker-bar"):null,k=jq.scrollbarWidth(),t=zk(d).hasVScroll(),m=zk(d).hasHScroll();if(t)f&&(a&&g?g.style.flex="0 1 "+k+"px":f.style.width=k+"px"),h&&(h.style.width=k+"px");else{var w=this.$class.WIDTH0;f&&(a&&g?g.style.flex="0 1 "+w+"px":f.style.width=w);h&&(h.style.width=w)}m&&e&&
"min"==this._vflex&&(g=this.ehead,h=this.efoot,e=jq(e).height(),e+=k,d.style.height=jq.px0(e),g&&(e+=g.offsetHeight),h&&(e+=h.offsetHeight),this.$n().style.height=jq.px0(e));if(a)c.afterChildrenFlex_();else if(b){if(a=this.eheadtbl,b=this.ebodytbl,c=this.efoottbl,a){d=0;for(e=this.ehdfaker.firstChild;e;e=e.nextSibling)"none"==e.style.display||e.id.endsWith("hdfaker-bar")||(d+=zk.parseInt(e.style.width));if(0<d)a.style.width=f&&t&&(zk.chrome||zk.safari)&&!zk.edge_legacy?d+k+"px":d+"px",b&&(b.style.width=
d+"px"),c&&(c.style.width=d+"px");else{f=!1;for(k=this.head.firstChild;k;k=k.nextSibling){if(k.isVisible()){f=!1;break}f=!0}f&&(a.style.visibility="hidden",b&&(b.style.visibility="hidden"),c&&(c.style.visibility="hidden"))}}}else this.frozen&&(g=this.ehead,a=this.eheadtbl,d=this.ebody,b=this.ebodytbl,h=this.efoot,c=this.efoottbl,g&&a&&(a.style.width=jq.px0(g.clientWidth)),d&&b&&(b.style.width=jq.px0(d.clientWidth)),h&&c&&(c.style.width=jq.px0(h.clientWidth)),this.frozen._smooth||this._syncFaker())},
_syncFaker:function(){var a=this.head;if(a&&this.desktop){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 t=k==c;k=t?parseFloat(g._origWd):parseFloat(k);g.getWidth()||g.getHflex()?d-=k:e+=k}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,(t=k==c)?g._origWd=jq.px0(parseFloat(g._origWd)*a):(a=jq.px0(parseFloat(k)*a),k=g.$n("bdfaker"),t=g.$n("ftfaker"),h.style.width=a,k&&(k.style.width=a),t&&(t.style.width=a)))}},_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,'"></col>')}(0<b.indexOf("hd")||0<b.indexOf("ft"))&&a.push('<col id="',c.uuid,b,'-bar" style="width: 0px" ></col>');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)},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 q(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=x(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=this.$n(),b=a?a.style.whiteSpace:"";a&&(zk.ie9&&(this._wsbak=b),a.style.whiteSpace="nowrap");var c=this.ehdfaker,d=this.ebdfaker,e=this.eftfaker,f=this.head,g=f?f.$n():null,h=[],k=[],t=[],m=[],w=[];if(this.eheadtbl&&g){var u=this.getInnerWidth()||"";this.eheadtbl.width=
"";this.eheadtbl.style.width="";var B=this.eheadtbl.style.tableLayout;this.eheadtbl.style.tableLayout="";zk.chrome&&(this.ebodytbl.style.display="block");for(var v=c.firstChild,y=g.firstChild,r=0;v;v=v.nextSibling,r++){var z=y?y.firstChild:null;z&&(h[r]=v.style.width,v.style.width="",m[r]=y.style.width,y.style.width="",w[r]=z.style.width,z.style.width="",y=y.nextSibling)}}g&&(g.style.width="");if(this.efoottbl){var I=u||this.efoottbl.width;this.efoottbl.width="";this.efoottbl.style.width="";var J=
this.efoottbl.style.tableLayout;this.efoottbl.style.tableLayout="";zk.chrome&&(this.ebodytbl.style.display="block");if(e){v=e.firstChild;var A=this.efootrows;A=A?A.rows[0].cells:null;for(r=0;v;v=v.nextSibling)A&&A[r]&&(A[r].style.width=""),t[r++]=v.style.width,v.style.width=""}}if(this.ebodytbl){var K=u||this.ebodytbl.width;this.ebodytbl.width="";this.ebodytbl.style.width="";var L=this.ebodytbl.style.tableLayout;this.ebodytbl.style.tableLayout="";zk.chrome&&(this.ebodytbl.style.display="block");if(d)for(v=
d.firstChild,r=0;v;v=v.nextSibling)k[r++]=v.style.width,v.style.width=""}A=[];var C=0;v=f?f.nChildren:0;y=f?f.firstChild:null;z=this.getHeadWidget();if(d&&y){var G=this._getFirstRowCells(this.ebodyrows),E=e?this._getFirstRowCells(this.efootrows):null;for(r=0;r<v;r++){f=G&&G[r]?G[r].offsetWidth:0;var H=E&&E[r]&&zk(E[r]).isVisible()?E[r].offsetWidth:0,F=y&&y.isVisible()?y.getContentWidth_():0,D;(D=z.getChildAt(r))&&D.getWidth()&&(F=Math.max(F,H));F>f&&(f=F);H>f&&(f=H);A[r]=f;!this.frozen&&(4<zk.ff||
8<zk.ie||zk.safari)&&++A[r];C+=A[r];y&&(y=y.nextSibling)}this._deleteFakeRow(this.ebodyrows);e&&this._deleteFakeRow(this.efootrows)}else if(r=x(this))for(D=r.cells,r=D.length;r--;)f=D[r].offsetWidth,A[r]=f,!this.frozen&&(4<zk.ff||8<zk.ie)&&++A[r],C+=A[r];(r=this.$n("empty"))&&"none"!=r.style.display&&(r=r.offsetWidth,r>C&&(C=r));if(this.eheadtbl&&g)for(0>u.indexOf("%")?((r=jq(this.head.$n("hdfaker")).find("[id*=hdfaker-bar]")[0])&&(u=jq.px0(parseInt(u)+parseInt(r.style.width))),this.eheadtbl.style.width=
u):this.eheadtbl.width=u||"",this.eheadtbl.style.tableLayout=B||"",zk.chrome&&(this.eheadtbl.style.display=""),v=c.firstChild,y=g.firstChild,r=0;v;v=v.nextSibling,r++)if(z=y?y.firstChild:null)v.style.width=h[r],y.style.width=m[r],z.style.width=w[r],y=y.nextSibling;if(this.efoottbl&&(this.efoottbl.width=I||"",this.efoottbl.style.tableLayout=J||"",zk.chrome&&(this.efoottbl.style.display=""),e))for(v=e.firstChild,r=0;v;v=v.nextSibling)v.style.width=t[r++];if(this.ebodytbl&&(this.ebodytbl.width=K||"",
this.ebodytbl.style.tableLayout=L||"",zk.chrome&&(this.ebodytbl.style.display=""),d))for(v=d.firstChild,r=0;v;v=v.nextSibling)v.style.width=k[r++];a&&(a.style.whiteSpace=b);this._minWd={width:C,wds:A}}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();for(var d,e=[],f=0,g=a.firstChild,h=b.firstChild,k=this._minWd.wds,t=this.head.nChildren,m=g,w=this.head.firstChild,u=0;w;w=
w.nextSibling,u++)zk(m).isVisible(!0)&&(d=w._width,d="min"==w._hflex?e[u]=k[u]:d&&d.endsWith("px")?e[u]=zk.parseInt(d):e[u]=k[u],f+=d),m=m.nextSibling;m=c?c.firstChild:null;w=this.ebody.clientWidth;var B=w-f,v=w,y=-1;k=0;if(0>this._nspan){var r=this.frozen&&this.frozen.getStart();for(u=0;g&&u<t;g=g.nextSibling,u++)if(zk(g).isVisible(!0)){e[u]=r?0>=B?d=e[u]:g.style.width?d=zk.parseInt(g.style.width):d=Math.round(e[u]*w/f+.5||0):d=0>=B?e[u]:Math.round(e[u]*w/f+.5||0);var z=jq.px0(d);v-=d;y=u;g.style.width=
z;h.style.width=z;k+=d;h=h.nextSibling;m&&(m.style.width=z,m=m.nextSibling)}else h=h.nextSibling,m&&(m=m.nextSibling);0<B&&0!=v&&0<=y&&(k-=d,d=e[y]+v,z=jq.px0(d),k+=d,r||(b.childNodes[y].style.width=z,a.childNodes[y].style.width=z,c&&(c.childNodes[y].style.width=z)))}else for(y=this._nspan-1,u=0;g&&u<t;g=g.nextSibling,u++)zk(g).isVisible(!0)?(d=y==u&&0<B?e[y]+B:e[u],z=jq.px0(d),g.style.width=z,h.style.width=z,k+=d,h=h.nextSibling,m&&(m.style.width=z,m=m.nextSibling)):(h=h.nextSibling,m&&(m=m.nextSibling));
this._isAllWidths()&&(a=this.eheadtbl,b=this.ebodytbl,c=this.efoottbl,a&&(a.style.width=k+"px",b&&(b.style.width=k+"px"),c&&(c.style.width=k+"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,t=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=t,b.style.width=t,h&&(h.style.width=t)),a=a.nextSibling,b=b.nextSibling,h&&(h=h.nextSibling);else{if(!this.frozen||!this.frozen.getStart()||""===a.style.width){var w=jq.px(g[m]);a.style.width=b.style.width=w;a=a.nextSibling;b=b.nextSibling;h&&(h.style.width=w,h=h.nextSibling)}}else a.style.width=t,b.style.width=t,a=a.nextSibling,b=b.nextSibling,h&&(h.style.width=t,h=h.nextSibling);d.style.width=jq.px(f);e.style.width=
jq.px(f);c&&(this.efoottbl.style.width=jq.px(f));p(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(var g;;++e){if(e>=f)break a;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(),
t;e=0;for(f=a.length;e<f;++e)if(g=a[e],zk(g).isVisible()){++h;t||(t=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=t?zk(t).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},waitForRendered_:function(){var a=this;return new Promise(function(b){(function d(){if(!a._pendOnRender)return b();setTimeout(d)})()})}},{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 g=this.getCurrentPosition(),h=a.ehead,k=a.efoot;g&&this.hasHScroll()&&(h&&(h.scrollLeft=g.x),k&&(k.scrollLeft=g.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}}})();
