var Z=I.ea(ru,"AdfDhtmlQueryPeer",!1);m("AdfDhtmlQueryPeer",Z);Z.FE=I.uH(Dt,"InnerQueryShowDetailPeer","_afrDscl");InnerQueryShowDetailPeer.C=function(){Rq.Us(this,{l_:"af|query::disclosed-icon-style",r_:"af|query::undisclosed-icon-style"})};InnerQueryShowDetailPeer.prototype.Oh=function(a){return InnerQueryShowDetailPeer.h.Oh.call(this,a)?this.Qi.qn(a):!1};InnerQueryShowDetailPeer.prototype.Hz=function(){return this.f().K("headerText")};
Z.prototype.Init=function(a){Z.h.Init.call(this,a);Ev(a)||(this.wg=new Z.FE(a,this))};r.a("AdfDhtmlQueryPeer.prototype.Init",{Init:Z.prototype.Init});Z.prototype.Qa=function(a){Z.h.Qa.call(this,a);this.wg&&this.wg.Qa(a)};r.a("AdfDhtmlQueryPeer.prototype.initialize",{Qa:Z.prototype.Qa});
Z.C=function(){I.ra(this,Za.ua,D.wb,ab.cd,lc.At,D.Ad,D.Bc,D.gh,Jb.ua,$b.XJ);I.sb(this,"disclosed");this.yz="content";this.tAa="conj";this.cDa="oper";this.x2a="mode";this.T4a="reset";this.f5a="save";this.l5a="search";this.z2="saveSrch";this.wS="val";this.sXa="fldsM";this.rXa="adFldGrpMenu";this.tXa="fldItem";this.qXa="adFldGrpAddAllItem";this.cga="PSSPop";this.Nw="PSSD";this.SK="PSS_Srchs";this.$fa="PSS_name";this.CDa="PSS_autoEx";this.bga="PSS_SiL";this.aga="PSS_def";this.Kza="apply";this.KAa="delete";
this.zAa="crtn";this.U_a="duplicate";this.Zfa="dlgPSS";this.JEa="dlgSS";this.PDa="reorder";this.QDa="REDlg";this.P4a="RETree";this.NDa="move-top";this.ODa="move-up";this.MDa="move-down";this.LDa="move-bottom";this.L4a="TOP";this.M4a="UP";this.K4a="DOWN";this.J4a="BOTTOM";this.MAa="DWPop";this.LAa="DWD";this.v_a="DWDMsg";this.P2a="af_query.MSG_SAVED_SEARCH_DELETE_WARNING";this.hDa="OWPop";this.gDa="OWD";this.J3a="OWDMsg";this.R2a="af_query.MSG_SAVED_SEARCH_OVERRIDE_WARNING";this.fDa="OEPop";this.eDa=
"OED";this.I3a="OEDMsg";this.Q2a="af_query.MSG_SAVED_SEARCH_OVERRIDE_ERROR";this.DAa="SSPop";this.uE="SSD";this.q1="SS_name";this.c_a="SS_SL";this.BAa="SS_autoEx";this.CAa="SS_def";this.b4a="pzSSearch_key";this.vEa="SEPARATOR";this.Ae=":";this.b1a="_afrIndexed";this.F7a="autoExecute";this.G7a="default";this.H7a="name";this.I7a="showInList";this.DDa="_afrPSSVisibleStatus";this.df="_busy";var a=A.c.H();this.HPa=parseInt(a.qa("af|query-tr-visible-items"));"undefined"!=typeof a.qa("af|query-tr-button-type")&&
(this.Dp="old"!=a.qa("af|query-tr-button-type"));this.OQa="old"!=a.qa("af|dialog-tr-button-type")};m("AdfDhtmlQueryPeer.InitSubclass",Z.C);Z.prototype.Bo=function(a,b,d,e){return this.bB()?this.wg.Bo(a,b,d,e):!1};r.a("AdfDhtmlQueryPeer.prototype.ComponentDisclosedChanged",{Bo:Z.prototype.Bo});Z.prototype.bB=function(){return this.i().childNodes[1]};Z.prototype.G=function(a,b){Z.h.G.call(this,a,b);return A.c.ta(this,this.mmb,a,0,{isSynchronized:!0})};
r.a("AdfDhtmlQueryPeer.prototype.InitDomElement",{G:Z.prototype.G});Z.prototype.vd=function(a){var b=this.f();b&&b.setProperty(Z.df,a,!1,G.ud)};r.a("AdfDhtmlQueryPeer.prototype.SetBusy",{vd:Z.prototype.vd});Z.prototype.Sa=function(a,b,d,e){Ev(this.f())||Z.h.Sa.call(this,a,b,d,e)};r.a("AdfDhtmlQueryPeer.prototype.ResizeNotify",{Sa:Z.prototype.Sa});Z.prototype.qn=function(a){var b=this.bB();return b?(b.style.display=a?"":"none",!0):!1};
r.a("AdfDhtmlQueryPeer.prototype.__handleClientSideDisclosure",{qn:Z.prototype.qn});Z.prototype.Ak=function(a){this.wg.Ak(a)};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentDisclosure",{Ak:Z.prototype.Ak});Z.prototype.M=function(a){var b=this.f().K(Z.df);a.Aa()||!a.ec()||b||Fv(this,a);this.wg&&this.wg.M(a)};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentClick",{M:Z.prototype.M});
Z.prototype.za=function(a){if(a.na()==w.gd){var b=Fv(this,a);if(!b){var d=Gv(this,a);d&&(this.f().g(),lh.F(this.f(),lh.Fca,d,!0),b=!0)}if(b){a.cancel();return}}if(b=this.eG(a))b=q.oa(),d=a.U(),b=b.ca(d),b=!(Hv(this,b,Z.z2)||Hv(this,b,Z.SK)||Iv(this,b,Z.cDa));b&&this.tJa==a.X()&&(this.t_()&&this.bX(this.f()),a.cancel());this.wg&&this.wg.za(a);this.tJa=null};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyUp",{za:Z.prototype.za});
Z.prototype.ma=function(a){this.i().setAttribute("tabindex",-1);this.eG(a)&&(this.tJa=a.X(),a.wc(),q.b.stopPropagation(a.U()))};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyDown",{ma:Z.prototype.ma});Z.prototype.Yb=function(a){this.eG(a)&&a.cancel()};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyPress",{Yb:Z.prototype.Yb});Z.prototype.Io=function(a){a=a.getSource();var b=this.f().g();a.g()==I.j(b,Z.cga)&&(a=Jv(b,!0),this.f().setProperty(Z.DDa,a.g(),!0,G.ld))};
r.a("AdfDhtmlQueryPeer.prototype.HandleComponentPopupOpening",{Io:Z.prototype.Io});function Kv(a,b){var d=I.j(b,Z.bga),d=A.c.m(d).getValue(),e=I.j(b,Z.aga);return A.c.m(e).getValue()&&!d?(Lv(a,"af_query.LABEL_PERSONALIZE_SAVED_SEARCHES_SHOWINLIST","af_query.LABEL_PERSONALIZE_SAVED_SEARCHES_SHOWINLIST_DETAIL"),!0):!1}
Z.prototype.dg=function(a){var b=this.f(),d=b.g(),e=I.j(d,Z.Kza),f=I.j(d,Z.KAa),g=I.j(d,Z.PDa),h=d+Z.Ae+Z.ODa,l=d+Z.Ae+Z.NDa,n=d+Z.Ae+Z.MDa,t=d+Z.Ae+Z.LDa,y=d+Z.Ae+Z.tXa,z=d+Z.Ae+Z.qXa,B=a.getSource().g(),F=A.c.m(B);if(B==e)Mv(b,!0)?(B=A.c.m(d+Z.Ae+Z.Zfa),Kv(B,d)?a.cancel():Nv(b,!0)&&(value=Ov(b,Z.Nw),lh.F(b,lh.CR,value,!0))):a.cancel();else if(B==g||B==h||B==l||B==n||B==t)a.cancel();else if(B==f)a.cancel();else if(-1!=B.indexOf(y)||-1!=B.indexOf(z))d={},d.Kwb=B,d.Cwb=F.K("selectedText"),bc.F(b,bc.wya,
d,!0),a.wc(),a.cancel()};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentAction",{dg:Z.prototype.dg});
Z.prototype.eg=function(a){var b=this.f(),d=b.g(),e,f,g=I.j(d,Z.LAa),h=I.j(d,Z.gDa),l=I.j(d,Z.eDa),n=a.getSource().g();Z.OQa?(f=d+Z.Ae+Z.Zfa,e=d+Z.Ae+Z.JEa):(e=I.j(d,Z.uE),f=I.j(d,Z.Nw));f=n==f;e=n==e;g=n==g;h=n==h;l=n==l;if(e||f){g=!0;if(a.ll()==Za.Zm)if(g=Mv(b,f))if(l=Ov(b,f?Z.Nw:Z.uE),e)bc.F(b,bc.xya,l,!0);else{if(Kv(b,d)){a.cancel();return}(selectedSearch=Nv(b,!0))?bc.F(b,bc.CR,l,!0):lh.F(b,lh.Lo,!0,!0)}else{if(e){b=Pv(b);d=!1;f=Z.Bsa();b=xa.trim(b.toLowerCase());for(g=0;g<f.length;g++)if(xa.trim(f[g].toLowerCase())==
b){d=!0;break}d?Qv(this,!1,!1):Qv(this,!1,!0);a.cancel();return}}else lh.F(b,lh.Lo,f,!0);a.cancel();g&&this.i0(d,f)}else if(g||h||l)n=!1,(n=a.ll()==Za.w0)&&!l&&(e=g?bc.mt:bc.Bya,(l=Ov(b,g?Z.Nw:Z.uE))?bc.F(b,e,l,!0):(b=I.j(d,Z.SK),b=A.c.m(b),Lv(b,"af_query.MSG_SAVED_SEARCH_DELDUP_CONSTRAINT","af_query.MSG_SAVED_SEARCH_DELETE_CONSTRAINT_DETAIL"))),a.cancel(),(a=Rv(this,g,h))&&a.Tb(),h&&n&&this.i0(d,f);else if(n==d+Z.Ae+Z.Ae+Z.QDa||n==d+Z.Ae+Z.QDa)a.ll()==Za.Zm?(bc.F(b,bc.Eya,null,!0),a.cancel(),(popupComp=
a.getSource().getParent())&&popupComp.Tb()):a.ll()==Za.Mo&&lh.F(b,lh.Cya,null,!0)};r.a("AdfDhtmlQueryPeer.prototype.HandleComponentDialog",{eg:Z.prototype.eg});Z.prototype.El=function(a){var b=a.getSource().g();if(b){var d=A.c.m(b),e=this.f(),f=e.g(),g=I.j(f,Z.z2),f=I.j(f,Z.SK);b==g?(b=d.getValue())&&""!=b?b==Z.b4a?lh.F(e,lh.Gca,!0,!0):b!=Z.vEa&&bc.F(e,bc.AR,b,!0):a.cancel():b==f&&((b=d.getValue())&&b!=Z.vEa?lh.F(e,lh.AR,b,!0):a.cancel())}};
r.a("AdfDhtmlQueryPeer.prototype.HandleComponentValueChange",{El:Z.prototype.El});Z.prototype.i0=function(a,b){var d=Jv(a,b);d&&(b&&this.f().setProperty(Z.DDa,null,!0,G.ld),d.Tb())};r.a("AdfDhtmlQueryPeer.prototype.HidePopupDialog",{i0:Z.prototype.i0});
Z.prototype.ob=function(a,b){Z.h.ob.call(this,a,b);var d=a.g(),e=I.j(d,Z.DAa),f=I.j(d,Z.cga),g=I.j(d,Z.MAa),h=I.j(d,Z.hDa),l=I.j(d,Z.fDa),e=q.b.getElementById(e),f=q.b.getElementById(f),g=q.b.getElementById(g),h=q.b.getElementById(h),l=q.b.getElementById(l),n,t,y=I.j(d,Z.LAa),z=I.j(d,Z.gDa),B=I.j(d,Z.eDa);Z.OQa?(t=d+Z.Ae+Z.Zfa,n=d+Z.Ae+Z.JEa):(n=I.j(d,Z.uE),t=I.j(d,Z.Nw));b.id==n?e.appendChild(b):b.id==t?f.appendChild(b):b.id==y?g.appendChild(b):b.id==z?h.appendChild(b):b.id==B&&l.appendChild(b)};
r.a("AdfDhtmlQueryPeer.prototype.PopupClosed",{ob:Z.prototype.ob});Z.pqb=function(){return Z.ZSa().concat(Z.Bsa())};m("AdfDhtmlQueryPeer.getSavedSearchNames",Z.pqb);Z.dsb=function(a){this.adb=a};m("AdfDhtmlQueryPeer.setUserSavedSearchNames",Z.dsb);Z.ZSa=function(){var a=this.adb;return a?a:[]};m("AdfDhtmlQueryPeer.getUserSavedSearchNames",Z.ZSa);Z.csb=function(a){this.$cb=a};m("AdfDhtmlQueryPeer.setSystemSavedSearchNames",Z.csb);Z.Bsa=function(){var a=this.$cb;return a?a:[]};
m("AdfDhtmlQueryPeer.getSystemSavedSearchNames",Z.Bsa);function Ev(a){u.assert(null!=a,"AdfDhtmlQueryPeer.prototype._isHeaderless, component cannot be null!");a=a.getDisplayMode();return"simple"==a||"design"==a}
function Ov(a,b){var d=null,e=null,f=null,g=null,h=null,l=a.g();b==Z.uE?(d=I.j(I.j(l,Z.q1),Z.yz),e=I.j(I.j(l,Z.BAa),Z.yz),f=I.j(I.j(l,Z.CAa),Z.yz),h=Nv(a,!1)):b==Z.Nw&&(d=I.j(I.j(l,Z.$fa),Z.yz),e=I.j(I.j(l,Z.CDa),Z.yz),g=I.j(I.j(l,Z.bga),Z.yz),f=I.j(I.j(l,Z.aga),Z.yz),h=Nv(a,!0));l={};h&&(l.selectedSearch=h);if(d=q.b.getElementById(d))l[Z.H7a]=d.value;e=q.b.getElementById(e);l[Z.F7a]=e?e.checked:!0;f=q.b.getElementById(f);l[Z.G7a]=f?f.checked:!1;g&&(g=q.b.getElementById(g),l[Z.I7a]=g?g.checked:!1);
return l}function Jv(a,b){var d=null,d=null,d=b?Z.cga:Z.DAa,d=I.j(a,d);return d=A.c.m(d)}function Rv(a,b,d){a=a.f().g();b=I.j(a,b?Z.MAa:d?Z.hDa:Z.fDa);return A.c.m(b)}function Sv(a,b){var d=a.f().g();return Z.Dp?d+":_"+b:I.j(d,b)}
function Fv(a,b){var d=a.f(),e=d.g(),f=Sv(a,Z.x2a),g=Sv(a,Z.l5a),h=Sv(a,Z.T4a),l=Sv(a,Z.f5a),n=e+Z.Ae+Z.PDa,e=q.oa(),t=b.U(),t=e.ca(t),e=!1,y=null;if(Z.Dp){var z=I.Cf(t);z instanceof AdfRichButton&&(y=z.g(),1==z.getDisabled()&&(e=!0))}else y=t.id,1==t.disabled&&(e=!0);if(!e)if(y==g&&a.t_())a.bX(d),e=!0;else if(y==f)(new bc(d,bc.Aya,null)).F(!0);else if(y==h){if(f=d.Cd())for(g=A.c.pm(),h=0;h<f.length;h++)l=f[h],(n=l.g())&&0<=n.indexOf(Z.wS)&&g[n]&&l.setValue();bc.F(d,bc.Fya,!1,!0)}else if(y==l)lh.F(d,
lh.Gca,!1,!0);else if(Iv(a,t,Z.tAa))g=d.g()+Z.Ae+Z.tAa,(f=A.c.m(g))?(g=q.b.getElementById(g),h=f.o(),f.setProperty("value",g.value),h.M(b),(l=f.getValue())&&h.Ba(f,g,l),lh.F(d,lh.Hya,l,!0)):b.cancel();else if(y==n)lh.F(d,lh.Dya,null,!0);else if(d=a.f(),f=d.g(),g=I.j(f,Z.KAa),h=I.j(f,Z.U_a),l=I.j(f,Z.Kza),n=b.getSource().g(),n==g)Qv(a,!0,!1);else if(n==h)(g=Ov(d,Z.Nw))?bc.F(d,bc.yya,g,!0):(d=I.j(f,Z.SK),d=A.c.m(d),Lv(d,"af_query.MSG_SAVED_SEARCH_DELDUP_CONSTRAINT","af_query.MSG_SAVED_SEARCH_DUPLICATE_CONSTRAINT_DETAIL"),
b.cancel());else if(n==l)b.cancel();else if(Tv(a,b,Z.Nw,n))Uv(b,n);else if(Tv(a,b,Z.uE,n))Uv(b,n);else if(d=Gv(a,b))a.f().g(),lh.F(a.f(),lh.Fca,d,!0);e&&(b.cancel(),b.wc());return e}function Qv(a,b,d){var e=a.f(),f=e.g(),g=I.j(f,b?Z.v_a:d?Z.J3a:Z.I3a);if(g=A.c.m(g))e=b?Nv(e,!0):Pv(e),e=A.c.H().Z(b?Z.P2a:d?Z.R2a:Z.Q2a,e),g.setValue(e);a=Rv(a,b,d);b=I.j(f,b?Z.$fa:Z.q1);a.show({align:AdfRichPopup.qf,alignId:b})}
function Pv(a){a=a.g();u.dc(!1);var b=null,b=I.j(a,Z.q1);return(a=A.c.m(b))?a.getValue():null}function Nv(a,b){var d=a.g(),e=null,e=b?I.j(d,Z.SK):I.j(d,Z.z2);return(d=A.c.m(e))?d.getValue():null}function Uv(a,b){var d=A.c.m(b),e=q.b.getElementById(b);if(d){var f=d.o();f.M(a);var g=d.getValue();g&&f.Ba(d,e,g)}}function Gv(a,b){var d=q.oa(),e=b.U(),d=d.ca(e);return Iv(a,d,Z.NDa)?Z.L4a:Iv(a,d,Z.ODa)?Z.M4a:Iv(a,d,Z.MDa)?Z.K4a:Iv(a,d,Z.LDa)?Z.J4a:!1}
function Tv(a,b,d,e){b=b.getSource().K("readOnly");if("true"==b||1==b)return!1;a=a.f().g();return d==Z.Nw?(d=I.j(a,Z.CDa),b=I.j(a,Z.aga),a=I.j(a,Z.bga),e==d||e==b||e==a):d==Z.uE?(d=I.j(a,Z.BAa),b=I.j(a,Z.CAa),a=I.j(a,Z.c_a),e==d||e==b||e==a):!1}function Hv(a,b,d){a=a.f().g();d=I.j(a,d);b=b.id;return b==d||0<=b.indexOf(d)?!0:!1}function Iv(a,b,d){a=a.f().g()+Z.Ae+d;return b&&0<=b.id.indexOf(a)?!0:b.parentNode&&b.parentNode.id&&0<=b.parentNode.id.indexOf(a)?!0:!1}
function Mv(a,b){var d=!0,e=a.g(),f=I.j(e,b?Z.$fa:Z.q1);if(f=A.c.m(f)){if(f.getDisabled())return!0;var g=f.getValue();if(f.Pb(g))return Lv(f,"af_query.MSG_SAVED_SEARCH_NAME_NOTNULL_CONSTRAINT","af_query.MSG_SAVED_SEARCH_NAME_NOTNULL_CONSTRAINT_DETAIL"),!1;if(b){var h=Nv(a,b);if(g==h)return!0}e=I.j(e,b?Z.SK:Z.z2);e=A.c.m(e).yy();g=xa.trim(g.toLowerCase());for(h=0;h<e.length;h++)if(xa.trim(e[h].getValue().toLowerCase())==g&&!e[h].cq()){d=!1;b&&Lv(f,"af_query.MSG_SAVED_SEARCH_NAME_UNIQUE_CONSTRAINT",
"af_query.MSG_SAVED_SEARCH_NAME_UNIQUE_CONSTRAINT_DETAIL");break}}return d}function Lv(a,b,d,e){u.J(b);u.$d(d);e?(b=TrMessageFactory.getString(b),d=TrMessageFactory.getString(d)):(e=A.c.H(),b=e.Z(b),d=e.Z(d));d=new Ba(Ba.hg,b,d);b=A.c;a?(e=a.g(),b.Ne(e),b.bo(e,d),a.focus()):b.bo(null,d)}Z.prototype.eG=function(a){return a.Aa()||a.na()!=w.jb||null==Qo.vT(a,!1)?!1:!0};
Z.prototype.t_=function(){var a=this.f(),b=a.Cd();if(b){for(var d=!0,e=[],f=0,g=!0,h=!0,l=!0,n=0;n<b.length;n++){var t=b[n],y=t.getId(),z=I.Fb(t);y&&0<=y.indexOf(Z.wS)&&z&&C.Iy(z)&&(0==t.getValid()&&(g=!1),t.getShowRequired&&t.getShowRequired()&&g&&(z=t.getValue(),z&&""!=z||0===z||(Lv(t,"org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED","org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED_detail",!0),h=!1)),y=y.substring(Z.wS.length,y.length-1))&&(y=a.g()+Z.Ae+Z.zAa+y,(y=q.oa().getElementById(y))&&
y.getAttribute(Z.b1a)&&(z=t.getValue(),e[f++]=t,d=z&&""!=z||0===z?!1:d&&!0))}if(d&&0<f){for(a=0;a<f;a++)Lv(e[a],"af_query.MSG_SELECTIVELY_REQUIRED_CONSTRAINT","af_query.MSG_SELECTIVELY_REQUIRED_CONSTRAINT_DETAIL",!1);l=!1}else for(a=0;a<f;a++)b=e[a],d=b.g(),A.c.Ne(d),b.Wi(),0==b.getValid()&&(g=!1);g||A.c.sq();return l&&h&&g}return!0};r.a("AdfDhtmlQueryPeer.prototype.validateCriterionFields",{t_:Z.prototype.t_});Z.prototype.X4=function(a){var b=this.f().g(),d;(b=A.c.Pe(b))&&(d=b[a]);return d};
Z.prototype.TG=function(a,b){var d=this.f().g(),e=A.c,f=e.Pe(d);f||(f={},e.Df(d,f));f[a]=b};Z.prototype.mmb=function(a){a=a.g()+Z.Ae+Z.sXa;a=A.c.m(a);if(null!=a&&(a.o().taa(Z.HPa),a=a.Cd()))for(var b=0;b<a.length;b++){var d=a[b],e=d.g();e&&0<=e.indexOf(Z.rXa)&&d.o().taa(Z.HPa)}};Z.prototype.bX=function(a){Vv.Wta(a);if(-1==a.g().indexOf("_afrLovInternalQueryId")){var b=a.getResultComponentId();b&&(a=a.m(b))&&lh.F(a,lh.Gya,null,!0)}};