function ne(){this.Init()}v("AdfDhtmlRichDialogService",ne);v("AdfDhtmlRichDialogService",ne);ne.V6="data-afr-panelwindowid";ne.p6="data-afr-inlineframeid";ne.UNa="data-afr-rtnid";z.l(ne);ne.O=function(){this.Nj==n&&(this.Nj=new ne);return this.Nj};ne.getInstance=ne.O;v("AdfDhtmlRichDialogService.getInstance",ne.O);ne.mBa=function(a){return ne.aB(a)?l:p};ne.dialogExists=ne.mBa;v("AdfDhtmlRichDialogService.dialogExists",ne.mBa);
ne.prototype.vha=function(a,b,d,e){B.s(a);B.s(b);B.zc(d);B.Cd(e);var f=F.c;try{ne.dh(l,"LAUNCHING_WINDOW_DIALOG");var g=ne.iVa(),h=ne.Txa(e),m=d.Q5a&&d.Q5a==ne.hQa?l:p;e={launchSourceId:h,modal:m,windowName:b,rtnId:g};ne.vda(g,e);m&&ne.T0a();var q=ne.g_a(a,b,d,g);e.childWindow=q;ne.vda(g,e);f.oa(f,ne.L0a,g,100,{isSynchronized:l})}finally{ne.dh(p)}};ne.prototype.launchWindow=ne.prototype.vha;z.a("AdfDhtmlRichDialogService.prototype.launchWindow",{vha:ne.prototype.vha});
ne.prototype.uha=function(a){B.s(a);var b=F.c;try{ne.dh(l,"LAUNCHING_INLINE_DIALOG");var d=b.j(a);B.J(d,AdfRichPopup);d.addEventListener(Sb.gL,ne.v_a);d.addEventListener(Rb.qo,ne.Aca);d.k().bind(d);var e=d.r("_rtnId"),f=d.r("_launchId"),g=d.r("_inlineFrameId"),h=d.r("_isCancellationDisabled"),m=ne.Txa(f),q={launchSourceId:m,popupId:a,frameName:g,rtnId:e,panelWindowId:d.r("_panelWindowId")};ne.vda(e,q);a={};m&&(a[AdfRichPopup.Cf]=m);h&&(a.closeOnEscape=p);d.show(a)}finally{ne.dh(p)}};
ne.prototype.launchInline=ne.prototype.uha;z.a("AdfDhtmlRichDialogService.prototype.launchInline",{uha:ne.prototype.uha});ne.prototype.dia=function(a){var b=ne.aB(a);if(b)try{if(b.popupId)ne.dh(l,"CLOSING_INLINE_DIALOG"),ne.MG(b),ne.Jca(b);else{ne.dh(l,"CLOSING_WINDOW_DIALOG");if(!ne.Eta(b)){b.isReturnFromPending=l;return}ne.Jca(b);b.modal&&ne.raa()}ne.XY(a)}finally{ne.dh(p)}else D.i.warning("dialog state missing or already returned for rtnId:",a)};ne.prototype.returnFrom=ne.prototype.dia;
z.a("AdfDhtmlRichDialogService.prototype.returnFrom",{dia:ne.prototype.dia});ne.prototype.t_=function(a){B.df(a);var b=ne.aB(a);if(b){b.loadingState===k&&(b.loadingState="unloading");try{if(ne.dh(l,"CLOSING_WINDOW_DIALOG"),b.childWindow.closed)b.modal&&ne.raa(),b.isReturnFromPending?ne.Jca(b):ne.nH(a),ne.XY(a);else if("unloading"===b.loadingState){var d=F.c;d.oa(d,ne.O().t_,a,100,{isSynchronized:l})}else b.loadingState=k}finally{ne.dh(p)}}};ne.prototype.checkForWindowCanceled=ne.prototype.t_;
z.a("AdfDhtmlRichDialogService.prototype.checkForWindowCanceled",{t_:ne.prototype.t_});ne.prototype.lja=function(a){B.df(a);(a=ne.aB(a))&&"unloading"===a.loadingState&&(a.loadingState="loading")};ne.prototype.unsetWindowDialogCanceled=ne.prototype.lja;z.a("AdfDhtmlRichDialogService.prototype.unsetWindowDialogCanceled",{lja:ne.prototype.lja});ne.dh=function(a,b){var d=ne.O();d.CFa=a;d.rAa&&d.rAa(a,b)};
ne.od=function(){var a=ne.O();if(a.CFa)return l;var b=a.Hq;if(b)for(rtnId in b){var d=b[rtnId];if(d&&d.isReturnFromPending)return l}return a.Iwa&&a.Iwa()?l:p};v("AdfDhtmlRichDialogService.isBusy",ne.od);ne.prototype.nI=function(){try{ne.dh(l);var a=ne.O().Hq;if(a)for(rtnId in a)ne.ySa()}finally{ne.dh(p)}};ne.prototype.cancelAll=ne.prototype.nI;z.a("AdfDhtmlRichDialogService.prototype.cancelAll",{nI:ne.prototype.nI});
ne.prototype.NM=function(a){var b=ne.O().Hq;if(b)for(rtnId in b){var d=b[rtnId];d&&a(d)}};z.a("AdfDhtmlRichDialogService.prototype.__visitWindows",{NM:ne.prototype.NM});ne.L0a=function(a){B.df(a);if(a=ne.aB(a))childWindow=a.childWindow,childWindow.focus()};ne.ySa=function(){var a=rtnId;B.df(a);var b=ne.aB(a);b&&(b.popupId?ne.zSa(b):(ne.Eta(b),b.modal&&ne.raa()),ne.XY(a),ne.nH(a))};
ne.Jca=function(a){B.zc(a);var b=a.rtnId;(a=a.launchSourceId)?(a=F.c.j(a))?(ne.nH(b,l),(new Xb(a)).v(),a.focus()):ne.nH(b):ne.nH(b)};ne.Txa=function(a){if(!a||0==a.length)return n;var b=F.c;if(!b.j(a)){var d=a.lastIndexOf(":");if(-1!=d){var e=a.lastIndexOf(":",d-1);if(-1!=e){var e=a.substring(0,e),f=b.j(e);if(f&&(window.AdfUICollection&&f instanceof AdfUICollection)&&(d=e.concat(a.substring(d)),b.j(d)))return d}}}return a};ne.iVa=function(){return(new Date).getTime()};
ne.Eta=function(a){B.zc(a);a=a.childWindow;a.close();return a.closed};ne.MG=function(a){a=a.popupId;B.s(a);a=F.c.j(a);B.J(a,AdfRichPopup);a&&(ne.y8(a),a.rb())};ne.zSa=function(a){a=a.popupId;B.s(a);a=F.c.j(a);B.J(a,AdfRichPopup);a&&(ne.y8(a),a.cancel())};ne.y8=function(a){B.J(a,AdfRichPopup);var b=F.c;a=a.r("_inlineFrameId");b=b.j(a);a=b.k();a.bind(b);b=a.Tq();B.p(b,"IFRAME");b.setAttribute("src","about:blank")};ne.w8a=function(){var a=0,b=ne.O().Hq;if(b)for(rtnId in b)a++;return a};
ne.vda=function(a,b){var d=""+a,e=ne.O().Hq;e||(e={},ne.O().Hq=e);e[d]=b;ne.O().$ea=b};ne.aB=function(a){var b=ne.O().Hq;return!b?n:b[""+a]};ne.XY=function(a){var b=ne.O().Hq;b&&(a=""+a,ne.O().$ea=b[a],delete b[a])};ne.g_a=function(a,b,d,e){var f=F.c.R();ya.gja(ne.gQa,d,d);d=ne.oSa(d);a=ne.jUa(a,e);b=f.open(a,b,d);try{b.opener=f}catch(g){D.i.ee(g," error setting opener of child window.")}return b};ne.oSa=function(a){var b="",d;for(d in a)0<b.length&&(b+=","),b+=d+"\x3d"+a[d];return b};
ne.jUa=function(a,b){B.s(a);B.df(b);return a+"\x26_rtrnId\x3d"+b};ne.T0a=function(){var a=F.c,b=a.am(),d=a.Mf(),a=a.w().createElement("div");d.jp(a,Hg.XD);b.j1(a);d.Ci(a)};ne.raa=function(){F.c.am().h1()};ne.MCa=function(){var a=ne.O().Hq;if(a){var b=F.c;for(rtnId in a){var d=a[rtnId];if(d&&d.modal||d.popupId&&(d=b.j(d.popupId),d.k().bind(d),d=d.r("_panelWindowId"),B.s(d),d=b.j(d),B.J(d,AdfRichPanelWindow),d.getModal()))return l}}return p};v("AdfDhtmlRichDialogService.hasModalDialogsOpen",ne.MCa);
ne.v_a=function(a){try{ne.dh(l);var b=w.b,d=F.c,e=a.getSource(),f=e.k();f.bind(e);var g=f.h(),h=e.r("_panelWindowId"),m=e.r("_inlineFrameId"),q=d.j(m),s=q.k();s.bind(q);var y=s.Tq();B.p(y,"IFRAME");var A=e.r("_rtnId");y.setAttribute(ne.V6,h);g.setAttribute(ne.p6,m);y.setAttribute(ne.UNa,A);b.S(y,"load",ne.vwa);var C=e.r("_dialogURL");y.src=C;d.IR()&&ne.sta(A)}finally{ne.dh(p)}};
ne.Aca=function(a){try{ne.dh(l,"CLOSING_INLINE_DIALOG");var b=w.b,d=a.getSource(),e=d.k();e.bind(d);var f=e.h().getAttribute(ne.p6),g=d.r("_rtnId"),h=F.c.j(f);B.J(h,AdfRichInlineFrame);var m=h.k();m.bind(h);var q=m.Tq();B.p(q,"IFRAME");q.setAttribute("src","about:blank");b.sa(q,"load",ne.vwa);ne.XY(g);ne.nH(g)}finally{ne.dh(p)}};
ne.vwa=function(a){var b=F.c,d=w.b.T(a);d||(d=a.currentTarget);B.p(d,"IFRAME");a=d.getAttribute(ne.V6);B.s(a);b=b.j(a);B.J(b,AdfRichPanelWindow);(d=d.contentWindow.document.title)&&b.setTitle(d)};
ne.sta=function(a){B.df(a);var b=ne.aB(a);if(b){var d=F.c,b=b.popupId;B.s(b);if(b=d.j(b)){B.J(b,AdfRichPopup);var e=b.k();e.bind(b);b=e.h().getAttribute(ne.p6);b=F.c.j(b);B.J(b,AdfRichInlineFrame);e=b.k();e.bind(b);b=e.Tq();B.p(b,"IFRAME");e=b.getAttribute(ne.V6);B.s(e);e=d.j(e);B.J(e,AdfRichPanelWindow);(b=b.contentWindow.document.title)&&e.setTitle(b);d.oa(d,ne.sta,a,3E3)}}};ne.nH=function(a,b){var d=F.c;b?d.csa(a):d.o8(l,a)};ne.hQa="applicationModal";
ne.gQa={alwayslowered:1,alwaysraised:1,channelmode:0,copyhistory:0,dependent:1,directories:0,fullscreen:0,hotkeys:1,location:0,menubar:0,resizable:1,scrollbars:1,status:1,titlebar:1,toolbar:1,"z-lock":1};