var hj=I.ea(I,"AdfDhtmlPanelWindowBasePeer");m("AdfDhtmlPanelWindowBasePeer",hj);
hj.C=function(){I.ra(this,D.wb,D.Bc,D.hh,D.Ad,D.Pc);r.bb(AdfRichPanelWindow);I.sb(this,AdfRichPanelWindow.TITLE_ICON_SOURCE,AdfRichPanelWindow.TITLE,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);I.hc(this,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);I.ii(this,AdfRichPanelWindow.TITLE,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);this.VBa="_hse";this.Sea="_hce";this.UBa="_hee";this.CAa="_cse";this.yAa="_cee";this.KBa="_fse";this.GBa=
"_fce";this.HBa="_fee";this.IBa="_ree";this.JBa="_rse";this.Z4a=[this.VBa,this.Sea,this.UBa,this.CAa,this.yAa,this.KBa,this.GBa,this.HBa,this.IBa,this.JBa];this.OZa="contentContainer";this.iea="_ccntr";this.BAa="data-afr-csfm";this.WBa="tb";this.lea="data-afr-cri";this.Y3a="af|panelWindow::resize-ghost";this.XDa="on";this.g6a="first";this.Hda="af|panelWindow-tr-open-animation-duration";this.Gda="af|panelWindow-tr-animate"};m("AdfDhtmlPanelWindowBasePeer.InitSubclass",hj.C);
hj.prototype.EC=function(a){this.UI();q.b.Ea(a.U())};r.a("AdfDhtmlPanelWindowBasePeer.prototype.handleEscapeKey",{EC:hj.prototype.EC});hj.prototype.ma=function(a){if(!a.Aa()){var b=q.b,d=a.U(),e=b.ca(d);d.keyCode==w.tf?(d.shiftKey?J.ni(e,this.i(),0,null,!0):J.ce(e,this.i(),null,null,!0),b.Ea(d),a.wc()):d.keyCode==w.Ih&&(this.EC(a),a.wc())}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyDown",{ma:hj.prototype.ma});
hj.prototype.Yb=function(a){a.Aa()||(a.U(),a.na()==w.jb&&(this.NJ(a)?(a.cancel(),a.wc(),this.UI()):this.o0(a)&&this.A0()))};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyPress",{Yb:hj.prototype.Yb});hj.prototype.za=function(a){if(!a.Aa()){var b=a.U(),d=a.na();d==w.gd?this.NJ(a)&&(this.UI(),a.cancel(),a.wc()):b.ctrlKey&&b.altKey&&d==w.xK&&!this.f().getModal()&&(Si.$().CY(),a.cancel(),a.wc())}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyUp",{za:hj.prototype.za});
hj.prototype.Ta=function(a){a.Wd()==Qa.Ef&&a instanceof ja&&ij(this,a,!1)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentFocus",{Ta:hj.prototype.Ta});function ij(a,b,d){if(!b.Aa()){var e=a.f(),f=a.i(),g=b.X();C.Nb(f,g)&&(a=a.lM(e))&&a.mZ(d)&&(b.cancel(),b.wc())}}
function jj(a,b){ij(a,b,!0);var d=a.f();if(d==b.getSource()&&d.K("resize")==hj.XDa&&!A.c.rl()){var e=b.U(),f=q.b,g=f.ca(e),h=g.id;if(h&&(h=h.split("::"),1<h.length&&(h=h[h.length-1],-1<E.indexOf(hj.Z4a,h)&&(d=a.lM(d))&&!d.ss()&&C.Nb(d.gl(),g)))){f.preventDefault(e);var g=A.c,l=q.b,f=l.ca(e).style;u.J(h);a.Xja=h;h=d.EH();u.J(h);a.Jna=d;u.s(d,Ri);a.pqa();var h=I.la(h,hj.iea),n=a.coa=l.getElementById(h);u.u(n,"DIV");var t=n.style,y=q.Ma(t.width),z=q.Ma(t.height),h=q.Ma(t.minWidth),l=q.Ma(t.minHeight);
a.Cla=y=0<y?y:n.offsetWidth;a.Bla=z=0<z?z:n.offsetHeight;t.height=z+"px";t.width=y+"px";n=a.lh=n.ownerDocument.createElement("div");t=g.H().getStyleClass(a.yJ());C.w(n,t);var t=d.getWidth()-2,B=d.getHeight()-2,y=a.bja=t-y,z=a.cja=B-z;g.Gg().Ur(n,ej.iJ);g=n.style;g.cursor=f.cursor;g.top=d.vP()+"px";g.left=d.$O()+"px";g.width=t+"px";g.height=B+"px";g.minWidth=h+y+"px";g.minHeight=l+z+"px";d.haa(!0);d.raa(!1);A.c.Md(e,a.ina,a.jna,a.Tub,!0);b.cancel()}}}
hj.prototype.M=function(a){a.ec()&&(this.NJ(a)?this.UI():this.o0(a)&&this.A0())};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentClick",{M:hj.prototype.M});hj.prototype.NJ=function(a){a=a.X();var b=this.f(),b=I.j(b.g(),"close");return a.id==b?!0:a.parentNode.id==b};r.a("AdfDhtmlPanelWindowBasePeer.prototype.IsClose",{NJ:hj.prototype.NJ});hj.prototype.o0=function(a){a=a.X();var b=this.f(),b=I.j(b.g(),"pin");return a.id==b?!0:a.parentNode.id==b};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.IsPin",{o0:hj.prototype.o0});hj.prototype.nya=function(){var a=this.f().getParent();a instanceof AdfRichPopup?a.Tb():this.SH(a)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.Hide",{nya:hj.prototype.nya});hj.prototype.UI=function(){var a=this.f().getParent();a instanceof AdfRichPopup?a.cancel():this.ak(a)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.Cancel",{UI:hj.prototype.UI});
hj.prototype.A0=function(){var a=this.f().getParent();if(a instanceof AdfRichPopup&&a[I.Zo]){var b=a[I.Zo][a.g()].Ha();A.c.el().rqa(a,b)}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.Pin",{A0:hj.prototype.A0});hj.prototype.Init=function(a,b){hj.h.Init.call(this,a,b);this.ina=this.D(this.Rka);this.jna=this.D(this.Ska);this.D(this.zgb)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.Init",{Init:hj.prototype.Init});
hj.prototype.G=function(a){var b=a.getParent();null==b&&(b=a);var d={};d.modal=a.getModal();d.dragElement=this.e9();"none"!=a.getInitialFocus()||a.getModal()?d.focus=!0:d.focus=!1;d.autodismiss="autodismissInactivate";d.type="dialogWindow";d[AdfRichPopup.Ed]=AdfRichPopup.DQ;d.componentEventsEnabled=!0;xc.Gua(b,d)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.InitDomElement",{G:hj.prototype.G});hj.prototype.e9=function(){var a=I.j(this.f().g(),hj.WBa);return q.b.getElementById(a)};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.getDragElement",{e9:hj.prototype.e9});hj.prototype.SQ=function(a,b,d){b=q.b;a=I.j(a.g(),"_ttxt");a=b.getElementById(a);b.bc(a,d);return!0};r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentTitleChanged",{SQ:hj.prototype.SQ});
hj.prototype.Swa=function(a,b,d){b=q.b;a=I.j(a.g(),"_ticn");a=b.getElementById(a);var e=b.R().createElement("img");e.alt="";b.vv(e,d);d?(a.hasChildNodes()?a.replaceChild(e,a.firstChild):a.appendChild(e),C.setVisible(a,!0)):C.setVisible(a,!1)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentTitleIconSourceChanged",{Swa:hj.prototype.Swa});hj.prototype.xwa=function(a,b,d){hj.a5(a).style.width=d+"px";b.setAttribute(hj.lea,"1");return!0};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentContentWidthChanged",{xwa:hj.prototype.xwa});hj.prototype.vwa=function(a,b,d){hj.a5(a).style.height=d+"px";b.setAttribute(hj.lea,"1");return!0};r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentContentHeightChanged",{vwa:hj.prototype.vwa});hj.prototype.yxa=function(a){a=hj.a5(a);var b=a.style;return b.width?q.Ma(b.width):a.offsetWidth};r.a("AdfDhtmlPanelWindowBasePeer.prototype.GetComponentContentWidth",{yxa:hj.prototype.yxa});
hj.prototype.xxa=function(a){a=hj.a5(a);var b=a.style;return b.height?q.Ma(b.height):a.offsetHeight};r.a("AdfDhtmlPanelWindowBasePeer.prototype.GetComponentContentHeight",{xxa:hj.prototype.xxa});hj.a5=function(a){var b=a.g(),d=null,d=null;a.K("resize")==hj.XDa||a.K("stretchChildren")==hj.g6a?(d=I.la(b,hj.iea),d=q.b.getElementById(d),u.u(d,"DIV")):(d=I.la(b,hj.OZa),d=q.b.getElementById(d),u.u(d,"TD"));return d};
hj.prototype.lM=function(a){var b=null,d=(a=a.getParent())?a.o():null;if(d)if(d.bind(a),a instanceof AdfRichPopup)b=d.Xp(a,a.g());else{a=d.ly(a);for(var e in a)if(d=a[e],d instanceof Ri){b=d;break}}u.$j(b,Ri);return b};hj.prototype.tb=function(a,b){hj.h.tb.call(this,a,b);if(A.c.mta()){var d=this.lM(a);d&&d.S9()}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.BindToComponent",{tb:hj.prototype.tb});hj.prototype.ka=function(a){(a=this.lM(a))&&a.Rsa()};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentRemoved",{ka:hj.prototype.ka});
hj.prototype.pqa=function(){var a=this.f().g(),b=q.b,d=I.la(a,hj.iea),d=b.getElementById(d);u.u(d,"DIV");if(!d.hasAttribute(hj.BAa)){var e=I.la(a,hj.Sea),f=b.getElementById(e);u.u(f,"TD");for(var e=Math.max(1,f.offsetWidth),g=I.la(a,hj.WBa),f=f.getElementsByTagName("TD"),h=a=0;h<f.length;h++){var l=f[h],n=null;l.id&&l.id==g&&(n=l.style.width,l.style.width="1px");for(var t=C.Dc(l),y=0;y<t.length;y++)var z=t[y],a=a+b.gP(z,z.offsetWidth);l.id&&l.id==g&&(l.style.width=n)}b=q.Ma(d.style.minWidth);b=Math.max(b,
a);d.style.minWidth=b+"px";b=q.Ma(d.style.minHeight);b=Math.max(b,Math.round(a/e*Math.max(1,d.offsetHeight)));d.style.minHeight=b+"px";d.setAttribute(hj.BAa,"1")}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.calculateMinimumContentSize",{pqa:hj.prototype.pqa});hj.prototype.yJ=function(){return hj.Y3a};r.a("AdfDhtmlPanelWindowBasePeer.prototype.GetResizeGhostSelector",{yJ:hj.prototype.yJ});
hj.prototype.Rka=function(a){var b=q.b,d=b.zf(),e=b.Pe(),f=b.getWindowWidth(),g=b.getWindowHeight(),h=this.Xja;u.J(h);var l=this.lh;u.u(l,"DIV");var l=l.style,n=q.Ma(l.width),t=q.Ma(l.height);a=b.Xb(a);if(!(a.x<e||a.x>f+e||a.y<d||a.y>g+d)){var d=q.Ma(l.minWidth),e=q.Ma(l.minHeight),f=q.Ma(l.top),g=q.Ma(l.left),b=f,y=g,z=n,B=t;switch(h){case hj.VBa:f=a.y;t+=b-a.y;g=a.x;n+=y-a.x;t<e&&(f=b,t=B);n<d&&(g=y,n=z);break;case hj.Sea:f=a.y;t+=b-a.y;t<e&&(f=b,t=B);break;case hj.UBa:f=a.y;t+=b-a.y;n=a.x-y;t<
e&&(f=b,t=B);n<d&&(n=z);break;case hj.CAa:g=a.x;n+=y-a.x;n<d&&(g=y,n=z);break;case hj.yAa:n=a.x-y;n<d&&(n=z);break;case hj.JBa:case hj.KBa:g=a.x;n+=y-a.x;t=a.y-b;n<d&&(g=y,n=z);t<e&&(t=B);break;case hj.GBa:t=a.y-b;t<e&&(t=B);break;case hj.IBa:case hj.HBa:t=a.y-b,n=a.x-y,t<e&&(t=B),n<d&&(n=z)}b!=f&&(l.top=f+"px");y!=g&&(l.left=g+"px");B!=t&&(l.height=t+"px");z!=n&&(l.width=n+"px")}};
hj.prototype.Ska=function(){var a=A.c,b=this.lh;u.u(b,"DIV");var d=b.style,e=this.Jna;u.s(e,Ri);var f=e.EH();u.J(f);var g=this.Cla;u.Xf(g);var h=this.Bla;u.Xf(h);var l=this.coa;u.u(l,"DIV");var n=this.bja;u.Xf(n);var t=this.cja;u.Xf(t);delete this.Xja;delete this.Jna;delete this.Cla;delete this.Bla;delete this.coa;delete this.bja;delete this.cja;delete this.lh;var y=q.Ma(d.top),z=q.Ma(d.left),n=q.Ma(d.width)-n,d=q.Ma(d.height)-t;(f=a.m(f))&&f.getContentWidth&&f.getContentHeight&&(f.o().bind(f),n!=
g&&f.setProperty(AdfRichPanelWindow.CONTENT_WIDTH,n,!0,!0),d!=h&&f.setProperty(AdfRichPanelWindow.CONTENT_HEIGHT,d,!0,!0));a.Gg().Ti(b);e.Ip();a.jo(l,!1);e.haa(!1);e.raa(!0);e.setPosition(y,z)};hj.prototype.zgb=function(){var a=this.lh;u.u(a,"DIV");delete this.Xja;delete this.Jna;delete this.Cla;delete this.Bla;delete this.coa;delete this.bja;delete this.cja;delete this.lh;A.c.Gg().Ti(a)};hj.prototype.lta=function(a){var b=a.o();b.bind(a);return(a=b.i().getAttribute(hj.lea))&&"1"==a};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.isContentResized",{lta:hj.prototype.lta});hj.prototype.HO=function(){return hj.Hda};r.a("AdfDhtmlPanelWindowBasePeer.prototype.getAnimationDurationSkinProperty",{HO:hj.prototype.HO});hj.prototype.GO=function(){return hj.Gda};r.a("AdfDhtmlPanelWindowBasePeer.prototype.getAnimateSkinProperty",{GO:hj.prototype.GO});