function W(){}m("AdfMenuUtils",W);m("AdfMenuUtils",W);r.v(W);
W.ga=function(){W.gE="p_AFSelected";m("AdfMenuUtils.SELECTED_STYLE_CLASS",W.gE);this.Nh="p_AFHighlighted";m("AdfMenuUtils.HIGHLIGHTED_STYLE_CLASS",W.Nh);this.HWa="p_AFFocused";m("AdfMenuUtils.FOCUSED_STYLE_CLASS",W.HWa);this.cf="p_AFDepressed";m("AdfMenuUtils.DEPRESSED_STYLE_CLASS",W.cf);this.aJ="p_AFDetached";m("AdfMenuUtils.DETACHED_STYLE_CLASS",W.aJ);this.uca="_afrDth";m("AdfMenuUtils.MENU_DEPTH_KEY",W.uca);this.cE="_afrOflw";m("AdfMenuUtils.OVERFLOW_KEY",W.cE);this.DR="AFMenuBarOverflowCell";
m("AdfMenuUtils.OVERFLOW_CELL_STYLE_CLASS",W.DR);this.CQ="_afrTargetRowCurrency";m("AdfMenuUtils.AFR_TARGETROWCURRENCY",W.CQ);this.BQ="_afrTargetComponentId";m("AdfMenuUtils.AFR_TARGETCOMPONENTID",W.BQ);this.OG=[]};m("AdfMenuUtils.InitClass",W.ga);W.Ny=function(a){return a instanceof AdfRichMenuBar?!0:(a=a.getParent())&&a instanceof AdfRichMenuBar};m("AdfMenuUtils.isOnMenuBar",W.Ny);W.lk=function(a){return"true"==a.parentNode.getAttribute(W.cE)};m("AdfMenuUtils.isInOverflow",W.lk);
W.Pi=function(a){return(a=a.getParent())&&a instanceof AdfRichMenu};m("AdfMenuUtils.isInMenu",W.Pi);W.rta=function(a){if(W.Pi(a)){var b=a.getParent().o();b.bind(a);return b.Ch()}return!1};m("AdfMenuUtils.isInDetachedMenu",W.rta);W.cl=function(a){var b=W.OG;if(b&&0<b.length)for(var d=b.length-1;0<=d;d--){var e=A.c.m(b[d]);if(e){var f=e.o();f.bind(e);f.Jb()}else delete b[d]}a&&W.pua()};m("AdfMenuUtils.closeAllMenus",W.cl);W.Jxa=function(){return W.gPa};m("AdfMenuUtils.GetLastOpenedRootMenuId",W.Jxa);
W.WUa=function(a){W.gPa=a};m("AdfMenuUtils.setLastOpenedRootMenuId",W.WUa);W.us=function(){return W.YMa};m("AdfMenuUtils.isMenuBarAutoOpenMode",W.us);W.gz=function(a){v.l.finest("menuBar auto open mode: "+W.YMa+" -\x3e "+a);W.YMa=a};m("AdfMenuUtils.setMenuBarAutoOpenMode",W.gz);W.pua=function(){var a=W.gPa;if(a&&(a=A.c.m(a),null!=a)){var b=a.o(),d=b.i();b.focus(a);W.HC(d)}};m("AdfMenuUtils.restoreFocusToLastOpenedRootMenu",W.pua);
W.HC=function(a){var b=a.getAttribute("id"),d=W.ila;d&&d!=b&&W.p_();C.w(a,W.Nh);W.ila=b};m("AdfMenuUtils.highlightRootMenuItem",W.HC);W.p_=function(){var a=q.b.getElementById(W.ila);a&&C.O(a,W.Nh);W.ila=null};m("AdfMenuUtils.unhighlightRootMenuItem",W.p_);W.uh=function(a,b,d){var e=W.OG;if(e&&0!=e.length)for(var f=e.length-1;0<=f;f--){var g=A.c.m(e[f]);if(g){var h=g.o();h.bind(g);if(or(h,a))break;d?e.pop():(h.Zt(),b?h.Jb():hr(h,f))}else delete e[f]}};m("AdfMenuUtils.dismiss",W.uh);
W.Vob=function(){return W.OG&&0<W.OG.length};m("AdfMenuUtils.areMenusOpened",W.Vob);W.tta=function(a){return 0<=E.indexOf(W.OG,a)};m("AdfMenuUtils.isMenuOpen",W.tta);W.Zpa=function(a){W.tta(a)||W.OG.push(a)};m("AdfMenuUtils.addOpenMenu",W.Zpa);W.hua=function(a){E.Ig(W.OG,a)};m("AdfMenuUtils.removeOpenMenu",W.hua);W.rra=function(a){var b=null;for(a=a.getParent();null!=a&&(a instanceof AdfRichMenu||a instanceof AdfRichPopup);){var d;if(null!=(d=a[W.CQ])){b={ssb:d,rsb:a[W.BQ]};break}a=a.getParent()}return b};
m("AdfMenuUtils.getContextMenuItemTargetAttrs",W.rra);W.Gua=function(a,b){var d=a.Xp(),e=W.CQ,f=W.BQ;null==d[e]&&(d[e]=d[f]={type:"String"},I.ii(this,e,f));a.setProperty(f,null);a.setProperty(e,null);a.setProperty(f,b.rsb);a.setProperty(e,b.ssb)};m("AdfMenuUtils.setContextMenuItemTargetAttrs",W.Gua);
W.u$=function(a,b,d,e){if(1==d){C.w(b,I.lb);d=W.Pi(a)?b:C.pa(b);var f=d.getAttribute("tabIndex");d.removeAttribute("tabIndex");d.setAttribute(J.Hh,"false");d.setAttribute("aria-disabled","true");e&&e.setAttribute(J.Hh,"false");W.Ny(a)&&C.ib(b,"a").removeAttribute("href");f&&"0"==f&&(a=a.getParent(),b=a.o(),b.bind(a),u.assert(null!=b.ah,"The menu item's parent should have a resetActiveDescendant method."),b.ah())}else C.O(b,I.lb),d=W.Pi(a)?b:C.pa(b),d.setAttribute("tabIndex","-1"),d.setAttribute(J.Hh,
"true"),d.removeAttribute("aria-disabled"),e&&e.removeAttribute(J.Hh),W.Ny(a)&&C.ib(b,"a").setAttribute("href","#")};m("AdfMenuUtils.menuItemDisabledChanged",W.u$);
W.v$=function(a,b,d,e){1==d?(a=W.Pi(a)?b:C.pa(b),a.setAttribute("tabIndex","-1"),a.setAttribute(J.Hh,"true"),e&&e.removeAttribute(J.Hh)):(b=W.Pi(a)?b:C.pa(b),d=b.getAttribute("tabIndex"),b.removeAttribute("tabIndex"),b.setAttribute(J.Hh,"false"),e&&e.setAttribute(J.Hh,"false"),d&&"0"==d&&(e=a.getParent(),a=e.o(),a.bind(e),u.assert(null!=a.ah,"The menu item's parent should have a resetActiveDescendant method."),a.ah()))};m("AdfMenuUtils.menuItemVisibleChanged",W.v$);