var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(d,a,b){if(null==d)throw new TypeError("The 'this' value for String.prototype."+b+" must not be null or undefined");if(a instanceof RegExp)throw new TypeError("First argument to String.prototype."+b+" must not be a regular expression");return d+""};$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(d,a,b){d!=Array.prototype&&d!=Object.prototype&&(d[a]=b.value)};$jscomp.getGlobal=function(d){return"undefined"!=typeof window&&window===d?d:"undefined"!=typeof global&&null!=global?global:d};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(d,a,b,c){if(a){b=$jscomp.global;d=d.split(".");for(c=0;c<d.length-1;c++){var g=d[c];g in b||(b[g]={});b=b[g]}d=d[d.length-1];c=b[d];a=a(c);a!=c&&null!=a&&$jscomp.defineProperty(b,d,{configurable:!0,writable:!0,value:a})}};
$jscomp.polyfill("String.prototype.endsWith",function(d){return d?d:function(a,b){var c=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===b&&(b=c.length);b=Math.max(0,Math.min(b|0,c.length));for(var g=a.length;0<g&&0<b;)if(c[--b]!=a[--g])return!1;return 0>=g}},"es6","es3");
(function(){function d(a,b,c){var g=a.getCollapse();if(g&&"none"!=g){var d=a.$n("chdex"),p=a.isVertical(),e=a.$class,f="before"==g;g=f?e._prev(d):e._next(d);var h=zk.Widget.$(g),n=p?"height":"width",l=0;if(g){b||zWatch.fireDown("onHide",h);h.setDomVisible_(g,b);h.parent._fixChildDomVisible(h,b);var m=p&&g.cells.length?g.cells[0]:g;l=zk.parseInt(m.style[n]);!f&&h&&!h.nextSibling&&(m=a.$n("chdex2"))&&(m.style.display=b?"":"none",l+=zk.parseInt(m.style[n]))}if(d=f?e._next(d):e._prev(d))m=p&&d.cells.length?
d.cells[0]:d,(sz=m.style[n])&&-1<sz.indexOf("px")&&(l=zk.parseInt(m.style[n])+(b?-l:l),0>l&&(l=0),m.style[n]=l+"px");g&&b&&zUtl.fireShown(h);d&&zUtl.fireSized(zk.Widget.$(d),-1);a._fixNSDomClass();a._fixbtn();a._fixszAll();c&&!c.sendOnOpen||a.fire("onOpen",{open:b})}}zul.box.Splitter=zk.$extends(zul.Widget,{_collapse:"none",_open:!0,$define:{open:function(a,b){this.desktop&&d(this,a,b)}},isVertical:function(){var a=this.parent;return!a||a.isVertical()},getOrient:function(){var a=this.parent;return a?
a.getOrient():"vertical"},getCollapse:function(){return this._collapse},setCollapse:function(a){if(this._collapse!=a){var b=this._open;b||this.setOpen(!0,{sendOnOpen:!1});this._collapse=a;this.desktop&&(this._fixbtn(),this._fixsz());b||this.setOpen(!1,{sendOnOpen:!1})}},domClass_:function(a){var b=this.$supers("domClass_",arguments);a&&a.zclass||(b+=" "+this.$s("vertical"==this.getOrient()?"vertical":"horizontal"));return b},setZclass:function(){this.$supers("setZclass",arguments);this.desktop&&this._fixDomClass(!0)},
bind_:function(){this.$supers(zul.box.Splitter,"bind_",arguments);var a=this.parent;a&&!a._splitterKid&&a._bindWatch();zWatch.listen({onSize:this,beforeSize:this});this._fixDomClass();a=this.$n();var b=this.$class;this.$weave||jq(this.$n("btn")).click(b.onclick);this._fixbtn();this._drag=new zk.Draggable(this,a,{constraint:this.getOrient(),ignoredrag:b._ignoresizing,ghosting:b._ghostsizing,overlay:!0,zIndex:12E3,initSensitivity:0,snap:b._snap,endeffect:b._endDrag});this._shallClose=!this._open},unbind_:function(){zWatch.unlisten({onSize:this,
beforeSize:this});var a=this.$class,b;(b=this.$n("btn"))&&jq(b).unbind("click",a.onclick);this._drag.destroy();this._drag=null;this.$supers(zul.box.Splitter,"unbind_",arguments)},_fixDomClass:function(a){var b=this.$n().parentNode;b&&(this.isVertical()&&(b=b.parentNode),b&&b.id.endsWith("chdex")&&(b.className=this.$s("outer")));a&&this._fixbtn()},_fixNSDomClass:function(){jq(this.$n())[this._open?"removeClass":"addClass"](this.$s("nosplitter"))},_fixbtn:function(){var a=jq(this.$n("btn")),b=jq(this.$n("icon")),
c=this.getCollapse();c&&"none"!=c?(c="before"==c,this._open||(c=!c),this.isVertical()?jq(this.$n("icon")).removeClass(c?"z-icon-caret-down":"z-icon-caret-up").addClass(c?"z-icon-caret-up":"z-icon-caret-down"):jq(this.$n("icon")).removeClass(c?"z-icon-caret-right":"z-icon-caret-left").addClass(c?"z-icon-caret-left":"z-icon-caret-right"),a.removeClass(this.$s("button-disabled")),b.show()):(a.addClass(this.$s("button-disabled")),b.hide())},setBtnPos_:function(a){var b=this.$n("btn"),c=this.$n();a?b.style.marginLeft=
(c.offsetWidth-b.offsetWidth)/2+"px":b.style.marginTop=(c.offsetHeight-b.offsetHeight)/2+"px"},_fixsz:_zkf=function(){if(this.isRealVisible()){var a=this.$n(),b=a.parentNode;b&&(b.style.width="",this.getCollapse(),this.isVertical()?(a.style.width="100%",this.setBtnPos_(!0)):(a.style.height=(zk.webkit?b.parentNode.clientHeight:b.clientHeight)+"px",this.setBtnPos_()));this._shallClose&&(delete this._shallClose,d(this,!1,{sendOnOpen:!1}))}},onSize:_zkf,beforeSize:function(){this.$n().style[this.isVertical()?
"width":"height"]="";this.$n("btn").style[this.isVertical()?"margin-left":"margin-top"]=""},_fixszAll:function(){for(var a,b=this;b=b.parent;)b.$instanceof(zul.box.Box)&&(a=b);a?this.$class._fixKidSplts(a):this._fixsz()}},{onclick:function(a){a=zk.Widget.$(a);a.setOpen(!a._open)},_ignoresizing:function(a,b,c){b=a.control;if(!b._open||b.$n("icon")==c.domTarget)return!0;a=a.run={};c=b.$n();var d=b.$n("chdex"),r=zul.box.Splitter;a.prev=r._prev(d);a.next=r._next(d);if(!a.prev||!a.next)return!0;a.prevwgt=
b.previousSibling;a.nextwgt=b.nextSibling;a.z_offset=zk(c).cmOffset();return!1},_ghostsizing:function(a,b,c){a=zk(a.node.parentNode);jq(document.body).append('<div id="zk_ddghost" class="z-splitter-ghost" style="font-size:0;line-height:0;background:#AAA;position:absolute;top:'+b[1]+"px;left:"+b[0]+"px;width:"+a.offsetWidth()+"px;height:"+a.offsetHeight()+'px;"></div>');return jq("#zk_ddghost")[0]},_endDrag:function(a){var b=a.control,c=b.isVertical();b.$n();var d=zul.box.Splitter,r=d._fixLayout(b),
p="before"==b.getCollapse(),e=a.run;var f=["width","height"];if(c){var h=e.z_point[1];var n=f[1];e.next&&e.next.cells.length&&(e.next=e.next.cells[0]);e.prev&&e.prev.cells.length&&(e.prev=e.prev.cells[0])}else h=e.z_point[0],n=f[0];var l=e.next,m=e.prev,t=e.nextwgt,u=e.prevwgt;0>h&&(l=e.prev,m=e.next,h=-h,p=!p);if(h){e=[t,u];t=[];u=[];if(l&&m){var q=[];for(var k=0;2>k;k++)q[k]=f[k].charAt(0).toUpperCase()+f[k].slice(1);c=c?q[1]:q[0];s=l["client"+c];s2=m["client"+c];totalFd=s+s2;for(k=0;2>k;k++)if(f=
e[k])f.getHflex()&&(f.setHflex("false"),t[k]=!0),f.getVflex()&&(f.setVflex("false"),u[k]=!0),zWatch.fireDown("beforeSize",f);s-=h;0>s&&(s=0);h=totalFd-s;l.style[n]=s+"px";m.style[n]=h+"px";c=l["client"+c];f=totalFd-c;c!=s&&(l.style[n]=c+"px");f!=h&&(m.style[n]=f+"px");p?m.style.overflow="hidden":l.style.overflow="hidden"}for(k=0;2>k;k++){if((f=e[k])&&t[k])f["set"+q[0]]("100%");if(f&&u[k])f["set"+q[1]]("100%");zUtl.fireSized(f,-1)}d._unfixLayout(r);b._fixszAll();a.run=null}},_snap:function(a,b){var c=
a.run;var d=a.control;a=b[0];b=b[1];d.isVertical()?b<=c.z_offset[1]-c.prev.offsetHeight?b=c.z_offset[1]-c.prev.offsetHeight:(d=c.z_offset[1]+c.next.offsetHeight-d.$n().offsetHeight,b>d&&(b=d)):a<=c.z_offset[0]-c.prev.offsetWidth?a=c.z_offset[0]-c.prev.offsetWidth:(d=c.z_offset[0]+c.next.offsetWidth-d.$n().offsetWidth,a>d&&(a=d));c.z_point=[a-c.z_offset[0],b-c.z_offset[1]];return[a,b]},_next:function(a){return jq(a).next().next()[0]},_prev:function(a){return jq(a).prev().prev()[0]},_fixKidSplts:function(a){if(a.isVisible()){var b=
zul.box.Splitter;a.$instanceof(b)&&a._fixsz();for(a=a.firstChild;a;a=a.nextSibling)b._fixKidSplts(a)}}});zk.opera?(zul.box.Splitter._fixLayout=function(a){a=a.parent.$n();if("fixed"!=a.style.tableLayout){var b=[a,a.style.tableLayout];a.style.tableLayout="fixed";return b}},zul.box.Splitter._unfixLayout=function(a){a&&(a[0].style.tableLayout=a[1])}):zul.box.Splitter._fixLayout=zul.box.Splitter._unfixLayout=zk.$void})();
