-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSimpleSQL.bundle.min.js
1 lines (1 loc) · 30.5 KB
/
SimpleSQL.bundle.min.js
1
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SimpleSQL=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};var __generator=this&&this.__generator||function(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break}if(t[2])_.ops.pop();_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}if(op[0]&5)throw op[1];return{value:op[0]?op[1]:void 0,done:true}}};Object.defineProperty(exports,"__esModule",{value:true});exports.baseUrl="https://simplesql.redbeardlab.com";var axios=require("axios").default;exports.apiUrl=exports.baseUrl+"/v0/api";function generateAuth(token){if(token){return{Authorization:"Bearer "+token}}return{}}function newDatabase(token){return __awaiter(this,void 0,void 0,function(){var auth,response;return __generator(this,function(_a){switch(_a.label){case 0:auth=generateAuth(token);return[4,axios.post(exports.apiUrl+"/database",{},{headers:auth})];case 1:response=_a.sent();return[2,response["data"]["database"]]}})})}exports.newDatabase=newDatabase;function command(database,command,token){return __awaiter(this,void 0,void 0,function(){var auth,response;return __generator(this,function(_a){switch(_a.label){case 0:auth=generateAuth(token);return[4,axios.post(exports.apiUrl+"/command/"+database,{command:command},{headers:auth})];case 1:response=_a.sent();return[2,response["data"]["result"]]}})})}exports.command=command;function listDatabases(token){return __awaiter(this,void 0,void 0,function(){var auth,response;return __generator(this,function(_a){switch(_a.label){case 0:auth=generateAuth(token);return[4,axios.get(exports.apiUrl+"/databases",{headers:auth})];case 1:response=_a.sent();return[2,response["data"]]}})})}exports.listDatabases=listDatabases;function newToken(token){return __awaiter(this,void 0,void 0,function(){var auth,response;return __generator(this,function(_a){switch(_a.label){case 0:auth=generateAuth(token);return[4,axios.post(exports.apiUrl+"/token",{},{headers:auth})];case 1:response=_a.sent();return[2,response["data"]["token"]]}})})}exports.newToken=newToken;function listTokens(token){return __awaiter(this,void 0,void 0,function(){var auth,response;return __generator(this,function(_a){switch(_a.label){case 0:auth=generateAuth(token);return[4,axios.get(exports.apiUrl+"/tokens",{headers:auth})];case 1:response=_a.sent();return[2,response["data"]]}})})}exports.listTokens=listTokens},{axios:2}],2:[function(require,module,exports){module.exports=require("./lib/axios")},{"./lib/axios":4}],3:[function(require,module,exports){"use strict";var utils=require("./../utils");var settle=require("./../core/settle");var buildURL=require("./../helpers/buildURL");var buildFullPath=require("../core/buildFullPath");var parseHeaders=require("./../helpers/parseHeaders");var isURLSameOrigin=require("./../helpers/isURLSameOrigin");var createError=require("../core/createError");module.exports=function xhrAdapter(config){return new Promise(function dispatchXhrRequest(resolve,reject){var requestData=config.data;var requestHeaders=config.headers;if(utils.isFormData(requestData)){delete requestHeaders["Content-Type"]}var request=new XMLHttpRequest;if(config.auth){var username=config.auth.username||"";var password=config.auth.password||"";requestHeaders.Authorization="Basic "+btoa(username+":"+password)}var fullPath=buildFullPath(config.baseURL,config.url);request.open(config.method.toUpperCase(),buildURL(fullPath,config.params,config.paramsSerializer),true);request.timeout=config.timeout;request.onreadystatechange=function handleLoad(){if(!request||request.readyState!==4){return}if(request.status===0&&!(request.responseURL&&request.responseURL.indexOf("file:")===0)){return}var responseHeaders="getAllResponseHeaders"in request?parseHeaders(request.getAllResponseHeaders()):null;var responseData=!config.responseType||config.responseType==="text"?request.responseText:request.response;var response={data:responseData,status:request.status,statusText:request.statusText,headers:responseHeaders,config:config,request:request};settle(resolve,reject,response);request=null};request.onabort=function handleAbort(){if(!request){return}reject(createError("Request aborted",config,"ECONNABORTED",request));request=null};request.onerror=function handleError(){reject(createError("Network Error",config,null,request));request=null};request.ontimeout=function handleTimeout(){var timeoutErrorMessage="timeout of "+config.timeout+"ms exceeded";if(config.timeoutErrorMessage){timeoutErrorMessage=config.timeoutErrorMessage}reject(createError(timeoutErrorMessage,config,"ECONNABORTED",request));request=null};if(utils.isStandardBrowserEnv()){var cookies=require("./../helpers/cookies");var xsrfValue=(config.withCredentials||isURLSameOrigin(fullPath))&&config.xsrfCookieName?cookies.read(config.xsrfCookieName):undefined;if(xsrfValue){requestHeaders[config.xsrfHeaderName]=xsrfValue}}if("setRequestHeader"in request){utils.forEach(requestHeaders,function setRequestHeader(val,key){if(typeof requestData==="undefined"&&key.toLowerCase()==="content-type"){delete requestHeaders[key]}else{request.setRequestHeader(key,val)}})}if(!utils.isUndefined(config.withCredentials)){request.withCredentials=!!config.withCredentials}if(config.responseType){try{request.responseType=config.responseType}catch(e){if(config.responseType!=="json"){throw e}}}if(typeof config.onDownloadProgress==="function"){request.addEventListener("progress",config.onDownloadProgress)}if(typeof config.onUploadProgress==="function"&&request.upload){request.upload.addEventListener("progress",config.onUploadProgress)}if(config.cancelToken){config.cancelToken.promise.then(function onCanceled(cancel){if(!request){return}request.abort();reject(cancel);request=null})}if(requestData===undefined){requestData=null}request.send(requestData)})}},{"../core/buildFullPath":10,"../core/createError":11,"./../core/settle":15,"./../helpers/buildURL":19,"./../helpers/cookies":21,"./../helpers/isURLSameOrigin":23,"./../helpers/parseHeaders":25,"./../utils":27}],4:[function(require,module,exports){"use strict";var utils=require("./utils");var bind=require("./helpers/bind");var Axios=require("./core/Axios");var mergeConfig=require("./core/mergeConfig");var defaults=require("./defaults");function createInstance(defaultConfig){var context=new Axios(defaultConfig);var instance=bind(Axios.prototype.request,context);utils.extend(instance,Axios.prototype,context);utils.extend(instance,context);return instance}var axios=createInstance(defaults);axios.Axios=Axios;axios.create=function create(instanceConfig){return createInstance(mergeConfig(axios.defaults,instanceConfig))};axios.Cancel=require("./cancel/Cancel");axios.CancelToken=require("./cancel/CancelToken");axios.isCancel=require("./cancel/isCancel");axios.all=function all(promises){return Promise.all(promises)};axios.spread=require("./helpers/spread");module.exports=axios;module.exports.default=axios},{"./cancel/Cancel":5,"./cancel/CancelToken":6,"./cancel/isCancel":7,"./core/Axios":8,"./core/mergeConfig":14,"./defaults":17,"./helpers/bind":18,"./helpers/spread":26,"./utils":27}],5:[function(require,module,exports){"use strict";function Cancel(message){this.message=message}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")};Cancel.prototype.__CANCEL__=true;module.exports=Cancel},{}],6:[function(require,module,exports){"use strict";var Cancel=require("./Cancel");function CancelToken(executor){if(typeof executor!=="function"){throw new TypeError("executor must be a function.")}var resolvePromise;this.promise=new Promise(function promiseExecutor(resolve){resolvePromise=resolve});var token=this;executor(function cancel(message){if(token.reason){return}token.reason=new Cancel(message);resolvePromise(token.reason)})}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason){throw this.reason}};CancelToken.source=function source(){var cancel;var token=new CancelToken(function executor(c){cancel=c});return{token:token,cancel:cancel}};module.exports=CancelToken},{"./Cancel":5}],7:[function(require,module,exports){"use strict";module.exports=function isCancel(value){return!!(value&&value.__CANCEL__)}},{}],8:[function(require,module,exports){"use strict";var utils=require("./../utils");var buildURL=require("../helpers/buildURL");var InterceptorManager=require("./InterceptorManager");var dispatchRequest=require("./dispatchRequest");var mergeConfig=require("./mergeConfig");function Axios(instanceConfig){this.defaults=instanceConfig;this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios.prototype.request=function request(config){if(typeof config==="string"){config=arguments[1]||{};config.url=arguments[0]}else{config=config||{}}config=mergeConfig(this.defaults,config);if(config.method){config.method=config.method.toLowerCase()}else if(this.defaults.method){config.method=this.defaults.method.toLowerCase()}else{config.method="get"}var chain=[dispatchRequest,undefined];var promise=Promise.resolve(config);this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor){chain.unshift(interceptor.fulfilled,interceptor.rejected)});this.interceptors.response.forEach(function pushResponseInterceptors(interceptor){chain.push(interceptor.fulfilled,interceptor.rejected)});while(chain.length){promise=promise.then(chain.shift(),chain.shift())}return promise};Axios.prototype.getUri=function getUri(config){config=mergeConfig(this.defaults,config);return buildURL(config.url,config.params,config.paramsSerializer).replace(/^\?/,"")};utils.forEach(["delete","get","head","options"],function forEachMethodNoData(method){Axios.prototype[method]=function(url,config){return this.request(utils.merge(config||{},{method:method,url:url}))}});utils.forEach(["post","put","patch"],function forEachMethodWithData(method){Axios.prototype[method]=function(url,data,config){return this.request(utils.merge(config||{},{method:method,url:url,data:data}))}});module.exports=Axios},{"../helpers/buildURL":19,"./../utils":27,"./InterceptorManager":9,"./dispatchRequest":12,"./mergeConfig":14}],9:[function(require,module,exports){"use strict";var utils=require("./../utils");function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(fulfilled,rejected){this.handlers.push({fulfilled:fulfilled,rejected:rejected});return this.handlers.length-1};InterceptorManager.prototype.eject=function eject(id){if(this.handlers[id]){this.handlers[id]=null}};InterceptorManager.prototype.forEach=function forEach(fn){utils.forEach(this.handlers,function forEachHandler(h){if(h!==null){fn(h)}})};module.exports=InterceptorManager},{"./../utils":27}],10:[function(require,module,exports){"use strict";var isAbsoluteURL=require("../helpers/isAbsoluteURL");var combineURLs=require("../helpers/combineURLs");module.exports=function buildFullPath(baseURL,requestedURL){if(baseURL&&!isAbsoluteURL(requestedURL)){return combineURLs(baseURL,requestedURL)}return requestedURL}},{"../helpers/combineURLs":20,"../helpers/isAbsoluteURL":22}],11:[function(require,module,exports){"use strict";var enhanceError=require("./enhanceError");module.exports=function createError(message,config,code,request,response){var error=new Error(message);return enhanceError(error,config,code,request,response)}},{"./enhanceError":13}],12:[function(require,module,exports){"use strict";var utils=require("./../utils");var transformData=require("./transformData");var isCancel=require("../cancel/isCancel");var defaults=require("../defaults");function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested()}}module.exports=function dispatchRequest(config){throwIfCancellationRequested(config);config.headers=config.headers||{};config.data=transformData(config.data,config.headers,config.transformRequest);config.headers=utils.merge(config.headers.common||{},config.headers[config.method]||{},config.headers);utils.forEach(["delete","get","head","post","put","patch","common"],function cleanHeaderConfig(method){delete config.headers[method]});var adapter=config.adapter||defaults.adapter;return adapter(config).then(function onAdapterResolution(response){throwIfCancellationRequested(config);response.data=transformData(response.data,response.headers,config.transformResponse);return response},function onAdapterRejection(reason){if(!isCancel(reason)){throwIfCancellationRequested(config);if(reason&&reason.response){reason.response.data=transformData(reason.response.data,reason.response.headers,config.transformResponse)}}return Promise.reject(reason)})}},{"../cancel/isCancel":7,"../defaults":17,"./../utils":27,"./transformData":16}],13:[function(require,module,exports){"use strict";module.exports=function enhanceError(error,config,code,request,response){error.config=config;if(code){error.code=code}error.request=request;error.response=response;error.isAxiosError=true;error.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}};return error}},{}],14:[function(require,module,exports){"use strict";var utils=require("../utils");module.exports=function mergeConfig(config1,config2){config2=config2||{};var config={};var valueFromConfig2Keys=["url","method","params","data"];var mergeDeepPropertiesKeys=["headers","auth","proxy"];var defaultToConfig2Keys=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];utils.forEach(valueFromConfig2Keys,function valueFromConfig2(prop){if(typeof config2[prop]!=="undefined"){config[prop]=config2[prop]}});utils.forEach(mergeDeepPropertiesKeys,function mergeDeepProperties(prop){if(utils.isObject(config2[prop])){config[prop]=utils.deepMerge(config1[prop],config2[prop])}else if(typeof config2[prop]!=="undefined"){config[prop]=config2[prop]}else if(utils.isObject(config1[prop])){config[prop]=utils.deepMerge(config1[prop])}else if(typeof config1[prop]!=="undefined"){config[prop]=config1[prop]}});utils.forEach(defaultToConfig2Keys,function defaultToConfig2(prop){if(typeof config2[prop]!=="undefined"){config[prop]=config2[prop]}else if(typeof config1[prop]!=="undefined"){config[prop]=config1[prop]}});var axiosKeys=valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys);var otherKeys=Object.keys(config2).filter(function filterAxiosKeys(key){return axiosKeys.indexOf(key)===-1});utils.forEach(otherKeys,function otherKeysDefaultToConfig2(prop){if(typeof config2[prop]!=="undefined"){config[prop]=config2[prop]}else if(typeof config1[prop]!=="undefined"){config[prop]=config1[prop]}});return config}},{"../utils":27}],15:[function(require,module,exports){"use strict";var createError=require("./createError");module.exports=function settle(resolve,reject,response){var validateStatus=response.config.validateStatus;if(!validateStatus||validateStatus(response.status)){resolve(response)}else{reject(createError("Request failed with status code "+response.status,response.config,null,response.request,response))}}},{"./createError":11}],16:[function(require,module,exports){"use strict";var utils=require("./../utils");module.exports=function transformData(data,headers,fns){utils.forEach(fns,function transform(fn){data=fn(data,headers)});return data}},{"./../utils":27}],17:[function(require,module,exports){(function(process){"use strict";var utils=require("./utils");var normalizeHeaderName=require("./helpers/normalizeHeaderName");var DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(headers,value){if(!utils.isUndefined(headers)&&utils.isUndefined(headers["Content-Type"])){headers["Content-Type"]=value}}function getDefaultAdapter(){var adapter;if(typeof XMLHttpRequest!=="undefined"){adapter=require("./adapters/xhr")}else if(typeof process!=="undefined"&&Object.prototype.toString.call(process)==="[object process]"){adapter=require("./adapters/http")}return adapter}var defaults={adapter:getDefaultAdapter(),transformRequest:[function transformRequest(data,headers){normalizeHeaderName(headers,"Accept");normalizeHeaderName(headers,"Content-Type");if(utils.isFormData(data)||utils.isArrayBuffer(data)||utils.isBuffer(data)||utils.isStream(data)||utils.isFile(data)||utils.isBlob(data)){return data}if(utils.isArrayBufferView(data)){return data.buffer}if(utils.isURLSearchParams(data)){setContentTypeIfUnset(headers,"application/x-www-form-urlencoded;charset=utf-8");return data.toString()}if(utils.isObject(data)){setContentTypeIfUnset(headers,"application/json;charset=utf-8");return JSON.stringify(data)}return data}],transformResponse:[function transformResponse(data){if(typeof data==="string"){try{data=JSON.parse(data)}catch(e){}}return data}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function validateStatus(status){return status>=200&&status<300}};defaults.headers={common:{Accept:"application/json, text/plain, */*"}};utils.forEach(["delete","get","head"],function forEachMethodNoData(method){defaults.headers[method]={}});utils.forEach(["post","put","patch"],function forEachMethodWithData(method){defaults.headers[method]=utils.merge(DEFAULT_CONTENT_TYPE)});module.exports=defaults}).call(this,require("_process"))},{"./adapters/http":3,"./adapters/xhr":3,"./helpers/normalizeHeaderName":24,"./utils":27,_process:28}],18:[function(require,module,exports){"use strict";module.exports=function bind(fn,thisArg){return function wrap(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i]}return fn.apply(thisArg,args)}}},{}],19:[function(require,module,exports){"use strict";var utils=require("./../utils");function encode(val){return encodeURIComponent(val).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}module.exports=function buildURL(url,params,paramsSerializer){if(!params){return url}var serializedParams;if(paramsSerializer){serializedParams=paramsSerializer(params)}else if(utils.isURLSearchParams(params)){serializedParams=params.toString()}else{var parts=[];utils.forEach(params,function serialize(val,key){if(val===null||typeof val==="undefined"){return}if(utils.isArray(val)){key=key+"[]"}else{val=[val]}utils.forEach(val,function parseValue(v){if(utils.isDate(v)){v=v.toISOString()}else if(utils.isObject(v)){v=JSON.stringify(v)}parts.push(encode(key)+"="+encode(v))})});serializedParams=parts.join("&")}if(serializedParams){var hashmarkIndex=url.indexOf("#");if(hashmarkIndex!==-1){url=url.slice(0,hashmarkIndex)}url+=(url.indexOf("?")===-1?"?":"&")+serializedParams}return url}},{"./../utils":27}],20:[function(require,module,exports){"use strict";module.exports=function combineURLs(baseURL,relativeURL){return relativeURL?baseURL.replace(/\/+$/,"")+"/"+relativeURL.replace(/^\/+/,""):baseURL}},{}],21:[function(require,module,exports){"use strict";var utils=require("./../utils");module.exports=utils.isStandardBrowserEnv()?function standardBrowserEnv(){return{write:function write(name,value,expires,path,domain,secure){var cookie=[];cookie.push(name+"="+encodeURIComponent(value));if(utils.isNumber(expires)){cookie.push("expires="+new Date(expires).toGMTString())}if(utils.isString(path)){cookie.push("path="+path)}if(utils.isString(domain)){cookie.push("domain="+domain)}if(secure===true){cookie.push("secure")}document.cookie=cookie.join("; ")},read:function read(name){var match=document.cookie.match(new RegExp("(^|;\\s*)("+name+")=([^;]*)"));return match?decodeURIComponent(match[3]):null},remove:function remove(name){this.write(name,"",Date.now()-864e5)}}}():function nonStandardBrowserEnv(){return{write:function write(){},read:function read(){return null},remove:function remove(){}}}()},{"./../utils":27}],22:[function(require,module,exports){"use strict";module.exports=function isAbsoluteURL(url){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url)}},{}],23:[function(require,module,exports){"use strict";var utils=require("./../utils");module.exports=utils.isStandardBrowserEnv()?function standardBrowserEnv(){var msie=/(msie|trident)/i.test(navigator.userAgent);var urlParsingNode=document.createElement("a");var originURL;function resolveURL(url){var href=url;if(msie){urlParsingNode.setAttribute("href",href);href=urlParsingNode.href}urlParsingNode.setAttribute("href",href);return{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:urlParsingNode.pathname.charAt(0)==="/"?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}originURL=resolveURL(window.location.href);return function isURLSameOrigin(requestURL){var parsed=utils.isString(requestURL)?resolveURL(requestURL):requestURL;return parsed.protocol===originURL.protocol&&parsed.host===originURL.host}}():function nonStandardBrowserEnv(){return function isURLSameOrigin(){return true}}()},{"./../utils":27}],24:[function(require,module,exports){"use strict";var utils=require("../utils");module.exports=function normalizeHeaderName(headers,normalizedName){utils.forEach(headers,function processHeader(value,name){if(name!==normalizedName&&name.toUpperCase()===normalizedName.toUpperCase()){headers[normalizedName]=value;delete headers[name]}})}},{"../utils":27}],25:[function(require,module,exports){"use strict";var utils=require("./../utils");var ignoreDuplicateOf=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];module.exports=function parseHeaders(headers){var parsed={};var key;var val;var i;if(!headers){return parsed}utils.forEach(headers.split("\n"),function parser(line){i=line.indexOf(":");key=utils.trim(line.substr(0,i)).toLowerCase();val=utils.trim(line.substr(i+1));if(key){if(parsed[key]&&ignoreDuplicateOf.indexOf(key)>=0){return}if(key==="set-cookie"){parsed[key]=(parsed[key]?parsed[key]:[]).concat([val])}else{parsed[key]=parsed[key]?parsed[key]+", "+val:val}}});return parsed}},{"./../utils":27}],26:[function(require,module,exports){"use strict";module.exports=function spread(callback){return function wrap(arr){return callback.apply(null,arr)}}},{}],27:[function(require,module,exports){"use strict";var bind=require("./helpers/bind");var toString=Object.prototype.toString;function isArray(val){return toString.call(val)==="[object Array]"}function isUndefined(val){return typeof val==="undefined"}function isBuffer(val){return val!==null&&!isUndefined(val)&&val.constructor!==null&&!isUndefined(val.constructor)&&typeof val.constructor.isBuffer==="function"&&val.constructor.isBuffer(val)}function isArrayBuffer(val){return toString.call(val)==="[object ArrayBuffer]"}function isFormData(val){return typeof FormData!=="undefined"&&val instanceof FormData}function isArrayBufferView(val){var result;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){result=ArrayBuffer.isView(val)}else{result=val&&val.buffer&&val.buffer instanceof ArrayBuffer}return result}function isString(val){return typeof val==="string"}function isNumber(val){return typeof val==="number"}function isObject(val){return val!==null&&typeof val==="object"}function isDate(val){return toString.call(val)==="[object Date]"}function isFile(val){return toString.call(val)==="[object File]"}function isBlob(val){return toString.call(val)==="[object Blob]"}function isFunction(val){return toString.call(val)==="[object Function]"}function isStream(val){return isObject(val)&&isFunction(val.pipe)}function isURLSearchParams(val){return typeof URLSearchParams!=="undefined"&&val instanceof URLSearchParams}function trim(str){return str.replace(/^\s*/,"").replace(/\s*$/,"")}function isStandardBrowserEnv(){if(typeof navigator!=="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}function forEach(obj,fn){if(obj===null||typeof obj==="undefined"){return}if(typeof obj!=="object"){obj=[obj]}if(isArray(obj)){for(var i=0,l=obj.length;i<l;i++){fn.call(null,obj[i],i,obj)}}else{for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){fn.call(null,obj[key],key,obj)}}}}function merge(){var result={};function assignValue(val,key){if(typeof result[key]==="object"&&typeof val==="object"){result[key]=merge(result[key],val)}else{result[key]=val}}for(var i=0,l=arguments.length;i<l;i++){forEach(arguments[i],assignValue)}return result}function deepMerge(){var result={};function assignValue(val,key){if(typeof result[key]==="object"&&typeof val==="object"){result[key]=deepMerge(result[key],val)}else if(typeof val==="object"){result[key]=deepMerge({},val)}else{result[key]=val}}for(var i=0,l=arguments.length;i<l;i++){forEach(arguments[i],assignValue)}return result}function extend(a,b,thisArg){forEach(b,function assignValue(val,key){if(thisArg&&typeof val==="function"){a[key]=bind(val,thisArg)}else{a[key]=val}});return a}module.exports={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isObject:isObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,deepMerge:deepMerge,extend:extend,trim:trim}},{"./helpers/bind":18}],28:[function(require,module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[]};process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}]},{},[1])(1)});