define("dojo/request/xhr",["../errors/RequestError","./watch","./handlers","./util","../has"],function(_1,_2,_3,_4,_5){_5.add("native-xhr",function(){returntypeofXMLHttpRequest!=="undefined";});_5.add("dojo-force-activex-xhr",function(){return_5("activex")&&window.location.protocol==="file:";});_5.add("native-xhr2",function(){if(!_5("native-xhr")||_5("dojo-force-activex-xhr")){return;}varx=newXMLHttpRequest();returntypeofx["addEventListener"]!=="undefined"&&(typeofopera==="undefined"||typeofx["upload"]!=="undefined");});_5.add("native-formdata",function(){returntypeofFormData!=="undefined";});_5.add("native-response-type",function(){return_5("native-xhr")&&typeofnewXMLHttpRequest().responseType!=="undefined";});_5.add("native-xhr2-blob",function(){if(!_5("native-response-type")){return;}varx=newXMLHttpRequest();x.open("GET","https://dojotoolkit.org/",true);x.responseType="blob";var_6=x.responseType;x.abort();return_6==="blob";});var_7={"blob":_5("native-xhr2-blob")?"blob":"arraybuffer","document":"document","arraybuffer":"arraybuffer"};function_8(_9,_a){var_b=_9.xhr;_9.status=_9.xhr.status;try{_9.text=_b.responseText;}catch(e){}if(_9.options.handleAs==="xml"){_9.data=_b.responseXML;}var_c;if(_a){this.reject(_a);}else{try{_3(_9);}catch(e){_c=e;}if(_4.checkStatus(_b.status)){if(!_c){this.resolve(_9);}else{this.reject(_c);}}else{if(!_c){_a=new_1("Unable to load "+_9.url+" status: "+_b.status,_9);this.reject(_a);}else{_a=new_1("Unable to load "+_9.url+" status: "+_b.status+" and an error in handleAs: transformation of response",_9);this.reject(_a);}}}};var_d,_e,_f,_10;if(_5("native-xhr2")){_d=function(_11){return!this.isFulfilled();};_10=function(dfd,_12){_12.xhr.abort();};_f=function(_13,dfd,_14,_15){function_16(evt){dfd.handleResponse(_14);};function_17(evt){var_18=evt.target;var_19=new_1("Unable to load "+_14.url+" status: "+_18.status,_14);dfd.handleResponse(_14,_19);};function_1a(_1b,evt){_14.transferType=_1b;if(evt.lengthComputable){_14.loaded=evt.loaded;_14.total=evt.total;dfd.progress(_14);}else{if(_14.xhr.readyState===3){_14.loaded=("loaded"inevt)?evt.loaded:evt.position;dfd.progress(_14);}}};function_1c(evt){return_1a("download",evt);};function_1d(evt){return_1a("upload",evt);};_13.addEventListener("load",_16,false);_13.addEventListener("error",_17,false);_13.addEventListener("progress",_1c,false);if(_15&&_13.upload){_13.upload.addEventListener("progress",_1d,false);}returnfunction(){_13.removeEventListener("load",_16,false);_13.removeEventListener("error",_17,false);_13.removeEventListener("progress",_1c,false);_13.upload.removeEventListener("progress",_1d,false);_13=null;};};}else{_d=function(_1e){return_1e.xhr.readyState;};_e=function(_1f){return4===_1f.xhr.readyState;};_10=function(dfd,_20){varxhr=_20.xhr;var_21=typeofxhr.abort;if(_21==="function"||_21==="object"||_21==="unknown"){xhr.abort();}};}function_22(_23){returnthis.xhr.getResponseHeader(_23);};var_24,_25={data:null,query:null,sync:false,method:"GET"};functionxhr(url,_26,_27){var_28=_5("native-formdata")&&_26&&_26.data&&_26.datainstanceofFormData;var_29=_4.parseArgs(url,_4.deepCreate(_25,_26),_28);url=_29.url;_26=_29.options;var_2a=!_26.data&&_26.method!=="POST"&&_26.method!=="PUT";if(_5("ie")<=10){url=url.split("#")[0];}var_2b,_2c=function(){_2b&&_2b();};vardfd=_4.deferred(_29,_10,_d,_e,_8,_2c);var_2d=_29.xhr=xhr._create();if(!_2d){dfd.cancel(new_1("XHR was not created"));return_27?dfd:dfd.promise;}_29.getHeader=_22;if(_f){_2b=_f(_2d,dfd,_29,_26.uploadProgress);}var_2e=typeof(_26.data)==="undefined"?null:_26.data,_2f=!_26.sync,_30=_26.method;try{_2d.open(_30,url,_2f,_26.user||_24,_26.password||_24);if(_26.withCredentials){_2d.withCredentials=_26.withCredentials;}if(_5("native-response-type")&&_26.handleAsin_7){_2d.responseType=_7[_26.handleAs];}var_31=_26.headers,_32=(_28||_2a)?false:"application/x-www-form-urlencoded";if(_31){for(varhdrin_31){if(hdr.toLowerCase()==="content-type"){_32=_31[hdr];}else{if(_31[hdr]){_2d.setRequestHeader(hdr,_31[hdr]);}}}}if(_32&&_32!==false){_2d.setRequest