//>>built
define("dojox/form/manager/_Mixin","dojo/_base/window dojo/_base/lang dojo/_base/array dojo/on dojo/dom-attr dojo/dom-class dijit/_base/manager dijit/_Widget dijit/form/_FormWidget dijit/form/Button dijit/form/CheckBox dojo/_base/declare".split(" "),function(n,h,g,q,r,x,l,y,t,z,A,p){n=h.getObject("dojox.form.manager",!0);var B=n.actionAdapter=function(a){return function(b,e,c){h.isArray(e)?g.forEach(e,function(d){a.call(this,b,d,c)},this):a.apply(this,arguments)}};n.inspectorAdapter=function(a){return function(b,
e,c){return a.call(this,b,h.isArray(e)?e[0]:e,c)}};var C={domNode:1,containerNode:1,srcNodeRef:1,bgIframe:1},D=n._keys=function(a){var b=[],e;for(e in a)a.hasOwnProperty(e)&&b.push(e);return b},u=function(a){var b=a.get("name");if(b&&a.isInstanceOf(t))if(b in this.formWidgets){var e=this.formWidgets[b].widget;h.isArray(e)?e.push(a):this.formWidgets[b].widget=[e,a]}else this.formWidgets[b]={widget:a,connections:[]};else b=null;return b},v=function(a){var b={};B(function(e,c){var d=c.get("data-dojo-observer")||
c.get("observer");d&&"string"==typeof d&&g.forEach(d.split(","),function(f){(f=h.trim(f))&&h.isFunction(this[f])&&(b[f]=1)},this)}).call(this,null,this.formWidgets[a].widget);return D(b)},w=function(a,b){var e=this.formWidgets[a],c=e.widget,d=e.connections;d.length&&(g.forEach(d,function(k){k.remove()}),d=e.connections=[]);if(h.isArray(c))g.forEach(c,function(k){g.forEach(b,function(m){d.push(q(k,"change",h.hitch(this,function(E){if(this.watching&&r.get(k.focusNode,"checked"))this[m](k.get("value"),
a,k,E)})))},this)},this);else{var f=c.isInstanceOf(z)?"click":"change";g.forEach(b,function(k){d.push(q(c,f,h.hitch(this,function(m){if(this.watching)this[k](c.get("value"),a,c,m)})))},this)}};p=p("dojox.form.manager._Mixin",null,{watching:!0,startup:function(){this._started||(this.formWidgets={},this.formNodes={},this.registerWidgetDescendants(this),this.inherited(arguments))},destroy:function(){for(var a in this.formWidgets)g.forEach(this.formWidgets[a].connections,function(b){b.remove()});this.formWidgets=
{};this.inherited(arguments)},registerWidget:function(a){"string"==typeof a?a=l.byId(a):a.tagName&&a.cloneNode&&(a=l.byNode(a));(a=u.call(this,a))&&w.call(this,a,v.call(this,a));return this},unregisterWidget:function(a){a in this.formWidgets&&(g.forEach(this.formWidgets[a].connections,function(b){b.remove()}),delete this.formWidgets[a]);return this},registerWidgetDescendants:function(a){"string"==typeof a?a=l.byId(a):a.tagName&&a.cloneNode&&(a=l.byNode(a));var b=g.map(a.getDescendants(),u,this);g.forEach(b,
function(e){e&&w.call(this,e,v.call(this,e))},this);return this.registerNodeDescendants?this.registerNodeDescendants(a.domNode):this},unregisterWidgetDescendants:function(a){"string"==typeof a?a=l.byId(a):a.tagName&&a.cloneNode&&(a=l.byNode(a));g.forEach(g.map(a.getDescendants(),function(b){return b instanceof t&&b.get("name")||null}),function(b){b&&this.unregisterWidget(b)},this);return this.unregisterNodeDescendants?this.unregisterNodeDescendants(a.domNode):this},formWidgetValue:function(a,b){var e=
2==arguments.length&&void 0!==b,c;"string"==typeof a&&(a=this.formWidgets[a])&&(a=a.widget);if(!a)return null;if(h.isArray(a)){if(e)return g.forEach(a,function(d){d.set("checked",!1,!this.watching)},this),g.forEach(a,function(d){d.set("checked",d.value===b,!this.watching)},this),this;g.some(a,function(d){return r.get(d.focusNode,"checked")?(c=d,!0):!1});return c?c.get("value"):""}return a.isInstanceOf&&a.isInstanceOf(A)?e?(a.set("value",!!b,!this.watching),this):!!a.get("value"):e?(a.set("value",
b,!this.watching),this):a.get("value")},formPointValue:function(a,b){a&&"string"==typeof a&&(a=this[a]);return a&&a.tagName&&a.cloneNode&&x.contains(a,"dojoFormValue")?2==arguments.length&&void 0!==b?(a.innerHTML=b,this):a.innerHTML:null},inspectFormWidgets:function(a,b,e){var c,d={};if(b)if(h.isArray(b))g.forEach(b,function(f){f in this.formWidgets&&(d[f]=a.call(this,f,this.formWidgets[f].widget,e))},this);else for(c in b)c in this.formWidgets&&(d[c]=a.call(this,c,this.formWidgets[c].widget,b[c]));
else for(c in this.formWidgets)d[c]=a.call(this,c,this.formWidgets[c].widget,e);return d},inspectAttachedPoints:function(a,b,e){var c,d,f={};if(b)if(h.isArray(b))g.forEach(b,function(k){(d=this[k])&&d.tagName&&d.cloneNode&&(f[k]=a.call(this,k,d,e))},this);else for(c in b)(d=this[c])&&d.tagName&&d.cloneNode&&(f[c]=a.call(this,c,d,b[c]));else for(c in this)c in C||(d=this[c])&&d.tagName&&d.cloneNode&&(f[c]=a.call(this,c,d,e));return f},inspect:function(a,b,e){var c=this.inspectFormWidgets(function(d,
f,k){return h.isArray(f)?a.call(this,d,g.map(f,function(m){return m.domNode}),k):a.call(this,d,f.domNode,k)},b,e);this.inspectFormNodes&&h.mixin(c,this.inspectFormNodes(a,b,e));return h.mixin(c,this.inspectAttachedPoints(a,b,e))}});h.extend(y,{observer:""});return p});