// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/layers/vectorTiles/core/workers/request",["require","exports","../global","dojo/_base/lang"],function(n,c,l,m){Object.defineProperty(c,"__esModule",{value:!0});var f;c.execute=function(c,d){void 0===d&&(d={});var a=d.responseType;a?"json"!==a&&"text"!==a&&"blob"!==a&&"array-buffer"!==a&&(a="text"):a="json";return l.invokeStaticMessage("request",{url:c,options:d}).then(function(k){var b=k.data,g,h,e;if(b&&("json"===a||"text"===a||"blob"===a)&&(g=new Blob([b]),"json"===a||"text"===a)&&
(f||(f=new FileReaderSync),h=f.readAsText(g),"json"===a&&(e=JSON.parse(h||null),e.error)))throw m.mixin(Error(),e.error);switch(a){case "json":b=e;break;case "text":b=h;break;case "blob":b=g}return{data:b,requestOptions:d,ssl:k.ssl,url:c}})}});