YUI.add("aui-widget-toggle",function(e,t){function n(){}n.prototype={toggle:function(t){var n=this;return e.Lang.isBoolean(t)||(t=!n.get("visible")),n.set("visible",t)}},e.WidgetToggle=n},"3.1.0-deprecated.108");

YUI.add("base-build",function(p,t){var u,n=p.BaseCore,y=p.Base,o=p.Lang,A="initializer",C="destructor",e=["_PLUG","_UNPLUG"];function i(t,e,r){r[t]&&(e[t]=(e[t]||[]).concat(r[t]))}function r(t,e,r){r._ATTR_CFG&&(e._ATTR_CFG_HASH=null,i.apply(null,arguments))}function s(t,e,r){n.modifyAttrs(e,r.ATTRS)}y._build=function(t,e,r,n,i,u){for(var s,a,c,o,l=y._build,g=l._ctor(e,u),_=l._cfg(e,u,r),f=l._mixCust,u=g._yuibuild.dynamic,m=0,d=r.length;m<d;m++)c=(a=(s=r[m]).prototype)[A],o=a[C],delete a[A],delete a[C],p.mix(g,s,!0,null,1),f(g,s,_),c&&(a[A]=c),o&&(a[C]=o),g._yuibuild.exts.push(s);return n&&p.mix(g.prototype,n,!0),i&&(p.mix(g,l._clean(i,_),!0),f(g,i,_)),g.prototype.hasImpl=l._impl,u&&(g.NAME=t,(g.prototype.constructor=g).modifyAttrs=e.modifyAttrs),g},u=y._build,p.mix(u,{_mixCust:function(t,e,r){var n,i,u,s,a,c;if(r&&(n=r.aggregates,i=r.custom,u=r.statics),u&&p.mix(t,e,!0,u),n)for(c=0,a=n.length;c<a;c++)s=n[c],!t.hasOwnProperty(s)&&e.hasOwnProperty(s)&&(t[s]=o.isArray(e[s])?[]:{}),p.aggregate(t,e,!0,[s]);if(i)for(c in i)i.hasOwnProperty(c)&&i[c](c,t,e)},_tmpl:function(t){function e(){e.superclass.constructor.apply(this,arguments)}return p.extend(e,t),e},_impl:function(t){for(var e,r,n,i,u=this._getClasses(),s=0,a=u.length;s<a;s++)if((e=u[s])._yuibuild)for(n=(r=e._yuibuild.exts).length,i=0;i<n;i++)if(r[i]===t)return!0;return!1},_ctor:function(t,e){var e=!e||!1!==e.dynamic,t=e?u._tmpl(t):t,r=t._yuibuild;return(r=r||(t._yuibuild={})).id=r.id||null,r.exts=r.exts||[],r.dynamic=e,t},_cfg:function(t,e,r){for(var n,i,u,s=[],a={},c=[],o=e&&e.aggregates,l=e&&e.custom,g=e&&e.statics,_=t;_&&_.prototype;)(n=_._buildCfg)&&(n.aggregates&&(s=s.concat(n.aggregates)),n.custom&&p.mix(a,n.custom,!0),n.statics)&&(c=c.concat(n.statics)),_=_.superclass?_.superclass.constructor:null;if(r)for(i=0,u=r.length;i<u;i++)(n=(_=r[i])._buildCfg)&&(n.aggregates&&(s=s.concat(n.aggregates)),n.custom&&p.mix(a,n.custom,!0),n.statics)&&(c=c.concat(n.statics));return o&&(s=s.concat(o)),l&&p.mix(a,e.cfgBuild,!0),{aggregates:s,custom:a,statics:c=g?c.concat(g):c}},_clean:function(t,e){var r,n,i,u=p.merge(t),s=e.aggregates;for(r in e.custom)u.hasOwnProperty(r)&&delete u[r];for(n=0,i=s.length;n<i;n++)r=s[n],u.hasOwnProperty(r)&&delete u[r];return u}}),y.build=function(t,e,r,n){return u(t,e,r,null,null,n)},y.create=function(t,e,r,n,i){return u(t,e,r,n,i)},y.mix=function(t,e){return t._CACHED_CLASS_DATA&&(t._CACHED_CLASS_DATA=null),u(null,t,e,null,null,{dynamic:!1})},n._buildCfg={aggregates:e.concat(),custom:{ATTRS:s,_ATTR_CFG:r,_NON_ATTRS_CFG:i}},y._buildCfg={aggregates:e.concat(),custom:{ATTRS:s,_ATTR_CFG:r,_NON_ATTRS_CFG:i}}},"patched-v3.18.7",{requires:["base-base"]});
YUI.add("aui-component",function(e,t){var n=e.Lang,r=e.Array,i=function(e,t){return(e||[]).concat(t||[])},s={},o=e.config.win.Object.prototype.constructor,u=e.ClassNameManager,a=u.getClassName,f=e.Widget.getClassName,l=e.getClassName,c=l("hide"),h=e.Base.create("component",e.Widget,[e.WidgetCssClass,e.WidgetToggle],{initializer:function(e){var t=this;t._originalConfig=e,t._setRender(e),s[t.get("id")]=t},clone:function(t){var n=this;return t=t||{},t.id=t.id||e.guid(),e.mix(t,n._originalConfig),new n.constructor(t)},_uiSetVisible:function(e){var t=this,n=h.superclass._uiSetVisible;n&&n.apply(t,arguments);var r=t.get("hideClass");if(r!==!1){var i=t.get("boundingBox");i.toggleClass(r||c,!e)}},_renderBoxClassNames:function(){var e=this,t=e.get("boundingBox")._node,n=e.get("contentBox")._node,i=t.className,s=n.className,o=i?i.split(" "):[],u=s?s.split(" "):[],c=e._getClasses(),h=c.length,p=h-4,d,v;o.push(f());for(var m=h-3;m>=0;m--)d=c[m],v=String(d.NAME).toLowerCase(),o.push(d.CSS_PREFIX||a(v)),m<=p&&(v=v,u.push(l(v,"content")));u.push(e.getClassName("content")),t===n?s=r.dedupe(u.concat(o)).join(" "):(t.className=r.dedupe(o).join(" "),s=r.dedupe(u).join(" ")),n.className=s},_renderInteraction:function(e,t){var n=this;n.render(t);var r=n._renderHandles;for(var i=r.length-1;i>=0;i--){var s=r.pop();s.detach()}},_setRender:function(t){var r=this,i=t&&t.render;if(i&&i.constructor===o){var s=i.eventType||"mousemove",u=i.parentNode,a=i.selector||u;if(a){r._renderHandles=[];var f=r._renderHandles;n.isArray(s)||(s=[s]);var l=e.rbind(r._renderInteraction,r,u),c=e.one(a);for(var h=s.length-1;h>=0;h--)f[h]=c.once(s[h],l);delete t.render}}}},{ATTRS:{useARIA:{writeOnce:!0,value:!1,validator:n.isBoolean},hideClass:{value:c},render:{value:!1,writeOnce:!0}}});h._INSTANCES=s,h.getById=function(e){return s[e]};var p=e.Widget.prototype._UI_ATTRS;h._applyCssPrefix=function(t){return t&&t.NAME&&!("CSS_PREFIX"in t)&&(t.CSS_PREFIX=e.getClassName(String(t.NAME).toLowerCase())),t},h.create=function(t){t=t||{};var r=t.EXTENDS||e.Component,s=t.constructor;e.Object.owns(t,"constructor")||(s=function(){s.superclass.constructor.apply(this,arguments)});var o=t.prototype;if(o)if(t.UI_ATTRS||t.BIND_UI_ATTRS||t.SYNC_UI_ATTRS){var u=i(t.BIND_UI_ATTRS,t.UI_ATTRS),a=i(t.SYNC_UI_ATTRS,t.UI_ATTRS),f=r.prototype,l=f&&f._UI_ATTRS||p;u=i(l.BIND,u),a=i(l.SYNC,a);var c=o._UI_ATTRS;c||(c=o._UI_ATTRS={}),u.length&&(c.BIND=u),a.length&&(c.SYNC=a)}var d=t.AUGMENTS;return d&&!n.isArray(d)&&(d=[d]),e.mix(s,t),delete s.prototype,e.extend(s,r,o),d&&(s=e.Base.build(t.NAME,s,d,{dynamic:!1})),h._applyCssPrefix(s),s},h.CSS_PREFIX=l("component");var d=e.Base;h.build=function(){var e=d.build.apply(d,arguments);return h._applyCssPrefix(e),e},e.Component=h},"3.1.0-deprecated.108",{requires:["aui-classnamemanager","aui-widget-cssclass","aui-widget-toggle","base-build","widget-base"]});

YUI.add("event-mouseenter",function(h,e){var a=h.Env.evt.dom_wrappers,f=h.DOM.contains,p=h.Array,o=function(){},t={proxyType:"mouseover",relProperty:"fromElement",_notify:function(e,t,n){var r=this._node,t=e.relatedTarget||e[t];r===t||f(r,t)||n.fire(new h.DOMEventFacade(e,r,a["event:"+h.stamp(r)+e.type]))},on:function(e,t,n){e=h.Node.getDOMNode(e),e=[this.proxyType,this._notify,e,null,this.relProperty,n];t.handle=h.Event._attach(e,{facade:!1})},detach:function(e,t){t.handle.detach()},delegate:function(e,t,n,r){e=h.Node.getDOMNode(e),e=[this.proxyType,o,e,null,n];t.handle=h.Event._attach(e,{facade:!1}),t.handle.sub.filter=r,t.handle.sub.relProperty=this.relProperty,t.handle.sub._notify=this._filterNotify},_filterNotify:function(e,t,n){t=t.slice(),this.args&&t.push.apply(t,this.args);var r,a,o,i,l,d=h.delegate._applyFilter(this.filter,t,n),s=t[0].relatedTarget||t[0][this.relProperty];if(d)for(a=0,o=(d=p(d)).length&&(!r||!r.stopped);a<o&&(l=d[0],f(l,s)||(r||((r=new h.DOMEventFacade(t[0],l,n)).container=h.one(n.el)),r.currentTarget=h.one(l),!1!==(i=t[1].fire(r))));++a);return i},detachDelegate:function(e,t){t.handle.detach()}};h.Event.define("mouseenter",t,!0),h.Event.define("mouseleave",h.merge(t,{proxyType:"mouseout",relProperty:"toElement"}),!0)},"patched-v3.18.7",{requires:["event-synthetic"]});
YUI.add("plugin",function(n,t){function s(t){(this.hasImpl&&this.hasImpl(n.Plugin.Base)?s.prototype.initializer:s.superclass.constructor).apply(this,arguments)}s.ATTRS={host:{writeOnce:!0}},s.NAME="plugin",s.NS="plugin",n.extend(s,n.Base,{_handles:null,initializer:function(t){this._handles=[]},destructor:function(){if(this._handles)for(var t=0,s=this._handles.length;t<s;t++)this._handles[t].detach()},doBefore:function(t,s,e){var n,h=this.get("host");return t in h?n=this.beforeHostMethod(t,s,e):h.on&&(n=this.onHostEvent(t,s,e)),n},doAfter:function(t,s,e){var n,h=this.get("host");return t in h?n=this.afterHostMethod(t,s,e):h.after&&(n=this.afterHostEvent(t,s,e)),n},onHostEvent:function(t,s,e){t=this.get("host").on(t,s,e||this);return this._handles.push(t),t},onceHostEvent:function(t,s,e){t=this.get("host").once(t,s,e||this);return this._handles.push(t),t},afterHostEvent:function(t,s,e){t=this.get("host").after(t,s,e||this);return this._handles.push(t),t},onceAfterHostEvent:function(t,s,e){t=this.get("host").onceAfter(t,s,e||this);return this._handles.push(t),t},beforeHostMethod:function(t,s,e){s=n.Do.before(s,this.get("host"),t,e||this);return this._handles.push(s),s},afterHostMethod:function(t,s,e){s=n.Do.after(s,this.get("host"),t,e||this);return this._handles.push(s),s},toString:function(){return this.constructor.NAME+"["+this.constructor.NS+"]"}}),n.namespace("Plugin").Base=s},"patched-v3.18.7",{requires:["base-base"]});
YUI.add("event-simulate",function(F,e){var t,n,q,R,V,H,J,Q,W,Z,$,_,ee,te;t=F.Lang,n=F.config.win,q=t.isFunction,R=t.isString,V=t.isBoolean,H=t.isObject,J=t.isNumber,Q={click:1,dblclick:1,mouseover:1,mouseout:1,mousedown:1,mouseup:1,mousemove:1,contextmenu:1},W=n&&n.PointerEvent?{pointerover:1,pointerout:1,pointerdown:1,pointerup:1,pointermove:1}:{MSPointerOver:1,MSPointerOut:1,MSPointerDown:1,MSPointerUp:1,MSPointerMove:1},Z={keydown:1,keyup:1,keypress:1},$={submit:1,blur:1,change:1,focus:1,resize:1,scroll:1,select:1},_={scroll:1,resize:1,reset:1,submit:1,change:1,select:1,error:1,abort:1},ee={touchstart:1,touchmove:1,touchend:1,touchcancel:1},te={gesturestart:1,gesturechange:1,gestureend:1},F.mix(_,Q),F.mix(_,Z),F.mix(_,ee),F.Event.simulate=function(S,e,t){if(t=t||{},Q[e]||W[e]){var n=S,o=e,r=t.bubbles,i=t.cancelable,a=t.view,s=t.detail,c=t.screenX,u=t.screenY,l=t.clientX,v=t.clientY,m=t.ctrlKey,g=t.altKey,E=t.shiftKey,b=t.metaKey,d=t.button,h=t.relatedTarget,y=(n||F.error("simulateMouseEvent(): Invalid target."),R(o)?Q[o.toLowerCase()]||W[o]||F.error("simulateMouseEvent(): Event type '"+o+"' not supported."):F.error("simulateMouseEvent(): Event type must be a string."),V(r)||(r=!0),V(i)||(i="mousemove"!==o),H(a)||(a=F.config.win),J(s)||(s=1),J(c)||(c=0),J(u)||(u=0),J(l)||(l=0),J(v)||(v=0),V(m)||(m=!1),V(g)||(g=!1),V(E)||(E=!1),V(b)||(b=!1),J(d)||(d=0),h=h||null,null);if(q(F.config.doc.createEvent))(y=F.config.doc.createEvent("MouseEvents")).initMouseEvent?y.initMouseEvent(o,r,i,a,s,c,u,l,v,m,g,E,b,d,h):((y=F.config.doc.createEvent("UIEvents")).initEvent(o,r,i),y.view=a,y.detail=s,y.screenX=c,y.screenY=u,y.clientX=l,y.clientY=v,y.ctrlKey=m,y.altKey=g,y.metaKey=b,y.shiftKey=E,y.button=d,y.relatedTarget=h),h&&!y.relatedTarget&&("mouseout"===o?y.toElement=h:"mouseover"===o&&(y.fromElement=h)),n.dispatchEvent(y);else if(H(F.config.doc.createEventObject)){switch((y=F.config.doc.createEventObject()).bubbles=r,y.cancelable=i,y.view=a,y.detail=s,y.screenX=c,y.screenY=u,y.clientX=l,y.clientY=v,y.ctrlKey=m,y.altKey=g,y.metaKey=b,y.shiftKey=E,d){case 0:y.button=1;break;case 1:y.button=4;break;case 2:break;default:y.button=0}y.relatedTarget=h,n.fireEvent("on"+o,y)}else F.error("simulateMouseEvent(): No event simulation framework present.")}else if(Z[e]){var r=S,f=e,i=t.bubbles,a=t.cancelable,s=t.view,c=t.ctrlKey,u=t.altKey,l=t.shiftKey,v=t.metaKey,m=t.keyCode,g=t.charCode;if(r||F.error("simulateKeyEvent(): Invalid target."),R(f))switch(f=f.toLowerCase()){case"textevent":f="keypress";break;case"keyup":case"keydown":case"keypress":break;default:F.error("simulateKeyEvent(): Event type '"+f+"' not supported.")}else F.error("simulateKeyEvent(): Event type must be a string.");V(i)||(i=!0),V(a)||(a=!0),H(s)||(s=F.config.win),V(c)||(c=!1),V(u)||(u=!1),V(l)||(l=!1),V(v)||(v=!1),J(m)||(m=0),J(g)||(g=0);b=null;if(q(F.config.doc.createEvent)){try{(b=F.config.doc.createEvent("KeyEvents")).initKeyEvent(f,i,a,s,c,u,l,v,m,g)}catch(z){try{b=F.config.doc.createEvent("Events")}catch(D){b=F.config.doc.createEvent("UIEvents")}finally{b.initEvent(f,i,a),b.view=s,b.altKey=u,b.ctrlKey=c,b.shiftKey=l,b.metaKey=v,b.keyCode=m,b.charCode=g}}r.dispatchEvent(b)}else H(F.config.doc.createEventObject)?((b=F.config.doc.createEventObject()).bubbles=i,b.cancelable=a,b.view=s,b.ctrlKey=c,b.altKey=u,b.shiftKey=l,b.metaKey=v,b.keyCode=0<g?g:m,r.fireEvent("on"+f,b)):F.error("simulateKeyEvent(): No event simulation framework present.")}else $[e]?(E=S,d=e,h=t.bubbles,o=t.cancelable,n=t.view,Y=t.detail,E||F.error("simulateUIEvent(): Invalid target."),R(d)?(d=d.toLowerCase(),$[d]||F.error("simulateUIEvent(): Event type '"+d+"' not supported.")):F.error("simulateUIEvent(): Event type must be a string."),C=null,V(h)||(h=d in _),V(o)||(o="submit"===d),H(n)||(n=F.config.win),J(Y)||(Y=1),q(F.config.doc.createEvent)?((C=F.config.doc.createEvent("UIEvents")).initUIEvent(d,h,o,n,Y),E.dispatchEvent(C)):H(F.config.doc.createEventObject)?((C=F.config.doc.createEventObject()).bubbles=h,C.cancelable=o,C.view=n,C.detail=Y,E.fireEvent("on"+d,C)):F.error("simulateUIEvent(): No event simulation framework present.")):ee[e]?!(F.config.win&&"ontouchstart"in F.config.win)||F.UA.phantomjs||F.UA.chrome&&F.UA.chrome<6?F.error("simulate(): Event '"+e+"' can't be simulated. Use gesture-simulate module instead."):(Y=S,C=e,p=t.bubbles,K=t.cancelable,L=t.view,w=t.detail,N=t.screenX,U=t.screenY,k=t.clientX,T=t.clientY,M=t.ctrlKey,I=t.altKey,A=t.shiftKey,O=t.metaKey,B=t.touches,X=t.targetTouches,j=t.changedTouches,P=t.scale,x=t.rotation,Y||F.error("simulateTouchEvent(): Invalid target."),F.Lang.isString(C)?(C=C.toLowerCase(),ee[C]||F.error("simulateTouchEvent(): Event type '"+C+"' not supported.")):F.error("simulateTouchEvent(): Event type must be a string."),"touchstart"===C||"touchmove"===C?0===B.length&&F.error("simulateTouchEvent(): No touch object in touches"):"touchend"===C&&0===j.length&&F.error("simulateTouchEvent(): No touch object in changedTouches"),F.Lang.isBoolean(p)||(p=!0),F.Lang.isBoolean(K)||(K="touchcancel"!==C),F.Lang.isObject(L)||(L=F.config.win),F.Lang.isNumber(w)||(w=1),F.Lang.isNumber(N)||(N=0),F.Lang.isNumber(U)||(U=0),F.Lang.isNumber(k)||(k=0),F.Lang.isNumber(T)||(T=0),F.Lang.isBoolean(M)||(M=!1),F.Lang.isBoolean(I)||(I=!1),F.Lang.isBoolean(A)||(A=!1),F.Lang.isBoolean(O)||(O=!1),F.Lang.isNumber(P)||(P=1),F.Lang.isNumber(x)||(x=0),F.Lang.isFunction(F.config.doc.createEvent)?(F.UA.android?F.UA.android<4?((G=F.config.doc.createEvent("MouseEvents")).initMouseEvent(C,p,K,L,w,N,U,k,T,M,I,A,O,0,Y),G.touches=B,G.targetTouches=X,G.changedTouches=j):(G=F.config.doc.createEvent("TouchEvent")).initTouchEvent(B,X,j,C,L,N,U,k,T,M,I,A,O):F.UA.ios?2<=F.UA.ios?(G=F.config.doc.createEvent("TouchEvent")).initTouchEvent(C,p,K,L,w,N,U,k,T,M,I,A,O,B,X,j,P,x):F.error("simulateTouchEvent(): No touch event simulation framework present for iOS, "+F.UA.ios+"."):F.error("simulateTouchEvent(): Not supported agent yet, "+F.UA.userAgent),Y.dispatchEvent(G)):F.error(
"simulateTouchEvent(): No event simulation framework present.")):F.UA.ios&&2<=F.UA.ios&&te[e]?(p=S,K=e,L=t.bubbles,w=t.cancelable,N=t.view,U=t.detail,k=t.screenX,T=t.screenY,M=t.clientX,I=t.clientY,A=t.ctrlKey,O=t.altKey,B=t.shiftKey,X=t.metaKey,j=t.scale,P=t.rotation,(!F.UA.ios||F.UA.ios<2)&&F.error("simulateGestureEvent(): Native gesture DOM eventframe is not available in this platform."),p||F.error("simulateGestureEvent(): Invalid target."),F.Lang.isString(K)?(K=K.toLowerCase(),te[K]||F.error("simulateTouchEvent(): Event type '"+K+"' not supported.")):F.error("simulateGestureEvent(): Event type must be a string."),F.Lang.isBoolean(L)||(L=!0),F.Lang.isBoolean(w)||(w=!0),F.Lang.isObject(N)||(N=F.config.win),F.Lang.isNumber(U)||(U=2),F.Lang.isNumber(k)||(k=0),F.Lang.isNumber(T)||(T=0),F.Lang.isNumber(M)||(M=0),F.Lang.isNumber(I)||(I=0),F.Lang.isBoolean(A)||(A=!1),F.Lang.isBoolean(O)||(O=!1),F.Lang.isBoolean(B)||(B=!1),F.Lang.isBoolean(X)||(X=!1),F.Lang.isNumber(j)||(j=1),F.Lang.isNumber(P)||(P=0),(x=F.config.doc.createEvent("GestureEvent")).initGestureEvent(K,L,w,N,U,k,T,M,I,A,O,B,X,p,j,P),p.dispatchEvent(x)):F.error("simulate(): Event '"+e+"' can't be simulated.");var p,K,L,w,N,U,k,T,M,I,A,O,B,X,j,P,x,G,Y,C}},"patched-v3.18.7",{requires:["event-base"]});
YUI.add("async-queue",function(e,t){e.AsyncQueue=function(){this._init(),this.add.apply(this,arguments)};var i=e.AsyncQueue,s="shift",u="promote",r="remove",h=e.Lang.isObject,a=e.Lang.isFunction;i.defaults=e.mix({autoContinue:!0,iterations:1,timeout:10,until:function(){return this.iterations|=0,this.iterations<=0}},e.config.queueDefaults||{}),e.extend(i,e.EventTarget,{_running:!1,_init:function(){e.EventTarget.call(this,{prefix:"queue",emitFacade:!0}),this._q=[],this.defaults={},this._initEvents()},_initEvents:function(){this.publish({execute:{defaultFn:this._defExecFn,emitFacade:!0},shift:{defaultFn:this._defShiftFn,emitFacade:!0},add:{defaultFn:this._defAddFn,emitFacade:!0},promote:{defaultFn:this._defPromoteFn,emitFacade:!0},remove:{defaultFn:this._defRemoveFn,emitFacade:!0}})},next:function(){for(var t;this._q.length&&(t=this._q[0]=this._prepare(this._q[0]))&&t.until();)this.fire(s,{callback:t}),t=null;return t||null},_defShiftFn:function(t){0===this.indexOf(t.callback)&&this._q.shift()},_prepare:function(t){var n;return a(t)&&t._prepared?t:(t=e.merge(i.defaults,{context:this,args:[],_prepared:!0},this.defaults,a(t)?{fn:t}:t),n=e.bind(function(){n._running||n.iterations--,a(n.fn)&&n.fn.apply(n.context||e,e.Array(n.args))},this),e.mix(n,t))},run:function(){var t;if(this._executing)this._running=!0;else{for(t=this.next();t&&!this.isRunning()&&(t.timeout<0?this._execute(t):this._schedule(t));t=this.next());t||this.fire("complete")}return this},_execute:function(t){this._running=t._running=!0,(this._executing=t).iterations--,this.fire("execute",{callback:t});var n=this._running&&t.autoContinue;return this._running=t._running=!1,this._executing=!1,n},_schedule:function(t){return this._running=e.later(t.timeout,this,function(){this._execute(t)&&this.run()}),!1},isRunning:function(){return!!this._running},_defExecFn:function(t){t.callback()},add:function(){return this.fire("add",{callbacks:e.Array(arguments,0,!0)}),this},_defAddFn:function(t){var n=this._q,i=[];e.Array.each(t.callbacks,function(t){h(t)&&(n.push(t),i.push(t))}),t.added=i},pause:function(){return this._running&&h(this._running)&&this._running.cancel(),this._running=!1,this},stop:function(){return this._q=[],this._running&&h(this._running)&&(this._running.cancel(),this._running=!1),this._executing||this.run(),this},indexOf:function(t){for(var n,i=0,e=this._q.length;i<e;++i)if((n=this._q[i])===t||n.id===t)return i;return-1},getCallback:function(t){t=this.indexOf(t);return-1<t?this._q[t]:null},promote:function(t){var n,i={callback:t};return this.isRunning()?n=this.after(s,function(){this.fire(u,i),n.detach()},this):this.fire(u,i),this},_defPromoteFn:function(t){var n=this.indexOf(t.callback),n=-1<n?this._q.splice(n,1)[0]:null;(t.promoted=n)&&this._q.unshift(n)},remove:function(t){var n,i={callback:t};return this.isRunning()?n=this.after(s,function(){this.fire(r,i),n.detach()},this):this.fire(r,i),this},_defRemoveFn:function(t){var n=this.indexOf(t.callback);t.removed=-1<n?this._q.splice(n,1)[0]:null},size:function(){return this.isRunning()||this.next(),this._q.length}})},"patched-v3.18.7",{requires:["event-custom"]});
YUI.add("gesture-simulate",function(N,M){var t,u,g,M="gesture-simulate",d=N.config.win&&"ontouchstart"in N.config.win&&!N.UA.phantomjs&&!(N.UA.chrome&&N.UA.chrome<6),s={tap:1,doubletap:1,press:1,move:1,flick:1,pinch:1,rotate:1},a={touchstart:1,touchmove:1,touchend:1,touchcancel:1},r=N.config.doc,I={HOLD_TAP:10,DELAY_TAP:10,HOLD_PRESS:3e3,MIN_HOLD_PRESS:1e3,MAX_HOLD_PRESS:6e4,DISTANCE_MOVE:200,DURATION_MOVE:1e3,MAX_DURATION_MOVE:5e3,MIN_VELOCITY_FLICK:1.3,DISTANCE_FLICK:200,DURATION_FLICK:1e3,MAX_DURATION_FLICK:5e3,DURATION_PINCH:1e3},O="touchstart",D="touchmove",R="touchend",o="mouseup";function e(t){t||N.error(M+": invalid target node"),this.node=t,this.target=N.Node.getDOMNode(t);var t=this.node.getXY(),e=this._getDims();u=t[0]+e[0]/2,g=t[1]+e[1]/2}e.prototype={_toRadian:function(t){return t*(Math.PI/180)},_getDims:function(){var t,e,i;return this.target.getBoundingClientRect?(i="height"in(t=this.target.getBoundingClientRect())?t.height:Math.abs(t.bottom-t.top),e="width"in t?t.width:Math.abs(t.right-t.left)):(e=(t=this.node.get("region")).width,i=t.height),[e,i]},_calculateDefaultPoint:function(t){var e;return N.Lang.isArray(t)&&0!==t.length?(1==t.length&&(e=this._getDims[1],t[1]=e/2),t[0]=this.node.getX()+t[0],t[1]=this.node.getY()+t[1]):t=[u,g],t},rotate:function(t,e,i,n,a,s,r){(!N.Lang.isNumber(i)||!N.Lang.isNumber(n)||i<0||n<0)&&(n=i=this.target.offsetWidth<this.target.offsetHeight?this.target.offsetWidth/4:this.target.offsetHeight/4),N.Lang.isNumber(r)||N.error(M+"Invalid rotation detected."),this.pinch(t,e,i,n,a,s,r)},pinch:function(t,e,i,n,a,s,r){var o,c,h,u,g,d,l,m,_,f,p,L,T,X=0,A=i,E=n,Y={start:[],end:[]},v={start:[],end:[]};if(e=this._calculateDefaultPoint(e),(!N.Lang.isNumber(A)||!N.Lang.isNumber(E)||A<0||E<0)&&N.error(M+"Invalid startRadius and endRadius detected."),(!N.Lang.isNumber(a)||a<=0)&&(a=I.DURATION_PINCH),N.Lang.isNumber(s))for(s%=360;s<0;)s+=360;else s=0;for(N.Lang.isNumber(r)||(r=0),N.AsyncQueue.defaults.timeout=20,o=new N.AsyncQueue,u=e[0],g=e[1],f=(_=s)+r,Y.start=[u+A*Math.sin(this._toRadian(_)),g-A*Math.cos(this._toRadian(_))],Y.end=[u+E*Math.sin(this._toRadian(f)),g-E*Math.cos(this._toRadian(f))],v.start=[u-A*Math.sin(this._toRadian(_)),g+A*Math.cos(this._toRadian(_))],v.end=[u-E*Math.sin(this._toRadian(f)),g+E*Math.cos(this._toRadian(f))],d=1,l=n/i,o.add({fn:function(){var t={pageX:Y.start[0],pageY:Y.start[1],clientX:Y.start[0],clientY:Y.start[1]},e={pageX:v.start[0],pageY:v.start[1],clientX:v.start[0],clientY:v.start[1]},t=this._createTouchList([N.merge({identifier:X++},t),N.merge({identifier:X++},e)]),e={pageX:(Y.start[0]+v.start[0])/2,pageY:(Y.start[0]+v.start[1])/2,clientX:(Y.start[0]+v.start[0])/2,clientY:(Y.start[0]+v.start[1])/2};this._simulateEvent(this.target,O,N.merge({touches:t,targetTouches:t,changedTouches:t,scale:d,rotation:_},e)),2<=N.UA.ios&&this._simulateEvent(this.target,"gesturestart",N.merge({scale:d,rotation:_},e))},timeout:0,context:this}),L=Math.floor(a/20),h=(E-A)/L,m=(l-d)/L,p=(f-_)/L,T=function(t){var e=A+h*t,i=u+e*Math.sin(this._toRadian(_+p*t)),n=g-e*Math.cos(this._toRadian(_+p*t)),a=u-e*Math.sin(this._toRadian(_+p*t)),e=g+e*Math.cos(this._toRadian(_+p*t)),s=(i+a)/2,r=(n+e)/2,a={pageX:a,pageY:e,clientX:a,clientY:e},e=this._createTouchList([N.merge({identifier:X++},{pageX:i,pageY:n,clientX:i,clientY:n}),N.merge({identifier:X++},a)]),i={pageX:s,pageY:r,clientX:s,clientY:r};this._simulateEvent(this.target,D,N.merge({touches:e,targetTouches:e,changedTouches:e,scale:d+m*t,rotation:_+p*t},i)),2<=N.UA.ios&&this._simulateEvent(this.target,"gesturechange",N.merge({scale:d+m*t,rotation:_+p*t},i))},c=0;c<L;c++)o.add({fn:T,args:[c],context:this});o.add({fn:function(){var t=this._getEmptyTouchList(),e={pageX:Y.end[0],pageY:Y.end[1],clientX:Y.end[0],clientY:Y.end[1]},i={pageX:v.end[0],pageY:v.end[1],clientX:v.end[0],clientY:v.end[1]},e=this._createTouchList([N.merge({identifier:X++},e),N.merge({identifier:X++},i)]),i={pageX:(Y.end[0]+v.end[0])/2,pageY:(Y.end[0]+v.end[1])/2,clientX:(Y.end[0]+v.end[0])/2,clientY:(Y.end[0]+v.end[1])/2};2<=N.UA.ios&&this._simulateEvent(this.target,"gestureend",N.merge({scale:l,rotation:f},i)),this._simulateEvent(this.target,R,N.merge({touches:t,targetTouches:t,changedTouches:e,scale:l,rotation:f},i))},context:this}),t&&N.Lang.isFunction(t)&&o.add({fn:t,context:this.node}),o.run()},tap:function(t,e,i,n,a){var s,r,o,c,h,u=new N.AsyncQueue,g=this._getEmptyTouchList();for(e=this._calculateDefaultPoint(e),(!N.Lang.isNumber(i)||i<1)&&(i=1),N.Lang.isNumber(n)||(n=I.HOLD_TAP),N.Lang.isNumber(a)||(a=I.DELAY_TAP),r={pageX:e[0],pageY:e[1],clientX:e[0],clientY:e[1]},s=this._createTouchList([N.merge({identifier:0},r)]),c=function(){this._simulateEvent(this.target,O,N.merge({touches:s,targetTouches:s,changedTouches:s},r))},h=function(){this._simulateEvent(this.target,R,N.merge({touches:g,targetTouches:g,changedTouches:s},r))},o=0;o<i;o++)u.add({fn:c,context:this,timeout:0===o?0:a}),u.add({fn:h,context:this,timeout:n});1<i&&!d&&u.add({fn:function(){this._simulateEvent(this.target,"dblclick",r)},context:this}),t&&N.Lang.isFunction(t)&&u.add({fn:t,context:this.node}),u.run()},flick:function(t,e,i,n,a){e=this._calculateDefaultPoint(e),N.Lang.isString(i)?"x"!==(i=i.toLowerCase())&&"y"!==i&&N.error(M+"(flick): Only x or y axis allowed"):i="x",N.Lang.isNumber(n)||(n=I.DISTANCE_FLICK),N.Lang.isNumber(a)?I.MAX_DURATION_FLICK<a&&(a=I.MAX_DURATION_FLICK):a=I.DURATION_FLICK,Math.abs(n)/a<I.MIN_VELOCITY_FLICK&&(a=Math.abs(n)/I.MIN_VELOCITY_FLICK),i={start:N.clone(e),end:["x"===i?e[0]+n:e[0],"y"===i?e[1]+n:e[1]]},this._move(t,i,a)},move:function(t,e,i){N.Lang.isObject(e)?(N.Lang.isArray(e.point)?e.point=this._calculateDefaultPoint(e.point):e.point=this._calculateDefaultPoint([]),N.Lang.isNumber(e.xdist)||(e.xdist=I.DISTANCE_MOVE),N.Lang.isNumber(e.ydist)||(e.ydist=0)):e={point:this._calculateDefaultPoint([]),xdist:I.DISTANCE_MOVE,ydist:0},N.Lang.isNumber(i)?I.MAX_DURATION_MOVE<i&&(i=I.MAX_DURATION_MOVE):i=I.DURATION_MOVE,e={start:N.clone(
e.point),end:[e.point[0]+e.xdist,e.point[1]+e.ydist]},this._move(t,e,i)},_move:function(t,n,e){var i,a,s,r,o,c,h=0;for(N.Lang.isNumber(e)?I.MAX_DURATION_MOVE<e&&(e=I.MAX_DURATION_MOVE):e=I.DURATION_MOVE,N.Lang.isObject(n)?(N.Lang.isArray(n.start)||(n.start=[u,g]),N.Lang.isArray(n.end)||(n.end=[u+I.DISTANCE_MOVE,g])):n={start:[u,g],end:[u+I.DISTANCE_MOVE,g]},N.AsyncQueue.defaults.timeout=20,(i=new N.AsyncQueue).add({fn:function(){var t={pageX:n.start[0],pageY:n.start[1],clientX:n.start[0],clientY:n.start[1]},e=this._createTouchList([N.merge({identifier:h++},t)]);this._simulateEvent(this.target,O,N.merge({touches:e,targetTouches:e,changedTouches:e},t))},timeout:0,context:this}),s=Math.floor(e/20),r=(n.end[0]-n.start[0])/s,o=(n.end[1]-n.start[1])/s,c=function(t){var e=n.start[0]+r*t,t=n.start[1]+o*t,e={pageX:e,pageY:t,clientX:e,clientY:t},t=this._createTouchList([N.merge({identifier:h++},e)]);this._simulateEvent(this.target,D,N.merge({touches:t,targetTouches:t,changedTouches:t},e))},a=0;a<s;a++)i.add({fn:c,args:[a],context:this});i.add({fn:function(){var t={pageX:n.end[0],pageY:n.end[1],clientX:n.end[0],clientY:n.end[1]},e=this._createTouchList([N.merge({identifier:h},t)]);this._simulateEvent(this.target,D,N.merge({touches:e,targetTouches:e,changedTouches:e},t))},timeout:0,context:this}),i.add({fn:function(){var t={pageX:n.end[0],pageY:n.end[1],clientX:n.end[0],clientY:n.end[1]},e=this._getEmptyTouchList(),i=this._createTouchList([N.merge({identifier:h},t)]);this._simulateEvent(this.target,R,N.merge({touches:e,targetTouches:e,changedTouches:i},t))},context:this}),t&&N.Lang.isFunction(t)&&i.add({fn:t,context:this.node}),i.run()},_getEmptyTouchList:function(){return t=t||this._createTouchList([])},_createTouchList:function(t){var e,i=[],n=this;return t&&N.Lang.isArray(t)?N.UA.android&&4<=N.UA.android||N.UA.ios&&2<=N.UA.ios?(N.each(t,function(t){t.identifier||(t.identifier=0),t.pageX||(t.pageX=0),t.pageY||(t.pageY=0),t.screenX||(t.screenX=0),t.screenY||(t.screenY=0),i.push(r.createTouch(N.config.win,n.target,t.identifier,t.pageX,t.pageY,t.screenX,t.screenY))}),e=r.createTouchList.apply(r,i)):N.UA.ios&&N.UA.ios<2?N.error(M+": No touch event simulation framework present."):(e=[],N.each(t,function(t){t.identifier||(t.identifier=0),t.clientX||(t.clientX=0),t.clientY||(t.clientY=0),t.pageX||(t.pageX=0),t.pageY||(t.pageY=0),t.screenX||(t.screenX=0),t.screenY||(t.screenY=0),e.push({target:n.target,identifier:t.identifier,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY})}),e.item=function(t){return e[t]}):N.error(M+": Invalid touchPoints passed"),e},_simulateEvent:function(t,e,i){var n;!a[e]||d?N.Event.simulate(t,e,i):this._isSingleTouch(i.touches,i.targetTouches,i.changedTouches)?(e={touchstart:"mousedown",touchmove:"mousemove",touchend:o}[e],i.button=0,i.relatedTarget=null,n=e===o?i.changedTouches:i.touches,i=N.mix(i,{screenX:n.item(0).screenX,screenY:n.item(0).screenY,clientX:n.item(0).clientX,clientY:n.item(0).clientY},!0),N.Event.simulate(t,e,i),e==o&&N.Event.simulate(t,"click",i)):N.error("_simulateEvent(): Event '"+e+"' has multi touch objects that can't be simulated in your platform.")},_isSingleTouch:function(t,e,i){return t&&t.length<=1&&e&&e.length<=1&&i&&i.length<=1}},N.GestureSimulation=e,N.GestureSimulation.defaults=I,N.GestureSimulation.GESTURES=s,N.Event.simulateGesture=function(t,e,i,n){t=N.one(t);var a=new N.GestureSimulation(t);if(e=e.toLowerCase(),!n&&N.Lang.isFunction(i)&&(n=i,i={}),i=i||{},s[e])switch(e){case"tap":a.tap(n,i.point,i.times,i.hold,i.delay);break;case"doubletap":a.tap(n,i.point,2);break;case"press":N.Lang.isNumber(i.hold)?i.hold<I.MIN_HOLD_PRESS?i.hold=I.MIN_HOLD_PRESS:i.hold>I.MAX_HOLD_PRESS&&(i.hold=I.MAX_HOLD_PRESS):i.hold=I.HOLD_PRESS,a.tap(n,i.point,1,i.hold);break;case"move":a.move(n,i.path,i.duration);break;case"flick":a.flick(n,i.point,i.axis,i.distance,i.duration);break;case"pinch":a.pinch(n,i.center,i.r1,i.r2,i.duration,i.start,i.rotation);break;case"rotate":a.rotate(n,i.center,i.r1,i.r2,i.duration,i.start,i.rotation)}else N.error(M+": Not a supported gesture simulation: "+e)}},"patched-v3.18.7",{requires:["async-queue","event-simulate","node-screen"]});
YUI.add("node-event-simulate",function(u,e){u.Node.prototype.simulate=function(e,t){u.Event.simulate(u.Node.getDOMNode(this),e,t)},u.Node.prototype.simulateGesture=function(e,t,s){u.Event.simulateGesture(this,e,t,s)}},"patched-v3.18.7",{requires:["node-base","event-simulate","gesture-simulate"]});
YUI.add("event-key",function(h,e){var p="+alt",y="+ctrl",i="+meta",o="+shift",l=h.Lang.trim,t={KEY_MAP:{enter:13,space:32,esc:27,backspace:8,tab:9,pageup:33,pagedown:34},_typeRE:/^(up|down|press):/,_keysRE:/^(?:up|down|press):|\+(alt|ctrl|meta|shift)/g,processArgs:function(e){var t,s,a,e=e.splice(3,1)[0],r=h.Array.hash(e.match(/\+(?:alt|ctrl|meta|shift)\b/g)||[]),n={type:this._typeRE.test(e)?RegExp.$1:null,mods:r,keys:null},c=e.replace(this._keysRE,"");if(c)for(c=c.split(","),n.keys={},a=c.length-1;0<=a;--a)(t=l(c[a]))&&(+t==t?n.keys[t]=r:(s=t.toLowerCase(),this.KEY_MAP[s]?(n.keys[this.KEY_MAP[s]]=r,n.type||(n.type="down")):(s=(t=t.charAt(0)).toUpperCase(),r["+shift"]&&(t=s),n.keys[t.charCodeAt(0)]=t===s?h.merge(r,{"+shift":!0}):r)));return n.type||(n.type="press"),n},on:function(e,t,s,a){var r=t._extra,n="key"+r.type,c=r.keys;t._detach=e[a?"delegate":"on"](n,function(e){var t=c?c[e.which]:r.mods;t&&(!t[p]||t[p]&&e.altKey)&&(!t[y]||t[y]&&e.ctrlKey)&&(!t[i]||t[i]&&e.metaKey)&&(!t[o]||t[o]&&e.shiftKey)&&s.fire(e)},a)},detach:function(e,t,s){t._detach.detach()}};t.delegate=t.on,t.detachDelegate=t.detach,h.Event.define("key",t,!0)},"patched-v3.18.7",{requires:["event-synthetic"]});
YUI.add("node-focusmanager",function(h,e){var d="activeDescendant",r="id",u="disabled",l="tabIndex",c="focused",a="focusClass",n="circular",o="host",t={37:!0,38:!0,39:!0,40:!0},i={a:!0,button:!0,input:!0,object:!0},_=h.Lang,f=h.UA,s=function(){s.superclass.constructor.apply(this,arguments)};s.ATTRS={focused:{value:!1,readOnly:!0},descendants:{getter:function(e){return this.get(o).all(e)}},activeDescendant:{setter:function(e){var t,s=_.isNumber,n=h.Attribute.INVALID_VALUE,i=this._descendantsMap,a=this._descendants,e=s(e)?t=e:e instanceof h.Node&&i&&s(t=i[e.get(r)])?t:n;return e=a&&(i=a.item(t))&&i.get("disabled")?n:e}},keys:{value:{next:null,previous:null}},focusClass:{},circular:{value:!0}},h.extend(s,h.Plugin.Base,{_stopped:!0,_descendants:null,_descendantsMap:null,_focusedNode:null,_lastNodeIndex:0,_eventHandlers:null,_initDescendants:function(){var e,t,s,n=this.get("descendants"),i={},a=-1,c=this.get(d),o=0;if(_.isUndefined(c)&&(c=-1),n){for(e=n.size(),o=0;o<e;o++)t=n.item(o),-1!==a||t.get(u)||(a=o),c<0&&0===parseInt(t.getAttribute(l,2),10)&&(c=o),t&&t.set(l,-1),(s=t.get(r))||(s=h.guid(),t.set(r,s)),i[s]=o;(t=n.item(c=c<0?0:c))&&!t.get(u)||(t=n.item(a),c=a),this._lastNodeIndex=e-1,this._descendants=n,this._descendantsMap=i,this.set(d,c),t&&t.set(l,0)}},_isDescendant:function(e){return e.get(r)in this._descendantsMap},_removeFocusClass:function(){var e,t=this._focusedNode,s=this.get(a);s&&(e=_.isString(s)?s:s.className),t&&e&&t.removeClass(e)},_detachKeyHandler:function(){var e=this._prevKeyHandler,t=this._nextKeyHandler;e&&e.detach(),t&&t.detach()},_preventScroll:function(e){t[e.keyCode]&&this._isDescendant(e.target)&&e.preventDefault()},_fireClick:function(e){var t=e.target,s=t.get("nodeName").toLowerCase();13!==e.keyCode||i[s]&&("a"!==s||t.getAttribute("href"))||t.simulate("click")},_attachKeyHandler:function(){this._detachKeyHandler();var e=this.get("keys.next"),t=this.get("keys.previous"),s=this.get(o),n=this._eventHandlers;t&&(this._prevKeyHandler=h.on("key",h.bind(this._focusPrevious,this),s,t)),e&&(this._nextKeyHandler=h.on("key",h.bind(this._focusNext,this),s,e)),f.opera&&n.push(s.on("keypress",this._preventScroll,this)),f.opera||n.push(s.on("keypress",this._fireClick,this))},_detachEventHandlers:function(){this._detachKeyHandler();var e=this._eventHandlers;e&&(h.Array.each(e,function(e){e.detach()}),this._eventHandlers=null)},_attachEventHandlers:function(){var e,t,s=this._descendants;s&&s.size()&&(s=this._eventHandlers||[],e=this.get(o).get("ownerDocument"),0===s.length&&(s.push(e.on("focus",this._onDocFocus,this)),s.push(e.on("mousedown",this._onDocMouseDown,this)),s.push(this.after("keysChange",this._attachKeyHandler)),s.push(this.after("descendantsChange",this._initDescendants)),s.push(this.after("activeDescendantChange",this._afterActiveDescendantChange)),t=this.after("focusedChange",h.bind(function(e){e.newVal&&(this._attachKeyHandler(),t.detach())},this)),s.push(t)),this._eventHandlers=s)},_onDocMouseDown:function(e){var t,s=this.get(o),n=e.target,i=s.contains(n),a=function(e){var t=!1;return t=e.compareTo(s)?t:this._isDescendant(e)?e:a.call(this,e.get("parentNode"))};i&&((t=a.call(this,n))?n=t:!t&&this.get(c)&&(this._set(c,!1),this._onDocFocus(e))),i&&this._isDescendant(n)?this.focus(n):!f.webkit||!this.get(c)||i&&this._isDescendant(n)||(this._set(c,!1),this._onDocFocus(e))},_onDocFocus:function(e){var t,e=this._focusTarget||e.target,s=this.get(c),n=this.get(a),i=this._focusedNode;this._focusTarget&&(this._focusTarget=null),this.get(o).contains(e)?(t=this._isDescendant(e),!s&&t?s=!0:s&&!t&&(s=!1)):s=!1,n&&(!i||i.compareTo(e)&&s||this._removeFocusClass(),t)&&s&&(n.fn?(e=n.fn(e)).addClass(n.className):e.addClass(n),this._focusedNode=e),this._set(c,s)},_focusNext:function(e,t){var s,t=t||this.get(d);this._isDescendant(e.target)&&t<=this._lastNodeIndex&&((t+=1)===this._lastNodeIndex+1&&this.get(n)&&(t=0),s=this._descendants.item(t))&&(s.get("disabled")?this._focusNext(e,t):this.focus(t)),this._preventScroll(e)},_focusPrevious:function(e,t){var s,t=t||this.get(d);this._isDescendant(e.target)&&0<=t&&(-1===(t-=1)&&this.get(n)&&(t=this._lastNodeIndex),s=this._descendants.item(t))&&(s.get("disabled")?this._focusPrevious(e,t):this.focus(t)),this._preventScroll(e)},_afterActiveDescendantChange:function(e){var t=this._descendants.item(e.prevVal);t&&t.set(l,-1),(t=this._descendants.item(e.newVal))&&t.set(l,0)},initializer:function(e){this.start()},destructor:function(){this.stop(),this.get(o).focusManager=null},focus:function(e){_.isUndefined(e)&&(e=this.get(d)),this.set(d,e,{src:"UI"});e=this._descendants.item(this.get(d));e&&(e.focus(),f.opera)&&"button"===e.get("nodeName").toLowerCase()&&(this._focusTarget=e)},blur:function(){var e;this.get(c)&&((e=this._descendants.item(this.get(d)))&&(e.blur(),this._removeFocusClass()),this._set(c,!1,{src:"UI"}))},start:function(){this._stopped&&(this._initDescendants(),this._attachEventHandlers(),this._stopped=!1)},stop:function(){this._stopped||(this._detachEventHandlers(),this._descendants=null,this._focusedNode=null,this._lastNodeIndex=0,this._stopped=!0)},refresh:function(){this._initDescendants(),this._eventHandlers||this._attachEventHandlers()}}),s.NAME="nodeFocusManager",s.NS="focusManager",h.namespace("Plugin"),h.Plugin.NodeFocusManager=s},"patched-v3.18.7",{requires:["attribute","node","plugin","node-event-simulate","event-key","event-focus"]});
AUI.add("liferay-navigation-interaction",(e=>{const i="activeDescendant",n="left",t="liferaynavigationinteraction",a=e.Component.create({EXTENDS:e.Plugin.Base,NAME:t,NS:t,prototype:{_handleExit(){const e=this,n=e._focusManager;n.get(i)&&(n.set(i,0),n.blur()),e._hideMenu(),e._isTriggerVisible()&&Liferay.fire("exitNavigation",{navigation:e.get("host")})},_handleKey(e,i){const t=this;if(t._isTriggerVisible())Liferay.fire("exitNavigation",{direction:i,navigation:t.get("host")});else{let a;const o=e.target.ancestors(t._directChildLi).item(0);let s=!0;if(i===n?(a=o.previous(),s=!1):a=o.next(),!a){const e=o.siblings();a=s?e.first():e.last()}t._focusManager.focus(a.one("a"))}},_handleKeyDown(e){const i=this;let n;e.isKey("LEFT")?n="_handleLeft":e.isKey("RIGHT")?n="_handleRight":(e.isKey("TAB")||e.isKey("ESC"))&&(n="_handleExit"),n&&i[n](e)},_handleLeft(e){this._handleKey(e,n)},_handleRight(e){this._handleKey(e,"right")},_handleShowNavigationMenu(e,i,n){const t=this;if(!(t._lastShownMenu&&n.type.indexOf("focusedChange")>-1)){const n=t.MAP_HOVER,a=i&&i!==e;a&&Liferay.fire("hideNavigationMenu",n),i&&!a||(n.menu=e,Liferay.fire("showNavigationMenu",n))}if(t._isTriggerVisible()&&i){let n;const a=t._focusManager.get("descendants"),o=a.first(),s=a.last(),r=i.one("a"),g=e.one("a");r===s&&g===o?n="down":r===o&&g===s&&(n="up"),n&&Liferay.fire("exitNavigation",{direction:n,navigation:t.get("host")})}},_hideMenu(){const e=this,i=e.MAP_HOVER;i.menu&&(Liferay.fire("hideNavigationMenu",i),e.MAP_HOVER={})},_initChildMenuHandlers(e){const i=this;e&&(e.delegate(["mouseenter","mouseleave"],i._onMouseToggle,"> li",i),e.delegate("keydown",i._handleKeyDown,"a",i))},_initNodeFocusManager(){const i=this,n=i.get("host");n.plug(e.Plugin.NodeFocusManager,{descendants:"a",focusClass:"active",keys:{next:"down:40",previous:"down:38"}});const t=n.focusManager;t.after(["activeDescendantChange","focusedChange"],i._showMenu,i),Liferay.once("startNavigate",t.destroy,t),i._focusManager=t},_isTriggerVisible(){return!(!this._triggerNode||!this._triggerNode.test(":visible"))},_onMouseToggle(e){const i=this.MAP_HOVER;let n="hideNavigationMenu";"mouseenter"===e.type&&(n="showNavigationMenu"),i.menu=e.currentTarget,Liferay.fire(n,i)},_showMenu(e){const n=this;e.halt();const t=n.MAP_HOVER,a=t.menu,o=e.newVal;if(o||0===o){const t=n._focusManager,o=t.get(i),s=t.get("descendants").item(o).ancestor(n._directChildLi);n._handleShowNavigationMenu(s,a,e)}else a&&(Liferay.fire("hideNavigationMenu",t),n.MAP_HOVER={})},MAP_HOVER:{},initializer(){const i=this,n=i.get("host"),t=Liferay.Data.NAV_INTERACTION_LIST_SELECTOR||"ul",a=n.one(t),o="#"+a.guid();i._directChildLi=Liferay.Data.NAV_INTERACTION_ITEM_SELECTOR||o+"> li",i._hostULId=o,i._triggerNode=e.one(".nav-navigation-btn"),Liferay.on(["hideNavigationMenu","showNavigationMenu"],(e=>{const n=e.menu;if(n){i._lastShownMenu=null;const t="showNavigationMenu"===e.type&&n.hasClass("dropdown");t&&(i._lastShownMenu=n),n.toggleClass("hover",t),n.toggleClass("open",t)}})),i._initChildMenuHandlers(a),i._initNodeFocusManager()}}});Liferay.NavigationInteraction=a}),"",{requires:["aui-base","aui-component","event-mouseenter","node-focusmanager","plugin"]});

