YUI.add("button",function(e,t){var n=e.ButtonCore,c=n.CLASS_NAMES,s=n.ARIA_STATES,o=n.ARIA_ROLES;function r(){r.superclass.constructor.apply(this,arguments)}function l(){r.superclass.constructor.apply(this,arguments)}e.extend(r,e.Widget,{BOUNDING_TEMPLATE:n.prototype.TEMPLATE,CONTENT_TEMPLATE:null},{NAME:n.NAME,ATTRS:n.ATTRS,HTML_PARSER:{labelHTML:n._getHTMLFromNode,disabled:n._getDisabledFromNode},CLASS_NAMES:c}),e.mix(r.prototype,n.prototype),e.extend(l,r,{trigger:"click",selectedAttrName:"",initializer:function(e){var t=this,n="checkbox"===t.get("type")?"checked":"pressed",e=e[n]||!1;t.addAttr(n,{value:e}),t.selectedAttrName=n},destructor:function(){delete this.selectedAttrName},bindUI:function(){var e=this,t=e.get("contentBox");l.superclass.bindUI.call(e),t.on(e.trigger,e.toggle,e),e.after(e.selectedAttrName+"Change",e._afterSelectedChange)},syncUI:function(){var e=this,t=e.get("contentBox"),n=e.get("type"),c=l.ARIA_ROLES,n="checkbox"===n?c.CHECKBOX:c.TOGGLE,c=e.selectedAttrName;l.superclass.syncUI.call(e),t.set("role",n),e._uiSetSelected(e.get(c))},_afterSelectedChange:function(e){this._uiSetSelected(e.newVal)},_uiSetSelected:function(e){var t=this.get("contentBox"),n=l.ARIA_STATES,n="checkbox"===this.get("type")?n.CHECKED:n.PRESSED;t.toggleClass(r.CLASS_NAMES.SELECTED,e),t.set(n,e)},toggle:function(){var e=this;e._set(e.selectedAttrName,!e.get(e.selectedAttrName))}},{NAME:"toggleButton",ATTRS:{type:{value:"toggle",writeOnce:"initOnly"}},HTML_PARSER:{checked:function(e){return e.hasClass(c.SELECTED)},pressed:function(e){return e.hasClass(c.SELECTED)}},ARIA_STATES:s,ARIA_ROLES:o,CLASS_NAMES:c}),e.Button=r,e.ToggleButton=l},"patched-v3.18.4",{requires:["button-core","cssbutton","widget"]});