(function(){"use strict";function t(t,e){var s=typeof e.is;if(s=="function"){return e.is.call(t)}if(s=="string"||s=="number"){return t[is]}return s}function e(t){var e=t.constructor;return e&&e.states||{}}u8.Base.StatesMixIn=new function(){};$.extend(u8.Base.StatesMixIn,{"States.get":function(){return null},"States.create":function(){for(var t in e(this)){this["States.update"](t)}},"States.update":function(s,i){var n=e(this);var a=n[s];if(!a){return this}if(typeof i=="undefined"){i=t(this,a)}var r=this._states||{};if(s in r){var u=r[s];if(u==i){return this}}r[s]=i;this._states=r;a.update.call(this,i);if(this._isCreated){if(this.isRaising("StateChange")){this.raise("StateChange",{name:s,value:i})}}var f=a.dependents;if(f){for(var h=0;h<f.length;h++){this["States.update"](f[h])}}return this},"States.is":function(t,e){if(arguments.length==2){return!!(this._states&&this._states[t]==e)}return!!(this._states&&this._states[t])}})})();