//>>built
define("dojox/mvc/WidgetList","require,dojo/_base/array,dojo/_base/lang,dojo/_base/declare,dijit/_Container,dijit/_WidgetBase,dojox/mvc/Templated".split(","),function(n,h,c,o,b,j,p){function k(a){return eval("({"+a+"})")}function e(a){for(var c=null;c=(a._handles||[]).pop();)c.unwatch()}var i="data-mvc-child-props",l="data-mvc-child-bindings",b=o("dojox.mvc.WidgetList",[j,b],{childClz:null,childType:"",childMixins:"",childParams:null,childBindings:null,children:null,templateString:"",partialRebuild:!1,
_relTargetProp:"children",postMixInProperties:function(){this.inherited(arguments);if(this["data-mvc-child-type"])this.childType=this["data-mvc-child-type"];if(this["data-mvc-child-mixins"])this.childMixins=this["data-mvc-child-mixins"]},startup:function(){this.inherited(arguments);this._setChildrenAttr(this.children)},_setChildrenAttr:function(a){var b=this.children;this._set("children",a);if(this._started&&(!this._builtOnce||b!=a))if(e(this),this._builtOnce=!0,this._buildChildren(a),c.isArray(a)){var f=
this;!this.partialRebuild&&c.isFunction(a.watchElements)&&(this._handles=this._handles||[]).push(a.watchElements(function(){f._buildChildren(a)}));a.watch!=={}.watch&&(this._handles=this._handles||[]).push(a.watch(function(a,c,b){isNaN(a)||(a=f.getChildren()[a-0])&&a.set(a._relTargetProp||"target",b)}))}},_buildChildren:function(a){for(var b=this.getChildren(),f=null;f=b.pop();)this.removeChild(f),f.destroy();if(c.isArray(a)){var m=c.hitch(this,function(b){function f(a,b){h.forEach(h.map(a,function(a,
f){var g={ownerDocument:d.ownerDocument,parent:d,indexAtStartup:b+f};g[(d.childParams||d[i]&&k.call(g,d[i])||{})._relTargetProp||e.prototype._relTargetProp||"target"]=a;var q=d.childParams||d[i]&&k.call(g,d[i]),h=d.childBindings||d[l]&&k.call(g,d[l]);if(d.templateString&&!g.templateString&&!e.prototype.templateString)g.templateString=d.templateString;if(h&&!g.bindings&&!e.prototype.bindings)g.bindings=h;return new e(c.mixin(g,q))}),function(a,c){d.addChild(a,b+c)})}if(!(this._buildChildrenSeq>b)){var e=
o([].slice.call(arguments,1),{}),d=this;f(a,0);if(this.partialRebuild)c.isFunction(a.watchElements)&&(this._handles=this._handles||[]).push(a.watchElements(function(a,b,c){for(var e=0,b=(b||[]).length;e<b;++e)d.removeChild(a);f(c,a)}))}},this._buildChildrenSeq=(this._buildChildrenSeq||0)+1);if(this.childClz)m(this.childClz);else if(this.childType){var e=[this.childType].concat(this.childMixins&&this.childMixins.split(",")||[]),b=h.filter(h.map(e,function(a){return c.getObject(a)?void 0:a}),function(a){return void 0!==
a}),j=this;n(b,function(){j._beingDestroyed||m.apply(this,h.map(e,function(a){return c.getObject(a)||n(a)}))})}else m(p)}},destroy:function(){e(this);this.inherited(arguments)}});b.prototype["data-mvc-child-type"]=b.prototype["data-mvc-child-mixins"]=b.prototype[i]=b.prototype[l]="";return b});