Socket
Socket
Sign inDemoInstall

get-it

Package Overview
Dependencies
Maintainers
1
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-it - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

5

lib/request/browser-request.js

@@ -96,3 +96,6 @@ 'use strict';

aborted = true;
xhr.abort();
if (xhr) {
xhr.abort();
}
}

@@ -99,0 +102,0 @@

2

package.json
{
"name": "get-it",
"version": "1.0.3",
"version": "1.0.4",
"description": "Generic HTTP request library for node and browsers",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,2 +7,3 @@ (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.getIt = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

"use strict";var objectAssign=require("object-assign"),leadingSlash=/^\//,trailingSlash=/\/$/;module.exports=function(r){var e=r.replace(trailingSlash,"");return{processOptions:function(r){if(/^https?:\/\//i.test(r.url))return r;var s=[e,r.url.replace(leadingSlash,"")].join("/");return objectAssign({},r,{url:s})}}};
},{"object-assign":34}],4:[function(require,module,exports){

@@ -19,3 +20,2 @@ "use strict";function Cancel(e){this.message=e}Cancel.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,module.exports=Cancel;

"use strict";function stringifyBody(e){var t=(e.headers["content-type"]||"").toLowerCase(),s=t.indexOf("application/json")!==-1;return s?tryFormat(e.body):e.body}function tryFormat(e){try{var t="string"==typeof e?JSON.parse(e):e;return JSON.stringify(t,null,2)}catch(t){return e}}var debugIt=require("debug");module.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.verbose,s=e.namespace||"get-it",r=debugIt(s),n=e.log||r,o=n===r&&!debugIt.enabled(s),u=0;return{processOptions:function(e){return e.requestId=e.requestId||++u,e},onRequest:function(e){if(o||!e)return e;var s=e.options;return n("[%s] HTTP %s %s",s.requestId,s.method,s.url),t&&s.body&&"string"==typeof s.body&&n("[%s] Request body: %s",s.requestId,s.body),t&&s.headers&&n("[%s] Request headers: %s",s.requestId,JSON.stringify(s.headers,null,2)),e},onResponse:function(e,s){if(o||!e)return e;var r=s.options.requestId;return n("[%s] Response code: %s %s",r,e.statusCode,e.statusMessage),t&&e.body&&n("[%s] Response body: %s",r,stringifyBody(e)),e},onError:function(e,t){return n("[%s] ERROR: %s",t.options.requestId,e.message),e}}};
},{"debug":26}],8:[function(require,module,exports){

@@ -46,3 +46,2 @@ "use strict";function normalizeTimeout(e){if(e===!1||0===e)return!1;if(e.connect||e.socket)return e;var t=Number(e);return isNaN(t)?normalizeTimeout(defaultOptions.timeout):{connect:t,socket:t}}function removeUndefined(e){var t={};for(var r in e)void 0!==e[r]&&(t[r]=e[r]);return t}var objectAssign=require("object-assign"),urlParse=require("url-parse"),defaultOptions={timeout:12e4};module.exports=function(e){var t="string"==typeof e?objectAssign({url:e},defaultOptions):objectAssign({},defaultOptions,e),r=urlParse(t.url,{},!0);return t.timeout=normalizeTimeout(t.timeout),t.query&&(r.query=objectAssign({},r.query,removeUndefined(t.query))),t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t.url=r.toString(),t};

"use strict";module.exports=require("./node-progress");
},{"./node-progress":15}],17:[function(require,module,exports){

@@ -55,6 +54,5 @@ "use strict";var global=require("../util/global"),Cancel=require("./cancel/Cancel"),CancelToken=require("./cancel/CancelToken"),isCancel=require("./cancel/isCancel"),promise=function(){var e=global.Promise;if(!e)throw new Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:function(n,r){return new e(function(e,o){var i=r.options.cancelToken;i&&i.promise.then(function(e){n.abort.publish(e),o(e)}),n.error.subscribe(o),n.response.subscribe(e),setTimeout(function(){return n.request.publish(r)},0)})}}};promise.Cancel=Cancel,promise.CancelToken=CancelToken,promise.isCancel=isCancel,module.exports=promise;

},{"../util/node-shouldRetry":21,"object-assign":34}],19:[function(require,module,exports){
"use strict";var sameOrigin=require("same-origin"),parseHeaders=require("parse-headers"),noop=function(){},win=window,XmlHttpRequest=win.XMLHttpRequest||noop,hasXhr2="withCredentials"in new XmlHttpRequest,XDomainRequest=hasXhr2?XmlHttpRequest:win.XDomainRequest,adapter="xhr";module.exports=function(e,t){function r(){w=!0,p.abort()}function n(t){q=!0,p.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+c.url:"Connection timed out on request to "+c.url);r.code=t,e.channels.error.publish(r)}function o(){X&&(s(),l.socket=setTimeout(function(){return n("ESOCKETTIMEDOUT")},X.socket))}function s(){(w||p.readyState>=2&&l.connect)&&clearTimeout(l.connect),l.socket&&clearTimeout(l.socket)}function a(){if(!h){s(),h=!0,p=null;var e=new Error("Network error while attempting to reach "+c.url);e.isNetworkError=!0,e.request=c,t(e)}}function i(){var e=p.status,t=p.statusText;if(f&&void 0===e)e=200;else{if(e>12e3&&e<12156)return a();e=1223===p.status?204:p.status,t=1223===p.status?"No Content":t}return{body:p.response||p.responseText,url:c.url,method:c.method,headers:f?{}:parseHeaders(p.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function u(){if(!(w||h||q)){if(0===p.status)return void a(new Error("Unknown XHR error"));s(),h=!0,t(null,i())}}var c=e.options,d=!sameOrigin(win.location.href,c.url),l={},p=d?new XDomainRequest:new XmlHttpRequest,f=win.XDomainRequest&&p instanceof win.XDomainRequest,m=c.headers,w=!1,h=!1,q=!1;p.onerror=a,p.ontimeout=a,p.onabort=function(){w=!0},p.onprogress=function(){};var R=f?"onload":"onreadystatechange";if(p[R]=function(){o(),w||4!==p.readyState&&!f||0!==p.status&&u()},p.open(c.method,c.url,!0),p.withCredentials=!!c.withCredentials,m&&p.setRequestHeader)for(var T in m)m.hasOwnProperty(T)&&p.setRequestHeader(T,m[T]);else if(m&&f)throw new Error("Headers cannot be set on an XDomainRequest object");c.rawBody&&(p.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:c,adapter:adapter,request:p,context:e}),p.send(c.body||null);var X=c.timeout;return X&&(l.connect=setTimeout(function(){return n("ETIMEDOUT")},X.connect)),{abort:r}};
"use strict";var sameOrigin=require("same-origin"),parseHeaders=require("parse-headers"),noop=function(){},win=window,XmlHttpRequest=win.XMLHttpRequest||noop,hasXhr2="withCredentials"in new XmlHttpRequest,XDomainRequest=hasXhr2?XmlHttpRequest:win.XDomainRequest,adapter="xhr";module.exports=function(e,t){function r(){w=!0,p&&p.abort()}function n(t){q=!0,p.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+c.url:"Connection timed out on request to "+c.url);r.code=t,e.channels.error.publish(r)}function o(){X&&(s(),l.socket=setTimeout(function(){return n("ESOCKETTIMEDOUT")},X.socket))}function s(){(w||p.readyState>=2&&l.connect)&&clearTimeout(l.connect),l.socket&&clearTimeout(l.socket)}function a(){if(!h){s(),h=!0,p=null;var e=new Error("Network error while attempting to reach "+c.url);e.isNetworkError=!0,e.request=c,t(e)}}function i(){var e=p.status,t=p.statusText;if(f&&void 0===e)e=200;else{if(e>12e3&&e<12156)return a();e=1223===p.status?204:p.status,t=1223===p.status?"No Content":t}return{body:p.response||p.responseText,url:c.url,method:c.method,headers:f?{}:parseHeaders(p.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function u(){if(!(w||h||q)){if(0===p.status)return void a(new Error("Unknown XHR error"));s(),h=!0,t(null,i())}}var c=e.options,d=!sameOrigin(win.location.href,c.url),l={},p=d?new XDomainRequest:new XmlHttpRequest,f=win.XDomainRequest&&p instanceof win.XDomainRequest,m=c.headers,w=!1,h=!1,q=!1;p.onerror=a,p.ontimeout=a,p.onabort=function(){w=!0},p.onprogress=function(){};var R=f?"onload":"onreadystatechange";if(p[R]=function(){o(),w||4!==p.readyState&&!f||0!==p.status&&u()},p.open(c.method,c.url,!0),p.withCredentials=!!c.withCredentials,m&&p.setRequestHeader)for(var T in m)m.hasOwnProperty(T)&&p.setRequestHeader(T,m[T]);else if(m&&f)throw new Error("Headers cannot be set on an XDomainRequest object");c.rawBody&&(p.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:c,adapter:adapter,request:p,context:e}),p.send(c.body||null);var X=c.timeout;return X&&(l.connect=setTimeout(function(){return n("ETIMEDOUT")},X.connect)),{abort:r}};
},{"parse-headers":35,"same-origin":39}],20:[function(require,module,exports){
"use strict";module.exports=require("./node-request");
},{"./node-request":19}],21:[function(require,module,exports){

@@ -83,6 +81,4 @@ "use strict";module.exports=function(r){return r.isNetworkError||!1};

function selectColor(e){var r,t=0;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return exports.colors[Math.abs(t)%exports.colors.length]}function createDebug(e){function r(){if(r.enabled){var e=r,t=+new Date,o=t-(prevTime||t);e.diff=o,e.prev=prevTime,e.curr=t,prevTime=t;for(var s=new Array(arguments.length),n=0;n<s.length;n++)s[n]=arguments[n];s[0]=exports.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var a=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,t){if("%%"===r)return r;a++;var o=exports.formatters[t];if("function"==typeof o){var n=s[a];r=o.call(e,n),s.splice(a,1),a--}return r}),exports.formatArgs.call(e,s);var p=r.log||exports.log||console.log.bind(console);p.apply(e,s)}}return r.namespace=e,r.enabled=exports.enabled(e),r.useColors=exports.useColors(),r.color=selectColor(e),"function"==typeof exports.init&&exports.init(r),r}function enable(e){exports.save(e),exports.names=[],exports.skips=[];for(var r=(e||"").split(/[\s,]+/),t=r.length,o=0;o<t;o++)r[o]&&(e=r[o].replace(/\*/g,".*?"),"-"===e[0]?exports.skips.push(new RegExp("^"+e.substr(1)+"$")):exports.names.push(new RegExp("^"+e+"$")))}function disable(){exports.enable("")}function enabled(e){var r,t;for(r=0,t=exports.skips.length;r<t;r++)if(exports.skips[r].test(e))return!1;for(r=0,t=exports.names.length;r<t;r++)if(exports.names[r].test(e))return!0;return!1}function coerce(e){return e instanceof Error?e.stack||e.message:e}exports=module.exports=createDebug.debug=createDebug.default=createDebug,exports.coerce=coerce,exports.disable=disable,exports.enable=enable,exports.enabled=enabled,exports.humanize=require("ms"),exports.names=[],exports.skips=[],exports.formatters={};var prevTime;
},{"ms":32}],28:[function(require,module,exports){
function forEach(r,t,o){if(!isFunction(t))throw new TypeError("iterator must be a function");arguments.length<3&&(o=this),"[object Array]"===toString.call(r)?forEachArray(r,t,o):"string"==typeof r?forEachString(r,t,o):forEachObject(r,t,o)}function forEachArray(r,t,o){for(var n=0,a=r.length;n<a;n++)hasOwnProperty.call(r,n)&&t.call(o,r[n],n,r)}function forEachString(r,t,o){for(var n=0,a=r.length;n<a;n++)t.call(o,r.charAt(n),n,r)}function forEachObject(r,t,o){for(var n in r)hasOwnProperty.call(r,n)&&t.call(o,r[n],n,r)}var isFunction=require("is-function");module.exports=forEach;var toString=Object.prototype.toString,hasOwnProperty=Object.prototype.hasOwnProperty;
},{"is-function":29}],29:[function(require,module,exports){

@@ -92,3 +88,2 @@ function isFunction(o){var t=toString.call(o);return"[object Function]"===t||"function"==typeof o&&"[object RegExp]"!==t||"undefined"!=typeof window&&(o===window.setTimeout||o===window.alert||o===window.confirm||o===window.prompt)}module.exports=isFunction;var toString=Object.prototype.toString;

"use strict";function isObjectObject(t){return isObject(t)===!0&&"[object Object]"===Object.prototype.toString.call(t)}var isObject=require("isobject");module.exports=function(t){var e,c;return isObjectObject(t)!==!1&&(e=t.constructor,"function"==typeof e&&(c=e.prototype,isObjectObject(c)!==!1&&c.hasOwnProperty("isPrototypeOf")!==!1))};
},{"isobject":31}],31:[function(require,module,exports){

@@ -100,2 +95,3 @@ "use strict";module.exports=function(r){return null!=r&&"object"==typeof r&&!Array.isArray(r)};

module.exports=function(){function n(n){return r.push(n),function(){var u=r.indexOf(n);u>-1&&r.splice(u,1)}}function u(){for(var n=0;n<r.length;n++)r[n].apply(null,arguments)}var r=[];return{subscribe:n,publish:u}};
},{}],34:[function(require,module,exports){

@@ -105,5 +101,5 @@ "use strict";function toObject(r){if(null===r||void 0===r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function shouldUseNative(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;var n=Object.getOwnPropertyNames(e).map(function(r){return e[r]});if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(r){o[r]=r}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(r){return!1}}var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=shouldUseNative()?Object.assign:function(r,e){for(var t,n,o=toObject(r),a=1;a<arguments.length;a++){t=Object(arguments[a]);for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);if(getOwnPropertySymbols){n=getOwnPropertySymbols(t);for(var c=0;c<n.length;c++)propIsEnumerable.call(t,n[c])&&(o[n[c]]=t[n[c]])}}return o};

var trim=require("trim"),forEach=require("for-each"),isArray=function(r){return"[object Array]"===Object.prototype.toString.call(r)};module.exports=function(r){if(!r)return{};var e={};return forEach(trim(r).split("\n"),function(r){var t=r.indexOf(":"),i=trim(r.slice(0,t)).toLowerCase(),o=trim(r.slice(t+1));"undefined"==typeof e[i]?e[i]=o:isArray(e[i])?e[i].push(o):e[i]=[e[i],o]}),e};
},{"for-each":28,"trim":41}],36:[function(require,module,exports){
function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}var process=module.exports={},cachedSetTimeout,cachedClearTimeout;!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var queue=[],draining=!1,currentQueue,queueIndex=-1;process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)t[u-1]=arguments[u];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};
},{}],37:[function(require,module,exports){

@@ -114,5 +110,5 @@ "use strict";function querystring(e){for(var r,n=/([^=?&]+)=?([^&]*)/g,t={};r=n.exec(e);t[decodeURIComponent(r[1])]=decodeURIComponent(r[2]));return t}function querystringify(e,r){r=r||"";var n=[];"string"!=typeof r&&(r="?");for(var t in e)has.call(e,t)&&n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.length?r+n.join("&"):""}var has=Object.prototype.hasOwnProperty;exports.stringify=querystringify,exports.parse=querystring;

"use strict";module.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e};
},{}],39:[function(require,module,exports){
"use strict";var url=require("url");module.exports=function(o,r,t){if(o===r)return!0;var p=url.parse(o,!1,!0),e=url.parse(r,!1,!0),s=0|p.port||("https"===p.protocol?443:80),u=0|e.port||("https"===e.protocol?443:80),l={proto:p.protocol===e.protocol,hostname:p.hostname===e.hostname,port:s===u};return l.proto&&l.hostname&&(l.port||t)};
},{"url":40}],40:[function(require,module,exports){

@@ -123,2 +119,3 @@ "use strict";var regex=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;module.exports={regex:regex,parse:function(e){var o=regex.exec(e);return o?{protocol:(o[1]||"").toLowerCase()||void 0,hostname:(o[5]||"").toLowerCase()||void 0,port:o[6]||void 0}:{}}};

function trim(r){return r.replace(/^\s*|\s*$/g,"")}exports=module.exports=trim,exports.left=function(r){return r.replace(/^\s*/,"")},exports.right=function(r){return r.replace(/\s*$/,"")};
},{}],42:[function(require,module,exports){

@@ -125,0 +122,0 @@ "use strict";function extractProtocol(o){var t=protocolre.exec(o);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function resolve(o,t){for(var e=(t||"/").split("/").slice(0,-1).concat(o.split("/")),r=e.length,s=e[r-1],a=!1,n=0;r--;)"."===e[r]?e.splice(r,1):".."===e[r]?(e.splice(r,1),n++):n&&(0===r&&(a=!0),e.splice(r,1),n--);return a&&e.unshift(""),"."!==s&&".."!==s||e.push(""),e.join("/")}function URL(o,t,e){if(!(this instanceof URL))return new URL(o,t,e);var r,s,a,n,l,i,c=rules.slice(),h=typeof t,p=this,u=0;for("object"!==h&&"string"!==h&&(e=t,t=null),e&&"function"!=typeof e&&(e=qs.parse),t=lolcation(t),s=extractProtocol(o||""),r=!s.protocol&&!s.slashes,p.slashes=s.slashes||r&&t.slashes,p.protocol=s.protocol||t.protocol||"",o=s.rest,s.slashes||(c[2]=[/(.*)/,"pathname"]);u<c.length;u++)n=c[u],a=n[0],i=n[1],a!==a?p[i]=o:"string"==typeof a?~(l=o.indexOf(a))&&("number"==typeof n[2]?(p[i]=o.slice(0,l),o=o.slice(l+n[2])):(p[i]=o.slice(l),o=o.slice(0,l))):(l=a.exec(o))&&(p[i]=l[1],o=o.slice(0,l.index)),p[i]=p[i]||(r&&n[3]?t[i]||"":""),n[4]&&(p[i]=p[i].toLowerCase());e&&(p.query=e(p.query)),r&&t.slashes&&"/"!==p.pathname.charAt(0)&&(""!==p.pathname||""!==t.pathname)&&(p.pathname=resolve(p.pathname,t.pathname)),required(p.port,p.protocol)||(p.host=p.hostname,p.port=""),p.username=p.password="",p.auth&&(n=p.auth.split(":"),p.username=n[0]||"",p.password=n[1]||""),p.origin=p.protocol&&p.host&&"file:"!==p.protocol?p.protocol+"//"+p.host:"null",p.href=p.toString()}function set(o,t,e){var r=this;switch(o){case"query":"string"==typeof t&&t.length&&(t=(e||qs.parse)(t)),r[o]=t;break;case"port":r[o]=t,required(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[o]="");break;case"hostname":r[o]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[o]=t,/:\d+$/.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!e;break;case"pathname":r.pathname=t.length&&"/"!==t.charAt(0)?"/"+t:t;break;default:r[o]=t}for(var s=0;s<rules.length;s++){var a=rules[s];a[4]&&(r[a[1]]=r[a[1]].toLowerCase())}return r.origin=r.protocol&&r.host&&"file:"!==r.protocol?r.protocol+"//"+r.host:"null",r.href=r.toString(),r}function toString(o){o&&"function"==typeof o||(o=qs.stringify);var t,e=this,r=e.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var s=r+(e.slashes?"//":"");return e.username&&(s+=e.username,e.password&&(s+=":"+e.password),s+="@"),s+=e.host+e.pathname,t="object"==typeof e.query?o(e.query):e.query,t&&(s+="?"!==t.charAt(0)?"?"+t:t),e.hash&&(s+=e.hash),s}var required=require("requires-port"),lolcation=require("./lolcation"),qs=require("querystringify"),protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,rules=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]];URL.prototype={set:set,toString:toString},URL.extractProtocol=extractProtocol,URL.location=lolcation,URL.qs=qs,module.exports=URL;

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.getIt=e()}}(function(){return function e(t,r,n){function o(i,u){if(!r[i]){if(!t[i]){var a="function"==typeof require&&require;if(!u&&a)return a(i,!0);if(s)return s(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[i]={exports:{}};t[i][0].call(f.exports,function(e){var r=t[i][1][e];return o(r?r:e)},f,f.exports,e,t,r,n)}return r[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}({1:[function(e,t,r){"use strict";var n=e("./index");n.middleware=e("./middleware"),t.exports=n},{"./index":2,"./middleware":11}],2:[function(e,t,r){"use strict";var n=e("nano-pubsub"),o=e("./util/middlewareReducer"),s=e("./middleware/defaultOptionsProcessor"),i=e("./request"),u=["request","response","progress","error","abort"],a=["processOptions","onRequest","onResponse","onError","onReturn","onHeaders"];t.exports=function e(){function t(e){function t(e,t,n){var o=e,i=t;if(!o)try{i=s("onResponse",t,n)}catch(e){i=null,o=e}o=o&&s("onError",o,n),o?r.error.publish(o):i&&r.response.publish(i)}var r=u.reduce(function(e,t){return e[t]=n(),e},{}),s=o(f),a=s("processOptions",e),c={options:a,channels:r,applyMiddleware:s},l=null,p=r.request.subscribe(function(e){l=i(e,function(r,n){return t(r,n,e)})});r.abort.subscribe(function(){p(),l&&l.abort()});var d=s("onReturn",r,c);return d===r&&r.request.publish(c),d}var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],c=[],f=a.reduce(function(e,t){return e[t]=e[t]||[],e},{processOptions:[s]});return t.use=function(e){if(!e)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&f.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");a.forEach(function(t){e[t]&&f[t].push(e[t])}),c.push(e)},t.clone=function(){return e(c)},r.forEach(t.use),t}},{"./middleware/defaultOptionsProcessor":8,"./request":20,"./util/middlewareReducer":23,"nano-pubsub":33}],3:[function(e,t,r){"use strict";var n=e("object-assign"),o=/^\//,s=/\/$/;t.exports=function(e){var t=e.replace(s,"");return{processOptions:function(e){if(/^https?:\/\//i.test(e.url))return e;var r=[t,e.url.replace(o,"")].join("/");return n({},e,{url:r})}}}},{"object-assign":34}],4:[function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},{}],5:[function(e,t,r){"use strict";function n(e){var t=this;if("function"!=typeof e)throw new TypeError("executor must be a function.");var r=null;this.promise=new Promise(function(e){r=e}),e(function(e){t.reason||(t.reason=new o(e),r(t.reason))})}var o=e("./Cancel");n.source=function(){var e=void 0,t=new n(function(t){e=t});return{token:t,cancel:e}},t.exports=n},{"./Cancel":4}],6:[function(e,t,r){"use strict";t.exports=function(e){return!(!e||!e.__CANCEL__)}},{}],7:[function(e,t,r){"use strict";function n(e){var t=(e.headers["content-type"]||"").toLowerCase(),r=t.indexOf("application/json")!==-1;return r?o(e.body):e.body}function o(e){try{var t="string"==typeof e?JSON.parse(e):e;return JSON.stringify(t,null,2)}catch(t){return e}}var s=e("debug");t.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.verbose,r=e.namespace||"get-it",o=s(r),i=e.log||o,u=i===o&&!s.enabled(r),a=0;return{processOptions:function(e){return e.requestId=e.requestId||++a,e},onRequest:function(e){if(u||!e)return e;var r=e.options;return i("[%s] HTTP %s %s",r.requestId,r.method,r.url),t&&r.body&&"string"==typeof r.body&&i("[%s] Request body: %s",r.requestId,r.body),t&&r.headers&&i("[%s] Request headers: %s",r.requestId,JSON.stringify(r.headers,null,2)),e},onResponse:function(e,r){if(u||!e)return e;var o=r.options.requestId;return i("[%s] Response code: %s %s",o,e.statusCode,e.statusMessage),t&&e.body&&i("[%s] Response body: %s",o,n(e)),e},onError:function(e,t){return i("[%s] ERROR: %s",t.options.requestId,e.message),e}}}},{debug:26}],8:[function(e,t,r){"use strict";function n(e){if(e===!1||0===e)return!1;if(e.connect||e.socket)return e;var t=Number(e);return isNaN(t)?n(u.timeout):{connect:t,socket:t}}function o(e){var t={};for(var r in e)void 0!==e[r]&&(t[r]=e[r]);return t}var s=e("object-assign"),i=e("url-parse"),u={timeout:12e4};t.exports=function(e){var t="string"==typeof e?s({url:e},u):s({},u,e),r=i(t.url,{},!0);return t.timeout=n(t.timeout),t.query&&(r.query=s({},r.query,o(t.query))),t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t.url=r.toString(),t}},{"object-assign":34,"url-parse":42}],9:[function(e,t,r){"use strict";var n=e("object-assign");t.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{processOptions:function(r){var o=r.headers||{};return r.headers=t.override?n({},o,e):n({},e,o),r}}}},{"object-assign":34}],10:[function(e,t,r){"use strict";var n=e("create-error-class"),o=n("HttpError",function(e){this.message=(e.method+"-request to "+e.url+" resulted in HTTP "+e.statusCode+" "+e.statusMessage).trim(),this.response=e});t.exports=function(){return{onResponse:function(e){var t=e.statusCode>=400;if(!t)return e;throw new o(e)}}}},{"create-error-class":25}],11:[function(e,t,r){"use strict";r.base=e("./base"),r.debug=e("./debug"),r.jsonRequest=e("./jsonRequest"),r.jsonResponse=e("./jsonResponse"),r.httpErrors=e("./httpErrors"),r.retry=e("./retry"),r.promise=e("./promise"),r.observable=e("./observable"),r.progress=e("./progress"),r.headers=e("./headers")},{"./base":3,"./debug":7,"./headers":9,"./httpErrors":10,"./jsonRequest":12,"./jsonResponse":13,"./observable":14,"./progress":16,"./promise":17,"./retry":18}],12:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("object-assign"),s=e("is-plain-object"),i=["boolean","string","number"],u=function(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)};t.exports=function(){return{processOptions:function(e){var t=e.body,r=t&&!u(t)&&(i.indexOf("undefined"==typeof t?"undefined":n(t))!==-1||Array.isArray(t)||s(t)||t&&"function"==typeof t.toJSON);return r?o({},e,{body:JSON.stringify(e.body),headers:o({},e.headers,{"Content-Type":"application/json"})}):e}}}},{"is-plain-object":30,"object-assign":34}],13:[function(e,t,r){"use strict";function n(e){try{return JSON.parse(e)}catch(e){throw e.message="Failed to parsed response body as JSON: "+e.message,e}}var o=e("object-assign");t.exports=function(){return{onResponse:function(e){var t=e.headers["content-type"];return e.body&&t&&t.indexOf("application/json")!==-1?o({},e,{body:n(e.body)}):e},processOptions:function(e){return o({},e,{headers:o({Accept:"application/json"},e.headers)})}}}},{"object-assign":34}],14:[function(e,t,r){"use strict";var n=e("../util/global"),o=e("object-assign");t.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.implementation||n.Observable;if(!t)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(e,r){return new t(function(t){return e.error.subscribe(function(e){return t.error(e)}),e.progress.subscribe(function(e){return t.next(o({type:"progress"},e))}),e.response.subscribe(function(e){t.next(o({type:"response"},e)),t.complete()}),e.request.publish(r),function(){return e.abort.publish()}})}}}},{"../util/global":22,"object-assign":34}],15:[function(e,t,r){"use strict";t.exports=function(){return{onRequest:function(e){function t(e){return function(t){var r=t.lengthComputable?t.loaded/t.total*100:-1;n.channels.progress.publish({stage:e,percent:r,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}if("xhr"===e.adapter){var r=e.request,n=e.context;"upload"in r&&"onprogress"in r.upload&&(r.upload.onprogress=t("upload")),"onprogress"in r&&(r.onprogress=t("download"))}}}}},{}],16:[function(e,t,r){"use strict";t.exports=e("./node-progress")},{"./node-progress":15}],17:[function(e,t,r){"use strict";var n=e("../util/global"),o=e("./cancel/Cancel"),s=e("./cancel/CancelToken"),i=e("./cancel/isCancel"),u=function(){var e=n.Promise;if(!e)throw new Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:function(t,r){return new e(function(e,n){var o=r.options.cancelToken;o&&o.promise.then(function(e){t.abort.publish(e),n(e)}),t.error.subscribe(n),t.response.subscribe(e),setTimeout(function(){return t.request.publish(r)},0)})}}};u.Cancel=o,u.CancelToken=s,u.isCancel=i,t.exports=u},{"../util/global":22,"./cancel/Cancel":4,"./cancel/CancelToken":5,"./cancel/isCancel":6}],18:[function(e,t,r){"use strict";function n(e){return 100*Math.pow(2,e)+100*Math.random()}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=e("object-assign"),i=e("../util/node-shouldRetry"),u=function(e){return null!==e&&"object"===("undefined"==typeof e?"undefined":o(e))&&"function"==typeof e.pipe},a=t.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxRetries||5,r=e.retryDelay||n,o=e.shouldRetry||i;return{onError:function(e,n){var i=n.options,a=i.maxRetries||t,c=i.shouldRetry||o,f=i.attemptNumber||0;if(u(i.body))return e;if(!c(e,f,i)||f>=a)return e;var l=s({},n,{options:s({},i,{attemptNumber:f+1})});return setTimeout(function(){return n.channels.request.publish(l)},r(f)),null}}};a.shouldRetry=i},{"../util/node-shouldRetry":21,"object-assign":34}],19:[function(e,t,r){"use strict";var n=e("same-origin"),o=e("parse-headers"),s=function(){},i=window,u=i.XMLHttpRequest||s,a="withCredentials"in new u,c=a?u:i.XDomainRequest,f="xhr";t.exports=function(e,t){function r(){x=!0,g.abort()}function s(t){O=!0,g.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+y.url:"Connection timed out on request to "+y.url);r.code=t,e.channels.error.publish(r)}function a(){C&&(l(),m.socket=setTimeout(function(){return s("ESOCKETTIMEDOUT")},C.socket))}function l(){(x||g.readyState>=2&&m.connect)&&clearTimeout(m.connect),m.socket&&clearTimeout(m.socket)}function p(){if(!j){l(),j=!0,g=null;var e=new Error("Network error while attempting to reach "+y.url);e.isNetworkError=!0,e.request=y,t(e)}}function d(){var e=g.status,t=g.statusText;if(v&&void 0===e)e=200;else{if(e>12e3&&e<12156)return p();e=1223===g.status?204:g.status,t=1223===g.status?"No Content":t}return{body:g.response||g.responseText,url:y.url,method:y.method,headers:v?{}:o(g.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function h(){if(!(x||j||O)){if(0===g.status)return void p(new Error("Unknown XHR error"));l(),j=!0,t(null,d())}}var y=e.options,b=!n(i.location.href,y.url),m={},g=b?new c:new u,v=i.XDomainRequest&&g instanceof i.XDomainRequest,w=y.headers,x=!1,j=!1,O=!1;g.onerror=p,g.ontimeout=p,g.onabort=function(){x=!0},g.onprogress=function(){};var q=v?"onload":"onreadystatechange";if(g[q]=function(){a(),x||4!==g.readyState&&!v||0!==g.status&&h()},g.open(y.method,y.url,!0),g.withCredentials=!!y.withCredentials,w&&g.setRequestHeader)for(var E in w)w.hasOwnProperty(E)&&g.setRequestHeader(E,w[E]);else if(w&&v)throw new Error("Headers cannot be set on an XDomainRequest object");y.rawBody&&(g.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:y,adapter:f,request:g,context:e}),g.send(y.body||null);var C=y.timeout;return C&&(m.connect=setTimeout(function(){return s("ETIMEDOUT")},C.connect)),{abort:r}}},{"parse-headers":35,"same-origin":39}],20:[function(e,t,r){"use strict";t.exports=e("./node-request")},{"./node-request":19}],21:[function(e,t,r){"use strict";t.exports=function(e){return e.isNetworkError||!1}},{}],22:[function(e,t,r){(function(e){"use strict";"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(e,t,r){"use strict";t.exports=function(e){var t=function(t,r){for(var n=arguments.length,o=Array(n>2?n-2:0),s=2;s<n;s++)o[s-2]=arguments[s];return e[t].reduce(function(e,t){return t.apply(void 0,[e].concat(o))},r)};return t}},{}],24:[function(e,t,r){"use strict";t.exports=Error.captureStackTrace||function(e){var t=new Error;Object.defineProperty(e,"stack",{configurable:!0,get:function(){var e=t.stack;return Object.defineProperty(this,"stack",{value:e}),e}})}},{}],25:[function(e,t,r){"use strict";function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}var o=e("capture-stack-trace");t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected className to be a string");if(/[^0-9a-zA-Z_$]/.test(e))throw new Error("className contains invalid characters");t=t||function(e){this.message=e};var r=function(){Object.defineProperty(this,"name",{configurable:!0,value:e,writable:!0}),o(this,this.constructor),t.apply(this,arguments)};return n(r,Error),r}},{"capture-stack-trace":24}],26:[function(e,t,r){(function(n){function o(){return!("undefined"==typeof window||!window||"undefined"==typeof window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function s(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(s=o))}),e.splice(s,0,n)}}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function a(){try{return r.storage.debug}catch(e){}if("undefined"!=typeof n&&"env"in n)return n.env.DEBUG}function c(){try{return window.localStorage}catch(e){}}r=t.exports=e("./debug"),r.log=i,r.formatArgs=s,r.save=u,r.load=a,r.useColors=o,r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(a())}).call(this,e("_process"))},{"./debug":27,_process:36}],27:[function(e,t,r){function n(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}function o(e){function t(){if(t.enabled){var e=t,n=+new Date,o=n-(c||n);e.diff=o,e.prev=c,e.curr=n,c=n;for(var s=new Array(arguments.length),i=0;i<s.length;i++)s[i]=arguments[i];s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;u++;var o=r.formatters[n];if("function"==typeof o){var i=s[u];t=o.call(e,i),s.splice(u,1),u--}return t}),r.formatArgs.call(e,s);var a=t.log||r.log||console.log.bind(console);a.apply(e,s)}}return t.namespace=e,t.enabled=r.enabled(e),t.useColors=r.useColors(),t.color=n(e),"function"==typeof r.init&&r.init(t),t}function s(e){r.save(e),r.names=[],r.skips=[];for(var t=(e||"").split(/[\s,]+/),n=t.length,o=0;o<n;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function i(){r.enable("")}function u(e){var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=o.debug=o.default=o,r.coerce=a,r.disable=i,r.enable=s,r.enabled=u,r.humanize=e("ms"),r.names=[],r.skips=[],r.formatters={};var c},{ms:32}],28:[function(e,t,r){function n(e,t,r){if(!u(t))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this),"[object Array]"===a.call(e)?o(e,t,r):"string"==typeof e?s(e,t,r):i(e,t,r)}function o(e,t,r){for(var n=0,o=e.length;n<o;n++)c.call(e,n)&&t.call(r,e[n],n,e)}function s(e,t,r){for(var n=0,o=e.length;n<o;n++)t.call(r,e.charAt(n),n,e)}function i(e,t,r){for(var n in e)c.call(e,n)&&t.call(r,e[n],n,e)}var u=e("is-function");t.exports=n;var a=Object.prototype.toString,c=Object.prototype.hasOwnProperty},{"is-function":29}],29:[function(e,t,r){function n(e){var t=o.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=n;var o=Object.prototype.toString},{}],30:[function(e,t,r){"use strict";function n(e){return o(e)===!0&&"[object Object]"===Object.prototype.toString.call(e)}var o=e("isobject");t.exports=function(e){var t,r;return n(e)!==!1&&(t=e.constructor,"function"==typeof t&&(r=t.prototype,n(r)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1))}},{isobject:31}],31:[function(e,t,r){"use strict";t.exports=function(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}},{}],32:[function(e,t,r){function n(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*l;case"days":case"day":case"d":return r*f;case"hours":case"hour":case"hrs":case"hr":case"h":return r*c;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function o(e){return e>=f?Math.round(e/f)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function s(e){return i(e,f,"day")||i(e,c,"hour")||i(e,a,"minute")||i(e,u,"second")||e+" ms"}function i(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var u=1e3,a=60*u,c=60*a,f=24*c,l=365.25*f;t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return n(e);if("number"===r&&isNaN(e)===!1)return t.long?s(e):o(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],33:[function(e,t,r){t.exports=function(){function e(e){return r.push(e),function(){var t=r.indexOf(e);t>-1&&r.splice(t,1)}}function t(){for(var e=0;e<r.length;e++)r[e].apply(null,arguments)}var r=[];return{subscribe:e,publish:t}}},{}],34:[function(e,t,r){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;t.exports=o()?Object.assign:function(e,t){for(var r,o,a=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(a[f]=r[f]);if(s){o=s(r);for(var l=0;l<o.length;l++)u.call(r,o[l])&&(a[o[l]]=r[o[l]])}}return a}},{}],35:[function(e,t,r){var n=e("trim"),o=e("for-each"),s=function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.exports=function(e){if(!e)return{};var t={};return o(n(e).split("\n"),function(e){var r=e.indexOf(":"),o=n(e.slice(0,r)).toLowerCase(),i=n(e.slice(r+1));"undefined"==typeof t[o]?t[o]=i:s(t[o])?t[o].push(i):t[o]=[t[o],i]}),t}},{"for-each":28,trim:41}],36:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function u(){b&&h&&(b=!1,h.length?y=h.concat(y):m=-1,y.length&&a())}function a(){if(!b){var e=s(u);b=!0;for(var t=y.length;t;){for(h=y,y=[];++m<t;)h&&h[m].run();m=-1,t=y.length}h=null,b=!1,i(e)}}function c(e,t){this.fun=e,this.array=t}function f(){}var l,p,d=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var h,y=[],b=!1,m=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];y.push(new c(e,t)),1!==y.length||b||s(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=f,d.addListener=f,d.once=f,d.off=f,d.removeListener=f,d.removeAllListeners=f,d.emit=f,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],37:[function(e,t,r){"use strict";function n(e){for(var t,r=/([^=?&]+)=?([^&]*)/g,n={};t=r.exec(e);n[decodeURIComponent(t[1])]=decodeURIComponent(t[2]));return n}function o(e,t){t=t||"";var r=[];"string"!=typeof t&&(t="?");for(var n in e)s.call(e,n)&&r.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return r.length?t+r.join("&"):""}var s=Object.prototype.hasOwnProperty;r.stringify=o,r.parse=n},{}],38:[function(e,t,r){"use strict";t.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},{}],39:[function(e,t,r){"use strict";var n=e("url");t.exports=function(e,t,r){if(e===t)return!0;var o=n.parse(e,!1,!0),s=n.parse(t,!1,!0),i=0|o.port||("https"===o.protocol?443:80),u=0|s.port||("https"===s.protocol?443:80),a={proto:o.protocol===s.protocol,hostname:o.hostname===s.hostname,port:i===u};return a.proto&&a.hostname&&(a.port||r)}},{url:40}],40:[function(e,t,r){"use strict";var n=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;t.exports={regex:n,parse:function(e){var t=n.exec(e);return t?{protocol:(t[1]||"").toLowerCase()||void 0,hostname:(t[5]||"").toLowerCase()||void 0,port:t[6]||void 0}:{}}}},{}],41:[function(e,t,r){function n(e){return e.replace(/^\s*|\s*$/g,"")}r=t.exports=n,r.left=function(e){return e.replace(/^\s*/,"")},r.right=function(e){return e.replace(/\s*$/,"")}},{}],42:[function(e,t,r){"use strict";function n(e){var t=l.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function o(e,t){for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],s=!1,i=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),i++):i&&(0===n&&(s=!0),r.splice(n,1),i--);return s&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}function s(e,t,r){if(!(this instanceof s))return new s(e,t,r);var i,u,l,d,h,y,b=p.slice(),m=typeof t,g=this,v=0;for("object"!==m&&"string"!==m&&(r=t,t=null),r&&"function"!=typeof r&&(r=f.parse),t=c(t),u=n(e||""),i=!u.protocol&&!u.slashes,g.slashes=u.slashes||i&&t.slashes,g.protocol=u.protocol||t.protocol||"",e=u.rest,u.slashes||(b[2]=[/(.*)/,"pathname"]);v<b.length;v++)d=b[v],l=d[0],y=d[1],l!==l?g[y]=e:"string"==typeof l?~(h=e.indexOf(l))&&("number"==typeof d[2]?(g[y]=e.slice(0,h),e=e.slice(h+d[2])):(g[y]=e.slice(h),e=e.slice(0,h))):(h=l.exec(e))&&(g[y]=h[1],e=e.slice(0,h.index)),g[y]=g[y]||(i&&d[3]?t[y]||"":""),d[4]&&(g[y]=g[y].toLowerCase());r&&(g.query=r(g.query)),i&&t.slashes&&"/"!==g.pathname.charAt(0)&&(""!==g.pathname||""!==t.pathname)&&(g.pathname=o(g.pathname,t.pathname)),a(g.port,g.protocol)||(g.host=g.hostname,g.port=""),g.username=g.password="",g.auth&&(d=g.auth.split(":"),g.username=d[0]||"",g.password=d[1]||""),g.origin=g.protocol&&g.host&&"file:"!==g.protocol?g.protocol+"//"+g.host:"null",g.href=g.toString()}function i(e,t,r){var n=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||f.parse)(t)),n[e]=t;break;case"port":n[e]=t,a(t,n.protocol)?t&&(n.host=n.hostname+":"+t):(n.host=n.hostname,n[e]="");break;case"hostname":n[e]=t,n.port&&(t+=":"+n.port),n.host=t;break;case"host":n[e]=t,/:\d+$/.test(t)?(t=t.split(":"),n.port=t.pop(),n.hostname=t.join(":")):(n.hostname=t,n.port="");break;case"protocol":n.protocol=t.toLowerCase(),n.slashes=!r;break;case"pathname":n.pathname=t.length&&"/"!==t.charAt(0)?"/"+t:t;break;default:n[e]=t}for(var o=0;o<p.length;o++){var s=p[o];s[4]&&(n[s[1]]=n[s[1]].toLowerCase())}return n.origin=n.protocol&&n.host&&"file:"!==n.protocol?n.protocol+"//"+n.host:"null",n.href=n.toString(),n}function u(e){e&&"function"==typeof e||(e=f.stringify);var t,r=this,n=r.protocol;n&&":"!==n.charAt(n.length-1)&&(n+=":");var o=n+(r.slashes?"//":"");return r.username&&(o+=r.username,r.password&&(o+=":"+r.password),o+="@"),o+=r.host+r.pathname,t="object"==typeof r.query?e(r.query):r.query,t&&(o+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(o+=r.hash),o}var a=e("requires-port"),c=e("./lolcation"),f=e("querystringify"),l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,p=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]];s.prototype={set:i,toString:u},s.extractProtocol=n,s.location=c,s.qs=f,t.exports=s},{"./lolcation":43,querystringify:37,"requires-port":38}],43:[function(e,t,r){(function(r){"use strict";var n,o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s={hash:1,query:1};t.exports=function(t){t=t||r.location||{},n=n||e("./");var i,u={},a=typeof t;if("blob:"===t.protocol)u=new n(unescape(t.pathname),{});else if("string"===a){u=new n(t,{});for(i in s)delete u[i]}else if("object"===a){for(i in t)i in s||(u[i]=t[i]);void 0===u.slashes&&(u.slashes=o.test(t.href))}return u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./":42}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.getIt=e()}}(function(){return function e(t,r,n){function o(i,u){if(!r[i]){if(!t[i]){var a="function"==typeof require&&require;if(!u&&a)return a(i,!0);if(s)return s(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[i]={exports:{}};t[i][0].call(f.exports,function(e){var r=t[i][1][e];return o(r?r:e)},f,f.exports,e,t,r,n)}return r[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}({1:[function(e,t,r){"use strict";var n=e("./index");n.middleware=e("./middleware"),t.exports=n},{"./index":2,"./middleware":11}],2:[function(e,t,r){"use strict";var n=e("nano-pubsub"),o=e("./util/middlewareReducer"),s=e("./middleware/defaultOptionsProcessor"),i=e("./request"),u=["request","response","progress","error","abort"],a=["processOptions","onRequest","onResponse","onError","onReturn","onHeaders"];t.exports=function e(){function t(e){function t(e,t,n){var o=e,i=t;if(!o)try{i=s("onResponse",t,n)}catch(e){i=null,o=e}o=o&&s("onError",o,n),o?r.error.publish(o):i&&r.response.publish(i)}var r=u.reduce(function(e,t){return e[t]=n(),e},{}),s=o(f),a=s("processOptions",e),c={options:a,channels:r,applyMiddleware:s},l=null,p=r.request.subscribe(function(e){l=i(e,function(r,n){return t(r,n,e)})});r.abort.subscribe(function(){p(),l&&l.abort()});var d=s("onReturn",r,c);return d===r&&r.request.publish(c),d}var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],c=[],f=a.reduce(function(e,t){return e[t]=e[t]||[],e},{processOptions:[s]});return t.use=function(e){if(!e)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&f.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");a.forEach(function(t){e[t]&&f[t].push(e[t])}),c.push(e)},t.clone=function(){return e(c)},r.forEach(t.use),t}},{"./middleware/defaultOptionsProcessor":8,"./request":20,"./util/middlewareReducer":23,"nano-pubsub":33}],3:[function(e,t,r){"use strict";var n=e("object-assign"),o=/^\//,s=/\/$/;t.exports=function(e){var t=e.replace(s,"");return{processOptions:function(e){if(/^https?:\/\//i.test(e.url))return e;var r=[t,e.url.replace(o,"")].join("/");return n({},e,{url:r})}}}},{"object-assign":34}],4:[function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},{}],5:[function(e,t,r){"use strict";function n(e){var t=this;if("function"!=typeof e)throw new TypeError("executor must be a function.");var r=null;this.promise=new Promise(function(e){r=e}),e(function(e){t.reason||(t.reason=new o(e),r(t.reason))})}var o=e("./Cancel");n.source=function(){var e=void 0,t=new n(function(t){e=t});return{token:t,cancel:e}},t.exports=n},{"./Cancel":4}],6:[function(e,t,r){"use strict";t.exports=function(e){return!(!e||!e.__CANCEL__)}},{}],7:[function(e,t,r){"use strict";function n(e){var t=(e.headers["content-type"]||"").toLowerCase(),r=t.indexOf("application/json")!==-1;return r?o(e.body):e.body}function o(e){try{var t="string"==typeof e?JSON.parse(e):e;return JSON.stringify(t,null,2)}catch(t){return e}}var s=e("debug");t.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.verbose,r=e.namespace||"get-it",o=s(r),i=e.log||o,u=i===o&&!s.enabled(r),a=0;return{processOptions:function(e){return e.requestId=e.requestId||++a,e},onRequest:function(e){if(u||!e)return e;var r=e.options;return i("[%s] HTTP %s %s",r.requestId,r.method,r.url),t&&r.body&&"string"==typeof r.body&&i("[%s] Request body: %s",r.requestId,r.body),t&&r.headers&&i("[%s] Request headers: %s",r.requestId,JSON.stringify(r.headers,null,2)),e},onResponse:function(e,r){if(u||!e)return e;var o=r.options.requestId;return i("[%s] Response code: %s %s",o,e.statusCode,e.statusMessage),t&&e.body&&i("[%s] Response body: %s",o,n(e)),e},onError:function(e,t){return i("[%s] ERROR: %s",t.options.requestId,e.message),e}}}},{debug:26}],8:[function(e,t,r){"use strict";function n(e){if(e===!1||0===e)return!1;if(e.connect||e.socket)return e;var t=Number(e);return isNaN(t)?n(u.timeout):{connect:t,socket:t}}function o(e){var t={};for(var r in e)void 0!==e[r]&&(t[r]=e[r]);return t}var s=e("object-assign"),i=e("url-parse"),u={timeout:12e4};t.exports=function(e){var t="string"==typeof e?s({url:e},u):s({},u,e),r=i(t.url,{},!0);return t.timeout=n(t.timeout),t.query&&(r.query=s({},r.query,o(t.query))),t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t.url=r.toString(),t}},{"object-assign":34,"url-parse":42}],9:[function(e,t,r){"use strict";var n=e("object-assign");t.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{processOptions:function(r){var o=r.headers||{};return r.headers=t.override?n({},o,e):n({},e,o),r}}}},{"object-assign":34}],10:[function(e,t,r){"use strict";var n=e("create-error-class"),o=n("HttpError",function(e){this.message=(e.method+"-request to "+e.url+" resulted in HTTP "+e.statusCode+" "+e.statusMessage).trim(),this.response=e});t.exports=function(){return{onResponse:function(e){var t=e.statusCode>=400;if(!t)return e;throw new o(e)}}}},{"create-error-class":25}],11:[function(e,t,r){"use strict";r.base=e("./base"),r.debug=e("./debug"),r.jsonRequest=e("./jsonRequest"),r.jsonResponse=e("./jsonResponse"),r.httpErrors=e("./httpErrors"),r.retry=e("./retry"),r.promise=e("./promise"),r.observable=e("./observable"),r.progress=e("./progress"),r.headers=e("./headers")},{"./base":3,"./debug":7,"./headers":9,"./httpErrors":10,"./jsonRequest":12,"./jsonResponse":13,"./observable":14,"./progress":16,"./promise":17,"./retry":18}],12:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("object-assign"),s=e("is-plain-object"),i=["boolean","string","number"],u=function(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)};t.exports=function(){return{processOptions:function(e){var t=e.body,r=t&&!u(t)&&(i.indexOf("undefined"==typeof t?"undefined":n(t))!==-1||Array.isArray(t)||s(t)||t&&"function"==typeof t.toJSON);return r?o({},e,{body:JSON.stringify(e.body),headers:o({},e.headers,{"Content-Type":"application/json"})}):e}}}},{"is-plain-object":30,"object-assign":34}],13:[function(e,t,r){"use strict";function n(e){try{return JSON.parse(e)}catch(e){throw e.message="Failed to parsed response body as JSON: "+e.message,e}}var o=e("object-assign");t.exports=function(){return{onResponse:function(e){var t=e.headers["content-type"];return e.body&&t&&t.indexOf("application/json")!==-1?o({},e,{body:n(e.body)}):e},processOptions:function(e){return o({},e,{headers:o({Accept:"application/json"},e.headers)})}}}},{"object-assign":34}],14:[function(e,t,r){"use strict";var n=e("../util/global"),o=e("object-assign");t.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.implementation||n.Observable;if(!t)throw new Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(e,r){return new t(function(t){return e.error.subscribe(function(e){return t.error(e)}),e.progress.subscribe(function(e){return t.next(o({type:"progress"},e))}),e.response.subscribe(function(e){t.next(o({type:"response"},e)),t.complete()}),e.request.publish(r),function(){return e.abort.publish()}})}}}},{"../util/global":22,"object-assign":34}],15:[function(e,t,r){"use strict";t.exports=function(){return{onRequest:function(e){function t(e){return function(t){var r=t.lengthComputable?t.loaded/t.total*100:-1;n.channels.progress.publish({stage:e,percent:r,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}if("xhr"===e.adapter){var r=e.request,n=e.context;"upload"in r&&"onprogress"in r.upload&&(r.upload.onprogress=t("upload")),"onprogress"in r&&(r.onprogress=t("download"))}}}}},{}],16:[function(e,t,r){"use strict";t.exports=e("./node-progress")},{"./node-progress":15}],17:[function(e,t,r){"use strict";var n=e("../util/global"),o=e("./cancel/Cancel"),s=e("./cancel/CancelToken"),i=e("./cancel/isCancel"),u=function(){var e=n.Promise;if(!e)throw new Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:function(t,r){return new e(function(e,n){var o=r.options.cancelToken;o&&o.promise.then(function(e){t.abort.publish(e),n(e)}),t.error.subscribe(n),t.response.subscribe(e),setTimeout(function(){return t.request.publish(r)},0)})}}};u.Cancel=o,u.CancelToken=s,u.isCancel=i,t.exports=u},{"../util/global":22,"./cancel/Cancel":4,"./cancel/CancelToken":5,"./cancel/isCancel":6}],18:[function(e,t,r){"use strict";function n(e){return 100*Math.pow(2,e)+100*Math.random()}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=e("object-assign"),i=e("../util/node-shouldRetry"),u=function(e){return null!==e&&"object"===("undefined"==typeof e?"undefined":o(e))&&"function"==typeof e.pipe},a=t.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxRetries||5,r=e.retryDelay||n,o=e.shouldRetry||i;return{onError:function(e,n){var i=n.options,a=i.maxRetries||t,c=i.shouldRetry||o,f=i.attemptNumber||0;if(u(i.body))return e;if(!c(e,f,i)||f>=a)return e;var l=s({},n,{options:s({},i,{attemptNumber:f+1})});return setTimeout(function(){return n.channels.request.publish(l)},r(f)),null}}};a.shouldRetry=i},{"../util/node-shouldRetry":21,"object-assign":34}],19:[function(e,t,r){"use strict";var n=e("same-origin"),o=e("parse-headers"),s=function(){},i=window,u=i.XMLHttpRequest||s,a="withCredentials"in new u,c=a?u:i.XDomainRequest,f="xhr";t.exports=function(e,t){function r(){x=!0,g&&g.abort()}function s(t){O=!0,g.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+y.url:"Connection timed out on request to "+y.url);r.code=t,e.channels.error.publish(r)}function a(){C&&(l(),m.socket=setTimeout(function(){return s("ESOCKETTIMEDOUT")},C.socket))}function l(){(x||g.readyState>=2&&m.connect)&&clearTimeout(m.connect),m.socket&&clearTimeout(m.socket)}function p(){if(!j){l(),j=!0,g=null;var e=new Error("Network error while attempting to reach "+y.url);e.isNetworkError=!0,e.request=y,t(e)}}function d(){var e=g.status,t=g.statusText;if(v&&void 0===e)e=200;else{if(e>12e3&&e<12156)return p();e=1223===g.status?204:g.status,t=1223===g.status?"No Content":t}return{body:g.response||g.responseText,url:y.url,method:y.method,headers:v?{}:o(g.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function h(){if(!(x||j||O)){if(0===g.status)return void p(new Error("Unknown XHR error"));l(),j=!0,t(null,d())}}var y=e.options,b=!n(i.location.href,y.url),m={},g=b?new c:new u,v=i.XDomainRequest&&g instanceof i.XDomainRequest,w=y.headers,x=!1,j=!1,O=!1;g.onerror=p,g.ontimeout=p,g.onabort=function(){x=!0},g.onprogress=function(){};var q=v?"onload":"onreadystatechange";if(g[q]=function(){a(),x||4!==g.readyState&&!v||0!==g.status&&h()},g.open(y.method,y.url,!0),g.withCredentials=!!y.withCredentials,w&&g.setRequestHeader)for(var E in w)w.hasOwnProperty(E)&&g.setRequestHeader(E,w[E]);else if(w&&v)throw new Error("Headers cannot be set on an XDomainRequest object");y.rawBody&&(g.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:y,adapter:f,request:g,context:e}),g.send(y.body||null);var C=y.timeout;return C&&(m.connect=setTimeout(function(){return s("ETIMEDOUT")},C.connect)),{abort:r}}},{"parse-headers":35,"same-origin":39}],20:[function(e,t,r){"use strict";t.exports=e("./node-request")},{"./node-request":19}],21:[function(e,t,r){"use strict";t.exports=function(e){return e.isNetworkError||!1}},{}],22:[function(e,t,r){(function(e){"use strict";"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(e,t,r){"use strict";t.exports=function(e){var t=function(t,r){for(var n=arguments.length,o=Array(n>2?n-2:0),s=2;s<n;s++)o[s-2]=arguments[s];return e[t].reduce(function(e,t){return t.apply(void 0,[e].concat(o))},r)};return t}},{}],24:[function(e,t,r){"use strict";t.exports=Error.captureStackTrace||function(e){var t=new Error;Object.defineProperty(e,"stack",{configurable:!0,get:function(){var e=t.stack;return Object.defineProperty(this,"stack",{value:e}),e}})}},{}],25:[function(e,t,r){"use strict";function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}var o=e("capture-stack-trace");t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected className to be a string");if(/[^0-9a-zA-Z_$]/.test(e))throw new Error("className contains invalid characters");t=t||function(e){this.message=e};var r=function(){Object.defineProperty(this,"name",{configurable:!0,value:e,writable:!0}),o(this,this.constructor),t.apply(this,arguments)};return n(r,Error),r}},{"capture-stack-trace":24}],26:[function(e,t,r){(function(n){function o(){return!("undefined"==typeof window||!window||"undefined"==typeof window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function s(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(s=o))}),e.splice(s,0,n)}}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function a(){try{return r.storage.debug}catch(e){}if("undefined"!=typeof n&&"env"in n)return n.env.DEBUG}function c(){try{return window.localStorage}catch(e){}}r=t.exports=e("./debug"),r.log=i,r.formatArgs=s,r.save=u,r.load=a,r.useColors=o,r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(a())}).call(this,e("_process"))},{"./debug":27,_process:36}],27:[function(e,t,r){function n(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}function o(e){function t(){if(t.enabled){var e=t,n=+new Date,o=n-(c||n);e.diff=o,e.prev=c,e.curr=n,c=n;for(var s=new Array(arguments.length),i=0;i<s.length;i++)s[i]=arguments[i];s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;u++;var o=r.formatters[n];if("function"==typeof o){var i=s[u];t=o.call(e,i),s.splice(u,1),u--}return t}),r.formatArgs.call(e,s);var a=t.log||r.log||console.log.bind(console);a.apply(e,s)}}return t.namespace=e,t.enabled=r.enabled(e),t.useColors=r.useColors(),t.color=n(e),"function"==typeof r.init&&r.init(t),t}function s(e){r.save(e),r.names=[],r.skips=[];for(var t=(e||"").split(/[\s,]+/),n=t.length,o=0;o<n;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function i(){r.enable("")}function u(e){var t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=o.debug=o.default=o,r.coerce=a,r.disable=i,r.enable=s,r.enabled=u,r.humanize=e("ms"),r.names=[],r.skips=[],r.formatters={};var c},{ms:32}],28:[function(e,t,r){function n(e,t,r){if(!u(t))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this),"[object Array]"===a.call(e)?o(e,t,r):"string"==typeof e?s(e,t,r):i(e,t,r)}function o(e,t,r){for(var n=0,o=e.length;n<o;n++)c.call(e,n)&&t.call(r,e[n],n,e)}function s(e,t,r){for(var n=0,o=e.length;n<o;n++)t.call(r,e.charAt(n),n,e)}function i(e,t,r){for(var n in e)c.call(e,n)&&t.call(r,e[n],n,e)}var u=e("is-function");t.exports=n;var a=Object.prototype.toString,c=Object.prototype.hasOwnProperty},{"is-function":29}],29:[function(e,t,r){function n(e){var t=o.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=n;var o=Object.prototype.toString},{}],30:[function(e,t,r){"use strict";function n(e){return o(e)===!0&&"[object Object]"===Object.prototype.toString.call(e)}var o=e("isobject");t.exports=function(e){var t,r;return n(e)!==!1&&(t=e.constructor,"function"==typeof t&&(r=t.prototype,n(r)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1))}},{isobject:31}],31:[function(e,t,r){"use strict";t.exports=function(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}},{}],32:[function(e,t,r){function n(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*l;case"days":case"day":case"d":return r*f;case"hours":case"hour":case"hrs":case"hr":case"h":return r*c;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function o(e){return e>=f?Math.round(e/f)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function s(e){return i(e,f,"day")||i(e,c,"hour")||i(e,a,"minute")||i(e,u,"second")||e+" ms"}function i(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var u=1e3,a=60*u,c=60*a,f=24*c,l=365.25*f;t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return n(e);if("number"===r&&isNaN(e)===!1)return t.long?s(e):o(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],33:[function(e,t,r){t.exports=function(){function e(e){return r.push(e),function(){var t=r.indexOf(e);t>-1&&r.splice(t,1)}}function t(){for(var e=0;e<r.length;e++)r[e].apply(null,arguments)}var r=[];return{subscribe:e,publish:t}}},{}],34:[function(e,t,r){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;t.exports=o()?Object.assign:function(e,t){for(var r,o,a=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(a[f]=r[f]);if(s){o=s(r);for(var l=0;l<o.length;l++)u.call(r,o[l])&&(a[o[l]]=r[o[l]])}}return a}},{}],35:[function(e,t,r){var n=e("trim"),o=e("for-each"),s=function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.exports=function(e){if(!e)return{};var t={};return o(n(e).split("\n"),function(e){var r=e.indexOf(":"),o=n(e.slice(0,r)).toLowerCase(),i=n(e.slice(r+1));"undefined"==typeof t[o]?t[o]=i:s(t[o])?t[o].push(i):t[o]=[t[o],i]}),t}},{"for-each":28,trim:41}],36:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function u(){b&&h&&(b=!1,h.length?y=h.concat(y):m=-1,y.length&&a())}function a(){if(!b){var e=s(u);b=!0;for(var t=y.length;t;){for(h=y,y=[];++m<t;)h&&h[m].run();m=-1,t=y.length}h=null,b=!1,i(e)}}function c(e,t){this.fun=e,this.array=t}function f(){}var l,p,d=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var h,y=[],b=!1,m=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];y.push(new c(e,t)),1!==y.length||b||s(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=f,d.addListener=f,d.once=f,d.off=f,d.removeListener=f,d.removeAllListeners=f,d.emit=f,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],37:[function(e,t,r){"use strict";function n(e){for(var t,r=/([^=?&]+)=?([^&]*)/g,n={};t=r.exec(e);n[decodeURIComponent(t[1])]=decodeURIComponent(t[2]));return n}function o(e,t){t=t||"";var r=[];"string"!=typeof t&&(t="?");for(var n in e)s.call(e,n)&&r.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return r.length?t+r.join("&"):""}var s=Object.prototype.hasOwnProperty;r.stringify=o,r.parse=n},{}],38:[function(e,t,r){"use strict";t.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},{}],39:[function(e,t,r){"use strict";var n=e("url");t.exports=function(e,t,r){if(e===t)return!0;var o=n.parse(e,!1,!0),s=n.parse(t,!1,!0),i=0|o.port||("https"===o.protocol?443:80),u=0|s.port||("https"===s.protocol?443:80),a={proto:o.protocol===s.protocol,hostname:o.hostname===s.hostname,port:i===u};return a.proto&&a.hostname&&(a.port||r)}},{url:40}],40:[function(e,t,r){"use strict";var n=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;t.exports={regex:n,parse:function(e){var t=n.exec(e);return t?{protocol:(t[1]||"").toLowerCase()||void 0,hostname:(t[5]||"").toLowerCase()||void 0,port:t[6]||void 0}:{}}}},{}],41:[function(e,t,r){function n(e){return e.replace(/^\s*|\s*$/g,"")}r=t.exports=n,r.left=function(e){return e.replace(/^\s*/,"")},r.right=function(e){return e.replace(/\s*$/,"")}},{}],42:[function(e,t,r){"use strict";function n(e){var t=l.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function o(e,t){for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],s=!1,i=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),i++):i&&(0===n&&(s=!0),r.splice(n,1),i--);return s&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}function s(e,t,r){if(!(this instanceof s))return new s(e,t,r);var i,u,l,d,h,y,b=p.slice(),m=typeof t,g=this,v=0;for("object"!==m&&"string"!==m&&(r=t,t=null),r&&"function"!=typeof r&&(r=f.parse),t=c(t),u=n(e||""),i=!u.protocol&&!u.slashes,g.slashes=u.slashes||i&&t.slashes,g.protocol=u.protocol||t.protocol||"",e=u.rest,u.slashes||(b[2]=[/(.*)/,"pathname"]);v<b.length;v++)d=b[v],l=d[0],y=d[1],l!==l?g[y]=e:"string"==typeof l?~(h=e.indexOf(l))&&("number"==typeof d[2]?(g[y]=e.slice(0,h),e=e.slice(h+d[2])):(g[y]=e.slice(h),e=e.slice(0,h))):(h=l.exec(e))&&(g[y]=h[1],e=e.slice(0,h.index)),g[y]=g[y]||(i&&d[3]?t[y]||"":""),d[4]&&(g[y]=g[y].toLowerCase());r&&(g.query=r(g.query)),i&&t.slashes&&"/"!==g.pathname.charAt(0)&&(""!==g.pathname||""!==t.pathname)&&(g.pathname=o(g.pathname,t.pathname)),a(g.port,g.protocol)||(g.host=g.hostname,g.port=""),g.username=g.password="",g.auth&&(d=g.auth.split(":"),g.username=d[0]||"",g.password=d[1]||""),g.origin=g.protocol&&g.host&&"file:"!==g.protocol?g.protocol+"//"+g.host:"null",g.href=g.toString()}function i(e,t,r){var n=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||f.parse)(t)),n[e]=t;break;case"port":n[e]=t,a(t,n.protocol)?t&&(n.host=n.hostname+":"+t):(n.host=n.hostname,n[e]="");break;case"hostname":n[e]=t,n.port&&(t+=":"+n.port),n.host=t;break;case"host":n[e]=t,/:\d+$/.test(t)?(t=t.split(":"),n.port=t.pop(),n.hostname=t.join(":")):(n.hostname=t,n.port="");break;case"protocol":n.protocol=t.toLowerCase(),n.slashes=!r;break;case"pathname":n.pathname=t.length&&"/"!==t.charAt(0)?"/"+t:t;break;default:n[e]=t}for(var o=0;o<p.length;o++){var s=p[o];s[4]&&(n[s[1]]=n[s[1]].toLowerCase())}return n.origin=n.protocol&&n.host&&"file:"!==n.protocol?n.protocol+"//"+n.host:"null",n.href=n.toString(),n}function u(e){e&&"function"==typeof e||(e=f.stringify);var t,r=this,n=r.protocol;n&&":"!==n.charAt(n.length-1)&&(n+=":");var o=n+(r.slashes?"//":"");return r.username&&(o+=r.username,r.password&&(o+=":"+r.password),o+="@"),o+=r.host+r.pathname,t="object"==typeof r.query?e(r.query):r.query,t&&(o+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(o+=r.hash),o}var a=e("requires-port"),c=e("./lolcation"),f=e("querystringify"),l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,p=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]];s.prototype={set:i,toString:u},s.extractProtocol=n,s.location=c,s.qs=f,t.exports=s},{"./lolcation":43,querystringify:37,"requires-port":38}],43:[function(e,t,r){(function(r){"use strict";var n,o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s={hash:1,query:1};t.exports=function(t){t=t||r.location||{},n=n||e("./");var i,u={},a=typeof t;if("blob:"===t.protocol)u=new n(unescape(t.pathname),{});else if("string"===a){u=new n(t,{});for(i in s)delete u[i]}else if("object"===a){for(i in t)i in s||(u[i]=t[i]);void 0===u.slashes&&(u.slashes=o.test(t.href))}return u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./":42}]},{},[1])(1)});

@@ -7,3 +7,3 @@ (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.getIt = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"object-assign":9,"url-parse":16}],3:[function(require,module,exports){
"use strict";var sameOrigin=require("same-origin"),parseHeaders=require("parse-headers"),noop=function(){},win=window,XmlHttpRequest=win.XMLHttpRequest||noop,hasXhr2="withCredentials"in new XmlHttpRequest,XDomainRequest=hasXhr2?XmlHttpRequest:win.XDomainRequest,adapter="xhr";module.exports=function(e,t){function r(){w=!0,p.abort()}function n(t){q=!0,p.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+c.url:"Connection timed out on request to "+c.url);r.code=t,e.channels.error.publish(r)}function o(){X&&(s(),l.socket=setTimeout(function(){return n("ESOCKETTIMEDOUT")},X.socket))}function s(){(w||p.readyState>=2&&l.connect)&&clearTimeout(l.connect),l.socket&&clearTimeout(l.socket)}function a(){if(!h){s(),h=!0,p=null;var e=new Error("Network error while attempting to reach "+c.url);e.isNetworkError=!0,e.request=c,t(e)}}function i(){var e=p.status,t=p.statusText;if(f&&void 0===e)e=200;else{if(e>12e3&&e<12156)return a();e=1223===p.status?204:p.status,t=1223===p.status?"No Content":t}return{body:p.response||p.responseText,url:c.url,method:c.method,headers:f?{}:parseHeaders(p.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function u(){if(!(w||h||q)){if(0===p.status)return void a(new Error("Unknown XHR error"));s(),h=!0,t(null,i())}}var c=e.options,d=!sameOrigin(win.location.href,c.url),l={},p=d?new XDomainRequest:new XmlHttpRequest,f=win.XDomainRequest&&p instanceof win.XDomainRequest,m=c.headers,w=!1,h=!1,q=!1;p.onerror=a,p.ontimeout=a,p.onabort=function(){w=!0},p.onprogress=function(){};var R=f?"onload":"onreadystatechange";if(p[R]=function(){o(),w||4!==p.readyState&&!f||0!==p.status&&u()},p.open(c.method,c.url,!0),p.withCredentials=!!c.withCredentials,m&&p.setRequestHeader)for(var T in m)m.hasOwnProperty(T)&&p.setRequestHeader(T,m[T]);else if(m&&f)throw new Error("Headers cannot be set on an XDomainRequest object");c.rawBody&&(p.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:c,adapter:adapter,request:p,context:e}),p.send(c.body||null);var X=c.timeout;return X&&(l.connect=setTimeout(function(){return n("ETIMEDOUT")},X.connect)),{abort:r}};
"use strict";var sameOrigin=require("same-origin"),parseHeaders=require("parse-headers"),noop=function(){},win=window,XmlHttpRequest=win.XMLHttpRequest||noop,hasXhr2="withCredentials"in new XmlHttpRequest,XDomainRequest=hasXhr2?XmlHttpRequest:win.XDomainRequest,adapter="xhr";module.exports=function(e,t){function r(){w=!0,p&&p.abort()}function n(t){q=!0,p.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+c.url:"Connection timed out on request to "+c.url);r.code=t,e.channels.error.publish(r)}function o(){X&&(s(),l.socket=setTimeout(function(){return n("ESOCKETTIMEDOUT")},X.socket))}function s(){(w||p.readyState>=2&&l.connect)&&clearTimeout(l.connect),l.socket&&clearTimeout(l.socket)}function a(){if(!h){s(),h=!0,p=null;var e=new Error("Network error while attempting to reach "+c.url);e.isNetworkError=!0,e.request=c,t(e)}}function i(){var e=p.status,t=p.statusText;if(f&&void 0===e)e=200;else{if(e>12e3&&e<12156)return a();e=1223===p.status?204:p.status,t=1223===p.status?"No Content":t}return{body:p.response||p.responseText,url:c.url,method:c.method,headers:f?{}:parseHeaders(p.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function u(){if(!(w||h||q)){if(0===p.status)return void a(new Error("Unknown XHR error"));s(),h=!0,t(null,i())}}var c=e.options,d=!sameOrigin(win.location.href,c.url),l={},p=d?new XDomainRequest:new XmlHttpRequest,f=win.XDomainRequest&&p instanceof win.XDomainRequest,m=c.headers,w=!1,h=!1,q=!1;p.onerror=a,p.ontimeout=a,p.onabort=function(){w=!0},p.onprogress=function(){};var R=f?"onload":"onreadystatechange";if(p[R]=function(){o(),w||4!==p.readyState&&!f||0!==p.status&&u()},p.open(c.method,c.url,!0),p.withCredentials=!!c.withCredentials,m&&p.setRequestHeader)for(var T in m)m.hasOwnProperty(T)&&p.setRequestHeader(T,m[T]);else if(m&&f)throw new Error("Headers cannot be set on an XDomainRequest object");c.rawBody&&(p.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:c,adapter:adapter,request:p,context:e}),p.send(c.body||null);var X=c.timeout;return X&&(l.connect=setTimeout(function(){return n("ETIMEDOUT")},X.connect)),{abort:r}};
},{"parse-headers":10,"same-origin":13}],4:[function(require,module,exports){

@@ -31,5 +31,5 @@ "use strict";module.exports=require("./node-request");

"use strict";module.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e};
},{}],13:[function(require,module,exports){
"use strict";var url=require("url");module.exports=function(o,r,t){if(o===r)return!0;var p=url.parse(o,!1,!0),e=url.parse(r,!1,!0),s=0|p.port||("https"===p.protocol?443:80),u=0|e.port||("https"===e.protocol?443:80),l={proto:p.protocol===e.protocol,hostname:p.hostname===e.hostname,port:s===u};return l.proto&&l.hostname&&(l.port||t)};
},{"url":14}],14:[function(require,module,exports){

@@ -36,0 +36,0 @@ "use strict";var regex=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;module.exports={regex:regex,parse:function(e){var o=regex.exec(e);return o?{protocol:(o[1]||"").toLowerCase()||void 0,hostname:(o[5]||"").toLowerCase()||void 0,port:o[6]||void 0}:{}}};

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.getIt=e()}}(function(){return function e(t,r,o){function n(i,a){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!a&&u)return u(i,!0);if(s)return s(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[i]={exports:{}};t[i][0].call(f.exports,function(e){var r=t[i][1][e];return n(r?r:e)},f,f.exports,e,t,r,o)}return r[i].exports}for(var s="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(e,t,r){"use strict";var o=e("nano-pubsub"),n=e("./util/middlewareReducer"),s=e("./middleware/defaultOptionsProcessor"),i=e("./request"),a=["request","response","progress","error","abort"],u=["processOptions","onRequest","onResponse","onError","onReturn","onHeaders"];t.exports=function e(){function t(e){function t(e,t,o){var n=e,i=t;if(!n)try{i=s("onResponse",t,o)}catch(e){i=null,n=e}n=n&&s("onError",n,o),n?r.error.publish(n):i&&r.response.publish(i)}var r=a.reduce(function(e,t){return e[t]=o(),e},{}),s=n(f),u=s("processOptions",e),c={options:u,channels:r,applyMiddleware:s},p=null,l=r.request.subscribe(function(e){p=i(e,function(r,o){return t(r,o,e)})});r.abort.subscribe(function(){l(),p&&p.abort()});var h=s("onReturn",r,c);return h===r&&r.request.publish(c),h}var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],c=[],f=u.reduce(function(e,t){return e[t]=e[t]||[],e},{processOptions:[s]});return t.use=function(e){if(!e)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&f.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");u.forEach(function(t){e[t]&&f[t].push(e[t])}),c.push(e)},t.clone=function(){return e(c)},r.forEach(t.use),t}},{"./middleware/defaultOptionsProcessor":2,"./request":4,"./util/middlewareReducer":5,"nano-pubsub":8}],2:[function(e,t,r){"use strict";function o(e){if(e===!1||0===e)return!1;if(e.connect||e.socket)return e;var t=Number(e);return isNaN(t)?o(a.timeout):{connect:t,socket:t}}function n(e){var t={};for(var r in e)void 0!==e[r]&&(t[r]=e[r]);return t}var s=e("object-assign"),i=e("url-parse"),a={timeout:12e4};t.exports=function(e){var t="string"==typeof e?s({url:e},a):s({},a,e),r=i(t.url,{},!0);return t.timeout=o(t.timeout),t.query&&(r.query=s({},r.query,n(t.query))),t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t.url=r.toString(),t}},{"object-assign":9,"url-parse":16}],3:[function(e,t,r){"use strict";var o=e("same-origin"),n=e("parse-headers"),s=function(){},i=window,a=i.XMLHttpRequest||s,u="withCredentials"in new a,c=u?a:i.XDomainRequest,f="xhr";t.exports=function(e,t){function r(){q=!0,v.abort()}function s(t){x=!0,v.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+w.url:"Connection timed out on request to "+w.url);r.code=t,e.channels.error.publish(r)}function u(){R&&(p(),m.socket=setTimeout(function(){return s("ESOCKETTIMEDOUT")},R.socket))}function p(){(q||v.readyState>=2&&m.connect)&&clearTimeout(m.connect),m.socket&&clearTimeout(m.socket)}function l(){if(!O){p(),O=!0,v=null;var e=new Error("Network error while attempting to reach "+w.url);e.isNetworkError=!0,e.request=w,t(e)}}function h(){var e=v.status,t=v.statusText;if(b&&void 0===e)e=200;else{if(e>12e3&&e<12156)return l();e=1223===v.status?204:v.status,t=1223===v.status?"No Content":t}return{body:v.response||v.responseText,url:w.url,method:w.method,headers:b?{}:n(v.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function d(){if(!(q||O||x)){if(0===v.status)return void l(new Error("Unknown XHR error"));p(),O=!0,t(null,h())}}var w=e.options,y=!o(i.location.href,w.url),m={},v=y?new c:new a,b=i.XDomainRequest&&v instanceof i.XDomainRequest,g=w.headers,q=!1,O=!1,x=!1;v.onerror=l,v.ontimeout=l,v.onabort=function(){q=!0},v.onprogress=function(){};var j=b?"onload":"onreadystatechange";if(v[j]=function(){u(),q||4!==v.readyState&&!b||0!==v.status&&d()},v.open(w.method,w.url,!0),v.withCredentials=!!w.withCredentials,g&&v.setRequestHeader)for(var E in g)g.hasOwnProperty(E)&&v.setRequestHeader(E,g[E]);else if(g&&b)throw new Error("Headers cannot be set on an XDomainRequest object");w.rawBody&&(v.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:w,adapter:f,request:v,context:e}),v.send(w.body||null);var R=w.timeout;return R&&(m.connect=setTimeout(function(){return s("ETIMEDOUT")},R.connect)),{abort:r}}},{"parse-headers":10,"same-origin":13}],4:[function(e,t,r){"use strict";t.exports=e("./node-request")},{"./node-request":3}],5:[function(e,t,r){"use strict";t.exports=function(e){var t=function(t,r){for(var o=arguments.length,n=Array(o>2?o-2:0),s=2;s<o;s++)n[s-2]=arguments[s];return e[t].reduce(function(e,t){return t.apply(void 0,[e].concat(n))},r)};return t}},{}],6:[function(e,t,r){function o(e,t,r){if(!a(t))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this),"[object Array]"===u.call(e)?n(e,t,r):"string"==typeof e?s(e,t,r):i(e,t,r)}function n(e,t,r){for(var o=0,n=e.length;o<n;o++)c.call(e,o)&&t.call(r,e[o],o,e)}function s(e,t,r){for(var o=0,n=e.length;o<n;o++)t.call(r,e.charAt(o),o,e)}function i(e,t,r){for(var o in e)c.call(e,o)&&t.call(r,e[o],o,e)}var a=e("is-function");t.exports=o;var u=Object.prototype.toString,c=Object.prototype.hasOwnProperty},{"is-function":7}],7:[function(e,t,r){function o(e){var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=o;var n=Object.prototype.toString},{}],8:[function(e,t,r){t.exports=function(){function e(e){return r.push(e),function(){var t=r.indexOf(e);t>-1&&r.splice(t,1)}}function t(){for(var e=0;e<r.length;e++)r[e].apply(null,arguments)}var r=[];return{subscribe:e,publish:t}}},{}],9:[function(e,t,r){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function n(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==o.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}var s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=n()?Object.assign:function(e,t){for(var r,n,u=o(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(u[f]=r[f]);if(s){n=s(r);for(var p=0;p<n.length;p++)a.call(r,n[p])&&(u[n[p]]=r[n[p]])}}return u}},{}],10:[function(e,t,r){var o=e("trim"),n=e("for-each"),s=function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.exports=function(e){if(!e)return{};var t={};return n(o(e).split("\n"),function(e){var r=e.indexOf(":"),n=o(e.slice(0,r)).toLowerCase(),i=o(e.slice(r+1));"undefined"==typeof t[n]?t[n]=i:s(t[n])?t[n].push(i):t[n]=[t[n],i]}),t}},{"for-each":6,trim:15}],11:[function(e,t,r){"use strict";function o(e){for(var t,r=/([^=?&]+)=?([^&]*)/g,o={};t=r.exec(e);o[decodeURIComponent(t[1])]=decodeURIComponent(t[2]));return o}function n(e,t){t=t||"";var r=[];"string"!=typeof t&&(t="?");for(var o in e)s.call(e,o)&&r.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return r.length?t+r.join("&"):""}var s=Object.prototype.hasOwnProperty;r.stringify=n,r.parse=o},{}],12:[function(e,t,r){"use strict";t.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},{}],13:[function(e,t,r){"use strict";var o=e("url");t.exports=function(e,t,r){if(e===t)return!0;var n=o.parse(e,!1,!0),s=o.parse(t,!1,!0),i=0|n.port||("https"===n.protocol?443:80),a=0|s.port||("https"===s.protocol?443:80),u={proto:n.protocol===s.protocol,hostname:n.hostname===s.hostname,port:i===a};return u.proto&&u.hostname&&(u.port||r)}},{url:14}],14:[function(e,t,r){"use strict";var o=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;t.exports={regex:o,parse:function(e){var t=o.exec(e);return t?{protocol:(t[1]||"").toLowerCase()||void 0,hostname:(t[5]||"").toLowerCase()||void 0,port:t[6]||void 0}:{}}}},{}],15:[function(e,t,r){function o(e){return e.replace(/^\s*|\s*$/g,"")}r=t.exports=o,r.left=function(e){return e.replace(/^\s*/,"")},r.right=function(e){return e.replace(/\s*$/,"")}},{}],16:[function(e,t,r){"use strict";function o(e){var t=p.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function n(e,t){for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),o=r.length,n=r[o-1],s=!1,i=0;o--;)"."===r[o]?r.splice(o,1):".."===r[o]?(r.splice(o,1),i++):i&&(0===o&&(s=!0),r.splice(o,1),i--);return s&&r.unshift(""),"."!==n&&".."!==n||r.push(""),r.join("/")}function s(e,t,r){if(!(this instanceof s))return new s(e,t,r);var i,a,p,h,d,w,y=l.slice(),m=typeof t,v=this,b=0;for("object"!==m&&"string"!==m&&(r=t,t=null),r&&"function"!=typeof r&&(r=f.parse),t=c(t),a=o(e||""),i=!a.protocol&&!a.slashes,v.slashes=a.slashes||i&&t.slashes,v.protocol=a.protocol||t.protocol||"",e=a.rest,a.slashes||(y[2]=[/(.*)/,"pathname"]);b<y.length;b++)h=y[b],p=h[0],w=h[1],p!==p?v[w]=e:"string"==typeof p?~(d=e.indexOf(p))&&("number"==typeof h[2]?(v[w]=e.slice(0,d),e=e.slice(d+h[2])):(v[w]=e.slice(d),e=e.slice(0,d))):(d=p.exec(e))&&(v[w]=d[1],e=e.slice(0,d.index)),v[w]=v[w]||(i&&h[3]?t[w]||"":""),h[4]&&(v[w]=v[w].toLowerCase());r&&(v.query=r(v.query)),i&&t.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==t.pathname)&&(v.pathname=n(v.pathname,t.pathname)),u(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(h=v.auth.split(":"),v.username=h[0]||"",v.password=h[1]||""),v.origin=v.protocol&&v.host&&"file:"!==v.protocol?v.protocol+"//"+v.host:"null",v.href=v.toString()}function i(e,t,r){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||f.parse)(t)),o[e]=t;break;case"port":o[e]=t,u(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,/:\d+$/.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!r;break;case"pathname":o.pathname=t.length&&"/"!==t.charAt(0)?"/"+t:t;break;default:o[e]=t}for(var n=0;n<l.length;n++){var s=l[n];s[4]&&(o[s[1]]=o[s[1]].toLowerCase())}return o.origin=o.protocol&&o.host&&"file:"!==o.protocol?o.protocol+"//"+o.host:"null",o.href=o.toString(),o}function a(e){e&&"function"==typeof e||(e=f.stringify);var t,r=this,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var n=o+(r.slashes?"//":"");return r.username&&(n+=r.username,r.password&&(n+=":"+r.password),n+="@"),n+=r.host+r.pathname,t="object"==typeof r.query?e(r.query):r.query,t&&(n+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(n+=r.hash),n}var u=e("requires-port"),c=e("./lolcation"),f=e("querystringify"),p=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,l=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]];s.prototype={set:i,toString:a},s.extractProtocol=o,s.location=c,s.qs=f,t.exports=s},{"./lolcation":17,querystringify:11,"requires-port":12}],17:[function(e,t,r){(function(r){"use strict";var o,n=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s={hash:1,query:1};t.exports=function(t){t=t||r.location||{},o=o||e("./");var i,a={},u=typeof t;if("blob:"===t.protocol)a=new o(unescape(t.pathname),{});else if("string"===u){a=new o(t,{});for(i in s)delete a[i]}else if("object"===u){for(i in t)i in s||(a[i]=t[i]);void 0===a.slashes&&(a.slashes=n.test(t.href))}return a}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./":16}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.getIt=e()}}(function(){return function e(t,r,o){function n(i,a){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!a&&u)return u(i,!0);if(s)return s(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[i]={exports:{}};t[i][0].call(f.exports,function(e){var r=t[i][1][e];return n(r?r:e)},f,f.exports,e,t,r,o)}return r[i].exports}for(var s="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(e,t,r){"use strict";var o=e("nano-pubsub"),n=e("./util/middlewareReducer"),s=e("./middleware/defaultOptionsProcessor"),i=e("./request"),a=["request","response","progress","error","abort"],u=["processOptions","onRequest","onResponse","onError","onReturn","onHeaders"];t.exports=function e(){function t(e){function t(e,t,o){var n=e,i=t;if(!n)try{i=s("onResponse",t,o)}catch(e){i=null,n=e}n=n&&s("onError",n,o),n?r.error.publish(n):i&&r.response.publish(i)}var r=a.reduce(function(e,t){return e[t]=o(),e},{}),s=n(f),u=s("processOptions",e),c={options:u,channels:r,applyMiddleware:s},p=null,l=r.request.subscribe(function(e){p=i(e,function(r,o){return t(r,o,e)})});r.abort.subscribe(function(){l(),p&&p.abort()});var h=s("onReturn",r,c);return h===r&&r.request.publish(c),h}var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],c=[],f=u.reduce(function(e,t){return e[t]=e[t]||[],e},{processOptions:[s]});return t.use=function(e){if(!e)throw new Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw new Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&f.onReturn.length>0)throw new Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");u.forEach(function(t){e[t]&&f[t].push(e[t])}),c.push(e)},t.clone=function(){return e(c)},r.forEach(t.use),t}},{"./middleware/defaultOptionsProcessor":2,"./request":4,"./util/middlewareReducer":5,"nano-pubsub":8}],2:[function(e,t,r){"use strict";function o(e){if(e===!1||0===e)return!1;if(e.connect||e.socket)return e;var t=Number(e);return isNaN(t)?o(a.timeout):{connect:t,socket:t}}function n(e){var t={};for(var r in e)void 0!==e[r]&&(t[r]=e[r]);return t}var s=e("object-assign"),i=e("url-parse"),a={timeout:12e4};t.exports=function(e){var t="string"==typeof e?s({url:e},a):s({},a,e),r=i(t.url,{},!0);return t.timeout=o(t.timeout),t.query&&(r.query=s({},r.query,n(t.query))),t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t.url=r.toString(),t}},{"object-assign":9,"url-parse":16}],3:[function(e,t,r){"use strict";var o=e("same-origin"),n=e("parse-headers"),s=function(){},i=window,a=i.XMLHttpRequest||s,u="withCredentials"in new a,c=u?a:i.XDomainRequest,f="xhr";t.exports=function(e,t){function r(){q=!0,v&&v.abort()}function s(t){x=!0,v.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+w.url:"Connection timed out on request to "+w.url);r.code=t,e.channels.error.publish(r)}function u(){R&&(p(),m.socket=setTimeout(function(){return s("ESOCKETTIMEDOUT")},R.socket))}function p(){(q||v.readyState>=2&&m.connect)&&clearTimeout(m.connect),m.socket&&clearTimeout(m.socket)}function l(){if(!O){p(),O=!0,v=null;var e=new Error("Network error while attempting to reach "+w.url);e.isNetworkError=!0,e.request=w,t(e)}}function h(){var e=v.status,t=v.statusText;if(b&&void 0===e)e=200;else{if(e>12e3&&e<12156)return l();e=1223===v.status?204:v.status,t=1223===v.status?"No Content":t}return{body:v.response||v.responseText,url:w.url,method:w.method,headers:b?{}:n(v.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function d(){if(!(q||O||x)){if(0===v.status)return void l(new Error("Unknown XHR error"));p(),O=!0,t(null,h())}}var w=e.options,y=!o(i.location.href,w.url),m={},v=y?new c:new a,b=i.XDomainRequest&&v instanceof i.XDomainRequest,g=w.headers,q=!1,O=!1,x=!1;v.onerror=l,v.ontimeout=l,v.onabort=function(){q=!0},v.onprogress=function(){};var j=b?"onload":"onreadystatechange";if(v[j]=function(){u(),q||4!==v.readyState&&!b||0!==v.status&&d()},v.open(w.method,w.url,!0),v.withCredentials=!!w.withCredentials,g&&v.setRequestHeader)for(var E in g)g.hasOwnProperty(E)&&v.setRequestHeader(E,g[E]);else if(g&&b)throw new Error("Headers cannot be set on an XDomainRequest object");w.rawBody&&(v.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:w,adapter:f,request:v,context:e}),v.send(w.body||null);var R=w.timeout;return R&&(m.connect=setTimeout(function(){return s("ETIMEDOUT")},R.connect)),{abort:r}}},{"parse-headers":10,"same-origin":13}],4:[function(e,t,r){"use strict";t.exports=e("./node-request")},{"./node-request":3}],5:[function(e,t,r){"use strict";t.exports=function(e){var t=function(t,r){for(var o=arguments.length,n=Array(o>2?o-2:0),s=2;s<o;s++)n[s-2]=arguments[s];return e[t].reduce(function(e,t){return t.apply(void 0,[e].concat(n))},r)};return t}},{}],6:[function(e,t,r){function o(e,t,r){if(!a(t))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this),"[object Array]"===u.call(e)?n(e,t,r):"string"==typeof e?s(e,t,r):i(e,t,r)}function n(e,t,r){for(var o=0,n=e.length;o<n;o++)c.call(e,o)&&t.call(r,e[o],o,e)}function s(e,t,r){for(var o=0,n=e.length;o<n;o++)t.call(r,e.charAt(o),o,e)}function i(e,t,r){for(var o in e)c.call(e,o)&&t.call(r,e[o],o,e)}var a=e("is-function");t.exports=o;var u=Object.prototype.toString,c=Object.prototype.hasOwnProperty},{"is-function":7}],7:[function(e,t,r){function o(e){var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}t.exports=o;var n=Object.prototype.toString},{}],8:[function(e,t,r){t.exports=function(){function e(e){return r.push(e),function(){var t=r.indexOf(e);t>-1&&r.splice(t,1)}}function t(){for(var e=0;e<r.length;e++)r[e].apply(null,arguments)}var r=[];return{subscribe:e,publish:t}}},{}],9:[function(e,t,r){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function n(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==o.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}var s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=n()?Object.assign:function(e,t){for(var r,n,u=o(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(u[f]=r[f]);if(s){n=s(r);for(var p=0;p<n.length;p++)a.call(r,n[p])&&(u[n[p]]=r[n[p]])}}return u}},{}],10:[function(e,t,r){var o=e("trim"),n=e("for-each"),s=function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.exports=function(e){if(!e)return{};var t={};return n(o(e).split("\n"),function(e){var r=e.indexOf(":"),n=o(e.slice(0,r)).toLowerCase(),i=o(e.slice(r+1));"undefined"==typeof t[n]?t[n]=i:s(t[n])?t[n].push(i):t[n]=[t[n],i]}),t}},{"for-each":6,trim:15}],11:[function(e,t,r){"use strict";function o(e){for(var t,r=/([^=?&]+)=?([^&]*)/g,o={};t=r.exec(e);o[decodeURIComponent(t[1])]=decodeURIComponent(t[2]));return o}function n(e,t){t=t||"";var r=[];"string"!=typeof t&&(t="?");for(var o in e)s.call(e,o)&&r.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return r.length?t+r.join("&"):""}var s=Object.prototype.hasOwnProperty;r.stringify=n,r.parse=o},{}],12:[function(e,t,r){"use strict";t.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},{}],13:[function(e,t,r){"use strict";var o=e("url");t.exports=function(e,t,r){if(e===t)return!0;var n=o.parse(e,!1,!0),s=o.parse(t,!1,!0),i=0|n.port||("https"===n.protocol?443:80),a=0|s.port||("https"===s.protocol?443:80),u={proto:n.protocol===s.protocol,hostname:n.hostname===s.hostname,port:i===a};return u.proto&&u.hostname&&(u.port||r)}},{url:14}],14:[function(e,t,r){"use strict";var o=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;t.exports={regex:o,parse:function(e){var t=o.exec(e);return t?{protocol:(t[1]||"").toLowerCase()||void 0,hostname:(t[5]||"").toLowerCase()||void 0,port:t[6]||void 0}:{}}}},{}],15:[function(e,t,r){function o(e){return e.replace(/^\s*|\s*$/g,"")}r=t.exports=o,r.left=function(e){return e.replace(/^\s*/,"")},r.right=function(e){return e.replace(/\s*$/,"")}},{}],16:[function(e,t,r){"use strict";function o(e){var t=p.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function n(e,t){for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),o=r.length,n=r[o-1],s=!1,i=0;o--;)"."===r[o]?r.splice(o,1):".."===r[o]?(r.splice(o,1),i++):i&&(0===o&&(s=!0),r.splice(o,1),i--);return s&&r.unshift(""),"."!==n&&".."!==n||r.push(""),r.join("/")}function s(e,t,r){if(!(this instanceof s))return new s(e,t,r);var i,a,p,h,d,w,y=l.slice(),m=typeof t,v=this,b=0;for("object"!==m&&"string"!==m&&(r=t,t=null),r&&"function"!=typeof r&&(r=f.parse),t=c(t),a=o(e||""),i=!a.protocol&&!a.slashes,v.slashes=a.slashes||i&&t.slashes,v.protocol=a.protocol||t.protocol||"",e=a.rest,a.slashes||(y[2]=[/(.*)/,"pathname"]);b<y.length;b++)h=y[b],p=h[0],w=h[1],p!==p?v[w]=e:"string"==typeof p?~(d=e.indexOf(p))&&("number"==typeof h[2]?(v[w]=e.slice(0,d),e=e.slice(d+h[2])):(v[w]=e.slice(d),e=e.slice(0,d))):(d=p.exec(e))&&(v[w]=d[1],e=e.slice(0,d.index)),v[w]=v[w]||(i&&h[3]?t[w]||"":""),h[4]&&(v[w]=v[w].toLowerCase());r&&(v.query=r(v.query)),i&&t.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==t.pathname)&&(v.pathname=n(v.pathname,t.pathname)),u(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(h=v.auth.split(":"),v.username=h[0]||"",v.password=h[1]||""),v.origin=v.protocol&&v.host&&"file:"!==v.protocol?v.protocol+"//"+v.host:"null",v.href=v.toString()}function i(e,t,r){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||f.parse)(t)),o[e]=t;break;case"port":o[e]=t,u(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,/:\d+$/.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!r;break;case"pathname":o.pathname=t.length&&"/"!==t.charAt(0)?"/"+t:t;break;default:o[e]=t}for(var n=0;n<l.length;n++){var s=l[n];s[4]&&(o[s[1]]=o[s[1]].toLowerCase())}return o.origin=o.protocol&&o.host&&"file:"!==o.protocol?o.protocol+"//"+o.host:"null",o.href=o.toString(),o}function a(e){e&&"function"==typeof e||(e=f.stringify);var t,r=this,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var n=o+(r.slashes?"//":"");return r.username&&(n+=r.username,r.password&&(n+=":"+r.password),n+="@"),n+=r.host+r.pathname,t="object"==typeof r.query?e(r.query):r.query,t&&(n+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(n+=r.hash),n}var u=e("requires-port"),c=e("./lolcation"),f=e("querystringify"),p=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,l=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]];s.prototype={set:i,toString:a},s.extractProtocol=o,s.location=c,s.qs=f,t.exports=s},{"./lolcation":17,querystringify:11,"requires-port":12}],17:[function(e,t,r){(function(r){"use strict";var o,n=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s={hash:1,query:1};t.exports=function(t){t=t||r.location||{},o=o||e("./");var i,a={},u=typeof t;if("blob:"===t.protocol)a=new o(unescape(t.pathname),{});else if("string"===u){a=new o(t,{});for(i in s)delete a[i]}else if("object"===u){for(i in t)i in s||(a[i]=t[i]);void 0===a.slashes&&(a.slashes=n.test(t.href))}return a}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./":16}]},{},[1])(1)});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc