var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(f,a,b){f instanceof String&&(f=String(f));for(var c=f.length,d=0;d<c;d++){var e=f[d];if(a.call(b,e,d,f))return{i:d,v:e}}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(f,a,b){if(f==Array.prototype||f==Object.prototype)return f;f[a]=b.value;return f};$jscomp.getGlobal=function(f){f=["object"==typeof globalThis&&globalThis,f,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var a=0;a<f.length;++a){var b=f[a];if(b&&b.Math==Math)return b}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(f,a){var b=$jscomp.propertyToPolyfillSymbol[a];if(null==b)return f[a];b=f[b];return void 0!==b?b:f[a]};
$jscomp.polyfill=function(f,a,b,c){a&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(f,a,b,c):$jscomp.polyfillUnisolated(f,a,b,c))};$jscomp.polyfillUnisolated=function(f,a,b,c){b=$jscomp.global;f=f.split(".");for(c=0;c<f.length-1;c++){var d=f[c];if(!(d in b))return;b=b[d]}f=f[f.length-1];c=b[f];a=a(c);a!=c&&null!=a&&$jscomp.defineProperty(b,f,{configurable:!0,writable:!0,value:a})};
$jscomp.polyfillIsolated=function(f,a,b,c){var d=f.split(".");f=1===d.length;c=d[0];c=!f&&c in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var e=0;e<d.length-1;e++){var g=d[e];if(!(g in c))return;c=c[g]}d=d[d.length-1];b=$jscomp.IS_SYMBOL_NATIVE&&"es6"===b?c[d]:null;a=a(b);null!=a&&(f?$jscomp.defineProperty($jscomp.polyfills,d,{configurable:!0,writable:!0,value:a}):a!==b&&(void 0===$jscomp.propertyToPolyfillSymbol[d]&&(b=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[d]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(d):$jscomp.POLYFILL_PREFIX+b+"$"+d),$jscomp.defineProperty(c,$jscomp.propertyToPolyfillSymbol[d],{configurable:!0,writable:!0,value:a})))};$jscomp.polyfill("Array.prototype.find",function(f){return f?f:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
(function(){function f(a){if(a.isBothPaging())return a.parent.rerender(),!0}zul.mesh.Paging=zk.$extends(zul.Widget,{_pageSize:20,_totalSize:0,_pageCount:1,_activePage:0,_pageIncrement:zk.mobile?5:10,_showFirstLast:!0,$define:{totalSize:function(){this._updatePageNum();if(this._detailed&&!f(this)){var a=this.$n("info");a?a.innerHTML=this.infoText_():this._totalSize&&this.rerender()}},pageIncrement:_zkf=function(){this.rerender()},detailed:_zkf,pageCount:_zkf,activePage:_zkf,pageSize:function(){this._updatePageNum()},
autohide:function(){1==this._pageCount&&this.rerender()},disabled:function(a){this.desktop&&this._drawDisabled(a)}},setStyle:function(){this.$supers("setStyle",arguments);f(this)},setSclass:function(){this.$supers("setSclass",arguments);f(this)},setWidth:function(){this.$supers("setWidth",arguments);f(this);this.desktop&&zUtl.fireSized(this,-1)},setHeight:function(){this.$supers("setHeight",arguments);f(this)},setLeft:function(){this.$supers("setLeft",arguments);f(this)},setTop:function(){this.$supers("setTop",
arguments);f(this)},setTooltiptext:function(){this.$supers("setTooltiptext",arguments);f(this)},replaceHTML:function(){f(this)||this.$supers("replaceHTML",arguments)},isBothPaging:function(){return this.parent&&this.parent.getPagingPosition&&"both"==this.parent.getPagingPosition()},_drawDisabled:function(a){var b=this.uuid,c=this._activePage,d=this._pageCount,e=jq.$$(b,"real");if("os"==this._mold)b=jq.$$(b,"button"),jq(b).attr("disabled",a);else for(c=0==c&&c==d-1?[]:0==c?["last","next"]:c==d-1?["first",
"prev"]:["first","prev","last","next"],d=e.length;d--;){jq(e[d]).attr("disabled",a);for(var g=c.length;g--;)for(var k=jq.$$(b,c[g]),h=k.length;h--;)jq(k[h]).attr("disabled",a);g=a?"addClass":"removeClass";jq(e[d].nextSibling)[g](this.$s("text-disabled"))}},_updatePageNum:function(){var a=Math.floor((this._totalSize-1)/this._pageSize+1);0==a&&(a=1);if(a!=this._pageCount&&(this._pageCount=a,this._activePage>=this._pageCount&&(this._activePage=this._pageCount-1),this.desktop&&this.parent&&!f(this)&&
(this.rerender(),this.parent.$instanceof(zul.mesh.MeshWidget)))){var b=this;setTimeout(function(){if(b.desktop){var c=b.parent.$n();c&&c._lastsz&&(c._lastsz=null,b.parent.onSize())}})}},infoText_:function(){var a=this._activePage,b=this._pageSize,c=this._totalSize,d=(a+1)*b,e="";"os"!=this.getMold()&&(e=" - "+(d>c?c:d));return"[ "+(a*b+1)+e+" / "+c+" ]"},_infoTags:function(a){if(0!=this._totalSize){var b=this.uuid,c=f(this)?"name":"id";a.push("<div ",c,'="',b,'-detail" class="',this.$s("info"),'"><span ',
c,'="',b,'-info" aria-hidden="true">',this.infoText_(),"</span></div>")}},_innerTags:function(){var a=new zk.Buffer,b=this._pageIncrement,c=this._pageCount,d=this._activePage,e=Math.round(b/2),g=this._activePage+e-1;g>=c?(g=c-1,e=g-b+1,0>e&&(e=0)):(e=this._activePage-e,0>e&&(e=0),g=e+b-1,g>=c&&(g=c-1));a.push("<ul>");0<d&&(0<e&&this.appendAnchor(a,msgzul.FIRST,0),this.appendAnchor(a,msgzul.PREV,d-1));for(b=d<c-1;e<=g;++e)this.appendAnchor(a,e+1,e,e==d);b&&(this.appendAnchor(a,msgzul.NEXT,d+1),g<c-
1&&this.appendAnchor(a,msgzul.LAST,c-1));a.push("</ul>");this._detailed&&this._infoTags(a);return a.join("")},appendAnchor:function(a,b,c,d){var e=0==b.toString().search(/^[0-9]+$/),g=this.$s("button"),k="";e||(g+=" "+this.$s("noborder"),k=' class="'+this.$s("navigate")+'"');d&&(g+=" "+this.$s("selected"));a.push("<li",k,'><a name="',this.uuid,'-button" class="',g,'" href="javascript:;" data-paging="',c,'"',d?' aria-current="page"':"",">",b,"</a></li>")},domClass_:function(){var a=this.$supers(zul.mesh.Paging,
"domClass_",arguments),b="os"==this.getMold()?" "+this.$s("os"):"";return a+b},isVisible:function(){return this.$supers("isVisible",arguments)&&(1<this._pageCount||!this._autohide)},bind_:function(){this.$supers(zul.mesh.Paging,"bind_",arguments);zWatch.listen({onSize:this});var a=this.uuid,b=jq.$$(a,"real"),c=this.$class,d=this._pageCount,e=this._activePage,g=["first","prev","last","next"],k=zul.mesh.Paging._autoFocusInfo;if(!this.$weave)for(var h=b.length;h--;)jq(b[h]).on("keydown",this.proxy(this._domKeyDown)).on("blur",
this.proxy(this._domBlur));for(var l=g.length;l--;){var m=jq.$$(a,g[l]);for(h=m.length;h--;){if(!this.$weave)jq(m[h]).on("click",this.proxy(this["_dom"+g[l]+"Click"]));1==d?jq(m[h]).attr("disabled",!0):"first"==g[l]||"prev"==g[l]?0==e&&jq(m[h]).attr("disabled",!0):e==d-1&&jq(m[h]).attr("disabled",!0)}}if("os"==this.getMold())for(a=jq.$$(a,"button"),h=a.length;h--;){var n=this;jq(a[h]).on("click",function(){n._disabled||c.go(n,parseInt(jq(this).attr("data-paging")))})}this._disabled&&this._drawDisabled(!0);
k&&k.uuid===this.uuid&&(a=k.lastPos,b=zk(b[k.inpIdx]),b.focus(),b.setSelectionRange(a[0],a[1]),zul.mesh.Paging._autoFocusInfo=null);this.isBothPaging()&&(jq(this.parent.$n("pgib")).find("."+this.$s())[0].id="")},unbind_:function(){var a=this.uuid;if("os"==this.getMold()){a=jq.$$(a,"button");for(var b=a.length;b--;)jq(a[b]).off("click")}else{b=jq.$$(a,"real");for(var c=["first","prev","last","next"],d=b.length;d--;)jq(b[d]).off("keydown",this.proxy(this._domKeyDown)).off("blur",this.proxy(this._domBlur));
for(d=c.length;d--;){var e=jq.$$(a,c[d]);for(b=e.length;b--;)jq(e[b]).off("click",this.proxy(this["_dom"+c[d]+"Click"]))}}zWatch.unlisten({onSize:this});this.$supers(zul.mesh.Paging,"unbind_",arguments)},_domKeyDown:function(a){var b=a.target;if(!b.disabled&&!b.readOnly){var c=a.keyCode;switch(c){case 48:case 96:case 49:case 97:case 50:case 98:case 51:case 99:case 52:case 100:case 53:case 101:case 54:case 102:case 55:case 103:case 56:case 104:case 57:case 105:break;case 37:break;case 38:this.$class._increase(b,
this,1);a.stop();break;case 39:break;case 40:this.$class._increase(b,this,-1);a.stop();break;case 33:this.$class._increase(b,this,-1);this.$class.go(this,b.value-1,b);a.stop();break;case 34:this.$class._increase(b,this,1);this.$class.go(this,b.value-1,b);a.stop();break;case 36:this.$class.go(this,0,b);a.stop();break;case 35:this.$class.go(this,this._pageCount-1,b);a.stop();break;case 9:case 8:case 46:break;case 13:this.$class._increase(b,this,0);this.$class.go(this,b.value-1,b);a.stop();break;default:112<=
c&&123>=c||a.ctrlKey||a.altKey||a.stop()}}},_domBlur:function(a){var b=a.target;b.disabled||b.readOnly||(this.$class._increase(b,this,0),this.$class.go(this,b.value-1),a.stop())},_domfirstClick:function(a){if(!this._disabled){var b=this.uuid,c=["first","prev"];if(0!=this.getActivePage()){this.$class.go(this,0);for(var d=c.length;d--;)for(var e=jq.$$(b,c[d]),g=e.length;g--;)jq(e[g]).attr("disabled",!0)}this.$class._callWgtDoAfterGo(this,a.currentTarget,"first")}},_domprevClick:function(a){if(!this._disabled){var b=
this.uuid,c=this.getActivePage(),d=["first","prev"];if(0<c&&(this.$class.go(this,c-1),0==c-1))for(c=d.length;c--;)for(var e=jq.$$(b,d[c]),g=e.length;g--;)jq(e[g]).attr("disabled",!0);this.$class._callWgtDoAfterGo(this,a.currentTarget,"prev")}},_domnextClick:function(a){if(!this._disabled){var b=this.uuid,c=this.getActivePage(),d=this.getPageCount(),e=["last","next"];if(c<d-1&&(this.$class.go(this,c+1),c+1==d-1))for(c=e.length;c--;){d=jq.$$(b,e[c]);for(var g=d.length;g--;)jq(d[g]).attr("disabled",
!0)}this.$class._callWgtDoAfterGo(this,a.currentTarget,"next")}},_domlastClick:function(a){if(!this._disabled){var b=this.uuid,c=this.getPageCount(),d=["last","next"];if(this.getActivePage()<c-1)for(this.$class.go(this,c-1),c=d.length;c--;)for(var e=jq.$$(b,d[c]),g=e.length;g--;)jq(e[g]).attr("disabled",!0);this.$class._callWgtDoAfterGo(this,a.currentTarget,"last")}},onSize:function(){if(this.desktop){var a=jq.$$(this.uuid);if(0<a.length){var b=a[0],c=this.$class._getNavWidth(b,this);c=jq(b).width()>
c+50;if(b=this._lastIsWide!=c)this._lastIsWide=this._showFirstLast=c;for(c=0;c<a.length;c++)this.$class._fixControl(a[c],this,b)}}},_doAfterGo:zk.$void},{go:function(a,b,c){var d=zk.Widget.isInstance(a)?a:zk.Widget.$(a);if(d&&d.getActivePage()!=b){if(c){a=d.uuid;var e=zul.mesh.Paging._autoFocusInfo={uuid:a};e.lastPos=zk(c).getSelectionRange();jq(jq.$$(a,"real")).each(function(g){if(this==c)return e.inpIdx=g,!1})}else"os"==d.getMold()&&d._doAfterGo(a.text);d.fire("onPaging",b)}},_increase:function(a,
b,c){var d=zk.parseInt(a.value);d+=c;1>d?d=1:d>b._pageCount&&(d=b._pageCount);a.value=d},_fixControl:function(a,b,c){var d=jq("> ul",a);a=jq("> .z-paging-info",a);var e=b.getMold();b=b._showFirstLast;c&&"default"==e&&(c=d.find("li"),c.first().toggle(b),c.last().toggle(b));a.css("visibility",function(){return zk(d).isOverlapped(this,1)?"hidden":""})},_getNavWidth:function(a,b){if(b._navWidth)return b._navWidth;var c=0;jq("ul > li",a).each(function(){c+=jq(this).outerWidth(!0)});return b._navWidth=
c},_callWgtDoAfterGo:function(a,b,c){var d=0;jq(jq.$$(a.uuid,c)).each(function(e){if(this==b)return d=e,!1});a._doAfterGo(c,d)}})})();
