var Dg=M.U(M,"AdfDhtmlDocumentPeer",p);v("AdfDhtmlDocumentPeer",Dg);Dg.m=function(){M.ha(this,ia.Dd,ia.tc,ab.ga,I.jb,I.qd,ia.Zk,$f.hL);M.hb(this,AdfRichDocument.SHORT_DESC,AdfRichDocument.TITLE);this.yKa="iconC";this.jpa="msgDlg";this.ELa="msgCtr";this.yU="liveCtr";this.pOa="skip";this.DU="p_AFInactive";this.VT="afr::UtilPopupCtnr";this.Lma="data-afr-pid";this.Q4="data-afr-did";this.qJa="contentContainer";this.pJa="cancel"};v("AdfDhtmlDocumentPeer.InitSubclass",Dg.m);
Dg.prototype.Init=function(a){F.c.$Da(a.e());Dg.f.Init.call(this,a)};z.a("AdfDhtmlDocumentPeer.prototype.Init",{Init:Dg.prototype.Init});Dg.prototype.Jv=function(a,b,d){B.Cd(d);document.body.title=d;return l};z.a("AdfDhtmlDocumentPeer.prototype.ComponentShortDescChanged",{Jv:Dg.prototype.Jv});Dg.prototype.zK=function(a,b,d){B.Cd(d);document.title=d;return l};z.a("AdfDhtmlDocumentPeer.prototype.ComponentTitleChanged",{zK:Dg.prototype.zK});
Dg.prototype.EJ=function(){var a=F.c,b=a.Jk(),d=this.d().e(),b=b[d],d=Em(),e=p;d!=n&&(e=d.getGlobalOnly());return P.U0(a,b,e)};z.a("AdfDhtmlDocumentPeer.prototype.isMessagesDialogShowable",{EJ:Dg.prototype.EJ});Dg.prototype.Nu=function(){var a=this.d().e();return"old"==F.c.u().ka("af|dialog-tr-button-type")?M.g(a,Dg.jpa):a+"_"+Dg.jpa};z.a("AdfDhtmlDocumentPeer.prototype.getMessageDialogId",{Nu:Dg.prototype.Nu});
Dg.prototype.GR=function(){var a=this.Nu(),a=w.b.getElementById(a),b=Fm(this);return a&&a.parentNode.id==b};z.a("AdfDhtmlDocumentPeer.prototype.isMessagesInline",{GR:Dg.prototype.GR});Dg.prototype.Yy=function(a){a?this.Ly():(a=this.d(),this.ob(a))};z.a("AdfDhtmlDocumentPeer.prototype.setMessagesDialogShown",{Yy:Dg.prototype.Yy});Dg.prototype.Ha=function(a){if(a.dd()==Ta.ue){var b=Gm(this.d());a.Q()==b&&(b.style.top="0px")}};z.a("AdfDhtmlDocumentPeer.prototype.HandleComponentFocus",{Ha:Dg.prototype.Ha});
Dg.prototype.Eb=function(a){if(a.dd()==Ta.ue){var b=Gm(this.d());a.Q()==b&&(b.style.top="")}};z.a("AdfDhtmlDocumentPeer.prototype.HandleComponentBlur",{Eb:Dg.prototype.Eb});Dg.prototype.C=function(a){if(a.dd()==Ta.ue){var b=Gm(this.d());a.Q()==b&&(b=Dg.Fva(this.d()),b=w.b.getElementById(b),B.p(b),b=H.l0(b,n,p,Dg.cYa),B.p(b),b&&(O.Lp(b)||(b.tabIndex=-1),O.ra(b)),a.cancel())}};z.a("AdfDhtmlDocumentPeer.prototype.HandleComponentClick",{C:Dg.prototype.C});Dg.prototype.Xv=function(a){Dg.t7a||H.IEa(a)};
z.a("AdfDhtmlDocumentPeer.prototype.HandleComponentContextMenu",{Xv:Dg.prototype.Xv});Dg.prototype.pa=function(a){if(!a.na()&&F.c.Pk()==this.d().e()){var b=a.ia();a.ctrlKey&&a.altKey?79==b&&(this.Yy(p),a.cancel()):a.ctrlKey&&a.shiftKey&&87==b&&(this.Yy(l),a.cancel())}if(!a.na()){var d=a.L(),b=a.ia();d.ctrlKey&&(d.altKey&&87==b)&&xg.O().TQ(a.Q())}};z.a("AdfDhtmlDocumentPeer.prototype.HandleComponentKeyUp",{pa:Dg.prototype.pa});
Dg.prototype.qf=function(a){var b=a.getSource().e(),d=this.d().e(),e=this.Nu();if(b==e&&(b=a.Xj(),a.cancel(),this.ob(this.d()),b==ab.fl&&(a=F.c,b=Em(),e=p,b!=n&&(e=b.getGlobalOnly()),!e))){var f;a=a.Jk();for(var g in a)if(g!=d&&(b=a[g],b!=n&&b.x_!=n)){f=g;break}f!=n&&P.NR(f)}};z.a("AdfDhtmlDocumentPeer.prototype.HandleComponentDialog",{qf:Dg.prototype.qf});Dg.prototype.mla=function(a){var b=a.Mga();F.c.pBa(b,a.lga())};z.a("AdfDhtmlDocumentPeer.prototype.HandleComponentRedirect",{mla:Dg.prototype.mla});
Dg.prototype.Va=function(a,b){Dg.f.Va.call(this,a,b);H.F(b,M.sE);H.F(b,Dg.DU);var d=Fm(this);(d=w.b.getElementById(d))&&d.appendChild(b)};z.a("AdfDhtmlDocumentPeer.prototype.PopupClosed",{Va:Dg.prototype.Va});
Dg.prototype.q=function(a,b){var d=F.c;Dg.f.q.call(this,a,b);var e=new ia(a,"load");d.Naa?e.v():(e=e.o(e.v),d.lEa(e));a.getInitialFocusId()&&(this.osa=this.o(this.bRa),this.iva=window.setTimeout(this.osa,50));this.Lva=0;d=p;(e=Dg.Fva(a))?w.b.getElementById(e)==n&&(d=l,D.i.warning("Unable to locate skip link target: "+e+".  Make sure that af:skipLinkTarget is contained within a parent that generates content (and an id).")):d=l;if(d&&(d=Gm(a)))d.style.display="none";if((d=a.getTitle())&&this.w().title!=
d)d=this.o(this.CTa),setTimeout(d,0);this.xda(a)};z.a("AdfDhtmlDocumentPeer.prototype.InitDomElement",{q:Dg.prototype.q});Dg.prototype.Ab=function(a,b){var d=this.d().e(),d=M.g(d,Dg.yKa);if(a.id==d)for(var d=w.b,e=a.firstChild;e;){var f=e.nextSibling;if(1==e.nodeType){var g=e.id;g&&!d.getElementById(g)&&(b.appendChild(e),d.wa(e))}e=f}else Dg.f.Ab.call(this,a,b)};z.a("AdfDhtmlDocumentPeer.prototype.ReplaceDomElement",{Ab:Dg.prototype.Ab});Dg.prototype.el=function(a,b){this.gP(a,b,l)};
z.a("AdfDhtmlDocumentPeer.prototype.MessageShow",{el:Dg.prototype.el});Dg.prototype.Ah=function(a,b){this.gP(a,b,p)};z.a("AdfDhtmlDocumentPeer.prototype.MessageNotify",{Ah:Dg.prototype.Ah});
Dg.prototype.gP=function(a,b,d){var e=F.c,f=Em(),g=p;f!=n&&(g=f.getGlobalOnly());var h=this.d(),m=h.e(),q=e.Jk(),s=q[m];b=0;s!=n&&(b=s.length);if(!d&&!P.Hp(e,b,g))P.wE();else if(d&&!P.U0(e,s,g))for(m in P.wE(),q)h=q[m],h!=n&&h.x_!=n&&P.NR(m);else if(d||this.Qa(h)||this.Lva<b){d=w.b;var y=n,A=n,C=n;f!=n&&(y=f.getMessage(),A=f.getText(),C=f.getShortDesc());var f=this.Nu(),e=e.j(f),G=this.h(),K=0;a!=n&&(K=a);if(g)K=s.ls;else for(var N in q)a=q[N].ls,a>K&&(K=a);d.Vh(G,M.sV)!=K&&(d.Gg(G,M.sV,K),q=P.getIcon(K,
l),e.setTitleIconSource(q.src),A?e.setTitle(A):e.setTitle(P.ds(K)));q=M.g(f,"_cnt");if(q=d.getElementById(q))m=P.Efa(m,y,g),C!=n&&(m.title=C),q.hasChildNodes()?q.replaceChild(m,q.firstChild):q.appendChild(m);this.GR()&&(m=d.getElementById(f),this.fe(h,m,{topPosition:0.25}))}this.Lva=b};function Em(){var a=F.c,b=a.my();return b!=n?a.j(b):n}
Dg.prototype.bRa=function(){var a=this.d().getInitialFocusId();if(a){var b=F.c.Ur(a);b?b.focus():D.i.warning("Invalid component id referenced by document initialFocusId: "+a+". You may need to set clientComponent to true for the desired focus component.")}window.clearTimeout(this.iva);this.iva=this.osa=n};function Gm(a){B.assert(a);a=a.e();a=M.g(a,Dg.pOa);return w.b.getElementById(a)}Dg.Fva=function(a){return a.r("_afrSkpLnk")};
Dg.cYa=function(a){if(O.Lp(a))return l;var b=p;switch(a.nodeName.toLowerCase()){case "div":case "span":case "h1":case "h2":case "h3":case "h4":case "h5":case "h6":b=l}return b?O.FR(a):p};Dg.prototype.CTa=function(){var a=this.w(),b=this.d();b&&(a.title=b.getTitle())};Dg.prototype.xda=function(a){a=a.getUncommittedDataWarning();F.c.Zra(a&&"on"==a.toLowerCase())};
Dg.prototype.FV=function(a,b,d,e,f){B.s(b);B.s(d);B.Da(e,"confirm callback");f&&B.Ea(f,"confirm timeout");var g=F.c,h=w.b.getElementById(Dg.VT);B.p(h,"DIV");h=h.getAttribute(Dg.Q4);B.s(h);var m=g.j(h);B.J(m,AdfRichDialog);var q=m.getParent();B.J(q,AdfRichPopup);if(q.Qa())return p;m.setTitle(b);Dg.Gza(h,d);Bg.KQa(h,!a);m.addEventListener(ab.ga,Dg.Qsa);a={sn:e,z9a:h};f&&(a.LEa=g.oa(this,Dg.FRa,h,f));g.Pf(h,a);q.show({zorderScope:2});return l};
z.a("AdfDhtmlDocumentPeer.prototype.__showAlertConfirm",{FV:Dg.prototype.FV});function Fm(a){a=a.d().e();return M.g(a,Dg.ELa)}Dg.FRa=function(a){a=F.c.j(a);var b=a.k();b.bind(a);b.L_()};
Dg.Qsa=function(a){a.cancel();var b=a.getSource(),d=b.e(),e=b.getParent();B.J(e,AdfRichPopup);e.cancel();var e=F.c,f=e.Ge(d);B.zc(f,"alert/confirm state token invalid");e.Pf(d,n);f.LEa&&e.ac(f.LEa);e=f.sn;try{e(a)}catch(g){D.i.ee(g,"exception caught calling alert/confirm dialog event callback")}b.setTitle("");Dg.Gza(d,"");b.removeEventListener(ab.ga,Dg.Qsa)};Dg.Gza=function(a,b){var d=w.b,e=M.Na(a,Dg.qJa),e=d.getElementById(e);B.p(e,"TD");d.yb(e,b)};