{"version":3,"sources":["webpack:///flavor-utils/webpack/universalModuleDefinition","webpack:///flavor-utils/flavor-utils.min.js","webpack:///flavor-utils/webpack/bootstrap 8158336142ddb8fc7530","webpack:///flavor-utils/./src/index.js","webpack:///flavor-utils/./~/superagent/lib/client.js","webpack:///flavor-utils/./~/component-emitter/index.js","webpack:///flavor-utils/./~/reduce-component/index.js","webpack:///flavor-utils/./~/superagent/lib/request-base.js","webpack:///flavor-utils/./~/superagent/lib/is-object.js","webpack:///flavor-utils/./~/superagent/lib/request.js","webpack:///flavor-utils/./src/Base64.js","webpack:///flavor-utils/./~/url/url.js","webpack:///flavor-utils/./~/url/~/punycode/punycode.js","webpack:///flavor-utils/(webpack)/buildin/module.js","webpack:///flavor-utils/./~/querystring/index.js","webpack:///flavor-utils/./~/querystring/decode.js","webpack:///flavor-utils/./~/querystring/encode.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_classCallCheck","instance","Constructor","TypeError","saveDoc","opts","doc","Promise","resolve","reject","url","databaseUrl","_id","superagent","post","set","send","end","err","res","body","getView","view","key","x","split","designDoc","viewName","getJSON","encodeURIComponent","JSON","stringify","getList","list","listName","get","deleteDoc","del","query","rev","_rev","updateDoc","put","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","protoProps","staticProps","prototype","Base64","optionDefaults","FlavorUtils","defaultOpts","defaultOptions","value","options","assign","auth","couchUsername","couchPassword","couchUrl","parsedUrl","parse","format","replace","couchDatabase","getOptions","username","source","flavor","then","doEl","data","meta","newDoc","prom","push","result","undefined","all","arr","flavors","sub","subFolder","filter","v","j","unshift","name","_attachments","content_type","encode","rows","done","console","log","keys","stack","sorted","getTree","row","structure","doElement","current","__data","__view","__id","__rev","__version","version","__keywords","keywords","__meta","shift","__name","__parents","slice","__parent","getFlavor","views","tree","viewCb","dirCb","_this","promise","_loop","startsWith","el","traverseTree","noop","isHost","obj","str","toString","serialize","isObject","pairs","pushEncodedKeyValuePair","join","val","Array","isArray","forEach","parseString","parts","pair","len","decodeURIComponent","parseHeader","index","line","field","lines","fields","pop","indexOf","toLowerCase","trim","isJSON","mime","test","type","params","reduce","Response","req","xhr","text","method","responseType","responseText","statusText","setStatusProperties","status","header","headers","getAllResponseHeaders","getResponseHeader","setHeaderProperties","parseBody","response","Request","self","_query","_header","on","e","Error","original","rawResponse","statusCode","callback","emit","new_err","fn","request","Emitter","requestBase","window","bind","getXHR","XMLHttpRequest","location","protocol","ActiveXObject","s","serializeObject","types","html","json","xml","urlencoded","form","form-data","application/x-www-form-urlencoded","application/json","ct","statusType","info","ok","clientError","serverError","error","toError","accepted","noContent","badRequest","unauthorized","notAcceptable","notFound","forbidden","msg","abort","aborted","clearTimeout","_responseType","accept","user","pass","btoa","password","attach","file","filename","_getFormData","append","_formData","FormData","_data","warn","_parser","_callback","crossDomainError","crossDomain","timeoutError","timeout","_timeout","withCredentials","_withCredentials","onreadystatechange","readyState","timedout","handleProgress","total","percent","direction","hasListeners","onprogress","upload","_timer","setTimeout","open","contentType","setRequestHeader","head","patch","mixin","addEventListener","event","_callbacks","once","off","apply","arguments","removeListener","removeAllListeners","removeEventListener","callbacks","cb","splice","args","listeners","initial","idx","curr","ms","fulfill","use","getHeader","unset","RequestConstructor","_keyStr","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","_utf8_encode","charCodeAt","isNaN","charAt","decode","String","fromCharCode","_utf8_decode","string","utftext","n","c2","c3","Url","slashes","host","port","hostname","hash","search","pathname","path","href","urlParse","parseQueryString","slashesDenoteHost","u","urlFormat","isString","urlResolve","relative","urlResolveObject","resolveObject","arg","isNull","isNullOrUndefined","punycode","protocolPattern","portPattern","delims","unwise","concat","autoEscape","nonHostChars","hostEndingChars","hostnameMaxLen","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","http:","https:","ftp:","gopher:","file:","querystring","rest","proto","exec","lowerProto","substr","match","hostEnd","hec","atSign","lastIndexOf","parseHost","ipv6Hostname","hostparts","l","part","newpart","k","validParts","notHost","bit","domainArray","newOut","h","ae","esc","escape","qm","rel","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","authInHost","last","hasTrailingSlash","up","isAbsolute","__WEBPACK_AMD_DEFINE_RESULT__","global","RangeError","errors","map","array","mapDomain","regexSeparators","labels","encoded","ucs2decode","extra","counter","ucs2encode","stringFromCharCode","basicToDigit","codePoint","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","floor","damp","baseMinusTMin","tMax","skew","out","basic","oldi","w","t","baseMinusT","inputLength","initialN","bias","initialBias","delimiter","maxInt","tMin","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","toASCII","regexNonASCII","freeGlobal","nodeType","overflow","not-basic","invalid-input","Math","ucs2","webpackPolyfill","deprecate","paths","children","hasOwnProperty","prop","qs","sep","eq","regexp","maxKeys","kstr","vstr","stringifyPrimitive","isFinite","ks"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASL,EAAQD,EAASM,GEtDhC,YF4DC,SAASS,GAAgBC,EAA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AAC,QAAAV,EAAAmQ,IACAnQ,EAAAmQ,GAAA4B,IAAA,SAAA7U,GACA,MAAAoZ,GAAArd,mBAAAmd,EAAAlZ,MACSqD,KAAAuV,GAETQ,EAAArd,mBAAAmd,EAAApW,EAAAmQ,OAEK5P,KAAAuV,GAILzY,EACApE,mBAAAmd,EAAA/Y,IAAA0Y,EACA9c,mBAAAmd,EAAApW,IAFA","file":"flavor-utils.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"flavorUtils\"] = factory();\n\telse\n\t\troot[\"flavorUtils\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"flavorUtils\"] = factory();\n\telse\n\t\troot[\"flavorUtils\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar superagent = __webpack_require__(1);\n\tvar Base64 = __webpack_require__(7);\n\tvar url = __webpack_require__(8);\n\t\n\tvar optionDefaults = {\n\t    designDoc: 'flavor'\n\t};\n\t\n\t/**\n\t * General options object\n\t * @typedef {object} options\n\t * @property {String} username - The target username to which to clone the flavor\n\t * @property {String} designDoc - The design doc to use for views and list queries - Defaults to 'flavor'\n\t * @property {string} flavor - The name of the flavor in the target\n\t * @property {string} couchUrl - Couchdb root url of the target. It can contain username + password if but will be overriden if couchUsername and couchPassword are defined\n\t * @property {string} couchDatabase - the name of the target couchdb database\n\t * @property {string} couchUsername - the username with which to connect to the couchdb database\n\t * @property {string} couchPassword - the password with which to connect to the couchdb database\n\t */\n\t\n\t/**\n\t * This is a description of the MyClass constructor function.\n\t * @class\n\t * @classdesc FlavorUtils class\n\t */\n\t\n\tvar FlavorUtils = function () {\n\t    /**\n\t     * Constructor\n\t     * @param {options} defaultOpts - Default options\n\t     */\n\t\n\t    function FlavorUtils(defaultOpts) {\n\t        _classCallCheck(this, FlavorUtils);\n\t\n\t        this.defaultOptions = defaultOpts;\n\t    }\n\t\n\t    /**\n\t     * Get options object\n\t     * @param {options} opts - An option object to override default options with\n\t     * @returns {object}\n\t     */\n\t\n\t\n\t    _createClass(FlavorUtils, [{\n\t        key: 'getOptions',\n\t        value: function getOptions(opts) {\n\t            var options = Object.assign({}, optionDefaults, this.defaultOptions, opts);\n\t\n\t            // Add auth to url\n\t            var auth = '';\n\t            if (options.couchUsername) {\n\t                auth += options.couchUsername;\n\t                if (options.couchPassword) {\n\t                    auth += ':' + options.couchPassword;\n\t                }\n\t            }\n\t            if (options.couchUrl) {\n\t                var parsedUrl = url.parse(options.couchUrl);\n\t                if (auth) {\n\t                    parsedUrl.auth = auth;\n\t                }\n\t                options.couchUrl = parsedUrl.format();\n\t            }\n\t\n\t            // Remove trailing slash from url\n\t            if (options.couchUrl) options.couchUrl = options.couchUrl.replace(/\\/$/, '');\n\t            if (options.couchUrl && options.couchDatabase) {\n\t                options.databaseUrl = options.couchUrl + '/' + options.couchDatabase;\n\t            }\n\t            return options;\n\t        }\n\t    }, {\n\t        key: 'getFlavors',\n\t        value: function getFlavors(opts) {\n\t            opts = this.getOptions(opts);\n\t            return getView(opts, opts.designDoc + '/list', opts.username);\n\t        }\n\t\n\t        /**\n\t         *\n\t         * @param {object} opts - An option object to override default options with\n\t         * @param {options} opts.source - An option object to override default options with\n\t         * @param {options} opts.target - An option object to override default options with\n\t         * @returns {Promise} A promise that resolves with `undefined` if success, or rejects with an error if failure\n\t         */\n\t\n\t    }, {\n\t        key: 'clone',\n\t        value: function clone(opts) {\n\t            opts.source = this.getOptions(opts.source);\n\t            opts.target = this.getOptions(opts.target);\n\t            var key = [opts.source.flavor, opts.source.username];\n\t            return getView(opts.source, opts.source.designDoc + '/docs', key).then(function (res) {\n\t                var result = res.rows;\n\t                if (!result) return;\n\t                var done = Promise.resolve();\n\t                var i = 0;\n\t                for (i = 0; i < result.length; i++) {\n\t                    done = done.then(doEl(i));\n\t                }\n\t                done.then(function () {\n\t                    console.log('all done');\n\t                }, function (err) {\n\t                    console.log('error:', err);\n\t                    return err;\n\t                });\n\t\n\t                function doEl(i) {\n\t                    return function () {\n\t                        var prom = [];\n\t                        var view, data, meta, doc, newDoc;\n\t                        prom.push(getJSON(opts.source.databaseUrl + '/' + result[i].id));\n\t                        if (result[i].value.view) {\n\t                            view = getJSON(opts.source.databaseUrl + '/' + result[i].id + '/view.json');\n\t                            prom.push(view);\n\t                        } else prom.push(undefined);\n\t                        if (result[i].value.data) {\n\t                            data = getJSON(opts.source.databaseUrl + '/' + result[i].id + '/data.json');\n\t                            prom.push(data);\n\t                        } else prom.push(undefined);\n\t                        if (result[i].value.meta) {\n\t                            meta = getJSON(opts.source.databaseUrl + '/' + result[i].id + '/meta.json');\n\t                            prom.push(meta);\n\t                        } else prom.push(undefined);\n\t                        prom = Promise.all(prom).then(function (arr) {\n\t                            doc = arr[0];\n\t                            newDoc = {};\n\t                            var view = arr[1];\n\t                            var data = arr[2];\n\t                            var meta = arr[3];\n\t                            delete doc._rev;\n\t\n\t                            newDoc.flavors = {};\n\t                            var sub = [];\n\t\n\t                            if (opts.target.subFolder && typeof opts.target.subFolder === 'string') {\n\t                                sub = opts.target.subFolder.split('/').filter(function (v) {\n\t                                    return v !== \"\";\n\t                                });\n\t                            }\n\t                            if (sub.length > 0 && doc.flavors[opts.source.flavor]) {\n\t                                if (doc.flavors[opts.source.flavor]) {\n\t                                    var arr = doc.flavors[opts.source.flavor];\n\t                                    for (var j = sub.length - 1; j >= 0; j--) {\n\t                                        arr.unshift(sub[j]);\n\t                                    }\n\t                                    newDoc.flavors[opts.target.flavor] = arr;\n\t                                }\n\t                            } else if (doc.flavors[opts.source.flavor]) {\n\t                                newDoc.flavors[opts.target.flavor] = doc.flavors[opts.source.flavor];\n\t                            }\n\t\n\t                            newDoc.name = opts.target.username;\n\t\n\t                            if (meta) {\n\t                                newDoc._attachments = newDoc._attachments || {};\n\t                                newDoc._attachments['meta.json'] = {\n\t                                    'content_type': 'application/json',\n\t                                    'data': Base64.encode(JSON.stringify(meta))\n\t                                };\n\t                            }\n\t                            if (view) {\n\t                                newDoc._attachments = newDoc._attachments || {};\n\t                                newDoc._attachments['view.json'] = {\n\t                                    'content_type': 'application/json',\n\t                                    'data': Base64.encode(JSON.stringify(view))\n\t                                };\n\t                            }\n\t                            if (data) {\n\t                                newDoc._attachments = newDoc._attachments || {};\n\t                                newDoc._attachments['data.json'] = {\n\t                                    'content_type': 'application/json',\n\t                                    'data': Base64.encode(JSON.stringify(data))\n\t                                };\n\t                            }\n\t                        });\n\t                        return prom.then(function () {\n\t                            return saveDoc(opts.target, newDoc);\n\t                        });\n\t                    };\n\t                }\n\t\n\t                return done;\n\t            });\n\t        }\n\t\n\t        /**\n\t         * Delete all views associated to a flavor\n\t         * @param {options} opts - A promise that resolves with `undefined` if success, or rejects with an error if failure\n\t         * @returns {Promise}\n\t         */\n\t\n\t    }, {\n\t        key: 'del',\n\t        value: function del(opts) {\n\t            opts = this.getOptions(opts);\n\t            var key = [opts.flavor, opts.username];\n\t            return getView(opts, opts.designDoc + '/docs', key).then(function (res) {\n\t                var result = res.rows;\n\t                var done = Promise.resolve();\n\t                for (var i = 0; i < result.length; i++) {\n\t                    done = done.then(doEl(i));\n\t                }\n\t\n\t                done.then(function () {\n\t                    console.log('delete flavor done');\n\t                }, function (err) {\n\t                    console.log('Error!', err, err.stack);\n\t                });\n\t\n\t                function doEl(i) {\n\t                    var prom = getJSON(opts.databaseUrl + '/' + result[i].id);\n\t                    prom = prom.then(function (doc) {\n\t                        delete doc.flavors[opts.flavor];\n\t                        var keys = Object.keys(doc.flavors);\n\t                        if (keys.length === 0) {\n\t                            return deleteDoc(opts, doc);\n\t                        } else {\n\t                            return updateDoc(opts, doc);\n\t                        }\n\t                    });\n\t                    return prom;\n\t                }\n\t\n\t                return done;\n\t            });\n\t        }\n\t\n\t        /**\n\t         * Get meta info about documents in a flavor\n\t         * @param {options} opts - An option object to override default options with\n\t         * @param {boolean} sorted - Set to true if documents should be sorted by flavors\n\t         */\n\t\n\t    }, {\n\t        key: 'getFlavor',\n\t        value: function getFlavor(opts, sorted) {\n\t            opts = this.getOptions(opts);\n\t            sorted = sorted === undefined ? true : sorted;\n\t            var key = [opts.flavor, opts.username];\n\t            if (sorted) {\n\t                return getList(opts, opts.designDoc + '/sort', 'docs', key);\n\t            }\n\t            return getView(opts, opts.designDoc + '/docs', key);\n\t        }\n\t\n\t        /**\n\t         * Check if this flavor has views associated with it\n\t         * @param {options} opts - An option object to override default options with\n\t         * @returns {Promise}\n\t         */\n\t\n\t    }, {\n\t        key: 'hasViews',\n\t        value: function hasViews(opts) {\n\t            opts = this.getOptions(opts);\n\t            var key = [opts.flavor, opts.username];\n\t            return getView(opts, opts.designDoc + '/docs', key).then(function (res) {\n\t                return !(res.rows && res.rows.length === 0);\n\t            });\n\t        }\n\t\n\t        /**\n\t         * Get views tree for a flavor\n\t         * @param {options} opts - An option object to override default options with\n\t         * @returns {Promise}\n\t         */\n\t\n\t    }, {\n\t        key: 'getTree',\n\t        value: function getTree(opts) {\n\t            if (opts.couchUrl) {\n\t                return this.getFlavor(opts).then(function (views) {\n\t                    if (views.rows) views = views.rows;\n\t                    return getTree(views);\n\t                });\n\t            } else {\n\t                return Promise.resolve(getTree(opts));\n\t            }\n\t\n\t            function getTree(rows) {\n\t                var row,\n\t                    structure = {};\n\t                Object.defineProperty(structure, '__root', { enumerable: false, writable: true, value: true });\n\t                for (var i = 0; i < rows.length; i++) {\n\t                    row = rows[i];\n\t                    var flavors = row.value.flavors;\n\t                    doElement(flavors, structure, row.value);\n\t                }\n\t                return structure;\n\t            }\n\t\n\t            function doElement(flavors, current, row) {\n\t                if (!flavors.length) {\n\t                    current.__data = row.data;\n\t                    current.__view = row.view;\n\t                    current.__id = row._id;\n\t                    current.__rev = row._rev;\n\t                    current.__version = row.version;\n\t                    current.__keywords = row.keywords;\n\t                    current.__meta = row.meta;\n\t                    return;\n\t                }\n\t\n\t                var flavor = flavors.shift();\n\t                if (!current[flavor]) {\n\t                    current[flavor] = {\n\t                        __name: flavor,\n\t                        __parents: current.__parents ? current.__parents.slice() : [],\n\t                        __parent: current\n\t                    };\n\t                    if (current.__name) current[flavor].__parents.push(current.__name);\n\t                }\n\t\n\t                return doElement(flavors, current[flavor], row);\n\t            }\n\t        }\n\t\n\t        /**\n\t         * Traverse a tree\n\t         * @param {object} tree - A tree such as returned by getTree\n\t         * @param {function} viewCb - A callback called on each view\n\t         * @param {function} dirCb - A callback called on each 'directory'\n\t         * @returns {Promise}\n\t         */\n\t\n\t    }, {\n\t        key: 'traverseTree',\n\t        value: function traverseTree(tree, viewCb, dirCb) {\n\t            var _this = this;\n\t\n\t            var promise = Promise.resolve();\n\t\n\t            var _loop = function _loop(key) {\n\t                if (key.startsWith('__')) return 'continue';\n\t                var el = tree[key];\n\t                if (el.__id) {\n\t                    // Element is a view\n\t                    if (viewCb) promise = promise.then(function () {\n\t                        return viewCb(el);\n\t                    });\n\t                } else if (key !== '__root') {\n\t                    // Element is a directory\n\t                    if (dirCb) promise = promise.then(function () {\n\t                        return dirCb(el);\n\t                    });\n\t                    promise = promise.then(function () {\n\t                        return _this.traverseTree(el, viewCb, dirCb);\n\t                    });\n\t                }\n\t            };\n\t\n\t            for (var key in tree) {\n\t                var _ret = _loop(key);\n\t\n\t                if (_ret === 'continue') continue;\n\t            }\n\t            return promise;\n\t        }\n\t    }]);\n\t\n\t    return FlavorUtils;\n\t}();\n\t\n\tmodule.exports = FlavorUtils;\n\t\n\tfunction saveDoc(opts, doc) {\n\t    return new Promise(function (resolve, reject) {\n\t        var url = opts.databaseUrl;\n\t        delete doc._id;\n\t        superagent.post(url).set('Content-Type', 'application/json').send(doc).end(function (err, res) {\n\t            if (err) {\n\t                return reject(err);\n\t            }\n\t            resolve(res.body);\n\t        });\n\t    });\n\t}\n\t\n\tfunction getView(opts, view, key) {\n\t    var x = view.split('/');\n\t    var designDoc = '_design/' + x[0];\n\t    var viewName = x[1];\n\t\n\t    return getJSON(opts.databaseUrl + '/' + designDoc + '/_view/' + viewName + '?key=' + encodeURIComponent(JSON.stringify(key)));\n\t}\n\t\n\tfunction getList(opts, list, view, key) {\n\t    var x = list.split('/');\n\t    var designDoc = '_design/' + x[0];\n\t    var listName = x[1];\n\t\n\t    return getJSON(opts.databaseUrl + '/' + designDoc + '/_list/' + listName + '/' + view + '?key=' + encodeURIComponent(JSON.stringify(key)));\n\t}\n\t\n\tfunction getUUIDs(opts, count) {\n\t    count = count || 1;\n\t    return getJSON(opts.couchUrl + '/_uuids?count=' + count);\n\t}\n\t\n\tfunction getJSON(url) {\n\t    return new Promise(function (resolve, reject) {\n\t        superagent.get(url).set('Accept', 'application/json').end(function (err, res) {\n\t            if (err) {\n\t                return reject(err);\n\t            }\n\t            resolve(res.body);\n\t        });\n\t    });\n\t}\n\t\n\tfunction deleteDoc(opts, doc) {\n\t    return new Promise(function (resolve, reject) {\n\t        var url = opts.databaseUrl + '/' + doc._id;\n\t        superagent.del(url).query({ rev: doc._rev }).end(function (err, res) {\n\t            if (err) {\n\t                return reject(err);\n\t            }\n\t            resolve(res);\n\t        });\n\t    });\n\t}\n\t\n\tfunction updateDoc(opts, doc) {\n\t    return new Promise(function (resolve, reject) {\n\t        var url = opts.databaseUrl + '/' + doc._id;\n\t        superagent.put(url).set('Content-Type', 'application/json').send(doc).end(function (err, res) {\n\t            if (err) {\n\t                return reject(err);\n\t            }\n\t            resolve(res.body);\n\t        });\n\t    });\n\t}\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Module dependencies.\n\t */\n\t\n\tvar Emitter = __webpack_require__(2);\n\tvar reduce = __webpack_require__(3);\n\tvar requestBase = __webpack_require__(4);\n\tvar isObject = __webpack_require__(5);\n\t\n\t/**\n\t * Root reference for iframes.\n\t */\n\t\n\tvar root;\n\tif (typeof window !== 'undefined') { // Browser window\n\t  root = window;\n\t} else if (typeof self !== 'undefined') { // Web Worker\n\t  root = self;\n\t} else { // Other environments\n\t  root = this;\n\t}\n\t\n\t/**\n\t * Noop.\n\t */\n\t\n\tfunction noop(){};\n\t\n\t/**\n\t * Check if `obj` is a host object,\n\t * we don't want to serialize these :)\n\t *\n\t * TODO: future proof, move to compoent land\n\t *\n\t * @param {Object} obj\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isHost(obj) {\n\t  var str = {}.toString.call(obj);\n\t\n\t  switch (str) {\n\t    case '[object File]':\n\t    case '[object Blob]':\n\t    case '[object FormData]':\n\t      return true;\n\t    default:\n\t      return false;\n\t  }\n\t}\n\t\n\t/**\n\t * Expose `request`.\n\t */\n\t\n\tvar request = module.exports = __webpack_require__(6).bind(null, Request);\n\t\n\t/**\n\t * Determine XHR.\n\t */\n\t\n\trequest.getXHR = function () {\n\t  if (root.XMLHttpRequest\n\t      && (!root.location || 'file:' != root.location.protocol\n\t          || !root.ActiveXObject)) {\n\t    return new XMLHttpRequest;\n\t  } else {\n\t    try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {}\n\t    try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}\n\t    try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}\n\t    try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}\n\t  }\n\t  return false;\n\t};\n\t\n\t/**\n\t * Removes leading and trailing whitespace, added to support IE.\n\t *\n\t * @param {String} s\n\t * @return {String}\n\t * @api private\n\t */\n\t\n\tvar trim = ''.trim\n\t  ? function(s) { return s.trim(); }\n\t  : function(s) { return s.replace(/(^\\s*|\\s*$)/g, ''); };\n\t\n\t/**\n\t * Serialize the given `obj`.\n\t *\n\t * @param {Object} obj\n\t * @return {String}\n\t * @api private\n\t */\n\t\n\tfunction serialize(obj) {\n\t  if (!isObject(obj)) return obj;\n\t  var pairs = [];\n\t  for (var key in obj) {\n\t    if (null != obj[key]) {\n\t      pushEncodedKeyValuePair(pairs, key, obj[key]);\n\t        }\n\t      }\n\t  return pairs.join('&');\n\t}\n\t\n\t/**\n\t * Helps 'serialize' with serializing arrays.\n\t * Mutates the pairs array.\n\t *\n\t * @param {Array} pairs\n\t * @param {String} key\n\t * @param {Mixed} val\n\t */\n\t\n\tfunction pushEncodedKeyValuePair(pairs, key, val) {\n\t  if (Array.isArray(val)) {\n\t    return val.forEach(function(v) {\n\t      pushEncodedKeyValuePair(pairs, key, v);\n\t    });\n\t  }\n\t  pairs.push(encodeURIComponent(key)\n\t    + '=' + encodeURIComponent(val));\n\t}\n\t\n\t/**\n\t * Expose serialization method.\n\t */\n\t\n\t request.serializeObject = serialize;\n\t\n\t /**\n\t  * Parse the given x-www-form-urlencoded `str`.\n\t  *\n\t  * @param {String} str\n\t  * @return {Object}\n\t  * @api private\n\t  */\n\t\n\tfunction parseString(str) {\n\t  var obj = {};\n\t  var pairs = str.split('&');\n\t  var parts;\n\t  var pair;\n\t\n\t  for (var i = 0, len = pairs.length; i < len; ++i) {\n\t    pair = pairs[i];\n\t    parts = pair.split('=');\n\t    obj[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]);\n\t  }\n\t\n\t  return obj;\n\t}\n\t\n\t/**\n\t * Expose parser.\n\t */\n\t\n\trequest.parseString = parseString;\n\t\n\t/**\n\t * Default MIME type map.\n\t *\n\t *     superagent.types.xml = 'application/xml';\n\t *\n\t */\n\t\n\trequest.types = {\n\t  html: 'text/html',\n\t  json: 'application/json',\n\t  xml: 'application/xml',\n\t  urlencoded: 'application/x-www-form-urlencoded',\n\t  'form': 'application/x-www-form-urlencoded',\n\t  'form-data': 'application/x-www-form-urlencoded'\n\t};\n\t\n\t/**\n\t * Default serialization map.\n\t *\n\t *     superagent.serialize['application/xml'] = function(obj){\n\t *       return 'generated xml here';\n\t *     };\n\t *\n\t */\n\t\n\t request.serialize = {\n\t   'application/x-www-form-urlencoded': serialize,\n\t   'application/json': JSON.stringify\n\t };\n\t\n\t /**\n\t  * Default parsers.\n\t  *\n\t  *     superagent.parse['application/xml'] = function(str){\n\t  *       return { object parsed from str };\n\t  *     };\n\t  *\n\t  */\n\t\n\trequest.parse = {\n\t  'application/x-www-form-urlencoded': parseString,\n\t  'application/json': JSON.parse\n\t};\n\t\n\t/**\n\t * Parse the given header `str` into\n\t * an object containing the mapped fields.\n\t *\n\t * @param {String} str\n\t * @return {Object}\n\t * @api private\n\t */\n\t\n\tfunction parseHeader(str) {\n\t  var lines = str.split(/\\r?\\n/);\n\t  var fields = {};\n\t  var index;\n\t  var line;\n\t  var field;\n\t  var val;\n\t\n\t  lines.pop(); // trailing CRLF\n\t\n\t  for (var i = 0, len = lines.length; i < len; ++i) {\n\t    line = lines[i];\n\t    index = line.indexOf(':');\n\t    field = line.slice(0, index).toLowerCase();\n\t    val = trim(line.slice(index + 1));\n\t    fields[field] = val;\n\t  }\n\t\n\t  return fields;\n\t}\n\t\n\t/**\n\t * Check if `mime` is json or has +json structured syntax suffix.\n\t *\n\t * @param {String} mime\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isJSON(mime) {\n\t  return /[\\/+]json\\b/.test(mime);\n\t}\n\t\n\t/**\n\t * Return the mime type for the given `str`.\n\t *\n\t * @param {String} str\n\t * @return {String}\n\t * @api private\n\t */\n\t\n\tfunction type(str){\n\t  return str.split(/ *; */).shift();\n\t};\n\t\n\t/**\n\t * Return header field parameters.\n\t *\n\t * @param {String} str\n\t * @return {Object}\n\t * @api private\n\t */\n\t\n\tfunction params(str){\n\t  return reduce(str.split(/ *; */), function(obj, str){\n\t    var parts = str.split(/ *= */)\n\t      , key = parts.shift()\n\t      , val = parts.shift();\n\t\n\t    if (key && val) obj[key] = val;\n\t    return obj;\n\t  }, {});\n\t};\n\t\n\t/**\n\t * Initialize a new `Response` with the given `xhr`.\n\t *\n\t *  - set flags (.ok, .error, etc)\n\t *  - parse header\n\t *\n\t * Examples:\n\t *\n\t *  Aliasing `superagent` as `request` is nice:\n\t *\n\t *      request = superagent;\n\t *\n\t *  We can use the promise-like API, or pass callbacks:\n\t *\n\t *      request.get('/').end(function(res){});\n\t *      request.get('/', function(res){});\n\t *\n\t *  Sending data can be chained:\n\t *\n\t *      request\n\t *        .post('/user')\n\t *        .send({ name: 'tj' })\n\t *        .end(function(res){});\n\t *\n\t *  Or passed to `.send()`:\n\t *\n\t *      request\n\t *        .post('/user')\n\t *        .send({ name: 'tj' }, function(res){});\n\t *\n\t *  Or passed to `.post()`:\n\t *\n\t *      request\n\t *        .post('/user', { name: 'tj' })\n\t *        .end(function(res){});\n\t *\n\t * Or further reduced to a single call for simple cases:\n\t *\n\t *      request\n\t *        .post('/user', { name: 'tj' }, function(res){});\n\t *\n\t * @param {XMLHTTPRequest} xhr\n\t * @param {Object} options\n\t * @api private\n\t */\n\t\n\tfunction Response(req, options) {\n\t  options = options || {};\n\t  this.req = req;\n\t  this.xhr = this.req.xhr;\n\t  // responseText is accessible only if responseType is '' or 'text' and on older browsers\n\t  this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined')\n\t     ? this.xhr.responseText\n\t     : null;\n\t  this.statusText = this.req.xhr.statusText;\n\t  this.setStatusProperties(this.xhr.status);\n\t  this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders());\n\t  // getAllResponseHeaders sometimes falsely returns \"\" for CORS requests, but\n\t  // getResponseHeader still works. so we get content-type even if getting\n\t  // other headers fails.\n\t  this.header['content-type'] = this.xhr.getResponseHeader('content-type');\n\t  this.setHeaderProperties(this.header);\n\t  this.body = this.req.method != 'HEAD'\n\t    ? this.parseBody(this.text ? this.text : this.xhr.response)\n\t    : null;\n\t}\n\t\n\t/**\n\t * Get case-insensitive `field` value.\n\t *\n\t * @param {String} field\n\t * @return {String}\n\t * @api public\n\t */\n\t\n\tResponse.prototype.get = function(field){\n\t  return this.header[field.toLowerCase()];\n\t};\n\t\n\t/**\n\t * Set header related properties:\n\t *\n\t *   - `.type` the content type without params\n\t *\n\t * A response of \"Content-Type: text/plain; charset=utf-8\"\n\t * will provide you with a `.type` of \"text/plain\".\n\t *\n\t * @param {Object} header\n\t * @api private\n\t */\n\t\n\tResponse.prototype.setHeaderProperties = function(header){\n\t  // content-type\n\t  var ct = this.header['content-type'] || '';\n\t  this.type = type(ct);\n\t\n\t  // params\n\t  var obj = params(ct);\n\t  for (var key in obj) this[key] = obj[key];\n\t};\n\t\n\t/**\n\t * Parse the given body `str`.\n\t *\n\t * Used for auto-parsing of bodies. Parsers\n\t * are defined on the `superagent.parse` object.\n\t *\n\t * @param {String} str\n\t * @return {Mixed}\n\t * @api private\n\t */\n\t\n\tResponse.prototype.parseBody = function(str){\n\t  var parse = request.parse[this.type];\n\t  if (!parse && isJSON(this.type)) {\n\t    parse = request.parse['application/json'];\n\t  }\n\t  return parse && str && (str.length || str instanceof Object)\n\t    ? parse(str)\n\t    : null;\n\t};\n\t\n\t/**\n\t * Set flags such as `.ok` based on `status`.\n\t *\n\t * For example a 2xx response will give you a `.ok` of __true__\n\t * whereas 5xx will be __false__ and `.error` will be __true__. The\n\t * `.clientError` and `.serverError` are also available to be more\n\t * specific, and `.statusType` is the class of error ranging from 1..5\n\t * sometimes useful for mapping respond colors etc.\n\t *\n\t * \"sugar\" properties are also defined for common cases. Currently providing:\n\t *\n\t *   - .noContent\n\t *   - .badRequest\n\t *   - .unauthorized\n\t *   - .notAcceptable\n\t *   - .notFound\n\t *\n\t * @param {Number} status\n\t * @api private\n\t */\n\t\n\tResponse.prototype.setStatusProperties = function(status){\n\t  // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\n\t  if (status === 1223) {\n\t    status = 204;\n\t  }\n\t\n\t  var type = status / 100 | 0;\n\t\n\t  // status / class\n\t  this.status = this.statusCode = status;\n\t  this.statusType = type;\n\t\n\t  // basics\n\t  this.info = 1 == type;\n\t  this.ok = 2 == type;\n\t  this.clientError = 4 == type;\n\t  this.serverError = 5 == type;\n\t  this.error = (4 == type || 5 == type)\n\t    ? this.toError()\n\t    : false;\n\t\n\t  // sugar\n\t  this.accepted = 202 == status;\n\t  this.noContent = 204 == status;\n\t  this.badRequest = 400 == status;\n\t  this.unauthorized = 401 == status;\n\t  this.notAcceptable = 406 == status;\n\t  this.notFound = 404 == status;\n\t  this.forbidden = 403 == status;\n\t};\n\t\n\t/**\n\t * Return an `Error` representative of this response.\n\t *\n\t * @return {Error}\n\t * @api public\n\t */\n\t\n\tResponse.prototype.toError = function(){\n\t  var req = this.req;\n\t  var method = req.method;\n\t  var url = req.url;\n\t\n\t  var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')';\n\t  var err = new Error(msg);\n\t  err.status = this.status;\n\t  err.method = method;\n\t  err.url = url;\n\t\n\t  return err;\n\t};\n\t\n\t/**\n\t * Expose `Response`.\n\t */\n\t\n\trequest.Response = Response;\n\t\n\t/**\n\t * Initialize a new `Request` with the given `method` and `url`.\n\t *\n\t * @param {String} method\n\t * @param {String} url\n\t * @api public\n\t */\n\t\n\tfunction Request(method, url) {\n\t  var self = this;\n\t  this._query = this._query || [];\n\t  this.method = method;\n\t  this.url = url;\n\t  this.header = {}; // preserves header name case\n\t  this._header = {}; // coerces header names to lowercase\n\t  this.on('end', function(){\n\t    var err = null;\n\t    var res = null;\n\t\n\t    try {\n\t      res = new Response(self);\n\t    } catch(e) {\n\t      err = new Error('Parser is unable to parse the response');\n\t      err.parse = true;\n\t      err.original = e;\n\t      // issue #675: return the raw response if the response parsing fails\n\t      err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null;\n\t      // issue #876: return the http status code if the response parsing fails\n\t      err.statusCode = self.xhr && self.xhr.status ? self.xhr.status : null;\n\t      return self.callback(err);\n\t    }\n\t\n\t    self.emit('response', res);\n\t\n\t    if (err) {\n\t      return self.callback(err, res);\n\t    }\n\t\n\t    if (res.status >= 200 && res.status < 300) {\n\t      return self.callback(err, res);\n\t    }\n\t\n\t    var new_err = new Error(res.statusText || 'Unsuccessful HTTP response');\n\t    new_err.original = err;\n\t    new_err.response = res;\n\t    new_err.status = res.status;\n\t\n\t    self.callback(new_err, res);\n\t  });\n\t}\n\t\n\t/**\n\t * Mixin `Emitter` and `requestBase`.\n\t */\n\t\n\tEmitter(Request.prototype);\n\tfor (var key in requestBase) {\n\t  Request.prototype[key] = requestBase[key];\n\t}\n\t\n\t/**\n\t * Abort the request, and clear potential timeout.\n\t *\n\t * @return {Request}\n\t * @api public\n\t */\n\t\n\tRequest.prototype.abort = function(){\n\t  if (this.aborted) return;\n\t  this.aborted = true;\n\t  this.xhr.abort();\n\t  this.clearTimeout();\n\t  this.emit('abort');\n\t  return this;\n\t};\n\t\n\t/**\n\t * Set Content-Type to `type`, mapping values from `request.types`.\n\t *\n\t * Examples:\n\t *\n\t *      superagent.types.xml = 'application/xml';\n\t *\n\t *      request.post('/')\n\t *        .type('xml')\n\t *        .send(xmlstring)\n\t *        .end(callback);\n\t *\n\t *      request.post('/')\n\t *        .type('application/xml')\n\t *        .send(xmlstring)\n\t *        .end(callback);\n\t *\n\t * @param {String} type\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\tRequest.prototype.type = function(type){\n\t  this.set('Content-Type', request.types[type] || type);\n\t  return this;\n\t};\n\t\n\t/**\n\t * Set responseType to `val`. Presently valid responseTypes are 'blob' and \n\t * 'arraybuffer'.\n\t *\n\t * Examples:\n\t *\n\t *      req.get('/')\n\t *        .responseType('blob')\n\t *        .end(callback);\n\t *\n\t * @param {String} val\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\tRequest.prototype.responseType = function(val){\n\t  this._responseType = val;\n\t  return this;\n\t};\n\t\n\t/**\n\t * Set Accept to `type`, mapping values from `request.types`.\n\t *\n\t * Examples:\n\t *\n\t *      superagent.types.json = 'application/json';\n\t *\n\t *      request.get('/agent')\n\t *        .accept('json')\n\t *        .end(callback);\n\t *\n\t *      request.get('/agent')\n\t *        .accept('application/json')\n\t *        .end(callback);\n\t *\n\t * @param {String} accept\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\tRequest.prototype.accept = function(type){\n\t  this.set('Accept', request.types[type] || type);\n\t  return this;\n\t};\n\t\n\t/**\n\t * Set Authorization field value with `user` and `pass`.\n\t *\n\t * @param {String} user\n\t * @param {String} pass\n\t * @param {Object} options with 'type' property 'auto' or 'basic' (default 'basic')\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\tRequest.prototype.auth = function(user, pass, options){\n\t  if (!options) {\n\t    options = {\n\t      type: 'basic'\n\t    }\n\t  }\n\t\n\t  switch (options.type) {\n\t    case 'basic':\n\t      var str = btoa(user + ':' + pass);\n\t      this.set('Authorization', 'Basic ' + str);\n\t    break;\n\t\n\t    case 'auto':\n\t      this.username = user;\n\t      this.password = pass;\n\t    break;\n\t  }\n\t  return this;\n\t};\n\t\n\t/**\n\t* Add query-string `val`.\n\t*\n\t* Examples:\n\t*\n\t*   request.get('/shoes')\n\t*     .query('size=10')\n\t*     .query({ color: 'blue' })\n\t*\n\t* @param {Object|String} val\n\t* @return {Request} for chaining\n\t* @api public\n\t*/\n\t\n\tRequest.prototype.query = function(val){\n\t  if ('string' != typeof val) val = serialize(val);\n\t  if (val) this._query.push(val);\n\t  return this;\n\t};\n\t\n\t/**\n\t * Queue the given `file` as an attachment to the specified `field`,\n\t * with optional `filename`.\n\t *\n\t * ``` js\n\t * request.post('/upload')\n\t *   .attach(new Blob(['<a id=\"a\"><b id=\"b\">hey!</b></a>'], { type: \"text/html\"}))\n\t *   .end(callback);\n\t * ```\n\t *\n\t * @param {String} field\n\t * @param {Blob|File} file\n\t * @param {String} filename\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\tRequest.prototype.attach = function(field, file, filename){\n\t  this._getFormData().append(field, file, filename || file.name);\n\t  return this;\n\t};\n\t\n\tRequest.prototype._getFormData = function(){\n\t  if (!this._formData) {\n\t    this._formData = new root.FormData();\n\t  }\n\t  return this._formData;\n\t};\n\t\n\t/**\n\t * Send `data` as the request body, defaulting the `.type()` to \"json\" when\n\t * an object is given.\n\t *\n\t * Examples:\n\t *\n\t *       // manual json\n\t *       request.post('/user')\n\t *         .type('json')\n\t *         .send('{\"name\":\"tj\"}')\n\t *         .end(callback)\n\t *\n\t *       // auto json\n\t *       request.post('/user')\n\t *         .send({ name: 'tj' })\n\t *         .end(callback)\n\t *\n\t *       // manual x-www-form-urlencoded\n\t *       request.post('/user')\n\t *         .type('form')\n\t *         .send('name=tj')\n\t *         .end(callback)\n\t *\n\t *       // auto x-www-form-urlencoded\n\t *       request.post('/user')\n\t *         .type('form')\n\t *         .send({ name: 'tj' })\n\t *         .end(callback)\n\t *\n\t *       // defaults to x-www-form-urlencoded\n\t  *      request.post('/user')\n\t  *        .send('name=tobi')\n\t  *        .send('species=ferret')\n\t  *        .end(callback)\n\t *\n\t * @param {String|Object} data\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\tRequest.prototype.send = function(data){\n\t  var obj = isObject(data);\n\t  var type = this._header['content-type'];\n\t\n\t  // merge\n\t  if (obj && isObject(this._data)) {\n\t    for (var key in data) {\n\t      this._data[key] = data[key];\n\t    }\n\t  } else if ('string' == typeof data) {\n\t    if (!type) this.type('form');\n\t    type = this._header['content-type'];\n\t    if ('application/x-www-form-urlencoded' == type) {\n\t      this._data = this._data\n\t        ? this._data + '&' + data\n\t        : data;\n\t    } else {\n\t      this._data = (this._data || '') + data;\n\t    }\n\t  } else {\n\t    this._data = data;\n\t  }\n\t\n\t  if (!obj || isHost(data)) return this;\n\t  if (!type) this.type('json');\n\t  return this;\n\t};\n\t\n\t/**\n\t * @deprecated\n\t */\n\tResponse.prototype.parse = function serialize(fn){\n\t  if (root.console) {\n\t    console.warn(\"Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0\");\n\t  }\n\t  this.serialize(fn);\n\t  return this;\n\t};\n\t\n\tResponse.prototype.serialize = function serialize(fn){\n\t  this._parser = fn;\n\t  return this;\n\t};\n\t\n\t/**\n\t * Invoke the callback with `err` and `res`\n\t * and handle arity check.\n\t *\n\t * @param {Error} err\n\t * @param {Response} res\n\t * @api private\n\t */\n\t\n\tRequest.prototype.callback = function(err, res){\n\t  var fn = this._callback;\n\t  this.clearTimeout();\n\t  fn(err, res);\n\t};\n\t\n\t/**\n\t * Invoke callback with x-domain error.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.crossDomainError = function(){\n\t  var err = new Error('Request has been terminated\\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.');\n\t  err.crossDomain = true;\n\t\n\t  err.status = this.status;\n\t  err.method = this.method;\n\t  err.url = this.url;\n\t\n\t  this.callback(err);\n\t};\n\t\n\t/**\n\t * Invoke callback with timeout error.\n\t *\n\t * @api private\n\t */\n\t\n\tRequest.prototype.timeoutError = function(){\n\t  var timeout = this._timeout;\n\t  var err = new Error('timeout of ' + timeout + 'ms exceeded');\n\t  err.timeout = timeout;\n\t  this.callback(err);\n\t};\n\t\n\t/**\n\t * Enable transmission of cookies with x-domain requests.\n\t *\n\t * Note that for this to work the origin must not be\n\t * using \"Access-Control-Allow-Origin\" with a wildcard,\n\t * and also must set \"Access-Control-Allow-Credentials\"\n\t * to \"true\".\n\t *\n\t * @api public\n\t */\n\t\n\tRequest.prototype.withCredentials = function(){\n\t  this._withCredentials = true;\n\t  return this;\n\t};\n\t\n\t/**\n\t * Initiate request, invoking callback `fn(res)`\n\t * with an instanceof `Response`.\n\t *\n\t * @param {Function} fn\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\tRequest.prototype.end = function(fn){\n\t  var self = this;\n\t  var xhr = this.xhr = request.getXHR();\n\t  var query = this._query.join('&');\n\t  var timeout = this._timeout;\n\t  var data = this._formData || this._data;\n\t\n\t  // store callback\n\t  this._callback = fn || noop;\n\t\n\t  // state change\n\t  xhr.onreadystatechange = function(){\n\t    if (4 != xhr.readyState) return;\n\t\n\t    // In IE9, reads to any property (e.g. status) off of an aborted XHR will\n\t    // result in the error \"Could not complete the operation due to error c00c023f\"\n\t    var status;\n\t    try { status = xhr.status } catch(e) { status = 0; }\n\t\n\t    if (0 == status) {\n\t      if (self.timedout) return self.timeoutError();\n\t      if (self.aborted) return;\n\t      return self.crossDomainError();\n\t    }\n\t    self.emit('end');\n\t  };\n\t\n\t  // progress\n\t  var handleProgress = function(e){\n\t    if (e.total > 0) {\n\t      e.percent = e.loaded / e.total * 100;\n\t    }\n\t    e.direction = 'download';\n\t    self.emit('progress', e);\n\t  };\n\t  if (this.hasListeners('progress')) {\n\t    xhr.onprogress = handleProgress;\n\t  }\n\t  try {\n\t    if (xhr.upload && this.hasListeners('progress')) {\n\t      xhr.upload.onprogress = handleProgress;\n\t    }\n\t  } catch(e) {\n\t    // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist.\n\t    // Reported here:\n\t    // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context\n\t  }\n\t\n\t  // timeout\n\t  if (timeout && !this._timer) {\n\t    this._timer = setTimeout(function(){\n\t      self.timedout = true;\n\t      self.abort();\n\t    }, timeout);\n\t  }\n\t\n\t  // querystring\n\t  if (query) {\n\t    query = request.serializeObject(query);\n\t    this.url += ~this.url.indexOf('?')\n\t      ? '&' + query\n\t      : '?' + query;\n\t  }\n\t\n\t  // initiate request\n\t  if (this.username && this.password) {\n\t    xhr.open(this.method, this.url, true, this.username, this.password);\n\t  } else {\n\t    xhr.open(this.method, this.url, true);\n\t  }\n\t\n\t  // CORS\n\t  if (this._withCredentials) xhr.withCredentials = true;\n\t\n\t  // body\n\t  if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !isHost(data)) {\n\t    // serialize stuff\n\t    var contentType = this._header['content-type'];\n\t    var serialize = this._parser || request.serialize[contentType ? contentType.split(';')[0] : ''];\n\t    if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json'];\n\t    if (serialize) data = serialize(data);\n\t  }\n\t\n\t  // set header fields\n\t  for (var field in this.header) {\n\t    if (null == this.header[field]) continue;\n\t    xhr.setRequestHeader(field, this.header[field]);\n\t  }\n\t\n\t  if (this._responseType) {\n\t    xhr.responseType = this._responseType;\n\t  }\n\t\n\t  // send stuff\n\t  this.emit('request', this);\n\t\n\t  // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing)\n\t  // We need null here if data is undefined\n\t  xhr.send(typeof data !== 'undefined' ? data : null);\n\t  return this;\n\t};\n\t\n\t\n\t/**\n\t * Expose `Request`.\n\t */\n\t\n\trequest.Request = Request;\n\t\n\t/**\n\t * GET `url` with optional callback `fn(res)`.\n\t *\n\t * @param {String} url\n\t * @param {Mixed|Function} data or fn\n\t * @param {Function} fn\n\t * @return {Request}\n\t * @api public\n\t */\n\t\n\trequest.get = function(url, data, fn){\n\t  var req = request('GET', url);\n\t  if ('function' == typeof data) fn = data, data = null;\n\t  if (data) req.query(data);\n\t  if (fn) req.end(fn);\n\t  return req;\n\t};\n\t\n\t/**\n\t * HEAD `url` with optional callback `fn(res)`.\n\t *\n\t * @param {String} url\n\t * @param {Mixed|Function} data or fn\n\t * @param {Function} fn\n\t * @return {Request}\n\t * @api public\n\t */\n\t\n\trequest.head = function(url, data, fn){\n\t  var req = request('HEAD', url);\n\t  if ('function' == typeof data) fn = data, data = null;\n\t  if (data) req.send(data);\n\t  if (fn) req.end(fn);\n\t  return req;\n\t};\n\t\n\t/**\n\t * DELETE `url` with optional callback `fn(res)`.\n\t *\n\t * @param {String} url\n\t * @param {Function} fn\n\t * @return {Request}\n\t * @api public\n\t */\n\t\n\tfunction del(url, fn){\n\t  var req = request('DELETE', url);\n\t  if (fn) req.end(fn);\n\t  return req;\n\t};\n\t\n\trequest['del'] = del;\n\trequest['delete'] = del;\n\t\n\t/**\n\t * PATCH `url` with optional `data` and callback `fn(res)`.\n\t *\n\t * @param {String} url\n\t * @param {Mixed} data\n\t * @param {Function} fn\n\t * @return {Request}\n\t * @api public\n\t */\n\t\n\trequest.patch = function(url, data, fn){\n\t  var req = request('PATCH', url);\n\t  if ('function' == typeof data) fn = data, data = null;\n\t  if (data) req.send(data);\n\t  if (fn) req.end(fn);\n\t  return req;\n\t};\n\t\n\t/**\n\t * POST `url` with optional `data` and callback `fn(res)`.\n\t *\n\t * @param {String} url\n\t * @param {Mixed} data\n\t * @param {Function} fn\n\t * @return {Request}\n\t * @api public\n\t */\n\t\n\trequest.post = function(url, data, fn){\n\t  var req = request('POST', url);\n\t  if ('function' == typeof data) fn = data, data = null;\n\t  if (data) req.send(data);\n\t  if (fn) req.end(fn);\n\t  return req;\n\t};\n\t\n\t/**\n\t * PUT `url` with optional `data` and callback `fn(res)`.\n\t *\n\t * @param {String} url\n\t * @param {Mixed|Function} data or fn\n\t * @param {Function} fn\n\t * @return {Request}\n\t * @api public\n\t */\n\t\n\trequest.put = function(url, data, fn){\n\t  var req = request('PUT', url);\n\t  if ('function' == typeof data) fn = data, data = null;\n\t  if (data) req.send(data);\n\t  if (fn) req.end(fn);\n\t  return req;\n\t};\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\r\n\t/**\r\n\t * Expose `Emitter`.\r\n\t */\r\n\t\r\n\tif (true) {\r\n\t  module.exports = Emitter;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Initialize a new `Emitter`.\r\n\t *\r\n\t * @api public\r\n\t */\r\n\t\r\n\tfunction Emitter(obj) {\r\n\t  if (obj) return mixin(obj);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Mixin the emitter properties.\r\n\t *\r\n\t * @param {Object} obj\r\n\t * @return {Object}\r\n\t * @api private\r\n\t */\r\n\t\r\n\tfunction mixin(obj) {\r\n\t  for (var key in Emitter.prototype) {\r\n\t    obj[key] = Emitter.prototype[key];\r\n\t  }\r\n\t  return obj;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Listen on the given `event` with `fn`.\r\n\t *\r\n\t * @param {String} event\r\n\t * @param {Function} fn\r\n\t * @return {Emitter}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.on =\r\n\tEmitter.prototype.addEventListener = function(event, fn){\r\n\t  this._callbacks = this._callbacks || {};\r\n\t  (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n\t    .push(fn);\r\n\t  return this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Adds an `event` listener that will be invoked a single\r\n\t * time then automatically removed.\r\n\t *\r\n\t * @param {String} event\r\n\t * @param {Function} fn\r\n\t * @return {Emitter}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.once = function(event, fn){\r\n\t  function on() {\r\n\t    this.off(event, on);\r\n\t    fn.apply(this, arguments);\r\n\t  }\r\n\t\r\n\t  on.fn = fn;\r\n\t  this.on(event, on);\r\n\t  return this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Remove the given callback for `event` or all\r\n\t * registered callbacks.\r\n\t *\r\n\t * @param {String} event\r\n\t * @param {Function} fn\r\n\t * @return {Emitter}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.off =\r\n\tEmitter.prototype.removeListener =\r\n\tEmitter.prototype.removeAllListeners =\r\n\tEmitter.prototype.removeEventListener = function(event, fn){\r\n\t  this._callbacks = this._callbacks || {};\r\n\t\r\n\t  // all\r\n\t  if (0 == arguments.length) {\r\n\t    this._callbacks = {};\r\n\t    return this;\r\n\t  }\r\n\t\r\n\t  // specific event\r\n\t  var callbacks = this._callbacks['$' + event];\r\n\t  if (!callbacks) return this;\r\n\t\r\n\t  // remove all handlers\r\n\t  if (1 == arguments.length) {\r\n\t    delete this._callbacks['$' + event];\r\n\t    return this;\r\n\t  }\r\n\t\r\n\t  // remove specific handler\r\n\t  var cb;\r\n\t  for (var i = 0; i < callbacks.length; i++) {\r\n\t    cb = callbacks[i];\r\n\t    if (cb === fn || cb.fn === fn) {\r\n\t      callbacks.splice(i, 1);\r\n\t      break;\r\n\t    }\r\n\t  }\r\n\t  return this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Emit `event` with the given args.\r\n\t *\r\n\t * @param {String} event\r\n\t * @param {Mixed} ...\r\n\t * @return {Emitter}\r\n\t */\r\n\t\r\n\tEmitter.prototype.emit = function(event){\r\n\t  this._callbacks = this._callbacks || {};\r\n\t  var args = [].slice.call(arguments, 1)\r\n\t    , callbacks = this._callbacks['$' + event];\r\n\t\r\n\t  if (callbacks) {\r\n\t    callbacks = callbacks.slice(0);\r\n\t    for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n\t      callbacks[i].apply(this, args);\r\n\t    }\r\n\t  }\r\n\t\r\n\t  return this;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Return array of callbacks for `event`.\r\n\t *\r\n\t * @param {String} event\r\n\t * @return {Array}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.listeners = function(event){\r\n\t  this._callbacks = this._callbacks || {};\r\n\t  return this._callbacks['$' + event] || [];\r\n\t};\r\n\t\r\n\t/**\r\n\t * Check if this emitter has `event` handlers.\r\n\t *\r\n\t * @param {String} event\r\n\t * @return {Boolean}\r\n\t * @api public\r\n\t */\r\n\t\r\n\tEmitter.prototype.hasListeners = function(event){\r\n\t  return !! this.listeners(event).length;\r\n\t};\r\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t\n\t/**\n\t * Reduce `arr` with `fn`.\n\t *\n\t * @param {Array} arr\n\t * @param {Function} fn\n\t * @param {Mixed} initial\n\t *\n\t * TODO: combatible error handling?\n\t */\n\t\n\tmodule.exports = function(arr, fn, initial){  \n\t  var idx = 0;\n\t  var len = arr.length;\n\t  var curr = arguments.length == 3\n\t    ? initial\n\t    : arr[idx++];\n\t\n\t  while (idx < len) {\n\t    curr = fn.call(null, curr, arr[idx], ++idx, arr);\n\t  }\n\t  \n\t  return curr;\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Module of mixed-in functions shared between node and client code\n\t */\n\tvar isObject = __webpack_require__(5);\n\t\n\t/**\n\t * Clear previous timeout.\n\t *\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\texports.clearTimeout = function _clearTimeout(){\n\t  this._timeout = 0;\n\t  clearTimeout(this._timer);\n\t  return this;\n\t};\n\t\n\t/**\n\t * Force given parser\n\t *\n\t * Sets the body parser no matter type.\n\t *\n\t * @param {Function}\n\t * @api public\n\t */\n\t\n\texports.parse = function parse(fn){\n\t  this._parser = fn;\n\t  return this;\n\t};\n\t\n\t/**\n\t * Set timeout to `ms`.\n\t *\n\t * @param {Number} ms\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\texports.timeout = function timeout(ms){\n\t  this._timeout = ms;\n\t  return this;\n\t};\n\t\n\t/**\n\t * Faux promise support\n\t *\n\t * @param {Function} fulfill\n\t * @param {Function} reject\n\t * @return {Request}\n\t */\n\t\n\texports.then = function then(fulfill, reject) {\n\t  return this.end(function(err, res) {\n\t    err ? reject(err) : fulfill(res);\n\t  });\n\t}\n\t\n\t/**\n\t * Allow for extension\n\t */\n\t\n\texports.use = function use(fn) {\n\t  fn(this);\n\t  return this;\n\t}\n\t\n\t\n\t/**\n\t * Get request header `field`.\n\t * Case-insensitive.\n\t *\n\t * @param {String} field\n\t * @return {String}\n\t * @api public\n\t */\n\t\n\texports.get = function(field){\n\t  return this._header[field.toLowerCase()];\n\t};\n\t\n\t/**\n\t * Get case-insensitive header `field` value.\n\t * This is a deprecated internal API. Use `.get(field)` instead.\n\t *\n\t * (getHeader is no longer used internally by the superagent code base)\n\t *\n\t * @param {String} field\n\t * @return {String}\n\t * @api private\n\t * @deprecated\n\t */\n\t\n\texports.getHeader = exports.get;\n\t\n\t/**\n\t * Set header `field` to `val`, or multiple fields with one object.\n\t * Case-insensitive.\n\t *\n\t * Examples:\n\t *\n\t *      req.get('/')\n\t *        .set('Accept', 'application/json')\n\t *        .set('X-API-Key', 'foobar')\n\t *        .end(callback);\n\t *\n\t *      req.get('/')\n\t *        .set({ Accept: 'application/json', 'X-API-Key': 'foobar' })\n\t *        .end(callback);\n\t *\n\t * @param {String|Object} field\n\t * @param {String} val\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\t\n\texports.set = function(field, val){\n\t  if (isObject(field)) {\n\t    for (var key in field) {\n\t      this.set(key, field[key]);\n\t    }\n\t    return this;\n\t  }\n\t  this._header[field.toLowerCase()] = val;\n\t  this.header[field] = val;\n\t  return this;\n\t};\n\t\n\t/**\n\t * Remove header `field`.\n\t * Case-insensitive.\n\t *\n\t * Example:\n\t *\n\t *      req.get('/')\n\t *        .unset('User-Agent')\n\t *        .end(callback);\n\t *\n\t * @param {String} field\n\t */\n\texports.unset = function(field){\n\t  delete this._header[field.toLowerCase()];\n\t  delete this.header[field];\n\t  return this;\n\t};\n\t\n\t/**\n\t * Write the field `name` and `val` for \"multipart/form-data\"\n\t * request bodies.\n\t *\n\t * ``` js\n\t * request.post('/upload')\n\t *   .field('foo', 'bar')\n\t *   .end(callback);\n\t * ```\n\t *\n\t * @param {String} name\n\t * @param {String|Blob|File|Buffer|fs.ReadStream} val\n\t * @return {Request} for chaining\n\t * @api public\n\t */\n\texports.field = function(name, val) {\n\t  this._getFormData().append(name, val);\n\t  return this;\n\t};\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t/**\n\t * Check if `obj` is an object.\n\t *\n\t * @param {Object} obj\n\t * @return {Boolean}\n\t * @api private\n\t */\n\t\n\tfunction isObject(obj) {\n\t  return null != obj && 'object' == typeof obj;\n\t}\n\t\n\tmodule.exports = isObject;\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t// The node and browser modules expose versions of this with the\n\t// appropriate constructor function bound as first argument\n\t/**\n\t * Issue a request:\n\t *\n\t * Examples:\n\t *\n\t *    request('GET', '/users').end(callback)\n\t *    request('/users').end(callback)\n\t *    request('/users', callback)\n\t *\n\t * @param {String} method\n\t * @param {String|Function} url or callback\n\t * @return {Request}\n\t * @api public\n\t */\n\t\n\tfunction request(RequestConstructor, method, url) {\n\t  // callback\n\t  if ('function' == typeof url) {\n\t    return new RequestConstructor('GET', method).end(url);\n\t  }\n\t\n\t  // url first\n\t  if (2 == arguments.length) {\n\t    return new RequestConstructor('GET', method);\n\t  }\n\t\n\t  return new RequestConstructor(method, url);\n\t}\n\t\n\tmodule.exports = request;\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t *\n\t *  Base64 encode / decode\n\t *  http://www.webtoolkit.info/\n\t *  https://gist.github.com/Nowalon/6579878\n\t **/\n\t\n\tvar Base64 = module.exports = {\n\t\n\t    // private property\n\t    _keyStr: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n\t\n\t    // public method for encoding\n\t    encode: function encode(input) {\n\t        var output = \"\";\n\t        var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n\t        var i = 0;\n\t\n\t        input = Base64._utf8_encode(input);\n\t\n\t        while (i < input.length) {\n\t\n\t            chr1 = input.charCodeAt(i++);\n\t            chr2 = input.charCodeAt(i++);\n\t            chr3 = input.charCodeAt(i++);\n\t\n\t            enc1 = chr1 >> 2;\n\t            enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n\t            enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n\t            enc4 = chr3 & 63;\n\t\n\t            if (isNaN(chr2)) {\n\t                enc3 = enc4 = 64;\n\t            } else if (isNaN(chr3)) {\n\t                enc4 = 64;\n\t            }\n\t\n\t            output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);\n\t        }\n\t\n\t        return output;\n\t    },\n\t\n\t    // public method for decoding\n\t    decode: function decode(input) {\n\t        var output = \"\";\n\t        var chr1, chr2, chr3;\n\t        var enc1, enc2, enc3, enc4;\n\t        var i = 0;\n\t\n\t        input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\t\n\t        while (i < input.length) {\n\t\n\t            enc1 = this._keyStr.indexOf(input.charAt(i++));\n\t            enc2 = this._keyStr.indexOf(input.charAt(i++));\n\t            enc3 = this._keyStr.indexOf(input.charAt(i++));\n\t            enc4 = this._keyStr.indexOf(input.charAt(i++));\n\t\n\t            chr1 = enc1 << 2 | enc2 >> 4;\n\t            chr2 = (enc2 & 15) << 4 | enc3 >> 2;\n\t            chr3 = (enc3 & 3) << 6 | enc4;\n\t\n\t            output = output + String.fromCharCode(chr1);\n\t\n\t            if (enc3 != 64) {\n\t                output = output + String.fromCharCode(chr2);\n\t            }\n\t            if (enc4 != 64) {\n\t                output = output + String.fromCharCode(chr3);\n\t            }\n\t        }\n\t\n\t        output = Base64._utf8_decode(output);\n\t\n\t        return output;\n\t    },\n\t\n\t    // private method for UTF-8 encoding\n\t    _utf8_encode: function _utf8_encode(string) {\n\t        string = string.replace(/\\r\\n/g, \"\\n\");\n\t        var utftext = \"\";\n\t\n\t        for (var n = 0; n < string.length; n++) {\n\t\n\t            var c = string.charCodeAt(n);\n\t\n\t            if (c < 128) {\n\t                utftext += String.fromCharCode(c);\n\t            } else if (c > 127 && c < 2048) {\n\t                utftext += String.fromCharCode(c >> 6 | 192);\n\t                utftext += String.fromCharCode(c & 63 | 128);\n\t            } else {\n\t                utftext += String.fromCharCode(c >> 12 | 224);\n\t                utftext += String.fromCharCode(c >> 6 & 63 | 128);\n\t                utftext += String.fromCharCode(c & 63 | 128);\n\t            }\n\t        }\n\t\n\t        return utftext;\n\t    },\n\t\n\t    // private method for UTF-8 decoding\n\t    _utf8_decode: function _utf8_decode(utftext) {\n\t        var string = \"\";\n\t        var i = 0;\n\t        var c = 0,\n\t            c1 = 0,\n\t            c2 = 0;\n\t\n\t        while (i < utftext.length) {\n\t\n\t            c = utftext.charCodeAt(i);\n\t\n\t            if (c < 128) {\n\t                string += String.fromCharCode(c);\n\t                i++;\n\t            } else if (c > 191 && c < 224) {\n\t                c2 = utftext.charCodeAt(i + 1);\n\t                string += String.fromCharCode((c & 31) << 6 | c2 & 63);\n\t                i += 2;\n\t            } else {\n\t                c2 = utftext.charCodeAt(i + 1);\n\t                var c3 = utftext.charCodeAt(i + 2);\n\t                string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n\t                i += 3;\n\t            }\n\t        }\n\t\n\t        return string;\n\t    }\n\t\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\tvar punycode = __webpack_require__(9);\n\t\n\texports.parse = urlParse;\n\texports.resolve = urlResolve;\n\texports.resolveObject = urlResolveObject;\n\texports.format = urlFormat;\n\t\n\texports.Url = Url;\n\t\n\tfunction Url() {\n\t  this.protocol = null;\n\t  this.slashes = null;\n\t  this.auth = null;\n\t  this.host = null;\n\t  this.port = null;\n\t  this.hostname = null;\n\t  this.hash = null;\n\t  this.search = null;\n\t  this.query = null;\n\t  this.pathname = null;\n\t  this.path = null;\n\t  this.href = null;\n\t}\n\t\n\t// Reference: RFC 3986, RFC 1808, RFC 2396\n\t\n\t// define these here so at least they only have to be\n\t// compiled once on the first module load.\n\tvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n\t    portPattern = /:[0-9]*$/,\n\t\n\t    // RFC 2396: characters reserved for delimiting URLs.\n\t    // We actually just auto-escape these.\n\t    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\t\n\t    // RFC 2396: characters not allowed for various reasons.\n\t    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\t\n\t    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n\t    autoEscape = ['\\''].concat(unwise),\n\t    // Characters that are never ever allowed in a hostname.\n\t    // Note that any invalid chars are also handled, but these\n\t    // are the ones that are *expected* to be seen, so we fast-path\n\t    // them.\n\t    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n\t    hostEndingChars = ['/', '?', '#'],\n\t    hostnameMaxLen = 255,\n\t    hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/,\n\t    hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/,\n\t    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n\t    unsafeProtocol = {\n\t      'javascript': true,\n\t      'javascript:': true\n\t    },\n\t    // protocols that never have a hostname.\n\t    hostlessProtocol = {\n\t      'javascript': true,\n\t      'javascript:': true\n\t    },\n\t    // protocols that always contain a // bit.\n\t    slashedProtocol = {\n\t      'http': true,\n\t      'https': true,\n\t      'ftp': true,\n\t      'gopher': true,\n\t      'file': true,\n\t      'http:': true,\n\t      'https:': true,\n\t      'ftp:': true,\n\t      'gopher:': true,\n\t      'file:': true\n\t    },\n\t    querystring = __webpack_require__(11);\n\t\n\tfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n\t  if (url && isObject(url) && url instanceof Url) return url;\n\t\n\t  var u = new Url;\n\t  u.parse(url, parseQueryString, slashesDenoteHost);\n\t  return u;\n\t}\n\t\n\tUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n\t  if (!isString(url)) {\n\t    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n\t  }\n\t\n\t  var rest = url;\n\t\n\t  // trim before proceeding.\n\t  // This is to support parse stuff like \"  http://foo.com  \\n\"\n\t  rest = rest.trim();\n\t\n\t  var proto = protocolPattern.exec(rest);\n\t  if (proto) {\n\t    proto = proto[0];\n\t    var lowerProto = proto.toLowerCase();\n\t    this.protocol = lowerProto;\n\t    rest = rest.substr(proto.length);\n\t  }\n\t\n\t  // figure out if it's got a host\n\t  // user@server is *always* interpreted as a hostname, and url\n\t  // resolution will treat //foo/bar as host=foo,path=bar because that's\n\t  // how the browser resolves relative URLs.\n\t  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n\t    var slashes = rest.substr(0, 2) === '//';\n\t    if (slashes && !(proto && hostlessProtocol[proto])) {\n\t      rest = rest.substr(2);\n\t      this.slashes = true;\n\t    }\n\t  }\n\t\n\t  if (!hostlessProtocol[proto] &&\n\t      (slashes || (proto && !slashedProtocol[proto]))) {\n\t\n\t    // there's a hostname.\n\t    // the first instance of /, ?, ;, or # ends the host.\n\t    //\n\t    // If there is an @ in the hostname, then non-host chars *are* allowed\n\t    // to the left of the last @ sign, unless some host-ending character\n\t    // comes *before* the @-sign.\n\t    // URLs are obnoxious.\n\t    //\n\t    // ex:\n\t    // http://a@b@c/ => user:a@b host:c\n\t    // http://a@b?@c => user:a host:c path:/?@c\n\t\n\t    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n\t    // Review our test case against browsers more comprehensively.\n\t\n\t    // find the first instance of any hostEndingChars\n\t    var hostEnd = -1;\n\t    for (var i = 0; i < hostEndingChars.length; i++) {\n\t      var hec = rest.indexOf(hostEndingChars[i]);\n\t      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n\t        hostEnd = hec;\n\t    }\n\t\n\t    // at this point, either we have an explicit point where the\n\t    // auth portion cannot go past, or the last @ char is the decider.\n\t    var auth, atSign;\n\t    if (hostEnd === -1) {\n\t      // atSign can be anywhere.\n\t      atSign = rest.lastIndexOf('@');\n\t    } else {\n\t      // atSign must be in auth portion.\n\t      // http://a@b/c@d => host:b auth:a path:/c@d\n\t      atSign = rest.lastIndexOf('@', hostEnd);\n\t    }\n\t\n\t    // Now we have a portion which is definitely the auth.\n\t    // Pull that off.\n\t    if (atSign !== -1) {\n\t      auth = rest.slice(0, atSign);\n\t      rest = rest.slice(atSign + 1);\n\t      this.auth = decodeURIComponent(auth);\n\t    }\n\t\n\t    // the host is the remaining to the left of the first non-host char\n\t    hostEnd = -1;\n\t    for (var i = 0; i < nonHostChars.length; i++) {\n\t      var hec = rest.indexOf(nonHostChars[i]);\n\t      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n\t        hostEnd = hec;\n\t    }\n\t    // if we still have not hit it, then the entire thing is a host.\n\t    if (hostEnd === -1)\n\t      hostEnd = rest.length;\n\t\n\t    this.host = rest.slice(0, hostEnd);\n\t    rest = rest.slice(hostEnd);\n\t\n\t    // pull out port.\n\t    this.parseHost();\n\t\n\t    // we've indicated that there is a hostname,\n\t    // so even if it's empty, it has to be present.\n\t    this.hostname = this.hostname || '';\n\t\n\t    // if hostname begins with [ and ends with ]\n\t    // assume that it's an IPv6 address.\n\t    var ipv6Hostname = this.hostname[0] === '[' &&\n\t        this.hostname[this.hostname.length - 1] === ']';\n\t\n\t    // validate a little.\n\t    if (!ipv6Hostname) {\n\t      var hostparts = this.hostname.split(/\\./);\n\t      for (var i = 0, l = hostparts.length; i < l; i++) {\n\t        var part = hostparts[i];\n\t        if (!part) continue;\n\t        if (!part.match(hostnamePartPattern)) {\n\t          var newpart = '';\n\t          for (var j = 0, k = part.length; j < k; j++) {\n\t            if (part.charCodeAt(j) > 127) {\n\t              // we replace non-ASCII char with a temporary placeholder\n\t              // we need this to make sure size of hostname is not\n\t              // broken by replacing non-ASCII by nothing\n\t              newpart += 'x';\n\t            } else {\n\t              newpart += part[j];\n\t            }\n\t          }\n\t          // we test again with ASCII char only\n\t          if (!newpart.match(hostnamePartPattern)) {\n\t            var validParts = hostparts.slice(0, i);\n\t            var notHost = hostparts.slice(i + 1);\n\t            var bit = part.match(hostnamePartStart);\n\t            if (bit) {\n\t              validParts.push(bit[1]);\n\t              notHost.unshift(bit[2]);\n\t            }\n\t            if (notHost.length) {\n\t              rest = '/' + notHost.join('.') + rest;\n\t            }\n\t            this.hostname = validParts.join('.');\n\t            break;\n\t          }\n\t        }\n\t      }\n\t    }\n\t\n\t    if (this.hostname.length > hostnameMaxLen) {\n\t      this.hostname = '';\n\t    } else {\n\t      // hostnames are always lower case.\n\t      this.hostname = this.hostname.toLowerCase();\n\t    }\n\t\n\t    if (!ipv6Hostname) {\n\t      // IDNA Support: Returns a puny coded representation of \"domain\".\n\t      // It only converts the part of the domain name that\n\t      // has non ASCII characters. I.e. it dosent matter if\n\t      // you call it with a domain that already is in ASCII.\n\t      var domainArray = this.hostname.split('.');\n\t      var newOut = [];\n\t      for (var i = 0; i < domainArray.length; ++i) {\n\t        var s = domainArray[i];\n\t        newOut.push(s.match(/[^A-Za-z0-9_-]/) ?\n\t            'xn--' + punycode.encode(s) : s);\n\t      }\n\t      this.hostname = newOut.join('.');\n\t    }\n\t\n\t    var p = this.port ? ':' + this.port : '';\n\t    var h = this.hostname || '';\n\t    this.host = h + p;\n\t    this.href += this.host;\n\t\n\t    // strip [ and ] from the hostname\n\t    // the host field still retains them, though\n\t    if (ipv6Hostname) {\n\t      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n\t      if (rest[0] !== '/') {\n\t        rest = '/' + rest;\n\t      }\n\t    }\n\t  }\n\t\n\t  // now rest is set to the post-host stuff.\n\t  // chop off any delim chars.\n\t  if (!unsafeProtocol[lowerProto]) {\n\t\n\t    // First, make 100% sure that any \"autoEscape\" chars get\n\t    // escaped, even if encodeURIComponent doesn't think they\n\t    // need to be.\n\t    for (var i = 0, l = autoEscape.length; i < l; i++) {\n\t      var ae = autoEscape[i];\n\t      var esc = encodeURIComponent(ae);\n\t      if (esc === ae) {\n\t        esc = escape(ae);\n\t      }\n\t      rest = rest.split(ae).join(esc);\n\t    }\n\t  }\n\t\n\t\n\t  // chop off from the tail first.\n\t  var hash = rest.indexOf('#');\n\t  if (hash !== -1) {\n\t    // got a fragment string.\n\t    this.hash = rest.substr(hash);\n\t    rest = rest.slice(0, hash);\n\t  }\n\t  var qm = rest.indexOf('?');\n\t  if (qm !== -1) {\n\t    this.search = rest.substr(qm);\n\t    this.query = rest.substr(qm + 1);\n\t    if (parseQueryString) {\n\t      this.query = querystring.parse(this.query);\n\t    }\n\t    rest = rest.slice(0, qm);\n\t  } else if (parseQueryString) {\n\t    // no query string, but parseQueryString still requested\n\t    this.search = '';\n\t    this.query = {};\n\t  }\n\t  if (rest) this.pathname = rest;\n\t  if (slashedProtocol[lowerProto] &&\n\t      this.hostname && !this.pathname) {\n\t    this.pathname = '/';\n\t  }\n\t\n\t  //to support http.request\n\t  if (this.pathname || this.search) {\n\t    var p = this.pathname || '';\n\t    var s = this.search || '';\n\t    this.path = p + s;\n\t  }\n\t\n\t  // finally, reconstruct the href based on what has been validated.\n\t  this.href = this.format();\n\t  return this;\n\t};\n\t\n\t// format a parsed object into a url string\n\tfunction urlFormat(obj) {\n\t  // ensure it's an object, and not a string url.\n\t  // If it's an obj, this is a no-op.\n\t  // this way, you can call url_format() on strings\n\t  // to clean up potentially wonky urls.\n\t  if (isString(obj)) obj = urlParse(obj);\n\t  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n\t  return obj.format();\n\t}\n\t\n\tUrl.prototype.format = function() {\n\t  var auth = this.auth || '';\n\t  if (auth) {\n\t    auth = encodeURIComponent(auth);\n\t    auth = auth.replace(/%3A/i, ':');\n\t    auth += '@';\n\t  }\n\t\n\t  var protocol = this.protocol || '',\n\t      pathname = this.pathname || '',\n\t      hash = this.hash || '',\n\t      host = false,\n\t      query = '';\n\t\n\t  if (this.host) {\n\t    host = auth + this.host;\n\t  } else if (this.hostname) {\n\t    host = auth + (this.hostname.indexOf(':') === -1 ?\n\t        this.hostname :\n\t        '[' + this.hostname + ']');\n\t    if (this.port) {\n\t      host += ':' + this.port;\n\t    }\n\t  }\n\t\n\t  if (this.query &&\n\t      isObject(this.query) &&\n\t      Object.keys(this.query).length) {\n\t    query = querystring.stringify(this.query);\n\t  }\n\t\n\t  var search = this.search || (query && ('?' + query)) || '';\n\t\n\t  if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\t\n\t  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n\t  // unless they had them to begin with.\n\t  if (this.slashes ||\n\t      (!protocol || slashedProtocol[protocol]) && host !== false) {\n\t    host = '//' + (host || '');\n\t    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n\t  } else if (!host) {\n\t    host = '';\n\t  }\n\t\n\t  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n\t  if (search && search.charAt(0) !== '?') search = '?' + search;\n\t\n\t  pathname = pathname.replace(/[?#]/g, function(match) {\n\t    return encodeURIComponent(match);\n\t  });\n\t  search = search.replace('#', '%23');\n\t\n\t  return protocol + host + pathname + search + hash;\n\t};\n\t\n\tfunction urlResolve(source, relative) {\n\t  return urlParse(source, false, true).resolve(relative);\n\t}\n\t\n\tUrl.prototype.resolve = function(relative) {\n\t  return this.resolveObject(urlParse(relative, false, true)).format();\n\t};\n\t\n\tfunction urlResolveObject(source, relative) {\n\t  if (!source) return relative;\n\t  return urlParse(source, false, true).resolveObject(relative);\n\t}\n\t\n\tUrl.prototype.resolveObject = function(relative) {\n\t  if (isString(relative)) {\n\t    var rel = new Url();\n\t    rel.parse(relative, false, true);\n\t    relative = rel;\n\t  }\n\t\n\t  var result = new Url();\n\t  Object.keys(this).forEach(function(k) {\n\t    result[k] = this[k];\n\t  }, this);\n\t\n\t  // hash is always overridden, no matter what.\n\t  // even href=\"\" will remove it.\n\t  result.hash = relative.hash;\n\t\n\t  // if the relative url is empty, then there's nothing left to do here.\n\t  if (relative.href === '') {\n\t    result.href = result.format();\n\t    return result;\n\t  }\n\t\n\t  // hrefs like //foo/bar always cut to the protocol.\n\t  if (relative.slashes && !relative.protocol) {\n\t    // take everything except the protocol from relative\n\t    Object.keys(relative).forEach(function(k) {\n\t      if (k !== 'protocol')\n\t        result[k] = relative[k];\n\t    });\n\t\n\t    //urlParse appends trailing / to urls like http://www.example.com\n\t    if (slashedProtocol[result.protocol] &&\n\t        result.hostname && !result.pathname) {\n\t      result.path = result.pathname = '/';\n\t    }\n\t\n\t    result.href = result.format();\n\t    return result;\n\t  }\n\t\n\t  if (relative.protocol && relative.protocol !== result.protocol) {\n\t    // if it's a known url protocol, then changing\n\t    // the protocol does weird things\n\t    // first, if it's not file:, then we MUST have a host,\n\t    // and if there was a path\n\t    // to begin with, then we MUST have a path.\n\t    // if it is file:, then the host is dropped,\n\t    // because that's known to be hostless.\n\t    // anything else is assumed to be absolute.\n\t    if (!slashedProtocol[relative.protocol]) {\n\t      Object.keys(relative).forEach(function(k) {\n\t        result[k] = relative[k];\n\t      });\n\t      result.href = result.format();\n\t      return result;\n\t    }\n\t\n\t    result.protocol = relative.protocol;\n\t    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n\t      var relPath = (relative.pathname || '').split('/');\n\t      while (relPath.length && !(relative.host = relPath.shift()));\n\t      if (!relative.host) relative.host = '';\n\t      if (!relative.hostname) relative.hostname = '';\n\t      if (relPath[0] !== '') relPath.unshift('');\n\t      if (relPath.length < 2) relPath.unshift('');\n\t      result.pathname = relPath.join('/');\n\t    } else {\n\t      result.pathname = relative.pathname;\n\t    }\n\t    result.search = relative.search;\n\t    result.query = relative.query;\n\t    result.host = relative.host || '';\n\t    result.auth = relative.auth;\n\t    result.hostname = relative.hostname || relative.host;\n\t    result.port = relative.port;\n\t    // to support http.request\n\t    if (result.pathname || result.search) {\n\t      var p = result.pathname || '';\n\t      var s = result.search || '';\n\t      result.path = p + s;\n\t    }\n\t    result.slashes = result.slashes || relative.slashes;\n\t    result.href = result.format();\n\t    return result;\n\t  }\n\t\n\t  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n\t      isRelAbs = (\n\t          relative.host ||\n\t          relative.pathname && relative.pathname.charAt(0) === '/'\n\t      ),\n\t      mustEndAbs = (isRelAbs || isSourceAbs ||\n\t                    (result.host && relative.pathname)),\n\t      removeAllDots = mustEndAbs,\n\t      srcPath = result.pathname && result.pathname.split('/') || [],\n\t      relPath = relative.pathname && relative.pathname.split('/') || [],\n\t      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\t\n\t  // if the url is a non-slashed url, then relative\n\t  // links like ../.. should be able\n\t  // to crawl up to the hostname, as well.  This is strange.\n\t  // result.protocol has already been set by now.\n\t  // Later on, put the first path part into the host field.\n\t  if (psychotic) {\n\t    result.hostname = '';\n\t    result.port = null;\n\t    if (result.host) {\n\t      if (srcPath[0] === '') srcPath[0] = result.host;\n\t      else srcPath.unshift(result.host);\n\t    }\n\t    result.host = '';\n\t    if (relative.protocol) {\n\t      relative.hostname = null;\n\t      relative.port = null;\n\t      if (relative.host) {\n\t        if (relPath[0] === '') relPath[0] = relative.host;\n\t        else relPath.unshift(relative.host);\n\t      }\n\t      relative.host = null;\n\t    }\n\t    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n\t  }\n\t\n\t  if (isRelAbs) {\n\t    // it's absolute.\n\t    result.host = (relative.host || relative.host === '') ?\n\t                  relative.host : result.host;\n\t    result.hostname = (relative.hostname || relative.hostname === '') ?\n\t                      relative.hostname : result.hostname;\n\t    result.search = relative.search;\n\t    result.query = relative.query;\n\t    srcPath = relPath;\n\t    // fall through to the dot-handling below.\n\t  } else if (relPath.length) {\n\t    // it's relative\n\t    // throw away the existing file, and take the new path instead.\n\t    if (!srcPath) srcPath = [];\n\t    srcPath.pop();\n\t    srcPath = srcPath.concat(relPath);\n\t    result.search = relative.search;\n\t    result.query = relative.query;\n\t  } else if (!isNullOrUndefined(relative.search)) {\n\t    // just pull out the search.\n\t    // like href='?foo'.\n\t    // Put this after the other two cases because it simplifies the booleans\n\t    if (psychotic) {\n\t      result.hostname = result.host = srcPath.shift();\n\t      //occationaly the auth can get stuck only in host\n\t      //this especialy happens in cases like\n\t      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n\t      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n\t                       result.host.split('@') : false;\n\t      if (authInHost) {\n\t        result.auth = authInHost.shift();\n\t        result.host = result.hostname = authInHost.shift();\n\t      }\n\t    }\n\t    result.search = relative.search;\n\t    result.query = relative.query;\n\t    //to support http.request\n\t    if (!isNull(result.pathname) || !isNull(result.search)) {\n\t      result.path = (result.pathname ? result.pathname : '') +\n\t                    (result.search ? result.search : '');\n\t    }\n\t    result.href = result.format();\n\t    return result;\n\t  }\n\t\n\t  if (!srcPath.length) {\n\t    // no path at all.  easy.\n\t    // we've already handled the other stuff above.\n\t    result.pathname = null;\n\t    //to support http.request\n\t    if (result.search) {\n\t      result.path = '/' + result.search;\n\t    } else {\n\t      result.path = null;\n\t    }\n\t    result.href = result.format();\n\t    return result;\n\t  }\n\t\n\t  // if a url ENDs in . or .., then it must get a trailing slash.\n\t  // however, if it ends in anything else non-slashy,\n\t  // then it must NOT get a trailing slash.\n\t  var last = srcPath.slice(-1)[0];\n\t  var hasTrailingSlash = (\n\t      (result.host || relative.host) && (last === '.' || last === '..') ||\n\t      last === '');\n\t\n\t  // strip single dots, resolve double dots to parent dir\n\t  // if the path tries to go above the root, `up` ends up > 0\n\t  var up = 0;\n\t  for (var i = srcPath.length; i >= 0; i--) {\n\t    last = srcPath[i];\n\t    if (last == '.') {\n\t      srcPath.splice(i, 1);\n\t    } else if (last === '..') {\n\t      srcPath.splice(i, 1);\n\t      up++;\n\t    } else if (up) {\n\t      srcPath.splice(i, 1);\n\t      up--;\n\t    }\n\t  }\n\t\n\t  // if the path is allowed to go above the root, restore leading ..s\n\t  if (!mustEndAbs && !removeAllDots) {\n\t    for (; up--; up) {\n\t      srcPath.unshift('..');\n\t    }\n\t  }\n\t\n\t  if (mustEndAbs && srcPath[0] !== '' &&\n\t      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n\t    srcPath.unshift('');\n\t  }\n\t\n\t  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n\t    srcPath.push('');\n\t  }\n\t\n\t  var isAbsolute = srcPath[0] === '' ||\n\t      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\t\n\t  // put the host back\n\t  if (psychotic) {\n\t    result.hostname = result.host = isAbsolute ? '' :\n\t                                    srcPath.length ? srcPath.shift() : '';\n\t    //occationaly the auth can get stuck only in host\n\t    //this especialy happens in cases like\n\t    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n\t    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n\t                     result.host.split('@') : false;\n\t    if (authInHost) {\n\t      result.auth = authInHost.shift();\n\t      result.host = result.hostname = authInHost.shift();\n\t    }\n\t  }\n\t\n\t  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\t\n\t  if (mustEndAbs && !isAbsolute) {\n\t    srcPath.unshift('');\n\t  }\n\t\n\t  if (!srcPath.length) {\n\t    result.pathname = null;\n\t    result.path = null;\n\t  } else {\n\t    result.pathname = srcPath.join('/');\n\t  }\n\t\n\t  //to support request.http\n\t  if (!isNull(result.pathname) || !isNull(result.search)) {\n\t    result.path = (result.pathname ? result.pathname : '') +\n\t                  (result.search ? result.search : '');\n\t  }\n\t  result.auth = relative.auth || result.auth;\n\t  result.slashes = result.slashes || relative.slashes;\n\t  result.href = result.format();\n\t  return result;\n\t};\n\t\n\tUrl.prototype.parseHost = function() {\n\t  var host = this.host;\n\t  var port = portPattern.exec(host);\n\t  if (port) {\n\t    port = port[0];\n\t    if (port !== ':') {\n\t      this.port = port.substr(1);\n\t    }\n\t    host = host.substr(0, host.length - port.length);\n\t  }\n\t  if (host) this.hostname = host;\n\t};\n\t\n\tfunction isString(arg) {\n\t  return typeof arg === \"string\";\n\t}\n\t\n\tfunction isObject(arg) {\n\t  return typeof arg === 'object' && arg !== null;\n\t}\n\t\n\tfunction isNull(arg) {\n\t  return arg === null;\n\t}\n\tfunction isNullOrUndefined(arg) {\n\t  return  arg == null;\n\t}\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {/*! https://mths.be/punycode v1.3.2 by @mathias */\n\t;(function(root) {\n\t\n\t\t/** Detect free variables */\n\t\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t\t!exports.nodeType && exports;\n\t\tvar freeModule = typeof module == 'object' && module &&\n\t\t\t!module.nodeType && module;\n\t\tvar freeGlobal = typeof global == 'object' && global;\n\t\tif (\n\t\t\tfreeGlobal.global === freeGlobal ||\n\t\t\tfreeGlobal.window === freeGlobal ||\n\t\t\tfreeGlobal.self === freeGlobal\n\t\t) {\n\t\t\troot = freeGlobal;\n\t\t}\n\t\n\t\t/**\n\t\t * The `punycode` object.\n\t\t * @name punycode\n\t\t * @type Object\n\t\t */\n\t\tvar punycode,\n\t\n\t\t/** Highest positive signed 32-bit float value */\n\t\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\t\n\t\t/** Bootstring parameters */\n\t\tbase = 36,\n\t\ttMin = 1,\n\t\ttMax = 26,\n\t\tskew = 38,\n\t\tdamp = 700,\n\t\tinitialBias = 72,\n\t\tinitialN = 128, // 0x80\n\t\tdelimiter = '-', // '\\x2D'\n\t\n\t\t/** Regular expressions */\n\t\tregexPunycode = /^xn--/,\n\t\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\t\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\t\n\t\t/** Error messages */\n\t\terrors = {\n\t\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t\t'invalid-input': 'Invalid input'\n\t\t},\n\t\n\t\t/** Convenience shortcuts */\n\t\tbaseMinusTMin = base - tMin,\n\t\tfloor = Math.floor,\n\t\tstringFromCharCode = String.fromCharCode,\n\t\n\t\t/** Temporary variable */\n\t\tkey;\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\t/**\n\t\t * A generic error utility function.\n\t\t * @private\n\t\t * @param {String} type The error type.\n\t\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t\t */\n\t\tfunction error(type) {\n\t\t\tthrow RangeError(errors[type]);\n\t\t}\n\t\n\t\t/**\n\t\t * A generic `Array#map` utility function.\n\t\t * @private\n\t\t * @param {Array} array The array to iterate over.\n\t\t * @param {Function} callback The function that gets called for every array\n\t\t * item.\n\t\t * @returns {Array} A new array of values returned by the callback function.\n\t\t */\n\t\tfunction map(array, fn) {\n\t\t\tvar length = array.length;\n\t\t\tvar result = [];\n\t\t\twhile (length--) {\n\t\t\t\tresult[length] = fn(array[length]);\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\n\t\t/**\n\t\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t\t * addresses.\n\t\t * @private\n\t\t * @param {String} domain The domain name or email address.\n\t\t * @param {Function} callback The function that gets called for every\n\t\t * character.\n\t\t * @returns {Array} A new string of characters returned by the callback\n\t\t * function.\n\t\t */\n\t\tfunction mapDomain(string, fn) {\n\t\t\tvar parts = string.split('@');\n\t\t\tvar result = '';\n\t\t\tif (parts.length > 1) {\n\t\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\t\tresult = parts[0] + '@';\n\t\t\t\tstring = parts[1];\n\t\t\t}\n\t\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\t\tvar labels = string.split('.');\n\t\t\tvar encoded = map(labels, fn).join('.');\n\t\t\treturn result + encoded;\n\t\t}\n\t\n\t\t/**\n\t\t * Creates an array containing the numeric code points of each Unicode\n\t\t * character in the string. While JavaScript uses UCS-2 internally,\n\t\t * this function will convert a pair of surrogate halves (each of which\n\t\t * UCS-2 exposes as separate characters) into a single code point,\n\t\t * matching UTF-16.\n\t\t * @see `punycode.ucs2.encode`\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode.ucs2\n\t\t * @name decode\n\t\t * @param {String} string The Unicode input string (UCS-2).\n\t\t * @returns {Array} The new array of code points.\n\t\t */\n\t\tfunction ucs2decode(string) {\n\t\t\tvar output = [],\n\t\t\t    counter = 0,\n\t\t\t    length = string.length,\n\t\t\t    value,\n\t\t\t    extra;\n\t\t\twhile (counter < length) {\n\t\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\t\toutput.push(value);\n\t\t\t\t\t\tcounter--;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\toutput.push(value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\t\n\t\t/**\n\t\t * Creates a string based on an array of numeric code points.\n\t\t * @see `punycode.ucs2.decode`\n\t\t * @memberOf punycode.ucs2\n\t\t * @name encode\n\t\t * @param {Array} codePoints The array of numeric code points.\n\t\t * @returns {String} The new Unicode string (UCS-2).\n\t\t */\n\t\tfunction ucs2encode(array) {\n\t\t\treturn map(array, function(value) {\n\t\t\t\tvar output = '';\n\t\t\t\tif (value > 0xFFFF) {\n\t\t\t\t\tvalue -= 0x10000;\n\t\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t\t}\n\t\t\t\toutput += stringFromCharCode(value);\n\t\t\t\treturn output;\n\t\t\t}).join('');\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a basic code point into a digit/integer.\n\t\t * @see `digitToBasic()`\n\t\t * @private\n\t\t * @param {Number} codePoint The basic numeric code point value.\n\t\t * @returns {Number} The numeric value of a basic code point (for use in\n\t\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t\t * the code point does not represent a value.\n\t\t */\n\t\tfunction basicToDigit(codePoint) {\n\t\t\tif (codePoint - 48 < 10) {\n\t\t\t\treturn codePoint - 22;\n\t\t\t}\n\t\t\tif (codePoint - 65 < 26) {\n\t\t\t\treturn codePoint - 65;\n\t\t\t}\n\t\t\tif (codePoint - 97 < 26) {\n\t\t\t\treturn codePoint - 97;\n\t\t\t}\n\t\t\treturn base;\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a digit/integer into a basic code point.\n\t\t * @see `basicToDigit()`\n\t\t * @private\n\t\t * @param {Number} digit The numeric value of a basic code point.\n\t\t * @returns {Number} The basic code point whose value (when used for\n\t\t * representing integers) is `digit`, which needs to be in the range\n\t\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t\t * used; else, the lowercase form is used. The behavior is undefined\n\t\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t\t */\n\t\tfunction digitToBasic(digit, flag) {\n\t\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t\t// 26..35 map to ASCII 0..9\n\t\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t\t}\n\t\n\t\t/**\n\t\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t\t * @private\n\t\t */\n\t\tfunction adapt(delta, numPoints, firstTime) {\n\t\t\tvar k = 0;\n\t\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\t\tdelta += floor(delta / numPoints);\n\t\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t\t}\n\t\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t\t * symbols.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t\t * @returns {String} The resulting string of Unicode symbols.\n\t\t */\n\t\tfunction decode(input) {\n\t\t\t// Don't use UCS-2\n\t\t\tvar output = [],\n\t\t\t    inputLength = input.length,\n\t\t\t    out,\n\t\t\t    i = 0,\n\t\t\t    n = initialN,\n\t\t\t    bias = initialBias,\n\t\t\t    basic,\n\t\t\t    j,\n\t\t\t    index,\n\t\t\t    oldi,\n\t\t\t    w,\n\t\t\t    k,\n\t\t\t    digit,\n\t\t\t    t,\n\t\t\t    /** Cached calculation results */\n\t\t\t    baseMinusT;\n\t\n\t\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t\t// the first basic code points to the output.\n\t\n\t\t\tbasic = input.lastIndexOf(delimiter);\n\t\t\tif (basic < 0) {\n\t\t\t\tbasic = 0;\n\t\t\t}\n\t\n\t\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t\t// if it's not a basic code point\n\t\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\t\terror('not-basic');\n\t\t\t\t}\n\t\t\t\toutput.push(input.charCodeAt(j));\n\t\t\t}\n\t\n\t\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t\t// points were copied; start at the beginning otherwise.\n\t\n\t\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\t\n\t\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t\t// value at the end to obtain `delta`.\n\t\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\t\n\t\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\t\terror('invalid-input');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\t\n\t\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\ti += digit * w;\n\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\n\t\t\t\t\tif (digit < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tw *= baseMinusT;\n\t\n\t\t\t\t}\n\t\n\t\t\t\tout = output.length + 1;\n\t\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\t\n\t\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\t\n\t\t\t\tn += floor(i / out);\n\t\t\t\ti %= out;\n\t\n\t\t\t\t// Insert `n` at position `i` of the output\n\t\t\t\toutput.splice(i++, 0, n);\n\t\n\t\t\t}\n\t\n\t\t\treturn ucs2encode(output);\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t\t * Punycode string of ASCII-only symbols.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The string of Unicode symbols.\n\t\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t\t */\n\t\tfunction encode(input) {\n\t\t\tvar n,\n\t\t\t    delta,\n\t\t\t    handledCPCount,\n\t\t\t    basicLength,\n\t\t\t    bias,\n\t\t\t    j,\n\t\t\t    m,\n\t\t\t    q,\n\t\t\t    k,\n\t\t\t    t,\n\t\t\t    currentValue,\n\t\t\t    output = [],\n\t\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t\t    inputLength,\n\t\t\t    /** Cached calculation results */\n\t\t\t    handledCPCountPlusOne,\n\t\t\t    baseMinusT,\n\t\t\t    qMinusT;\n\t\n\t\t\t// Convert the input in UCS-2 to Unicode\n\t\t\tinput = ucs2decode(input);\n\t\n\t\t\t// Cache the length\n\t\t\tinputLength = input.length;\n\t\n\t\t\t// Initialize the state\n\t\t\tn = initialN;\n\t\t\tdelta = 0;\n\t\t\tbias = initialBias;\n\t\n\t\t\t// Handle the basic code points\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue < 0x80) {\n\t\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\thandledCPCount = basicLength = output.length;\n\t\n\t\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t\t// `basicLength` is the number of basic code points.\n\t\n\t\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\t\tif (basicLength) {\n\t\t\t\toutput.push(delimiter);\n\t\t\t}\n\t\n\t\t\t// Main encoding loop:\n\t\t\twhile (handledCPCount < inputLength) {\n\t\n\t\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t\t// larger one:\n\t\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\t\tcurrentValue = input[j];\n\t\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\t\tm = currentValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t\t// but guard against overflow\n\t\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\t\n\t\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\t\tn = m;\n\t\n\t\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\t\tcurrentValue = input[j];\n\t\n\t\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\t\terror('overflow');\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\t\tdelta = 0;\n\t\t\t\t\t\t++handledCPCount;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t++delta;\n\t\t\t\t++n;\n\t\n\t\t\t}\n\t\t\treturn output.join('');\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Punycode string representing a domain name or an email address\n\t\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t\t * it doesn't matter if you call it on a string that has already been\n\t\t * converted to Unicode.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The Punycoded domain name or email address to\n\t\t * convert to Unicode.\n\t\t * @returns {String} The Unicode representation of the given Punycode\n\t\t * string.\n\t\t */\n\t\tfunction toUnicode(input) {\n\t\t\treturn mapDomain(input, function(string) {\n\t\t\t\treturn regexPunycode.test(string)\n\t\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t\t: string;\n\t\t\t});\n\t\t}\n\t\n\t\t/**\n\t\t * Converts a Unicode string representing a domain name or an email address to\n\t\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t\t * ASCII.\n\t\t * @memberOf punycode\n\t\t * @param {String} input The domain name or email address to convert, as a\n\t\t * Unicode string.\n\t\t * @returns {String} The Punycode representation of the given domain name or\n\t\t * email address.\n\t\t */\n\t\tfunction toASCII(input) {\n\t\t\treturn mapDomain(input, function(string) {\n\t\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t\t: string;\n\t\t\t});\n\t\t}\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\t/** Define the public API */\n\t\tpunycode = {\n\t\t\t/**\n\t\t\t * A string representing the current Punycode.js version number.\n\t\t\t * @memberOf punycode\n\t\t\t * @type String\n\t\t\t */\n\t\t\t'version': '1.3.2',\n\t\t\t/**\n\t\t\t * An object of methods to convert from JavaScript's internal character\n\t\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t\t * @memberOf punycode\n\t\t\t * @type Object\n\t\t\t */\n\t\t\t'ucs2': {\n\t\t\t\t'decode': ucs2decode,\n\t\t\t\t'encode': ucs2encode\n\t\t\t},\n\t\t\t'decode': decode,\n\t\t\t'encode': encode,\n\t\t\t'toASCII': toASCII,\n\t\t\t'toUnicode': toUnicode\n\t\t};\n\t\n\t\t/** Expose `punycode` */\n\t\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t\t// like the following:\n\t\tif (\n\t\t\ttrue\n\t\t) {\n\t\t\t!(__WEBPACK_AMD_DEFINE_RESULT__ = function() {\n\t\t\t\treturn punycode;\n\t\t\t}.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\t} else if (freeExports && freeModule) {\n\t\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\t\tfreeModule.exports = punycode;\n\t\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\t\tfor (key in punycode) {\n\t\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else { // in Rhino or a web browser\n\t\t\troot.punycode = punycode;\n\t\t}\n\t\n\t}(this));\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)(module), (function() { return this; }())))\n\n/***/ },\n/* 10 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function(module) {\r\n\t\tif(!module.webpackPolyfill) {\r\n\t\t\tmodule.deprecate = function() {};\r\n\t\t\tmodule.paths = [];\r\n\t\t\t// module.parent = undefined by default\r\n\t\t\tmodule.children = [];\r\n\t\t\tmodule.webpackPolyfill = 1;\r\n\t\t}\r\n\t\treturn module;\r\n\t}\r\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.decode = exports.parse = __webpack_require__(12);\n\texports.encode = exports.stringify = __webpack_require__(13);\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\t'use strict';\n\t\n\t// If obj.hasOwnProperty has been overridden, then calling\n\t// obj.hasOwnProperty(prop) will break.\n\t// See: https://github.com/joyent/node/issues/1707\n\tfunction hasOwnProperty(obj, prop) {\n\t  return Object.prototype.hasOwnProperty.call(obj, prop);\n\t}\n\t\n\tmodule.exports = function(qs, sep, eq, options) {\n\t  sep = sep || '&';\n\t  eq = eq || '=';\n\t  var obj = {};\n\t\n\t  if (typeof qs !== 'string' || qs.length === 0) {\n\t    return obj;\n\t  }\n\t\n\t  var regexp = /\\+/g;\n\t  qs = qs.split(sep);\n\t\n\t  var maxKeys = 1000;\n\t  if (options && typeof options.maxKeys === 'number') {\n\t    maxKeys = options.maxKeys;\n\t  }\n\t\n\t  var len = qs.length;\n\t  // maxKeys <= 0 means that we should not limit keys count\n\t  if (maxKeys > 0 && len > maxKeys) {\n\t    len = maxKeys;\n\t  }\n\t\n\t  for (var i = 0; i < len; ++i) {\n\t    var x = qs[i].replace(regexp, '%20'),\n\t        idx = x.indexOf(eq),\n\t        kstr, vstr, k, v;\n\t\n\t    if (idx >= 0) {\n\t      kstr = x.substr(0, idx);\n\t      vstr = x.substr(idx + 1);\n\t    } else {\n\t      kstr = x;\n\t      vstr = '';\n\t    }\n\t\n\t    k = decodeURIComponent(kstr);\n\t    v = decodeURIComponent(vstr);\n\t\n\t    if (!hasOwnProperty(obj, k)) {\n\t      obj[k] = v;\n\t    } else if (Array.isArray(obj[k])) {\n\t      obj[k].push(v);\n\t    } else {\n\t      obj[k] = [obj[k], v];\n\t    }\n\t  }\n\t\n\t  return obj;\n\t};\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\t'use strict';\n\t\n\tvar stringifyPrimitive = function(v) {\n\t  switch (typeof v) {\n\t    case 'string':\n\t      return v;\n\t\n\t    case 'boolean':\n\t      return v ? 'true' : 'false';\n\t\n\t    case 'number':\n\t      return isFinite(v) ? v : '';\n\t\n\t    default:\n\t      return '';\n\t  }\n\t};\n\t\n\tmodule.exports = function(obj, sep, eq, name) {\n\t  sep = sep || '&';\n\t  eq = eq || '=';\n\t  if (obj === null) {\n\t    obj = undefined;\n\t  }\n\t\n\t  if (typeof obj === 'object') {\n\t    return Object.keys(obj).map(function(k) {\n\t      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n\t      if (Array.isArray(obj[k])) {\n\t        return obj[k].map(function(v) {\n\t          return ks + encodeURIComponent(stringifyPrimitive(v));\n\t        }).join(sep);\n\t      } else {\n\t        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n\t      }\n\t    }).join(sep);\n\t\n\t  }\n\t\n\t  if (!name) return '';\n\t  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n\t         encodeURIComponent(stringifyPrimitive(obj));\n\t};\n\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** flavor-utils.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 8158336142ddb8fc7530\n **/","'use strict';\n\nconst superagent = require('superagent');\nconst Base64 = require('./Base64');\nconst url = require('url');\n\nconst optionDefaults = {\n    designDoc: 'flavor'\n};\n\n\n/**\n * General options object\n * @typedef {object} options\n * @property {String} username - The target username to which to clone the flavor\n * @property {String} designDoc - The design doc to use for views and list queries - Defaults to 'flavor'\n * @property {string} flavor - The name of the flavor in the target\n * @property {string} couchUrl - Couchdb root url of the target. It can contain username + password if but will be overriden if couchUsername and couchPassword are defined\n * @property {string} couchDatabase - the name of the target couchdb database\n * @property {string} couchUsername - the username with which to connect to the couchdb database\n * @property {string} couchPassword - the password with which to connect to the couchdb database\n */\n\n/**\n * This is a description of the MyClass constructor function.\n * @class\n * @classdesc FlavorUtils class\n */\nclass FlavorUtils {\n    /**\n     * Constructor\n     * @param {options} defaultOpts - Default options\n     */\n    constructor(defaultOpts) {\n        this.defaultOptions = defaultOpts;\n    }\n\n    /**\n     * Get options object\n     * @param {options} opts - An option object to override default options with\n     * @returns {object}\n     */\n    getOptions(opts) {\n        const options = Object.assign({}, optionDefaults, this.defaultOptions, opts);\n\n        // Add auth to url\n        var auth = '';\n        if (options.couchUsername) {\n            auth += options.couchUsername;\n            if (options.couchPassword) {\n                auth += ':' + options.couchPassword;\n            }\n        }\n        if (options.couchUrl) {\n            var parsedUrl = url.parse(options.couchUrl);\n            if (auth) {\n                parsedUrl.auth = auth;\n            }\n            options.couchUrl = parsedUrl.format();\n        }\n\n        // Remove trailing slash from url\n        if (options.couchUrl) options.couchUrl = options.couchUrl.replace(/\\/$/, '');\n        if (options.couchUrl && options.couchDatabase) {\n            options.databaseUrl = options.couchUrl + '/' + options.couchDatabase;\n        }\n        return options;\n    }\n\n    getFlavors(opts) {\n        opts = this.getOptions(opts);\n        return getView(opts, `${opts.designDoc}/list`, opts.username);\n    }\n\n    /**\n     *\n     * @param {object} opts - An option object to override default options with\n     * @param {options} opts.source - An option object to override default options with\n     * @param {options} opts.target - An option object to override default options with\n     * @returns {Promise} A promise that resolves with `undefined` if success, or rejects with an error if failure\n     */\n    clone(opts) {\n        opts.source = this.getOptions(opts.source);\n        opts.target = this.getOptions(opts.target);\n        var key = [opts.source.flavor, opts.source.username];\n        return getView(opts.source, `${opts.source.designDoc}/docs`, key).then(function (res) {\n            var result = res.rows;\n            if (!result) return;\n            var done = Promise.resolve();\n            var i = 0;\n            for (i = 0; i < result.length; i++) {\n                done = done.then(doEl(i));\n            }\n            done.then(function () {\n                console.log('all done');\n            }, function (err) {\n                console.log('error:', err);\n                return err;\n            });\n\n\n            function doEl(i) {\n                return function () {\n                    var prom = [];\n                    var view, data, meta, doc, newDoc;\n                    prom.push(getJSON(opts.source.databaseUrl + '/' + result[i].id));\n                    if (result[i].value.view) {\n                        view = getJSON(opts.source.databaseUrl + '/' + result[i].id + '/view.json');\n                        prom.push(view);\n                    }\n                    else prom.push(undefined);\n                    if (result[i].value.data) {\n                        data = getJSON(opts.source.databaseUrl + '/' + result[i].id + '/data.json');\n                        prom.push(data);\n                    }\n                    else prom.push(undefined);\n                    if (result[i].value.meta) {\n                        meta = getJSON(opts.source.databaseUrl + '/' + result[i].id + '/meta.json');\n                        prom.push(meta);\n                    }\n                    else prom.push(undefined);\n                    prom = Promise.all(prom).then(function (arr) {\n                        doc = arr[0];\n                        newDoc = {};\n                        var view = arr[1];\n                        var data = arr[2];\n                        var meta = arr[3];\n                        delete doc._rev;\n\n                        newDoc.flavors = {};\n                        var sub = [];\n\n                        if (opts.target.subFolder && typeof opts.target.subFolder === 'string') {\n                            sub = opts.target.subFolder.split('/').filter(function (v) {\n                                return v !== \"\"\n                            });\n                        }\n                        if (sub.length > 0 && doc.flavors[opts.source.flavor]) {\n                            if (doc.flavors[opts.source.flavor]) {\n                                var arr = doc.flavors[opts.source.flavor];\n                                for (var j = sub.length - 1; j >= 0; j--) {\n                                    arr.unshift(sub[j]);\n                                }\n                                newDoc.flavors[opts.target.flavor] = arr;\n                            }\n                        }\n                        else if (doc.flavors[opts.source.flavor]) {\n                            newDoc.flavors[opts.target.flavor] = doc.flavors[opts.source.flavor];\n                        }\n\n                        newDoc.name = opts.target.username;\n\n                        if (meta) {\n                            newDoc._attachments = newDoc._attachments || {};\n                            newDoc._attachments['meta.json'] = {\n                                'content_type': 'application/json',\n                                'data': Base64.encode(JSON.stringify(meta))\n                            };\n                        }\n                        if (view) {\n                            newDoc._attachments = newDoc._attachments || {};\n                            newDoc._attachments['view.json'] = {\n                                'content_type': 'application/json',\n                                'data': Base64.encode(JSON.stringify(view))\n                            };\n                        }\n                        if (data) {\n                            newDoc._attachments = newDoc._attachments || {};\n                            newDoc._attachments['data.json'] = {\n                                'content_type': 'application/json',\n                                'data': Base64.encode(JSON.stringify(data))\n                            };\n                        }\n                    });\n                    return prom.then(function () {\n                        return saveDoc(opts.target, newDoc);\n                    });\n                }\n            }\n\n            return done;\n        });\n    }\n\n    /**\n     * Delete all views associated to a flavor\n     * @param {options} opts - A promise that resolves with `undefined` if success, or rejects with an error if failure\n     * @returns {Promise}\n     */\n    del(opts) {\n        opts = this.getOptions(opts);\n        var key = [opts.flavor, opts.username];\n        return getView(opts, `${opts.designDoc}/docs`, key).then(function (res) {\n            var result = res.rows;\n            var done = Promise.resolve();\n            for (var i = 0; i < result.length; i++) {\n                done = done.then(doEl(i));\n            }\n\n            done.then(function () {\n                console.log('delete flavor done');\n            }, function (err) {\n                console.log('Error!', err, err.stack);\n            });\n\n            function doEl(i) {\n                var prom = getJSON(opts.databaseUrl + '/' + result[i].id);\n                prom = prom.then(function (doc) {\n                    delete doc.flavors[opts.flavor];\n                    var keys = Object.keys(doc.flavors);\n                    if (keys.length === 0) {\n                        return deleteDoc(opts, doc);\n                    }\n                    else {\n                        return updateDoc(opts, doc);\n                    }\n                });\n                return prom;\n            }\n\n            return done;\n        });\n    }\n\n    /**\n     * Get meta info about documents in a flavor\n     * @param {options} opts - An option object to override default options with\n     * @param {boolean} sorted - Set to true if documents should be sorted by flavors\n     */\n    getFlavor(opts, sorted) {\n        opts = this.getOptions(opts);\n        sorted = sorted === undefined ? true : sorted;\n        var key = [opts.flavor, opts.username];\n        if (sorted) {\n            return getList(opts, `${opts.designDoc}/sort`, 'docs', key);\n        }\n        return getView(opts, `${opts.designDoc}/docs`, key);\n    }\n\n    /**\n     * Check if this flavor has views associated with it\n     * @param {options} opts - An option object to override default options with\n     * @returns {Promise}\n     */\n    hasViews(opts) {\n        opts = this.getOptions(opts);\n        var key = [opts.flavor, opts.username];\n        return getView(opts, `${opts.designDoc}/docs`, key).then(function (res) {\n            return !(res.rows && res.rows.length === 0);\n        });\n    }\n\n    /**\n     * Get views tree for a flavor\n     * @param {options} opts - An option object to override default options with\n     * @returns {Promise}\n     */\n    getTree(opts) {\n        if (opts.couchUrl) {\n            return this.getFlavor(opts).then(function (views) {\n                if (views.rows) views = views.rows;\n                return getTree(views);\n            });\n        } else {\n            return Promise.resolve(getTree(opts));\n        }\n\n        function getTree(rows) {\n            var row, structure = {};\n            Object.defineProperty(structure, '__root', {enumerable: false, writable: true, value: true});\n            for (var i = 0; i < rows.length; i++) {\n                row = rows[i];\n                var flavors = row.value.flavors;\n                doElement(flavors, structure, row.value);\n            }\n            return structure;\n        }\n\n        function doElement(flavors, current, row) {\n            if (!flavors.length) {\n                current.__data = row.data;\n                current.__view = row.view;\n                current.__id = row._id;\n                current.__rev = row._rev;\n                current.__version = row.version;\n                current.__keywords = row.keywords;\n                current.__meta = row.meta;\n                return;\n            }\n\n            var flavor = flavors.shift();\n            if (!current[flavor]) {\n                current[flavor] = {\n                    __name: flavor,\n                    __parents: current.__parents ? current.__parents.slice() : [],\n                    __parent: current\n                };\n                if (current.__name) current[flavor].__parents.push(current.__name);\n            }\n\n            return doElement(flavors, current[flavor], row);\n        }\n    }\n\n    /**\n     * Traverse a tree\n     * @param {object} tree - A tree such as returned by getTree\n     * @param {function} viewCb - A callback called on each view\n     * @param {function} dirCb - A callback called on each 'directory'\n     * @returns {Promise}\n     */\n    traverseTree(tree, viewCb, dirCb) {\n        let promise = Promise.resolve();\n        for (let key in tree) {\n            if (key.startsWith('__')) continue;\n            let el = tree[key];\n            if (el.__id) { // Element is a view\n                if (viewCb) promise = promise.then(function () {\n                    return viewCb(el);\n                });\n            } else if (key !== '__root') { // Element is a directory\n                if (dirCb) promise = promise.then(function () {\n                    return dirCb(el);\n                });\n                promise = promise.then(() => {\n                    return this.traverseTree(el, viewCb, dirCb);\n                });\n            }\n        }\n        return promise;\n    }\n\n\n}\n\nmodule.exports = FlavorUtils;\n\nfunction saveDoc(opts, doc) {\n    return new Promise(function (resolve, reject) {\n        var url = opts.databaseUrl;\n        delete doc._id;\n        superagent\n            .post(url)\n            .set('Content-Type', 'application/json')\n            .send(doc)\n            .end(function (err, res) {\n                if (err) {\n                    return reject(err);\n                }\n                resolve(res.body);\n            })\n    });\n}\n\nfunction getView(opts, view, key) {\n    var x = view.split('/');\n    var designDoc = '_design/' + x[0];\n    var viewName = x[1];\n\n    return getJSON(opts.databaseUrl + '/' + designDoc + '/_view/' + viewName + '?key=' + encodeURIComponent(JSON.stringify(key)));\n}\n\nfunction getList(opts, list, view, key) {\n    var x = list.split('/');\n    var designDoc = '_design/' + x[0];\n    var listName = x[1];\n\n    return getJSON(opts.databaseUrl + '/' + designDoc + '/_list/' + listName + '/' + view + '?key=' + encodeURIComponent(JSON.stringify(key)));\n}\n\nfunction getUUIDs(opts, count) {\n    count = count || 1;\n    return getJSON(opts.couchUrl + '/_uuids?count=' + count);\n}\n\nfunction getJSON(url) {\n    return new Promise(function (resolve, reject) {\n        superagent\n            .get(url)\n            .set('Accept', 'application/json')\n            .end(function (err, res) {\n                if (err) {\n                    return reject(err);\n                }\n                resolve(res.body);\n            })\n    });\n}\n\nfunction deleteDoc(opts, doc) {\n    return new Promise(function (resolve, reject) {\n        var url = opts.databaseUrl + '/' + doc._id;\n        superagent\n            .del(url)\n            .query({rev: doc._rev})\n            .end(function (err, res) {\n                if (err) {\n                    return reject(err);\n                }\n                resolve(res);\n            })\n    });\n}\n\nfunction updateDoc(opts, doc) {\n    return new Promise(function (resolve, reject) {\n        var url = opts.databaseUrl + '/' + doc._id;\n        superagent\n            .put(url)\n            .set('Content-Type', 'application/json')\n            .send(doc)\n            .end(function (err, res) {\n                if (err) {\n                    return reject(err);\n                }\n                resolve(res.body);\n            })\n    });\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.js\n **/","/**\n * Module dependencies.\n */\n\nvar Emitter = require('emitter');\nvar reduce = require('reduce');\nvar requestBase = require('./request-base');\nvar isObject = require('./is-object');\n\n/**\n * Root reference for iframes.\n */\n\nvar root;\nif (typeof window !== 'undefined') { // Browser window\n  root = window;\n} else if (typeof self !== 'undefined') { // Web Worker\n  root = self;\n} else { // Other environments\n  root = this;\n}\n\n/**\n * Noop.\n */\n\nfunction noop(){};\n\n/**\n * Check if `obj` is a host object,\n * we don't want to serialize these :)\n *\n * TODO: future proof, move to compoent land\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isHost(obj) {\n  var str = {}.toString.call(obj);\n\n  switch (str) {\n    case '[object File]':\n    case '[object Blob]':\n    case '[object FormData]':\n      return true;\n    default:\n      return false;\n  }\n}\n\n/**\n * Expose `request`.\n */\n\nvar request = module.exports = require('./request').bind(null, Request);\n\n/**\n * Determine XHR.\n */\n\nrequest.getXHR = function () {\n  if (root.XMLHttpRequest\n      && (!root.location || 'file:' != root.location.protocol\n          || !root.ActiveXObject)) {\n    return new XMLHttpRequest;\n  } else {\n    try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {}\n    try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}\n    try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}\n    try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}\n  }\n  return false;\n};\n\n/**\n * Removes leading and trailing whitespace, added to support IE.\n *\n * @param {String} s\n * @return {String}\n * @api private\n */\n\nvar trim = ''.trim\n  ? function(s) { return s.trim(); }\n  : function(s) { return s.replace(/(^\\s*|\\s*$)/g, ''); };\n\n/**\n * Serialize the given `obj`.\n *\n * @param {Object} obj\n * @return {String}\n * @api private\n */\n\nfunction serialize(obj) {\n  if (!isObject(obj)) return obj;\n  var pairs = [];\n  for (var key in obj) {\n    if (null != obj[key]) {\n      pushEncodedKeyValuePair(pairs, key, obj[key]);\n        }\n      }\n  return pairs.join('&');\n}\n\n/**\n * Helps 'serialize' with serializing arrays.\n * Mutates the pairs array.\n *\n * @param {Array} pairs\n * @param {String} key\n * @param {Mixed} val\n */\n\nfunction pushEncodedKeyValuePair(pairs, key, val) {\n  if (Array.isArray(val)) {\n    return val.forEach(function(v) {\n      pushEncodedKeyValuePair(pairs, key, v);\n    });\n  }\n  pairs.push(encodeURIComponent(key)\n    + '=' + encodeURIComponent(val));\n}\n\n/**\n * Expose serialization method.\n */\n\n request.serializeObject = serialize;\n\n /**\n  * Parse the given x-www-form-urlencoded `str`.\n  *\n  * @param {String} str\n  * @return {Object}\n  * @api private\n  */\n\nfunction parseString(str) {\n  var obj = {};\n  var pairs = str.split('&');\n  var parts;\n  var pair;\n\n  for (var i = 0, len = pairs.length; i < len; ++i) {\n    pair = pairs[i];\n    parts = pair.split('=');\n    obj[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]);\n  }\n\n  return obj;\n}\n\n/**\n * Expose parser.\n */\n\nrequest.parseString = parseString;\n\n/**\n * Default MIME type map.\n *\n *     superagent.types.xml = 'application/xml';\n *\n */\n\nrequest.types = {\n  html: 'text/html',\n  json: 'application/json',\n  xml: 'application/xml',\n  urlencoded: 'application/x-www-form-urlencoded',\n  'form': 'application/x-www-form-urlencoded',\n  'form-data': 'application/x-www-form-urlencoded'\n};\n\n/**\n * Default serialization map.\n *\n *     superagent.serialize['application/xml'] = function(obj){\n *       return 'generated xml here';\n *     };\n *\n */\n\n request.serialize = {\n   'application/x-www-form-urlencoded': serialize,\n   'application/json': JSON.stringify\n };\n\n /**\n  * Default parsers.\n  *\n  *     superagent.parse['application/xml'] = function(str){\n  *       return { object parsed from str };\n  *     };\n  *\n  */\n\nrequest.parse = {\n  'application/x-www-form-urlencoded': parseString,\n  'application/json': JSON.parse\n};\n\n/**\n * Parse the given header `str` into\n * an object containing the mapped fields.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parseHeader(str) {\n  var lines = str.split(/\\r?\\n/);\n  var fields = {};\n  var index;\n  var line;\n  var field;\n  var val;\n\n  lines.pop(); // trailing CRLF\n\n  for (var i = 0, len = lines.length; i < len; ++i) {\n    line = lines[i];\n    index = line.indexOf(':');\n    field = line.slice(0, index).toLowerCase();\n    val = trim(line.slice(index + 1));\n    fields[field] = val;\n  }\n\n  return fields;\n}\n\n/**\n * Check if `mime` is json or has +json structured syntax suffix.\n *\n * @param {String} mime\n * @return {Boolean}\n * @api private\n */\n\nfunction isJSON(mime) {\n  return /[\\/+]json\\b/.test(mime);\n}\n\n/**\n * Return the mime type for the given `str`.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction type(str){\n  return str.split(/ *; */).shift();\n};\n\n/**\n * Return header field parameters.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction params(str){\n  return reduce(str.split(/ *; */), function(obj, str){\n    var parts = str.split(/ *= */)\n      , key = parts.shift()\n      , val = parts.shift();\n\n    if (key && val) obj[key] = val;\n    return obj;\n  }, {});\n};\n\n/**\n * Initialize a new `Response` with the given `xhr`.\n *\n *  - set flags (.ok, .error, etc)\n *  - parse header\n *\n * Examples:\n *\n *  Aliasing `superagent` as `request` is nice:\n *\n *      request = superagent;\n *\n *  We can use the promise-like API, or pass callbacks:\n *\n *      request.get('/').end(function(res){});\n *      request.get('/', function(res){});\n *\n *  Sending data can be chained:\n *\n *      request\n *        .post('/user')\n *        .send({ name: 'tj' })\n *        .end(function(res){});\n *\n *  Or passed to `.send()`:\n *\n *      request\n *        .post('/user')\n *        .send({ name: 'tj' }, function(res){});\n *\n *  Or passed to `.post()`:\n *\n *      request\n *        .post('/user', { name: 'tj' })\n *        .end(function(res){});\n *\n * Or further reduced to a single call for simple cases:\n *\n *      request\n *        .post('/user', { name: 'tj' }, function(res){});\n *\n * @param {XMLHTTPRequest} xhr\n * @param {Object} options\n * @api private\n */\n\nfunction Response(req, options) {\n  options = options || {};\n  this.req = req;\n  this.xhr = this.req.xhr;\n  // responseText is accessible only if responseType is '' or 'text' and on older browsers\n  this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined')\n     ? this.xhr.responseText\n     : null;\n  this.statusText = this.req.xhr.statusText;\n  this.setStatusProperties(this.xhr.status);\n  this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders());\n  // getAllResponseHeaders sometimes falsely returns \"\" for CORS requests, but\n  // getResponseHeader still works. so we get content-type even if getting\n  // other headers fails.\n  this.header['content-type'] = this.xhr.getResponseHeader('content-type');\n  this.setHeaderProperties(this.header);\n  this.body = this.req.method != 'HEAD'\n    ? this.parseBody(this.text ? this.text : this.xhr.response)\n    : null;\n}\n\n/**\n * Get case-insensitive `field` value.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nResponse.prototype.get = function(field){\n  return this.header[field.toLowerCase()];\n};\n\n/**\n * Set header related properties:\n *\n *   - `.type` the content type without params\n *\n * A response of \"Content-Type: text/plain; charset=utf-8\"\n * will provide you with a `.type` of \"text/plain\".\n *\n * @param {Object} header\n * @api private\n */\n\nResponse.prototype.setHeaderProperties = function(header){\n  // content-type\n  var ct = this.header['content-type'] || '';\n  this.type = type(ct);\n\n  // params\n  var obj = params(ct);\n  for (var key in obj) this[key] = obj[key];\n};\n\n/**\n * Parse the given body `str`.\n *\n * Used for auto-parsing of bodies. Parsers\n * are defined on the `superagent.parse` object.\n *\n * @param {String} str\n * @return {Mixed}\n * @api private\n */\n\nResponse.prototype.parseBody = function(str){\n  var parse = request.parse[this.type];\n  if (!parse && isJSON(this.type)) {\n    parse = request.parse['application/json'];\n  }\n  return parse && str && (str.length || str instanceof Object)\n    ? parse(str)\n    : null;\n};\n\n/**\n * Set flags such as `.ok` based on `status`.\n *\n * For example a 2xx response will give you a `.ok` of __true__\n * whereas 5xx will be __false__ and `.error` will be __true__. The\n * `.clientError` and `.serverError` are also available to be more\n * specific, and `.statusType` is the class of error ranging from 1..5\n * sometimes useful for mapping respond colors etc.\n *\n * \"sugar\" properties are also defined for common cases. Currently providing:\n *\n *   - .noContent\n *   - .badRequest\n *   - .unauthorized\n *   - .notAcceptable\n *   - .notFound\n *\n * @param {Number} status\n * @api private\n */\n\nResponse.prototype.setStatusProperties = function(status){\n  // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\n  if (status === 1223) {\n    status = 204;\n  }\n\n  var type = status / 100 | 0;\n\n  // status / class\n  this.status = this.statusCode = status;\n  this.statusType = type;\n\n  // basics\n  this.info = 1 == type;\n  this.ok = 2 == type;\n  this.clientError = 4 == type;\n  this.serverError = 5 == type;\n  this.error = (4 == type || 5 == type)\n    ? this.toError()\n    : false;\n\n  // sugar\n  this.accepted = 202 == status;\n  this.noContent = 204 == status;\n  this.badRequest = 400 == status;\n  this.unauthorized = 401 == status;\n  this.notAcceptable = 406 == status;\n  this.notFound = 404 == status;\n  this.forbidden = 403 == status;\n};\n\n/**\n * Return an `Error` representative of this response.\n *\n * @return {Error}\n * @api public\n */\n\nResponse.prototype.toError = function(){\n  var req = this.req;\n  var method = req.method;\n  var url = req.url;\n\n  var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')';\n  var err = new Error(msg);\n  err.status = this.status;\n  err.method = method;\n  err.url = url;\n\n  return err;\n};\n\n/**\n * Expose `Response`.\n */\n\nrequest.Response = Response;\n\n/**\n * Initialize a new `Request` with the given `method` and `url`.\n *\n * @param {String} method\n * @param {String} url\n * @api public\n */\n\nfunction Request(method, url) {\n  var self = this;\n  this._query = this._query || [];\n  this.method = method;\n  this.url = url;\n  this.header = {}; // preserves header name case\n  this._header = {}; // coerces header names to lowercase\n  this.on('end', function(){\n    var err = null;\n    var res = null;\n\n    try {\n      res = new Response(self);\n    } catch(e) {\n      err = new Error('Parser is unable to parse the response');\n      err.parse = true;\n      err.original = e;\n      // issue #675: return the raw response if the response parsing fails\n      err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null;\n      // issue #876: return the http status code if the response parsing fails\n      err.statusCode = self.xhr && self.xhr.status ? self.xhr.status : null;\n      return self.callback(err);\n    }\n\n    self.emit('response', res);\n\n    if (err) {\n      return self.callback(err, res);\n    }\n\n    if (res.status >= 200 && res.status < 300) {\n      return self.callback(err, res);\n    }\n\n    var new_err = new Error(res.statusText || 'Unsuccessful HTTP response');\n    new_err.original = err;\n    new_err.response = res;\n    new_err.status = res.status;\n\n    self.callback(new_err, res);\n  });\n}\n\n/**\n * Mixin `Emitter` and `requestBase`.\n */\n\nEmitter(Request.prototype);\nfor (var key in requestBase) {\n  Request.prototype[key] = requestBase[key];\n}\n\n/**\n * Abort the request, and clear potential timeout.\n *\n * @return {Request}\n * @api public\n */\n\nRequest.prototype.abort = function(){\n  if (this.aborted) return;\n  this.aborted = true;\n  this.xhr.abort();\n  this.clearTimeout();\n  this.emit('abort');\n  return this;\n};\n\n/**\n * Set Content-Type to `type`, mapping values from `request.types`.\n *\n * Examples:\n *\n *      superagent.types.xml = 'application/xml';\n *\n *      request.post('/')\n *        .type('xml')\n *        .send(xmlstring)\n *        .end(callback);\n *\n *      request.post('/')\n *        .type('application/xml')\n *        .send(xmlstring)\n *        .end(callback);\n *\n * @param {String} type\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.type = function(type){\n  this.set('Content-Type', request.types[type] || type);\n  return this;\n};\n\n/**\n * Set responseType to `val`. Presently valid responseTypes are 'blob' and \n * 'arraybuffer'.\n *\n * Examples:\n *\n *      req.get('/')\n *        .responseType('blob')\n *        .end(callback);\n *\n * @param {String} val\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.responseType = function(val){\n  this._responseType = val;\n  return this;\n};\n\n/**\n * Set Accept to `type`, mapping values from `request.types`.\n *\n * Examples:\n *\n *      superagent.types.json = 'application/json';\n *\n *      request.get('/agent')\n *        .accept('json')\n *        .end(callback);\n *\n *      request.get('/agent')\n *        .accept('application/json')\n *        .end(callback);\n *\n * @param {String} accept\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.accept = function(type){\n  this.set('Accept', request.types[type] || type);\n  return this;\n};\n\n/**\n * Set Authorization field value with `user` and `pass`.\n *\n * @param {String} user\n * @param {String} pass\n * @param {Object} options with 'type' property 'auto' or 'basic' (default 'basic')\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.auth = function(user, pass, options){\n  if (!options) {\n    options = {\n      type: 'basic'\n    }\n  }\n\n  switch (options.type) {\n    case 'basic':\n      var str = btoa(user + ':' + pass);\n      this.set('Authorization', 'Basic ' + str);\n    break;\n\n    case 'auto':\n      this.username = user;\n      this.password = pass;\n    break;\n  }\n  return this;\n};\n\n/**\n* Add query-string `val`.\n*\n* Examples:\n*\n*   request.get('/shoes')\n*     .query('size=10')\n*     .query({ color: 'blue' })\n*\n* @param {Object|String} val\n* @return {Request} for chaining\n* @api public\n*/\n\nRequest.prototype.query = function(val){\n  if ('string' != typeof val) val = serialize(val);\n  if (val) this._query.push(val);\n  return this;\n};\n\n/**\n * Queue the given `file` as an attachment to the specified `field`,\n * with optional `filename`.\n *\n * ``` js\n * request.post('/upload')\n *   .attach(new Blob(['<a id=\"a\"><b id=\"b\">hey!</b></a>'], { type: \"text/html\"}))\n *   .end(callback);\n * ```\n *\n * @param {String} field\n * @param {Blob|File} file\n * @param {String} filename\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.attach = function(field, file, filename){\n  this._getFormData().append(field, file, filename || file.name);\n  return this;\n};\n\nRequest.prototype._getFormData = function(){\n  if (!this._formData) {\n    this._formData = new root.FormData();\n  }\n  return this._formData;\n};\n\n/**\n * Send `data` as the request body, defaulting the `.type()` to \"json\" when\n * an object is given.\n *\n * Examples:\n *\n *       // manual json\n *       request.post('/user')\n *         .type('json')\n *         .send('{\"name\":\"tj\"}')\n *         .end(callback)\n *\n *       // auto json\n *       request.post('/user')\n *         .send({ name: 'tj' })\n *         .end(callback)\n *\n *       // manual x-www-form-urlencoded\n *       request.post('/user')\n *         .type('form')\n *         .send('name=tj')\n *         .end(callback)\n *\n *       // auto x-www-form-urlencoded\n *       request.post('/user')\n *         .type('form')\n *         .send({ name: 'tj' })\n *         .end(callback)\n *\n *       // defaults to x-www-form-urlencoded\n  *      request.post('/user')\n  *        .send('name=tobi')\n  *        .send('species=ferret')\n  *        .end(callback)\n *\n * @param {String|Object} data\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.send = function(data){\n  var obj = isObject(data);\n  var type = this._header['content-type'];\n\n  // merge\n  if (obj && isObject(this._data)) {\n    for (var key in data) {\n      this._data[key] = data[key];\n    }\n  } else if ('string' == typeof data) {\n    if (!type) this.type('form');\n    type = this._header['content-type'];\n    if ('application/x-www-form-urlencoded' == type) {\n      this._data = this._data\n        ? this._data + '&' + data\n        : data;\n    } else {\n      this._data = (this._data || '') + data;\n    }\n  } else {\n    this._data = data;\n  }\n\n  if (!obj || isHost(data)) return this;\n  if (!type) this.type('json');\n  return this;\n};\n\n/**\n * @deprecated\n */\nResponse.prototype.parse = function serialize(fn){\n  if (root.console) {\n    console.warn(\"Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0\");\n  }\n  this.serialize(fn);\n  return this;\n};\n\nResponse.prototype.serialize = function serialize(fn){\n  this._parser = fn;\n  return this;\n};\n\n/**\n * Invoke the callback with `err` and `res`\n * and handle arity check.\n *\n * @param {Error} err\n * @param {Response} res\n * @api private\n */\n\nRequest.prototype.callback = function(err, res){\n  var fn = this._callback;\n  this.clearTimeout();\n  fn(err, res);\n};\n\n/**\n * Invoke callback with x-domain error.\n *\n * @api private\n */\n\nRequest.prototype.crossDomainError = function(){\n  var err = new Error('Request has been terminated\\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.');\n  err.crossDomain = true;\n\n  err.status = this.status;\n  err.method = this.method;\n  err.url = this.url;\n\n  this.callback(err);\n};\n\n/**\n * Invoke callback with timeout error.\n *\n * @api private\n */\n\nRequest.prototype.timeoutError = function(){\n  var timeout = this._timeout;\n  var err = new Error('timeout of ' + timeout + 'ms exceeded');\n  err.timeout = timeout;\n  this.callback(err);\n};\n\n/**\n * Enable transmission of cookies with x-domain requests.\n *\n * Note that for this to work the origin must not be\n * using \"Access-Control-Allow-Origin\" with a wildcard,\n * and also must set \"Access-Control-Allow-Credentials\"\n * to \"true\".\n *\n * @api public\n */\n\nRequest.prototype.withCredentials = function(){\n  this._withCredentials = true;\n  return this;\n};\n\n/**\n * Initiate request, invoking callback `fn(res)`\n * with an instanceof `Response`.\n *\n * @param {Function} fn\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.end = function(fn){\n  var self = this;\n  var xhr = this.xhr = request.getXHR();\n  var query = this._query.join('&');\n  var timeout = this._timeout;\n  var data = this._formData || this._data;\n\n  // store callback\n  this._callback = fn || noop;\n\n  // state change\n  xhr.onreadystatechange = function(){\n    if (4 != xhr.readyState) return;\n\n    // In IE9, reads to any property (e.g. status) off of an aborted XHR will\n    // result in the error \"Could not complete the operation due to error c00c023f\"\n    var status;\n    try { status = xhr.status } catch(e) { status = 0; }\n\n    if (0 == status) {\n      if (self.timedout) return self.timeoutError();\n      if (self.aborted) return;\n      return self.crossDomainError();\n    }\n    self.emit('end');\n  };\n\n  // progress\n  var handleProgress = function(e){\n    if (e.total > 0) {\n      e.percent = e.loaded / e.total * 100;\n    }\n    e.direction = 'download';\n    self.emit('progress', e);\n  };\n  if (this.hasListeners('progress')) {\n    xhr.onprogress = handleProgress;\n  }\n  try {\n    if (xhr.upload && this.hasListeners('progress')) {\n      xhr.upload.onprogress = handleProgress;\n    }\n  } catch(e) {\n    // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist.\n    // Reported here:\n    // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context\n  }\n\n  // timeout\n  if (timeout && !this._timer) {\n    this._timer = setTimeout(function(){\n      self.timedout = true;\n      self.abort();\n    }, timeout);\n  }\n\n  // querystring\n  if (query) {\n    query = request.serializeObject(query);\n    this.url += ~this.url.indexOf('?')\n      ? '&' + query\n      : '?' + query;\n  }\n\n  // initiate request\n  if (this.username && this.password) {\n    xhr.open(this.method, this.url, true, this.username, this.password);\n  } else {\n    xhr.open(this.method, this.url, true);\n  }\n\n  // CORS\n  if (this._withCredentials) xhr.withCredentials = true;\n\n  // body\n  if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !isHost(data)) {\n    // serialize stuff\n    var contentType = this._header['content-type'];\n    var serialize = this._parser || request.serialize[contentType ? contentType.split(';')[0] : ''];\n    if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json'];\n    if (serialize) data = serialize(data);\n  }\n\n  // set header fields\n  for (var field in this.header) {\n    if (null == this.header[field]) continue;\n    xhr.setRequestHeader(field, this.header[field]);\n  }\n\n  if (this._responseType) {\n    xhr.responseType = this._responseType;\n  }\n\n  // send stuff\n  this.emit('request', this);\n\n  // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing)\n  // We need null here if data is undefined\n  xhr.send(typeof data !== 'undefined' ? data : null);\n  return this;\n};\n\n\n/**\n * Expose `Request`.\n */\n\nrequest.Request = Request;\n\n/**\n * GET `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} data or fn\n * @param {Function} fn\n * @return {Request}\n * @api public\n */\n\nrequest.get = function(url, data, fn){\n  var req = request('GET', url);\n  if ('function' == typeof data) fn = data, data = null;\n  if (data) req.query(data);\n  if (fn) req.end(fn);\n  return req;\n};\n\n/**\n * HEAD `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} data or fn\n * @param {Function} fn\n * @return {Request}\n * @api public\n */\n\nrequest.head = function(url, data, fn){\n  var req = request('HEAD', url);\n  if ('function' == typeof data) fn = data, data = null;\n  if (data) req.send(data);\n  if (fn) req.end(fn);\n  return req;\n};\n\n/**\n * DELETE `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Function} fn\n * @return {Request}\n * @api public\n */\n\nfunction del(url, fn){\n  var req = request('DELETE', url);\n  if (fn) req.end(fn);\n  return req;\n};\n\nrequest['del'] = del;\nrequest['delete'] = del;\n\n/**\n * PATCH `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed} data\n * @param {Function} fn\n * @return {Request}\n * @api public\n */\n\nrequest.patch = function(url, data, fn){\n  var req = request('PATCH', url);\n  if ('function' == typeof data) fn = data, data = null;\n  if (data) req.send(data);\n  if (fn) req.end(fn);\n  return req;\n};\n\n/**\n * POST `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed} data\n * @param {Function} fn\n * @return {Request}\n * @api public\n */\n\nrequest.post = function(url, data, fn){\n  var req = request('POST', url);\n  if ('function' == typeof data) fn = data, data = null;\n  if (data) req.send(data);\n  if (fn) req.end(fn);\n  return req;\n};\n\n/**\n * PUT `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} data or fn\n * @param {Function} fn\n * @return {Request}\n * @api public\n */\n\nrequest.put = function(url, data, fn){\n  var req = request('PUT', url);\n  if ('function' == typeof data) fn = data, data = null;\n  if (data) req.send(data);\n  if (fn) req.end(fn);\n  return req;\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/superagent/lib/client.js\n ** module id = 1\n ** module chunks = 0\n **/","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n  module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n  if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n  for (var key in Emitter.prototype) {\r\n    obj[key] = Emitter.prototype[key];\r\n  }\r\n  return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n  this._callbacks = this._callbacks || {};\r\n  (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n    .push(fn);\r\n  return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n  function on() {\r\n    this.off(event, on);\r\n    fn.apply(this, arguments);\r\n  }\r\n\r\n  on.fn = fn;\r\n  this.on(event, on);\r\n  return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n  this._callbacks = this._callbacks || {};\r\n\r\n  // all\r\n  if (0 == arguments.length) {\r\n    this._callbacks = {};\r\n    return this;\r\n  }\r\n\r\n  // specific event\r\n  var callbacks = this._callbacks['$' + event];\r\n  if (!callbacks) return this;\r\n\r\n  // remove all handlers\r\n  if (1 == arguments.length) {\r\n    delete this._callbacks['$' + event];\r\n    return this;\r\n  }\r\n\r\n  // remove specific handler\r\n  var cb;\r\n  for (var i = 0; i < callbacks.length; i++) {\r\n    cb = callbacks[i];\r\n    if (cb === fn || cb.fn === fn) {\r\n      callbacks.splice(i, 1);\r\n      break;\r\n    }\r\n  }\r\n  return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n  this._callbacks = this._callbacks || {};\r\n  var args = [].slice.call(arguments, 1)\r\n    , callbacks = this._callbacks['$' + event];\r\n\r\n  if (callbacks) {\r\n    callbacks = callbacks.slice(0);\r\n    for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n      callbacks[i].apply(this, args);\r\n    }\r\n  }\r\n\r\n  return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n  this._callbacks = this._callbacks || {};\r\n  return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n  return !! this.listeners(event).length;\r\n};\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/component-emitter/index.js\n ** module id = 2\n ** module chunks = 0\n **/","\n/**\n * Reduce `arr` with `fn`.\n *\n * @param {Array} arr\n * @param {Function} fn\n * @param {Mixed} initial\n *\n * TODO: combatible error handling?\n */\n\nmodule.exports = function(arr, fn, initial){  \n  var idx = 0;\n  var len = arr.length;\n  var curr = arguments.length == 3\n    ? initial\n    : arr[idx++];\n\n  while (idx < len) {\n    curr = fn.call(null, curr, arr[idx], ++idx, arr);\n  }\n  \n  return curr;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/reduce-component/index.js\n ** module id = 3\n ** module chunks = 0\n **/","/**\n * Module of mixed-in functions shared between node and client code\n */\nvar isObject = require('./is-object');\n\n/**\n * Clear previous timeout.\n *\n * @return {Request} for chaining\n * @api public\n */\n\nexports.clearTimeout = function _clearTimeout(){\n  this._timeout = 0;\n  clearTimeout(this._timer);\n  return this;\n};\n\n/**\n * Force given parser\n *\n * Sets the body parser no matter type.\n *\n * @param {Function}\n * @api public\n */\n\nexports.parse = function parse(fn){\n  this._parser = fn;\n  return this;\n};\n\n/**\n * Set timeout to `ms`.\n *\n * @param {Number} ms\n * @return {Request} for chaining\n * @api public\n */\n\nexports.timeout = function timeout(ms){\n  this._timeout = ms;\n  return this;\n};\n\n/**\n * Faux promise support\n *\n * @param {Function} fulfill\n * @param {Function} reject\n * @return {Request}\n */\n\nexports.then = function then(fulfill, reject) {\n  return this.end(function(err, res) {\n    err ? reject(err) : fulfill(res);\n  });\n}\n\n/**\n * Allow for extension\n */\n\nexports.use = function use(fn) {\n  fn(this);\n  return this;\n}\n\n\n/**\n * Get request header `field`.\n * Case-insensitive.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nexports.get = function(field){\n  return this._header[field.toLowerCase()];\n};\n\n/**\n * Get case-insensitive header `field` value.\n * This is a deprecated internal API. Use `.get(field)` instead.\n *\n * (getHeader is no longer used internally by the superagent code base)\n *\n * @param {String} field\n * @return {String}\n * @api private\n * @deprecated\n */\n\nexports.getHeader = exports.get;\n\n/**\n * Set header `field` to `val`, or multiple fields with one object.\n * Case-insensitive.\n *\n * Examples:\n *\n *      req.get('/')\n *        .set('Accept', 'application/json')\n *        .set('X-API-Key', 'foobar')\n *        .end(callback);\n *\n *      req.get('/')\n *        .set({ Accept: 'application/json', 'X-API-Key': 'foobar' })\n *        .end(callback);\n *\n * @param {String|Object} field\n * @param {String} val\n * @return {Request} for chaining\n * @api public\n */\n\nexports.set = function(field, val){\n  if (isObject(field)) {\n    for (var key in field) {\n      this.set(key, field[key]);\n    }\n    return this;\n  }\n  this._header[field.toLowerCase()] = val;\n  this.header[field] = val;\n  return this;\n};\n\n/**\n * Remove header `field`.\n * Case-insensitive.\n *\n * Example:\n *\n *      req.get('/')\n *        .unset('User-Agent')\n *        .end(callback);\n *\n * @param {String} field\n */\nexports.unset = function(field){\n  delete this._header[field.toLowerCase()];\n  delete this.header[field];\n  return this;\n};\n\n/**\n * Write the field `name` and `val` for \"multipart/form-data\"\n * request bodies.\n *\n * ``` js\n * request.post('/upload')\n *   .field('foo', 'bar')\n *   .end(callback);\n * ```\n *\n * @param {String} name\n * @param {String|Blob|File|Buffer|fs.ReadStream} val\n * @return {Request} for chaining\n * @api public\n */\nexports.field = function(name, val) {\n  this._getFormData().append(name, val);\n  return this;\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/superagent/lib/request-base.js\n ** module id = 4\n ** module chunks = 0\n **/","/**\n * Check if `obj` is an object.\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isObject(obj) {\n  return null != obj && 'object' == typeof obj;\n}\n\nmodule.exports = isObject;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/superagent/lib/is-object.js\n ** module id = 5\n ** module chunks = 0\n **/","// The node and browser modules expose versions of this with the\n// appropriate constructor function bound as first argument\n/**\n * Issue a request:\n *\n * Examples:\n *\n *    request('GET', '/users').end(callback)\n *    request('/users').end(callback)\n *    request('/users', callback)\n *\n * @param {String} method\n * @param {String|Function} url or callback\n * @return {Request}\n * @api public\n */\n\nfunction request(RequestConstructor, method, url) {\n  // callback\n  if ('function' == typeof url) {\n    return new RequestConstructor('GET', method).end(url);\n  }\n\n  // url first\n  if (2 == arguments.length) {\n    return new RequestConstructor('GET', method);\n  }\n\n  return new RequestConstructor(method, url);\n}\n\nmodule.exports = request;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/superagent/lib/request.js\n ** module id = 6\n ** module chunks = 0\n **/","'use strict';\n\n/**\n *\n *  Base64 encode / decode\n *  http://www.webtoolkit.info/\n *  https://gist.github.com/Nowalon/6579878\n **/\n\n\nvar Base64 = module.exports = {\n\n    // private property\n    _keyStr : \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n\n    // public method for encoding\n    encode : function (input) {\n        var output = \"\";\n        var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n        var i = 0;\n\n        input = Base64._utf8_encode(input);\n\n        while (i < input.length) {\n\n            chr1 = input.charCodeAt(i++);\n            chr2 = input.charCodeAt(i++);\n            chr3 = input.charCodeAt(i++);\n\n            enc1 = chr1 >> 2;\n            enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n            enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n            enc4 = chr3 & 63;\n\n            if (isNaN(chr2)) {\n                enc3 = enc4 = 64;\n            } else if (isNaN(chr3)) {\n                enc4 = 64;\n            }\n\n            output = output +\n                this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +\n                this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);\n\n        }\n\n        return output;\n    },\n\n    // public method for decoding\n    decode : function (input) {\n        var output = \"\";\n        var chr1, chr2, chr3;\n        var enc1, enc2, enc3, enc4;\n        var i = 0;\n\n        input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n\n        while (i < input.length) {\n\n            enc1 = this._keyStr.indexOf(input.charAt(i++));\n            enc2 = this._keyStr.indexOf(input.charAt(i++));\n            enc3 = this._keyStr.indexOf(input.charAt(i++));\n            enc4 = this._keyStr.indexOf(input.charAt(i++));\n\n            chr1 = (enc1 << 2) | (enc2 >> 4);\n            chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\n            chr3 = ((enc3 & 3) << 6) | enc4;\n\n            output = output + String.fromCharCode(chr1);\n\n            if (enc3 != 64) {\n                output = output + String.fromCharCode(chr2);\n            }\n            if (enc4 != 64) {\n                output = output + String.fromCharCode(chr3);\n            }\n\n        }\n\n        output = Base64._utf8_decode(output);\n\n        return output;\n\n    },\n\n    // private method for UTF-8 encoding\n    _utf8_encode : function (string) {\n        string = string.replace(/\\r\\n/g,\"\\n\");\n        var utftext = \"\";\n\n        for (var n = 0; n < string.length; n++) {\n\n            var c = string.charCodeAt(n);\n\n            if (c < 128) {\n                utftext += String.fromCharCode(c);\n            }\n            else if((c > 127) && (c < 2048)) {\n                utftext += String.fromCharCode((c >> 6) | 192);\n                utftext += String.fromCharCode((c & 63) | 128);\n            }\n            else {\n                utftext += String.fromCharCode((c >> 12) | 224);\n                utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n                utftext += String.fromCharCode((c & 63) | 128);\n            }\n\n        }\n\n        return utftext;\n    },\n\n    // private method for UTF-8 decoding\n    _utf8_decode : function (utftext) {\n        var string = \"\";\n        var i = 0;\n        var c = 0, c1 = 0, c2 = 0;\n\n        while ( i < utftext.length ) {\n\n            c = utftext.charCodeAt(i);\n\n            if (c < 128) {\n                string += String.fromCharCode(c);\n                i++;\n            }\n            else if((c > 191) && (c < 224)) {\n                c2 = utftext.charCodeAt(i+1);\n                string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n                i += 2;\n            }\n            else {\n                c2 = utftext.charCodeAt(i+1);\n                var c3 = utftext.charCodeAt(i+2);\n                string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n                i += 3;\n            }\n\n        }\n\n        return string;\n    }\n\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/Base64.js\n **/","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar punycode = require('punycode');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pathname = null;\n  this.path = null;\n  this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    // RFC 2396: characters reserved for delimiting URLs.\n    // We actually just auto-escape these.\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    // RFC 2396: characters not allowed for various reasons.\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n    autoEscape = ['\\''].concat(unwise),\n    // Characters that are never ever allowed in a hostname.\n    // Note that any invalid chars are also handled, but these\n    // are the ones that are *expected* to be seen, so we fast-path\n    // them.\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/,\n    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that never have a hostname.\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that always contain a // bit.\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    },\n    querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && isObject(url) && url instanceof Url) return url;\n\n  var u = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  var rest = url;\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim();\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  // figure out if it's got a host\n  // user@server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a@b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingChars.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    var auth, atSign;\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@');\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c@d\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1)\n      hostEnd = rest.length;\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    // pull out port.\n    this.parseHost();\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || '';\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) continue;\n        if (!part.match(hostnamePartPattern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x';\n            } else {\n              newpart += part[j];\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n            break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      // hostnames are always lower case.\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      // IDNA Support: Returns a puny coded representation of \"domain\".\n      // It only converts the part of the domain name that\n      // has non ASCII characters. I.e. it dosent matter if\n      // you call it with a domain that already is in ASCII.\n      var domainArray = this.hostname.split('.');\n      var newOut = [];\n      for (var i = 0; i < domainArray.length; ++i) {\n        var s = domainArray[i];\n        newOut.push(s.match(/[^A-Za-z0-9_-]/) ?\n            'xn--' + punycode.encode(s) : s);\n      }\n      this.hostname = newOut.join('.');\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n    }\n  }\n\n  // now rest is set to the post-host stuff.\n  // chop off any delim chars.\n  if (!unsafeProtocol[lowerProto]) {\n\n    // First, make 100% sure that any \"autoEscape\" chars get\n    // escaped, even if encodeURIComponent doesn't think they\n    // need to be.\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  // chop off from the tail first.\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    rest = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    // no query string, but parseQueryString still requested\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) this.pathname = rest;\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  //to support http.request\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n    var s = this.search || '';\n    this.path = p + s;\n  }\n\n  // finally, reconstruct the href based on what has been validated.\n  this.href = this.format();\n  return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n  // ensure it's an object, and not a string url.\n  // If it's an obj, this is a no-op.\n  // this way, you can call url_format() on strings\n  // to clean up potentially wonky urls.\n  if (isString(obj)) obj = urlParse(obj);\n  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n  return obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n  // unless they had them to begin with.\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n  if (search && search.charAt(0) !== '?') search = '?' + search;\n\n  pathname = pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) return relative;\n  return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  Object.keys(this).forEach(function(k) {\n    result[k] = this[k];\n  }, this);\n\n  // hash is always overridden, no matter what.\n  // even href=\"\" will remove it.\n  result.hash = relative.hash;\n\n  // if the relative url is empty, then there's nothing left to do here.\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  // hrefs like //foo/bar always cut to the protocol.\n  if (relative.slashes && !relative.protocol) {\n    // take everything except the protocol from relative\n    Object.keys(relative).forEach(function(k) {\n      if (k !== 'protocol')\n        result[k] = relative[k];\n    });\n\n    //urlParse appends trailing / to urls like http://www.example.com\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    // if it's a known url protocol, then changing\n    // the protocol does weird things\n    // first, if it's not file:, then we MUST have a host,\n    // and if there was a path\n    // to begin with, then we MUST have a path.\n    // if it is file:, then the host is dropped,\n    // because that's known to be hostless.\n    // anything else is assumed to be absolute.\n    if (!slashedProtocol[relative.protocol]) {\n      Object.keys(relative).forEach(function(k) {\n        result[k] = relative[k];\n      });\n      result.href = result.format();\n      return result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift()));\n      if (!relative.host) relative.host = '';\n      if (!relative.hostname) relative.hostname = '';\n      if (relPath[0] !== '') relPath.unshift('');\n      if (relPath.length < 2) relPath.unshift('');\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    // to support http.request\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.path = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && relative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  // if the url is a non-slashed url, then relative\n  // links like ../.. should be able\n  // to crawl up to the hostname, as well.  This is strange.\n  // result.protocol has already been set by now.\n  // Later on, put the first path part into the host field.\n  if (psychotic) {\n    result.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') srcPath[0] = result.host;\n      else srcPath.unshift(result.host);\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') relPath[0] = relative.host;\n        else relPath.unshift(relative.host);\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    // it's absolute.\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n    // fall through to the dot-handling below.\n  } else if (relPath.length) {\n    // it's relative\n    // throw away the existing file, and take the new path instead.\n    if (!srcPath) srcPath = [];\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!isNullOrUndefined(relative.search)) {\n    // just pull out the search.\n    // like href='?foo'.\n    // Put this after the other two cases because it simplifies the booleans\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      //occationaly the auth can get stuck only in host\n      //this especialy happens in cases like\n      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n      }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    //to support http.request\n    if (!isNull(result.pathname) || !isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    // no path at all.  easy.\n    // we've already handled the other stuff above.\n    result.pathname = null;\n    //to support http.request\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  // if a url ENDs in . or .., then it must get a trailing slash.\n  // however, if it ends in anything else non-slashy,\n  // then it must NOT get a trailing slash.\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.host) && (last === '.' || last === '..') ||\n      last === '');\n\n  // strip single dots, resolve double dots to parent dir\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last == '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    } else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n  // put the host back\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    //occationaly the auth can get stuck only in host\n    //this especialy happens in cases like\n    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                     result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  //to support request.http\n  if (!isNull(result.pathname) || !isNull(result.search)) {\n    result.path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !== ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) this.hostname = host;\n};\n\nfunction isString(arg) {\n  return typeof arg === \"string\";\n}\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\n\nfunction isNull(arg) {\n  return arg === null;\n}\nfunction isNullOrUndefined(arg) {\n  return  arg == null;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/url/url.js\n ** module id = 8\n ** module chunks = 0\n **/","/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\t\t    /** Cached calculation results */\n\t\t    baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t    inputLength,\n\t\t    /** Cached calculation results */\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/url/~/punycode/punycode.js\n ** module id = 9\n ** module chunks = 0\n **/","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tmodule.children = [];\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n}\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/module.js\n ** module id = 10\n ** module chunks = 0\n **/","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/querystring/index.js\n ** module id = 11\n ** module chunks = 0\n **/","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (Array.isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/querystring/decode.js\n ** module id = 12\n ** module chunks = 0\n **/","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return Object.keys(obj).map(function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (Array.isArray(obj[k])) {\n        return obj[k].map(function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/querystring/encode.js\n ** module id = 13\n ** module chunks = 0\n **/"],"sourceRoot":""}