diff --git a/.eslintrc b/.eslintrc index e8f134b..ba56e27 100644 --- a/.eslintrc +++ b/.eslintrc @@ -50,6 +50,7 @@ "prefer-template": 0, "prefer-arrow-callback": 0, "arrow-body-style": 0, - "no-confusing-arrow": 0 + "no-confusing-arrow": 0, + "react/require-extension": 0 } } diff --git a/.travis.yml b/.travis.yml index 7921148..13680c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: - - '0.12' - '4' - '5' - '6' diff --git a/.yaspellerrc b/.yaspellerrc index 48b0e42..9fa4c6d 100644 --- a/.yaspellerrc +++ b/.yaspellerrc @@ -58,6 +58,7 @@ "usefull", "v1", "xhr", - "javascript" + "javascript", + "responseHandler" ] } diff --git a/dist/redux-api.js b/dist/redux-api.js index 578a537..16fc405 100644 --- a/dist/redux-api.js +++ b/dist/redux-api.js @@ -58,6 +58,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { "use strict"; + /* eslint no-void: 0 */ Object.defineProperty(exports, "__esModule", { value: true @@ -145,7 +146,8 @@ return /******/ (function(modules) { // webpackBootstrap server: false, rootUrl: null, middlewareParser: null, - options: {} + options: {}, + responseHandler: null }; var cfg = { @@ -174,7 +176,7 @@ return /******/ (function(modules) { // webpackBootstrap reducers: {}, events: {} }; - var fnConfigCallback = function fnConfigCallback(memo, value, key) { + function fnConfigCallback(memo, value, key) { var opts = (typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" ? _extends({}, defaultEndpointConfig, { reducerName: key }, value) : _extends({}, defaultEndpointConfig, { reducerName: key, url: value }); if (opts.broadcast !== void 0) { @@ -216,8 +218,12 @@ return /******/ (function(modules) { // webpackBootstrap virtual: !!opts.virtual, reducerName: reducerName, actions: memo.actions, - prefetch: prefetch, postfetch: postfetch, validation: validation, - helpers: helpers, transformer: transformer, crud: crud + prefetch: prefetch, + postfetch: postfetch, + validation: validation, + helpers: helpers, + transformer: transformer, + crud: crud }; memo.actions[key] = (0, _actionFn2.default)(url, key, options, ACTIONS, meta); @@ -234,7 +240,7 @@ return /******/ (function(modules) { // webpackBootstrap } memo.events[reducerName] = ACTIONS; return memo; - }; + } return Object.keys(config).reduce(function (memo, key) { return fnConfigCallback(memo, config[key], key, config); @@ -247,9 +253,9 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 1 */ -/*!**************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/url.js ***! - \**************************************************/ +/*!**********************!*\ + !*** ./~/url/url.js ***! + \**********************/ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -277,7 +283,7 @@ return /******/ (function(modules) { // webpackBootstrap // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. - var punycode = __webpack_require__(/*! punycode */ 10); + var punycode = __webpack_require__(/*! punycode */ 12); exports.parse = urlParse; exports.resolve = urlResolve; @@ -356,7 +362,7 @@ return /******/ (function(modules) { // webpackBootstrap 'gopher:': true, 'file:': true }, - querystring = __webpack_require__(/*! querystring */ 13); + querystring = __webpack_require__(/*! querystring */ 11); function urlParse(url, parseQueryString, slashesDenoteHost) { if (url && isObject(url) && url instanceof Url) return url; @@ -952,6 +958,7 @@ return /******/ (function(modules) { // webpackBootstrap // Load modules + // Declare internals var internals = {}; @@ -1150,6 +1157,7 @@ return /******/ (function(modules) { // webpackBootstrap return args.length ? args.reduce(mergePair) : null; }; + /* eslint no-void: 0 */ var toString = Object.prototype.toString; var OBJECT = "[object Object]"; var ARRAY = "[object Array]"; @@ -1576,29 +1584,185 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 9 */ -/*!***********************************!*\ - !*** (webpack)/buildin/module.js ***! - \***********************************/ +/*!*********************************!*\ + !*** ./~/querystring/decode.js ***! + \*********************************/ /***/ function(module, exports) { - "use strict"; + // Copyright Joyent, Inc. and other Node contributors. + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to permit + // persons to whom the Software is furnished to do so, subject to the + // following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. - module.exports = function (module) { - if (!module.webpackPolyfill) { - module.deprecate = function () {}; - module.paths = []; - // module.parent = undefined by default - module.children = []; - module.webpackPolyfill = 1; - } - return module; + 'use strict'; + + // If obj.hasOwnProperty has been overridden, then calling + // obj.hasOwnProperty(prop) will break. + // See: https://github.com/joyent/node/issues/1707 + + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + module.exports = function (qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, + vstr, + k, + v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (Array.isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; }; /***/ }, /* 10 */ -/*!******************************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/~/punycode/punycode.js ***! - \******************************************************************/ +/*!*********************************!*\ + !*** ./~/querystring/encode.js ***! + \*********************************/ +/***/ function(module, exports) { + + // Copyright Joyent, Inc. and other Node contributors. + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to permit + // persons to whom the Software is furnished to do so, subject to the + // following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + 'use strict'; + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + + var stringifyPrimitive = function stringifyPrimitive(v) { + switch (typeof v === 'undefined' ? 'undefined' : _typeof(v)) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } + }; + + module.exports = function (obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object') { + return Object.keys(obj).map(function (k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (Array.isArray(obj[k])) { + return obj[k].map(function (v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); + }; + +/***/ }, +/* 11 */ +/*!********************************!*\ + !*** ./~/querystring/index.js ***! + \********************************/ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.decode = exports.parse = __webpack_require__(/*! ./decode */ 9); + exports.encode = exports.stringify = __webpack_require__(/*! ./encode */ 10); + +/***/ }, +/* 12 */ +/*!**************************************!*\ + !*** ./~/url/~/punycode/punycode.js ***! + \**************************************/ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {'use strict'; @@ -2130,184 +2294,28 @@ return /******/ (function(modules) { // webpackBootstrap root.punycode = punycode; } })(undefined); - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../../../buildin/module.js */ 9)(module), (function() { return this; }()))) - -/***/ }, -/* 11 */ -/*!*******************************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/~/querystring/decode.js ***! - \*******************************************************************/ -/***/ function(module, exports) { - - // Copyright Joyent, Inc. and other Node contributors. - // - // Permission is hereby granted, free of charge, to any person obtaining a - // copy of this software and associated documentation files (the - // "Software"), to deal in the Software without restriction, including - // without limitation the rights to use, copy, modify, merge, publish, - // distribute, sublicense, and/or sell copies of the Software, and to permit - // persons to whom the Software is furnished to do so, subject to the - // following conditions: - // - // The above copyright notice and this permission notice shall be included - // in all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - 'use strict'; - - // If obj.hasOwnProperty has been overridden, then calling - // obj.hasOwnProperty(prop) will break. - // See: https://github.com/joyent/node/issues/1707 - - function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - module.exports = function (qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, - vstr, - k, - v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (Array.isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; - }; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 13)(module), (function() { return this; }()))) /***/ }, -/* 12 */ -/*!*******************************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/~/querystring/encode.js ***! - \*******************************************************************/ +/* 13 */ +/*!***********************************!*\ + !*** (webpack)/buildin/module.js ***! + \***********************************/ /***/ function(module, exports) { - // Copyright Joyent, Inc. and other Node contributors. - // - // Permission is hereby granted, free of charge, to any person obtaining a - // copy of this software and associated documentation files (the - // "Software"), to deal in the Software without restriction, including - // without limitation the rights to use, copy, modify, merge, publish, - // distribute, sublicense, and/or sell copies of the Software, and to permit - // persons to whom the Software is furnished to do so, subject to the - // following conditions: - // - // The above copyright notice and this permission notice shall be included - // in all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - 'use strict'; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - - var stringifyPrimitive = function stringifyPrimitive(v) { - switch (typeof v === 'undefined' ? 'undefined' : _typeof(v)) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } - }; - - module.exports = function (obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object') { - return Object.keys(obj).map(function (k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (Array.isArray(obj[k])) { - return obj[k].map(function (v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - } + "use strict"; - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); + module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; }; -/***/ }, -/* 13 */ -/*!******************************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/~/querystring/index.js ***! - \******************************************************************/ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.decode = exports.parse = __webpack_require__(/*! ./decode */ 11); - exports.encode = exports.stringify = __webpack_require__(/*! ./encode */ 12); - /***/ }, /* 14 */ /*!***********************!*\ @@ -2381,6 +2389,14 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = actionFn; + var _fastApply = __webpack_require__(/*! fast-apply */ 5); + + var _fastApply2 = _interopRequireDefault(_fastApply); + + var _url = __webpack_require__(/*! url */ 1); + + var _url2 = _interopRequireDefault(_url); + var _urlTransform = __webpack_require__(/*! ./urlTransform */ 21); var _urlTransform2 = _interopRequireDefault(_urlTransform); @@ -2401,14 +2417,6 @@ return /******/ (function(modules) { // webpackBootstrap var _createHolder2 = _interopRequireDefault(_createHolder); - var _fastApply = __webpack_require__(/*! fast-apply */ 5); - - var _fastApply2 = _interopRequireDefault(_fastApply); - - var _url = __webpack_require__(/*! url */ 1); - - var _url2 = _interopRequireDefault(_url); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function none() {} @@ -2476,6 +2484,7 @@ return /******/ (function(modules) { // webpackBootstrap var pubsub = new _PubSub2.default(); var requestHolder = (0, _createHolder2.default)(); + var responseHandler = meta && meta.holder && meta.holder.responseHandler; /** * Fetch data from server * @param {Object} pathvars path vars for url @@ -2499,13 +2508,26 @@ return /******/ (function(modules) { // webpackBootstrap var baseOptions = options instanceof Function ? options(urlT, params, getState) : options; var opts = (0, _merge2.default)({}, globalOptions, baseOptions, params); var response = meta.fetch(urlT, opts); - return !meta.validation ? response : response.then(function (data) { + var result = !meta.validation ? response : response.then(function (data) { return new Promise(function (resolve, reject) { return meta.validation(data, function (err) { return err ? reject(err) : resolve(data); }); }); }); + if (responseHandler) { + if (result && result.then) { + result.then(function (data) { + return responseHandler(null, data); + }, function (err) { + return responseHandler(err); + }); + } else { + responseHandler(result); + } + } + result && result.catch && result.catch(none); + return result; }; /** @@ -2514,7 +2536,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} params fetch params * @param {Function} callback) callback execute after end request */ - var fn = function fn() { + function fn() { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } @@ -2548,11 +2570,12 @@ return /******/ (function(modules) { // webpackBootstrap var prevData = state && state[reducerName] && state[reducerName].data; dispatch({ type: actionFetch, syncing: syncing, request: requestOptions }); var fetchResolverOpts = { - dispatch: dispatch, getState: getState, + dispatch: dispatch, + getState: getState, actions: meta.actions, prefetch: meta.prefetch }; - return new Promise(function (done, fail) { + var result = new Promise(function (done, fail) { (0, _fetchResolver2.default)(0, fetchResolverOpts, function (err) { if (err) { pubsub.reject(err); @@ -2560,7 +2583,8 @@ return /******/ (function(modules) { // webpackBootstrap } new Promise(function (resolve, reject) { requestHolder.set({ - resolve: resolve, reject: reject, + resolve: resolve, + reject: reject, promise: request(pathvars, params, getState).then(resolve, reject) }); }).then(function (d) { @@ -2569,7 +2593,8 @@ return /******/ (function(modules) { // webpackBootstrap type: actionSuccess, request: requestOptions }); dispatch({ - data: data, origData: d, + data: data, + origData: d, type: actionSuccess, syncing: false, request: requestOptions @@ -2595,8 +2620,10 @@ return /******/ (function(modules) { // webpackBootstrap }); }); }); + result.catch(none); + return result; }; - }; + } /* Pure rest request @@ -2668,7 +2695,7 @@ return /******/ (function(modules) { // webpackBootstrap var index = args.length - 1; var callbackFn = args[index] instanceof Function ? args[index] : none; var helpersResult = (0, _fastApply2.default)(call, { getState: getState, dispatch: dispatch, actions: meta.actions }, args); - return new Promise(function (resolve, reject) { + var result = new Promise(function (resolve, reject) { var callback = function callback(err, data) { err ? reject(err) : resolve(data); callbackFn(err, data); @@ -2689,6 +2716,8 @@ return /******/ (function(modules) { // webpackBootstrap (0, _fastApply2.default)(sync ? fn.sync : fn, null, helpersResult.concat(callback))(dispatch, getState); } }); + result.catch(none); + return result; }; }; return memo; @@ -2939,6 +2968,12 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = urlTransform; + var _qs = __webpack_require__(/*! qs */ 6); + + var _qs2 = _interopRequireDefault(_qs); + + var _url = __webpack_require__(/*! url */ 1); + var _omit = __webpack_require__(/*! ./utils/omit */ 22); var _omit2 = _interopRequireDefault(_omit); @@ -2947,12 +2982,6 @@ return /******/ (function(modules) { // webpackBootstrap var _merge2 = _interopRequireDefault(_merge); - var _qs = __webpack_require__(/*! qs */ 6); - - var _qs2 = _interopRequireDefault(_qs); - - var _url = __webpack_require__(/*! url */ 1); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var rxClean = /(\(:[^\)]+\)|:[^\/]+)/g; diff --git a/dist/redux-api.js.map b/dist/redux-api.js.map index 4572167..aa79f78 100644 --- a/dist/redux-api.js.map +++ b/dist/redux-api.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 8925264859ec682936af","webpack:///./src/index.js","webpack:///(webpack)/~/node-libs-browser/~/url/url.js","webpack:///./~/qs/lib/utils.js","webpack:///./src/utils/merge.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./~/fast-apply/index.js","webpack:///./~/qs/lib/index.js","webpack:///./~/qs/lib/parse.js","webpack:///./~/qs/lib/stringify.js","webpack:///(webpack)/buildin/module.js","webpack:///(webpack)/~/node-libs-browser/~/url/~/punycode/punycode.js","webpack:///(webpack)/~/node-libs-browser/~/url/~/querystring/decode.js","webpack:///(webpack)/~/node-libs-browser/~/url/~/querystring/encode.js","webpack:///(webpack)/~/node-libs-browser/~/url/~/querystring/index.js","webpack:///./src/PubSub.js","webpack:///./src/actionFn.js","webpack:///./src/async.js","webpack:///./src/createHolder.js","webpack:///./src/fetchResolver.js","webpack:///./src/reducerFn.js","webpack:///./src/transformers.js","webpack:///./src/urlTransform.js","webpack:///./src/utils/omit.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;ACtCA;;;;;;;;;;mBAuDwB,Q;;AArDxB;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;;;;;;;;;AAQA,KAAM,wBAAwB;AAC5B,gBAAa,uBAAa;AADE,EAA9B;;AAIA,KAAM,SAAS,aAAf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCe,UAAS,QAAT,CAAkB,MAAlB,EAA0B;AACvC,cAAW,SAAS,EAApB;AACA,OAAM,cAAc;AAClB,YAAO,IADW;AAElB,aAAQ,KAFU;AAGlB,cAAS,IAHS;AAIlB,uBAAkB,IAJA;AAKlB,cAAS;AALS,IAApB;;AAQA,OAAM,MAAM;AACV,QADU,eACN,GADM,EACD,KADC,EACM;AACd,WAAI,QAAQ,SAAZ,EAAuB;AACrB,mBAAU,YAAY,GAAZ,IAAmB,cAAO,KAAP,CAAa,KAAb,CAA7B;AACD,QAFD,MAEO;AACL,qBAAY,GAAZ,IAAmB,KAAnB;AACD;;AAED,cAAO,IAAP;AACD,MATS;AA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AACD,UAAO,QAAP;AACD;;;;;;;;;;;;;;;;;;mBC3Dc,UAAS,MAAT,EAAiB,KAAjB,EAAwB;AACrC,OAAI,CAAC,MAAM,OAAN,CAAc,KAAd,CAAL,EAA2B;AACzB,yBAAY,MAAZ;AACD;;AAED,UAAO,OAAO,IAAP,CAAY,UAAU,EAAtB,EAA0B,MAA1B,CAAiC,UAAC,IAAD,EAAO,GAAP,EAAc;AACpD,SAAI,MAAM,OAAN,CAAc,GAAd,MAAuB,CAAC,CAA5B,EAA+B;AAC7B,YAAK,GAAL,IAAY,OAAO,GAAP,CAAZ;AACD;AACD,YAAO,IAAP;AACD,IALM,EAKJ,EALI,CAAP;AAMD,E","file":"redux-api.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[\"redux-api\"] = factory();\n\telse\n\t\troot[\"redux-api\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\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 8925264859ec682936af\n **/","\"use strict\";\n\nimport libUrl from \"url\";\nimport reducerFn from \"./reducerFn\";\nimport actionFn from \"./actionFn\";\nimport transformers from \"./transformers\";\nimport async from \"./async\";\n\n// export { transformers, async };\n\n/**\n * Default configuration for each endpoint\n * @type {Object}\n */\nconst defaultEndpointConfig = {\n transformer: transformers.object\n};\n\nconst PREFIX = \"@@redux-api\";\n/**\n * Entry api point\n * @param {Object} config Rest api configuration\n * @param {Function} fetch Adapter for rest requests\n * @param {Boolean} isServer false by default (fif you want to use it for isomorphic apps)\n * @return {actions, reducers} { actions, reducers}\n * @example ```js\n * const api = reduxApi({\n * test: \"/plain/url\",\n * testItem: \"/plain/url/:id\",\n * testModify: {\n * url: \"/plain/url/:endpoint\",\n\n * transformer: (data)=> !data ?\n * { title: \"\", message: \"\" } :\n * { title: data.title, message: data.message },\n * options: {\n * method: \"post\"\n * headers: {\n * \"Accept\": \"application/json\",\n * \"Content-Type\": \"application/json\"\n * }\n * }\n * }\n * });\n * // register reducers\n *\n * // call actions\n * dispatch(api.actions.test());\n * dispatch(api.actions.testItem({id: 1}));\n * dispatch(api.actions.testModify({endpoint: \"upload-1\"}, {\n * body: JSON.stringify({title: \"Hello\", message: \"World\"})\n * }));\n * ```\n */\n\nexport default function reduxApi(config) {\n config || (config = {});\n const fetchHolder = {\n fetch: null,\n server: false,\n rootUrl: null,\n middlewareParser: null,\n options: {}\n };\n\n const cfg = {\n use(key, value) {\n if (key === \"rootUrl\") {\n value && (fetchHolder[key] = libUrl.parse(value));\n } else {\n fetchHolder[key] = value;\n }\n\n return this;\n },\n init(fetch, isServer=false, rootUrl) {\n /* eslint no-console: 0 */\n console.warn(\"Deprecated method, use `use` method\");\n this.use(\"fetch\", fetch);\n this.use(\"server\", isServer);\n this.use(\"rootUrl\", rootUrl);\n return this;\n },\n actions: {},\n reducers: {},\n events: {}\n };\n const fnConfigCallback = (memo, value, key)=> {\n const opts = typeof value === \"object\" ?\n { ...defaultEndpointConfig, reducerName: key, ...value } :\n { ...defaultEndpointConfig, reducerName: key, url: value };\n\n if (opts.broadcast !== (void 0)) {\n /* eslint no-console: 0 */\n console.warn(\"Deprecated `broadcast` option. you shoud use `events`\" +\n \"to catch redux-api events (see https://github.com/lexich/redux-api/blob/master/DOCS.md#Events)\");\n }\n\n const {\n url, urlOptions, options, transformer, broadcast, crud,\n reducerName, prefetch, postfetch, validation, helpers,\n } = opts;\n\n const ACTIONS = {\n actionFetch: `${PREFIX}@${reducerName}`,\n actionSuccess: `${PREFIX}@${reducerName}_success`,\n actionFail: `${PREFIX}@${reducerName}_fail`,\n actionReset: `${PREFIX}@${reducerName}_delete`\n };\n\n const meta = {\n urlOptions,\n fetch: opts.fetch ? opts.fetch : function(...args) {\n return fetchHolder.fetch.apply(this, args);\n },\n holder: fetchHolder,\n broadcast,\n virtual: !!opts.virtual,\n reducerName,\n actions: memo.actions,\n prefetch, postfetch, validation,\n helpers, transformer, crud\n };\n\n memo.actions[key] = actionFn(url, key, options, ACTIONS, meta);\n\n if (!meta.virtual && !memo.reducers[reducerName]) {\n const initialState = {\n sync: false,\n syncing: false,\n loading: false,\n data: transformer()\n };\n const reducer = opts.reducer ? opts.reducer.bind(memo) : null;\n memo.reducers[reducerName] = reducerFn(initialState, ACTIONS, reducer);\n }\n memo.events[reducerName] = ACTIONS;\n return memo;\n };\n\n return Object.keys(config).reduce(\n (memo, key)=> fnConfigCallback(memo, config[key], key, config), cfg);\n}\n\nreduxApi.transformers = transformers;\nreduxApi.async = async;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.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/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/url.js\n **/","// Load modules\n\n\n// Declare internals\n\nvar internals = {};\ninternals.hexTable = new Array(256);\nfor (var h = 0; h < 256; ++h) {\n internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase();\n}\n\n\nexports.arrayToObject = function (source, options) {\n\n var obj = options.plainObjects ? Object.create(null) : {};\n for (var i = 0, il = source.length; i < il; ++i) {\n if (typeof source[i] !== 'undefined') {\n\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\n\nexports.merge = function (target, source, options) {\n\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (Array.isArray(target)) {\n target.push(source);\n }\n else if (typeof target === 'object') {\n target[source] = true;\n }\n else {\n target = [target, source];\n }\n\n return target;\n }\n\n if (typeof target !== 'object') {\n target = [target].concat(source);\n return target;\n }\n\n if (Array.isArray(target) &&\n !Array.isArray(source)) {\n\n target = exports.arrayToObject(target, options);\n }\n\n var keys = Object.keys(source);\n for (var k = 0, kl = keys.length; k < kl; ++k) {\n var key = keys[k];\n var value = source[key];\n\n if (!Object.prototype.hasOwnProperty.call(target, key)) {\n target[key] = value;\n }\n else {\n target[key] = exports.merge(target[key], value, options);\n }\n }\n\n return target;\n};\n\n\nexports.decode = function (str) {\n\n try {\n return decodeURIComponent(str.replace(/\\+/g, ' '));\n } catch (e) {\n return str;\n }\n};\n\nexports.encode = function (str) {\n\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n if (typeof str !== 'string') {\n str = '' + str;\n }\n\n var out = '';\n for (var i = 0, il = str.length; i < il; ++i) {\n var c = str.charCodeAt(i);\n\n if (c === 0x2D || // -\n c === 0x2E || // .\n c === 0x5F || // _\n c === 0x7E || // ~\n (c >= 0x30 && c <= 0x39) || // 0-9\n (c >= 0x41 && c <= 0x5A) || // a-z\n (c >= 0x61 && c <= 0x7A)) { // A-Z\n\n out += str[i];\n continue;\n }\n\n if (c < 0x80) {\n out += internals.hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out += internals.hexTable[0xC0 | (c >> 6)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out += internals.hexTable[0xE0 | (c >> 12)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n ++i;\n c = 0x10000 + (((c & 0x3FF) << 10) | (str.charCodeAt(i) & 0x3FF));\n out += internals.hexTable[0xF0 | (c >> 18)] + internals.hexTable[0x80 | ((c >> 12) & 0x3F)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nexports.compact = function (obj, refs) {\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return obj;\n }\n\n refs = refs || [];\n var lookup = refs.indexOf(obj);\n if (lookup !== -1) {\n return refs[lookup];\n }\n\n refs.push(obj);\n\n if (Array.isArray(obj)) {\n var compacted = [];\n\n for (var i = 0, il = obj.length; i < il; ++i) {\n if (typeof obj[i] !== 'undefined') {\n compacted.push(obj[i]);\n }\n }\n\n return compacted;\n }\n\n var keys = Object.keys(obj);\n for (i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n obj[key] = exports.compact(obj[key], refs);\n }\n\n return obj;\n};\n\n\nexports.isRegExp = function (obj) {\n\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\n\nexports.isBuffer = function (obj) {\n\n if (obj === null ||\n typeof obj === 'undefined') {\n\n return false;\n }\n\n return !!(obj.constructor &&\n obj.constructor.isBuffer &&\n obj.constructor.isBuffer(obj));\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/utils.js\n **/","const toString = Object.prototype.toString;\nconst OBJECT = \"[object Object]\";\nconst ARRAY = \"[object Array]\";\n\nexport function mergePair(a, b) {\n if (a === (void 0)) { return b; }\n if (b === (void 0)) { return a; }\n\n const aType = toString.call(a);\n const bType = toString.call(b);\n if (aType === ARRAY) {\n return a.concat(b);\n }\n if (bType === ARRAY) {\n return [a].concat(b);\n }\n if (aType !== OBJECT || bType !== OBJECT) {\n return b;\n }\n return Object.keys(b).reduce((memo, key)=> {\n memo[key] = mergePair(a[key], b[key]);\n return memo;\n }, a);\n}\n\nexport default function(...args) {\n return args.length ? args.reduce(mergePair) : null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/merge.js\n **/","module.exports = __webpack_amd_options__;\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/amd-options.js\n ** module id = 4\n ** module chunks = 0\n **/","module.exports = fastApply;\r\n\r\nfunction fastApply(fn, context, args) {\r\n \r\n switch (args ? args.length : 0) {\r\n case 0:\r\n return context ? fn.call(context) : fn();\r\n case 1:\r\n return context ? fn.call(context, args[0]) : fn(args[0]);\r\n case 2:\r\n return context ? fn.call(context, args[0], args[1]) : fn(args[0], args[1]);\r\n case 3:\r\n return context ? fn.call(context, args[0], args[1], args[2]) : fn(args[0], args[1], args[2]);\r\n case 4:\r\n return context ? fn.call(context, args[0], args[1], args[2], args[3]) : fn(args[0], args[1], args[2], args[3]);\r\n case 5:\r\n return context ? fn.call(context, args[0], args[1], args[2], args[3], args[4]) : fn(args[0], args[1], args[2], args[3], args[4]);\r\n default:\r\n return fn.apply(context, args);\r\n }\r\n \r\n}\n\n\n/** WEBPACK FOOTER **\n ** ./~/fast-apply/index.js\n **/","// Load modules\n\nvar Stringify = require('./stringify');\nvar Parse = require('./parse');\n\n\n// Declare internals\n\nvar internals = {};\n\n\nmodule.exports = {\n stringify: Stringify,\n parse: Parse\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/index.js\n **/","// Load modules\n\nvar Utils = require('./utils');\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n depth: 5,\n arrayLimit: 20,\n parameterLimit: 1000,\n strictNullHandling: false,\n plainObjects: false,\n allowPrototypes: false,\n allowDots: false\n};\n\n\ninternals.parseValues = function (str, options) {\n\n var obj = {};\n var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);\n\n for (var i = 0, il = parts.length; i < il; ++i) {\n var part = parts[i];\n var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;\n\n if (pos === -1) {\n obj[Utils.decode(part)] = '';\n\n if (options.strictNullHandling) {\n obj[Utils.decode(part)] = null;\n }\n }\n else {\n var key = Utils.decode(part.slice(0, pos));\n var val = Utils.decode(part.slice(pos + 1));\n\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n }\n else {\n obj[key] = [].concat(obj[key]).concat(val);\n }\n }\n }\n\n return obj;\n};\n\n\ninternals.parseObject = function (chain, val, options) {\n\n if (!chain.length) {\n return val;\n }\n\n var root = chain.shift();\n\n var obj;\n if (root === '[]') {\n obj = [];\n obj = obj.concat(internals.parseObject(chain, val, options));\n }\n else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;\n var index = parseInt(cleanRoot, 10);\n var indexString = '' + index;\n if (!isNaN(index) &&\n root !== cleanRoot &&\n indexString === cleanRoot &&\n index >= 0 &&\n (options.parseArrays &&\n index <= options.arrayLimit)) {\n\n obj = [];\n obj[index] = internals.parseObject(chain, val, options);\n }\n else {\n obj[cleanRoot] = internals.parseObject(chain, val, options);\n }\n }\n\n return obj;\n};\n\n\ninternals.parseKeys = function (key, val, options) {\n\n if (!key) {\n return;\n }\n\n // Transform dot notation to bracket notation\n\n if (options.allowDots) {\n key = key.replace(/\\.([^\\.\\[]+)/g, '[$1]');\n }\n\n // The regex chunks\n\n var parent = /^([^\\[\\]]*)/;\n var child = /(\\[[^\\[\\]]*\\])/g;\n\n // Get the parent\n\n var segment = parent.exec(key);\n\n // Stash the parent if it exists\n\n var keys = [];\n if (segment[1]) {\n // If we aren't using plain objects, optionally prefix keys\n // that would overwrite object prototype properties\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1])) {\n\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(segment[1]);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while ((segment = child.exec(key)) !== null && i < options.depth) {\n\n ++i;\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1].replace(/\\[|\\]/g, ''))) {\n\n if (!options.allowPrototypes) {\n continue;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return internals.parseObject(keys, val, options);\n};\n\n\nmodule.exports = function (str, options) {\n\n options = options || {};\n options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;\n options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;\n options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;\n options.parseArrays = options.parseArrays !== false;\n options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;\n options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;\n options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;\n options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;\n options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\n if (str === '' ||\n str === null ||\n typeof str === 'undefined') {\n\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n var newObj = internals.parseKeys(key, tempObj[key], options);\n obj = Utils.merge(obj, newObj, options);\n }\n\n return Utils.compact(obj);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/parse.js\n **/","// Load modules\n\nvar Utils = require('./utils');\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n arrayPrefixGenerators: {\n brackets: function (prefix, key) {\n\n return prefix + '[]';\n },\n indices: function (prefix, key) {\n\n return prefix + '[' + key + ']';\n },\n repeat: function (prefix, key) {\n\n return prefix;\n }\n },\n strictNullHandling: false,\n skipNulls: false,\n encode: true\n};\n\n\ninternals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) {\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n }\n else if (Utils.isBuffer(obj)) {\n obj = obj.toString();\n }\n else if (obj instanceof Date) {\n obj = obj.toISOString();\n }\n else if (obj === null) {\n if (strictNullHandling) {\n return encode ? Utils.encode(prefix) : prefix;\n }\n\n obj = '';\n }\n\n if (typeof obj === 'string' ||\n typeof obj === 'number' ||\n typeof obj === 'boolean') {\n\n if (encode) {\n return [Utils.encode(prefix) + '=' + Utils.encode(obj)];\n }\n return [prefix + '=' + obj];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (Array.isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n if (Array.isArray(obj)) {\n values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n else {\n values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n }\n\n return values;\n};\n\n\nmodule.exports = function (obj, options) {\n\n options = options || {};\n var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;\n var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;\n var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;\n var sort = typeof options.sort === 'function' ? options.sort : null;\n var objKeys;\n var filter;\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n }\n else if (Array.isArray(options.filter)) {\n objKeys = filter = options.filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return '';\n }\n\n var arrayFormat;\n if (options.arrayFormat in internals.arrayPrefixGenerators) {\n arrayFormat = options.arrayFormat;\n }\n else if ('indices' in options) {\n arrayFormat = options.indices ? 'indices' : 'repeat';\n }\n else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (sort) {\n objKeys.sort(sort);\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort));\n }\n\n return keys.join(delimiter);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/stringify.js\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/** WEBPACK FOOTER **\n ** (webpack)/buildin/module.js\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 \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 state to ,\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 \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/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/~/punycode/punycode.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\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/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/~/querystring/decode.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\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/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/~/querystring/encode.js\n **/","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n\n\n/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/~/querystring/index.js\n **/","\"use strict\";\n\nexport default class PubSub {\n constructor() {\n this.container = [];\n }\n push(cb) {\n (cb instanceof Function) && this.container.push(cb);\n }\n resolve(data) {\n this.container.forEach((cb)=> cb(null, data));\n this.container = [];\n }\n reject(err) {\n this.container.forEach((cb)=> cb(err));\n this.container = [];\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/PubSub.js\n **/","\"use strict\";\n\nimport urlTransform from \"./urlTransform\";\nimport merge from \"./utils/merge\";\nimport fetchResolver from \"./fetchResolver\";\nimport PubSub from \"./PubSub\";\nimport createHolder from \"./createHolder\";\nimport fastApply from \"fast-apply\";\nimport libUrl from \"url\";\n\nfunction none() {}\n\nfunction extractArgs(args) {\n let pathvars;\n let params={};\n let callback;\n if (args[0] instanceof Function) {\n callback = args[0];\n } else if (args[1] instanceof Function) {\n pathvars = args[0];\n callback = args[1];\n } else {\n pathvars = args[0];\n params = args[1];\n callback = args[2] || none;\n }\n return [pathvars, params, callback];\n}\n\nfunction helperCrudFunction(name) {\n return (...args)=> {\n const [pathvars, params, cb] = extractArgs(args);\n return [pathvars, { ...params, method: name.toUpperCase() }, cb];\n };\n}\n\nfunction defaultMiddlewareArgsParser(dispatch, getState) {\n return { dispatch, getState };\n}\n\nexport const CRUD = [\"get\", \"post\", \"put\", \"delete\", \"patch\"].reduce(\n (memo, name)=> {\n memo[name] = helperCrudFunction(name);\n return memo;\n }, {});\n\n/**\n * Constructor for create action\n * @param {String} url endpoint's url\n * @param {String} name action name\n * @param {Object} options action configuration\n * @param {Object} ACTIONS map of actions\n * @param {[type]} fetchAdapter adapter for fetching data\n * @return {Function+Object} action function object\n */\nexport default function actionFn(url, name, options, ACTIONS={}, meta={}) {\n const { actionFetch, actionSuccess, actionFail, actionReset } = ACTIONS;\n const pubsub = new PubSub();\n const requestHolder = createHolder();\n /**\n * Fetch data from server\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} getState helper meta function\n */\n const request = (pathvars, params, getState=none)=> {\n const resultUrlT = urlTransform(url, pathvars, meta.urlOptions);\n const rootUrl = meta.holder ? meta.holder.rootUrl : null;\n let urlT = resultUrlT;\n if (rootUrl) {\n const urlObject = libUrl.parse(urlT);\n if (!urlObject.host) {\n const urlPath = (rootUrl.path ? rootUrl.path.replace(/\\/$/, \"\") : \"\") +\n \"/\" + (urlObject.path ? urlObject.path.replace(/^\\//, \"\") : \"\");\n urlT = `${rootUrl.protocol}//${rootUrl.host}${urlPath}`;\n }\n }\n const globalOptions = !meta.holder ? {} :\n (meta.holder.options instanceof Function) ?\n meta.holder.options(urlT, params, getState) : (meta.holder.options);\n const baseOptions = (options instanceof Function) ?\n options(urlT, params, getState) :\n options;\n const opts = merge({}, globalOptions, baseOptions, params);\n const response = meta.fetch(urlT, opts);\n return !meta.validation ? response : response.then(\n (data)=> new Promise(\n (resolve, reject)=> meta.validation(data,\n (err)=> err ? reject(err) : resolve(data))));\n };\n\n /**\n * Fetch data from server\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} callback) callback execute after end request\n */\n const fn = (...args)=> {\n const [pathvars, params, callback] = extractArgs(args);\n const syncing = params ? !!params.syncing : false;\n params && delete params.syncing;\n pubsub.push(callback);\n return (...middlewareArgs)=> {\n const middlewareParser = (meta.holder && meta.holder.middlewareParser) ||\n defaultMiddlewareArgsParser;\n const { dispatch, getState } = middlewareParser(...middlewareArgs);\n const { reducerName } = meta;\n const state = getState();\n const store = state[reducerName];\n const requestOptions = { pathvars, params };\n if (store && store.loading) {\n return;\n }\n const prevData = state && state[reducerName] && state[reducerName].data;\n dispatch({ type: actionFetch, syncing, request: requestOptions });\n const fetchResolverOpts = {\n dispatch, getState,\n actions: meta.actions,\n prefetch: meta.prefetch\n };\n return new Promise((done, fail)=> {\n fetchResolver(0, fetchResolverOpts, (err)=> {\n if (err) {\n pubsub.reject(err);\n return fail(err);\n }\n new Promise((resolve, reject)=> {\n requestHolder.set({\n resolve, reject,\n promise: request(pathvars, params, getState).then(resolve, reject)\n });\n }).then((d)=> {\n requestHolder.pop();\n const data = meta.transformer(d, prevData, {\n type: actionSuccess, request: requestOptions\n });\n dispatch({\n data, origData: d,\n type: actionSuccess,\n syncing: false,\n request: requestOptions\n });\n if (meta.broadcast) {\n meta.broadcast.forEach((type)=> {\n dispatch({ type, data, origData: d, request: requestOptions });\n });\n }\n if (meta.postfetch) {\n meta.postfetch.forEach((postfetch)=> {\n (postfetch instanceof Function) && postfetch({\n data, getState, dispatch, actions: meta.actions, request: requestOptions\n });\n });\n }\n pubsub.resolve(data);\n done(data);\n }, (error)=> {\n dispatch({ type: actionFail, syncing: false, error, request: requestOptions });\n pubsub.reject(error);\n fail(error);\n });\n });\n });\n };\n };\n\n /*\n Pure rest request\n */\n fn.request = request;\n\n /**\n * Reset store to initial state\n */\n fn.reset = (mutation)=> {\n const defer = requestHolder.pop();\n defer && defer.reject(new Error(\"Application abort request\"));\n return mutation === \"sync\" ? { type: actionReset, mutation } : { type: actionReset };\n };\n\n /**\n * Sync store with server. In server mode works as usual method.\n * If data have already synced, data would not fetch after call this method.\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} callback) callback execute after end request\n */\n fn.sync = (...args)=> {\n const [pathvars, params, callback] = extractArgs(args);\n const isServer = meta.holder ? meta.holder.server : false;\n return (dispatch, getState)=> {\n const state = getState();\n const store = state[name];\n if (!isServer && store && store.sync) {\n callback(null, store.data);\n return;\n }\n const modifyParams = { ...params, syncing: true };\n return fn(pathvars, modifyParams, callback)(dispatch, getState);\n };\n };\n\n let helpers = meta.helpers || {};\n if (meta.crud) {\n helpers = { ...CRUD, ...helpers };\n }\n const fnHelperCallback = (memo, func, helpername)=> {\n if (memo[helpername]) {\n throw new Error(\n `Helper name: \"${helpername}\" for endpoint \"${name}\" has been already reserved`\n );\n }\n const { sync, call } = (func instanceof Function) ? { call: func } : func;\n memo[helpername] = (...args)=> (dispatch, getState)=> {\n const index = args.length - 1;\n const callbackFn = (args[index] instanceof Function) ? args[index] : none;\n const helpersResult = fastApply(call, { getState, dispatch, actions: meta.actions }, args);\n return new Promise((resolve, reject)=> {\n const callback = (err, data)=> {\n err ? reject(err) : resolve(data);\n callbackFn(err, data);\n };\n // If helper alias using async functionality\n if (helpersResult instanceof Function) {\n helpersResult((error, newArgs=[])=> {\n if (error) {\n callback(error);\n } else {\n fastApply(\n sync ? fn.sync : fn, null, newArgs.concat(callback)\n )(dispatch, getState);\n }\n });\n } else {\n // if helper alias is synchronous\n fastApply(\n sync ? fn.sync : fn, null, helpersResult.concat(callback)\n )(dispatch, getState);\n }\n });\n };\n return memo;\n };\n\n return Object.keys(helpers).reduce(\n (memo, key)=> fnHelperCallback(memo, helpers[key], key, helpers), fn);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/actionFn.js\n **/","/**\n *\n * @param {[type]} dispatch [description]\n * @param {...[type]} args [description]\n * @return {[type]} [description]\n * @example\n * async(dispatch,\n * (cb)=> actions.test(1, cb),\n * actions.test2\n * ).then(()=> async(dispatch, actions.test3))\n */\nexport default function async(dispatch, ...args) {\n const fn = args[0];\n const nextArgs = args.slice(1);\n return new Promise(\n (resolve, reject)=> {\n if (!fn) {\n reject(\"no chain function\");\n } else {\n dispatch(fn((err, data)=> {\n err ? reject(err) : resolve(data);\n }) || {});\n }\n })\n .then((data)=> {\n if (nextArgs.length) {\n return async(dispatch, ...nextArgs);\n } else {\n return data;\n }\n });\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/async.js\n **/","\"use strict\";\n\nexport default function() {\n let data;\n let hasData = false;\n return {\n set(val) {\n if (!hasData) {\n data = val;\n hasData = true;\n return true;\n }\n return false;\n },\n empty() {\n return !hasData;\n },\n pop() {\n if (hasData) {\n hasData = false;\n const result = data;\n data = null;\n return result;\n }\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/createHolder.js\n **/","\"use strict\";\n\nfunction none() {}\n\nexport default function fetchResolver(index=0, opts={}, cb=none) {\n if (!opts.prefetch || index >= opts.prefetch.length) {\n cb();\n } else {\n opts.prefetch[index](opts,\n (err)=> err ? cb(err) : fetchResolver(index + 1, opts, cb));\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/fetchResolver.js\n **/","\"use strict\";\n/* eslint no-case-declarations: 0 */\n/**\n * Reducer contructor\n * @param {Object} initialState default initial state\n * @param {Object} actions actions map\n * @param {Function} transformer transformer function\n * @param {Function} reducer custom reducer function\n * @return {Function} reducer function\n */\nexport default function reducerFn(initialState, actions={}, reducer) {\n const { actionFetch, actionSuccess, actionFail, actionReset } = actions;\n return (state=initialState, action)=> {\n switch (action.type) {\n case actionFetch:\n return {\n ...state,\n loading: true,\n error: null,\n syncing: !!action.syncing\n };\n case actionSuccess:\n return {\n ...state,\n loading: false,\n sync: true,\n syncing: false,\n error: null,\n data: action.data\n };\n case actionFail:\n return {\n ...state,\n loading: false,\n error: action.error,\n syncing: false\n };\n case actionReset:\n const { mutation } = action;\n return (mutation === \"sync\") ?\n { ...state, sync: false } :\n { ...initialState };\n default:\n return reducer ? reducer(state, action) : state;\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/reducerFn.js\n **/","\"use strict\";\n\nconst toString = Object.prototype.toString;\nconst OBJECT = \"[object Object]\";\n\n/**\n * Default responce transformens\n */\nexport default {\n array(data) {\n return !data ? [] : Array.isArray(data) ? data : [data];\n },\n object(data) {\n if (!data) {\n return {};\n }\n return toString.call(data) === OBJECT ? data : { data };\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/transformers.js\n **/","\"use strict\";\nimport omit from \"./utils/omit\";\nimport merge from \"./utils/merge\";\nimport qs from \"qs\";\nimport { parse } from \"url\";\n\nconst rxClean = /(\\(:[^\\)]+\\)|:[^\\/]+)/g;\n\n/**\n * Url modification\n * @param {String} url url template\n * @param {Object} params params for url template\n * @param {Object} options transformation options, accepts +delimiter+, +arrayFormat+,\n * +qsStringifyOptions+ and +qsParseOptions+\n * @return {String} result url\n */\nexport default function urlTransform(url, params, options) {\n if (!url) { return \"\"; }\n params || (params = {});\n const usedKeys = {};\n\n const urlWithParams = Object.keys(params).reduce((url, key)=> {\n const value = params[key];\n const rx = new RegExp(`(\\\\(:${key}\\\\)|:${key})`, \"g\");\n return url.replace(rx, ()=> {\n usedKeys[key] = value;\n return value;\n });\n }, url);\n\n\n if (!urlWithParams) { return urlWithParams; }\n const { protocol, host, path } = parse(urlWithParams);\n const cleanURL = (host) ?\n `${protocol}//${host}${path.replace(rxClean, \"\")}` :\n path.replace(rxClean, \"\");\n const usedKeysArray = Object.keys(usedKeys);\n if (usedKeysArray.length !== Object.keys(params).length) {\n const urlObject = cleanURL.split(\"?\");\n options || (options = {});\n const { arrayFormat, delimiter } = options;\n const qsParseOptions = {\n arrayFormat,\n delimiter,\n ...options.qsParseOptions\n };\n const mergeParams = merge(\n (urlObject[1] && qs.parse(urlObject[1], qsParseOptions)),\n omit(params, usedKeysArray)\n );\n const qsStringifyOptions = {\n arrayFormat,\n delimiter,\n ...options.qsStringifyOptions\n };\n const urlStringParams = qs.stringify(mergeParams, qsStringifyOptions);\n return `${urlObject[0]}?${urlStringParams}`;\n }\n return cleanURL;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/urlTransform.js\n **/","export default function(object, props) {\n if (!Array.isArray(props)) {\n return { ...object };\n }\n\n return Object.keys(object || {}).reduce((memo, key)=> {\n if (props.indexOf(key) === -1) {\n memo[key] = object[key];\n }\n return memo;\n }, {});\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/omit.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap f549867ca3f123e99e11","webpack:///./src/index.js","webpack:///./~/url/url.js","webpack:///./~/qs/lib/utils.js","webpack:///./src/utils/merge.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./~/fast-apply/index.js","webpack:///./~/qs/lib/index.js","webpack:///./~/qs/lib/parse.js","webpack:///./~/qs/lib/stringify.js","webpack:///./~/querystring/decode.js","webpack:///./~/querystring/encode.js","webpack:///./~/querystring/index.js","webpack:///./~/url/~/punycode/punycode.js","webpack:///(webpack)/buildin/module.js","webpack:///./src/PubSub.js","webpack:///./src/actionFn.js","webpack:///./src/async.js","webpack:///./src/createHolder.js","webpack:///./src/fetchResolver.js","webpack:///./src/reducerFn.js","webpack:///./src/transformers.js","webpack:///./src/urlTransform.js","webpack:///./src/utils/omit.js"],"names":["reduxApi","defaultEndpointConfig","transformer","object","PREFIX","config","fetchHolder","fetch","server","rootUrl","middlewareParser","options","responseHandler","cfg","use","key","value","parse","init","isServer","console","warn","actions","reducers","events","fnConfigCallback","memo","opts","reducerName","url","broadcast","urlOptions","crud","prefetch","postfetch","validation","helpers","ACTIONS","actionFetch","actionSuccess","actionFail","actionReset","meta","args","apply","holder","virtual","initialState","sync","syncing","loading","data","reducer","bind","Object","keys","reduce","transformers","async","punycode","require","exports","urlParse","resolve","urlResolve","resolveObject","urlResolveObject","format","urlFormat","Url","protocol","slashes","auth","host","port","hostname","hash","search","query","pathname","path","href","protocolPattern","portPattern","delims","unwise","concat","autoEscape","nonHostChars","hostEndingChars","hostnameMaxLen","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","querystring","parseQueryString","slashesDenoteHost","isObject","u","prototype","isString","TypeError","rest","trim","proto","exec","lowerProto","toLowerCase","substr","length","match","hostEnd","i","hec","indexOf","atSign","lastIndexOf","slice","decodeURIComponent","parseHost","ipv6Hostname","hostparts","split","l","part","newpart","j","k","charCodeAt","validParts","notHost","bit","push","unshift","join","domainArray","newOut","s","encode","p","h","ae","esc","encodeURIComponent","escape","qm","obj","call","replace","stringify","charAt","source","relative","rel","result","forEach","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","pop","isNullOrUndefined","authInHost","isNull","last","hasTrailingSlash","up","splice","isAbsolute","arg","internals","hexTable","Array","toString","toUpperCase","arrayToObject","plainObjects","create","il","merge","target","isArray","kl","hasOwnProperty","decode","str","e","out","c","compact","refs","lookup","compacted","isRegExp","isBuffer","constructor","mergePair","OBJECT","ARRAY","a","b","aType","bType","module","fastApply","fn","context","Stringify","Parse","Utils","delimiter","depth","arrayLimit","parameterLimit","strictNullHandling","allowPrototypes","allowDots","parseValues","parts","Infinity","undefined","pos","val","parseObject","chain","root","cleanRoot","index","parseInt","indexString","isNaN","parseArrays","parseKeys","parent","child","segment","tempObj","newObj","arrayPrefixGenerators","brackets","prefix","indices","repeat","skipNulls","generateArrayPrefix","filter","sort","Date","toISOString","values","objKeys","arrayFormat","prop","qs","sep","eq","regexp","maxKeys","len","x","idx","kstr","vstr","v","stringifyPrimitive","isFinite","name","map","ks","freeExports","nodeType","freeModule","freeGlobal","global","window","self","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","regexPunycode","regexNonASCII","regexSeparators","errors","baseMinusTMin","floor","Math","stringFromCharCode","String","fromCharCode","error","type","RangeError","array","mapDomain","string","labels","encoded","ucs2decode","output","counter","extra","ucs2encode","basicToDigit","codePoint","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","input","inputLength","n","bias","basic","oldi","w","t","baseMinusT","handledCPCount","basicLength","m","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","test","toASCII","define","webpackPolyfill","deprecate","paths","children","PubSub","container","cb","Function","err","actionFn","none","extractArgs","pathvars","params","callback","helperCrudFunction","method","defaultMiddlewareArgsParser","dispatch","getState","CRUD","pubsub","requestHolder","request","resultUrlT","urlT","urlObject","urlPath","globalOptions","baseOptions","response","then","Promise","reject","catch","state","store","requestOptions","prevData","fetchResolverOpts","done","fail","set","promise","d","origData","reset","mutation","defer","Error","modifyParams","fnHelperCallback","func","helpername","callbackFn","helpersResult","newArgs","nextArgs","hasData","empty","fetchResolver","reducerFn","action","urlTransform","rxClean","usedKeys","urlWithParams","rx","RegExp","cleanURL","usedKeysArray","qsParseOptions","mergeParams","qsStringifyOptions","urlStringParams","props"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;ACtCA;AACA;;;;;;;;;;mBAuDwBA,Q;;AArDxB;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;;;AAEA;;AAEA;;;;AAIA,KAAMC,wBAAwB;AAC5BC,gBAAa,uBAAaC;AADE,EAA9B;;AAIA,KAAMC,SAAS,aAAf;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCe,UAASJ,QAAT,CAAkBK,MAAlB,EAA0B;AACvCA,cAAWA,SAAS,EAApB;AACA,OAAMC,cAAc;AAClBC,YAAO,IADW;AAElBC,aAAQ,KAFU;AAGlBC,cAAS,IAHS;AAIlBC,uBAAkB,IAJA;AAKlBC,cAAS,EALS;AAMlBC,sBAAiB;AANC,IAApB;;AASA,OAAMC,MAAM;AACVC,QADU,eACNC,GADM,EACDC,KADC,EACM;AACd,WAAID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AAauQ,WAAb,EAA0BC,kBAA1B,CAAxB;AACA,YAAU/C,UAAU,CAAV,CAAV,SAA0BgD,eAA1B;AACD;AACD,UAAOL,QAAP;AACD;;;;;;;;;;;;;;;;;;mBC3Dc,UAASxZ,MAAT,EAAiB8Z,KAAjB,EAAwB;AACrC,OAAI,CAAC/O,MAAMS,OAAN,CAAcsO,KAAd,CAAL,EAA2B;AACzB,yBAAY9Z,MAAZ;AACD;;AAED,UAAOmD,OAAOC,IAAP,CAAYpD,UAAU,EAAtB,EAA0BqD,MAA1B,CAAiC,UAAC9B,IAAD,EAAOX,GAAP,EAAc;AACpD,SAAIkZ,MAAM7S,OAAN,CAAcrG,GAAd,MAAuB,CAAC,CAA5B,EAA+B;AAC7BW,YAAKX,GAAL,IAAYZ,OAAOY,GAAP,CAAZ;AACD;AACD,YAAOW,IAAP;AACD,IALM,EAKJ,EALI,CAAP;AAMD,E","file":"redux-api.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[\"redux-api\"] = factory();\n\telse\n\t\troot[\"redux-api\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\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 f549867ca3f123e99e11\n **/","\"use strict\";\n/* eslint no-void: 0 */\n\nimport libUrl from \"url\";\nimport reducerFn from \"./reducerFn\";\nimport actionFn from \"./actionFn\";\nimport transformers from \"./transformers\";\nimport async from \"./async\";\n\n// export { transformers, async };\n\n/**\n * Default configuration for each endpoint\n * @type {Object}\n */\nconst defaultEndpointConfig = {\n transformer: transformers.object\n};\n\nconst PREFIX = \"@@redux-api\";\n/**\n * Entry api point\n * @param {Object} config Rest api configuration\n * @param {Function} fetch Adapter for rest requests\n * @param {Boolean} isServer false by default (fif you want to use it for isomorphic apps)\n * @return {actions, reducers} { actions, reducers}\n * @example ```js\n * const api = reduxApi({\n * test: \"/plain/url\",\n * testItem: \"/plain/url/:id\",\n * testModify: {\n * url: \"/plain/url/:endpoint\",\n\n * transformer: (data)=> !data ?\n * { title: \"\", message: \"\" } :\n * { title: data.title, message: data.message },\n * options: {\n * method: \"post\"\n * headers: {\n * \"Accept\": \"application/json\",\n * \"Content-Type\": \"application/json\"\n * }\n * }\n * }\n * });\n * // register reducers\n *\n * // call actions\n * dispatch(api.actions.test());\n * dispatch(api.actions.testItem({id: 1}));\n * dispatch(api.actions.testModify({endpoint: \"upload-1\"}, {\n * body: JSON.stringify({title: \"Hello\", message: \"World\"})\n * }));\n * ```\n */\n\nexport default function reduxApi(config) {\n config || (config = {});\n const fetchHolder = {\n fetch: null,\n server: false,\n rootUrl: null,\n middlewareParser: null,\n options: {},\n responseHandler: null\n };\n\n const cfg = {\n use(key, value) {\n if (key === \"rootUrl\") {\n value && (fetchHolder[key] = libUrl.parse(value));\n } else {\n fetchHolder[key] = value;\n }\n\n return this;\n },\n init(fetch, isServer=false, rootUrl) {\n /* eslint no-console: 0 */\n console.warn(\"Deprecated method, use `use` method\");\n this.use(\"fetch\", fetch);\n this.use(\"server\", isServer);\n this.use(\"rootUrl\", rootUrl);\n return this;\n },\n actions: {},\n reducers: {},\n events: {}\n };\n function fnConfigCallback(memo, value, key) {\n const opts = typeof value === \"object\" ?\n { ...defaultEndpointConfig, reducerName: key, ...value } :\n { ...defaultEndpointConfig, reducerName: key, url: value };\n\n if (opts.broadcast !== (void 0)) {\n /* eslint no-console: 0 */\n console.warn(\"Deprecated `broadcast` option. you shoud use `events`\" +\n \"to catch redux-api events (see https://github.com/lexich/redux-api/blob/master/DOCS.md#Events)\");\n }\n\n const {\n url, urlOptions, options, transformer, broadcast, crud,\n reducerName, prefetch, postfetch, validation, helpers,\n } = opts;\n\n const ACTIONS = {\n actionFetch: `${PREFIX}@${reducerName}`,\n actionSuccess: `${PREFIX}@${reducerName}_success`,\n actionFail: `${PREFIX}@${reducerName}_fail`,\n actionReset: `${PREFIX}@${reducerName}_delete`\n };\n\n const meta = {\n urlOptions,\n fetch: opts.fetch ? opts.fetch : function(...args) {\n return fetchHolder.fetch.apply(this, args);\n },\n holder: fetchHolder,\n broadcast,\n virtual: !!opts.virtual,\n reducerName,\n actions: memo.actions,\n prefetch,\n postfetch,\n validation,\n helpers,\n transformer,\n crud\n };\n\n memo.actions[key] = actionFn(url, key, options, ACTIONS, meta);\n\n if (!meta.virtual && !memo.reducers[reducerName]) {\n const initialState = {\n sync: false,\n syncing: false,\n loading: false,\n data: transformer()\n };\n const reducer = opts.reducer ? opts.reducer.bind(memo) : null;\n memo.reducers[reducerName] = reducerFn(initialState, ACTIONS, reducer);\n }\n memo.events[reducerName] = ACTIONS;\n return memo;\n }\n\n return Object.keys(config).reduce(\n (memo, key)=> fnConfigCallback(memo, config[key], key, config), cfg);\n}\n\nreduxApi.transformers = transformers;\nreduxApi.async = async;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.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/** WEBPACK FOOTER **\n ** ./~/url/url.js\n **/","// Load modules\n\n\n// Declare internals\n\nvar internals = {};\ninternals.hexTable = new Array(256);\nfor (var h = 0; h < 256; ++h) {\n internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase();\n}\n\n\nexports.arrayToObject = function (source, options) {\n\n var obj = options.plainObjects ? Object.create(null) : {};\n for (var i = 0, il = source.length; i < il; ++i) {\n if (typeof source[i] !== 'undefined') {\n\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\n\nexports.merge = function (target, source, options) {\n\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (Array.isArray(target)) {\n target.push(source);\n }\n else if (typeof target === 'object') {\n target[source] = true;\n }\n else {\n target = [target, source];\n }\n\n return target;\n }\n\n if (typeof target !== 'object') {\n target = [target].concat(source);\n return target;\n }\n\n if (Array.isArray(target) &&\n !Array.isArray(source)) {\n\n target = exports.arrayToObject(target, options);\n }\n\n var keys = Object.keys(source);\n for (var k = 0, kl = keys.length; k < kl; ++k) {\n var key = keys[k];\n var value = source[key];\n\n if (!Object.prototype.hasOwnProperty.call(target, key)) {\n target[key] = value;\n }\n else {\n target[key] = exports.merge(target[key], value, options);\n }\n }\n\n return target;\n};\n\n\nexports.decode = function (str) {\n\n try {\n return decodeURIComponent(str.replace(/\\+/g, ' '));\n } catch (e) {\n return str;\n }\n};\n\nexports.encode = function (str) {\n\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n if (typeof str !== 'string') {\n str = '' + str;\n }\n\n var out = '';\n for (var i = 0, il = str.length; i < il; ++i) {\n var c = str.charCodeAt(i);\n\n if (c === 0x2D || // -\n c === 0x2E || // .\n c === 0x5F || // _\n c === 0x7E || // ~\n (c >= 0x30 && c <= 0x39) || // 0-9\n (c >= 0x41 && c <= 0x5A) || // a-z\n (c >= 0x61 && c <= 0x7A)) { // A-Z\n\n out += str[i];\n continue;\n }\n\n if (c < 0x80) {\n out += internals.hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out += internals.hexTable[0xC0 | (c >> 6)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out += internals.hexTable[0xE0 | (c >> 12)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n ++i;\n c = 0x10000 + (((c & 0x3FF) << 10) | (str.charCodeAt(i) & 0x3FF));\n out += internals.hexTable[0xF0 | (c >> 18)] + internals.hexTable[0x80 | ((c >> 12) & 0x3F)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nexports.compact = function (obj, refs) {\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return obj;\n }\n\n refs = refs || [];\n var lookup = refs.indexOf(obj);\n if (lookup !== -1) {\n return refs[lookup];\n }\n\n refs.push(obj);\n\n if (Array.isArray(obj)) {\n var compacted = [];\n\n for (var i = 0, il = obj.length; i < il; ++i) {\n if (typeof obj[i] !== 'undefined') {\n compacted.push(obj[i]);\n }\n }\n\n return compacted;\n }\n\n var keys = Object.keys(obj);\n for (i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n obj[key] = exports.compact(obj[key], refs);\n }\n\n return obj;\n};\n\n\nexports.isRegExp = function (obj) {\n\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\n\nexports.isBuffer = function (obj) {\n\n if (obj === null ||\n typeof obj === 'undefined') {\n\n return false;\n }\n\n return !!(obj.constructor &&\n obj.constructor.isBuffer &&\n obj.constructor.isBuffer(obj));\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/utils.js\n **/","/* eslint no-void: 0 */\nconst toString = Object.prototype.toString;\nconst OBJECT = \"[object Object]\";\nconst ARRAY = \"[object Array]\";\n\nexport function mergePair(a, b) {\n if (a === (void 0)) { return b; }\n if (b === (void 0)) { return a; }\n\n const aType = toString.call(a);\n const bType = toString.call(b);\n if (aType === ARRAY) {\n return a.concat(b);\n }\n if (bType === ARRAY) {\n return [a].concat(b);\n }\n if (aType !== OBJECT || bType !== OBJECT) {\n return b;\n }\n return Object.keys(b).reduce((memo, key)=> {\n memo[key] = mergePair(a[key], b[key]);\n return memo;\n }, a);\n}\n\nexport default function(...args) {\n return args.length ? args.reduce(mergePair) : null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/merge.js\n **/","module.exports = __webpack_amd_options__;\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/amd-options.js\n ** module id = 4\n ** module chunks = 0\n **/","module.exports = fastApply;\r\n\r\nfunction fastApply(fn, context, args) {\r\n \r\n switch (args ? args.length : 0) {\r\n case 0:\r\n return context ? fn.call(context) : fn();\r\n case 1:\r\n return context ? fn.call(context, args[0]) : fn(args[0]);\r\n case 2:\r\n return context ? fn.call(context, args[0], args[1]) : fn(args[0], args[1]);\r\n case 3:\r\n return context ? fn.call(context, args[0], args[1], args[2]) : fn(args[0], args[1], args[2]);\r\n case 4:\r\n return context ? fn.call(context, args[0], args[1], args[2], args[3]) : fn(args[0], args[1], args[2], args[3]);\r\n case 5:\r\n return context ? fn.call(context, args[0], args[1], args[2], args[3], args[4]) : fn(args[0], args[1], args[2], args[3], args[4]);\r\n default:\r\n return fn.apply(context, args);\r\n }\r\n \r\n}\n\n\n/** WEBPACK FOOTER **\n ** ./~/fast-apply/index.js\n **/","// Load modules\n\nvar Stringify = require('./stringify');\nvar Parse = require('./parse');\n\n\n// Declare internals\n\nvar internals = {};\n\n\nmodule.exports = {\n stringify: Stringify,\n parse: Parse\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/index.js\n **/","// Load modules\n\nvar Utils = require('./utils');\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n depth: 5,\n arrayLimit: 20,\n parameterLimit: 1000,\n strictNullHandling: false,\n plainObjects: false,\n allowPrototypes: false,\n allowDots: false\n};\n\n\ninternals.parseValues = function (str, options) {\n\n var obj = {};\n var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);\n\n for (var i = 0, il = parts.length; i < il; ++i) {\n var part = parts[i];\n var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;\n\n if (pos === -1) {\n obj[Utils.decode(part)] = '';\n\n if (options.strictNullHandling) {\n obj[Utils.decode(part)] = null;\n }\n }\n else {\n var key = Utils.decode(part.slice(0, pos));\n var val = Utils.decode(part.slice(pos + 1));\n\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n }\n else {\n obj[key] = [].concat(obj[key]).concat(val);\n }\n }\n }\n\n return obj;\n};\n\n\ninternals.parseObject = function (chain, val, options) {\n\n if (!chain.length) {\n return val;\n }\n\n var root = chain.shift();\n\n var obj;\n if (root === '[]') {\n obj = [];\n obj = obj.concat(internals.parseObject(chain, val, options));\n }\n else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;\n var index = parseInt(cleanRoot, 10);\n var indexString = '' + index;\n if (!isNaN(index) &&\n root !== cleanRoot &&\n indexString === cleanRoot &&\n index >= 0 &&\n (options.parseArrays &&\n index <= options.arrayLimit)) {\n\n obj = [];\n obj[index] = internals.parseObject(chain, val, options);\n }\n else {\n obj[cleanRoot] = internals.parseObject(chain, val, options);\n }\n }\n\n return obj;\n};\n\n\ninternals.parseKeys = function (key, val, options) {\n\n if (!key) {\n return;\n }\n\n // Transform dot notation to bracket notation\n\n if (options.allowDots) {\n key = key.replace(/\\.([^\\.\\[]+)/g, '[$1]');\n }\n\n // The regex chunks\n\n var parent = /^([^\\[\\]]*)/;\n var child = /(\\[[^\\[\\]]*\\])/g;\n\n // Get the parent\n\n var segment = parent.exec(key);\n\n // Stash the parent if it exists\n\n var keys = [];\n if (segment[1]) {\n // If we aren't using plain objects, optionally prefix keys\n // that would overwrite object prototype properties\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1])) {\n\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(segment[1]);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while ((segment = child.exec(key)) !== null && i < options.depth) {\n\n ++i;\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1].replace(/\\[|\\]/g, ''))) {\n\n if (!options.allowPrototypes) {\n continue;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return internals.parseObject(keys, val, options);\n};\n\n\nmodule.exports = function (str, options) {\n\n options = options || {};\n options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;\n options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;\n options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;\n options.parseArrays = options.parseArrays !== false;\n options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;\n options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;\n options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;\n options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;\n options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\n if (str === '' ||\n str === null ||\n typeof str === 'undefined') {\n\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n var newObj = internals.parseKeys(key, tempObj[key], options);\n obj = Utils.merge(obj, newObj, options);\n }\n\n return Utils.compact(obj);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/parse.js\n **/","// Load modules\n\nvar Utils = require('./utils');\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n arrayPrefixGenerators: {\n brackets: function (prefix, key) {\n\n return prefix + '[]';\n },\n indices: function (prefix, key) {\n\n return prefix + '[' + key + ']';\n },\n repeat: function (prefix, key) {\n\n return prefix;\n }\n },\n strictNullHandling: false,\n skipNulls: false,\n encode: true\n};\n\n\ninternals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) {\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n }\n else if (Utils.isBuffer(obj)) {\n obj = obj.toString();\n }\n else if (obj instanceof Date) {\n obj = obj.toISOString();\n }\n else if (obj === null) {\n if (strictNullHandling) {\n return encode ? Utils.encode(prefix) : prefix;\n }\n\n obj = '';\n }\n\n if (typeof obj === 'string' ||\n typeof obj === 'number' ||\n typeof obj === 'boolean') {\n\n if (encode) {\n return [Utils.encode(prefix) + '=' + Utils.encode(obj)];\n }\n return [prefix + '=' + obj];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (Array.isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n if (Array.isArray(obj)) {\n values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n else {\n values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n }\n\n return values;\n};\n\n\nmodule.exports = function (obj, options) {\n\n options = options || {};\n var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;\n var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;\n var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;\n var sort = typeof options.sort === 'function' ? options.sort : null;\n var objKeys;\n var filter;\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n }\n else if (Array.isArray(options.filter)) {\n objKeys = filter = options.filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return '';\n }\n\n var arrayFormat;\n if (options.arrayFormat in internals.arrayPrefixGenerators) {\n arrayFormat = options.arrayFormat;\n }\n else if ('indices' in options) {\n arrayFormat = options.indices ? 'indices' : 'repeat';\n }\n else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (sort) {\n objKeys.sort(sort);\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort));\n }\n\n return keys.join(delimiter);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/stringify.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\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/** WEBPACK FOOTER **\n ** ./~/querystring/decode.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\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/** WEBPACK FOOTER **\n ** ./~/querystring/encode.js\n **/","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/querystring/index.js\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 \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 state to ,\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 \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/** WEBPACK FOOTER **\n ** ./~/url/~/punycode/punycode.js\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/** WEBPACK FOOTER **\n ** (webpack)/buildin/module.js\n **/","\"use strict\";\n\nexport default class PubSub {\n constructor() {\n this.container = [];\n }\n push(cb) {\n (cb instanceof Function) && this.container.push(cb);\n }\n resolve(data) {\n this.container.forEach((cb)=> cb(null, data));\n this.container = [];\n }\n reject(err) {\n this.container.forEach((cb)=> cb(err));\n this.container = [];\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/PubSub.js\n **/","\"use strict\";\n\nimport fastApply from \"fast-apply\";\nimport libUrl from \"url\";\nimport urlTransform from \"./urlTransform\";\nimport merge from \"./utils/merge\";\nimport fetchResolver from \"./fetchResolver\";\nimport PubSub from \"./PubSub\";\nimport createHolder from \"./createHolder\";\n\nfunction none() {}\n\nfunction extractArgs(args) {\n let pathvars;\n let params={};\n let callback;\n if (args[0] instanceof Function) {\n callback = args[0];\n } else if (args[1] instanceof Function) {\n pathvars = args[0];\n callback = args[1];\n } else {\n pathvars = args[0];\n params = args[1];\n callback = args[2] || none;\n }\n return [pathvars, params, callback];\n}\n\nfunction helperCrudFunction(name) {\n return (...args)=> {\n const [pathvars, params, cb] = extractArgs(args);\n return [pathvars, { ...params, method: name.toUpperCase() }, cb];\n };\n}\n\nfunction defaultMiddlewareArgsParser(dispatch, getState) {\n return { dispatch, getState };\n}\n\nexport const CRUD = [\"get\", \"post\", \"put\", \"delete\", \"patch\"].reduce(\n (memo, name)=> {\n memo[name] = helperCrudFunction(name);\n return memo;\n }, {});\n\n/**\n * Constructor for create action\n * @param {String} url endpoint's url\n * @param {String} name action name\n * @param {Object} options action configuration\n * @param {Object} ACTIONS map of actions\n * @param {[type]} fetchAdapter adapter for fetching data\n * @return {Function+Object} action function object\n */\nexport default function actionFn(url, name, options, ACTIONS={}, meta={}) {\n const { actionFetch, actionSuccess, actionFail, actionReset } = ACTIONS;\n const pubsub = new PubSub();\n const requestHolder = createHolder();\n const responseHandler = meta && meta.holder && meta.holder.responseHandler;\n /**\n * Fetch data from server\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} getState helper meta function\n */\n const request = (pathvars, params, getState=none)=> {\n const resultUrlT = urlTransform(url, pathvars, meta.urlOptions);\n const rootUrl = meta.holder ? meta.holder.rootUrl : null;\n let urlT = resultUrlT;\n if (rootUrl) {\n const urlObject = libUrl.parse(urlT);\n if (!urlObject.host) {\n const urlPath = (rootUrl.path ? rootUrl.path.replace(/\\/$/, \"\") : \"\") +\n \"/\" + (urlObject.path ? urlObject.path.replace(/^\\//, \"\") : \"\");\n urlT = `${rootUrl.protocol}//${rootUrl.host}${urlPath}`;\n }\n }\n const globalOptions = !meta.holder ? {} :\n (meta.holder.options instanceof Function) ?\n meta.holder.options(urlT, params, getState) : (meta.holder.options);\n const baseOptions = (options instanceof Function) ?\n options(urlT, params, getState) :\n options;\n const opts = merge({}, globalOptions, baseOptions, params);\n const response = meta.fetch(urlT, opts);\n const result = !meta.validation ? response : response.then(\n (data)=> new Promise(\n (resolve, reject)=> meta.validation(data,\n (err)=> err ? reject(err) : resolve(data))));\n if (responseHandler) {\n if (result && result.then) {\n result.then(\n (data)=> responseHandler(null, data),\n (err)=> responseHandler(err)\n );\n } else {\n responseHandler(result);\n }\n }\n result && result.catch && result.catch(none);\n return result;\n };\n\n /**\n * Fetch data from server\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} callback) callback execute after end request\n */\n function fn(...args) {\n const [pathvars, params, callback] = extractArgs(args);\n const syncing = params ? !!params.syncing : false;\n params && delete params.syncing;\n pubsub.push(callback);\n return (...middlewareArgs)=> {\n const middlewareParser = (meta.holder && meta.holder.middlewareParser) ||\n defaultMiddlewareArgsParser;\n const { dispatch, getState } = middlewareParser(...middlewareArgs);\n const { reducerName } = meta;\n const state = getState();\n const store = state[reducerName];\n const requestOptions = { pathvars, params };\n if (store && store.loading) {\n return;\n }\n const prevData = state && state[reducerName] && state[reducerName].data;\n dispatch({ type: actionFetch, syncing, request: requestOptions });\n const fetchResolverOpts = {\n dispatch,\n getState,\n actions: meta.actions,\n prefetch: meta.prefetch\n };\n const result = new Promise((done, fail)=> {\n fetchResolver(0, fetchResolverOpts, (err)=> {\n if (err) {\n pubsub.reject(err);\n return fail(err);\n }\n new Promise((resolve, reject)=> {\n requestHolder.set({\n resolve,\n reject,\n promise: request(pathvars, params, getState).then(resolve, reject)\n });\n }).then((d)=> {\n requestHolder.pop();\n const data = meta.transformer(d, prevData, {\n type: actionSuccess, request: requestOptions\n });\n dispatch({\n data,\n origData: d,\n type: actionSuccess,\n syncing: false,\n request: requestOptions\n });\n if (meta.broadcast) {\n meta.broadcast.forEach((type)=> {\n dispatch({ type, data, origData: d, request: requestOptions });\n });\n }\n if (meta.postfetch) {\n meta.postfetch.forEach((postfetch)=> {\n (postfetch instanceof Function) && postfetch({\n data, getState, dispatch, actions: meta.actions, request: requestOptions\n });\n });\n }\n pubsub.resolve(data);\n done(data);\n }, (error)=> {\n dispatch({ type: actionFail, syncing: false, error, request: requestOptions });\n pubsub.reject(error);\n fail(error);\n });\n });\n });\n result.catch(none);\n return result;\n };\n }\n\n /*\n Pure rest request\n */\n fn.request = request;\n\n /**\n * Reset store to initial state\n */\n fn.reset = (mutation)=> {\n const defer = requestHolder.pop();\n defer && defer.reject(new Error(\"Application abort request\"));\n return mutation === \"sync\" ? { type: actionReset, mutation } : { type: actionReset };\n };\n\n /**\n * Sync store with server. In server mode works as usual method.\n * If data have already synced, data would not fetch after call this method.\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} callback) callback execute after end request\n */\n fn.sync = (...args)=> {\n const [pathvars, params, callback] = extractArgs(args);\n const isServer = meta.holder ? meta.holder.server : false;\n return (dispatch, getState)=> {\n const state = getState();\n const store = state[name];\n if (!isServer && store && store.sync) {\n callback(null, store.data);\n return;\n }\n const modifyParams = { ...params, syncing: true };\n return fn(pathvars, modifyParams, callback)(dispatch, getState);\n };\n };\n\n let helpers = meta.helpers || {};\n if (meta.crud) {\n helpers = { ...CRUD, ...helpers };\n }\n const fnHelperCallback = (memo, func, helpername)=> {\n if (memo[helpername]) {\n throw new Error(\n `Helper name: \"${helpername}\" for endpoint \"${name}\" has been already reserved`\n );\n }\n const { sync, call } = (func instanceof Function) ? { call: func } : func;\n memo[helpername] = (...args)=> (dispatch, getState)=> {\n const index = args.length - 1;\n const callbackFn = (args[index] instanceof Function) ? args[index] : none;\n const helpersResult = fastApply(call, { getState, dispatch, actions: meta.actions }, args);\n const result = new Promise((resolve, reject)=> {\n const callback = (err, data)=> {\n err ? reject(err) : resolve(data);\n callbackFn(err, data);\n };\n // If helper alias using async functionality\n if (helpersResult instanceof Function) {\n helpersResult((error, newArgs=[])=> {\n if (error) {\n callback(error);\n } else {\n fastApply(\n sync ? fn.sync : fn, null, newArgs.concat(callback)\n )(dispatch, getState);\n }\n });\n } else {\n // if helper alias is synchronous\n fastApply(\n sync ? fn.sync : fn, null, helpersResult.concat(callback)\n )(dispatch, getState);\n }\n });\n result.catch(none);\n return result;\n };\n return memo;\n };\n\n return Object.keys(helpers).reduce(\n (memo, key)=> fnHelperCallback(memo, helpers[key], key, helpers), fn);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/actionFn.js\n **/","/**\n *\n * @param {[type]} dispatch [description]\n * @param {...[type]} args [description]\n * @return {[type]} [description]\n * @example\n * async(dispatch,\n * (cb)=> actions.test(1, cb),\n * actions.test2\n * ).then(()=> async(dispatch, actions.test3))\n */\nexport default function async(dispatch, ...args) {\n const fn = args[0];\n const nextArgs = args.slice(1);\n return new Promise(\n (resolve, reject)=> {\n if (!fn) {\n reject(\"no chain function\");\n } else {\n dispatch(fn((err, data)=> {\n err ? reject(err) : resolve(data);\n }) || {});\n }\n })\n .then((data)=> {\n if (nextArgs.length) {\n return async(dispatch, ...nextArgs);\n } else {\n return data;\n }\n });\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/async.js\n **/","\"use strict\";\n\nexport default function() {\n let data;\n let hasData = false;\n return {\n set(val) {\n if (!hasData) {\n data = val;\n hasData = true;\n return true;\n }\n return false;\n },\n empty() {\n return !hasData;\n },\n pop() {\n if (hasData) {\n hasData = false;\n const result = data;\n data = null;\n return result;\n }\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/createHolder.js\n **/","\"use strict\";\n\nfunction none() {}\n\nexport default function fetchResolver(index=0, opts={}, cb=none) {\n if (!opts.prefetch || index >= opts.prefetch.length) {\n cb();\n } else {\n opts.prefetch[index](opts,\n (err)=> err ? cb(err) : fetchResolver(index + 1, opts, cb));\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/fetchResolver.js\n **/","\"use strict\";\n/* eslint no-case-declarations: 0 */\n/**\n * Reducer contructor\n * @param {Object} initialState default initial state\n * @param {Object} actions actions map\n * @param {Function} transformer transformer function\n * @param {Function} reducer custom reducer function\n * @return {Function} reducer function\n */\nexport default function reducerFn(initialState, actions={}, reducer) {\n const { actionFetch, actionSuccess, actionFail, actionReset } = actions;\n return (state=initialState, action)=> {\n switch (action.type) {\n case actionFetch:\n return {\n ...state,\n loading: true,\n error: null,\n syncing: !!action.syncing\n };\n case actionSuccess:\n return {\n ...state,\n loading: false,\n sync: true,\n syncing: false,\n error: null,\n data: action.data\n };\n case actionFail:\n return {\n ...state,\n loading: false,\n error: action.error,\n syncing: false\n };\n case actionReset:\n const { mutation } = action;\n return (mutation === \"sync\") ?\n { ...state, sync: false } :\n { ...initialState };\n default:\n return reducer ? reducer(state, action) : state;\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/reducerFn.js\n **/","\"use strict\";\n\nconst toString = Object.prototype.toString;\nconst OBJECT = \"[object Object]\";\n\n/**\n * Default responce transformens\n */\nexport default {\n array(data) {\n return !data ? [] : Array.isArray(data) ? data : [data];\n },\n object(data) {\n if (!data) {\n return {};\n }\n return toString.call(data) === OBJECT ? data : { data };\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/transformers.js\n **/","\"use strict\";\nimport qs from \"qs\";\nimport { parse } from \"url\";\nimport omit from \"./utils/omit\";\nimport merge from \"./utils/merge\";\n\nconst rxClean = /(\\(:[^\\)]+\\)|:[^\\/]+)/g;\n\n/**\n * Url modification\n * @param {String} url url template\n * @param {Object} params params for url template\n * @param {Object} options transformation options, accepts +delimiter+, +arrayFormat+,\n * +qsStringifyOptions+ and +qsParseOptions+\n * @return {String} result url\n */\nexport default function urlTransform(url, params, options) {\n if (!url) { return \"\"; }\n params || (params = {});\n const usedKeys = {};\n\n const urlWithParams = Object.keys(params).reduce((url, key)=> {\n const value = params[key];\n const rx = new RegExp(`(\\\\(:${key}\\\\)|:${key})`, \"g\");\n return url.replace(rx, ()=> {\n usedKeys[key] = value;\n return value;\n });\n }, url);\n\n\n if (!urlWithParams) { return urlWithParams; }\n const { protocol, host, path } = parse(urlWithParams);\n const cleanURL = (host) ?\n `${protocol}//${host}${path.replace(rxClean, \"\")}` :\n path.replace(rxClean, \"\");\n const usedKeysArray = Object.keys(usedKeys);\n if (usedKeysArray.length !== Object.keys(params).length) {\n const urlObject = cleanURL.split(\"?\");\n options || (options = {});\n const { arrayFormat, delimiter } = options;\n const qsParseOptions = {\n arrayFormat,\n delimiter,\n ...options.qsParseOptions\n };\n const mergeParams = merge(\n (urlObject[1] && qs.parse(urlObject[1], qsParseOptions)),\n omit(params, usedKeysArray)\n );\n const qsStringifyOptions = {\n arrayFormat,\n delimiter,\n ...options.qsStringifyOptions\n };\n const urlStringParams = qs.stringify(mergeParams, qsStringifyOptions);\n return `${urlObject[0]}?${urlStringParams}`;\n }\n return cleanURL;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/urlTransform.js\n **/","export default function(object, props) {\n if (!Array.isArray(props)) {\n return { ...object };\n }\n\n return Object.keys(object || {}).reduce((memo, key)=> {\n if (props.indexOf(key) === -1) {\n memo[key] = object[key];\n }\n return memo;\n }, {});\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/omit.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/redux-api.min.js b/dist/redux-api.min.js index 5cb3ecc..9b309f1 100644 --- a/dist/redux-api.min.js +++ b/dist/redux-api.min.js @@ -1,10 +1,10 @@ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["redux-api"]=e():t["redux-api"]=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([/*!**********************!*\ !*** ./src/index.js ***! \**********************/ -function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t){t||(t={});var e={fetch:null,server:!1,rootUrl:null,middlewareParser:null,options:{}},r={use:function(t,r){return"rootUrl"===t?r&&(e[t]=c.default.parse(r)):e[t]=r,this},init:function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=arguments[2];return console.warn("Deprecated method, use `use` method"),this.use("fetch",t),this.use("server",e),this.use("rootUrl",r),this},actions:{},reducers:{},events:{}},n=function(t,r,n){var o="object"===("undefined"==typeof r?"undefined":i(r))?a({},m,{reducerName:n},r):a({},m,{reducerName:n,url:r});void 0!==o.broadcast&&console.warn("Deprecated `broadcast` option. you shoud use `events`to catch redux-api events (see https://github.com/lexich/redux-api/blob/master/DOCS.md#Events)");var s=o.url,c=o.urlOptions,u=o.options,f=o.transformer,p=o.broadcast,d=o.crud,y=o.reducerName,v=o.prefetch,g=o.postfetch,j=o.validation,O=o.helpers,x={actionFetch:b+"@"+y,actionSuccess:b+"@"+y+"_success",actionFail:b+"@"+y+"_fail",actionReset:b+"@"+y+"_delete"},w={urlOptions:c,fetch:o.fetch?o.fetch:function(){for(var t=arguments.length,r=Array(t),n=0;n",'"',"`"," ","\r","\n","\t"],m=["{","}","|","\\","^","`"].concat(v),b=["'"].concat(m),g=["%","/","?",";","#"].concat(b),j=["/","?","#"],O=255,x=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=r(/*! querystring */13);n.prototype.parse=function(t,e,r){if(!c(t))throw new TypeError("Parameter 'url' must be a string, not "+("undefined"==typeof t?"undefined":h(t)));var n=t;n=n.trim();var o=d.exec(n);if(o){o=o[0];var a=o.toLowerCase();this.protocol=a,n=n.substr(o.length)}if(r||o||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var i="//"===n.substr(0,2);!i||o&&P[o]||(n=n.substr(2),this.slashes=!0)}if(!P[o]&&(i||o&&!S[o])){for(var s=-1,u=0;u127?"x":k[F];if(!q.match(x)){var R=m.slice(0,u),U=m.slice(u+1),E=k.match(w);E&&(R.push(E[1]),U.unshift(E[2])),U.length&&(n="/"+U.join(".")+n),this.hostname=R.join(".");break}}}if(this.hostname.length>O?this.hostname="":this.hostname=this.hostname.toLowerCase(),!v){for(var N=this.hostname.split("."),T=[],u=0;u0)&&r.host.split("@");v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return r.search=t.search,r.query=t.query,l(r.pathname)&&l(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var m=d.slice(-1)[0],b=(r.host||t.host)&&("."===m||".."===m)||""===m,g=0,j=d.length;j>=0;j--)m=d[j],"."==m?d.splice(j,1):".."===m?(d.splice(j,1),g++):g&&(d.splice(j,1),g--);if(!h&&!p)for(;g--;g)d.unshift("..");!h||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),b&&"/"!==d.join("/").substr(-1)&&d.push("");var O=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(y){r.hostname=r.host=O?"":d.length?d.shift():"";var v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return h=h||r.host&&d.length,h&&!O&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),l(r.pathname)&&l(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=y.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},/*!***************************!*\ +function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t){function e(t,e,n){var o="object"===("undefined"==typeof e?"undefined":i(e))?a({},m,{reducerName:n},e):a({},m,{reducerName:n,url:e});void 0!==o.broadcast&&console.warn("Deprecated `broadcast` option. you shoud use `events`to catch redux-api events (see https://github.com/lexich/redux-api/blob/master/DOCS.md#Events)");var s=o.url,c=o.urlOptions,u=o.options,f=o.transformer,p=o.broadcast,d=o.crud,y=o.reducerName,v=o.prefetch,g=o.postfetch,j=o.validation,O=o.helpers,x={actionFetch:b+"@"+y,actionSuccess:b+"@"+y+"_success",actionFail:b+"@"+y+"_fail",actionReset:b+"@"+y+"_delete"},w={urlOptions:c,fetch:o.fetch?o.fetch:function(){for(var t=arguments.length,e=Array(t),n=0;n",'"',"`"," ","\r","\n","\t"],m=["{","}","|","\\","^","`"].concat(v),b=["'"].concat(m),g=["%","/","?",";","#"].concat(b),j=["/","?","#"],O=255,x=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=r(/*! querystring */11);n.prototype.parse=function(t,e,r){if(!c(t))throw new TypeError("Parameter 'url' must be a string, not "+("undefined"==typeof t?"undefined":h(t)));var n=t;n=n.trim();var o=d.exec(n);if(o){o=o[0];var a=o.toLowerCase();this.protocol=a,n=n.substr(o.length)}if(r||o||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var i="//"===n.substr(0,2);!i||o&&P[o]||(n=n.substr(2),this.slashes=!0)}if(!P[o]&&(i||o&&!S[o])){for(var s=-1,u=0;u127?"x":k[F];if(!q.match(x)){var R=m.slice(0,u),U=m.slice(u+1),E=k.match(w);E&&(R.push(E[1]),U.unshift(E[2])),U.length&&(n="/"+U.join(".")+n),this.hostname=R.join(".");break}}}if(this.hostname.length>O?this.hostname="":this.hostname=this.hostname.toLowerCase(),!v){for(var N=this.hostname.split("."),T=[],u=0;u0)&&r.host.split("@");v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return r.search=t.search,r.query=t.query,l(r.pathname)&&l(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var m=d.slice(-1)[0],b=(r.host||t.host)&&("."===m||".."===m)||""===m,g=0,j=d.length;j>=0;j--)m=d[j],"."==m?d.splice(j,1):".."===m?(d.splice(j,1),g++):g&&(d.splice(j,1),g--);if(!h&&!p)for(;g--;g)d.unshift("..");!h||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),b&&"/"!==d.join("/").substr(-1)&&d.push("");var O=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(y){r.hostname=r.host=O?"":d.length?d.shift():"";var v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return h=h||r.host&&d.length,h&&!O&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),l(r.pathname)&&l(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=y.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},/*!***************************!*\ !*** ./~/qs/lib/utils.js ***! \***************************/ function(t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n={};n.hexTable=new Array(256);for(var o=0;o<256;++o)n.hexTable[o]="%"+((o<16?"0":"")+o.toString(16)).toUpperCase();e.arrayToObject=function(t,e){for(var r=e.plainObjects?Object.create(null):{},n=0,o=t.length;n=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?e+=t[r]:a<128?e+=n.hexTable[a]:a<2048?e+=n.hexTable[192|a>>6]+n.hexTable[128|63&a]:a<55296||a>=57344?e+=n.hexTable[224|a>>12]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a]:(++r,a=65536+((1023&a)<<10|1023&t.charCodeAt(r)),e+=n.hexTable[240|a>>18]+n.hexTable[128|a>>12&63]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a])}return e},e.compact=function(t,n){if("object"!==("undefined"==typeof t?"undefined":r(t))||null===t)return t;n=n||[];var o=n.indexOf(t);if(o!==-1)return n[o];if(n.push(t),Array.isArray(t)){for(var a=[],i=0,s=t.length;i=0&&r.parseArrays&&s<=r.arrayLimit?(n=[],n[s]=o.parseObject(t,e,r)):n[i]=o.parseObject(t,e,r)}return n},o.parseKeys=function(t,e,r){if(t){r.allowDots&&(t=t.replace(/\.([^\.\[]+)/g,"[$1]"));var n=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,i=n.exec(t),s=[];if(i[1]){if(!r.plainObjects&&Object.prototype.hasOwnProperty(i[1])&&!r.allowPrototypes)return;s.push(i[1])}for(var c=0;null!==(i=a.exec(t))&&c0&&c>s&&(c=s);for(var u=0;u=0?(l=d.substr(0,y),f=d.substr(y+1)):(l=d,f=""),h=decodeURIComponent(l),p=decodeURIComponent(f),r(a,h)?Array.isArray(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a}},/*!*********************************!*\ + !*** ./~/querystring/encode.js ***! + \*********************************/ +function(t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n=function(t){switch("undefined"==typeof t?"undefined":r(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,o,a){return e=e||"&",o=o||"=",null===t&&(t=void 0),"object"===("undefined"==typeof t?"undefined":r(t))?Object.keys(t).map(function(r){var a=encodeURIComponent(n(r))+o;return Array.isArray(t[r])?t[r].map(function(t){return a+encodeURIComponent(n(t))}).join(e):a+encodeURIComponent(n(t[r]))}).join(e):a?encodeURIComponent(n(a))+o+encodeURIComponent(n(t)):""}},/*!********************************!*\ + !*** ./~/querystring/index.js ***! + \********************************/ +function(t,e,r){"use strict";e.decode=e.parse=r(/*! ./decode */9),e.encode=e.stringify=r(/*! ./encode */10)},/*!**************************************!*\ + !*** ./~/url/~/punycode/punycode.js ***! + \**************************************/ +function(t,e,r){var n;(function(t,o){"use strict";var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(i){function s(t){throw RangeError(N[t])}function c(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function u(t,e){var r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(E,".");var o=t.split("."),a=c(o,e).join(".");return n+a}function l(t){for(var e,r,n=[],o=0,a=t.length;o=55296&&e<=56319&&o65535&&(t-=65536,e+=H(t>>>10&1023|55296),t=56320|1023&t),e+=H(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:P}function p(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,r){var n=0;for(t=r?L(t/k):t>>1,t+=L(t/e);t>T*_>>1;n+=P)t=L(t/T);return L(n+(T+1)*t/(t+C))}function y(t){var e,r,n,o,a,i,c,u,l,p,y=[],v=t.length,m=0,b=F,g=q;for(r=t.lastIndexOf(I),r<0&&(r=0),n=0;n=128&&s("not-basic"),y.push(t.charCodeAt(n));for(o=r>0?r+1:0;o=v&&s("invalid-input"),u=h(t.charCodeAt(o++)),(u>=P||u>L((A-m)/i))&&s("overflow"),m+=u*i,l=c<=g?S:c>=g+_?_:c-g,!(uL(A/p)&&s("overflow"),i*=p;e=y.length+1,g=d(m-a,e,0==a),L(m/e)>A-b&&s("overflow"),b+=L(m/e),m%=e,y.splice(m++,0,b)}return f(y)}function v(t){var e,r,n,o,a,i,c,u,f,h,y,v,m,b,g,j=[];for(t=l(t),v=t.length,e=F,r=0,a=q,i=0;i=e&&yL((A-r)/m)&&s("overflow"),r+=(c-e)*m,e=c,i=0;iA&&s("overflow"),y==e){for(u=r,f=P;h=f<=a?S:f>=a+_?_:f-a,!(u= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=P-S,L=Math.floor,H=String.fromCharCode;if(x={version:"1.3.2",ucs2:{decode:l,encode:f},decode:y,encode:v,toASCII:b,toUnicode:m},"object"==a(r(/*! !webpack amd options */4))&&r(/*! !webpack amd options */4))n=function(){return x}.call(e,r,e,t),!(void 0!==n&&(t.exports=n));else if(g&&j)if(t.exports==g)j.exports=x;else for(w in x)x.hasOwnProperty(w)&&(g[w]=x[w]);else i.punycode=x}(void 0)}).call(e,r(/*! ./../../../webpack/buildin/module.js */13)(t),function(){return this}())},/*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ -function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},/*!******************************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/~/punycode/punycode.js ***! - \******************************************************************/ -function(t,e,r){var n;(function(t,o){"use strict";var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};!function(i){function s(t){throw RangeError(N[t])}function c(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function u(t,e){var r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(E,".");var o=t.split("."),a=c(o,e).join(".");return n+a}function l(t){for(var e,r,n=[],o=0,a=t.length;o=55296&&e<=56319&&o65535&&(t-=65536,e+=M(t>>>10&1023|55296),t=56320|1023&t),e+=M(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:P}function p(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,r){var n=0;for(t=r?L(t/k):t>>1,t+=L(t/e);t>T*_>>1;n+=P)t=L(t/T);return L(n+(T+1)*t/(t+C))}function y(t){var e,r,n,o,a,i,c,u,l,p,y=[],v=t.length,m=0,b=F,g=q;for(r=t.lastIndexOf(I),r<0&&(r=0),n=0;n=128&&s("not-basic"),y.push(t.charCodeAt(n));for(o=r>0?r+1:0;o=v&&s("invalid-input"),u=h(t.charCodeAt(o++)),(u>=P||u>L((A-m)/i))&&s("overflow"),m+=u*i,l=c<=g?S:c>=g+_?_:c-g,!(uL(A/p)&&s("overflow"),i*=p;e=y.length+1,g=d(m-a,e,0==a),L(m/e)>A-b&&s("overflow"),b+=L(m/e),m%=e,y.splice(m++,0,b)}return f(y)}function v(t){var e,r,n,o,a,i,c,u,f,h,y,v,m,b,g,j=[];for(t=l(t),v=t.length,e=F,r=0,a=q,i=0;i=e&&yL((A-r)/m)&&s("overflow"),r+=(c-e)*m,e=c,i=0;iA&&s("overflow"),y==e){for(u=r,f=P;h=f<=a?S:f>=a+_?_:f-a,!(u= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=P-S,L=Math.floor,M=String.fromCharCode;if(x={version:"1.3.2",ucs2:{decode:l,encode:f},decode:y,encode:v,toASCII:b,toUnicode:m},"object"==a(r(/*! !webpack amd options */4))&&r(/*! !webpack amd options */4))n=function(){return x}.call(e,r,e,t),!(void 0!==n&&(t.exports=n));else if(g&&j)if(t.exports==g)j.exports=x;else for(w in x)x.hasOwnProperty(w)&&(g[w]=x[w]);else i.punycode=x}(void 0)}).call(e,r(/*! ./../../../../../../buildin/module.js */9)(t),function(){return this}())},/*!*******************************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/~/querystring/decode.js ***! - \*******************************************************************/ -function(t,e){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!=typeof t||0===t.length)return a;var i=/\+/g;t=t.split(e);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var c=t.length;s>0&&c>s&&(c=s);for(var u=0;u=0?(l=d.substr(0,y),f=d.substr(y+1)):(l=d,f=""),h=decodeURIComponent(l),p=decodeURIComponent(f),r(a,h)?Array.isArray(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a}},/*!*******************************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/~/querystring/encode.js ***! - \*******************************************************************/ -function(t,e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n=function(t){switch("undefined"==typeof t?"undefined":r(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,o,a){return e=e||"&",o=o||"=",null===t&&(t=void 0),"object"===("undefined"==typeof t?"undefined":r(t))?Object.keys(t).map(function(r){var a=encodeURIComponent(n(r))+o;return Array.isArray(t[r])?t[r].map(function(t){return a+encodeURIComponent(n(t))}).join(e):a+encodeURIComponent(n(t[r]))}).join(e):a?encodeURIComponent(n(a))+o+encodeURIComponent(n(t)):""}},/*!******************************************************************!*\ - !*** (webpack)/~/node-libs-browser/~/url/~/querystring/index.js ***! - \******************************************************************/ -function(t,e,r){"use strict";e.decode=e.parse=r(/*! ./decode */11),e.encode=e.stringify=r(/*! ./encode */12)},/*!***********************!*\ +function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},/*!***********************!*\ !*** ./src/PubSub.js ***! \***********************/ function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r1?e-1:0),a=1;a !data ?\n\t * { title: \"\", message: \"\" } :\n\t * { title: data.title, message: data.message },\n\t * options: {\n\t * method: \"post\"\n\t * headers: {\n\t * \"Accept\": \"application/json\",\n\t * \"Content-Type\": \"application/json\"\n\t * }\n\t * }\n\t * }\n\t * });\n\t * // register reducers\n\t *\n\t * // call actions\n\t * dispatch(api.actions.test());\n\t * dispatch(api.actions.testItem({id: 1}));\n\t * dispatch(api.actions.testModify({endpoint: \"upload-1\"}, {\n\t * body: JSON.stringify({title: \"Hello\", message: \"World\"})\n\t * }));\n\t * ```\n\t */\n\t\n\tfunction reduxApi(config) {\n\t config || (config = {});\n\t var fetchHolder = {\n\t fetch: null,\n\t server: false,\n\t rootUrl: null,\n\t middlewareParser: null,\n\t options: {}\n\t };\n\t\n\t var cfg = {\n\t use: function use(key, value) {\n\t if (key === \"rootUrl\") {\n\t value && (fetchHolder[key] = _url2.default.parse(value));\n\t } else {\n\t fetchHolder[key] = value;\n\t }\n\t\n\t return this;\n\t },\n\t init: function init(fetch) {\n\t var isServer = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];\n\t var rootUrl = arguments[2];\n\t\n\t /* eslint no-console: 0 */\n\t console.warn(\"Deprecated method, use `use` method\");\n\t this.use(\"fetch\", fetch);\n\t this.use(\"server\", isServer);\n\t this.use(\"rootUrl\", rootUrl);\n\t return this;\n\t },\n\t\n\t actions: {},\n\t reducers: {},\n\t events: {}\n\t };\n\t var fnConfigCallback = function fnConfigCallback(memo, value, key) {\n\t var opts = (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === \"object\" ? _extends({}, defaultEndpointConfig, { reducerName: key }, value) : _extends({}, defaultEndpointConfig, { reducerName: key, url: value });\n\t\n\t if (opts.broadcast !== void 0) {\n\t /* eslint no-console: 0 */\n\t console.warn(\"Deprecated `broadcast` option. you shoud use `events`\" + \"to catch redux-api events (see https://github.com/lexich/redux-api/blob/master/DOCS.md#Events)\");\n\t }\n\t\n\t var url = opts.url;\n\t var urlOptions = opts.urlOptions;\n\t var options = opts.options;\n\t var transformer = opts.transformer;\n\t var broadcast = opts.broadcast;\n\t var crud = opts.crud;\n\t var reducerName = opts.reducerName;\n\t var prefetch = opts.prefetch;\n\t var postfetch = opts.postfetch;\n\t var validation = opts.validation;\n\t var helpers = opts.helpers;\n\t\n\t\n\t var ACTIONS = {\n\t actionFetch: PREFIX + \"@\" + reducerName,\n\t actionSuccess: PREFIX + \"@\" + reducerName + \"_success\",\n\t actionFail: PREFIX + \"@\" + reducerName + \"_fail\",\n\t actionReset: PREFIX + \"@\" + reducerName + \"_delete\"\n\t };\n\t\n\t var meta = {\n\t urlOptions: urlOptions,\n\t fetch: opts.fetch ? opts.fetch : function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return fetchHolder.fetch.apply(this, args);\n\t },\n\t holder: fetchHolder,\n\t broadcast: broadcast,\n\t virtual: !!opts.virtual,\n\t reducerName: reducerName,\n\t actions: memo.actions,\n\t prefetch: prefetch, postfetch: postfetch, validation: validation,\n\t helpers: helpers, transformer: transformer, crud: crud\n\t };\n\t\n\t memo.actions[key] = (0, _actionFn2.default)(url, key, options, ACTIONS, meta);\n\t\n\t if (!meta.virtual && !memo.reducers[reducerName]) {\n\t var initialState = {\n\t sync: false,\n\t syncing: false,\n\t loading: false,\n\t data: transformer()\n\t };\n\t var reducer = opts.reducer ? opts.reducer.bind(memo) : null;\n\t memo.reducers[reducerName] = (0, _reducerFn2.default)(initialState, ACTIONS, reducer);\n\t }\n\t memo.events[reducerName] = ACTIONS;\n\t return memo;\n\t };\n\t\n\t return Object.keys(config).reduce(function (memo, key) {\n\t return fnConfigCallback(memo, config[key], key, config);\n\t }, cfg);\n\t}\n\t\n\treduxApi.transformers = _transformers2.default;\n\treduxApi.async = _async2.default;\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 1 */\n/*!**************************************************!*\\\n !*** (webpack)/~/node-libs-browser/~/url/url.js ***!\n \\**************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\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__(/*! punycode */ 10);\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\n\t// RFC 2396: characters reserved for delimiting URLs.\n\t// We actually just auto-escape these.\n\tdelims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\t\n\t\n\t// RFC 2396: characters not allowed for various reasons.\n\tunwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\t\n\t\n\t// Allowed by RFCs, but cause of XSS attacks. Always escape these.\n\tautoEscape = ['\\''].concat(unwise),\n\t\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\tnonHostChars = ['%', '/', '?', ';', '#'].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\n\t// protocols that can allow \"unsafe\" and \"unwise\" chars.\n\tunsafeProtocol = {\n\t 'javascript': true,\n\t 'javascript:': true\n\t},\n\t\n\t// protocols that never have a hostname.\n\thostlessProtocol = {\n\t 'javascript': true,\n\t 'javascript:': true\n\t},\n\t\n\t// protocols that always contain a // bit.\n\tslashedProtocol = {\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__(/*! querystring */ 13);\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 === 'undefined' ? 'undefined' : _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] && (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)) 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)) 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) 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] === '[' && 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_-]/) ? '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 // 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] && 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 ? this.hostname : '[' + this.hostname + ']');\n\t if (this.port) {\n\t host += ':' + this.port;\n\t }\n\t }\n\t\n\t if (this.query && isObject(this.query) && 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 || (!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') 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] && 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 = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n\t mustEndAbs = isRelAbs || isSourceAbs || 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;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;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 === '' ? relative.host : result.host;\n\t result.hostname = relative.hostname || relative.hostname === '' ? 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 ? 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 : '') + (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 = (result.host || relative.host) && (last === '.' || last === '..') || 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] !== '' && (!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] === '' || 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 ? '' : 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 ? 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 : '') + (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 === 'undefined' ? 'undefined' : _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/* 2 */\n/*!***************************!*\\\n !*** ./~/qs/lib/utils.js ***!\n \\***************************/\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\t// Load modules\n\t\n\t// Declare internals\n\t\n\tvar internals = {};\n\tinternals.hexTable = new Array(256);\n\tfor (var h = 0; h < 256; ++h) {\n\t internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase();\n\t}\n\t\n\texports.arrayToObject = function (source, options) {\n\t\n\t var obj = options.plainObjects ? Object.create(null) : {};\n\t for (var i = 0, il = source.length; i < il; ++i) {\n\t if (typeof source[i] !== 'undefined') {\n\t\n\t obj[i] = source[i];\n\t }\n\t }\n\t\n\t return obj;\n\t};\n\t\n\texports.merge = function (target, source, options) {\n\t\n\t if (!source) {\n\t return target;\n\t }\n\t\n\t if ((typeof source === 'undefined' ? 'undefined' : _typeof(source)) !== 'object') {\n\t if (Array.isArray(target)) {\n\t target.push(source);\n\t } else if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object') {\n\t target[source] = true;\n\t } else {\n\t target = [target, source];\n\t }\n\t\n\t return target;\n\t }\n\t\n\t if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) !== 'object') {\n\t target = [target].concat(source);\n\t return target;\n\t }\n\t\n\t if (Array.isArray(target) && !Array.isArray(source)) {\n\t\n\t target = exports.arrayToObject(target, options);\n\t }\n\t\n\t var keys = Object.keys(source);\n\t for (var k = 0, kl = keys.length; k < kl; ++k) {\n\t var key = keys[k];\n\t var value = source[key];\n\t\n\t if (!Object.prototype.hasOwnProperty.call(target, key)) {\n\t target[key] = value;\n\t } else {\n\t target[key] = exports.merge(target[key], value, options);\n\t }\n\t }\n\t\n\t return target;\n\t};\n\t\n\texports.decode = function (str) {\n\t\n\t try {\n\t return decodeURIComponent(str.replace(/\\+/g, ' '));\n\t } catch (e) {\n\t return str;\n\t }\n\t};\n\t\n\texports.encode = function (str) {\n\t\n\t // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n\t // It has been adapted here for stricter adherence to RFC 3986\n\t if (str.length === 0) {\n\t return str;\n\t }\n\t\n\t if (typeof str !== 'string') {\n\t str = '' + str;\n\t }\n\t\n\t var out = '';\n\t for (var i = 0, il = str.length; i < il; ++i) {\n\t var c = str.charCodeAt(i);\n\t\n\t if (c === 0x2D || // -\n\t c === 0x2E || // .\n\t c === 0x5F || // _\n\t c === 0x7E || // ~\n\t c >= 0x30 && c <= 0x39 || // 0-9\n\t c >= 0x41 && c <= 0x5A || // a-z\n\t c >= 0x61 && c <= 0x7A) {\n\t // A-Z\n\t\n\t out += str[i];\n\t continue;\n\t }\n\t\n\t if (c < 0x80) {\n\t out += internals.hexTable[c];\n\t continue;\n\t }\n\t\n\t if (c < 0x800) {\n\t out += internals.hexTable[0xC0 | c >> 6] + internals.hexTable[0x80 | c & 0x3F];\n\t continue;\n\t }\n\t\n\t if (c < 0xD800 || c >= 0xE000) {\n\t out += internals.hexTable[0xE0 | c >> 12] + internals.hexTable[0x80 | c >> 6 & 0x3F] + internals.hexTable[0x80 | c & 0x3F];\n\t continue;\n\t }\n\t\n\t ++i;\n\t c = 0x10000 + ((c & 0x3FF) << 10 | str.charCodeAt(i) & 0x3FF);\n\t out += internals.hexTable[0xF0 | c >> 18] + internals.hexTable[0x80 | c >> 12 & 0x3F] + internals.hexTable[0x80 | c >> 6 & 0x3F] + internals.hexTable[0x80 | c & 0x3F];\n\t }\n\t\n\t return out;\n\t};\n\t\n\texports.compact = function (obj, refs) {\n\t\n\t if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n\t\n\t return obj;\n\t }\n\t\n\t refs = refs || [];\n\t var lookup = refs.indexOf(obj);\n\t if (lookup !== -1) {\n\t return refs[lookup];\n\t }\n\t\n\t refs.push(obj);\n\t\n\t if (Array.isArray(obj)) {\n\t var compacted = [];\n\t\n\t for (var i = 0, il = obj.length; i < il; ++i) {\n\t if (typeof obj[i] !== 'undefined') {\n\t compacted.push(obj[i]);\n\t }\n\t }\n\t\n\t return compacted;\n\t }\n\t\n\t var keys = Object.keys(obj);\n\t for (i = 0, il = keys.length; i < il; ++i) {\n\t var key = keys[i];\n\t obj[key] = exports.compact(obj[key], refs);\n\t }\n\t\n\t return obj;\n\t};\n\t\n\texports.isRegExp = function (obj) {\n\t\n\t return Object.prototype.toString.call(obj) === '[object RegExp]';\n\t};\n\t\n\texports.isBuffer = function (obj) {\n\t\n\t if (obj === null || typeof obj === 'undefined') {\n\t\n\t return false;\n\t }\n\t\n\t return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n\t};\n\n/***/ },\n/* 3 */\n/*!****************************!*\\\n !*** ./src/utils/merge.js ***!\n \\****************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.mergePair = mergePair;\n\t\n\texports.default = function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return args.length ? args.reduce(mergePair) : null;\n\t};\n\t\n\tvar toString = Object.prototype.toString;\n\tvar OBJECT = \"[object Object]\";\n\tvar ARRAY = \"[object Array]\";\n\t\n\tfunction mergePair(a, b) {\n\t if (a === void 0) {\n\t return b;\n\t }\n\t if (b === void 0) {\n\t return a;\n\t }\n\t\n\t var aType = toString.call(a);\n\t var bType = toString.call(b);\n\t if (aType === ARRAY) {\n\t return a.concat(b);\n\t }\n\t if (bType === ARRAY) {\n\t return [a].concat(b);\n\t }\n\t if (aType !== OBJECT || bType !== OBJECT) {\n\t return b;\n\t }\n\t return Object.keys(b).reduce(function (memo, key) {\n\t memo[key] = mergePair(a[key], b[key]);\n\t return memo;\n\t }, a);\n\t}\n\n/***/ },\n/* 4 */\n/*!****************************************!*\\\n !*** (webpack)/buildin/amd-options.js ***!\n \\****************************************/\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;\r\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, {}))\n\n/***/ },\n/* 5 */\n/*!*******************************!*\\\n !*** ./~/fast-apply/index.js ***!\n \\*******************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tmodule.exports = fastApply;\n\t\n\tfunction fastApply(fn, context, args) {\n\t\n\t switch (args ? args.length : 0) {\n\t case 0:\n\t return context ? fn.call(context) : fn();\n\t case 1:\n\t return context ? fn.call(context, args[0]) : fn(args[0]);\n\t case 2:\n\t return context ? fn.call(context, args[0], args[1]) : fn(args[0], args[1]);\n\t case 3:\n\t return context ? fn.call(context, args[0], args[1], args[2]) : fn(args[0], args[1], args[2]);\n\t case 4:\n\t return context ? fn.call(context, args[0], args[1], args[2], args[3]) : fn(args[0], args[1], args[2], args[3]);\n\t case 5:\n\t return context ? fn.call(context, args[0], args[1], args[2], args[3], args[4]) : fn(args[0], args[1], args[2], args[3], args[4]);\n\t default:\n\t return fn.apply(context, args);\n\t }\n\t}\n\n/***/ },\n/* 6 */\n/*!***************************!*\\\n !*** ./~/qs/lib/index.js ***!\n \\***************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t// Load modules\n\t\n\tvar Stringify = __webpack_require__(/*! ./stringify */ 8);\n\tvar Parse = __webpack_require__(/*! ./parse */ 7);\n\t\n\t// Declare internals\n\t\n\tvar internals = {};\n\t\n\tmodule.exports = {\n\t stringify: Stringify,\n\t parse: Parse\n\t};\n\n/***/ },\n/* 7 */\n/*!***************************!*\\\n !*** ./~/qs/lib/parse.js ***!\n \\***************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t// Load modules\n\t\n\tvar Utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\t// Declare internals\n\t\n\tvar internals = {\n\t delimiter: '&',\n\t depth: 5,\n\t arrayLimit: 20,\n\t parameterLimit: 1000,\n\t strictNullHandling: false,\n\t plainObjects: false,\n\t allowPrototypes: false,\n\t allowDots: false\n\t};\n\t\n\tinternals.parseValues = function (str, options) {\n\t\n\t var obj = {};\n\t var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);\n\t\n\t for (var i = 0, il = parts.length; i < il; ++i) {\n\t var part = parts[i];\n\t var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;\n\t\n\t if (pos === -1) {\n\t obj[Utils.decode(part)] = '';\n\t\n\t if (options.strictNullHandling) {\n\t obj[Utils.decode(part)] = null;\n\t }\n\t } else {\n\t var key = Utils.decode(part.slice(0, pos));\n\t var val = Utils.decode(part.slice(pos + 1));\n\t\n\t if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n\t obj[key] = val;\n\t } else {\n\t obj[key] = [].concat(obj[key]).concat(val);\n\t }\n\t }\n\t }\n\t\n\t return obj;\n\t};\n\t\n\tinternals.parseObject = function (chain, val, options) {\n\t\n\t if (!chain.length) {\n\t return val;\n\t }\n\t\n\t var root = chain.shift();\n\t\n\t var obj;\n\t if (root === '[]') {\n\t obj = [];\n\t obj = obj.concat(internals.parseObject(chain, val, options));\n\t } else {\n\t obj = options.plainObjects ? Object.create(null) : {};\n\t var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;\n\t var index = parseInt(cleanRoot, 10);\n\t var indexString = '' + index;\n\t if (!isNaN(index) && root !== cleanRoot && indexString === cleanRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) {\n\t\n\t obj = [];\n\t obj[index] = internals.parseObject(chain, val, options);\n\t } else {\n\t obj[cleanRoot] = internals.parseObject(chain, val, options);\n\t }\n\t }\n\t\n\t return obj;\n\t};\n\t\n\tinternals.parseKeys = function (key, val, options) {\n\t\n\t if (!key) {\n\t return;\n\t }\n\t\n\t // Transform dot notation to bracket notation\n\t\n\t if (options.allowDots) {\n\t key = key.replace(/\\.([^\\.\\[]+)/g, '[$1]');\n\t }\n\t\n\t // The regex chunks\n\t\n\t var parent = /^([^\\[\\]]*)/;\n\t var child = /(\\[[^\\[\\]]*\\])/g;\n\t\n\t // Get the parent\n\t\n\t var segment = parent.exec(key);\n\t\n\t // Stash the parent if it exists\n\t\n\t var keys = [];\n\t if (segment[1]) {\n\t // If we aren't using plain objects, optionally prefix keys\n\t // that would overwrite object prototype properties\n\t if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) {\n\t\n\t if (!options.allowPrototypes) {\n\t return;\n\t }\n\t }\n\t\n\t keys.push(segment[1]);\n\t }\n\t\n\t // Loop through children appending to the array until we hit depth\n\t\n\t var i = 0;\n\t while ((segment = child.exec(key)) !== null && i < options.depth) {\n\t\n\t ++i;\n\t if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\\[|\\]/g, ''))) {\n\t\n\t if (!options.allowPrototypes) {\n\t continue;\n\t }\n\t }\n\t keys.push(segment[1]);\n\t }\n\t\n\t // If there's a remainder, just add whatever is left\n\t\n\t if (segment) {\n\t keys.push('[' + key.slice(segment.index) + ']');\n\t }\n\t\n\t return internals.parseObject(keys, val, options);\n\t};\n\t\n\tmodule.exports = function (str, options) {\n\t\n\t options = options || {};\n\t options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;\n\t options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;\n\t options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;\n\t options.parseArrays = options.parseArrays !== false;\n\t options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;\n\t options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;\n\t options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;\n\t options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;\n\t options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\t\n\t if (str === '' || str === null || typeof str === 'undefined') {\n\t\n\t return options.plainObjects ? Object.create(null) : {};\n\t }\n\t\n\t var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;\n\t var obj = options.plainObjects ? Object.create(null) : {};\n\t\n\t // Iterate over the keys and setup the new object\n\t\n\t var keys = Object.keys(tempObj);\n\t for (var i = 0, il = keys.length; i < il; ++i) {\n\t var key = keys[i];\n\t var newObj = internals.parseKeys(key, tempObj[key], options);\n\t obj = Utils.merge(obj, newObj, options);\n\t }\n\t\n\t return Utils.compact(obj);\n\t};\n\n/***/ },\n/* 8 */\n/*!*******************************!*\\\n !*** ./~/qs/lib/stringify.js ***!\n \\*******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\t// Load modules\n\t\n\tvar Utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\t// Declare internals\n\t\n\tvar internals = {\n\t delimiter: '&',\n\t arrayPrefixGenerators: {\n\t brackets: function brackets(prefix, key) {\n\t\n\t return prefix + '[]';\n\t },\n\t indices: function indices(prefix, key) {\n\t\n\t return prefix + '[' + key + ']';\n\t },\n\t repeat: function repeat(prefix, key) {\n\t\n\t return prefix;\n\t }\n\t },\n\t strictNullHandling: false,\n\t skipNulls: false,\n\t encode: true\n\t};\n\t\n\tinternals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) {\n\t\n\t if (typeof filter === 'function') {\n\t obj = filter(prefix, obj);\n\t } else if (Utils.isBuffer(obj)) {\n\t obj = obj.toString();\n\t } else if (obj instanceof Date) {\n\t obj = obj.toISOString();\n\t } else if (obj === null) {\n\t if (strictNullHandling) {\n\t return encode ? Utils.encode(prefix) : prefix;\n\t }\n\t\n\t obj = '';\n\t }\n\t\n\t if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean') {\n\t\n\t if (encode) {\n\t return [Utils.encode(prefix) + '=' + Utils.encode(obj)];\n\t }\n\t return [prefix + '=' + obj];\n\t }\n\t\n\t var values = [];\n\t\n\t if (typeof obj === 'undefined') {\n\t return values;\n\t }\n\t\n\t var objKeys;\n\t if (Array.isArray(filter)) {\n\t objKeys = filter;\n\t } else {\n\t var keys = Object.keys(obj);\n\t objKeys = sort ? keys.sort(sort) : keys;\n\t }\n\t\n\t for (var i = 0, il = objKeys.length; i < il; ++i) {\n\t var key = objKeys[i];\n\t\n\t if (skipNulls && obj[key] === null) {\n\t\n\t continue;\n\t }\n\t\n\t if (Array.isArray(obj)) {\n\t values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n\t } else {\n\t values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n\t }\n\t }\n\t\n\t return values;\n\t};\n\t\n\tmodule.exports = function (obj, options) {\n\t\n\t options = options || {};\n\t var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;\n\t var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\t var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;\n\t var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;\n\t var sort = typeof options.sort === 'function' ? options.sort : null;\n\t var objKeys;\n\t var filter;\n\t if (typeof options.filter === 'function') {\n\t filter = options.filter;\n\t obj = filter('', obj);\n\t } else if (Array.isArray(options.filter)) {\n\t objKeys = filter = options.filter;\n\t }\n\t\n\t var keys = [];\n\t\n\t if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n\t\n\t return '';\n\t }\n\t\n\t var arrayFormat;\n\t if (options.arrayFormat in internals.arrayPrefixGenerators) {\n\t arrayFormat = options.arrayFormat;\n\t } else if ('indices' in options) {\n\t arrayFormat = options.indices ? 'indices' : 'repeat';\n\t } else {\n\t arrayFormat = 'indices';\n\t }\n\t\n\t var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];\n\t\n\t if (!objKeys) {\n\t objKeys = Object.keys(obj);\n\t }\n\t\n\t if (sort) {\n\t objKeys.sort(sort);\n\t }\n\t\n\t for (var i = 0, il = objKeys.length; i < il; ++i) {\n\t var key = objKeys[i];\n\t\n\t if (skipNulls && obj[key] === null) {\n\t\n\t continue;\n\t }\n\t\n\t keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort));\n\t }\n\t\n\t return keys.join(delimiter);\n\t};\n\n/***/ },\n/* 9 */\n/*!***********************************!*\\\n !*** (webpack)/buildin/module.js ***!\n \\***********************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tmodule.exports = function (module) {\n\t\tif (!module.webpackPolyfill) {\n\t\t\tmodule.deprecate = function () {};\n\t\t\tmodule.paths = [];\n\t\t\t// module.parent = undefined by default\n\t\t\tmodule.children = [];\n\t\t\tmodule.webpackPolyfill = 1;\n\t\t}\n\t\treturn module;\n\t};\n\n/***/ },\n/* 10 */\n/*!******************************************************************!*\\\n !*** (webpack)/~/node-libs-browser/~/url/~/punycode/punycode.js ***!\n \\******************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\t/*! 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 = ( false ? 'undefined' : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n\t\tvar freeModule = ( false ? 'undefined' : _typeof(module)) == 'object' && module && !module.nodeType && module;\n\t\tvar freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global;\n\t\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {\n\t\t\troot = freeGlobal;\n\t\t}\n\t\n\t\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\t\tvar punycode,\n\t\n\t\n\t\t/** Highest positive signed 32-bit float value */\n\t\tmaxInt = 2147483647,\n\t\t // aka. 0x7FFFFFFF or 2^31-1\n\t\n\t\t/** Bootstring parameters */\n\t\tbase = 36,\n\t\t tMin = 1,\n\t\t tMax = 26,\n\t\t skew = 38,\n\t\t damp = 700,\n\t\t initialBias = 72,\n\t\t initialN = 128,\n\t\t // 0x80\n\t\tdelimiter = '-',\n\t\t // '\\x2D'\n\t\n\t\t/** Regular expressions */\n\t\tregexPunycode = /^xn--/,\n\t\t regexNonASCII = /[^\\x20-\\x7E]/,\n\t\t // unprintable ASCII chars + non-ASCII chars\n\t\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g,\n\t\t // 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\n\t\t/** Convenience shortcuts */\n\t\tbaseMinusTMin = base - tMin,\n\t\t floor = Math.floor,\n\t\t stringFromCharCode = String.fromCharCode,\n\t\n\t\n\t\t/** Temporary variable */\n\t\tkey;\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\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\t\tfunction error(type) {\n\t\t\tthrow RangeError(errors[type]);\n\t\t}\n\t\n\t\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\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 * 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\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 * 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 \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\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) {\n\t\t\t\t\t\t// 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 * 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\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 * 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\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 * 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\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 * 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\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 * 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\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\n\t\t\t/** Cached calculation results */\n\t\t\tbaseMinusT;\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\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\t\t}\n\t\n\t\t\treturn ucs2encode(output);\n\t\t}\n\t\n\t\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\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\n\t\t\t/** `inputLength` will hold the number of code points in `input`. */\n\t\t\tinputLength,\n\t\n\t\t\t/** Cached calculation results */\n\t\t\thandledCPCountPlusOne,\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 state to ,\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(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\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\t\t}\n\t\t\treturn output.join('');\n\t\t}\n\t\n\t\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\t\tfunction toUnicode(input) {\n\t\t\treturn mapDomain(input, function (string) {\n\t\t\t\treturn regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n\t\t\t});\n\t\t}\n\t\n\t\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\t\tfunction toASCII(input) {\n\t\t\treturn mapDomain(input, function (string) {\n\t\t\t\treturn regexNonASCII.test(string) ? 'xn--' + encode(string) : 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 * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t\t\t'version': '1.3.2',\n\t\t\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\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 (\"function\" == 'function' && _typeof(__webpack_require__(/*! !webpack amd options */ 4)) == 'object' && __webpack_require__(/*! !webpack amd options */ 4)) {\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) {\n\t\t\t\t// in Node.js or RingoJS v0.8.0+\n\t\t\t\tfreeModule.exports = punycode;\n\t\t\t} else {\n\t\t\t\t// 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 {\n\t\t\t// in Rhino or a web browser\n\t\t\troot.punycode = punycode;\n\t\t}\n\t})(undefined);\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../../../../buildin/module.js */ 9)(module), (function() { return this; }())))\n\n/***/ },\n/* 11 */\n/*!*******************************************************************!*\\\n !*** (webpack)/~/node-libs-browser/~/url/~/querystring/decode.js ***!\n \\*******************************************************************/\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\t\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,\n\t vstr,\n\t k,\n\t 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/* 12 */\n/*!*******************************************************************!*\\\n !*** (webpack)/~/node-libs-browser/~/url/~/querystring/encode.js ***!\n \\*******************************************************************/\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 _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar stringifyPrimitive = function stringifyPrimitive(v) {\n\t switch (typeof v === 'undefined' ? 'undefined' : _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 === 'undefined' ? 'undefined' : _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 if (!name) return '';\n\t return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));\n\t};\n\n/***/ },\n/* 13 */\n/*!******************************************************************!*\\\n !*** (webpack)/~/node-libs-browser/~/url/~/querystring/index.js ***!\n \\******************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.decode = exports.parse = __webpack_require__(/*! ./decode */ 11);\n\texports.encode = exports.stringify = __webpack_require__(/*! ./encode */ 12);\n\n/***/ },\n/* 14 */\n/*!***********************!*\\\n !*** ./src/PubSub.js ***!\n \\***********************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\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 PubSub = function () {\n\t function PubSub() {\n\t _classCallCheck(this, PubSub);\n\t\n\t this.container = [];\n\t }\n\t\n\t _createClass(PubSub, [{\n\t key: \"push\",\n\t value: function push(cb) {\n\t cb instanceof Function && this.container.push(cb);\n\t }\n\t }, {\n\t key: \"resolve\",\n\t value: function resolve(data) {\n\t this.container.forEach(function (cb) {\n\t return cb(null, data);\n\t });\n\t this.container = [];\n\t }\n\t }, {\n\t key: \"reject\",\n\t value: function reject(err) {\n\t this.container.forEach(function (cb) {\n\t return cb(err);\n\t });\n\t this.container = [];\n\t }\n\t }]);\n\t\n\t return PubSub;\n\t}();\n\t\n\texports.default = PubSub;\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 15 */\n/*!*************************!*\\\n !*** ./src/actionFn.js ***!\n \\*************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.CRUD = undefined;\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\texports.default = actionFn;\n\t\n\tvar _urlTransform = __webpack_require__(/*! ./urlTransform */ 21);\n\t\n\tvar _urlTransform2 = _interopRequireDefault(_urlTransform);\n\t\n\tvar _merge = __webpack_require__(/*! ./utils/merge */ 3);\n\t\n\tvar _merge2 = _interopRequireDefault(_merge);\n\t\n\tvar _fetchResolver = __webpack_require__(/*! ./fetchResolver */ 18);\n\t\n\tvar _fetchResolver2 = _interopRequireDefault(_fetchResolver);\n\t\n\tvar _PubSub = __webpack_require__(/*! ./PubSub */ 14);\n\t\n\tvar _PubSub2 = _interopRequireDefault(_PubSub);\n\t\n\tvar _createHolder = __webpack_require__(/*! ./createHolder */ 17);\n\t\n\tvar _createHolder2 = _interopRequireDefault(_createHolder);\n\t\n\tvar _fastApply = __webpack_require__(/*! fast-apply */ 5);\n\t\n\tvar _fastApply2 = _interopRequireDefault(_fastApply);\n\t\n\tvar _url = __webpack_require__(/*! url */ 1);\n\t\n\tvar _url2 = _interopRequireDefault(_url);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction none() {}\n\t\n\tfunction extractArgs(args) {\n\t var pathvars = void 0;\n\t var params = {};\n\t var callback = void 0;\n\t if (args[0] instanceof Function) {\n\t callback = args[0];\n\t } else if (args[1] instanceof Function) {\n\t pathvars = args[0];\n\t callback = args[1];\n\t } else {\n\t pathvars = args[0];\n\t params = args[1];\n\t callback = args[2] || none;\n\t }\n\t return [pathvars, params, callback];\n\t}\n\t\n\tfunction helperCrudFunction(name) {\n\t return function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t var _extractArgs = extractArgs(args);\n\t\n\t var _extractArgs2 = _slicedToArray(_extractArgs, 3);\n\t\n\t var pathvars = _extractArgs2[0];\n\t var params = _extractArgs2[1];\n\t var cb = _extractArgs2[2];\n\t\n\t return [pathvars, _extends({}, params, { method: name.toUpperCase() }), cb];\n\t };\n\t}\n\t\n\tfunction defaultMiddlewareArgsParser(dispatch, getState) {\n\t return { dispatch: dispatch, getState: getState };\n\t}\n\t\n\tvar CRUD = exports.CRUD = [\"get\", \"post\", \"put\", \"delete\", \"patch\"].reduce(function (memo, name) {\n\t memo[name] = helperCrudFunction(name);\n\t return memo;\n\t}, {});\n\t\n\t/**\n\t * Constructor for create action\n\t * @param {String} url endpoint's url\n\t * @param {String} name action name\n\t * @param {Object} options action configuration\n\t * @param {Object} ACTIONS map of actions\n\t * @param {[type]} fetchAdapter adapter for fetching data\n\t * @return {Function+Object} action function object\n\t */\n\tfunction actionFn(url, name, options) {\n\t var ACTIONS = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];\n\t var meta = arguments.length <= 4 || arguments[4] === undefined ? {} : arguments[4];\n\t var actionFetch = ACTIONS.actionFetch;\n\t var actionSuccess = ACTIONS.actionSuccess;\n\t var actionFail = ACTIONS.actionFail;\n\t var actionReset = ACTIONS.actionReset;\n\t\n\t var pubsub = new _PubSub2.default();\n\t var requestHolder = (0, _createHolder2.default)();\n\t /**\n\t * Fetch data from server\n\t * @param {Object} pathvars path vars for url\n\t * @param {Object} params fetch params\n\t * @param {Function} getState helper meta function\n\t */\n\t var request = function request(pathvars, params) {\n\t var getState = arguments.length <= 2 || arguments[2] === undefined ? none : arguments[2];\n\t\n\t var resultUrlT = (0, _urlTransform2.default)(url, pathvars, meta.urlOptions);\n\t var rootUrl = meta.holder ? meta.holder.rootUrl : null;\n\t var urlT = resultUrlT;\n\t if (rootUrl) {\n\t var urlObject = _url2.default.parse(urlT);\n\t if (!urlObject.host) {\n\t var urlPath = (rootUrl.path ? rootUrl.path.replace(/\\/$/, \"\") : \"\") + \"/\" + (urlObject.path ? urlObject.path.replace(/^\\//, \"\") : \"\");\n\t urlT = rootUrl.protocol + \"//\" + rootUrl.host + urlPath;\n\t }\n\t }\n\t var globalOptions = !meta.holder ? {} : meta.holder.options instanceof Function ? meta.holder.options(urlT, params, getState) : meta.holder.options;\n\t var baseOptions = options instanceof Function ? options(urlT, params, getState) : options;\n\t var opts = (0, _merge2.default)({}, globalOptions, baseOptions, params);\n\t var response = meta.fetch(urlT, opts);\n\t return !meta.validation ? response : response.then(function (data) {\n\t return new Promise(function (resolve, reject) {\n\t return meta.validation(data, function (err) {\n\t return err ? reject(err) : resolve(data);\n\t });\n\t });\n\t });\n\t };\n\t\n\t /**\n\t * Fetch data from server\n\t * @param {Object} pathvars path vars for url\n\t * @param {Object} params fetch params\n\t * @param {Function} callback) callback execute after end request\n\t */\n\t var fn = function fn() {\n\t for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t args[_key2] = arguments[_key2];\n\t }\n\t\n\t var _extractArgs3 = extractArgs(args);\n\t\n\t var _extractArgs4 = _slicedToArray(_extractArgs3, 3);\n\t\n\t var pathvars = _extractArgs4[0];\n\t var params = _extractArgs4[1];\n\t var callback = _extractArgs4[2];\n\t\n\t var syncing = params ? !!params.syncing : false;\n\t params && delete params.syncing;\n\t pubsub.push(callback);\n\t return function () {\n\t var middlewareParser = meta.holder && meta.holder.middlewareParser || defaultMiddlewareArgsParser;\n\t\n\t var _middlewareParser = middlewareParser.apply(undefined, arguments);\n\t\n\t var dispatch = _middlewareParser.dispatch;\n\t var getState = _middlewareParser.getState;\n\t var reducerName = meta.reducerName;\n\t\n\t var state = getState();\n\t var store = state[reducerName];\n\t var requestOptions = { pathvars: pathvars, params: params };\n\t if (store && store.loading) {\n\t return;\n\t }\n\t var prevData = state && state[reducerName] && state[reducerName].data;\n\t dispatch({ type: actionFetch, syncing: syncing, request: requestOptions });\n\t var fetchResolverOpts = {\n\t dispatch: dispatch, getState: getState,\n\t actions: meta.actions,\n\t prefetch: meta.prefetch\n\t };\n\t return new Promise(function (done, fail) {\n\t (0, _fetchResolver2.default)(0, fetchResolverOpts, function (err) {\n\t if (err) {\n\t pubsub.reject(err);\n\t return fail(err);\n\t }\n\t new Promise(function (resolve, reject) {\n\t requestHolder.set({\n\t resolve: resolve, reject: reject,\n\t promise: request(pathvars, params, getState).then(resolve, reject)\n\t });\n\t }).then(function (d) {\n\t requestHolder.pop();\n\t var data = meta.transformer(d, prevData, {\n\t type: actionSuccess, request: requestOptions\n\t });\n\t dispatch({\n\t data: data, origData: d,\n\t type: actionSuccess,\n\t syncing: false,\n\t request: requestOptions\n\t });\n\t if (meta.broadcast) {\n\t meta.broadcast.forEach(function (type) {\n\t dispatch({ type: type, data: data, origData: d, request: requestOptions });\n\t });\n\t }\n\t if (meta.postfetch) {\n\t meta.postfetch.forEach(function (postfetch) {\n\t postfetch instanceof Function && postfetch({\n\t data: data, getState: getState, dispatch: dispatch, actions: meta.actions, request: requestOptions\n\t });\n\t });\n\t }\n\t pubsub.resolve(data);\n\t done(data);\n\t }, function (error) {\n\t dispatch({ type: actionFail, syncing: false, error: error, request: requestOptions });\n\t pubsub.reject(error);\n\t fail(error);\n\t });\n\t });\n\t });\n\t };\n\t };\n\t\n\t /*\n\t Pure rest request\n\t */\n\t fn.request = request;\n\t\n\t /**\n\t * Reset store to initial state\n\t */\n\t fn.reset = function (mutation) {\n\t var defer = requestHolder.pop();\n\t defer && defer.reject(new Error(\"Application abort request\"));\n\t return mutation === \"sync\" ? { type: actionReset, mutation: mutation } : { type: actionReset };\n\t };\n\t\n\t /**\n\t * Sync store with server. In server mode works as usual method.\n\t * If data have already synced, data would not fetch after call this method.\n\t * @param {Object} pathvars path vars for url\n\t * @param {Object} params fetch params\n\t * @param {Function} callback) callback execute after end request\n\t */\n\t fn.sync = function () {\n\t for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t args[_key3] = arguments[_key3];\n\t }\n\t\n\t var _extractArgs5 = extractArgs(args);\n\t\n\t var _extractArgs6 = _slicedToArray(_extractArgs5, 3);\n\t\n\t var pathvars = _extractArgs6[0];\n\t var params = _extractArgs6[1];\n\t var callback = _extractArgs6[2];\n\t\n\t var isServer = meta.holder ? meta.holder.server : false;\n\t return function (dispatch, getState) {\n\t var state = getState();\n\t var store = state[name];\n\t if (!isServer && store && store.sync) {\n\t callback(null, store.data);\n\t return;\n\t }\n\t var modifyParams = _extends({}, params, { syncing: true });\n\t return fn(pathvars, modifyParams, callback)(dispatch, getState);\n\t };\n\t };\n\t\n\t var helpers = meta.helpers || {};\n\t if (meta.crud) {\n\t helpers = _extends({}, CRUD, helpers);\n\t }\n\t var fnHelperCallback = function fnHelperCallback(memo, func, helpername) {\n\t if (memo[helpername]) {\n\t throw new Error(\"Helper name: \\\"\" + helpername + \"\\\" for endpoint \\\"\" + name + \"\\\" has been already reserved\");\n\t }\n\t\n\t var _ref = func instanceof Function ? { call: func } : func;\n\t\n\t var sync = _ref.sync;\n\t var call = _ref.call;\n\t\n\t memo[helpername] = function () {\n\t for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t args[_key4] = arguments[_key4];\n\t }\n\t\n\t return function (dispatch, getState) {\n\t var index = args.length - 1;\n\t var callbackFn = args[index] instanceof Function ? args[index] : none;\n\t var helpersResult = (0, _fastApply2.default)(call, { getState: getState, dispatch: dispatch, actions: meta.actions }, args);\n\t return new Promise(function (resolve, reject) {\n\t var callback = function callback(err, data) {\n\t err ? reject(err) : resolve(data);\n\t callbackFn(err, data);\n\t };\n\t // If helper alias using async functionality\n\t if (helpersResult instanceof Function) {\n\t helpersResult(function (error) {\n\t var newArgs = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];\n\t\n\t if (error) {\n\t callback(error);\n\t } else {\n\t (0, _fastApply2.default)(sync ? fn.sync : fn, null, newArgs.concat(callback))(dispatch, getState);\n\t }\n\t });\n\t } else {\n\t // if helper alias is synchronous\n\t (0, _fastApply2.default)(sync ? fn.sync : fn, null, helpersResult.concat(callback))(dispatch, getState);\n\t }\n\t });\n\t };\n\t };\n\t return memo;\n\t };\n\t\n\t return Object.keys(helpers).reduce(function (memo, key) {\n\t return fnHelperCallback(memo, helpers[key], key, helpers);\n\t }, fn);\n\t}\n\n/***/ },\n/* 16 */\n/*!**********************!*\\\n !*** ./src/async.js ***!\n \\**********************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = async;\n\t\n\tfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\t\n\t/**\n\t *\n\t * @param {[type]} dispatch [description]\n\t * @param {...[type]} args [description]\n\t * @return {[type]} [description]\n\t * @example\n\t * async(dispatch,\n\t * (cb)=> actions.test(1, cb),\n\t * actions.test2\n\t * ).then(()=> async(dispatch, actions.test3))\n\t */\n\tfunction async(dispatch) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fn = args[0];\n\t var nextArgs = args.slice(1);\n\t return new Promise(function (resolve, reject) {\n\t if (!fn) {\n\t reject(\"no chain function\");\n\t } else {\n\t dispatch(fn(function (err, data) {\n\t err ? reject(err) : resolve(data);\n\t }) || {});\n\t }\n\t }).then(function (data) {\n\t if (nextArgs.length) {\n\t return async.apply(undefined, [dispatch].concat(_toConsumableArray(nextArgs)));\n\t } else {\n\t return data;\n\t }\n\t });\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 17 */\n/*!*****************************!*\\\n !*** ./src/createHolder.js ***!\n \\*****************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function () {\n\t var data = void 0;\n\t var hasData = false;\n\t return {\n\t set: function set(val) {\n\t if (!hasData) {\n\t data = val;\n\t hasData = true;\n\t return true;\n\t }\n\t return false;\n\t },\n\t empty: function empty() {\n\t return !hasData;\n\t },\n\t pop: function pop() {\n\t if (hasData) {\n\t hasData = false;\n\t var result = data;\n\t data = null;\n\t return result;\n\t }\n\t }\n\t };\n\t};\n\t\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 18 */\n/*!******************************!*\\\n !*** ./src/fetchResolver.js ***!\n \\******************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = fetchResolver;\n\tfunction none() {}\n\t\n\tfunction fetchResolver() {\n\t var index = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0];\n\t var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\t var cb = arguments.length <= 2 || arguments[2] === undefined ? none : arguments[2];\n\t\n\t if (!opts.prefetch || index >= opts.prefetch.length) {\n\t cb();\n\t } else {\n\t opts.prefetch[index](opts, function (err) {\n\t return err ? cb(err) : fetchResolver(index + 1, opts, cb);\n\t });\n\t }\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 19 */\n/*!**************************!*\\\n !*** ./src/reducerFn.js ***!\n \\**************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/* eslint no-case-declarations: 0 */\n\t/**\n\t * Reducer contructor\n\t * @param {Object} initialState default initial state\n\t * @param {Object} actions actions map\n\t * @param {Function} transformer transformer function\n\t * @param {Function} reducer custom reducer function\n\t * @return {Function} reducer function\n\t */\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\texports.default = reducerFn;\n\tfunction reducerFn(initialState) {\n\t var actions = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\t var reducer = arguments[2];\n\t var actionFetch = actions.actionFetch;\n\t var actionSuccess = actions.actionSuccess;\n\t var actionFail = actions.actionFail;\n\t var actionReset = actions.actionReset;\n\t\n\t return function () {\n\t var state = arguments.length <= 0 || arguments[0] === undefined ? initialState : arguments[0];\n\t var action = arguments[1];\n\t\n\t switch (action.type) {\n\t case actionFetch:\n\t return _extends({}, state, {\n\t loading: true,\n\t error: null,\n\t syncing: !!action.syncing\n\t });\n\t case actionSuccess:\n\t return _extends({}, state, {\n\t loading: false,\n\t sync: true,\n\t syncing: false,\n\t error: null,\n\t data: action.data\n\t });\n\t case actionFail:\n\t return _extends({}, state, {\n\t loading: false,\n\t error: action.error,\n\t syncing: false\n\t });\n\t case actionReset:\n\t var mutation = action.mutation;\n\t\n\t return mutation === \"sync\" ? _extends({}, state, { sync: false }) : _extends({}, initialState);\n\t default:\n\t return reducer ? reducer(state, action) : state;\n\t }\n\t };\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 20 */\n/*!*****************************!*\\\n !*** ./src/transformers.js ***!\n \\*****************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\tvar toString = Object.prototype.toString;\n\tvar OBJECT = \"[object Object]\";\n\t\n\t/**\n\t * Default responce transformens\n\t */\n\texports.default = {\n\t array: function array(data) {\n\t return !data ? [] : Array.isArray(data) ? data : [data];\n\t },\n\t object: function object(data) {\n\t if (!data) {\n\t return {};\n\t }\n\t return toString.call(data) === OBJECT ? data : { data: data };\n\t }\n\t};\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 21 */\n/*!*****************************!*\\\n !*** ./src/urlTransform.js ***!\n \\*****************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\texports.default = urlTransform;\n\t\n\tvar _omit = __webpack_require__(/*! ./utils/omit */ 22);\n\t\n\tvar _omit2 = _interopRequireDefault(_omit);\n\t\n\tvar _merge = __webpack_require__(/*! ./utils/merge */ 3);\n\t\n\tvar _merge2 = _interopRequireDefault(_merge);\n\t\n\tvar _qs = __webpack_require__(/*! qs */ 6);\n\t\n\tvar _qs2 = _interopRequireDefault(_qs);\n\t\n\tvar _url = __webpack_require__(/*! url */ 1);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar rxClean = /(\\(:[^\\)]+\\)|:[^\\/]+)/g;\n\t\n\t/**\n\t * Url modification\n\t * @param {String} url url template\n\t * @param {Object} params params for url template\n\t * @param {Object} options transformation options, accepts +delimiter+, +arrayFormat+,\n\t * +qsStringifyOptions+ and +qsParseOptions+\n\t * @return {String} result url\n\t */\n\tfunction urlTransform(url, params, options) {\n\t if (!url) {\n\t return \"\";\n\t }\n\t params || (params = {});\n\t var usedKeys = {};\n\t\n\t var urlWithParams = Object.keys(params).reduce(function (url, key) {\n\t var value = params[key];\n\t var rx = new RegExp(\"(\\\\(:\" + key + \"\\\\)|:\" + key + \")\", \"g\");\n\t return url.replace(rx, function () {\n\t usedKeys[key] = value;\n\t return value;\n\t });\n\t }, url);\n\t\n\t if (!urlWithParams) {\n\t return urlWithParams;\n\t }\n\t\n\t var _parse = (0, _url.parse)(urlWithParams);\n\t\n\t var protocol = _parse.protocol;\n\t var host = _parse.host;\n\t var path = _parse.path;\n\t\n\t var cleanURL = host ? protocol + \"//\" + host + path.replace(rxClean, \"\") : path.replace(rxClean, \"\");\n\t var usedKeysArray = Object.keys(usedKeys);\n\t if (usedKeysArray.length !== Object.keys(params).length) {\n\t var urlObject = cleanURL.split(\"?\");\n\t options || (options = {});\n\t var _options = options;\n\t var arrayFormat = _options.arrayFormat;\n\t var delimiter = _options.delimiter;\n\t\n\t var qsParseOptions = _extends({\n\t arrayFormat: arrayFormat,\n\t delimiter: delimiter\n\t }, options.qsParseOptions);\n\t var mergeParams = (0, _merge2.default)(urlObject[1] && _qs2.default.parse(urlObject[1], qsParseOptions), (0, _omit2.default)(params, usedKeysArray));\n\t var qsStringifyOptions = _extends({\n\t arrayFormat: arrayFormat,\n\t delimiter: delimiter\n\t }, options.qsStringifyOptions);\n\t var urlStringParams = _qs2.default.stringify(mergeParams, qsStringifyOptions);\n\t return urlObject[0] + \"?\" + urlStringParams;\n\t }\n\t return cleanURL;\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 22 */\n/*!***************************!*\\\n !*** ./src/utils/omit.js ***!\n \\***************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\texports.default = function (object, props) {\n\t if (!Array.isArray(props)) {\n\t return _extends({}, object);\n\t }\n\t\n\t return Object.keys(object || {}).reduce(function (memo, key) {\n\t if (props.indexOf(key) === -1) {\n\t memo[key] = object[key];\n\t }\n\t return memo;\n\t }, {});\n\t};\n\t\n\tmodule.exports = exports[\"default\"];\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** redux-api.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 360ed476d4f957ef590a\n **/","\"use strict\";\n\nimport libUrl from \"url\";\nimport reducerFn from \"./reducerFn\";\nimport actionFn from \"./actionFn\";\nimport transformers from \"./transformers\";\nimport async from \"./async\";\n\n// export { transformers, async };\n\n/**\n * Default configuration for each endpoint\n * @type {Object}\n */\nconst defaultEndpointConfig = {\n transformer: transformers.object\n};\n\nconst PREFIX = \"@@redux-api\";\n/**\n * Entry api point\n * @param {Object} config Rest api configuration\n * @param {Function} fetch Adapter for rest requests\n * @param {Boolean} isServer false by default (fif you want to use it for isomorphic apps)\n * @return {actions, reducers} { actions, reducers}\n * @example ```js\n * const api = reduxApi({\n * test: \"/plain/url\",\n * testItem: \"/plain/url/:id\",\n * testModify: {\n * url: \"/plain/url/:endpoint\",\n\n * transformer: (data)=> !data ?\n * { title: \"\", message: \"\" } :\n * { title: data.title, message: data.message },\n * options: {\n * method: \"post\"\n * headers: {\n * \"Accept\": \"application/json\",\n * \"Content-Type\": \"application/json\"\n * }\n * }\n * }\n * });\n * // register reducers\n *\n * // call actions\n * dispatch(api.actions.test());\n * dispatch(api.actions.testItem({id: 1}));\n * dispatch(api.actions.testModify({endpoint: \"upload-1\"}, {\n * body: JSON.stringify({title: \"Hello\", message: \"World\"})\n * }));\n * ```\n */\n\nexport default function reduxApi(config) {\n config || (config = {});\n const fetchHolder = {\n fetch: null,\n server: false,\n rootUrl: null,\n middlewareParser: null,\n options: {}\n };\n\n const cfg = {\n use(key, value) {\n if (key === \"rootUrl\") {\n value && (fetchHolder[key] = libUrl.parse(value));\n } else {\n fetchHolder[key] = value;\n }\n\n return this;\n },\n init(fetch, isServer=false, rootUrl) {\n /* eslint no-console: 0 */\n console.warn(\"Deprecated method, use `use` method\");\n this.use(\"fetch\", fetch);\n this.use(\"server\", isServer);\n this.use(\"rootUrl\", rootUrl);\n return this;\n },\n actions: {},\n reducers: {},\n events: {}\n };\n const fnConfigCallback = (memo, value, key)=> {\n const opts = typeof value === \"object\" ?\n { ...defaultEndpointConfig, reducerName: key, ...value } :\n { ...defaultEndpointConfig, reducerName: key, url: value };\n\n if (opts.broadcast !== (void 0)) {\n /* eslint no-console: 0 */\n console.warn(\"Deprecated `broadcast` option. you shoud use `events`\" +\n \"to catch redux-api events (see https://github.com/lexich/redux-api/blob/master/DOCS.md#Events)\");\n }\n\n const {\n url, urlOptions, options, transformer, broadcast, crud,\n reducerName, prefetch, postfetch, validation, helpers,\n } = opts;\n\n const ACTIONS = {\n actionFetch: `${PREFIX}@${reducerName}`,\n actionSuccess: `${PREFIX}@${reducerName}_success`,\n actionFail: `${PREFIX}@${reducerName}_fail`,\n actionReset: `${PREFIX}@${reducerName}_delete`\n };\n\n const meta = {\n urlOptions,\n fetch: opts.fetch ? opts.fetch : function(...args) {\n return fetchHolder.fetch.apply(this, args);\n },\n holder: fetchHolder,\n broadcast,\n virtual: !!opts.virtual,\n reducerName,\n actions: memo.actions,\n prefetch, postfetch, validation,\n helpers, transformer, crud\n };\n\n memo.actions[key] = actionFn(url, key, options, ACTIONS, meta);\n\n if (!meta.virtual && !memo.reducers[reducerName]) {\n const initialState = {\n sync: false,\n syncing: false,\n loading: false,\n data: transformer()\n };\n const reducer = opts.reducer ? opts.reducer.bind(memo) : null;\n memo.reducers[reducerName] = reducerFn(initialState, ACTIONS, reducer);\n }\n memo.events[reducerName] = ACTIONS;\n return memo;\n };\n\n return Object.keys(config).reduce(\n (memo, key)=> fnConfigCallback(memo, config[key], key, config), cfg);\n}\n\nreduxApi.transformers = transformers;\nreduxApi.async = async;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.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/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/url.js\n **/","// Load modules\n\n\n// Declare internals\n\nvar internals = {};\ninternals.hexTable = new Array(256);\nfor (var h = 0; h < 256; ++h) {\n internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase();\n}\n\n\nexports.arrayToObject = function (source, options) {\n\n var obj = options.plainObjects ? Object.create(null) : {};\n for (var i = 0, il = source.length; i < il; ++i) {\n if (typeof source[i] !== 'undefined') {\n\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\n\nexports.merge = function (target, source, options) {\n\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (Array.isArray(target)) {\n target.push(source);\n }\n else if (typeof target === 'object') {\n target[source] = true;\n }\n else {\n target = [target, source];\n }\n\n return target;\n }\n\n if (typeof target !== 'object') {\n target = [target].concat(source);\n return target;\n }\n\n if (Array.isArray(target) &&\n !Array.isArray(source)) {\n\n target = exports.arrayToObject(target, options);\n }\n\n var keys = Object.keys(source);\n for (var k = 0, kl = keys.length; k < kl; ++k) {\n var key = keys[k];\n var value = source[key];\n\n if (!Object.prototype.hasOwnProperty.call(target, key)) {\n target[key] = value;\n }\n else {\n target[key] = exports.merge(target[key], value, options);\n }\n }\n\n return target;\n};\n\n\nexports.decode = function (str) {\n\n try {\n return decodeURIComponent(str.replace(/\\+/g, ' '));\n } catch (e) {\n return str;\n }\n};\n\nexports.encode = function (str) {\n\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n if (typeof str !== 'string') {\n str = '' + str;\n }\n\n var out = '';\n for (var i = 0, il = str.length; i < il; ++i) {\n var c = str.charCodeAt(i);\n\n if (c === 0x2D || // -\n c === 0x2E || // .\n c === 0x5F || // _\n c === 0x7E || // ~\n (c >= 0x30 && c <= 0x39) || // 0-9\n (c >= 0x41 && c <= 0x5A) || // a-z\n (c >= 0x61 && c <= 0x7A)) { // A-Z\n\n out += str[i];\n continue;\n }\n\n if (c < 0x80) {\n out += internals.hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out += internals.hexTable[0xC0 | (c >> 6)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out += internals.hexTable[0xE0 | (c >> 12)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n ++i;\n c = 0x10000 + (((c & 0x3FF) << 10) | (str.charCodeAt(i) & 0x3FF));\n out += internals.hexTable[0xF0 | (c >> 18)] + internals.hexTable[0x80 | ((c >> 12) & 0x3F)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nexports.compact = function (obj, refs) {\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return obj;\n }\n\n refs = refs || [];\n var lookup = refs.indexOf(obj);\n if (lookup !== -1) {\n return refs[lookup];\n }\n\n refs.push(obj);\n\n if (Array.isArray(obj)) {\n var compacted = [];\n\n for (var i = 0, il = obj.length; i < il; ++i) {\n if (typeof obj[i] !== 'undefined') {\n compacted.push(obj[i]);\n }\n }\n\n return compacted;\n }\n\n var keys = Object.keys(obj);\n for (i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n obj[key] = exports.compact(obj[key], refs);\n }\n\n return obj;\n};\n\n\nexports.isRegExp = function (obj) {\n\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\n\nexports.isBuffer = function (obj) {\n\n if (obj === null ||\n typeof obj === 'undefined') {\n\n return false;\n }\n\n return !!(obj.constructor &&\n obj.constructor.isBuffer &&\n obj.constructor.isBuffer(obj));\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/utils.js\n **/","const toString = Object.prototype.toString;\nconst OBJECT = \"[object Object]\";\nconst ARRAY = \"[object Array]\";\n\nexport function mergePair(a, b) {\n if (a === (void 0)) { return b; }\n if (b === (void 0)) { return a; }\n\n const aType = toString.call(a);\n const bType = toString.call(b);\n if (aType === ARRAY) {\n return a.concat(b);\n }\n if (bType === ARRAY) {\n return [a].concat(b);\n }\n if (aType !== OBJECT || bType !== OBJECT) {\n return b;\n }\n return Object.keys(b).reduce((memo, key)=> {\n memo[key] = mergePair(a[key], b[key]);\n return memo;\n }, a);\n}\n\nexport default function(...args) {\n return args.length ? args.reduce(mergePair) : null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/merge.js\n **/","module.exports = __webpack_amd_options__;\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/amd-options.js\n ** module id = 4\n ** module chunks = 0\n **/","module.exports = fastApply;\r\n\r\nfunction fastApply(fn, context, args) {\r\n \r\n switch (args ? args.length : 0) {\r\n case 0:\r\n return context ? fn.call(context) : fn();\r\n case 1:\r\n return context ? fn.call(context, args[0]) : fn(args[0]);\r\n case 2:\r\n return context ? fn.call(context, args[0], args[1]) : fn(args[0], args[1]);\r\n case 3:\r\n return context ? fn.call(context, args[0], args[1], args[2]) : fn(args[0], args[1], args[2]);\r\n case 4:\r\n return context ? fn.call(context, args[0], args[1], args[2], args[3]) : fn(args[0], args[1], args[2], args[3]);\r\n case 5:\r\n return context ? fn.call(context, args[0], args[1], args[2], args[3], args[4]) : fn(args[0], args[1], args[2], args[3], args[4]);\r\n default:\r\n return fn.apply(context, args);\r\n }\r\n \r\n}\n\n\n/** WEBPACK FOOTER **\n ** ./~/fast-apply/index.js\n **/","// Load modules\n\nvar Stringify = require('./stringify');\nvar Parse = require('./parse');\n\n\n// Declare internals\n\nvar internals = {};\n\n\nmodule.exports = {\n stringify: Stringify,\n parse: Parse\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/index.js\n **/","// Load modules\n\nvar Utils = require('./utils');\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n depth: 5,\n arrayLimit: 20,\n parameterLimit: 1000,\n strictNullHandling: false,\n plainObjects: false,\n allowPrototypes: false,\n allowDots: false\n};\n\n\ninternals.parseValues = function (str, options) {\n\n var obj = {};\n var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);\n\n for (var i = 0, il = parts.length; i < il; ++i) {\n var part = parts[i];\n var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;\n\n if (pos === -1) {\n obj[Utils.decode(part)] = '';\n\n if (options.strictNullHandling) {\n obj[Utils.decode(part)] = null;\n }\n }\n else {\n var key = Utils.decode(part.slice(0, pos));\n var val = Utils.decode(part.slice(pos + 1));\n\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n }\n else {\n obj[key] = [].concat(obj[key]).concat(val);\n }\n }\n }\n\n return obj;\n};\n\n\ninternals.parseObject = function (chain, val, options) {\n\n if (!chain.length) {\n return val;\n }\n\n var root = chain.shift();\n\n var obj;\n if (root === '[]') {\n obj = [];\n obj = obj.concat(internals.parseObject(chain, val, options));\n }\n else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;\n var index = parseInt(cleanRoot, 10);\n var indexString = '' + index;\n if (!isNaN(index) &&\n root !== cleanRoot &&\n indexString === cleanRoot &&\n index >= 0 &&\n (options.parseArrays &&\n index <= options.arrayLimit)) {\n\n obj = [];\n obj[index] = internals.parseObject(chain, val, options);\n }\n else {\n obj[cleanRoot] = internals.parseObject(chain, val, options);\n }\n }\n\n return obj;\n};\n\n\ninternals.parseKeys = function (key, val, options) {\n\n if (!key) {\n return;\n }\n\n // Transform dot notation to bracket notation\n\n if (options.allowDots) {\n key = key.replace(/\\.([^\\.\\[]+)/g, '[$1]');\n }\n\n // The regex chunks\n\n var parent = /^([^\\[\\]]*)/;\n var child = /(\\[[^\\[\\]]*\\])/g;\n\n // Get the parent\n\n var segment = parent.exec(key);\n\n // Stash the parent if it exists\n\n var keys = [];\n if (segment[1]) {\n // If we aren't using plain objects, optionally prefix keys\n // that would overwrite object prototype properties\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1])) {\n\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(segment[1]);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while ((segment = child.exec(key)) !== null && i < options.depth) {\n\n ++i;\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1].replace(/\\[|\\]/g, ''))) {\n\n if (!options.allowPrototypes) {\n continue;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return internals.parseObject(keys, val, options);\n};\n\n\nmodule.exports = function (str, options) {\n\n options = options || {};\n options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;\n options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;\n options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;\n options.parseArrays = options.parseArrays !== false;\n options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;\n options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;\n options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;\n options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;\n options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\n if (str === '' ||\n str === null ||\n typeof str === 'undefined') {\n\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n var newObj = internals.parseKeys(key, tempObj[key], options);\n obj = Utils.merge(obj, newObj, options);\n }\n\n return Utils.compact(obj);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/parse.js\n **/","// Load modules\n\nvar Utils = require('./utils');\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n arrayPrefixGenerators: {\n brackets: function (prefix, key) {\n\n return prefix + '[]';\n },\n indices: function (prefix, key) {\n\n return prefix + '[' + key + ']';\n },\n repeat: function (prefix, key) {\n\n return prefix;\n }\n },\n strictNullHandling: false,\n skipNulls: false,\n encode: true\n};\n\n\ninternals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) {\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n }\n else if (Utils.isBuffer(obj)) {\n obj = obj.toString();\n }\n else if (obj instanceof Date) {\n obj = obj.toISOString();\n }\n else if (obj === null) {\n if (strictNullHandling) {\n return encode ? Utils.encode(prefix) : prefix;\n }\n\n obj = '';\n }\n\n if (typeof obj === 'string' ||\n typeof obj === 'number' ||\n typeof obj === 'boolean') {\n\n if (encode) {\n return [Utils.encode(prefix) + '=' + Utils.encode(obj)];\n }\n return [prefix + '=' + obj];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (Array.isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n if (Array.isArray(obj)) {\n values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n else {\n values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n }\n\n return values;\n};\n\n\nmodule.exports = function (obj, options) {\n\n options = options || {};\n var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;\n var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;\n var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;\n var sort = typeof options.sort === 'function' ? options.sort : null;\n var objKeys;\n var filter;\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n }\n else if (Array.isArray(options.filter)) {\n objKeys = filter = options.filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return '';\n }\n\n var arrayFormat;\n if (options.arrayFormat in internals.arrayPrefixGenerators) {\n arrayFormat = options.arrayFormat;\n }\n else if ('indices' in options) {\n arrayFormat = options.indices ? 'indices' : 'repeat';\n }\n else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (sort) {\n objKeys.sort(sort);\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort));\n }\n\n return keys.join(delimiter);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/stringify.js\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/** WEBPACK FOOTER **\n ** (webpack)/buildin/module.js\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 \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 state to ,\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 \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/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/~/punycode/punycode.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\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/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/~/querystring/decode.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\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/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/~/querystring/encode.js\n **/","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n\n\n/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/url/~/querystring/index.js\n **/","\"use strict\";\n\nexport default class PubSub {\n constructor() {\n this.container = [];\n }\n push(cb) {\n (cb instanceof Function) && this.container.push(cb);\n }\n resolve(data) {\n this.container.forEach((cb)=> cb(null, data));\n this.container = [];\n }\n reject(err) {\n this.container.forEach((cb)=> cb(err));\n this.container = [];\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/PubSub.js\n **/","\"use strict\";\n\nimport urlTransform from \"./urlTransform\";\nimport merge from \"./utils/merge\";\nimport fetchResolver from \"./fetchResolver\";\nimport PubSub from \"./PubSub\";\nimport createHolder from \"./createHolder\";\nimport fastApply from \"fast-apply\";\nimport libUrl from \"url\";\n\nfunction none() {}\n\nfunction extractArgs(args) {\n let pathvars;\n let params={};\n let callback;\n if (args[0] instanceof Function) {\n callback = args[0];\n } else if (args[1] instanceof Function) {\n pathvars = args[0];\n callback = args[1];\n } else {\n pathvars = args[0];\n params = args[1];\n callback = args[2] || none;\n }\n return [pathvars, params, callback];\n}\n\nfunction helperCrudFunction(name) {\n return (...args)=> {\n const [pathvars, params, cb] = extractArgs(args);\n return [pathvars, { ...params, method: name.toUpperCase() }, cb];\n };\n}\n\nfunction defaultMiddlewareArgsParser(dispatch, getState) {\n return { dispatch, getState };\n}\n\nexport const CRUD = [\"get\", \"post\", \"put\", \"delete\", \"patch\"].reduce(\n (memo, name)=> {\n memo[name] = helperCrudFunction(name);\n return memo;\n }, {});\n\n/**\n * Constructor for create action\n * @param {String} url endpoint's url\n * @param {String} name action name\n * @param {Object} options action configuration\n * @param {Object} ACTIONS map of actions\n * @param {[type]} fetchAdapter adapter for fetching data\n * @return {Function+Object} action function object\n */\nexport default function actionFn(url, name, options, ACTIONS={}, meta={}) {\n const { actionFetch, actionSuccess, actionFail, actionReset } = ACTIONS;\n const pubsub = new PubSub();\n const requestHolder = createHolder();\n /**\n * Fetch data from server\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} getState helper meta function\n */\n const request = (pathvars, params, getState=none)=> {\n const resultUrlT = urlTransform(url, pathvars, meta.urlOptions);\n const rootUrl = meta.holder ? meta.holder.rootUrl : null;\n let urlT = resultUrlT;\n if (rootUrl) {\n const urlObject = libUrl.parse(urlT);\n if (!urlObject.host) {\n const urlPath = (rootUrl.path ? rootUrl.path.replace(/\\/$/, \"\") : \"\") +\n \"/\" + (urlObject.path ? urlObject.path.replace(/^\\//, \"\") : \"\");\n urlT = `${rootUrl.protocol}//${rootUrl.host}${urlPath}`;\n }\n }\n const globalOptions = !meta.holder ? {} :\n (meta.holder.options instanceof Function) ?\n meta.holder.options(urlT, params, getState) : (meta.holder.options);\n const baseOptions = (options instanceof Function) ?\n options(urlT, params, getState) :\n options;\n const opts = merge({}, globalOptions, baseOptions, params);\n const response = meta.fetch(urlT, opts);\n return !meta.validation ? response : response.then(\n (data)=> new Promise(\n (resolve, reject)=> meta.validation(data,\n (err)=> err ? reject(err) : resolve(data))));\n };\n\n /**\n * Fetch data from server\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} callback) callback execute after end request\n */\n const fn = (...args)=> {\n const [pathvars, params, callback] = extractArgs(args);\n const syncing = params ? !!params.syncing : false;\n params && delete params.syncing;\n pubsub.push(callback);\n return (...middlewareArgs)=> {\n const middlewareParser = (meta.holder && meta.holder.middlewareParser) ||\n defaultMiddlewareArgsParser;\n const { dispatch, getState } = middlewareParser(...middlewareArgs);\n const { reducerName } = meta;\n const state = getState();\n const store = state[reducerName];\n const requestOptions = { pathvars, params };\n if (store && store.loading) {\n return;\n }\n const prevData = state && state[reducerName] && state[reducerName].data;\n dispatch({ type: actionFetch, syncing, request: requestOptions });\n const fetchResolverOpts = {\n dispatch, getState,\n actions: meta.actions,\n prefetch: meta.prefetch\n };\n return new Promise((done, fail)=> {\n fetchResolver(0, fetchResolverOpts, (err)=> {\n if (err) {\n pubsub.reject(err);\n return fail(err);\n }\n new Promise((resolve, reject)=> {\n requestHolder.set({\n resolve, reject,\n promise: request(pathvars, params, getState).then(resolve, reject)\n });\n }).then((d)=> {\n requestHolder.pop();\n const data = meta.transformer(d, prevData, {\n type: actionSuccess, request: requestOptions\n });\n dispatch({\n data, origData: d,\n type: actionSuccess,\n syncing: false,\n request: requestOptions\n });\n if (meta.broadcast) {\n meta.broadcast.forEach((type)=> {\n dispatch({ type, data, origData: d, request: requestOptions });\n });\n }\n if (meta.postfetch) {\n meta.postfetch.forEach((postfetch)=> {\n (postfetch instanceof Function) && postfetch({\n data, getState, dispatch, actions: meta.actions, request: requestOptions\n });\n });\n }\n pubsub.resolve(data);\n done(data);\n }, (error)=> {\n dispatch({ type: actionFail, syncing: false, error, request: requestOptions });\n pubsub.reject(error);\n fail(error);\n });\n });\n });\n };\n };\n\n /*\n Pure rest request\n */\n fn.request = request;\n\n /**\n * Reset store to initial state\n */\n fn.reset = (mutation)=> {\n const defer = requestHolder.pop();\n defer && defer.reject(new Error(\"Application abort request\"));\n return mutation === \"sync\" ? { type: actionReset, mutation } : { type: actionReset };\n };\n\n /**\n * Sync store with server. In server mode works as usual method.\n * If data have already synced, data would not fetch after call this method.\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} callback) callback execute after end request\n */\n fn.sync = (...args)=> {\n const [pathvars, params, callback] = extractArgs(args);\n const isServer = meta.holder ? meta.holder.server : false;\n return (dispatch, getState)=> {\n const state = getState();\n const store = state[name];\n if (!isServer && store && store.sync) {\n callback(null, store.data);\n return;\n }\n const modifyParams = { ...params, syncing: true };\n return fn(pathvars, modifyParams, callback)(dispatch, getState);\n };\n };\n\n let helpers = meta.helpers || {};\n if (meta.crud) {\n helpers = { ...CRUD, ...helpers };\n }\n const fnHelperCallback = (memo, func, helpername)=> {\n if (memo[helpername]) {\n throw new Error(\n `Helper name: \"${helpername}\" for endpoint \"${name}\" has been already reserved`\n );\n }\n const { sync, call } = (func instanceof Function) ? { call: func } : func;\n memo[helpername] = (...args)=> (dispatch, getState)=> {\n const index = args.length - 1;\n const callbackFn = (args[index] instanceof Function) ? args[index] : none;\n const helpersResult = fastApply(call, { getState, dispatch, actions: meta.actions }, args);\n return new Promise((resolve, reject)=> {\n const callback = (err, data)=> {\n err ? reject(err) : resolve(data);\n callbackFn(err, data);\n };\n // If helper alias using async functionality\n if (helpersResult instanceof Function) {\n helpersResult((error, newArgs=[])=> {\n if (error) {\n callback(error);\n } else {\n fastApply(\n sync ? fn.sync : fn, null, newArgs.concat(callback)\n )(dispatch, getState);\n }\n });\n } else {\n // if helper alias is synchronous\n fastApply(\n sync ? fn.sync : fn, null, helpersResult.concat(callback)\n )(dispatch, getState);\n }\n });\n };\n return memo;\n };\n\n return Object.keys(helpers).reduce(\n (memo, key)=> fnHelperCallback(memo, helpers[key], key, helpers), fn);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/actionFn.js\n **/","/**\n *\n * @param {[type]} dispatch [description]\n * @param {...[type]} args [description]\n * @return {[type]} [description]\n * @example\n * async(dispatch,\n * (cb)=> actions.test(1, cb),\n * actions.test2\n * ).then(()=> async(dispatch, actions.test3))\n */\nexport default function async(dispatch, ...args) {\n const fn = args[0];\n const nextArgs = args.slice(1);\n return new Promise(\n (resolve, reject)=> {\n if (!fn) {\n reject(\"no chain function\");\n } else {\n dispatch(fn((err, data)=> {\n err ? reject(err) : resolve(data);\n }) || {});\n }\n })\n .then((data)=> {\n if (nextArgs.length) {\n return async(dispatch, ...nextArgs);\n } else {\n return data;\n }\n });\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/async.js\n **/","\"use strict\";\n\nexport default function() {\n let data;\n let hasData = false;\n return {\n set(val) {\n if (!hasData) {\n data = val;\n hasData = true;\n return true;\n }\n return false;\n },\n empty() {\n return !hasData;\n },\n pop() {\n if (hasData) {\n hasData = false;\n const result = data;\n data = null;\n return result;\n }\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/createHolder.js\n **/","\"use strict\";\n\nfunction none() {}\n\nexport default function fetchResolver(index=0, opts={}, cb=none) {\n if (!opts.prefetch || index >= opts.prefetch.length) {\n cb();\n } else {\n opts.prefetch[index](opts,\n (err)=> err ? cb(err) : fetchResolver(index + 1, opts, cb));\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/fetchResolver.js\n **/","\"use strict\";\n/* eslint no-case-declarations: 0 */\n/**\n * Reducer contructor\n * @param {Object} initialState default initial state\n * @param {Object} actions actions map\n * @param {Function} transformer transformer function\n * @param {Function} reducer custom reducer function\n * @return {Function} reducer function\n */\nexport default function reducerFn(initialState, actions={}, reducer) {\n const { actionFetch, actionSuccess, actionFail, actionReset } = actions;\n return (state=initialState, action)=> {\n switch (action.type) {\n case actionFetch:\n return {\n ...state,\n loading: true,\n error: null,\n syncing: !!action.syncing\n };\n case actionSuccess:\n return {\n ...state,\n loading: false,\n sync: true,\n syncing: false,\n error: null,\n data: action.data\n };\n case actionFail:\n return {\n ...state,\n loading: false,\n error: action.error,\n syncing: false\n };\n case actionReset:\n const { mutation } = action;\n return (mutation === \"sync\") ?\n { ...state, sync: false } :\n { ...initialState };\n default:\n return reducer ? reducer(state, action) : state;\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/reducerFn.js\n **/","\"use strict\";\n\nconst toString = Object.prototype.toString;\nconst OBJECT = \"[object Object]\";\n\n/**\n * Default responce transformens\n */\nexport default {\n array(data) {\n return !data ? [] : Array.isArray(data) ? data : [data];\n },\n object(data) {\n if (!data) {\n return {};\n }\n return toString.call(data) === OBJECT ? data : { data };\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/transformers.js\n **/","\"use strict\";\nimport omit from \"./utils/omit\";\nimport merge from \"./utils/merge\";\nimport qs from \"qs\";\nimport { parse } from \"url\";\n\nconst rxClean = /(\\(:[^\\)]+\\)|:[^\\/]+)/g;\n\n/**\n * Url modification\n * @param {String} url url template\n * @param {Object} params params for url template\n * @param {Object} options transformation options, accepts +delimiter+, +arrayFormat+,\n * +qsStringifyOptions+ and +qsParseOptions+\n * @return {String} result url\n */\nexport default function urlTransform(url, params, options) {\n if (!url) { return \"\"; }\n params || (params = {});\n const usedKeys = {};\n\n const urlWithParams = Object.keys(params).reduce((url, key)=> {\n const value = params[key];\n const rx = new RegExp(`(\\\\(:${key}\\\\)|:${key})`, \"g\");\n return url.replace(rx, ()=> {\n usedKeys[key] = value;\n return value;\n });\n }, url);\n\n\n if (!urlWithParams) { return urlWithParams; }\n const { protocol, host, path } = parse(urlWithParams);\n const cleanURL = (host) ?\n `${protocol}//${host}${path.replace(rxClean, \"\")}` :\n path.replace(rxClean, \"\");\n const usedKeysArray = Object.keys(usedKeys);\n if (usedKeysArray.length !== Object.keys(params).length) {\n const urlObject = cleanURL.split(\"?\");\n options || (options = {});\n const { arrayFormat, delimiter } = options;\n const qsParseOptions = {\n arrayFormat,\n delimiter,\n ...options.qsParseOptions\n };\n const mergeParams = merge(\n (urlObject[1] && qs.parse(urlObject[1], qsParseOptions)),\n omit(params, usedKeysArray)\n );\n const qsStringifyOptions = {\n arrayFormat,\n delimiter,\n ...options.qsStringifyOptions\n };\n const urlStringParams = qs.stringify(mergeParams, qsStringifyOptions);\n return `${urlObject[0]}?${urlStringParams}`;\n }\n return cleanURL;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/urlTransform.js\n **/","export default function(object, props) {\n if (!Array.isArray(props)) {\n return { ...object };\n }\n\n return Object.keys(object || {}).reduce((memo, key)=> {\n if (props.indexOf(key) === -1) {\n memo[key] = object[key];\n }\n return memo;\n }, {});\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/omit.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///redux-api.min.js","webpack:///webpack/bootstrap 8104aa634ab66c9e7b63","webpack:///./src/index.js","webpack:///./~/url/url.js","webpack:///./~/qs/lib/utils.js","webpack:///./src/utils/merge.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./~/fast-apply/index.js","webpack:///./~/qs/lib/index.js","webpack:///./~/qs/lib/parse.js","webpack:///./~/qs/lib/stringify.js","webpack:///./~/querystring/decode.js","webpack:///./~/querystring/encode.js","webpack:///./~/querystring/index.js","webpack:///./~/url/~/punycode/punycode.js","webpack:///(webpack)/buildin/module.js","webpack:///./src/PubSub.js","webpack:///./src/actionFn.js","webpack:///./src/async.js","webpack:///./src/createHolder.js","webpack:///./src/fetchResolver.js","webpack:///./src/reducerFn.js","webpack:///./src/transformers.js","webpack:///./src/urlTransform.js","webpack:///./src/utils/omit.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","reduxApi","config","fnConfigCallback","memo","value","key","opts","_typeof","_extends","defaultEndpointConfig","reducerName","url","broadcast","console","warn","urlOptions","options","transformer","crud","prefetch","postfetch","validation","helpers","ACTIONS","actionFetch","PREFIX","actionSuccess","actionFail","actionReset","meta","fetch","_len","arguments","length","args","Array","_key","fetchHolder","apply","holder","virtual","actions","_actionFn2","reducers","initialState","sync","syncing","loading","data","reducer","bind","_reducerFn2","events","server","rootUrl","middlewareParser","responseHandler","cfg","use","_url2","parse","init","isServer","undefined","Object","keys","reduce","defineProperty","assign","target","i","source","prototype","hasOwnProperty","Symbol","iterator","constructor","_url","_reducerFn","_actionFn","_transformers","_transformers2","_async","_async2","object","transformers","async","Url","protocol","slashes","auth","host","port","hostname","hash","search","query","pathname","path","href","urlParse","parseQueryString","slashesDenoteHost","isObject","u","urlFormat","isString","format","urlResolve","relative","resolve","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","file","http:","https:","ftp:","gopher:","file:","querystring","TypeError","rest","trim","proto","exec","lowerProto","toLowerCase","substr","match","hostEnd","hec","indexOf","atSign","lastIndexOf","slice","decodeURIComponent","parseHost","ipv6Hostname","hostparts","split","l","part","newpart","j","k","charCodeAt","validParts","notHost","bit","push","unshift","join","domainArray","newOut","s","encode","h","ae","esc","encodeURIComponent","escape","qm","replace","stringify","charAt","rel","result","forEach","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","pop","authInHost","last","hasTrailingSlash","up","splice","isAbsolute","internals","hexTable","toString","toUpperCase","arrayToObject","plainObjects","create","il","merge","isArray","kl","decode","str","e","out","compact","refs","lookup","compacted","isRegExp","isBuffer","mergePair","a","b","aType","bType","ARRAY","OBJECT","__webpack_amd_options__","fastApply","fn","context","Stringify","Parse","Utils","delimiter","depth","arrayLimit","parameterLimit","strictNullHandling","allowPrototypes","allowDots","parseValues","parts","Infinity","pos","val","parseObject","chain","cleanRoot","index","parseInt","indexString","isNaN","parseArrays","parseKeys","parent","child","segment","tempObj","newObj","arrayPrefixGenerators","brackets","prefix","indices","repeat","skipNulls","generateArrayPrefix","filter","sort","Date","toISOString","values","objKeys","arrayFormat","prop","qs","sep","eq","regexp","maxKeys","len","kstr","vstr","v","x","idx","stringifyPrimitive","isFinite","name","map","ks","__WEBPACK_AMD_DEFINE_RESULT__","global","error","type","RangeError","errors","array","mapDomain","string","regexSeparators","labels","encoded","ucs2decode","extra","output","counter","ucs2encode","stringFromCharCode","basicToDigit","codePoint","base","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","floor","damp","baseMinusTMin","tMax","skew","input","basic","oldi","w","t","baseMinusT","inputLength","n","initialN","bias","initialBias","maxInt","tMin","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","toUnicode","regexPunycode","test","toASCII","regexNonASCII","freeExports","nodeType","freeModule","freeGlobal","window","self","overflow","not-basic","invalid-input","Math","String","fromCharCode","version","ucs2","webpackPolyfill","deprecate","paths","children","_classCallCheck","instance","Constructor","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","PubSub","container","cb","Function","err","none","extractArgs","pathvars","params","callback","helperCrudFunction","_extractArgs","_extractArgs2","_slicedToArray","method","defaultMiddlewareArgsParser","dispatch","getState","actionFn","_len2","_key2","_extractArgs3","_extractArgs4","pubsub","_middlewareParser","state","store","requestOptions","prevData","request","fetchResolverOpts","Promise","done","fail","_fetchResolver2","reject","requestHolder","set","promise","then","d","origData","catch","_PubSub2","_createHolder2","resultUrlT","_urlTransform2","urlT","urlObject","urlPath","globalOptions","baseOptions","_merge2","response","reset","mutation","defer","Error","_len3","_key3","_extractArgs5","_extractArgs6","modifyParams","CRUD","fnHelperCallback","func","helpername","_ref","_len4","_key4","callbackFn","helpersResult","_fastApply2","newArgs","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","next","_fastApply","_urlTransform","_merge","_fetchResolver","_PubSub","_createHolder","_toConsumableArray","arr2","from","nextArgs","hasData","empty","fetchResolver","reducerFn","action","urlTransform","usedKeys","urlWithParams","rx","RegExp","_parse","cleanURL","rxClean","usedKeysArray","_options","qsParseOptions","mergeParams","_qs2","_omit2","qsStringifyOptions","urlStringParams","_qs","_omit"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,aAAAD,IAEAD,EAAA,aAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,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wBt/FM,SAASqF,EAAQuS,GAC9B,MAAKxV,OAAMqL,QAAQmK,GAIZ3T,OAAOC,KAAKmB,OAAclB,OAAO,SAAC/D,EAAME,GAI7C,MAHIsX,GAAMhO,QAAQtJ,UAChBF,EAAKE,GAAO+E,EAAO/E,IAEdF,OAPPK,KAAY4E,IxBigGftG,EAAOD,QAAUA,EAAiB","file":"redux-api.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[\"redux-api\"] = factory();\n\telse\n\t\troot[\"redux-api\"] = 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[\"redux-api\"] = factory();\n\telse\n\t\troot[\"redux-api\"] = 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/*!**********************!*\\\n !*** ./src/index.js ***!\n \\**********************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t/* eslint no-void: 0 */\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\texports.default = reduxApi;\n\t\n\tvar _url = __webpack_require__(/*! url */ 1);\n\t\n\tvar _url2 = _interopRequireDefault(_url);\n\t\n\tvar _reducerFn = __webpack_require__(/*! ./reducerFn */ 19);\n\t\n\tvar _reducerFn2 = _interopRequireDefault(_reducerFn);\n\t\n\tvar _actionFn = __webpack_require__(/*! ./actionFn */ 15);\n\t\n\tvar _actionFn2 = _interopRequireDefault(_actionFn);\n\t\n\tvar _transformers = __webpack_require__(/*! ./transformers */ 20);\n\t\n\tvar _transformers2 = _interopRequireDefault(_transformers);\n\t\n\tvar _async = __webpack_require__(/*! ./async */ 16);\n\t\n\tvar _async2 = _interopRequireDefault(_async);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t// export { transformers, async };\n\t\n\t/**\n\t * Default configuration for each endpoint\n\t * @type {Object}\n\t */\n\tvar defaultEndpointConfig = {\n\t transformer: _transformers2.default.object\n\t};\n\t\n\tvar PREFIX = \"@@redux-api\";\n\t/**\n\t * Entry api point\n\t * @param {Object} config Rest api configuration\n\t * @param {Function} fetch Adapter for rest requests\n\t * @param {Boolean} isServer false by default (fif you want to use it for isomorphic apps)\n\t * @return {actions, reducers} { actions, reducers}\n\t * @example ```js\n\t * const api = reduxApi({\n\t * test: \"/plain/url\",\n\t * testItem: \"/plain/url/:id\",\n\t * testModify: {\n\t * url: \"/plain/url/:endpoint\",\n\t\n\t * transformer: (data)=> !data ?\n\t * { title: \"\", message: \"\" } :\n\t * { title: data.title, message: data.message },\n\t * options: {\n\t * method: \"post\"\n\t * headers: {\n\t * \"Accept\": \"application/json\",\n\t * \"Content-Type\": \"application/json\"\n\t * }\n\t * }\n\t * }\n\t * });\n\t * // register reducers\n\t *\n\t * // call actions\n\t * dispatch(api.actions.test());\n\t * dispatch(api.actions.testItem({id: 1}));\n\t * dispatch(api.actions.testModify({endpoint: \"upload-1\"}, {\n\t * body: JSON.stringify({title: \"Hello\", message: \"World\"})\n\t * }));\n\t * ```\n\t */\n\t\n\tfunction reduxApi(config) {\n\t config || (config = {});\n\t var fetchHolder = {\n\t fetch: null,\n\t server: false,\n\t rootUrl: null,\n\t middlewareParser: null,\n\t options: {},\n\t responseHandler: null\n\t };\n\t\n\t var cfg = {\n\t use: function use(key, value) {\n\t if (key === \"rootUrl\") {\n\t value && (fetchHolder[key] = _url2.default.parse(value));\n\t } else {\n\t fetchHolder[key] = value;\n\t }\n\t\n\t return this;\n\t },\n\t init: function init(fetch) {\n\t var isServer = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];\n\t var rootUrl = arguments[2];\n\t\n\t /* eslint no-console: 0 */\n\t console.warn(\"Deprecated method, use `use` method\");\n\t this.use(\"fetch\", fetch);\n\t this.use(\"server\", isServer);\n\t this.use(\"rootUrl\", rootUrl);\n\t return this;\n\t },\n\t\n\t actions: {},\n\t reducers: {},\n\t events: {}\n\t };\n\t function fnConfigCallback(memo, value, key) {\n\t var opts = (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === \"object\" ? _extends({}, defaultEndpointConfig, { reducerName: key }, value) : _extends({}, defaultEndpointConfig, { reducerName: key, url: value });\n\t\n\t if (opts.broadcast !== void 0) {\n\t /* eslint no-console: 0 */\n\t console.warn(\"Deprecated `broadcast` option. you shoud use `events`\" + \"to catch redux-api events (see https://github.com/lexich/redux-api/blob/master/DOCS.md#Events)\");\n\t }\n\t\n\t var url = opts.url;\n\t var urlOptions = opts.urlOptions;\n\t var options = opts.options;\n\t var transformer = opts.transformer;\n\t var broadcast = opts.broadcast;\n\t var crud = opts.crud;\n\t var reducerName = opts.reducerName;\n\t var prefetch = opts.prefetch;\n\t var postfetch = opts.postfetch;\n\t var validation = opts.validation;\n\t var helpers = opts.helpers;\n\t\n\t\n\t var ACTIONS = {\n\t actionFetch: PREFIX + \"@\" + reducerName,\n\t actionSuccess: PREFIX + \"@\" + reducerName + \"_success\",\n\t actionFail: PREFIX + \"@\" + reducerName + \"_fail\",\n\t actionReset: PREFIX + \"@\" + reducerName + \"_delete\"\n\t };\n\t\n\t var meta = {\n\t urlOptions: urlOptions,\n\t fetch: opts.fetch ? opts.fetch : function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return fetchHolder.fetch.apply(this, args);\n\t },\n\t holder: fetchHolder,\n\t broadcast: broadcast,\n\t virtual: !!opts.virtual,\n\t reducerName: reducerName,\n\t actions: memo.actions,\n\t prefetch: prefetch,\n\t postfetch: postfetch,\n\t validation: validation,\n\t helpers: helpers,\n\t transformer: transformer,\n\t crud: crud\n\t };\n\t\n\t memo.actions[key] = (0, _actionFn2.default)(url, key, options, ACTIONS, meta);\n\t\n\t if (!meta.virtual && !memo.reducers[reducerName]) {\n\t var initialState = {\n\t sync: false,\n\t syncing: false,\n\t loading: false,\n\t data: transformer()\n\t };\n\t var reducer = opts.reducer ? opts.reducer.bind(memo) : null;\n\t memo.reducers[reducerName] = (0, _reducerFn2.default)(initialState, ACTIONS, reducer);\n\t }\n\t memo.events[reducerName] = ACTIONS;\n\t return memo;\n\t }\n\t\n\t return Object.keys(config).reduce(function (memo, key) {\n\t return fnConfigCallback(memo, config[key], key, config);\n\t }, cfg);\n\t}\n\t\n\treduxApi.transformers = _transformers2.default;\n\treduxApi.async = _async2.default;\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 1 */\n/*!**********************!*\\\n !*** ./~/url/url.js ***!\n \\**********************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\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__(/*! punycode */ 12);\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\n\t// RFC 2396: characters reserved for delimiting URLs.\n\t// We actually just auto-escape these.\n\tdelims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\t\n\t\n\t// RFC 2396: characters not allowed for various reasons.\n\tunwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\t\n\t\n\t// Allowed by RFCs, but cause of XSS attacks. Always escape these.\n\tautoEscape = ['\\''].concat(unwise),\n\t\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\tnonHostChars = ['%', '/', '?', ';', '#'].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\n\t// protocols that can allow \"unsafe\" and \"unwise\" chars.\n\tunsafeProtocol = {\n\t 'javascript': true,\n\t 'javascript:': true\n\t},\n\t\n\t// protocols that never have a hostname.\n\thostlessProtocol = {\n\t 'javascript': true,\n\t 'javascript:': true\n\t},\n\t\n\t// protocols that always contain a // bit.\n\tslashedProtocol = {\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__(/*! querystring */ 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 === 'undefined' ? 'undefined' : _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] && (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)) 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)) 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) 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] === '[' && 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_-]/) ? '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 // 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] && 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 ? this.hostname : '[' + this.hostname + ']');\n\t if (this.port) {\n\t host += ':' + this.port;\n\t }\n\t }\n\t\n\t if (this.query && isObject(this.query) && 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 || (!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') 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] && 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 = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n\t mustEndAbs = isRelAbs || isSourceAbs || 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;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;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 === '' ? relative.host : result.host;\n\t result.hostname = relative.hostname || relative.hostname === '' ? 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 ? 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 : '') + (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 = (result.host || relative.host) && (last === '.' || last === '..') || 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] !== '' && (!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] === '' || 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 ? '' : 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 ? 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 : '') + (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 === 'undefined' ? 'undefined' : _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/* 2 */\n/*!***************************!*\\\n !*** ./~/qs/lib/utils.js ***!\n \\***************************/\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\t// Load modules\n\t\n\t\n\t// Declare internals\n\t\n\tvar internals = {};\n\tinternals.hexTable = new Array(256);\n\tfor (var h = 0; h < 256; ++h) {\n\t internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase();\n\t}\n\t\n\texports.arrayToObject = function (source, options) {\n\t\n\t var obj = options.plainObjects ? Object.create(null) : {};\n\t for (var i = 0, il = source.length; i < il; ++i) {\n\t if (typeof source[i] !== 'undefined') {\n\t\n\t obj[i] = source[i];\n\t }\n\t }\n\t\n\t return obj;\n\t};\n\t\n\texports.merge = function (target, source, options) {\n\t\n\t if (!source) {\n\t return target;\n\t }\n\t\n\t if ((typeof source === 'undefined' ? 'undefined' : _typeof(source)) !== 'object') {\n\t if (Array.isArray(target)) {\n\t target.push(source);\n\t } else if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object') {\n\t target[source] = true;\n\t } else {\n\t target = [target, source];\n\t }\n\t\n\t return target;\n\t }\n\t\n\t if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) !== 'object') {\n\t target = [target].concat(source);\n\t return target;\n\t }\n\t\n\t if (Array.isArray(target) && !Array.isArray(source)) {\n\t\n\t target = exports.arrayToObject(target, options);\n\t }\n\t\n\t var keys = Object.keys(source);\n\t for (var k = 0, kl = keys.length; k < kl; ++k) {\n\t var key = keys[k];\n\t var value = source[key];\n\t\n\t if (!Object.prototype.hasOwnProperty.call(target, key)) {\n\t target[key] = value;\n\t } else {\n\t target[key] = exports.merge(target[key], value, options);\n\t }\n\t }\n\t\n\t return target;\n\t};\n\t\n\texports.decode = function (str) {\n\t\n\t try {\n\t return decodeURIComponent(str.replace(/\\+/g, ' '));\n\t } catch (e) {\n\t return str;\n\t }\n\t};\n\t\n\texports.encode = function (str) {\n\t\n\t // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n\t // It has been adapted here for stricter adherence to RFC 3986\n\t if (str.length === 0) {\n\t return str;\n\t }\n\t\n\t if (typeof str !== 'string') {\n\t str = '' + str;\n\t }\n\t\n\t var out = '';\n\t for (var i = 0, il = str.length; i < il; ++i) {\n\t var c = str.charCodeAt(i);\n\t\n\t if (c === 0x2D || // -\n\t c === 0x2E || // .\n\t c === 0x5F || // _\n\t c === 0x7E || // ~\n\t c >= 0x30 && c <= 0x39 || // 0-9\n\t c >= 0x41 && c <= 0x5A || // a-z\n\t c >= 0x61 && c <= 0x7A) {\n\t // A-Z\n\t\n\t out += str[i];\n\t continue;\n\t }\n\t\n\t if (c < 0x80) {\n\t out += internals.hexTable[c];\n\t continue;\n\t }\n\t\n\t if (c < 0x800) {\n\t out += internals.hexTable[0xC0 | c >> 6] + internals.hexTable[0x80 | c & 0x3F];\n\t continue;\n\t }\n\t\n\t if (c < 0xD800 || c >= 0xE000) {\n\t out += internals.hexTable[0xE0 | c >> 12] + internals.hexTable[0x80 | c >> 6 & 0x3F] + internals.hexTable[0x80 | c & 0x3F];\n\t continue;\n\t }\n\t\n\t ++i;\n\t c = 0x10000 + ((c & 0x3FF) << 10 | str.charCodeAt(i) & 0x3FF);\n\t out += internals.hexTable[0xF0 | c >> 18] + internals.hexTable[0x80 | c >> 12 & 0x3F] + internals.hexTable[0x80 | c >> 6 & 0x3F] + internals.hexTable[0x80 | c & 0x3F];\n\t }\n\t\n\t return out;\n\t};\n\t\n\texports.compact = function (obj, refs) {\n\t\n\t if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n\t\n\t return obj;\n\t }\n\t\n\t refs = refs || [];\n\t var lookup = refs.indexOf(obj);\n\t if (lookup !== -1) {\n\t return refs[lookup];\n\t }\n\t\n\t refs.push(obj);\n\t\n\t if (Array.isArray(obj)) {\n\t var compacted = [];\n\t\n\t for (var i = 0, il = obj.length; i < il; ++i) {\n\t if (typeof obj[i] !== 'undefined') {\n\t compacted.push(obj[i]);\n\t }\n\t }\n\t\n\t return compacted;\n\t }\n\t\n\t var keys = Object.keys(obj);\n\t for (i = 0, il = keys.length; i < il; ++i) {\n\t var key = keys[i];\n\t obj[key] = exports.compact(obj[key], refs);\n\t }\n\t\n\t return obj;\n\t};\n\t\n\texports.isRegExp = function (obj) {\n\t\n\t return Object.prototype.toString.call(obj) === '[object RegExp]';\n\t};\n\t\n\texports.isBuffer = function (obj) {\n\t\n\t if (obj === null || typeof obj === 'undefined') {\n\t\n\t return false;\n\t }\n\t\n\t return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n\t};\n\n/***/ },\n/* 3 */\n/*!****************************!*\\\n !*** ./src/utils/merge.js ***!\n \\****************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.mergePair = mergePair;\n\t\n\texports.default = function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t return args.length ? args.reduce(mergePair) : null;\n\t};\n\t\n\t/* eslint no-void: 0 */\n\tvar toString = Object.prototype.toString;\n\tvar OBJECT = \"[object Object]\";\n\tvar ARRAY = \"[object Array]\";\n\t\n\tfunction mergePair(a, b) {\n\t if (a === void 0) {\n\t return b;\n\t }\n\t if (b === void 0) {\n\t return a;\n\t }\n\t\n\t var aType = toString.call(a);\n\t var bType = toString.call(b);\n\t if (aType === ARRAY) {\n\t return a.concat(b);\n\t }\n\t if (bType === ARRAY) {\n\t return [a].concat(b);\n\t }\n\t if (aType !== OBJECT || bType !== OBJECT) {\n\t return b;\n\t }\n\t return Object.keys(b).reduce(function (memo, key) {\n\t memo[key] = mergePair(a[key], b[key]);\n\t return memo;\n\t }, a);\n\t}\n\n/***/ },\n/* 4 */\n/*!****************************************!*\\\n !*** (webpack)/buildin/amd-options.js ***!\n \\****************************************/\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;\r\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, {}))\n\n/***/ },\n/* 5 */\n/*!*******************************!*\\\n !*** ./~/fast-apply/index.js ***!\n \\*******************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tmodule.exports = fastApply;\n\t\n\tfunction fastApply(fn, context, args) {\n\t\n\t switch (args ? args.length : 0) {\n\t case 0:\n\t return context ? fn.call(context) : fn();\n\t case 1:\n\t return context ? fn.call(context, args[0]) : fn(args[0]);\n\t case 2:\n\t return context ? fn.call(context, args[0], args[1]) : fn(args[0], args[1]);\n\t case 3:\n\t return context ? fn.call(context, args[0], args[1], args[2]) : fn(args[0], args[1], args[2]);\n\t case 4:\n\t return context ? fn.call(context, args[0], args[1], args[2], args[3]) : fn(args[0], args[1], args[2], args[3]);\n\t case 5:\n\t return context ? fn.call(context, args[0], args[1], args[2], args[3], args[4]) : fn(args[0], args[1], args[2], args[3], args[4]);\n\t default:\n\t return fn.apply(context, args);\n\t }\n\t}\n\n/***/ },\n/* 6 */\n/*!***************************!*\\\n !*** ./~/qs/lib/index.js ***!\n \\***************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t// Load modules\n\t\n\tvar Stringify = __webpack_require__(/*! ./stringify */ 8);\n\tvar Parse = __webpack_require__(/*! ./parse */ 7);\n\t\n\t// Declare internals\n\t\n\tvar internals = {};\n\t\n\tmodule.exports = {\n\t stringify: Stringify,\n\t parse: Parse\n\t};\n\n/***/ },\n/* 7 */\n/*!***************************!*\\\n !*** ./~/qs/lib/parse.js ***!\n \\***************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t// Load modules\n\t\n\tvar Utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\t// Declare internals\n\t\n\tvar internals = {\n\t delimiter: '&',\n\t depth: 5,\n\t arrayLimit: 20,\n\t parameterLimit: 1000,\n\t strictNullHandling: false,\n\t plainObjects: false,\n\t allowPrototypes: false,\n\t allowDots: false\n\t};\n\t\n\tinternals.parseValues = function (str, options) {\n\t\n\t var obj = {};\n\t var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);\n\t\n\t for (var i = 0, il = parts.length; i < il; ++i) {\n\t var part = parts[i];\n\t var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;\n\t\n\t if (pos === -1) {\n\t obj[Utils.decode(part)] = '';\n\t\n\t if (options.strictNullHandling) {\n\t obj[Utils.decode(part)] = null;\n\t }\n\t } else {\n\t var key = Utils.decode(part.slice(0, pos));\n\t var val = Utils.decode(part.slice(pos + 1));\n\t\n\t if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n\t obj[key] = val;\n\t } else {\n\t obj[key] = [].concat(obj[key]).concat(val);\n\t }\n\t }\n\t }\n\t\n\t return obj;\n\t};\n\t\n\tinternals.parseObject = function (chain, val, options) {\n\t\n\t if (!chain.length) {\n\t return val;\n\t }\n\t\n\t var root = chain.shift();\n\t\n\t var obj;\n\t if (root === '[]') {\n\t obj = [];\n\t obj = obj.concat(internals.parseObject(chain, val, options));\n\t } else {\n\t obj = options.plainObjects ? Object.create(null) : {};\n\t var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;\n\t var index = parseInt(cleanRoot, 10);\n\t var indexString = '' + index;\n\t if (!isNaN(index) && root !== cleanRoot && indexString === cleanRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) {\n\t\n\t obj = [];\n\t obj[index] = internals.parseObject(chain, val, options);\n\t } else {\n\t obj[cleanRoot] = internals.parseObject(chain, val, options);\n\t }\n\t }\n\t\n\t return obj;\n\t};\n\t\n\tinternals.parseKeys = function (key, val, options) {\n\t\n\t if (!key) {\n\t return;\n\t }\n\t\n\t // Transform dot notation to bracket notation\n\t\n\t if (options.allowDots) {\n\t key = key.replace(/\\.([^\\.\\[]+)/g, '[$1]');\n\t }\n\t\n\t // The regex chunks\n\t\n\t var parent = /^([^\\[\\]]*)/;\n\t var child = /(\\[[^\\[\\]]*\\])/g;\n\t\n\t // Get the parent\n\t\n\t var segment = parent.exec(key);\n\t\n\t // Stash the parent if it exists\n\t\n\t var keys = [];\n\t if (segment[1]) {\n\t // If we aren't using plain objects, optionally prefix keys\n\t // that would overwrite object prototype properties\n\t if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1])) {\n\t\n\t if (!options.allowPrototypes) {\n\t return;\n\t }\n\t }\n\t\n\t keys.push(segment[1]);\n\t }\n\t\n\t // Loop through children appending to the array until we hit depth\n\t\n\t var i = 0;\n\t while ((segment = child.exec(key)) !== null && i < options.depth) {\n\t\n\t ++i;\n\t if (!options.plainObjects && Object.prototype.hasOwnProperty(segment[1].replace(/\\[|\\]/g, ''))) {\n\t\n\t if (!options.allowPrototypes) {\n\t continue;\n\t }\n\t }\n\t keys.push(segment[1]);\n\t }\n\t\n\t // If there's a remainder, just add whatever is left\n\t\n\t if (segment) {\n\t keys.push('[' + key.slice(segment.index) + ']');\n\t }\n\t\n\t return internals.parseObject(keys, val, options);\n\t};\n\t\n\tmodule.exports = function (str, options) {\n\t\n\t options = options || {};\n\t options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;\n\t options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;\n\t options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;\n\t options.parseArrays = options.parseArrays !== false;\n\t options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;\n\t options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;\n\t options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;\n\t options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;\n\t options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\t\n\t if (str === '' || str === null || typeof str === 'undefined') {\n\t\n\t return options.plainObjects ? Object.create(null) : {};\n\t }\n\t\n\t var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;\n\t var obj = options.plainObjects ? Object.create(null) : {};\n\t\n\t // Iterate over the keys and setup the new object\n\t\n\t var keys = Object.keys(tempObj);\n\t for (var i = 0, il = keys.length; i < il; ++i) {\n\t var key = keys[i];\n\t var newObj = internals.parseKeys(key, tempObj[key], options);\n\t obj = Utils.merge(obj, newObj, options);\n\t }\n\t\n\t return Utils.compact(obj);\n\t};\n\n/***/ },\n/* 8 */\n/*!*******************************!*\\\n !*** ./~/qs/lib/stringify.js ***!\n \\*******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\t// Load modules\n\t\n\tvar Utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\t// Declare internals\n\t\n\tvar internals = {\n\t delimiter: '&',\n\t arrayPrefixGenerators: {\n\t brackets: function brackets(prefix, key) {\n\t\n\t return prefix + '[]';\n\t },\n\t indices: function indices(prefix, key) {\n\t\n\t return prefix + '[' + key + ']';\n\t },\n\t repeat: function repeat(prefix, key) {\n\t\n\t return prefix;\n\t }\n\t },\n\t strictNullHandling: false,\n\t skipNulls: false,\n\t encode: true\n\t};\n\t\n\tinternals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) {\n\t\n\t if (typeof filter === 'function') {\n\t obj = filter(prefix, obj);\n\t } else if (Utils.isBuffer(obj)) {\n\t obj = obj.toString();\n\t } else if (obj instanceof Date) {\n\t obj = obj.toISOString();\n\t } else if (obj === null) {\n\t if (strictNullHandling) {\n\t return encode ? Utils.encode(prefix) : prefix;\n\t }\n\t\n\t obj = '';\n\t }\n\t\n\t if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean') {\n\t\n\t if (encode) {\n\t return [Utils.encode(prefix) + '=' + Utils.encode(obj)];\n\t }\n\t return [prefix + '=' + obj];\n\t }\n\t\n\t var values = [];\n\t\n\t if (typeof obj === 'undefined') {\n\t return values;\n\t }\n\t\n\t var objKeys;\n\t if (Array.isArray(filter)) {\n\t objKeys = filter;\n\t } else {\n\t var keys = Object.keys(obj);\n\t objKeys = sort ? keys.sort(sort) : keys;\n\t }\n\t\n\t for (var i = 0, il = objKeys.length; i < il; ++i) {\n\t var key = objKeys[i];\n\t\n\t if (skipNulls && obj[key] === null) {\n\t\n\t continue;\n\t }\n\t\n\t if (Array.isArray(obj)) {\n\t values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n\t } else {\n\t values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n\t }\n\t }\n\t\n\t return values;\n\t};\n\t\n\tmodule.exports = function (obj, options) {\n\t\n\t options = options || {};\n\t var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;\n\t var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\t var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;\n\t var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;\n\t var sort = typeof options.sort === 'function' ? options.sort : null;\n\t var objKeys;\n\t var filter;\n\t if (typeof options.filter === 'function') {\n\t filter = options.filter;\n\t obj = filter('', obj);\n\t } else if (Array.isArray(options.filter)) {\n\t objKeys = filter = options.filter;\n\t }\n\t\n\t var keys = [];\n\t\n\t if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n\t\n\t return '';\n\t }\n\t\n\t var arrayFormat;\n\t if (options.arrayFormat in internals.arrayPrefixGenerators) {\n\t arrayFormat = options.arrayFormat;\n\t } else if ('indices' in options) {\n\t arrayFormat = options.indices ? 'indices' : 'repeat';\n\t } else {\n\t arrayFormat = 'indices';\n\t }\n\t\n\t var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];\n\t\n\t if (!objKeys) {\n\t objKeys = Object.keys(obj);\n\t }\n\t\n\t if (sort) {\n\t objKeys.sort(sort);\n\t }\n\t\n\t for (var i = 0, il = objKeys.length; i < il; ++i) {\n\t var key = objKeys[i];\n\t\n\t if (skipNulls && obj[key] === null) {\n\t\n\t continue;\n\t }\n\t\n\t keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort));\n\t }\n\t\n\t return keys.join(delimiter);\n\t};\n\n/***/ },\n/* 9 */\n/*!*********************************!*\\\n !*** ./~/querystring/decode.js ***!\n \\*********************************/\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\t\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,\n\t vstr,\n\t k,\n\t 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/* 10 */\n/*!*********************************!*\\\n !*** ./~/querystring/encode.js ***!\n \\*********************************/\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 _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar stringifyPrimitive = function stringifyPrimitive(v) {\n\t switch (typeof v === 'undefined' ? 'undefined' : _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 === 'undefined' ? 'undefined' : _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 if (!name) return '';\n\t return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));\n\t};\n\n/***/ },\n/* 11 */\n/*!********************************!*\\\n !*** ./~/querystring/index.js ***!\n \\********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.decode = exports.parse = __webpack_require__(/*! ./decode */ 9);\n\texports.encode = exports.stringify = __webpack_require__(/*! ./encode */ 10);\n\n/***/ },\n/* 12 */\n/*!**************************************!*\\\n !*** ./~/url/~/punycode/punycode.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module, global) {'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\t/*! 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 = ( false ? 'undefined' : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n\t\tvar freeModule = ( false ? 'undefined' : _typeof(module)) == 'object' && module && !module.nodeType && module;\n\t\tvar freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global;\n\t\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {\n\t\t\troot = freeGlobal;\n\t\t}\n\t\n\t\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\t\tvar punycode,\n\t\n\t\n\t\t/** Highest positive signed 32-bit float value */\n\t\tmaxInt = 2147483647,\n\t\t // aka. 0x7FFFFFFF or 2^31-1\n\t\n\t\t/** Bootstring parameters */\n\t\tbase = 36,\n\t\t tMin = 1,\n\t\t tMax = 26,\n\t\t skew = 38,\n\t\t damp = 700,\n\t\t initialBias = 72,\n\t\t initialN = 128,\n\t\t // 0x80\n\t\tdelimiter = '-',\n\t\t // '\\x2D'\n\t\n\t\t/** Regular expressions */\n\t\tregexPunycode = /^xn--/,\n\t\t regexNonASCII = /[^\\x20-\\x7E]/,\n\t\t // unprintable ASCII chars + non-ASCII chars\n\t\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g,\n\t\t // 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\n\t\t/** Convenience shortcuts */\n\t\tbaseMinusTMin = base - tMin,\n\t\t floor = Math.floor,\n\t\t stringFromCharCode = String.fromCharCode,\n\t\n\t\n\t\t/** Temporary variable */\n\t\tkey;\n\t\n\t\t/*--------------------------------------------------------------------------*/\n\t\n\t\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\t\tfunction error(type) {\n\t\t\tthrow RangeError(errors[type]);\n\t\t}\n\t\n\t\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\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 * 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\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 * 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 \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\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) {\n\t\t\t\t\t\t// 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 * 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\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 * 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\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 * 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\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 * 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\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 * 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\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\n\t\t\t/** Cached calculation results */\n\t\t\tbaseMinusT;\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\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\t\t}\n\t\n\t\t\treturn ucs2encode(output);\n\t\t}\n\t\n\t\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\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\n\t\t\t/** `inputLength` will hold the number of code points in `input`. */\n\t\t\tinputLength,\n\t\n\t\t\t/** Cached calculation results */\n\t\t\thandledCPCountPlusOne,\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 state to ,\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(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\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\t\t}\n\t\t\treturn output.join('');\n\t\t}\n\t\n\t\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\t\tfunction toUnicode(input) {\n\t\t\treturn mapDomain(input, function (string) {\n\t\t\t\treturn regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n\t\t\t});\n\t\t}\n\t\n\t\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\t\tfunction toASCII(input) {\n\t\t\treturn mapDomain(input, function (string) {\n\t\t\t\treturn regexNonASCII.test(string) ? 'xn--' + encode(string) : 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 * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t\t\t'version': '1.3.2',\n\t\t\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\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 (\"function\" == 'function' && _typeof(__webpack_require__(/*! !webpack amd options */ 4)) == 'object' && __webpack_require__(/*! !webpack amd options */ 4)) {\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) {\n\t\t\t\t// in Node.js or RingoJS v0.8.0+\n\t\t\t\tfreeModule.exports = punycode;\n\t\t\t} else {\n\t\t\t\t// 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 {\n\t\t\t// in Rhino or a web browser\n\t\t\troot.punycode = punycode;\n\t\t}\n\t})(undefined);\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 13)(module), (function() { return this; }())))\n\n/***/ },\n/* 13 */\n/*!***********************************!*\\\n !*** (webpack)/buildin/module.js ***!\n \\***********************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tmodule.exports = function (module) {\n\t\tif (!module.webpackPolyfill) {\n\t\t\tmodule.deprecate = function () {};\n\t\t\tmodule.paths = [];\n\t\t\t// module.parent = undefined by default\n\t\t\tmodule.children = [];\n\t\t\tmodule.webpackPolyfill = 1;\n\t\t}\n\t\treturn module;\n\t};\n\n/***/ },\n/* 14 */\n/*!***********************!*\\\n !*** ./src/PubSub.js ***!\n \\***********************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\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 PubSub = function () {\n\t function PubSub() {\n\t _classCallCheck(this, PubSub);\n\t\n\t this.container = [];\n\t }\n\t\n\t _createClass(PubSub, [{\n\t key: \"push\",\n\t value: function push(cb) {\n\t cb instanceof Function && this.container.push(cb);\n\t }\n\t }, {\n\t key: \"resolve\",\n\t value: function resolve(data) {\n\t this.container.forEach(function (cb) {\n\t return cb(null, data);\n\t });\n\t this.container = [];\n\t }\n\t }, {\n\t key: \"reject\",\n\t value: function reject(err) {\n\t this.container.forEach(function (cb) {\n\t return cb(err);\n\t });\n\t this.container = [];\n\t }\n\t }]);\n\t\n\t return PubSub;\n\t}();\n\t\n\texports.default = PubSub;\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 15 */\n/*!*************************!*\\\n !*** ./src/actionFn.js ***!\n \\*************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.CRUD = undefined;\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\t\n\texports.default = actionFn;\n\t\n\tvar _fastApply = __webpack_require__(/*! fast-apply */ 5);\n\t\n\tvar _fastApply2 = _interopRequireDefault(_fastApply);\n\t\n\tvar _url = __webpack_require__(/*! url */ 1);\n\t\n\tvar _url2 = _interopRequireDefault(_url);\n\t\n\tvar _urlTransform = __webpack_require__(/*! ./urlTransform */ 21);\n\t\n\tvar _urlTransform2 = _interopRequireDefault(_urlTransform);\n\t\n\tvar _merge = __webpack_require__(/*! ./utils/merge */ 3);\n\t\n\tvar _merge2 = _interopRequireDefault(_merge);\n\t\n\tvar _fetchResolver = __webpack_require__(/*! ./fetchResolver */ 18);\n\t\n\tvar _fetchResolver2 = _interopRequireDefault(_fetchResolver);\n\t\n\tvar _PubSub = __webpack_require__(/*! ./PubSub */ 14);\n\t\n\tvar _PubSub2 = _interopRequireDefault(_PubSub);\n\t\n\tvar _createHolder = __webpack_require__(/*! ./createHolder */ 17);\n\t\n\tvar _createHolder2 = _interopRequireDefault(_createHolder);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction none() {}\n\t\n\tfunction extractArgs(args) {\n\t var pathvars = void 0;\n\t var params = {};\n\t var callback = void 0;\n\t if (args[0] instanceof Function) {\n\t callback = args[0];\n\t } else if (args[1] instanceof Function) {\n\t pathvars = args[0];\n\t callback = args[1];\n\t } else {\n\t pathvars = args[0];\n\t params = args[1];\n\t callback = args[2] || none;\n\t }\n\t return [pathvars, params, callback];\n\t}\n\t\n\tfunction helperCrudFunction(name) {\n\t return function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t var _extractArgs = extractArgs(args);\n\t\n\t var _extractArgs2 = _slicedToArray(_extractArgs, 3);\n\t\n\t var pathvars = _extractArgs2[0];\n\t var params = _extractArgs2[1];\n\t var cb = _extractArgs2[2];\n\t\n\t return [pathvars, _extends({}, params, { method: name.toUpperCase() }), cb];\n\t };\n\t}\n\t\n\tfunction defaultMiddlewareArgsParser(dispatch, getState) {\n\t return { dispatch: dispatch, getState: getState };\n\t}\n\t\n\tvar CRUD = exports.CRUD = [\"get\", \"post\", \"put\", \"delete\", \"patch\"].reduce(function (memo, name) {\n\t memo[name] = helperCrudFunction(name);\n\t return memo;\n\t}, {});\n\t\n\t/**\n\t * Constructor for create action\n\t * @param {String} url endpoint's url\n\t * @param {String} name action name\n\t * @param {Object} options action configuration\n\t * @param {Object} ACTIONS map of actions\n\t * @param {[type]} fetchAdapter adapter for fetching data\n\t * @return {Function+Object} action function object\n\t */\n\tfunction actionFn(url, name, options) {\n\t var ACTIONS = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];\n\t var meta = arguments.length <= 4 || arguments[4] === undefined ? {} : arguments[4];\n\t var actionFetch = ACTIONS.actionFetch;\n\t var actionSuccess = ACTIONS.actionSuccess;\n\t var actionFail = ACTIONS.actionFail;\n\t var actionReset = ACTIONS.actionReset;\n\t\n\t var pubsub = new _PubSub2.default();\n\t var requestHolder = (0, _createHolder2.default)();\n\t var responseHandler = meta && meta.holder && meta.holder.responseHandler;\n\t /**\n\t * Fetch data from server\n\t * @param {Object} pathvars path vars for url\n\t * @param {Object} params fetch params\n\t * @param {Function} getState helper meta function\n\t */\n\t var request = function request(pathvars, params) {\n\t var getState = arguments.length <= 2 || arguments[2] === undefined ? none : arguments[2];\n\t\n\t var resultUrlT = (0, _urlTransform2.default)(url, pathvars, meta.urlOptions);\n\t var rootUrl = meta.holder ? meta.holder.rootUrl : null;\n\t var urlT = resultUrlT;\n\t if (rootUrl) {\n\t var urlObject = _url2.default.parse(urlT);\n\t if (!urlObject.host) {\n\t var urlPath = (rootUrl.path ? rootUrl.path.replace(/\\/$/, \"\") : \"\") + \"/\" + (urlObject.path ? urlObject.path.replace(/^\\//, \"\") : \"\");\n\t urlT = rootUrl.protocol + \"//\" + rootUrl.host + urlPath;\n\t }\n\t }\n\t var globalOptions = !meta.holder ? {} : meta.holder.options instanceof Function ? meta.holder.options(urlT, params, getState) : meta.holder.options;\n\t var baseOptions = options instanceof Function ? options(urlT, params, getState) : options;\n\t var opts = (0, _merge2.default)({}, globalOptions, baseOptions, params);\n\t var response = meta.fetch(urlT, opts);\n\t var result = !meta.validation ? response : response.then(function (data) {\n\t return new Promise(function (resolve, reject) {\n\t return meta.validation(data, function (err) {\n\t return err ? reject(err) : resolve(data);\n\t });\n\t });\n\t });\n\t if (responseHandler) {\n\t if (result && result.then) {\n\t result.then(function (data) {\n\t return responseHandler(null, data);\n\t }, function (err) {\n\t return responseHandler(err);\n\t });\n\t } else {\n\t responseHandler(result);\n\t }\n\t }\n\t result && result.catch && result.catch(none);\n\t return result;\n\t };\n\t\n\t /**\n\t * Fetch data from server\n\t * @param {Object} pathvars path vars for url\n\t * @param {Object} params fetch params\n\t * @param {Function} callback) callback execute after end request\n\t */\n\t function fn() {\n\t for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t args[_key2] = arguments[_key2];\n\t }\n\t\n\t var _extractArgs3 = extractArgs(args);\n\t\n\t var _extractArgs4 = _slicedToArray(_extractArgs3, 3);\n\t\n\t var pathvars = _extractArgs4[0];\n\t var params = _extractArgs4[1];\n\t var callback = _extractArgs4[2];\n\t\n\t var syncing = params ? !!params.syncing : false;\n\t params && delete params.syncing;\n\t pubsub.push(callback);\n\t return function () {\n\t var middlewareParser = meta.holder && meta.holder.middlewareParser || defaultMiddlewareArgsParser;\n\t\n\t var _middlewareParser = middlewareParser.apply(undefined, arguments);\n\t\n\t var dispatch = _middlewareParser.dispatch;\n\t var getState = _middlewareParser.getState;\n\t var reducerName = meta.reducerName;\n\t\n\t var state = getState();\n\t var store = state[reducerName];\n\t var requestOptions = { pathvars: pathvars, params: params };\n\t if (store && store.loading) {\n\t return;\n\t }\n\t var prevData = state && state[reducerName] && state[reducerName].data;\n\t dispatch({ type: actionFetch, syncing: syncing, request: requestOptions });\n\t var fetchResolverOpts = {\n\t dispatch: dispatch,\n\t getState: getState,\n\t actions: meta.actions,\n\t prefetch: meta.prefetch\n\t };\n\t var result = new Promise(function (done, fail) {\n\t (0, _fetchResolver2.default)(0, fetchResolverOpts, function (err) {\n\t if (err) {\n\t pubsub.reject(err);\n\t return fail(err);\n\t }\n\t new Promise(function (resolve, reject) {\n\t requestHolder.set({\n\t resolve: resolve,\n\t reject: reject,\n\t promise: request(pathvars, params, getState).then(resolve, reject)\n\t });\n\t }).then(function (d) {\n\t requestHolder.pop();\n\t var data = meta.transformer(d, prevData, {\n\t type: actionSuccess, request: requestOptions\n\t });\n\t dispatch({\n\t data: data,\n\t origData: d,\n\t type: actionSuccess,\n\t syncing: false,\n\t request: requestOptions\n\t });\n\t if (meta.broadcast) {\n\t meta.broadcast.forEach(function (type) {\n\t dispatch({ type: type, data: data, origData: d, request: requestOptions });\n\t });\n\t }\n\t if (meta.postfetch) {\n\t meta.postfetch.forEach(function (postfetch) {\n\t postfetch instanceof Function && postfetch({\n\t data: data, getState: getState, dispatch: dispatch, actions: meta.actions, request: requestOptions\n\t });\n\t });\n\t }\n\t pubsub.resolve(data);\n\t done(data);\n\t }, function (error) {\n\t dispatch({ type: actionFail, syncing: false, error: error, request: requestOptions });\n\t pubsub.reject(error);\n\t fail(error);\n\t });\n\t });\n\t });\n\t result.catch(none);\n\t return result;\n\t };\n\t }\n\t\n\t /*\n\t Pure rest request\n\t */\n\t fn.request = request;\n\t\n\t /**\n\t * Reset store to initial state\n\t */\n\t fn.reset = function (mutation) {\n\t var defer = requestHolder.pop();\n\t defer && defer.reject(new Error(\"Application abort request\"));\n\t return mutation === \"sync\" ? { type: actionReset, mutation: mutation } : { type: actionReset };\n\t };\n\t\n\t /**\n\t * Sync store with server. In server mode works as usual method.\n\t * If data have already synced, data would not fetch after call this method.\n\t * @param {Object} pathvars path vars for url\n\t * @param {Object} params fetch params\n\t * @param {Function} callback) callback execute after end request\n\t */\n\t fn.sync = function () {\n\t for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t args[_key3] = arguments[_key3];\n\t }\n\t\n\t var _extractArgs5 = extractArgs(args);\n\t\n\t var _extractArgs6 = _slicedToArray(_extractArgs5, 3);\n\t\n\t var pathvars = _extractArgs6[0];\n\t var params = _extractArgs6[1];\n\t var callback = _extractArgs6[2];\n\t\n\t var isServer = meta.holder ? meta.holder.server : false;\n\t return function (dispatch, getState) {\n\t var state = getState();\n\t var store = state[name];\n\t if (!isServer && store && store.sync) {\n\t callback(null, store.data);\n\t return;\n\t }\n\t var modifyParams = _extends({}, params, { syncing: true });\n\t return fn(pathvars, modifyParams, callback)(dispatch, getState);\n\t };\n\t };\n\t\n\t var helpers = meta.helpers || {};\n\t if (meta.crud) {\n\t helpers = _extends({}, CRUD, helpers);\n\t }\n\t var fnHelperCallback = function fnHelperCallback(memo, func, helpername) {\n\t if (memo[helpername]) {\n\t throw new Error(\"Helper name: \\\"\" + helpername + \"\\\" for endpoint \\\"\" + name + \"\\\" has been already reserved\");\n\t }\n\t\n\t var _ref = func instanceof Function ? { call: func } : func;\n\t\n\t var sync = _ref.sync;\n\t var call = _ref.call;\n\t\n\t memo[helpername] = function () {\n\t for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t args[_key4] = arguments[_key4];\n\t }\n\t\n\t return function (dispatch, getState) {\n\t var index = args.length - 1;\n\t var callbackFn = args[index] instanceof Function ? args[index] : none;\n\t var helpersResult = (0, _fastApply2.default)(call, { getState: getState, dispatch: dispatch, actions: meta.actions }, args);\n\t var result = new Promise(function (resolve, reject) {\n\t var callback = function callback(err, data) {\n\t err ? reject(err) : resolve(data);\n\t callbackFn(err, data);\n\t };\n\t // If helper alias using async functionality\n\t if (helpersResult instanceof Function) {\n\t helpersResult(function (error) {\n\t var newArgs = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];\n\t\n\t if (error) {\n\t callback(error);\n\t } else {\n\t (0, _fastApply2.default)(sync ? fn.sync : fn, null, newArgs.concat(callback))(dispatch, getState);\n\t }\n\t });\n\t } else {\n\t // if helper alias is synchronous\n\t (0, _fastApply2.default)(sync ? fn.sync : fn, null, helpersResult.concat(callback))(dispatch, getState);\n\t }\n\t });\n\t result.catch(none);\n\t return result;\n\t };\n\t };\n\t return memo;\n\t };\n\t\n\t return Object.keys(helpers).reduce(function (memo, key) {\n\t return fnHelperCallback(memo, helpers[key], key, helpers);\n\t }, fn);\n\t}\n\n/***/ },\n/* 16 */\n/*!**********************!*\\\n !*** ./src/async.js ***!\n \\**********************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = async;\n\t\n\tfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\t\n\t/**\n\t *\n\t * @param {[type]} dispatch [description]\n\t * @param {...[type]} args [description]\n\t * @return {[type]} [description]\n\t * @example\n\t * async(dispatch,\n\t * (cb)=> actions.test(1, cb),\n\t * actions.test2\n\t * ).then(()=> async(dispatch, actions.test3))\n\t */\n\tfunction async(dispatch) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var fn = args[0];\n\t var nextArgs = args.slice(1);\n\t return new Promise(function (resolve, reject) {\n\t if (!fn) {\n\t reject(\"no chain function\");\n\t } else {\n\t dispatch(fn(function (err, data) {\n\t err ? reject(err) : resolve(data);\n\t }) || {});\n\t }\n\t }).then(function (data) {\n\t if (nextArgs.length) {\n\t return async.apply(undefined, [dispatch].concat(_toConsumableArray(nextArgs)));\n\t } else {\n\t return data;\n\t }\n\t });\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 17 */\n/*!*****************************!*\\\n !*** ./src/createHolder.js ***!\n \\*****************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function () {\n\t var data = void 0;\n\t var hasData = false;\n\t return {\n\t set: function set(val) {\n\t if (!hasData) {\n\t data = val;\n\t hasData = true;\n\t return true;\n\t }\n\t return false;\n\t },\n\t empty: function empty() {\n\t return !hasData;\n\t },\n\t pop: function pop() {\n\t if (hasData) {\n\t hasData = false;\n\t var result = data;\n\t data = null;\n\t return result;\n\t }\n\t }\n\t };\n\t};\n\t\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 18 */\n/*!******************************!*\\\n !*** ./src/fetchResolver.js ***!\n \\******************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = fetchResolver;\n\tfunction none() {}\n\t\n\tfunction fetchResolver() {\n\t var index = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0];\n\t var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\t var cb = arguments.length <= 2 || arguments[2] === undefined ? none : arguments[2];\n\t\n\t if (!opts.prefetch || index >= opts.prefetch.length) {\n\t cb();\n\t } else {\n\t opts.prefetch[index](opts, function (err) {\n\t return err ? cb(err) : fetchResolver(index + 1, opts, cb);\n\t });\n\t }\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 19 */\n/*!**************************!*\\\n !*** ./src/reducerFn.js ***!\n \\**************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t/* eslint no-case-declarations: 0 */\n\t/**\n\t * Reducer contructor\n\t * @param {Object} initialState default initial state\n\t * @param {Object} actions actions map\n\t * @param {Function} transformer transformer function\n\t * @param {Function} reducer custom reducer function\n\t * @return {Function} reducer function\n\t */\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\texports.default = reducerFn;\n\tfunction reducerFn(initialState) {\n\t var actions = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\t var reducer = arguments[2];\n\t var actionFetch = actions.actionFetch;\n\t var actionSuccess = actions.actionSuccess;\n\t var actionFail = actions.actionFail;\n\t var actionReset = actions.actionReset;\n\t\n\t return function () {\n\t var state = arguments.length <= 0 || arguments[0] === undefined ? initialState : arguments[0];\n\t var action = arguments[1];\n\t\n\t switch (action.type) {\n\t case actionFetch:\n\t return _extends({}, state, {\n\t loading: true,\n\t error: null,\n\t syncing: !!action.syncing\n\t });\n\t case actionSuccess:\n\t return _extends({}, state, {\n\t loading: false,\n\t sync: true,\n\t syncing: false,\n\t error: null,\n\t data: action.data\n\t });\n\t case actionFail:\n\t return _extends({}, state, {\n\t loading: false,\n\t error: action.error,\n\t syncing: false\n\t });\n\t case actionReset:\n\t var mutation = action.mutation;\n\t\n\t return mutation === \"sync\" ? _extends({}, state, { sync: false }) : _extends({}, initialState);\n\t default:\n\t return reducer ? reducer(state, action) : state;\n\t }\n\t };\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 20 */\n/*!*****************************!*\\\n !*** ./src/transformers.js ***!\n \\*****************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\tvar toString = Object.prototype.toString;\n\tvar OBJECT = \"[object Object]\";\n\t\n\t/**\n\t * Default responce transformens\n\t */\n\texports.default = {\n\t array: function array(data) {\n\t return !data ? [] : Array.isArray(data) ? data : [data];\n\t },\n\t object: function object(data) {\n\t if (!data) {\n\t return {};\n\t }\n\t return toString.call(data) === OBJECT ? data : { data: data };\n\t }\n\t};\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 21 */\n/*!*****************************!*\\\n !*** ./src/urlTransform.js ***!\n \\*****************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\texports.default = urlTransform;\n\t\n\tvar _qs = __webpack_require__(/*! qs */ 6);\n\t\n\tvar _qs2 = _interopRequireDefault(_qs);\n\t\n\tvar _url = __webpack_require__(/*! url */ 1);\n\t\n\tvar _omit = __webpack_require__(/*! ./utils/omit */ 22);\n\t\n\tvar _omit2 = _interopRequireDefault(_omit);\n\t\n\tvar _merge = __webpack_require__(/*! ./utils/merge */ 3);\n\t\n\tvar _merge2 = _interopRequireDefault(_merge);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar rxClean = /(\\(:[^\\)]+\\)|:[^\\/]+)/g;\n\t\n\t/**\n\t * Url modification\n\t * @param {String} url url template\n\t * @param {Object} params params for url template\n\t * @param {Object} options transformation options, accepts +delimiter+, +arrayFormat+,\n\t * +qsStringifyOptions+ and +qsParseOptions+\n\t * @return {String} result url\n\t */\n\tfunction urlTransform(url, params, options) {\n\t if (!url) {\n\t return \"\";\n\t }\n\t params || (params = {});\n\t var usedKeys = {};\n\t\n\t var urlWithParams = Object.keys(params).reduce(function (url, key) {\n\t var value = params[key];\n\t var rx = new RegExp(\"(\\\\(:\" + key + \"\\\\)|:\" + key + \")\", \"g\");\n\t return url.replace(rx, function () {\n\t usedKeys[key] = value;\n\t return value;\n\t });\n\t }, url);\n\t\n\t if (!urlWithParams) {\n\t return urlWithParams;\n\t }\n\t\n\t var _parse = (0, _url.parse)(urlWithParams);\n\t\n\t var protocol = _parse.protocol;\n\t var host = _parse.host;\n\t var path = _parse.path;\n\t\n\t var cleanURL = host ? protocol + \"//\" + host + path.replace(rxClean, \"\") : path.replace(rxClean, \"\");\n\t var usedKeysArray = Object.keys(usedKeys);\n\t if (usedKeysArray.length !== Object.keys(params).length) {\n\t var urlObject = cleanURL.split(\"?\");\n\t options || (options = {});\n\t var _options = options;\n\t var arrayFormat = _options.arrayFormat;\n\t var delimiter = _options.delimiter;\n\t\n\t var qsParseOptions = _extends({\n\t arrayFormat: arrayFormat,\n\t delimiter: delimiter\n\t }, options.qsParseOptions);\n\t var mergeParams = (0, _merge2.default)(urlObject[1] && _qs2.default.parse(urlObject[1], qsParseOptions), (0, _omit2.default)(params, usedKeysArray));\n\t var qsStringifyOptions = _extends({\n\t arrayFormat: arrayFormat,\n\t delimiter: delimiter\n\t }, options.qsStringifyOptions);\n\t var urlStringParams = _qs2.default.stringify(mergeParams, qsStringifyOptions);\n\t return urlObject[0] + \"?\" + urlStringParams;\n\t }\n\t return cleanURL;\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 22 */\n/*!***************************!*\\\n !*** ./src/utils/omit.js ***!\n \\***************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\texports.default = function (object, props) {\n\t if (!Array.isArray(props)) {\n\t return _extends({}, object);\n\t }\n\t\n\t return Object.keys(object || {}).reduce(function (memo, key) {\n\t if (props.indexOf(key) === -1) {\n\t memo[key] = object[key];\n\t }\n\t return memo;\n\t }, {});\n\t};\n\t\n\tmodule.exports = exports[\"default\"];\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** redux-api.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 8104aa634ab66c9e7b63\n **/","\"use strict\";\n/* eslint no-void: 0 */\n\nimport libUrl from \"url\";\nimport reducerFn from \"./reducerFn\";\nimport actionFn from \"./actionFn\";\nimport transformers from \"./transformers\";\nimport async from \"./async\";\n\n// export { transformers, async };\n\n/**\n * Default configuration for each endpoint\n * @type {Object}\n */\nconst defaultEndpointConfig = {\n transformer: transformers.object\n};\n\nconst PREFIX = \"@@redux-api\";\n/**\n * Entry api point\n * @param {Object} config Rest api configuration\n * @param {Function} fetch Adapter for rest requests\n * @param {Boolean} isServer false by default (fif you want to use it for isomorphic apps)\n * @return {actions, reducers} { actions, reducers}\n * @example ```js\n * const api = reduxApi({\n * test: \"/plain/url\",\n * testItem: \"/plain/url/:id\",\n * testModify: {\n * url: \"/plain/url/:endpoint\",\n\n * transformer: (data)=> !data ?\n * { title: \"\", message: \"\" } :\n * { title: data.title, message: data.message },\n * options: {\n * method: \"post\"\n * headers: {\n * \"Accept\": \"application/json\",\n * \"Content-Type\": \"application/json\"\n * }\n * }\n * }\n * });\n * // register reducers\n *\n * // call actions\n * dispatch(api.actions.test());\n * dispatch(api.actions.testItem({id: 1}));\n * dispatch(api.actions.testModify({endpoint: \"upload-1\"}, {\n * body: JSON.stringify({title: \"Hello\", message: \"World\"})\n * }));\n * ```\n */\n\nexport default function reduxApi(config) {\n config || (config = {});\n const fetchHolder = {\n fetch: null,\n server: false,\n rootUrl: null,\n middlewareParser: null,\n options: {},\n responseHandler: null\n };\n\n const cfg = {\n use(key, value) {\n if (key === \"rootUrl\") {\n value && (fetchHolder[key] = libUrl.parse(value));\n } else {\n fetchHolder[key] = value;\n }\n\n return this;\n },\n init(fetch, isServer=false, rootUrl) {\n /* eslint no-console: 0 */\n console.warn(\"Deprecated method, use `use` method\");\n this.use(\"fetch\", fetch);\n this.use(\"server\", isServer);\n this.use(\"rootUrl\", rootUrl);\n return this;\n },\n actions: {},\n reducers: {},\n events: {}\n };\n function fnConfigCallback(memo, value, key) {\n const opts = typeof value === \"object\" ?\n { ...defaultEndpointConfig, reducerName: key, ...value } :\n { ...defaultEndpointConfig, reducerName: key, url: value };\n\n if (opts.broadcast !== (void 0)) {\n /* eslint no-console: 0 */\n console.warn(\"Deprecated `broadcast` option. you shoud use `events`\" +\n \"to catch redux-api events (see https://github.com/lexich/redux-api/blob/master/DOCS.md#Events)\");\n }\n\n const {\n url, urlOptions, options, transformer, broadcast, crud,\n reducerName, prefetch, postfetch, validation, helpers,\n } = opts;\n\n const ACTIONS = {\n actionFetch: `${PREFIX}@${reducerName}`,\n actionSuccess: `${PREFIX}@${reducerName}_success`,\n actionFail: `${PREFIX}@${reducerName}_fail`,\n actionReset: `${PREFIX}@${reducerName}_delete`\n };\n\n const meta = {\n urlOptions,\n fetch: opts.fetch ? opts.fetch : function(...args) {\n return fetchHolder.fetch.apply(this, args);\n },\n holder: fetchHolder,\n broadcast,\n virtual: !!opts.virtual,\n reducerName,\n actions: memo.actions,\n prefetch,\n postfetch,\n validation,\n helpers,\n transformer,\n crud\n };\n\n memo.actions[key] = actionFn(url, key, options, ACTIONS, meta);\n\n if (!meta.virtual && !memo.reducers[reducerName]) {\n const initialState = {\n sync: false,\n syncing: false,\n loading: false,\n data: transformer()\n };\n const reducer = opts.reducer ? opts.reducer.bind(memo) : null;\n memo.reducers[reducerName] = reducerFn(initialState, ACTIONS, reducer);\n }\n memo.events[reducerName] = ACTIONS;\n return memo;\n }\n\n return Object.keys(config).reduce(\n (memo, key)=> fnConfigCallback(memo, config[key], key, config), cfg);\n}\n\nreduxApi.transformers = transformers;\nreduxApi.async = async;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.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/** WEBPACK FOOTER **\n ** ./~/url/url.js\n **/","// Load modules\n\n\n// Declare internals\n\nvar internals = {};\ninternals.hexTable = new Array(256);\nfor (var h = 0; h < 256; ++h) {\n internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase();\n}\n\n\nexports.arrayToObject = function (source, options) {\n\n var obj = options.plainObjects ? Object.create(null) : {};\n for (var i = 0, il = source.length; i < il; ++i) {\n if (typeof source[i] !== 'undefined') {\n\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\n\nexports.merge = function (target, source, options) {\n\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (Array.isArray(target)) {\n target.push(source);\n }\n else if (typeof target === 'object') {\n target[source] = true;\n }\n else {\n target = [target, source];\n }\n\n return target;\n }\n\n if (typeof target !== 'object') {\n target = [target].concat(source);\n return target;\n }\n\n if (Array.isArray(target) &&\n !Array.isArray(source)) {\n\n target = exports.arrayToObject(target, options);\n }\n\n var keys = Object.keys(source);\n for (var k = 0, kl = keys.length; k < kl; ++k) {\n var key = keys[k];\n var value = source[key];\n\n if (!Object.prototype.hasOwnProperty.call(target, key)) {\n target[key] = value;\n }\n else {\n target[key] = exports.merge(target[key], value, options);\n }\n }\n\n return target;\n};\n\n\nexports.decode = function (str) {\n\n try {\n return decodeURIComponent(str.replace(/\\+/g, ' '));\n } catch (e) {\n return str;\n }\n};\n\nexports.encode = function (str) {\n\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n if (typeof str !== 'string') {\n str = '' + str;\n }\n\n var out = '';\n for (var i = 0, il = str.length; i < il; ++i) {\n var c = str.charCodeAt(i);\n\n if (c === 0x2D || // -\n c === 0x2E || // .\n c === 0x5F || // _\n c === 0x7E || // ~\n (c >= 0x30 && c <= 0x39) || // 0-9\n (c >= 0x41 && c <= 0x5A) || // a-z\n (c >= 0x61 && c <= 0x7A)) { // A-Z\n\n out += str[i];\n continue;\n }\n\n if (c < 0x80) {\n out += internals.hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out += internals.hexTable[0xC0 | (c >> 6)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out += internals.hexTable[0xE0 | (c >> 12)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n ++i;\n c = 0x10000 + (((c & 0x3FF) << 10) | (str.charCodeAt(i) & 0x3FF));\n out += internals.hexTable[0xF0 | (c >> 18)] + internals.hexTable[0x80 | ((c >> 12) & 0x3F)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nexports.compact = function (obj, refs) {\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return obj;\n }\n\n refs = refs || [];\n var lookup = refs.indexOf(obj);\n if (lookup !== -1) {\n return refs[lookup];\n }\n\n refs.push(obj);\n\n if (Array.isArray(obj)) {\n var compacted = [];\n\n for (var i = 0, il = obj.length; i < il; ++i) {\n if (typeof obj[i] !== 'undefined') {\n compacted.push(obj[i]);\n }\n }\n\n return compacted;\n }\n\n var keys = Object.keys(obj);\n for (i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n obj[key] = exports.compact(obj[key], refs);\n }\n\n return obj;\n};\n\n\nexports.isRegExp = function (obj) {\n\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\n\nexports.isBuffer = function (obj) {\n\n if (obj === null ||\n typeof obj === 'undefined') {\n\n return false;\n }\n\n return !!(obj.constructor &&\n obj.constructor.isBuffer &&\n obj.constructor.isBuffer(obj));\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/utils.js\n **/","/* eslint no-void: 0 */\nconst toString = Object.prototype.toString;\nconst OBJECT = \"[object Object]\";\nconst ARRAY = \"[object Array]\";\n\nexport function mergePair(a, b) {\n if (a === (void 0)) { return b; }\n if (b === (void 0)) { return a; }\n\n const aType = toString.call(a);\n const bType = toString.call(b);\n if (aType === ARRAY) {\n return a.concat(b);\n }\n if (bType === ARRAY) {\n return [a].concat(b);\n }\n if (aType !== OBJECT || bType !== OBJECT) {\n return b;\n }\n return Object.keys(b).reduce((memo, key)=> {\n memo[key] = mergePair(a[key], b[key]);\n return memo;\n }, a);\n}\n\nexport default function(...args) {\n return args.length ? args.reduce(mergePair) : null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/merge.js\n **/","module.exports = __webpack_amd_options__;\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/amd-options.js\n ** module id = 4\n ** module chunks = 0\n **/","module.exports = fastApply;\r\n\r\nfunction fastApply(fn, context, args) {\r\n \r\n switch (args ? args.length : 0) {\r\n case 0:\r\n return context ? fn.call(context) : fn();\r\n case 1:\r\n return context ? fn.call(context, args[0]) : fn(args[0]);\r\n case 2:\r\n return context ? fn.call(context, args[0], args[1]) : fn(args[0], args[1]);\r\n case 3:\r\n return context ? fn.call(context, args[0], args[1], args[2]) : fn(args[0], args[1], args[2]);\r\n case 4:\r\n return context ? fn.call(context, args[0], args[1], args[2], args[3]) : fn(args[0], args[1], args[2], args[3]);\r\n case 5:\r\n return context ? fn.call(context, args[0], args[1], args[2], args[3], args[4]) : fn(args[0], args[1], args[2], args[3], args[4]);\r\n default:\r\n return fn.apply(context, args);\r\n }\r\n \r\n}\n\n\n/** WEBPACK FOOTER **\n ** ./~/fast-apply/index.js\n **/","// Load modules\n\nvar Stringify = require('./stringify');\nvar Parse = require('./parse');\n\n\n// Declare internals\n\nvar internals = {};\n\n\nmodule.exports = {\n stringify: Stringify,\n parse: Parse\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/index.js\n **/","// Load modules\n\nvar Utils = require('./utils');\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n depth: 5,\n arrayLimit: 20,\n parameterLimit: 1000,\n strictNullHandling: false,\n plainObjects: false,\n allowPrototypes: false,\n allowDots: false\n};\n\n\ninternals.parseValues = function (str, options) {\n\n var obj = {};\n var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);\n\n for (var i = 0, il = parts.length; i < il; ++i) {\n var part = parts[i];\n var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;\n\n if (pos === -1) {\n obj[Utils.decode(part)] = '';\n\n if (options.strictNullHandling) {\n obj[Utils.decode(part)] = null;\n }\n }\n else {\n var key = Utils.decode(part.slice(0, pos));\n var val = Utils.decode(part.slice(pos + 1));\n\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n }\n else {\n obj[key] = [].concat(obj[key]).concat(val);\n }\n }\n }\n\n return obj;\n};\n\n\ninternals.parseObject = function (chain, val, options) {\n\n if (!chain.length) {\n return val;\n }\n\n var root = chain.shift();\n\n var obj;\n if (root === '[]') {\n obj = [];\n obj = obj.concat(internals.parseObject(chain, val, options));\n }\n else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;\n var index = parseInt(cleanRoot, 10);\n var indexString = '' + index;\n if (!isNaN(index) &&\n root !== cleanRoot &&\n indexString === cleanRoot &&\n index >= 0 &&\n (options.parseArrays &&\n index <= options.arrayLimit)) {\n\n obj = [];\n obj[index] = internals.parseObject(chain, val, options);\n }\n else {\n obj[cleanRoot] = internals.parseObject(chain, val, options);\n }\n }\n\n return obj;\n};\n\n\ninternals.parseKeys = function (key, val, options) {\n\n if (!key) {\n return;\n }\n\n // Transform dot notation to bracket notation\n\n if (options.allowDots) {\n key = key.replace(/\\.([^\\.\\[]+)/g, '[$1]');\n }\n\n // The regex chunks\n\n var parent = /^([^\\[\\]]*)/;\n var child = /(\\[[^\\[\\]]*\\])/g;\n\n // Get the parent\n\n var segment = parent.exec(key);\n\n // Stash the parent if it exists\n\n var keys = [];\n if (segment[1]) {\n // If we aren't using plain objects, optionally prefix keys\n // that would overwrite object prototype properties\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1])) {\n\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(segment[1]);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while ((segment = child.exec(key)) !== null && i < options.depth) {\n\n ++i;\n if (!options.plainObjects &&\n Object.prototype.hasOwnProperty(segment[1].replace(/\\[|\\]/g, ''))) {\n\n if (!options.allowPrototypes) {\n continue;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return internals.parseObject(keys, val, options);\n};\n\n\nmodule.exports = function (str, options) {\n\n options = options || {};\n options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;\n options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;\n options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;\n options.parseArrays = options.parseArrays !== false;\n options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : internals.allowDots;\n options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : internals.plainObjects;\n options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : internals.allowPrototypes;\n options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;\n options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n\n if (str === '' ||\n str === null ||\n typeof str === 'undefined') {\n\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? internals.parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0, il = keys.length; i < il; ++i) {\n var key = keys[i];\n var newObj = internals.parseKeys(key, tempObj[key], options);\n obj = Utils.merge(obj, newObj, options);\n }\n\n return Utils.compact(obj);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/parse.js\n **/","// Load modules\n\nvar Utils = require('./utils');\n\n\n// Declare internals\n\nvar internals = {\n delimiter: '&',\n arrayPrefixGenerators: {\n brackets: function (prefix, key) {\n\n return prefix + '[]';\n },\n indices: function (prefix, key) {\n\n return prefix + '[' + key + ']';\n },\n repeat: function (prefix, key) {\n\n return prefix;\n }\n },\n strictNullHandling: false,\n skipNulls: false,\n encode: true\n};\n\n\ninternals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) {\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n }\n else if (Utils.isBuffer(obj)) {\n obj = obj.toString();\n }\n else if (obj instanceof Date) {\n obj = obj.toISOString();\n }\n else if (obj === null) {\n if (strictNullHandling) {\n return encode ? Utils.encode(prefix) : prefix;\n }\n\n obj = '';\n }\n\n if (typeof obj === 'string' ||\n typeof obj === 'number' ||\n typeof obj === 'boolean') {\n\n if (encode) {\n return [Utils.encode(prefix) + '=' + Utils.encode(obj)];\n }\n return [prefix + '=' + obj];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (Array.isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n if (Array.isArray(obj)) {\n values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n else {\n values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));\n }\n }\n\n return values;\n};\n\n\nmodule.exports = function (obj, options) {\n\n options = options || {};\n var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;\n var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;\n var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;\n var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;\n var sort = typeof options.sort === 'function' ? options.sort : null;\n var objKeys;\n var filter;\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n }\n else if (Array.isArray(options.filter)) {\n objKeys = filter = options.filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' ||\n obj === null) {\n\n return '';\n }\n\n var arrayFormat;\n if (options.arrayFormat in internals.arrayPrefixGenerators) {\n arrayFormat = options.arrayFormat;\n }\n else if ('indices' in options) {\n arrayFormat = options.indices ? 'indices' : 'repeat';\n }\n else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (sort) {\n objKeys.sort(sort);\n }\n\n for (var i = 0, il = objKeys.length; i < il; ++i) {\n var key = objKeys[i];\n\n if (skipNulls &&\n obj[key] === null) {\n\n continue;\n }\n\n keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort));\n }\n\n return keys.join(delimiter);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/qs/lib/stringify.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\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/** WEBPACK FOOTER **\n ** ./~/querystring/decode.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\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/** WEBPACK FOOTER **\n ** ./~/querystring/encode.js\n **/","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/querystring/index.js\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 \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 state to ,\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 \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/** WEBPACK FOOTER **\n ** ./~/url/~/punycode/punycode.js\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/** WEBPACK FOOTER **\n ** (webpack)/buildin/module.js\n **/","\"use strict\";\n\nexport default class PubSub {\n constructor() {\n this.container = [];\n }\n push(cb) {\n (cb instanceof Function) && this.container.push(cb);\n }\n resolve(data) {\n this.container.forEach((cb)=> cb(null, data));\n this.container = [];\n }\n reject(err) {\n this.container.forEach((cb)=> cb(err));\n this.container = [];\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/PubSub.js\n **/","\"use strict\";\n\nimport fastApply from \"fast-apply\";\nimport libUrl from \"url\";\nimport urlTransform from \"./urlTransform\";\nimport merge from \"./utils/merge\";\nimport fetchResolver from \"./fetchResolver\";\nimport PubSub from \"./PubSub\";\nimport createHolder from \"./createHolder\";\n\nfunction none() {}\n\nfunction extractArgs(args) {\n let pathvars;\n let params={};\n let callback;\n if (args[0] instanceof Function) {\n callback = args[0];\n } else if (args[1] instanceof Function) {\n pathvars = args[0];\n callback = args[1];\n } else {\n pathvars = args[0];\n params = args[1];\n callback = args[2] || none;\n }\n return [pathvars, params, callback];\n}\n\nfunction helperCrudFunction(name) {\n return (...args)=> {\n const [pathvars, params, cb] = extractArgs(args);\n return [pathvars, { ...params, method: name.toUpperCase() }, cb];\n };\n}\n\nfunction defaultMiddlewareArgsParser(dispatch, getState) {\n return { dispatch, getState };\n}\n\nexport const CRUD = [\"get\", \"post\", \"put\", \"delete\", \"patch\"].reduce(\n (memo, name)=> {\n memo[name] = helperCrudFunction(name);\n return memo;\n }, {});\n\n/**\n * Constructor for create action\n * @param {String} url endpoint's url\n * @param {String} name action name\n * @param {Object} options action configuration\n * @param {Object} ACTIONS map of actions\n * @param {[type]} fetchAdapter adapter for fetching data\n * @return {Function+Object} action function object\n */\nexport default function actionFn(url, name, options, ACTIONS={}, meta={}) {\n const { actionFetch, actionSuccess, actionFail, actionReset } = ACTIONS;\n const pubsub = new PubSub();\n const requestHolder = createHolder();\n const responseHandler = meta && meta.holder && meta.holder.responseHandler;\n /**\n * Fetch data from server\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} getState helper meta function\n */\n const request = (pathvars, params, getState=none)=> {\n const resultUrlT = urlTransform(url, pathvars, meta.urlOptions);\n const rootUrl = meta.holder ? meta.holder.rootUrl : null;\n let urlT = resultUrlT;\n if (rootUrl) {\n const urlObject = libUrl.parse(urlT);\n if (!urlObject.host) {\n const urlPath = (rootUrl.path ? rootUrl.path.replace(/\\/$/, \"\") : \"\") +\n \"/\" + (urlObject.path ? urlObject.path.replace(/^\\//, \"\") : \"\");\n urlT = `${rootUrl.protocol}//${rootUrl.host}${urlPath}`;\n }\n }\n const globalOptions = !meta.holder ? {} :\n (meta.holder.options instanceof Function) ?\n meta.holder.options(urlT, params, getState) : (meta.holder.options);\n const baseOptions = (options instanceof Function) ?\n options(urlT, params, getState) :\n options;\n const opts = merge({}, globalOptions, baseOptions, params);\n const response = meta.fetch(urlT, opts);\n const result = !meta.validation ? response : response.then(\n (data)=> new Promise(\n (resolve, reject)=> meta.validation(data,\n (err)=> err ? reject(err) : resolve(data))));\n if (responseHandler) {\n if (result && result.then) {\n result.then(\n (data)=> responseHandler(null, data),\n (err)=> responseHandler(err)\n );\n } else {\n responseHandler(result);\n }\n }\n result && result.catch && result.catch(none);\n return result;\n };\n\n /**\n * Fetch data from server\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} callback) callback execute after end request\n */\n function fn(...args) {\n const [pathvars, params, callback] = extractArgs(args);\n const syncing = params ? !!params.syncing : false;\n params && delete params.syncing;\n pubsub.push(callback);\n return (...middlewareArgs)=> {\n const middlewareParser = (meta.holder && meta.holder.middlewareParser) ||\n defaultMiddlewareArgsParser;\n const { dispatch, getState } = middlewareParser(...middlewareArgs);\n const { reducerName } = meta;\n const state = getState();\n const store = state[reducerName];\n const requestOptions = { pathvars, params };\n if (store && store.loading) {\n return;\n }\n const prevData = state && state[reducerName] && state[reducerName].data;\n dispatch({ type: actionFetch, syncing, request: requestOptions });\n const fetchResolverOpts = {\n dispatch,\n getState,\n actions: meta.actions,\n prefetch: meta.prefetch\n };\n const result = new Promise((done, fail)=> {\n fetchResolver(0, fetchResolverOpts, (err)=> {\n if (err) {\n pubsub.reject(err);\n return fail(err);\n }\n new Promise((resolve, reject)=> {\n requestHolder.set({\n resolve,\n reject,\n promise: request(pathvars, params, getState).then(resolve, reject)\n });\n }).then((d)=> {\n requestHolder.pop();\n const data = meta.transformer(d, prevData, {\n type: actionSuccess, request: requestOptions\n });\n dispatch({\n data,\n origData: d,\n type: actionSuccess,\n syncing: false,\n request: requestOptions\n });\n if (meta.broadcast) {\n meta.broadcast.forEach((type)=> {\n dispatch({ type, data, origData: d, request: requestOptions });\n });\n }\n if (meta.postfetch) {\n meta.postfetch.forEach((postfetch)=> {\n (postfetch instanceof Function) && postfetch({\n data, getState, dispatch, actions: meta.actions, request: requestOptions\n });\n });\n }\n pubsub.resolve(data);\n done(data);\n }, (error)=> {\n dispatch({ type: actionFail, syncing: false, error, request: requestOptions });\n pubsub.reject(error);\n fail(error);\n });\n });\n });\n result.catch(none);\n return result;\n };\n }\n\n /*\n Pure rest request\n */\n fn.request = request;\n\n /**\n * Reset store to initial state\n */\n fn.reset = (mutation)=> {\n const defer = requestHolder.pop();\n defer && defer.reject(new Error(\"Application abort request\"));\n return mutation === \"sync\" ? { type: actionReset, mutation } : { type: actionReset };\n };\n\n /**\n * Sync store with server. In server mode works as usual method.\n * If data have already synced, data would not fetch after call this method.\n * @param {Object} pathvars path vars for url\n * @param {Object} params fetch params\n * @param {Function} callback) callback execute after end request\n */\n fn.sync = (...args)=> {\n const [pathvars, params, callback] = extractArgs(args);\n const isServer = meta.holder ? meta.holder.server : false;\n return (dispatch, getState)=> {\n const state = getState();\n const store = state[name];\n if (!isServer && store && store.sync) {\n callback(null, store.data);\n return;\n }\n const modifyParams = { ...params, syncing: true };\n return fn(pathvars, modifyParams, callback)(dispatch, getState);\n };\n };\n\n let helpers = meta.helpers || {};\n if (meta.crud) {\n helpers = { ...CRUD, ...helpers };\n }\n const fnHelperCallback = (memo, func, helpername)=> {\n if (memo[helpername]) {\n throw new Error(\n `Helper name: \"${helpername}\" for endpoint \"${name}\" has been already reserved`\n );\n }\n const { sync, call } = (func instanceof Function) ? { call: func } : func;\n memo[helpername] = (...args)=> (dispatch, getState)=> {\n const index = args.length - 1;\n const callbackFn = (args[index] instanceof Function) ? args[index] : none;\n const helpersResult = fastApply(call, { getState, dispatch, actions: meta.actions }, args);\n const result = new Promise((resolve, reject)=> {\n const callback = (err, data)=> {\n err ? reject(err) : resolve(data);\n callbackFn(err, data);\n };\n // If helper alias using async functionality\n if (helpersResult instanceof Function) {\n helpersResult((error, newArgs=[])=> {\n if (error) {\n callback(error);\n } else {\n fastApply(\n sync ? fn.sync : fn, null, newArgs.concat(callback)\n )(dispatch, getState);\n }\n });\n } else {\n // if helper alias is synchronous\n fastApply(\n sync ? fn.sync : fn, null, helpersResult.concat(callback)\n )(dispatch, getState);\n }\n });\n result.catch(none);\n return result;\n };\n return memo;\n };\n\n return Object.keys(helpers).reduce(\n (memo, key)=> fnHelperCallback(memo, helpers[key], key, helpers), fn);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/actionFn.js\n **/","/**\n *\n * @param {[type]} dispatch [description]\n * @param {...[type]} args [description]\n * @return {[type]} [description]\n * @example\n * async(dispatch,\n * (cb)=> actions.test(1, cb),\n * actions.test2\n * ).then(()=> async(dispatch, actions.test3))\n */\nexport default function async(dispatch, ...args) {\n const fn = args[0];\n const nextArgs = args.slice(1);\n return new Promise(\n (resolve, reject)=> {\n if (!fn) {\n reject(\"no chain function\");\n } else {\n dispatch(fn((err, data)=> {\n err ? reject(err) : resolve(data);\n }) || {});\n }\n })\n .then((data)=> {\n if (nextArgs.length) {\n return async(dispatch, ...nextArgs);\n } else {\n return data;\n }\n });\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/async.js\n **/","\"use strict\";\n\nexport default function() {\n let data;\n let hasData = false;\n return {\n set(val) {\n if (!hasData) {\n data = val;\n hasData = true;\n return true;\n }\n return false;\n },\n empty() {\n return !hasData;\n },\n pop() {\n if (hasData) {\n hasData = false;\n const result = data;\n data = null;\n return result;\n }\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/createHolder.js\n **/","\"use strict\";\n\nfunction none() {}\n\nexport default function fetchResolver(index=0, opts={}, cb=none) {\n if (!opts.prefetch || index >= opts.prefetch.length) {\n cb();\n } else {\n opts.prefetch[index](opts,\n (err)=> err ? cb(err) : fetchResolver(index + 1, opts, cb));\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/fetchResolver.js\n **/","\"use strict\";\n/* eslint no-case-declarations: 0 */\n/**\n * Reducer contructor\n * @param {Object} initialState default initial state\n * @param {Object} actions actions map\n * @param {Function} transformer transformer function\n * @param {Function} reducer custom reducer function\n * @return {Function} reducer function\n */\nexport default function reducerFn(initialState, actions={}, reducer) {\n const { actionFetch, actionSuccess, actionFail, actionReset } = actions;\n return (state=initialState, action)=> {\n switch (action.type) {\n case actionFetch:\n return {\n ...state,\n loading: true,\n error: null,\n syncing: !!action.syncing\n };\n case actionSuccess:\n return {\n ...state,\n loading: false,\n sync: true,\n syncing: false,\n error: null,\n data: action.data\n };\n case actionFail:\n return {\n ...state,\n loading: false,\n error: action.error,\n syncing: false\n };\n case actionReset:\n const { mutation } = action;\n return (mutation === \"sync\") ?\n { ...state, sync: false } :\n { ...initialState };\n default:\n return reducer ? reducer(state, action) : state;\n }\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/reducerFn.js\n **/","\"use strict\";\n\nconst toString = Object.prototype.toString;\nconst OBJECT = \"[object Object]\";\n\n/**\n * Default responce transformens\n */\nexport default {\n array(data) {\n return !data ? [] : Array.isArray(data) ? data : [data];\n },\n object(data) {\n if (!data) {\n return {};\n }\n return toString.call(data) === OBJECT ? data : { data };\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/transformers.js\n **/","\"use strict\";\nimport qs from \"qs\";\nimport { parse } from \"url\";\nimport omit from \"./utils/omit\";\nimport merge from \"./utils/merge\";\n\nconst rxClean = /(\\(:[^\\)]+\\)|:[^\\/]+)/g;\n\n/**\n * Url modification\n * @param {String} url url template\n * @param {Object} params params for url template\n * @param {Object} options transformation options, accepts +delimiter+, +arrayFormat+,\n * +qsStringifyOptions+ and +qsParseOptions+\n * @return {String} result url\n */\nexport default function urlTransform(url, params, options) {\n if (!url) { return \"\"; }\n params || (params = {});\n const usedKeys = {};\n\n const urlWithParams = Object.keys(params).reduce((url, key)=> {\n const value = params[key];\n const rx = new RegExp(`(\\\\(:${key}\\\\)|:${key})`, \"g\");\n return url.replace(rx, ()=> {\n usedKeys[key] = value;\n return value;\n });\n }, url);\n\n\n if (!urlWithParams) { return urlWithParams; }\n const { protocol, host, path } = parse(urlWithParams);\n const cleanURL = (host) ?\n `${protocol}//${host}${path.replace(rxClean, \"\")}` :\n path.replace(rxClean, \"\");\n const usedKeysArray = Object.keys(usedKeys);\n if (usedKeysArray.length !== Object.keys(params).length) {\n const urlObject = cleanURL.split(\"?\");\n options || (options = {});\n const { arrayFormat, delimiter } = options;\n const qsParseOptions = {\n arrayFormat,\n delimiter,\n ...options.qsParseOptions\n };\n const mergeParams = merge(\n (urlObject[1] && qs.parse(urlObject[1], qsParseOptions)),\n omit(params, usedKeysArray)\n );\n const qsStringifyOptions = {\n arrayFormat,\n delimiter,\n ...options.qsStringifyOptions\n };\n const urlStringParams = qs.stringify(mergeParams, qsStringifyOptions);\n return `${urlObject[0]}?${urlStringParams}`;\n }\n return cleanURL;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/urlTransform.js\n **/","export default function(object, props) {\n if (!Array.isArray(props)) {\n return { ...object };\n }\n\n return Object.keys(object || {}).reduce((memo, key)=> {\n if (props.indexOf(key) === -1) {\n memo[key] = object[key];\n }\n return memo;\n }, {});\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils/omit.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/DOCS.md b/docs/DOCS.md index 64eef25..e94c16c 100644 --- a/docs/DOCS.md +++ b/docs/DOCS.md @@ -433,12 +433,22 @@ const cutsomThunkMiddleware = ({ dispatch, getState }) => next => action => { }; // middlewareParser -reduxApi({ ... }).use("middlewareParser", +reduxApi({ ... }).use("middlewareParser", ({ dispatch, getState })=> { return { getState, dispatch }; }); ``` +####responseHandler +- @description - catch all http response from each redux-api endpoint. First argument is Error is response fail, second argument data from success response. +- @example +- +```js +reduxApi({ ... }).use("responseHandler", + (err, data)=> + err ? console.log("ERROR", err) : console.log("SUCCESS", data)); +``` + ####init(adapter, isServer, rootUrl) - @deprecated - @description: `reduxApi` initializer returns non initialized object. You need to call `init` for initialize it. diff --git a/examples/isomorphic/app/routes/routes.js b/examples/isomorphic/app/routes/routes.js index bbc0a9f..7a12c65 100644 --- a/examples/isomorphic/app/routes/routes.js +++ b/examples/isomorphic/app/routes/routes.js @@ -1,8 +1,8 @@ import Application from "../pages/Application"; import User from "../pages/User"; import Repo from "../pages/Repo"; - import rest from "../utils/rest"; + const { actions } = rest; export default function routes({ dispatch }) { diff --git a/examples/isomorphic/package.json b/examples/isomorphic/package.json index 9f7a675..9bf600c 100644 --- a/examples/isomorphic/package.json +++ b/examples/isomorphic/package.json @@ -25,10 +25,10 @@ "react-router": "^1.0.2", "redux": "^3.0.5", "redux-api": "^0.9.3", - "redux-thunk": "^1.0.2" + "redux-thunk": "^1.0.2", + "babel-core": "^6.3.21" }, "devDependencies": { - "babel-core": "^6.3.21", "babel-loader": "^6.2.0", "babel-plugin-add-module-exports": "^0.1.2", "babel-preset-es2015": "^6.3.13", diff --git a/package.json b/package.json index a9dd36f..2f74601 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-api", - "version": "0.9.9", + "version": "0.9.10", "author": { "name": "Efremov Alex", "email": "lexich121@gmail.com", @@ -31,32 +31,32 @@ }, "devDependencies": { "babel": "6.5.2", - "babel-cli": "6.10.1", - "babel-core": "6.10.4", + "babel-cli": "6.14.0", + "babel-core": "6.14.0", "babel-eslint": "6.1.2", - "babel-loader": "6.2.4", + "babel-loader": "6.2.5", "babel-plugin-add-module-exports": "0.2.1", - "babel-preset-es2015": "6.9.0", + "babel-preset-es2015": "6.14.0", "babel-preset-stage-0": "6.5.0", "chai": "3.5.0", - "coveralls": "2.11.9", + "coveralls": "2.11.12", "cross-env": "^2.0.0", - "eslint": "2.10.2", - "eslint-config-airbnb": "9.0.1", - "eslint-plugin-import": "1.10.2", - "eslint-plugin-jsx-a11y": "1.5.5", - "eslint-plugin-react": "5.2.2", - "husky": "0.11.4", + "eslint": "3.4.0", + "eslint-config-airbnb": "10.0.1", + "eslint-plugin-import": "1.14.0", + "eslint-plugin-jsx-a11y": "2.2.1", + "eslint-plugin-react": "6.2.0", + "husky": "0.11.7", "isparta": "4.0.0", - "lodash": "4.13.1", - "mocha": "2.5.3", + "lodash": "4.15.0", + "mocha": "3.0.2", "mocha-lcov-reporter": "1.2.0", "redux": "3.5.2", "redux-thunk": "2.1.0", - "webpack": "1.13.1", - "yaspeller": "^2.9.0" + "webpack": "1.13.2", + "yaspeller": "2.9.1" }, "engines": { - "node": ">=0.12.0" + "node": ">=4.0.0" } } diff --git a/src/actionFn.js b/src/actionFn.js index a58ba93..d3cf72e 100644 --- a/src/actionFn.js +++ b/src/actionFn.js @@ -1,12 +1,12 @@ "use strict"; +import fastApply from "fast-apply"; +import libUrl from "url"; import urlTransform from "./urlTransform"; import merge from "./utils/merge"; import fetchResolver from "./fetchResolver"; import PubSub from "./PubSub"; import createHolder from "./createHolder"; -import fastApply from "fast-apply"; -import libUrl from "url"; function none() {} @@ -57,6 +57,7 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { const { actionFetch, actionSuccess, actionFail, actionReset } = ACTIONS; const pubsub = new PubSub(); const requestHolder = createHolder(); + const responseHandler = meta && meta.holder && meta.holder.responseHandler; /** * Fetch data from server * @param {Object} pathvars path vars for url @@ -83,10 +84,22 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { options; const opts = merge({}, globalOptions, baseOptions, params); const response = meta.fetch(urlT, opts); - return !meta.validation ? response : response.then( + const result = !meta.validation ? response : response.then( (data)=> new Promise( (resolve, reject)=> meta.validation(data, (err)=> err ? reject(err) : resolve(data)))); + if (responseHandler) { + if (result && result.then) { + result.then( + (data)=> responseHandler(null, data), + (err)=> responseHandler(err) + ); + } else { + responseHandler(result); + } + } + result && result.catch && result.catch(none); + return result; }; /** @@ -95,7 +108,7 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { * @param {Object} params fetch params * @param {Function} callback) callback execute after end request */ - const fn = (...args)=> { + function fn(...args) { const [pathvars, params, callback] = extractArgs(args); const syncing = params ? !!params.syncing : false; params && delete params.syncing; @@ -114,11 +127,12 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { const prevData = state && state[reducerName] && state[reducerName].data; dispatch({ type: actionFetch, syncing, request: requestOptions }); const fetchResolverOpts = { - dispatch, getState, + dispatch, + getState, actions: meta.actions, prefetch: meta.prefetch }; - return new Promise((done, fail)=> { + const result = new Promise((done, fail)=> { fetchResolver(0, fetchResolverOpts, (err)=> { if (err) { pubsub.reject(err); @@ -126,7 +140,8 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { } new Promise((resolve, reject)=> { requestHolder.set({ - resolve, reject, + resolve, + reject, promise: request(pathvars, params, getState).then(resolve, reject) }); }).then((d)=> { @@ -135,7 +150,8 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { type: actionSuccess, request: requestOptions }); dispatch({ - data, origData: d, + data, + origData: d, type: actionSuccess, syncing: false, request: requestOptions @@ -161,8 +177,10 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { }); }); }); + result.catch(none); + return result; }; - }; + } /* Pure rest request @@ -215,7 +233,7 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { const index = args.length - 1; const callbackFn = (args[index] instanceof Function) ? args[index] : none; const helpersResult = fastApply(call, { getState, dispatch, actions: meta.actions }, args); - return new Promise((resolve, reject)=> { + const result = new Promise((resolve, reject)=> { const callback = (err, data)=> { err ? reject(err) : resolve(data); callbackFn(err, data); @@ -238,6 +256,8 @@ export default function actionFn(url, name, options, ACTIONS={}, meta={}) { )(dispatch, getState); } }); + result.catch(none); + return result; }; return memo; }; diff --git a/src/adapters/fetch.js b/src/adapters/fetch.js index 5729b85..06baa15 100644 --- a/src/adapters/fetch.js +++ b/src/adapters/fetch.js @@ -1,8 +1,25 @@ "use strict"; +function toJSON(resp) { + return resp.text().then((data)=> { + try { + return JSON.parse(data); + } catch (err) { + return data; + } + }); +} + export default function (fetch) { return function (url, opts) { - return fetch(url, opts).then( - (resp)=> resp.status !== 204 ? resp.json() : {}); + return fetch(url, opts).then((resp)=> toJSON(resp) + .then((data)=> { + if (resp.status >= 200 && resp.status < 300) { + return data; + } else { + return Promise.reject(data); + } + }) + ); }; } diff --git a/src/index.js b/src/index.js index f8085bc..5273e3d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,5 @@ "use strict"; +/* eslint no-void: 0 */ import libUrl from "url"; import reducerFn from "./reducerFn"; @@ -60,7 +61,8 @@ export default function reduxApi(config) { server: false, rootUrl: null, middlewareParser: null, - options: {} + options: {}, + responseHandler: null }; const cfg = { @@ -85,7 +87,7 @@ export default function reduxApi(config) { reducers: {}, events: {} }; - const fnConfigCallback = (memo, value, key)=> { + function fnConfigCallback(memo, value, key) { const opts = typeof value === "object" ? { ...defaultEndpointConfig, reducerName: key, ...value } : { ...defaultEndpointConfig, reducerName: key, url: value }; @@ -118,8 +120,12 @@ export default function reduxApi(config) { virtual: !!opts.virtual, reducerName, actions: memo.actions, - prefetch, postfetch, validation, - helpers, transformer, crud + prefetch, + postfetch, + validation, + helpers, + transformer, + crud }; memo.actions[key] = actionFn(url, key, options, ACTIONS, meta); @@ -136,7 +142,7 @@ export default function reduxApi(config) { } memo.events[reducerName] = ACTIONS; return memo; - }; + } return Object.keys(config).reduce( (memo, key)=> fnConfigCallback(memo, config[key], key, config), cfg); diff --git a/src/urlTransform.js b/src/urlTransform.js index 6287569..1560bde 100644 --- a/src/urlTransform.js +++ b/src/urlTransform.js @@ -1,8 +1,8 @@ "use strict"; -import omit from "./utils/omit"; -import merge from "./utils/merge"; import qs from "qs"; import { parse } from "url"; +import omit from "./utils/omit"; +import merge from "./utils/merge"; const rxClean = /(\(:[^\)]+\)|:[^\/]+)/g; diff --git a/src/utils/merge.js b/src/utils/merge.js index 4815397..0aef4a7 100644 --- a/src/utils/merge.js +++ b/src/utils/merge.js @@ -1,3 +1,4 @@ +/* eslint no-void: 0 */ const toString = Object.prototype.toString; const OBJECT = "[object Object]"; const ARRAY = "[object Array]"; diff --git a/test/PubSub_spec.js b/test/PubSub_spec.js index ece604f..a9cef55 100644 --- a/test/PubSub_spec.js +++ b/test/PubSub_spec.js @@ -1,6 +1,6 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import { expect } from "chai"; import PubSub from "../src/PubSub"; diff --git a/test/actionFn_spec.js b/test/actionFn_spec.js index 5d48ba4..0d81ff9 100644 --- a/test/actionFn_spec.js +++ b/test/actionFn_spec.js @@ -1,9 +1,9 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}], no-void: 0 */ import { expect } from "chai"; -import actionFn from "../src/actionFn"; import isFunction from "lodash/isFunction"; +import actionFn from "../src/actionFn"; function fetchSuccess() { return new Promise(function(resolve) { @@ -17,9 +17,11 @@ function getState() { }; } +const ERROR = new Error("Error"); + function fetchFail() { return new Promise(function(resolve, reject) { - reject("Error"); + reject(ERROR); }); } @@ -84,13 +86,11 @@ describe("actionFn", function() { }); it("check request method", function() { - let executeCounter = 0; let urlFetch; let paramsFetch; const api = actionFn("/test/:id", "test", null, ACTIONS, { transformer, fetch: (url, params)=> { - executeCounter++; urlFetch = url; paramsFetch = params; return fetchSuccess(); @@ -159,7 +159,7 @@ describe("actionFn", function() { request: { pathvars: undefined, params: {} } }, { type: ACTIONS.actionFail, - error: "Error", + error: ERROR, syncing: false, request: { pathvars: undefined, params: {} } }]; @@ -532,7 +532,8 @@ describe("actionFn", function() { it("check crud option", function() { const meta = { - transformer, crud: true, + transformer, + crud: true, fetch(url, opts) { return new Promise((resolve)=> resolve({ url, opts })); } @@ -687,7 +688,8 @@ describe("actionFn", function() { it("check crud option with overwrite", function() { const meta = { - transformer, crud: true, + transformer, + crud: true, fetch(url, opts) { return new Promise((resolve)=> resolve({ url, opts })); }, @@ -759,4 +761,44 @@ describe("actionFn", function() { expect(urlFetch).to.eql("/test?id=1,id=2"); }); }); + + it("check responseHandler success", function() { + const resp = []; + const api = actionFn("/test", "test", null, ACTIONS, { + transformer, + fetch() { + return fetchSuccess(); + }, + holder: { + responseHandler(err, data) { + resp.push({ err, data }); + } + } + }); + return api.request().then(()=> { + expect(resp).to.eql([ + { err: null, data: { msg: "hello" } } + ]); + }); + }); + + it("check responseHandler error", function() { + const resp = []; + const api = actionFn("/test", "test", null, ACTIONS, { + transformer, + fetch() { + return fetchFail(); + }, + holder: { + responseHandler(err, data) { + resp.push({ err, data }); + } + } + }); + return api.request().then(null, ()=> { + expect(resp).to.have.length(1); + expect(resp[0].data).to.not.exist; + expect(resp[0].err).to.be.an.instanceof(Error); + }); + }); }); diff --git a/test/adapters_fetch_spec.js b/test/adapters_fetch_spec.js index 1d2b901..7b869b9 100644 --- a/test/adapters_fetch_spec.js +++ b/test/adapters_fetch_spec.js @@ -1,6 +1,6 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import { expect } from "chai"; import fetch from "../src/adapters/fetch"; diff --git a/test/createHolder_spec.js b/test/createHolder_spec.js index 6ad802b..c3dd50f 100644 --- a/test/createHolder_spec.js +++ b/test/createHolder_spec.js @@ -1,6 +1,6 @@ "use strict"; /* global describe, it, beforeEach */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import { expect } from "chai"; import createHolder from "../src/createHolder"; diff --git a/test/fetchResolver_spec.js b/test/fetchResolver_spec.js index 21b2dfd..25191cd 100644 --- a/test/fetchResolver_spec.js +++ b/test/fetchResolver_spec.js @@ -1,9 +1,9 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import { expect } from "chai"; -import fetchResolver from "../src/fetchResolver"; import isFunction from "lodash/isFunction"; +import fetchResolver from "../src/fetchResolver"; describe("fetchResolver", function() { it("check import", function() { diff --git a/test/index_spec.js b/test/index_spec.js index 8ee85fc..294c83d 100644 --- a/test/index_spec.js +++ b/test/index_spec.js @@ -1,11 +1,11 @@ "use strict"; /* global describe, it, xit */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import { expect } from "chai"; -import reduxApi from "../src/index.js"; -import transformers from "../src/transformers.js"; import isFunction from "lodash/isFunction"; import size from "lodash/size"; +import reduxApi from "../src/index.js"; +import transformers from "../src/transformers.js"; function getState() { return { test: { loading: false, data: {} } }; diff --git a/test/merge_spec.js b/test/merge_spec.js index f3519bf..9f8d1d7 100644 --- a/test/merge_spec.js +++ b/test/merge_spec.js @@ -1,6 +1,6 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}], no-void: 0 */ import { expect } from "chai"; import merge from "../src/utils/merge"; diff --git a/test/omit_spec.js b/test/omit_spec.js index e3374d3..a2aba6b 100644 --- a/test/omit_spec.js +++ b/test/omit_spec.js @@ -1,6 +1,6 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import { expect } from "chai"; import omit from "../src/utils/omit"; diff --git a/test/reducerFn_spec.js b/test/reducerFn_spec.js index 6f9875c..94c4648 100644 --- a/test/reducerFn_spec.js +++ b/test/reducerFn_spec.js @@ -1,9 +1,9 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import { expect } from "chai"; -import reducerFn from "../src/reducerFn"; import isFunction from "lodash/isFunction"; +import reducerFn from "../src/reducerFn"; describe("reducerFn", function() { it("check null params", function() { diff --git a/test/redux_spec.js b/test/redux_spec.js index 0e7159b..b7b4774 100644 --- a/test/redux_spec.js +++ b/test/redux_spec.js @@ -1,11 +1,11 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}], no-void: 0 */ import { expect } from "chai"; -import reduxApi, { async } from "../src/index.js"; import { createStore, combineReducers, applyMiddleware } from "redux"; import thunk from "redux-thunk"; import after from "lodash/after"; +import reduxApi, { async } from "../src/index.js"; describe("redux", ()=> { it("check redux", ()=> { @@ -147,7 +147,10 @@ describe("redux", ()=> { setTimeout(()=> { resolve({ url }); expect(store.getState().test).to.eql({ - sync: false, syncing: false, loading: false, data: {}, + sync: false, + syncing: false, + loading: false, + data: {}, error: new Error("Error: Application abort request") }); done(); diff --git a/test/urlTransform_spec.js b/test/urlTransform_spec.js index d4e016b..c647d7a 100644 --- a/test/urlTransform_spec.js +++ b/test/urlTransform_spec.js @@ -1,6 +1,6 @@ "use strict"; /* global describe, it */ - +/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import { expect } from "chai"; import urlTransform from "../src/urlTransform";