var sr=I.ea(I,"AdfDhtmlNavigationPanePeer",!1);m("AdfDhtmlNavigationPanePeer",sr);
sr.C=function(){I.ra(this,D.Ad,D.wb,D.Bc,D.Bd);q.b.Dd()||I.ra(this,D.ze);this.e1="_afrChoiceButton";this.fYa="_afrChoiceDataContainer";this.Mf="popupContent";this.$c="_afrChoicePopupPanel";this.Qw="tabh";this.Mga="tabs";this.Kda="bar";this.AXa="disclosureAnchor";this.wA="Cnvr";sr.utb="p_AFSelected";this.yea="_afrEps";this.Lga="_afrTabCnt";var a=A.c.H().qa("af|navigationPane-tr-layout-type");this.Hk="overflow"==a?"overflow":"overflow-droplist"==a?"overflow-droplist":"conveyorBelt"};
m("AdfDhtmlNavigationPanePeer.InitSubclass",sr.C);sr.prototype.G=function(a,b){sr.h.G.call(this,a,b);var d=a.g(),e=q.oa();this.PN=!0;if(a.getHint()==sr.Mga){if(d=I.j(d,sr.Qw),this.pc=e.getElementById(d))d="conveyorBelt"==sr.Hk?I.j(d,"cbc"):I.j(d,"oc"),this.m5=e.getElementById(d),A.c.pr(a)}else a.getHint()==sr.Kda&&(d=I.j(d,"oc"),this.H3=e.getElementById(d),A.c.pr(a))};r.a("AdfDhtmlNavigationPanePeer.prototype.InitDomElement",{G:sr.prototype.G});
sr.prototype.ya=function(a){return this.pc||a.getHint()==sr.Kda?!0:!1};r.a("AdfDhtmlNavigationPanePeer.prototype.needsResizeNotify",{ya:sr.prototype.ya});
sr.prototype.Sa=function(a,b,d){b=this.f();if(this.m5)a!=d&&("ellipsis"==this.f().getTruncationStyle()?(d=this.Rd(this.pc.id,this.m5),0!=d.length&&this.xma(a,this.pc.offsetWidth,this.pc.id,d)):this.$N(d));else if(this.H3){if(!this.Va){a=b.g();if(!pl.y$(a))return;this.Va=new pl(a,this,"both");a=this.H3.childNodes;a:{for(d=-1;b=a[++d];)if(C.sa(b,"p_AFSelected"))break a;d=-1}var e;for(b=-1;e=a[++b];)if(1==e.nodeType&&("a"==e.tagName.toLowerCase()||0<e.getElementsByTagName("a").length)){-1==d&&(d=b);
this.Va.Lp();d==b?this.Va.addElement(e):b>d?(tr(this,a,b,!0),this.Va.addElement(e)):(this.Va.addElement(e),tr(this,a,b,!1));var f=e,g=this.f(),h=sr.y$a;null==h&&(h=A.c.H().getStyleClass("AFOverflowElement"),sr.y$a=h);e=f.ownerDocument.createElement("div");e.className=h;h=f.cloneNode(!0);h.removeAttribute("id");e.appendChild(h);g=A.c.m(f.id);if(!g.getDisabled()){g=f.href;void 0==g&&(g=f.getAttribute("href"));var l=q.b.R().location.href;g&&-1==g.indexOf(l)?(h.setAttribute("_href",g),(f=f.getAttribute("target"))&&
h.setAttribute("_target",f)):h.setAttribute("_componentId",f.getAttribute("id"));f=this.D(this.mLa);q.b.ba(h,"click",f)}this.Va.Vr(e)}}this.Va.te()}};r.a("AdfDhtmlNavigationPanePeer.prototype.ResizeNotify",{Sa:sr.prototype.Sa});k=sr.prototype;k.$N=function(a){var b=this.Rd(this.pc.id,this.m5);0!=b.length&&this.zN(this.pc.id,b,a)};
k.xma=function(a,b,d,e,f){a=e.length;var g=this.f();this.mg||(this.mg=g.getMaxTabSize(),this.mg=null==this.mg||"infinity"==this.mg?0:parseFloat(this.mg));this.ai||(this.ai=g.getMinTabSize(),this.ai=parseFloat(this.ai),null==this.ai&&(this.ai=32));if(0<this.mg&&this.ai>this.mg)v.l.warning("Minimum tab width should not be greater than maximum tab width: min\x3d"+this.ai+", max\x3d "+this.mg);else{if(!this.Nn){this.Nn=this.ai*a;!this.Zn&&1<a&&(this.Zn=e[0].offsetWidth-(e[1].offsetLeft-e[0].offsetLeft));
for(g=0;g<a;g++){var h=e[g];tabContentElement=this.uV(h);this.nV(h).style.display="none";this.Nn+=h.offsetWidth-tabContentElement.offsetWidth-this.Zn}this.Zn&&(this.Nn+=this.Zn)}b<this.Nn?(this.EX(e,this.ai),this.zN(d,e,b,f)):(b=Math.floor((b-this.Zn)/a),this.gla(),this.EX(e,b,!0))}};
k.EX=function(a,b,d){for(var e=!1,f=0;f<a.length;f++){var g=a[f];tabContentElement=this.uV(g);var h=this.nV(g),l=tabContentElement.style.width;tabContentElement.style.width="";tabContentElement.style.overflow="";h.style.display="none";g=g.offsetWidth;g=d?b-(g-tabContentElement.offsetWidth)+this.Zn:b;0<this.mg&&g>this.mg&&(g=this.mg);tabContentElement.offsetWidth>g&&(h.style.display="inline",tabContentElement.style.overflow="hidden",g-=h.offsetWidth);tabContentElement.style.width=g+"px";e||l==tabContentElement.style.width||
(e=!0)}return e};k.gla=function(){"conveyorBelt"==sr.Hk?this.ex&&this.ex.te():this.Va&&this.Va.iI()};
k.zN=function(a,b){var d=sr.Hk;if("overflow"==d){if(!this.Va){for(var d=new pl(a,this,"both"),e=0;e<b.length;e++){var f=b[e];1==f.nodeType&&(d.Lp(),d.addElement(f),"none"!=f.style.display&&d.Vr(ur(this,f)))}this.Va=d}this.Va&&this.Va.te()}else if("overflow-droplist"==d){if(!this.Va){d=new pl(a,this,"droplist");e=[];for(f=0;f<b.length;f++){var g=b[f];1==g.nodeType&&(d.Lp(),d.addElement(g),"none"!=g.style.display&&(d.Vr(ur(this,g)),e.push(ur(this,g))))}d.$k(e);this.Va=d}this.Va&&this.Va.te()}else if("conveyorBelt"==
d){if(!this.ex){d=Dk.wqa(a,this);e=[];f=I.j(a,"cbs");for(g=0;g<b.length;g++){var h=b[g];1==h.nodeType&&h.getAttribute("id")!=f&&"none"!=h.style.display&&e.push(ur(this,h))}d.$k(e);if(e=sr.qF)d.Ks(e),sr.qF=null;this.ex=d}this.ex&&this.ex.te()}};k.Rd=function(a,b){for(var d=b.childNodes,e=[],f="conveyorBelt"==sr.Hk,g=f?I.j(a,"cbs"):null,h=0;h<d.length;h++){var l=d[h];1!=l.nodeType||f&&l.getAttribute("id")==g||e.push(l)}return e};k.tL=function(){var a=this.ex;a&&(sr.qF=a.Pu());this.hX()};
r.a("AdfDhtmlNavigationPanePeer.prototype.__saveAndRemoveCompressedLayout",{tL:sr.prototype.tL});sr.prototype.ka=function(a){this.hX();this.pc?(delete this.pc,delete this.m5):this.H3&&delete this.H3;A.c.bp(a);sr.h.ka.call(this,a)};r.a("AdfDhtmlNavigationPanePeer.prototype.ComponentRemoved",{ka:sr.prototype.ka});sr.prototype.hX=function(){this.Va&&(this.Va.Yy(),this.Va=null);this.ex&&(this.ex.Jm(),this.ex=null)};sr.prototype.M=function(a){a.cancel();return!1};
r.a("AdfDhtmlNavigationPanePeer.prototype.HandleComponentClick",{M:sr.prototype.M});
sr.prototype.za=function(a){var b=this.f(),d=a.U(),e=q.b.ca(d),f=q.b.na(d);if(this.Za(b,sr.$c)){var g=!1,h=xr(b);switch(f){case w.Ih:g=yr(b);J.va(g);g=I.j(b.g(),sr.e1);A.c.Hc.getElementById(g).setAttribute("aria-expanded","false");g=!0;break;case w.Ra:J.be(e,h);cancelEvt=!0;break;case w.ab:J.ni(e,h)}g&&this.Jb(b,sr.$c)}else e==yr(b)&&f==w.Ra&&zr(this,b);a.Aa()||(f==w.ab||f==w.ub?this.nB(e)&&((b=J.ZY(this.i(),e))||(b=J.GH(this.i())),b&&(b.focus(),a.cancel())):f!=w.Ra&&f!=w.vb||!this.nB(e)||((b=J.cP(this.i(),
e))||(b=J.ym(this.i())),b&&(b.focus(),a.cancel())),d.ctrlKey&&d.altKey&&87==f||a.cancel())};r.a("AdfDhtmlNavigationPanePeer.prototype.HandleComponentKeyUp",{za:sr.prototype.za});sr.prototype.nB=function(a){if(null==a)return!1;a=a.id;if(null==a)return!1;a=a.split("::");return 1>=a.length||a[a.length-1]!=sr.AXa?!1:!0};
sr.prototype.Fa=function(a){var b=a.U();a=a.getSource();var b=q.b.ca(b),d=yr(a);if(b==d||b.parentNode==d)this.Za(a,sr.$c)?(b=I.j(a.g(),sr.e1),d=A.c.Hc.getElementById(b),d.setAttribute("aria-expanded","false"),this.Jb(a,sr.$c)):zr(this,a)};r.a("AdfDhtmlNavigationPanePeer.prototype.HandleComponentMouseDown",{Fa:sr.prototype.Fa});sr.prototype.$a=function(a){if(this.Za(this.f(),sr.$c)){var b=a.X();J.va(b)}a.cancel()};r.a("AdfDhtmlNavigationPanePeer.prototype.HandleComponentMouseOver",{$a:sr.prototype.$a});
sr.prototype.ma=function(a){var b=a.U(),b=q.b.ca(b),d=a.getSource();b==yr(d)&&a.na()==w.jb&&zr(this,d)};r.a("AdfDhtmlNavigationPanePeer.prototype.HandleComponentKeyDown",{ma:sr.prototype.ma});sr.prototype.Nxa=function(a){return yr(a)};r.a("AdfDhtmlNavigationPanePeer.prototype.GetPopupAlignmentNode",{Nxa:sr.prototype.Nxa});sr.prototype.ob=function(a,b,d){d==sr.$c&&(a=a.g(),a=I.j(a,sr.fYa),q.b.getElementById(a).appendChild(b))};r.a("AdfDhtmlNavigationPanePeer.prototype.PopupClosed",{ob:sr.prototype.ob});
function yr(a){a=I.j(a.g(),sr.e1);return q.b.getElementById(a)}function zr(a,b){r.bb(AdfRichPopup);var d=xr(b),e=I.j(b.g(),sr.e1);d.parentNode.removeChild(d);A.c.Hc.getElementById(e).setAttribute("aria-expanded","true");var f={type:"menu"};f[AdfRichPopup.Ed]=AdfRichPopup.qf;f[AdfRichPopup.Jf]=e;f.autodismiss="autodismissMenu";a.He(b,d,f,sr.$c)}function xr(a){a=I.j(a.g(),sr.Mf);return q.b.getElementById(a)}
function ur(a,b){var d=q.b,e=A.c.H(),f=b.getAttribute("id"),g,h=b.getElementsByTagName("a")[0],l=b.getElementsByTagName("a")[1],n=b.getElementsByTagName("img")[0];n&&(n=n.cloneNode(!0),n.id&&(n.id+=sr.wA));if(h&&-1==h.className.indexOf("p_AFDisabled")){h=h.cloneNode(!0);h.id&&(h.id+=sr.wA);g=sr.wnb;null==g&&(g="conveyorBelt"==sr.Hk?e.getStyleClass("AFConveyorBeltElement"):e.getStyleClass("AFOverflowElement"),sr.wnb=g);l&&(l=l.cloneNode(!0),l.id&&(l.id+=sr.wA),l.setAttribute("_componentId",f),e=a.D(a.ugb),
d.ba(l,"click",e));var e=b.getAttribute("href"),t=d.R().location.href;if(e&&-1==e.indexOf(t)){if(h.setAttribute("_href",e),n&&n.setAttribute("_href",e),f=b.getAttribute("target"))h.setAttribute("_target",f),n&&n.setAttribute("_target",f)}else h.setAttribute("_componentId",f),n&&n.setAttribute("_componentId",f);f=a.D(a.mLa);d.ba(h,"click",f);n&&d.ba(n,"click",f)}else g=h.innerHTML,h=b.ownerDocument.createElement("div"),h.innerHTML=g,g=sr.vnb,null==g&&(g="conveyorBelt"==sr.Hk?e.getStyleClass("AFConveyorBeltElementDisabled"):
e.getStyleClass("AFOverflowElementDisabled"),sr.vnb=g),l&&(l=l.cloneNode(!0),l.id&&(l.id+=sr.wA));d=b.ownerDocument.createElement("table");d.cellPadding=0;d.cellSpacing=0;d.style.width="100%";f=d.insertRow(-1);e=f.insertCell(-1);n&&e.appendChild(n);n=f.insertCell(-1);n.style.width="100%";e=b.ownerDocument.createElement("div");e.className=g;n.appendChild(e);e.appendChild(h);h=f.insertCell(-1);l&&(n=b.ownerDocument.createElement("div"),n.className=g,h.appendChild(n),n.appendChild(l));return d}k=sr.prototype;
k.mLa=function(a){this.SH(this.f());var b=q.b.ca(a);"A"!=b.nodeName&&"IMG"!=b.nodeName&&(b=b.parentNode);(a=b.getAttribute("_href"))?(b=b.getAttribute("_target"))?window.open(a,b):self.location=a:(this.tL(),a=b.getAttribute("_componentId"),a=A.c.m(a),ab.F(a,a.getPartialSubmit()))};k.ugb=function(a){a=q.b.ca(a);var b=a.getAttribute("_componentId");null==b&&(b=a.parentNode.getAttribute("_componentId"));a=A.c.m(b);b=a.o();b.bind(a);b&&b.lO&&b.lO()&&(this.SH(this.f()),this.tL(),Ob.cQ(a))};
function tr(a,b,d,e){var f=d+1;e&&(f=d-1);d=!0;for(var g=b[f];d&&g;){if(1==g.nodeType)if("img"==g.tagName.toLowerCase()||0<g.getElementsByTagName("img").length)a.Va.addElement(g),d=!1;else if("span"==g.tagName.toLowerCase()||0<g.getElementsByTagName("span").length)a.Va.addElement(g),d=!1;e?f--:f++;g=b[f]}}k.uV=function(a){a=a.getAttribute("id");a=I.j(a,sr.Lga);return q.b.getElementById(a)};k.nV=function(a){a=a.getAttribute("id");a=I.j(a,sr.yea);return q.b.getElementById(a)};
k.Od=function(a,b,d,e){a=a.g();u.assert(0<=d.indexOf(a));d=d.substring(a.length+1);b=d.indexOf(":");0<b&&(d=d.substring(0,b),a=xa.count(a,":"),e.push([a+1,d]))};r.a("AdfDhtmlNavigationPanePeer.prototype.ConvertClientIdToLocator",{Od:sr.prototype.Od});sr.prototype.Sd=function(a,b){var d=a.Cd()[b];if(d){var e=a.g(),d=d.g();if(0<d.substring(e.length+1).indexOf(":"))return d;u.assert(!1,"Use of [] locator notation is only supported when navigationPane: "+e+" is used with MenuModel")}return null};
r.a("AdfDhtmlNavigationPanePeer.prototype.convertLocatorToClientId",{Sd:sr.prototype.Sd});