var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(e,a,b){if(null==e)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 e+""};$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(e,a,b){if(e==Array.prototype||e==Object.prototype)return e;e[a]=b.value;return e};
$jscomp.getGlobal=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var a=0;a<e.length;++a){var b=e[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(e,a){var b=$jscomp.propertyToPolyfillSymbol[a];if(null==b)return e[a];b=e[b];return void 0!==b?b:e[a]};$jscomp.polyfill=function(e,a,b,c){a&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(e,a,b,c):$jscomp.polyfillUnisolated(e,a,b,c))};
$jscomp.polyfillUnisolated=function(e,a,b,c){b=$jscomp.global;e=e.split(".");for(c=0;c<e.length-1;c++){var d=e[c];if(!(d in b))return;b=b[d]}e=e[e.length-1];c=b[e];a=a(c);a!=c&&null!=a&&$jscomp.defineProperty(b,e,{configurable:!0,writable:!0,value:a})};
$jscomp.polyfillIsolated=function(e,a,b,c){var d=e.split(".");e=1===d.length;c=d[0];c=!e&&c in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var h=0;h<d.length-1;h++){var k=d[h];if(!(k in c))return;c=c[k]}d=d[d.length-1];b=$jscomp.IS_SYMBOL_NATIVE&&"es6"===b?c[d]:null;a=a(b);null!=a&&(e?$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("String.prototype.endsWith",function(e){return e?e: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 d=a.length;0<d&&0<b;)if(c[--b]!=a[--d])return!1;return 0>=d}},"es6","es3");
(function(){function e(a,b,c){var d=a.getCollapse();if(d&&"none"!=d){var h=a.$n("chdex"),k=a.isVertical(),g=a.$class,p="before"==d;d=p?g._prev(h):g._next(h);var l=zk.Widget.$(d),m=k?"height":"width",f=0;if(d){b||zWatch.fireDown("onHide",l);l.setDomVisible_(d,b);l.parent._fixChildDomVisible(l,b);var n=k&&d.cells.length?d.cells[0]:d;f=zk.parseInt(n.style[m]);!p&&l&&!l.nextSibling&&(n=a.$n("chdex2"))&&(n.style.display=b?"":"none",f+=zk.parseInt(n.style[m]))}if(h=p?g._next(h):g._prev(h))n=k&&h.cells.length?
h.cells[0]:h,(k=n.style[m])&&-1<k.indexOf("px")&&(f=zk.parseInt(n.style[m])+(b?-f:f),0>f&&(f=0),n.style[m]=f+"px");d&&b&&zUtl.fireShown(l);h&&zUtl.fireSized(zk.Widget.$(h),-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&&e(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;if(!this.$weave)jq(this.$n("btn")).on("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).off("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.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,e(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);var b=a.getCollapse();b&&"none"!=b&&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"),h=zul.box.Splitter;a.prev=h._prev(d);a.next=h._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(),d=zul.box.Splitter,
h=d._fixLayout(b),k="before"==b.getCollapse(),g=a.run;if(c){var p=g.z_point[1];g.next&&g.next.cells.length&&(g.next=g.next.cells[0]);g.prev&&g.prev.cells.length&&(g.prev=g.prev.cells[0])}else p=g.z_point[0];var l=g.next,m=g.prev,f=g.nextwgt,n=g.prevwgt;0>p&&(l=g.prev,m=g.next,p=-p,k=!k);p&&(l&&m&&d._doDragEndResize(c,[f,n],m,l,p,k),d._unfixLayout(h),b._fixszAll(),a.run=null)},_doDragEndResize:function(a,b,c,d,h,k){for(var g=[],p=[],l=[],m=["width","height"],f=0;2>f;f++)g[f]=m[f].charAt(0).toUpperCase()+
m[f].slice(1);var n=a?g[1]:g[0],r=d["client"+n],t=r+c["client"+n];f=0;for(var q;2>f;f++)if(q=b[f])q.getHflex()&&(q.setHflex("false"),p[f]=!0),q.getVflex()&&(q.setVflex("false"),l[f]=!0),zWatch.fireDown("_preBeforeSizeReadOnly",q),zWatch.fireDown("beforeSize",q);r-=h;0>r&&(r=0);h=t-r;a=a?m[1]:m[0];d.style[a]=r+"px";c.style[a]=h+"px";k?c.style.overflow="hidden":d.style.overflow="hidden";for(f=0;2>f;f++){if((q=b[f])&&p[f])q["set"+g[0]]("100%");if(q&&l[f])q["set"+g[1]]("100%");zUtl.fireSized(q,-1)}b=
d["client"+n];t-=b;b!=r&&(d.style[a]=b+"px");t!=h&&(c.style[a]=t+"px")},_snap:function(a,b){var c=a.run,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})();
