var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(d,h,f){if(null==d)throw new TypeError("The 'this' value for String.prototype."+f+" must not be null or undefined");if(h instanceof RegExp)throw new TypeError("First argument to String.prototype."+f+" 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,h,f){d!=Array.prototype&&d!=Object.prototype&&(d[h]=f.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,h,f,m){if(h){f=$jscomp.global;d=d.split(".");for(m=0;m<d.length-1;m++){var k=d[m];k in f||(f[k]={});f=f[k]}d=d[d.length-1];m=f[d];h=h(m);h!=m&&null!=h&&$jscomp.defineProperty(f,d,{configurable:!0,writable:!0,value:h})}};
$jscomp.polyfill("String.prototype.startsWith",function(d){return d?d:function(d,f){var h=$jscomp.checkStringArgs(this,d,"startsWith");d+="";var k=h.length,q=d.length;f=Math.max(0,Math.min(f|0,h.length));for(var n=0;n<q&&f<k;)if(h[f++]!=d[n++])return!1;return n>=q}},"es6","es3");
$jscomp.polyfill("String.prototype.endsWith",function(d){return d?d:function(d,f){var h=$jscomp.checkStringArgs(this,d,"endsWith");d+="";void 0===f&&(f=h.length);f=Math.max(0,Math.min(f|0,h.length));for(var k=d.length;0<k&&0<f;)if(h[--f]!=d[--k])return!1;return 0>=k}},"es6","es3");
(function(){function d(a,e,b,c){l!=a||p!=e?(m(),n={tip:a,ref:e,params:b,timer:setTimeout(function(){var a=n;if(a){l=a.tip;p=a.ref;n=null;var b=p.$n();if(b&&zk(b).isRealVisible()){a=a.params;b=a.x;var e=a.y;b&&(a.x=q(c,b));e&&(a.y=q(c,e));l.open(p,void 0!==a.x?[a.x,a.y]:zk.currentPointer,a.position?a.position:null===a.x?"after_pointer":null,{sendOnOpen:!0})}else l=p=null}},void 0!==b.delay?b.delay:zk.tipDelay)}):f()}function h(){var a=n;a&&(n=null,clearTimeout(a.timer))}function f(){var a=r;a&&(r=
null,clearTimeout(a))}function m(){h();f();var a=l;if(a&&a.desktop){var e=jq(a.$n()),b=e.offset(),c=zk.currentPointer;c[0]>=b.left&&c[0]<=b.left+e.width()&&c[1]>=b.top&&c[1]<=b.top+e.height()||(l=p=null,a.close({sendOnOpen:!0}))}}function k(a){zk.error("setCtrlKeys: "+a)}function q(a,e){return-1!=e.indexOf("(")&&-1!=e.indexOf(")")?(new Function("event","return "+e+";"))(a):zk.parseInt(e)}var n,r,l,p;zul.Widget=zk.$extends(zk.Widget,{getContext:function(){return this._context},setContext:function(a){zk.Widget.isInstance(a)&&
(a="uuid("+a.uuid+")");this._context=a;return this},getPopup:function(){return this._popup},setPopup:function(a){zk.Widget.isInstance(a)&&(a="uuid("+a.uuid+")");this._popup=a;return this},getTooltip:function(){return this._tooltip},setTooltip:function(a){zk.Widget.isInstance(a)&&(a="uuid("+a.uuid+")");this._tooltip=a;return this},getCtrlKeys:function(){return this._ctrlKeys},setCtrlKeys:function(a){if(this._ctrlKeys!=a){if(a){for(var e=[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],b=0,c=0,d=a.length;c<
d;++c){var g=a.charAt(c);switch(g){case "^":case "@":case "$":case "%":var f="^"==g?1:"@"==g?2:"$"==g?4:8;if(0!=(b&f))return k("Unexpected key combination: "+a);b|=f;break;case "#":for(f=c+1;f<d;++f){var h=a.charAt(f);if(("Z"<h||"A">h)&&("z"<h||"a">h)&&("9"<h||"0">h))break}if(f==c+1)return k("Unexpected character "+g+" in "+a);c=a.substring(c+1,f).toLowerCase();if("pgup"==c)g=33;else if("pgdn"==c)g=34;else if("end"==c)g=35;else if("home"==c)g=36;else if("left"==c)g=37;else if("up"==c)g=38;else if("right"==
c)g=39;else if("down"==c)g=40;else if("ins"==c)g=45;else if("del"==c)g=46;else if("bak"==c)g=8;else if(1<c.length&&"f"==c.charAt(0)){c=zk.parseInt(c.substring(1));if(0==c||12<c)return k("Unsupported function key: #f"+c);g=112+c-1}else return k("Unknown #"+c+" in "+a);e[b][g]=!0;b=0;c=f-1;break;default:if(!b||("Z"<g||"A">g)&&("z"<g||"a">g)&&("9"<g||"0">g))return k("Unexpected character "+g+" in "+a);if(4==b)return k("$a - $z not supported (found in "+a+"). Allowed: $#f1, $#home and so on.");"z">=g&&
"a"<=g&&(g=g.toUpperCase());e[b][g.charCodeAt(0)]=!0;b=0}}this._parsedCtlKeys=e;this._ctrlKeys=a;return this}this._ctrlKeys=this._parsedCtlKeys=null}},_parsePopParams:function(a,e){var b={},c=a.indexOf(","),d=a.indexOf("="),g=a;-1!=d&&(g=a.substring(0,a.substring(0,d).lastIndexOf(",")));if(-1!=c){b.id=g.substring(0,c).trim();if(c=g.substring(c+1,g.length))b.position=c.trim();zk.copy(b,zUtl.parseMap(a.substring(g.length,a.length)))}else b.id=a.trim();if(this._popup||this._context)a=b.x,g=b.y,a&&(b.x=
q(e,a)),g&&(b.y=q(e,g));b.delay&&(b.delay=zk.parseInt(b.delay));return b},doClick_:function(a,e){if(!this.shallIgnoreClick_(a)&&!a.contextSelected){var b=this._popup?this._parsePopParams(this._popup,a):{},c=this._smartFellow(b.id);if(c){a.contextSelected=!0;var d=this,g=void 0!==b.x?[b.x,b.y]:[a.pageX,a.pageY];b.type&&"toggle"==b.type&&c.isOpen()?c.close({sendOnOpen:!0}):(c._fakeParent=this,setTimeout(function(){d.desktop&&c.open(d,g,b.position?b.position:null,{sendOnOpen:!0,type:b.type,which:1})},
0));a.stop({dom:!0})}}!0!==e&&this.$supers("doClick_",arguments)},doRightClick_:function(a){if(!this.shallIgnoreClick_(a)&&!a.contextSelected){var e=this._context?this._parsePopParams(this._context,a):{},b=this._smartFellow(e.id);if(b){a.contextSelected=!0;var c=this,d=void 0!==e.x?[e.x,e.y]:[a.pageX,a.pageY];e.type&&"toggle"==e.type&&b.isOpen()?b.close({sendOnOpen:!0}):(b._fakeParent=this,setTimeout(function(){c.desktop&&b.open(c,d,e.position?e.position:null,{sendOnOpen:!0,type:e.type,which:3})},
0));a.stop({dom:!0})}}this.$supers("doRightClick_",arguments)},doTooltipOver_:function(a){var e;if(e=!a.tooltipped)l&&!l.isOpen()&&(h(),f(),l=p=null),(e=l&&zUtl.isAncestor(l,this))&&f(),e=!e;if(e){e=this._tooltip?this._parsePopParams(this._tooltip):{};var b=this._smartFellow(e.id);b&&(a.tooltipped=!0,d(b,this,e,a))}this.$supers("doTooltipOver_",arguments)},doTooltipOut_:function(a){p==this||l==this?(f(),r=setTimeout(m,100)):h();this.$supers("doTooltipOut_",arguments)},_smartFellow:function(a){return a?
a.startsWith("uuid(")&&a.endsWith(")")?zk.Widget.$(a.substring(5,a.length-1)):this.$f(a,!0):null},doKeyDown_:function(a){this.getCtrlKeys()||this.isListen("onOK")||this.isListen("onCancel")?this.afterKeyDown_(a)||this.$supers("doKeyDown_",arguments):this.$supers("doKeyDown_",arguments)},afterKeyDown_:function(a){var e=a.keyCode,b="onCtrlKey",c=zk.mac&&a.metaKey;switch(e){case 13:var d=a.domTarget;var g=jq.nodeName(d);if("textarea"==g||!("button"!=g||d.id&&d.id.endsWith("-a"))||"input"==g&&"button"==
d.type.toLowerCase())return;g=b="onOK";break;case 27:g=b="onCancel";break;case 16:case 17:case 18:return;case 45:case 46:case 8:break;default:if(!(33<=e&&40>=e||112<=e&&123>=e||a.ctrlKey||a.altKey||c))return}for(var f=d=a.target;;f=f.parent){if(!f)return;if(f.isListen(b,{any:!0})){if(g)break;var h=f._parsedCtlKeys,k=0;if(h&&(a.ctrlKey&&(k|=1),a.altKey&&(k|=2),a.shiftKey&&(k|=4),c&&(k|=8),h[k][e]))break}}setTimeout(function(){for(var c=d;;c=c.parent){if(c.beforeCtrlKeys_&&c.beforeCtrlKeys_(a))return;
if(c==f)break}f.fire(b,zk.copy({reference:d},a.data))},0);a.stop();jq.nodeName(a.domTarget,"select")&&a.stop({dom:!0,revoke:!0});11>zk.ie&&112==e&&(zk._oldOnHelp=window.onhelp,window.onhelp=function(){return!1},setTimeout(function(){window.onhelp=zk._oldOnHelp;zk._oldOnHelp=null},200));return!0},beforeCtrlKeys_:function(a){}},{getOpenTooltip:function(){return l&&l.isOpen()?l:null}})})();
