//>>built
define("dijit/form/_FormMixin","dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/on dojo/window".split(" "),function(e,l,k,f,m,n){return l("dijit.form._FormMixin",null,{state:"",_getDescendantFormWidgets:function(b){var a=[];e.forEach(b||this.getChildren(),function(c){"value"in c?a.push(c):a=a.concat(this._getDescendantFormWidgets(c.getChildren()))},this);return a},reset:function(){e.forEach(this._getDescendantFormWidgets(),function(b){b.reset&&b.reset()})},validate:function(){var b=
!1;return e.every(e.map(this._getDescendantFormWidgets(),function(a){a._hasBeenBlurred=!0;var c=a.disabled||!a.validate||a.validate();c||b||(n.scrollIntoView(a.containerNode||a.domNode),a.focus(),b=!0);return c}),function(a){return a})},setValues:function(b){k.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",b)},_setValueAttr:function(b){var a={};e.forEach(this._getDescendantFormWidgets(),function(g){g.name&&(a[g.name]||
(a[g.name]=[])).push(g)});for(var c in a)if(a.hasOwnProperty(c)){var d=a[c],h=f.getObject(c,!1,b);void 0!==h&&(h=[].concat(h),"boolean"==typeof d[0].checked?e.forEach(d,function(g){g.set("value",-1!=e.indexOf(h,g._get("value")))}):d[0].multiple?d[0].set("value",h):e.forEach(d,function(g,p){g.set("value",h[p])}))}},getValues:function(){k.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var b={};e.forEach(this._getDescendantFormWidgets(),
function(a){var c=a.name;if(c&&!a.disabled){var d=a.get("value");"boolean"==typeof a.checked?/Radio/.test(a.declaredClass)?!1!==d?f.setObject(c,d,b):(d=f.getObject(c,!1,b),void 0===d&&f.setObject(c,null,b)):(a=f.getObject(c,!1,b),a||(a=[],f.setObject(c,a,b)),!1!==d&&a.push(d)):(a=f.getObject(c,!1,b),"undefined"!=typeof a?f.isArray(a)?a.push(d):f.setObject(c,[a,d],b):f.setObject(c,d,b))}});return b},isValid:function(){return""==this.state},onValidStateChange:function(){},_getState:function(){var b=
e.map(this._descendants,function(a){return a.get("state")||""});return 0<=e.indexOf(b,"Error")?"Error":0<=e.indexOf(b,"Incomplete")?"Incomplete":""},disconnectChildren:function(){},connectChildren:function(b){this._descendants=this._getDescendantFormWidgets();e.forEach(this._descendants,function(a){a._started||a.startup()});b||this._onChildChange()},_onChildChange:function(b){b&&"state"!=b&&"disabled"!=b||this._set("state",this._getState());b&&"value"!=b&&"disabled"!=b&&"checked"!=b||(this._onChangeDelayTimer&&
this._onChangeDelayTimer.remove(),this._onChangeDelayTimer=this.defer(function(){delete this._onChangeDelayTimer;this._set("value",this.get("value"))},10))},startup:function(){this.inherited(arguments);this._descendants=this._getDescendantFormWidgets();this.value=this.get("value");this.state=this._getState();var b=this;this.own(m(this.containerNode,"attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked",function(a){a.target!=b.domNode&&b._onChildChange(a.type.replace("attrmodified-",
""))}));this.watch("state",function(a,c,d){this.onValidStateChange(""==d)})},destroy:function(){this.inherited(arguments)}})});