function pl(a,b,d,e,f,g){this.Init(a,b,d,e,f,g)}m("AdfOverflowSupport",pl);r.v(pl);pl.ga=function(){this.bT="_afrOfwSrt";this.KE="_afrOfwEnd";this.Ph="p_AFDepressed"};m("AdfOverflowSupport.InitClass",pl.ga);
pl.prototype.Init=function(a,b,d,e,f,g){pl.h.Init.call(this);this.nb=b;this.hd=d||"end";this.zG=e||"after";this.RW=f||"horizontal";this.Lpa=g;this.xb=q.b.getElementById(a);WB(this)&&(this.zp=XB(a,"soc"),(this.Yn=XB(a,"soi"))&&this.Dla());YB(this)&&(this.kp=XB(a,"eoc"),this.Lk=XB(a,"eoi"),null!=this.Lk&&this.Ala());ZB(this)&&(a=I.j(a,"dlc"),this.Kk=q.b.getElementById(a));this.rh=[];this.mp=0;this.yx=-1;this.Zka=!1};r.a("AdfOverflowSupport.prototype.Init",{Init:pl.prototype.Init});
pl.y$=function(a){a=q.b.getElementById(a);return Math.max(a.firstChild.offsetWidth,a.scrollWidth)>a.offsetWidth||Math.max(a.firstChild.offsetHeight,a.scrollHeight)>a.offsetHeight?!0:!1};m("AdfOverflowSupport.needsOverflow",pl.y$);pl.ksa=function(a,b){b||(b=[]);var d=q.b,e=a.g(),f=I.la(e,"eoc"),e=I.la(e,"soc");(f=d.getElementById(f))&&d.pj(f,b);(f=d.getElementById(e))&&d.pj(f,b);return b};m("AdfOverflowSupport.getOverflowChildComponents",pl.ksa);
pl.prototype.Yy=function(a){a||(this.zp&&A.c.Ri(this.zp),this.kp&&A.c.Ri(this.kp));delete this.nb;delete this.xb;if(WB(this)){delete this.zp;if(this.Yn){a=q.b;var b=this.Yn;a.xa(b,"mousedown",this.Xoa);a.xa(b,"keydown",this.Xoa);a.xa(b,"mouseup",this.PX);a.xa(b,"mouseout",this.OX);delete this.Yn;delete this.y7}this.Voa&&delete this.Voa}YB(this)&&(a=q.b,b=this.Lk,a.xa(b,"mousedown",this.Sja),a.xa(b,"keydown",this.Sja),a.xa(b,"mouseup",this.aV),a.xa(b,"mouseout",this.$U),delete this.Lk,delete this.kp,
delete this.aM,this.Rja&&delete this.Rja);ZB(this)&&delete this.Kk;for(a=this.rh;0<a.length;)for(b=a.pop(),E.clear(b.elements),E.clear(b.QC),b=b.vQ;0<b.length;){var d=b.pop();E.clear(d)}};r.a("AdfOverflowSupport.prototype.removeOverflowSupport",{Yy:pl.prototype.Yy});pl.prototype.Lp=function(){this.rh.push({elements:[],QC:[],vQ:[]});this.yx++};r.a("AdfOverflowSupport.prototype.createStep",{Lp:pl.prototype.Lp});pl.prototype.addElement=function(a){this.rh[this.rh.length-1].elements.push(a)};
r.a("AdfOverflowSupport.prototype.addElement",{addElement:pl.prototype.addElement});pl.prototype.Vr=function(a){this.rh[this.rh.length-1].QC.push(a)};r.a("AdfOverflowSupport.prototype.addOverflowElement",{Vr:pl.prototype.Vr});pl.prototype.wY=function(a){var b=this.rh.length-1,d=a.ownerDocument,e=d.createElement("a");e.style.display="none";d=d.createElement("a");d.style.display="none";a.parentNode.insertBefore(d,a);this.rh[b].vQ.push([a,d,e]);return e};
r.a("AdfOverflowSupport.prototype.createSwapPosition",{wY:pl.prototype.wY});pl.prototype.$k=function(a){for(var b=this.Kk,d=0;d<a.length;d++)b.appendChild(a[d])};r.a("AdfOverflowSupport.prototype.addDropListElements",{$k:pl.prototype.$k});pl.prototype.te=function(){this.Zka||(this.Zka=!0,this.Fn(),this.Zka=!1)};r.a("AdfOverflowSupport.prototype.handleResize",{te:pl.prototype.te});
pl.prototype.Fn=function(){var a=this.xb.offsetWidth+3,b=this.xb.offsetHeight+5;if("both"==this.hd||"droplist"==this.hd){$B(this);a:for(var d=this.rh,e=0;e<d.length;e++){for(var f=d[e],g=0;g<f.QC.length;g++)if(C.sa(f.QC[g].firstChild,"p_AFSelected")){this.NT=e;break a}for(g=0;g<f.elements.length;g++)if(C.sa(f.elements[g],"p_AFSelected")){this.NT=e;break a}}d=aC(this,a,b);bC(this,a,b,d);cC(this);a=this.xb.offsetWidth+3;b=this.xb.offsetHeight+5;for(d=aC(this,a,b);dC(this,a,b,d);)cC(this),d=aC(this,
a,b);eC(this)==this.rh.length&&Ot(this)}else{e=this.rh.length;f=eC(this);if(f==e&&($B(this),d=aC(this,a,b)))return;cC(this,!0);a=this.xb.offsetWidth+3;b=this.xb.offsetHeight+5;if("horizontal"==this.RW&&50>=a||"vertical"==this.RW&&50>=b){for(;0<eC(this);)switch(this.hd){case "end":fC(this);break;case "start":case "both":case "droplist":gC(this)}d=aC(this,a,b)}else null==d&&(d=aC(this,a,b)),d=hC(this,d,a,b,d?f:0,d?e:f),a=this.xb.offsetWidth+3,b=this.xb.offsetHeight+5;d=bC(this,a,b,d);a=this.xb.offsetWidth+
3;b=this.xb.offsetHeight+5;if(eC(this)==e){if(d){$B(this);Ot(this);return}$B(this);if(d=aC(this,a,b)){Ot(this);return}cC(this,!0)}dC(this,a,b,d);this.Lpa&&iC(this)}};pl.prototype.iI=function(){for($B(this);eC(this)<this.rh.length;)switch(this.hd){case "end":jC(this);break;case "start":kC(this);break;case "both":case "droplist":0!=this.mp?kC(this):jC(this)}Ot(this)};r.a("AdfOverflowSupport.prototype.removeAllItemsFromOverflow",{iI:pl.prototype.iI});
pl.prototype.O8=function(a){this.LA(a)&&(a=J.DO(a,this.Pa,!0),u.u(a),this.Pa=a)};r.a("AdfOverflowSupport.prototype.focusNextChild",{O8:pl.prototype.O8});pl.prototype.P8=function(a){this.LA(a)&&(a=J.EO(a,this.Pa,!0),u.u(a),this.Pa=a)};r.a("AdfOverflowSupport.prototype.focusPreviousChild",{P8:pl.prototype.P8});
pl.prototype.LA=function(a){u.assert(this.Lpa);u.u(a);u.u(this.Pa);u.assert("0"==this.Pa.getAttribute("tabindex"),"The overflow popup's active descendant should have tabindex 0");this.Pa||(v.l.warning("Overflow has lost its assigned activeDescendant!"),this.ah());return null!=this.Pa};pl.prototype.Taa=function(a){u.u(a);this.Pa!=a&&(this.Pa&&this.Pa.setAttribute("tabIndex","-1"),a.setAttribute("tabIndex","0"),this.Pa=a)};r.a("AdfOverflowSupport.prototype.updateActiveDescendant",{Taa:pl.prototype.Taa});
pl.prototype.lk=function(a){if(YB(this)&&C.Nc(this.kp,a))return"end";if(WB(this)&&C.Nc(this.zp,a))return"start"};r.a("AdfOverflowSupport.prototype.isInOverflow",{lk:pl.prototype.lk});pl.prototype.Baa=function(a){var b=this.nb,d=this.nb.f();b.Za(d,"start"==a?pl.bT:pl.KE)||("start"==a?(lC(this),mC(this,pl.bT,this.zp,this.y7)):(nC(this),ZB(this)?mC(this,pl.KE,this.Kk,this.aM):mC(this,pl.KE,this.kp,this.aM)))};r.a("AdfOverflowSupport.prototype.showOverflowPopup",{Baa:pl.prototype.Baa});
function Ot(a){a=a.nb;var b=a.f();a.Za(b,pl.bT)&&a.Jb(b,pl.bT);a.Za(b,pl.KE)&&a.Jb(b,pl.KE)}function WB(a){return"start"==a.hd||"both"==a.hd||"droplist"==a.hd}function YB(a){return"end"==a.hd||"both"==a.hd||"droplist"==a.hd}function ZB(a){return"droplist"==a.hd}function XB(a,b){var d=I.j(a,b);return q.b.getElementById(d)}k=pl.prototype;
k.Dla=function(){var a=q.b,b=this.Yn,d=oC();d.alignElement=b;d[AdfRichPopup.Ed]="before"==this.zG?AdfRichPopup.ALIGN_BEFORE_START:AdfRichPopup.ALIGN_AFTER_START;this.y7=d;d=this.Xoa=this.D(this.QX);a.ba(b,"mousedown",d);a.ba(b,"keydown",d);this.PX=this.D(this.dnb);a.ba(b,"mouseup",this.PX);this.OX=this.D(this.cnb);a.ba(b,"mouseout",this.OX)};
k.Ala=function(){var a=q.b,b=this.Lk,d=oC();d.alignElement=this.Lk;d[AdfRichPopup.Ed]="before"==this.zG?AdfRichPopup.ALIGN_BEFORE_END:AdfRichPopup.ALIGN_AFTER_END;this.aM=d;d=this.Sja=this.D(this.bV);a.ba(b,"mousedown",d);a.ba(b,"keydown",d);this.aV=this.D(this.Qcb);a.ba(b,"mouseup",this.aV);this.$U=this.D(this.Pcb);a.ba(b,"mouseout",this.$U)};function oC(){return{autodismiss:"autodismissAlways",focus:!0,type:"menu",closeOnEscape:!0}}
k.QX=function(a){var b=q.b,d=a.type,e=a.keyCode;if("keydown"!=d||e==w.jb||e==w.Ra||e==w.gd)"mousedown"==d&&a.button&&a.button!=D.Gl||(lC(this),mC(this,pl.bT,this.zp,this.y7),"mousedown"==d&&(d=b.ca(a),this.Gb(d,!0))),b.Ea(a)};function lC(a){null==a.CLa&&(a.CLa=a.D(a.bhb),r.bb(V),a.y7.closeHandler=a.CLa,a.Voa=a.zp.parentNode)}k.dnb=function(a){a=q.b.ca(a);this.Gb(a,!1)};k.cnb=function(a){a=q.b.ca(a);this.Gb(a,!1)};
k.bV=function(a){var b=q.b,d=a.type,e=a.keyCode;if("keydown"!=d||e==w.jb||e==w.Ra||e==w.gd)"mousedown"==d&&a.button&&a.button!=D.Gl||(nC(this),ZB(this)?mC(this,pl.KE,this.Kk,this.aM):mC(this,pl.KE,this.kp,this.aM),"mousedown"==d&&(d=b.ca(a),this.Gb(d,!0))),b.Ea(a)};function nC(a){null==a.BLa&&(a.BLa=a.D(a.Ygb),r.bb(V),a.aM.closeHandler=a.BLa,a.Rja=a.kp.parentNode)}k.Qcb=function(a){a=q.b.ca(a);this.Gb(a,!1)};k.Pcb=function(a){a=q.b.ca(a);this.Gb(a,!1)};
k.Gb=function(a,b){var d=pl.Ph;b?C.w(a,d):C.O(a,d)};function mC(a,b,d,e){var f=a.nb,g=a.nb.f();f.Za(g,b)?a.nb.Jb(g,b):(a.Lpa&&iC(a,d),a.nb.He(g,d,e,b))}k.bhb=function(){this.zp&&this.Voa.appendChild(this.zp)};k.Ygb=function(){ZB(this)&&this.Kk?this.Kk.parentNode.appendChild(this.Kk):this.kp&&this.Rja.appendChild(this.kp)};
function hC(a,b,d,e,f,g){var h=g-f;if(2>=h)return b;for(var h=Math.ceil(h/2),l=0;l<h;l++)if(b)d=a,"end"==d.hd?jC(d):"start"==d.hd&&kC(d),d=a.xb.offsetWidth+3,e=a.xb.offsetHeight+5;else{var n=a;"end"==n.hd?fC(n):"start"==n.hd&&gC(n)}(b=aC(a,d,e))?f+=h:g-=h;return hC(a,b,d,e,f,g)}
function bC(a,b,d,e){for(;eC(a)<a.rh.length&&(e||("both"==a.hd||"droplist"==a.hd)&&(a.NT<a.mp||a.NT>a.yx));){switch(a.hd){case "end":jC(a);break;case "start":kC(a);break;case "both":case "droplist":b=a.NT-a.mp,d=a.rh.length-1,b<eC(a)-b-1&&0!=a.mp||a.yx==d?kC(a):jC(a)}b=a.xb.offsetWidth+3;d=a.xb.offsetHeight+5;e=aC(a,b,d)}return e}
function dC(a,b,d,e){for(var f=!1;!e&&0<eC(a);){switch(a.hd){case "end":fC(a);break;case "start":gC(a);break;case "both":case "droplist":e=a.NT-a.mp,e>=eC(a)-e-1||-1==a.mp?gC(a):fC(a)}f=!0;e=aC(a,b,d)}return f}function aC(a,b,d){var e=Math.max(a.xb.firstChild.offsetWidth,a.xb.scrollWidth),f=q.oa();A.c.Ka().La()&&f.S()==q.ia&&8>f.Ib()&&(e=a.xb.scrollWidth);a=Math.max(a.xb.firstChild.offsetHeight,a.xb.scrollHeight)<=d;return e<=b&&a}
function kC(a){var b=a.rh[a.mp-1];pC(b.elements);qC(b.QC);rC(b.vQ,!0);a.mp--}function jC(a){var b=a.rh[a.yx+1];pC(b.elements);qC(b.QC);rC(b.vQ,!0);a.yx++}function gC(a){var b=a.rh[a.mp];sC(b.elements);tC(a,b.QC,!0);rC(b.vQ);a.mp++}function fC(a){var b=a.rh[a.yx];sC(b.elements);tC(a,b.QC,void 0);rC(b.vQ);a.yx--}function sC(a){for(var b=a.length,d=0;d<b;d++){var e=a[d];e.y4=e.style.display;e.style.display="none"}}function pC(a){for(var b=a.length,d=0;d<b;d++){var e=a[d];e.style.display=e.y4||""}}
function qC(a){for(var b=a.length,d=0;d<b;d++){var e=a[d];e.parentNode.removeChild(e)}}function tC(a,b,d){for(var e=b.length,f=d?a.zp:a.kp,g=0;g<e;g++){var h=b[g];"before"==a.zG||d&&"vertical"==a.RW?f.appendChild(h):f.insertBefore(h,f.firstChild)}}function rC(a,b){for(var d=a.length,e=0;e<d;e++){var f=a[e],g=f[b?1:2];g.parentNode.insertBefore(f[0],g)}}function eC(a){var b=a.rh.length;return b-a.mp-(b-1-a.yx)}
function $B(a){switch(a.hd){case "end":C.O(a.xb,"p_AFEndOverflow");break;case "start":C.O(a.xb,"p_AFStartOverflow");break;case "both":C.O(a.xb,"p_AFEndOverflow");C.O(a.xb,"p_AFStartOverflow");break;case "droplist":C.O(a.xb,"p_AFOverflowDroplist")}}
function cC(a,b){if(b)switch(a.hd){case "end":C.w(a.xb,"p_AFEndOverflow");break;case "start":C.w(a.xb,"p_AFStartOverflow");break;case "both":C.w(a.xb,"p_AFEndOverflow");C.w(a.xb,"p_AFStartOverflow");break;case "droplist":C.w(a.xb,"p_AFOverflowDroplist")}else 0<a.mp&&0<a.zp.childNodes.length&&(ZB(a)?C.w(a.xb,"p_AFOverflowDroplist"):C.w(a.xb,"p_AFStartOverflow")),a.yx<a.rh.length-1&&0<a.kp.childNodes.length&&(ZB(a)?C.w(a.xb,"p_AFOverflowDroplist"):C.w(a.xb,"p_AFEndOverflow"))}
function iC(a,b){if(!b)switch(a.hd){case "end":b=a.kp;break;case "start":b=a.zp;break;case "droplist":b=a.Kk;break;case "both":v.l.warning("Roving tab index not yet supported for overflow type 'both'!");return}a.Pa&&a.Pa.setAttribute("tabIndex","-1");a.Pa=J.oI(b,{X9:!0,W9:!0})};