var ms=M.U(ls,"AdfDhtmlPanelDrawerPeer",p);v("AdfDhtmlPanelDrawerPeer",ms);ms.m=function(){z.kb(AdfClientDomTracker);M.ha(this,I.jb);this.L7="_adfTracker";this.aPa="_adfTempFloat";this.koa="p_AFFloat";this.xpa="p_AFOpen";this.QOa="tabp"};v("AdfDhtmlPanelDrawerPeer.InitSubclass",ms.m);
ms.prototype.Za=function(a,b){ms.f.Za.call(this,a,b);var d=M.g(a.e(),"margins");if(d=F.c.Ge(d)){var e=ns(a);d.$3a==e&&(b.style.marginTop=d.marginTop,e?b.style.marginLeft=d.marginLeft:b.style.marginRight=d.marginRight)}return F.c.oa(this,this.KXa,a.e(),0)};z.a("AdfDhtmlPanelDrawerPeer.prototype.BindToComponent",{Za:ms.prototype.Za});
ms.prototype.oo=function(a){ms.f.oo.call(this,a);var b=F.c.Dg();if(this.rq()&&b){var d="open"==F.c.Ge(a.e()),b=this.h();if(d){var d=this.bs(a,a.e()).zn(),e=d[Pg.Az];d[Pg.Az]=p;this.MV=l;this.Qa(a,a.e())&&this.ob(a,a.e());delete this.MV;d[Pg.Az]=e}os(this,a,b)}};z.a("AdfDhtmlPanelDrawerPeer.prototype.NewTabSelected",{oo:ms.prototype.oo});ms.prototype.Ls=function(){this.qr&&ps(this,this.d())};z.a("AdfDhtmlPanelDrawerPeer.prototype.DescendantMessageChanged",{Ls:ms.prototype.Ls});
ms.prototype.Bm=function(a,b){ms.f.Bm.call(this,a);b&&!this.aba&&(this.h(),this.Qa(a,a.e())&&this.ob(a,a.e()))};z.a("AdfDhtmlPanelDrawerPeer.prototype.TabReselected",{Bm:ms.prototype.Bm});ms.prototype.C=function(a){var b=this.d(),d=this.rq();if(d&&qs(this)){var e=a.Q(),f=M.g(b.e(),ms.QOa),f=w.b.getElementById(f);e==f&&this.Bm(b,d)}ms.f.C.call(this,a)};z.a("AdfDhtmlPanelDrawerPeer.prototype.HandleComponentClick",{C:ms.prototype.C});ms.prototype.cF=t(l);
z.a("AdfDhtmlPanelDrawerPeer.prototype.UseInvertedRenderingPosition",{cF:ms.prototype.cF});ms.prototype.AE=t(p);z.a("AdfDhtmlPanelDrawerPeer.prototype.IsDisclosedTabRequired",{AE:ms.prototype.AE});function ps(a,b){var d=F.c,e=b.e(),f=d.Yr(e),e=a.bs(b,e);if(f&&0<f.length)for(var g=0;g<f.length;g++){var h=d.j(f[g]);if(h!=n&&h instanceof AdfUIEditableValue&&!h.getValid()){a.aba=l;e&&e.Tha();return}}e&&e.aia();delete a.aba}
ms.prototype.KXa=function(a){var b=this.d(),d=this.h(),e=M.g(a,ms.L7),f=this.o(this.J1a);AdfClientDomTracker.CBa(d.parentNode,d,e,f,a);if("always"==b.r(AdfRichPanelDrawer.SHOW_HANDLES)){a=d.parentNode;e=w.b;ns(b)?this.D$="left":this.D$="right";var g=rs(this,b,d);(f=w.b.getElementById(g))||D.i.severe("no alignNode could be found for the id "+g);for(var h=a,g=l;h!=f&&g==l;){var m=e.getComputedStyle(h),q=m.overflowX;q||(q=m.overflow);"visible"!=q&&""!=q&&(g=p);h=h.parentNode}h=F.c.w().createElement("div");
m=M.g(b.e(),ms.aPa);h.id=m;m=h.style;e.$p(h,this.D$);m.display="none";g||(a.insertBefore(h,d),w.b.wa(h),a.removeChild(d),f.appendChild(d),this.qP=f);this.Er=h;this.l_a=g;ss(this,b,d)}else d.style.display="none";this.rq()?os(this,b,d):(b=rs(this,b,d),d=this.o(this.Wt),w.b.EQ(b,d));this.qr=l};ms.prototype.Ee=function(a){this.bind(a);a=a.e();var b=M.g(a,ms.L7),b=w.b.getElementById(b),b=M.Lf(b.parentNode);a=ms.HVa(b,a);return a==n?b:a};z.a("AdfDhtmlPanelDrawerPeer.prototype.getComponentParent",{Ee:ms.prototype.Ee});
ms.HVa=function(a,b){if(a!=n){var d=b.lastIndexOf(":");if(-1!=d&&(d=b.substring(0,d),!w.b.getElementById(d)&&(d=F.c.j(d))))for(var e=d.getParent();e;){if(e===a)return d;e=e.getParent()}}};
function ss(a,b,d){var e=w.b,f=rs(a,b,d),g=e.getElementById(f),h=ns(b),f=a.Er.style,m=e.Ub(g),e=m.y+g.clientTop,m=m.x+g.clientLeft,q=d.offsetHeight,s=d.offsetWidth;a.iZa=s;f.height=q+"px";f.width=s+"px";f.display="";a.l_a?(ts(b,d,g,e,m,h),a=d.style,f.marginLeft=a.marginLeft,f.marginRight=a.marginRight,f.marginTop=a.marginTop,f.marginBottom=a.marginBottom):(d.style.position="absolute",d.style.top="0",h?d.style.left="0":d.style.right="0",ts(b,d,g,e,m,h,a.Er,q,s))}
function ts(a,b,d,e,f,g,h,m,q){var s=b.style,y=p,A=n;if(h){var A=w.b.Ub(h),C=A.y-e;C>=m?(y=l,h.style.height="0",h.style.width="0"):(h.style.height=m-C+"px",h.style.marginBottom=s.marginBottom)}m=w.b.Ub(b);s.marginTop=w.ua(s.marginTop)+e-d.scrollTop-m.y+"px";g?(s.marginLeft=w.ua(s.marginLeft)+f-m.x+"px",h&&!y&&(b=A.x-f,b>=q?(h.style.width="0",h.style.height="0",h.style.marginBottom="0"):(h.style.width=q-b+"px",h.style.marginRight=s.marginRight))):(d=f+d.clientWidth,s.marginRight=w.ua(s.marginRight)+
(m.x+b.offsetWidth)-d+"px",h&&!y&&(b=d-(A.x+b.offsetWidth),b>=q?(h.style.width="0",h.style.height="0",h.style.marginBottom="0"):(h.style.width=q-b+"px",h.style.marginLeft=s.marginLeft)));a=M.g(a.e(),"margins");F.c.Pf(a,{$3a:g,marginTop:s.marginTop,marginRight:s.marginRight,marginLeft:s.marginLeft})}ms.prototype.J1a=function(){var a=this.d(),b=this.h();a&&b&&(this.WY(a),F.c.th(b))};function ns(a){a=a.getPosition();var b=F.c.Ma().Oa();return"left"==a||"start"==a&&!b||"end"==a&&b?l:p}
function os(a,b,d){if(!a.Qa(b,b.e())){var e=rs(a,b,d),f=d.style.position;!a.qP&&a.Er&&(d.parentNode.insertBefore(a.Er,d),w.b.wa(a.Er));d.style.position="absolute";"always"!=b.r(AdfRichPanelDrawer.SHOW_HANDLES)?d.style.display="":(a.VYa=d.style.marginTop,a.SYa=d.style.marginBottom,a.TYa=d.style.marginLeft,a.UYa=d.style.marginRight,w.b.$p(d,""),d.style.marginTop="",d.style.marginBottom="",d.style.marginLeft="",d.style.marginRight="");a.FK().style.display="";var g=a.h(),h=b.getWidth(),m=b.getHeight(),
q=a.aE(),s=w.b,y=s.getElementById(e),A=g.offsetWidth,C=b.getMaximumWidth();C||(C="100%");var G=y.clientWidth,h=a.yl(h,G),C=a.yl(C,G);a.i2a=q;a.k2a=q.style.width;a.j2a=q.style.maxWidth;g=g.offsetHeight;(G=b.getMaximumHeight())||(G="100%");var K=y.clientHeight,m=a.yl(m,K),G=a.yl(G,K);a.lXa=q;a.mXa=q.style.height;a.nXa=q.style.maxHeight;var K=s.xf(),N=s.R(),K=K+s.es(N),y=s.nd(y)+y.clientTop;m&&(y+m>K&&(m=K-y),s.Hg(q,m));G&&(y+G>K&&(G=K-y),s.Aia(q,G));A-=q.offsetWidth;h&&s.ys(q,h-A);C&&s.Bia(q,C-A);h=
n;m&&G?h=Math.min(m,G):G?h=G:m&&(h=m);h&&h<g&&(F.c.Ma().Oa()?(m=q.style.paddingLeft,a.kta=""+m,q.style.paddingLeft=w.ua(""+m)+20+"px"):(m=q.style.paddingRight,a.lta=""+m,q.style.paddingRight=w.ua(""+m)+20+"px"));d.style.position=f;e=a.nX(b,e);H.n(d,ms.koa);H.n(d,ms.xpa);F.c.Pf(b.e(),"open");a.fe(b,d,e,b.e())}}ms.prototype.q_=function(){if(!this.MV){var a=this.rq();if(a&&(a=this.KE(a,n))&&a.na())return p}return l};z.a("AdfDhtmlPanelDrawerPeer.prototype.canHide",{q_:ms.prototype.q_});u=ms.prototype;
u.nX=function(a,b){var d={};if(!this.nta){var e={type:"layer"};e[Pg.Az]=l;e[Pg.I3]="af|panelDrawer-tr-close-animation-duration";e[Pg.G3]=3;e[Pg.J3]="af|panelDrawer-tr-open-animation-duration";var f=p,g=a.getPosition(),h=F.c.Ma().Oa();if("start"==g||"left"==g&&!h||"right"==g&&h)f=l;e[AdfRichPopup.fd]=f?AdfRichPopup.DS:AdfRichPopup.CS;e[AdfRichPopup.pf]=b;qs(this)==p?e.autodismiss="autodismissNever":e.autodismiss="autodismissAlways";this.mwa||(this.mwa=this.o(this.VTa));e.closeHandler=this.mwa;this.fya||
(this.fya=this.o(this.WTa));e.openedHandler=this.fya;e[Pg.H3]=this.iZa;this.nta=e}ya.qb(d,this.nta);"open"!=F.c.Ge(a.e())?d.animate=AdfRichPopup.A2:d.animate=AdfRichPopup.lK;return d};function qs(a){a.X8==n&&("false"==page.u().ka("af|panelDrawer-tr-auto-dismiss")?a.X8=p:a.X8=l);return a.X8}
function rs(a,b,d){if(!a.Lw){var e=b.r("alignId"),f=b.j(e);if(f)e=f.e();else{if(":"==e.charAt(0)){var g=e.length;1<g&&(e=e.substring(1,g))}D.i.warning("Unable to find align component: ",e,". Make sure clientComponent is set to true on the align component. "," Without a component on the client the drawer should still work but may not line up as expected.")}w.b.getElementById(e)||(D.i.warning("Unable to find dom node with id: ",e,". Using parent as align component."),f=b.getParent(),e=f.e());if(f&&
(b=f.k())&&b.Uj)b.bind(f),e=b.Uj(d);a.Lw=e}return a.Lw}u.Wt=function(){var a=this.d();this.Qa(a,a.e())?this.ob(a,a.e()):"always"==a.r(AdfRichPanelDrawer.SHOW_HANDLES)&&ss(this,a,this.h())};u.WTa=function(){var a=this.d(),b=this.h();ps(this,a);this.aba&&F.c.Tn();var d=this.rq().e(),d=M.g(d,ls.eF),e=w.b,a=rs(this,a,b),b=this.o(this.Wt);w.b.EQ(a,b);d=e.getElementById(d);O.ra(d)};
u.VTa=function(){this.lta!=n?this.aE().style.paddingRight=this.lta:this.kta!=n&&(this.aE().style.paddingLeft=this.kta);var a=this.i2a;a.style.width=this.k2a;a.style.maxWidth=this.j2a;a=this.lXa;a.style.height=this.mXa;a.style.maxHeight=this.nXa;var a=this.d(),b=this.h(),d=w.b;"always"!=a.r(AdfRichPanelDrawer.SHOW_HANDLES)?b.style.display="none":(w.b.$p(b,this.D$),b.style.marginTop=this.VYa,b.style.marginBottom=this.SYa,b.style.marginLeft=this.TYa,b.style.marginRight=this.UYa);this.FK().style.display=
"none";b.style.width="";this.aE().style.height="";H.F(b,ms.koa);H.F(b,ms.xpa);var e=this.Er;this.qP?this.qP.appendChild(b):e?(e.parentNode.replaceChild(b,e),d.gc(e)):(e=M.g(a.e(),ms.L7),e=w.b.getElementById(e),e.parentNode.insertBefore(b,e));d.wa(b);this.MV||(F.c.Pf(a.e(),"closed"),a=this.rq(),this.KE(a,n))};u.yl=function(a,b){return a?("%"==(""+a).charAt(a.length-1)&&(a=this.vca(a,b)),w.ua(""+a)):n};u.vca=function(a,b){return b*Math.abs(parseInt(a.substring(0,a.length-1)))/100};
u.WY=function(a){this.MV=l;this.Wi(a,l);this.qP&&(a=this.Er.parentNode,a.insertBefore(this.h(),this.Er),a.removeChild(this.Er),w.b.gc(this.Er),this.qP=n)};u.gf=function(a){var b=this.h(),b=rs(this,a,b);w.b.n1(b);this.WY(a);ms.f.gf.call(this,a)};z.a("AdfDhtmlPanelDrawerPeer.prototype.componentRemoved",{gf:ms.prototype.gf});