//>>built
define("dijit/_CssStateMixin","dojo/_base/array,dojo/_base/declare,dojo/dom,dojo/dom-class,dojo/has,dojo/_base/lang,dojo/on,dojo/ready,dojo/_base/window,./registry".split(","),function(g,i,k,h,l,m,n,o,p,j){i=i("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);g.forEach("disabled,readOnly,checked,selected,focused,state,hovering,active,_opened".split(","),function(a){this.watch(a,m.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes)this._trackMouseState(this[a],
this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":this._set("hovering",!0);this._set("active",this._mouseDown);break;case "mouseout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":this._set("active",!0);break;case "mouseup":case "touchend":this._set("active",!1)}},_setStateClass:function(){function a(a){b=b.concat(g.map(b,function(f){return f+
a}),"dijit"+a)}var b=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");var d="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(d);this.state&&a(this.state);this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var d=this.stateNode||this.domNode,e={};g.forEach(d.className.split(" "),function(a){e[a]=!0});"_stateClasses"in this&&g.forEach(this._stateClasses,
function(a){delete e[a]});g.forEach(b,function(a){e[a]=!0});var f=[],c;for(c in e)f.push(c);d.className=f.join(" ");this._stateClasses=b},_subnodeCssMouseEvent:function(a,b,d){function e(f){h.toggle(a,b+"Active",f)}if(!this.disabled&&!this.readOnly)switch(d.type){case "mouseover":h.toggle(a,b+"Hover",!0);break;case "mouseout":h.toggle(a,b+"Hover",!1);e(!1);break;case "mousedown":case "touchstart":e(!0);break;case "mouseup":case "touchend":e(!1);break;case "focus":case "focusin":h.toggle(a,b+"Focused",
!0);break;case "blur":case "focusout":h.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});o(function(){function a(a){if(!k.isDescendant(a.relatedTarget,a.target))for(var c=a.target;c&&c!=a.relatedTarget;c=c.parentNode)if(c._cssState){var b=j.getEnclosingWidget(c);b&&(c==b.domNode?b._cssMouseEvent(a):b._subnodeCssMouseEvent(c,c._cssState,a))}}function b(b){b.target=b.srcElement;a(b)}var d=p.body(),e=(l("touch")?[]:["mouseover","mouseout"]).concat(["mousedown","touchstart",
"mouseup","touchend"]);g.forEach(e,function(f){d.addEventListener?d.addEventListener(f,a,!0):d.attachEvent("on"+f,b)});n(d,"focusin, focusout",function(a){var b=a.target;b._cssState&&!b.getAttribute("widgetId")&&j.getEnclosingWidget(b)._subnodeCssMouseEvent(b,b._cssState,a)})});return i});