var xc=I.ea(I,"AdfDhtmlPopupPeer",!0);m("AdfDhtmlPopupPeer",xc);xc.C=function(){r.bb(AdfRichPopup);this.YK="_shown";this.tT=[AdfRichPopup.Jf,AdfRichPopup.Ed,"leftPosition","topPosition",AdfRichPopup.cg,"mousePosition"];I.ra(this,D.gh,D.Oc,D.Nd)};m("AdfDhtmlPopupPeer.InitSubclass",xc.C);xc.prototype.Ta=function(a){a instanceof ja&&(a=a.X(),zv(this,a))};r.a("AdfDhtmlPopupPeer.prototype.HandleComponentFocus",{Ta:xc.prototype.Ta});xc.prototype.Lb=function(){var a=q.b.R().activeElement;zv(this,a)};
r.a("AdfDhtmlPopupPeer.prototype.HandleComponentBlur",{Lb:xc.prototype.Lb});function zv(a,b){var d=a.f();if(d[I.Yo]&&d[I.Yo][d.g()]){var e=d[I.Yo][d.g()].Ha(),f=A.c.el();C.Nb(e,b)?f.pva(d,e):f.nua(d,e)}}xc.prototype.Yb=function(a){if(a.na()==w.jb&&(a.wc(),a=Qo.vT(a,!0),null!=a&&(a=Ro.wra(a)))){var b=a.g();if(0!=this.f().g().indexOf(b+":")){var b=a.getDefaultCommand(),d=a.m(b);d?ab.F(d,d.getPartialSubmit()):v.l.warning("DefaultCommand with the ID of '"+b+"' is not found for component: "+a)}}};
r.a("AdfDhtmlPopupPeer.prototype.HandleComponentKeyPress",{Yb:xc.prototype.Yb});xc.prototype.K8=function(a){return a.Rla?a.cMa=!0:!1};r.a("AdfDhtmlPopupPeer.prototype.fetchCanceled",{K8:xc.prototype.K8});
xc.prototype.show=function(a,b){u.s(a,G);u.ji(b);if(!this.kb(a)){var d=a.getContentDelivery(),e=d==AdfRichPopup.iwa,d=d==AdfRichPopup.J_,f=null;b&&(f=b[AdfRichPopup.cg]);if(e||d){if(a.Rla){v.l.fine("Waiting on popup content delivery: "+a.g());return}if(!a.k5){d=A.c;e=xc.uU(a.g());d.Df(e,b);var g;null!=f&&(g={},g.launchId=f);this.k_(a,b,!0);a.Rla=!0;(new eh(a,eh.rk,g)).F();return}}d&&delete a.k5;a.cMa?(delete a.cMa,this.Xx(a,!1)):(g=new $b(a,b),a.ki(g),g.Aa()?this.Xx(a,!1):(xc.lMa(a)&&xc.lC(a)&&A.c.ge.qv(a,
!1),b||(b={}),(g=a.getAutoDismissalTimeout())&&!isNaN(g)&&0<g&&(b.autodismissPopupTimeout=1E3*g),g=b.restoreImmediate?!0:!1,b.openedHandler=this.D(this.Sca),b.openedHandlerParam=a,b.animate!=AdfRichPopup.Av&&(b.animate=a.getAnimate(),b.openTransition=xc.Xeb(a),b.closeTransition=xc.Web(a)),d||g||this.k_(a,b,!0),this.Xx(a,!0,d||g),this.Wn(a,b)))}};r.a("AdfDhtmlPopupPeer.prototype.show",{show:xc.prototype.show});xc.Xeb=function(a){return xc.$Ja(a,"data-afr-open-trns")};
xc.Web=function(a){return xc.$Ja(a,"data-afr-close-trns")};xc.$Ja=function(a,b){return q.b.getAttribute(q.b.getElementById(a.g()),b)};xc.prototype.Xx=function(a,b,d){delete this.jG;a.setProperty(xc.YK,b?a.g():"",!1,!0);d||!this.jG||xc.dG(a)||(new eh(a,eh.XR)).F();delete this.jG};xc.QLa=function(a){u.s(a,AdfRichPopup);if(!xc.dG(a))for(var b=0;b<xc.tT.length;b++)a.setProperty("_"+xc.tT[b],"",!1,!0)};
xc.prototype.k_=function(a,b,d){u.s(a,AdfRichPopup);if(b&&!xc.dG(a)){delete this.jG;var e;for(key in b)if(-1<E.indexOf(xc.tT,key)){e="_"+key;var f;"mousePosition"==key?(u.Da(b[key].x,"AdfDhtmlPopupHints.MOUSEPOSITION.x"),u.Da(b[key].y,"AdfDhtmlPopupHints.MOUSEPOSITION.y"),f="x:"+b[key].x+",y:"+b[key].y):f=b[key];a.setProperty(e,f,!1,!0)}!d&&this.jG&&(new eh(a,eh.XR)).F();delete this.jG}};r.a("AdfDhtmlPopupPeer.prototype.syncPrivateProperties",{k_:xc.prototype.k_});
xc.prototype.Kv=function(a){if(!xc.dG(a.getSource()))if(a=a.lP(),a==xc.YK)this.jG=!0;else for(var b=0;b<xc.tT.length;b++)if(a=="_"+xc.tT[b]){this.jG=!0;break}};r.a("AdfDhtmlPopupPeer.prototype.ComponentPropertyChanged",{Kv:xc.prototype.Kv});xc.prototype.Tb=function(a){this.kb(a)&&(a.getContentDelivery()==AdfRichPopup.J_&&delete a.k5,this.Jb(a,a.g()))};r.a("AdfDhtmlPopupPeer.prototype.hide",{Tb:xc.prototype.Tb});
xc.prototype.cancel=function(a){this.kb(a)&&(a.getContentDelivery()==AdfRichPopup.J_&&delete a.k5,this.bk(a,a.g()))};r.a("AdfDhtmlPopupPeer.prototype.cancel",{cancel:xc.prototype.cancel});xc.prototype.kb=function(a){return this.Za(a,a.g())};r.a("AdfDhtmlPopupPeer.prototype.isVisible",{kb:xc.prototype.kb});xc.uU=function(a){u.J(a);return a.split(":").join("$")+"$key"};xc.prototype.zq=function(a){if(a.getType()==eh.tca){var b=a.getSource();Av(this,b);a.wc();a.cancel()}else xc.h.zq.call(this,a)};
r.a("AdfDhtmlPopupPeer.prototype.DispatchComponentEvent",{zq:xc.prototype.zq});function Av(a,b){b.k5=!0;var d=A.c,e=xc.uU(b.g()),f=d.Pe(e);d.Df(e,null);u.ji(f);delete b.Rla;a.show(b,f)}xc.prototype.Yqa=function(a){var b=this.f();if(a){var d=A.c,e=xc.uU(b.g()),f=d.Pe(e);f&&E.Rb(a,f);d.Df(e,a)}a&&a.restoreImmediate?Av(this,b):(new eh(b,eh.tca)).F()};xc.prototype.fireContentDeliveryNotify=xc.prototype.Yqa;r.a("AdfDhtmlPopupPeer.prototype.fireContentDeliveryNotify",{Yqa:xc.prototype.Yqa});
xc.prototype.ka=function(a){xc.dG(a)&&""===a.K(xc.YK)&&(a=xc.uU(a.g())+"$hidden",A.c.Df(a,!0))};r.a("AdfDhtmlPopupPeer.prototype.ComponentRemoved",{ka:xc.prototype.ka});xc.lC=function(a){a=I.j(a.g(),"content");return q.b.getElementById(a)};m("AdfDhtmlPopupPeer.getContentDom",xc.lC);xc.prototype.Wn=function(a,b){var d=xc.lC(a),e={};a.Y3&&E.Rb(e,a.Y3);b&&E.Rb(e,b);var f=this.qV(a,e);null!=f?f.show(e):this.He(a,d,e,a.g())};
xc.prototype.qV=function(a,b){var d=null,e=b.type;if(null==e||"menu"==e)a.bh(this.Opa,this,!0),this.IF&&(d=this.IF.o(),delete this.IF);return d};xc.prototype.Opa=function(a){var b=A.c.Y();if(b.AdfRichRegion&&a instanceof AdfRichRegion)return 0;b.AdfRichMenu&&a instanceof AdfRichMenu&&(this.IF=a);return 2};
xc.prototype.ob=function(a,b){if(b){var d=q.b,e=xc.nib(a,b);if(!e){xc.QLa(a);var f=xc.cGa(a,b);this.Xx(a,!1,f)}d.getElementById(a.g()).appendChild(b);e||(new Xb(a)).F()}else xc.QLa(a),this.Xx(a,!1),(new Xb(a)).F()};r.a("AdfDhtmlPopupPeer.prototype.PopupClosed",{ob:xc.prototype.ob});xc.cGa=function(a,b){u.s(a,AdfRichPopup);u.u(b);var d="true"==b.getAttribute(V.eha);b.removeAttribute(V.eha);var e=!1;d&&(e=xc.lMa(a)&&A.c.ge.QH(a),d=new Wb(a,e),e&&A.c.ge.qv(a,!1),e=d.aa(),d.F(!0));return e};
xc.dG=function(a){u.s(a,AdfRichPopup);return a.getAutoCancel()==AdfRichPopup.Yva?!0:!1};xc.nib=function(a,b){u.s(a,AdfRichPopup);u.u(b);var d="true"==b.getAttribute(V.xT),d=!xc.dG(a)&&d;b.removeAttribute(V.xT);return d};xc.prototype.Sca=function(a){(new Zb(a)).F()};r.a("AdfDhtmlPopupPeer.prototype.PopupOpened",{Sca:xc.prototype.Sca});xc.Cua=function(a,b){a.Y3=b};m("AdfDhtmlPopupPeer.setChildHints",xc.Cua);
xc.prototype.tb=function(a,b){xc.h.tb.call(this,a,b);if(xc.dG(a)){var d=xc.uU(a.g())+"$hidden";A.c.Pe(d)&&(this.Xx(a,!1,!0),A.c.Df(d,!1))}};r.a("AdfDhtmlPopupPeer.prototype.BindToComponent",{tb:xc.prototype.tb});xc.lMa=function(a){u.s(a,AdfRichPopup);return a.getResetEditableValues()==AdfRichPopup.Uya||(a.K(Wb.dDa)?!0:!1)};xc.prototype.Zb=function(a,b){this.f();xc.h.Zb.call(this,a,b)};r.a("AdfDhtmlPopupPeer.prototype.ReplaceDomElement",{Zb:xc.prototype.Zb});