//>>built define("dijit/tree/TreeStoreModel",["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(_1,_2,_3,_4){return _3("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(_5){_4.mixin(this,_5);this.connects=[];var _6=this.store;if(!_6.getFeatures()["dojo.data.api.Identity"]){throw new Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");}if(_6.getFeatures()["dojo.data.api.Notification"]){this.connects=this.connects.concat([_2.after(_6,"onNew",_4.hitch(this,"onNewItem"),true),_2.after(_6,"onDelete",_4.hitch(this,"onDeleteItem"),true),_2.after(_6,"onSet",_4.hitch(this,"onSetItem"),true)]);}},destroy:function(){var h;while(h=this.connects.pop()){h.remove();}},getRoot:function(_7,_8){if(this.root){_7(this.root);}else{this.store.fetch({query:this.query,onComplete:_4.hitch(this,function(_9){if(_9.length!=1){throw new Error("dijit.tree.TreeStoreModel: root query returned "+_9.length+" items, but must return exactly one");}this.root=_9[0];_7(this.root);}),onError:_8});}},mayHaveChildren:function(_a){return _1.some(this.childrenAttrs,function(_b){return this.store.hasAttribute(_a,_b);},this);},getChildren:function(_c,_d,_e){var _f=this.store;if(!_f.isItemLoaded(_c)){var _10=_4.hitch(this,arguments.callee);_f.loadItem({item:_c,onItem:function(_11){_10(_11,_d,_e);},onError:_e});return;}var _12=[];for(var i=0;i