define("dijit/registry",["dojo/_base/array","dojo/_base/window","./main"],function(_1,_2,_3){var_4={},_5={};var_6={length:0,add:function(_7){if(_5[_7.id]){thrownewError("Tried to register widget with id=="+_7.id+" but that id is already registered");}_5[_7.id]=_7;this.length++;},remove:function(id){if(_5[id]){delete_5[id];this.length--;}},byId:function(id){returntypeofid=="string"?_5[id]:id;},byNode:function(_8){return_5[_8.getAttribute("widgetId")];},toArray:function(){varar=[];for(varidin_5){ar.push(_5[id]);}returnar;},getUniqueId:function(_9){varid;do{id=_9+"_"+(_9in_4?++_4[_9]:_4[_9]=0);}while(_5[id]);return_3._scopeName=="dijit"?id:_3._scopeName+"_"+id;},findWidgets:function(_a,_b){var_c=[];function_d(_e){for(var_f=_e.firstChild;_f;_f=_f.nextSibling){if(_f.nodeType==1){var_10=_f.getAttribute("widgetId");if(_10){var_11=_5[_10];if(_11){_c.push(_11);}}else{if(_f!==_b){_d(_f);}}}}};_d(_a);return_c;},_destroyAll:function(){_3._curFocus=null;_3._prevFocus=null;_3._activeStack=[];_1.forEach(_6.findWidgets(_2.body()),function(_12){if(!_12._destroyed){if(_12.destroyRecursive){_12.destroyRecursive();}else{if(_12.destroy){_12.destroy();}}}});},getEnclosingWidget:function(_13){while(_13){varid=_13.nodeType==1&&_13.getAttribute("widgetId");if(id){return_5[id];}_13=_13.parentNode;}returnnull;},_hash:_5};_3.registry=_6;return_6;});