UNPKG

730 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory((function webpackLoadOptionalExternalModule() { try { return require("esprima"); } catch(e) {} }()));
4 else if(typeof define === 'function' && define.amd)
5 define(["esprima"], factory);
6 else if(typeof exports === 'object')
7 exports["SwaggerClient"] = factory((function webpackLoadOptionalExternalModule() { try { return require("esprima"); } catch(e) {} }()));
8 else
9 root["SwaggerClient"] = factory(root["esprima"]);
10})(window, function(__WEBPACK_EXTERNAL_MODULE__278__) {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
47/******/ __webpack_require__.d = function(exports, name, getter) {
48/******/ if(!__webpack_require__.o(exports, name)) {
49/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50/******/ }
51/******/ };
52/******/
53/******/ // define __esModule on exports
54/******/ __webpack_require__.r = function(exports) {
55/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57/******/ }
58/******/ Object.defineProperty(exports, '__esModule', { value: true });
59/******/ };
60/******/
61/******/ // create a fake namespace object
62/******/ // mode & 1: value is a module id, require it
63/******/ // mode & 2: merge all properties of value into the ns
64/******/ // mode & 4: return value when already ns object
65/******/ // mode & 8|1: behave like require
66/******/ __webpack_require__.t = function(value, mode) {
67/******/ if(mode & 1) value = __webpack_require__(value);
68/******/ if(mode & 8) return value;
69/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70/******/ var ns = Object.create(null);
71/******/ __webpack_require__.r(ns);
72/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74/******/ return ns;
75/******/ };
76/******/
77/******/ // getDefaultExport function for compatibility with non-harmony modules
78/******/ __webpack_require__.n = function(module) {
79/******/ var getter = module && module.__esModule ?
80/******/ function getDefault() { return module['default']; } :
81/******/ function getModuleExports() { return module; };
82/******/ __webpack_require__.d(getter, 'a', getter);
83/******/ return getter;
84/******/ };
85/******/
86/******/ // Object.prototype.hasOwnProperty.call
87/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88/******/
89/******/ // __webpack_public_path__
90/******/ __webpack_require__.p = "";
91/******/
92/******/
93/******/ // Load entry module and return exports
94/******/ return __webpack_require__(__webpack_require__.s = 185);
95/******/ })
96/************************************************************************/
97/******/ ([
98/* 0 */
99/***/ (function(module, exports, __webpack_require__) {
100
101module.exports = __webpack_require__(229);
102
103/***/ }),
104/* 1 */
105/***/ (function(module, exports, __webpack_require__) {
106
107module.exports = __webpack_require__(203);
108
109/***/ }),
110/* 2 */
111/***/ (function(module, exports, __webpack_require__) {
112
113var _Object$defineProperty = __webpack_require__(85);
114
115var _Object$defineProperties = __webpack_require__(189);
116
117var _Object$getOwnPropertyDescriptors = __webpack_require__(194);
118
119var _Object$getOwnPropertyDescriptor = __webpack_require__(123);
120
121var _Object$getOwnPropertySymbols = __webpack_require__(124);
122
123var _Object$keys = __webpack_require__(1);
124
125var defineProperty = __webpack_require__(116);
126
127function ownKeys(object, enumerableOnly) {
128 var keys = _Object$keys(object);
129
130 if (_Object$getOwnPropertySymbols) {
131 var symbols = _Object$getOwnPropertySymbols(object);
132
133 if (enumerableOnly) symbols = symbols.filter(function (sym) {
134 return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
135 });
136 keys.push.apply(keys, symbols);
137 }
138
139 return keys;
140}
141
142function _objectSpread2(target) {
143 for (var i = 1; i < arguments.length; i++) {
144 var source = arguments[i] != null ? arguments[i] : {};
145
146 if (i % 2) {
147 ownKeys(Object(source), true).forEach(function (key) {
148 defineProperty(target, key, source[key]);
149 });
150 } else if (_Object$getOwnPropertyDescriptors) {
151 _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source));
152 } else {
153 ownKeys(Object(source)).forEach(function (key) {
154 _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key));
155 });
156 }
157 }
158
159 return target;
160}
161
162module.exports = _objectSpread2;
163
164/***/ }),
165/* 3 */
166/***/ (function(module, __webpack_exports__, __webpack_require__) {
167
168"use strict";
169__webpack_require__.r(__webpack_exports__);
170/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
171/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
172/* harmony import */ var _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
173/* harmony import */ var _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);
174/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
175/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__);
176/* harmony import */ var _babel_runtime_corejs2_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(116);
177/* harmony import */ var _babel_runtime_corejs2_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__);
178/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0);
179/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4__);
180/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
181/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5__);
182/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
183/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6__);
184/* harmony import */ var fast_json_patch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48);
185/* harmony import */ var fast_json_patch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(fast_json_patch__WEBPACK_IMPORTED_MODULE_7__);
186/* harmony import */ var deep_extend__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(166);
187/* harmony import */ var deep_extend__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(deep_extend__WEBPACK_IMPORTED_MODULE_8__);
188/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(167);
189/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_9__);
190
191
192
193
194
195
196
197
198
199
200/* harmony default export */ __webpack_exports__["default"] = ({
201 add: add,
202 replace: replace,
203 remove: remove,
204 merge: merge,
205 mergeDeep: mergeDeep,
206 context: context,
207 getIn: getIn,
208 applyPatch: applyPatch,
209 parentPathMatch: parentPathMatch,
210 flatten: flatten,
211 fullyNormalizeArray: fullyNormalizeArray,
212 normalizeArray: normalizeArray,
213 isPromise: isPromise,
214 forEachNew: forEachNew,
215 forEachNewPrimitive: forEachNewPrimitive,
216 isJsonPatch: isJsonPatch,
217 isContextPatch: isContextPatch,
218 isPatch: isPatch,
219 isMutation: isMutation,
220 isAdditiveMutation: isAdditiveMutation,
221 isGenerator: isGenerator,
222 isFunction: isFunction,
223 isObject: isObject,
224 isError: isError
225});
226
227function applyPatch(obj, patch, opts) {
228 opts = opts || {};
229 patch = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6___default()({}, patch), {}, {
230 path: patch.path && normalizeJSONPath(patch.path)
231 });
232
233 if (patch.op === 'merge') {
234 var newValue = getInByJsonPath(obj, patch.path);
235
236 _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5___default()(newValue, patch.value);
237
238 fast_json_patch__WEBPACK_IMPORTED_MODULE_7__["applyPatch"](obj, [replace(patch.path, newValue)]);
239 } else if (patch.op === 'mergeDeep') {
240 var currentValue = getInByJsonPath(obj, patch.path); // Iterate the properties of the patch
241 // eslint-disable-next-line no-restricted-syntax, guard-for-in
242
243 for (var prop in patch.value) {
244 var propVal = patch.value[prop];
245
246 var isArray = _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(propVal);
247
248 if (isArray) {
249 // deepExtend doesn't merge arrays, so we will do it manually
250 var existing = currentValue[prop] || [];
251 currentValue[prop] = existing.concat(propVal);
252 } else if (isObject(propVal) && !isArray) {
253 // If it's an object, iterate it's keys and merge
254 // if there are conflicting keys, merge deep, otherwise shallow merge
255 var currentObj = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6___default()({}, currentValue[prop]); // eslint-disable-next-line no-restricted-syntax
256
257
258 for (var key in propVal) {
259 if (Object.prototype.hasOwnProperty.call(currentObj, key)) {
260 // if there is a single conflicting key, just deepExtend the entire value
261 // and break from the loop (since all future keys are also merged)
262 // We do this because we can't deepExtend two primitives
263 // (currentObj[key] & propVal[key] may be primitives).
264 //
265 // we also deeply assign here, since we aren't in control of
266 // how deepExtend affects existing nested objects
267 currentObj = deep_extend__WEBPACK_IMPORTED_MODULE_8___default()(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_9___default()(currentObj), propVal);
268 break;
269 } else {
270 _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5___default()(currentObj, _babel_runtime_corejs2_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3___default()({}, key, propVal[key]));
271 }
272 }
273
274 currentValue[prop] = currentObj;
275 } else {
276 // It's a primitive, just replace existing
277 currentValue[prop] = propVal;
278 }
279 }
280 } else if (patch.op === 'add' && patch.path === '' && isObject(patch.value)) {
281 // { op: 'add', path: '', value: { a: 1, b: 2 }}
282 // has no effect: json patch refuses to do anything.
283 // so let's break that patch down into a set of patches,
284 // one for each key in the intended root value.
285 var patches = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(patch.value).reduce(function (arr, key) {
286 arr.push({
287 op: 'add',
288 path: "/".concat(normalizeJSONPath(key)),
289 value: patch.value[key]
290 });
291 return arr;
292 }, []);
293
294 fast_json_patch__WEBPACK_IMPORTED_MODULE_7__["applyPatch"](obj, patches);
295 } else if (patch.op === 'replace' && patch.path === '') {
296 var _patch = patch,
297 value = _patch.value;
298
299 if (opts.allowMetaPatches && patch.meta && isAdditiveMutation(patch) && (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(patch.value) || isObject(patch.value))) {
300 value = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6___default()({}, value), patch.meta);
301 }
302
303 obj = value;
304 } else {
305 fast_json_patch__WEBPACK_IMPORTED_MODULE_7__["applyPatch"](obj, [patch]); // Attach metadata to the resulting value.
306
307 if (opts.allowMetaPatches && patch.meta && isAdditiveMutation(patch) && (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(patch.value) || isObject(patch.value))) {
308 var _currentValue = getInByJsonPath(obj, patch.path);
309
310 var _newValue = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_6___default()({}, _currentValue), patch.meta);
311
312 fast_json_patch__WEBPACK_IMPORTED_MODULE_7__["applyPatch"](obj, [replace(patch.path, _newValue)]);
313 }
314 }
315
316 return obj;
317}
318
319function normalizeJSONPath(path) {
320 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(path)) {
321 if (path.length < 1) {
322 return '';
323 }
324
325 return "/".concat(path.map(function (item) {
326 // eslint-disable-line prefer-template
327 return (item + '').replace(/~/g, '~0').replace(/\//g, '~1'); // eslint-disable-line prefer-template
328 }).join('/'));
329 }
330
331 return path;
332} // =========================
333// JSON-Patch Wrappers
334// =========================
335
336
337function add(path, value) {
338 return {
339 op: 'add',
340 path: path,
341 value: value
342 };
343} // function _get(path) {
344// return { op: '_get', path };
345// }
346
347
348function replace(path, value, meta) {
349 return {
350 op: 'replace',
351 path: path,
352 value: value,
353 meta: meta
354 };
355}
356
357function remove(path) {
358 return {
359 op: 'remove',
360 path: path
361 };
362} // Custom wrappers
363
364
365function merge(path, value) {
366 return {
367 type: 'mutation',
368 op: 'merge',
369 path: path,
370 value: value
371 };
372} // Custom wrappers
373
374
375function mergeDeep(path, value) {
376 return {
377 type: 'mutation',
378 op: 'mergeDeep',
379 path: path,
380 value: value
381 };
382}
383
384function context(path, value) {
385 return {
386 type: 'context',
387 path: path,
388 value: value
389 };
390} // =========================
391// Iterators
392// =========================
393
394
395function forEachNew(mutations, fn) {
396 try {
397 return forEachNewPatch(mutations, forEach, fn);
398 } catch (e) {
399 return e;
400 }
401}
402
403function forEachNewPrimitive(mutations, fn) {
404 try {
405 return forEachNewPatch(mutations, forEachPrimitive, fn);
406 } catch (e) {
407 return e;
408 }
409}
410
411function forEachNewPatch(mutations, fn, callback) {
412 var res = mutations.filter(isAdditiveMutation).map(function (mutation) {
413 return fn(mutation.value, callback, mutation.path);
414 }) || [];
415 var flat = flatten(res);
416 var clean = cleanArray(flat);
417 return clean;
418}
419
420function forEachPrimitive(obj, fn, basePath) {
421 basePath = basePath || [];
422
423 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(obj)) {
424 return obj.map(function (val, key) {
425 return forEachPrimitive(val, fn, basePath.concat(key));
426 });
427 }
428
429 if (isObject(obj)) {
430 return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(obj).map(function (key) {
431 return forEachPrimitive(obj[key], fn, basePath.concat(key));
432 });
433 }
434
435 return fn(obj, basePath[basePath.length - 1], basePath);
436}
437
438function forEach(obj, fn, basePath) {
439 basePath = basePath || [];
440 var results = [];
441
442 if (basePath.length > 0) {
443 var newResults = fn(obj, basePath[basePath.length - 1], basePath);
444
445 if (newResults) {
446 results = results.concat(newResults);
447 }
448 }
449
450 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(obj)) {
451 var arrayResults = obj.map(function (val, key) {
452 return forEach(val, fn, basePath.concat(key));
453 });
454
455 if (arrayResults) {
456 results = results.concat(arrayResults);
457 }
458 } else if (isObject(obj)) {
459 var moreResults = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(obj).map(function (key) {
460 return forEach(obj[key], fn, basePath.concat(key));
461 });
462
463 if (moreResults) {
464 results = results.concat(moreResults);
465 }
466 }
467
468 results = flatten(results);
469 return results;
470} // =========================
471// Paths
472// =========================
473
474
475function parentPathMatch(path, arr) {
476 if (!_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(arr)) {
477 return false;
478 }
479
480 for (var i = 0, len = arr.length; i < len; i += 1) {
481 if (arr[i] !== path[i]) {
482 return false;
483 }
484 }
485
486 return true;
487}
488
489function getIn(obj, path) {
490 return path.reduce(function (val, token) {
491 if (typeof token !== 'undefined' && val) {
492 return val[token];
493 }
494
495 return val;
496 }, obj);
497} // =========================
498// Array
499// =========================
500
501
502function fullyNormalizeArray(arr) {
503 return cleanArray(flatten(normalizeArray(arr)));
504}
505
506function normalizeArray(arr) {
507 return _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(arr) ? arr : [arr];
508}
509
510function flatten(arr) {
511 var _ref;
512
513 return (_ref = []).concat.apply(_ref, _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(arr.map(function (val) {
514 return _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(val) ? flatten(val) : val;
515 })));
516}
517
518function cleanArray(arr) {
519 return arr.filter(function (elm) {
520 return typeof elm !== 'undefined';
521 });
522} // =========================
523// Is-Thing.
524// =========================
525
526
527function isObject(val) {
528 return val && _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(val) === 'object';
529}
530
531function isPromise(val) {
532 return isObject(val) && isFunction(val.then);
533}
534
535function isFunction(val) {
536 return val && typeof val === 'function';
537}
538
539function isError(patch) {
540 return patch instanceof Error;
541}
542
543function isJsonPatch(patch) {
544 if (isPatch(patch)) {
545 var op = patch.op;
546 return op === 'add' || op === 'remove' || op === 'replace';
547 }
548
549 return false;
550}
551
552function isGenerator(thing) {
553 return Object.prototype.toString.call(thing) === '[object GeneratorFunction]';
554}
555
556function isMutation(patch) {
557 return isJsonPatch(patch) || isPatch(patch) && patch.type === 'mutation';
558}
559
560function isAdditiveMutation(patch) {
561 return isMutation(patch) && (patch.op === 'add' || patch.op === 'replace' || patch.op === 'merge' || patch.op === 'mergeDeep');
562}
563
564function isContextPatch(patch) {
565 return isPatch(patch) && patch.type === 'context';
566}
567
568function isPatch(patch) {
569 return patch && _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(patch) === 'object';
570}
571
572function getInByJsonPath(obj, jsonPath) {
573 try {
574 return fast_json_patch__WEBPACK_IMPORTED_MODULE_7__["getValueByPointer"](obj, jsonPath);
575 } catch (e) {
576 console.error(e); // eslint-disable-line no-console
577
578 return {};
579 }
580}
581
582/***/ }),
583/* 4 */
584/***/ (function(module, exports, __webpack_require__) {
585
586var _Symbol$iterator = __webpack_require__(138);
587
588var _Symbol = __webpack_require__(70);
589
590function _typeof(obj) {
591 "@babel/helpers - typeof";
592
593 if (typeof _Symbol === "function" && typeof _Symbol$iterator === "symbol") {
594 module.exports = _typeof = function _typeof(obj) {
595 return typeof obj;
596 };
597 } else {
598 module.exports = _typeof = function _typeof(obj) {
599 return obj && typeof _Symbol === "function" && obj.constructor === _Symbol && obj !== _Symbol.prototype ? "symbol" : typeof obj;
600 };
601 }
602
603 return _typeof(obj);
604}
605
606module.exports = _typeof;
607
608/***/ }),
609/* 5 */
610/***/ (function(module, exports) {
611
612var core = module.exports = { version: '2.6.11' };
613if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
614
615
616/***/ }),
617/* 6 */
618/***/ (function(module, exports, __webpack_require__) {
619
620var global = __webpack_require__(7);
621var core = __webpack_require__(5);
622var ctx = __webpack_require__(26);
623var hide = __webpack_require__(27);
624var has = __webpack_require__(23);
625var PROTOTYPE = 'prototype';
626
627var $export = function (type, name, source) {
628 var IS_FORCED = type & $export.F;
629 var IS_GLOBAL = type & $export.G;
630 var IS_STATIC = type & $export.S;
631 var IS_PROTO = type & $export.P;
632 var IS_BIND = type & $export.B;
633 var IS_WRAP = type & $export.W;
634 var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
635 var expProto = exports[PROTOTYPE];
636 var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
637 var key, own, out;
638 if (IS_GLOBAL) source = name;
639 for (key in source) {
640 // contains in native
641 own = !IS_FORCED && target && target[key] !== undefined;
642 if (own && has(exports, key)) continue;
643 // export native or passed
644 out = own ? target[key] : source[key];
645 // prevent global pollution for namespaces
646 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
647 // bind timers to global for call from export context
648 : IS_BIND && own ? ctx(out, global)
649 // wrap global constructors for prevent change them in library
650 : IS_WRAP && target[key] == out ? (function (C) {
651 var F = function (a, b, c) {
652 if (this instanceof C) {
653 switch (arguments.length) {
654 case 0: return new C();
655 case 1: return new C(a);
656 case 2: return new C(a, b);
657 } return new C(a, b, c);
658 } return C.apply(this, arguments);
659 };
660 F[PROTOTYPE] = C[PROTOTYPE];
661 return F;
662 // make static versions for prototype methods
663 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
664 // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
665 if (IS_PROTO) {
666 (exports.virtual || (exports.virtual = {}))[key] = out;
667 // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
668 if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
669 }
670 }
671};
672// type bitmap
673$export.F = 1; // forced
674$export.G = 2; // global
675$export.S = 4; // static
676$export.P = 8; // proto
677$export.B = 16; // bind
678$export.W = 32; // wrap
679$export.U = 64; // safe
680$export.R = 128; // real proto method for `library`
681module.exports = $export;
682
683
684/***/ }),
685/* 7 */
686/***/ (function(module, exports) {
687
688// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
689var global = module.exports = typeof window != 'undefined' && window.Math == Math
690 ? window : typeof self != 'undefined' && self.Math == Math ? self
691 // eslint-disable-next-line no-new-func
692 : Function('return this')();
693if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
694
695
696/***/ }),
697/* 8 */
698/***/ (function(module, exports, __webpack_require__) {
699
700"use strict";
701
702
703var YAMLException = __webpack_require__(58);
704
705var TYPE_CONSTRUCTOR_OPTIONS = [
706 'kind',
707 'resolve',
708 'construct',
709 'instanceOf',
710 'predicate',
711 'represent',
712 'defaultStyle',
713 'styleAliases'
714];
715
716var YAML_NODE_KINDS = [
717 'scalar',
718 'sequence',
719 'mapping'
720];
721
722function compileStyleAliases(map) {
723 var result = {};
724
725 if (map !== null) {
726 Object.keys(map).forEach(function (style) {
727 map[style].forEach(function (alias) {
728 result[String(alias)] = style;
729 });
730 });
731 }
732
733 return result;
734}
735
736function Type(tag, options) {
737 options = options || {};
738
739 Object.keys(options).forEach(function (name) {
740 if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
741 throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
742 }
743 });
744
745 // TODO: Add tag format check.
746 this.tag = tag;
747 this.kind = options['kind'] || null;
748 this.resolve = options['resolve'] || function () { return true; };
749 this.construct = options['construct'] || function (data) { return data; };
750 this.instanceOf = options['instanceOf'] || null;
751 this.predicate = options['predicate'] || null;
752 this.represent = options['represent'] || null;
753 this.defaultStyle = options['defaultStyle'] || null;
754 this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
755
756 if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
757 throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
758 }
759}
760
761module.exports = Type;
762
763
764/***/ }),
765/* 9 */
766/***/ (function(module, exports) {
767
768module.exports = function (it) {
769 return typeof it === 'object' ? it !== null : typeof it === 'function';
770};
771
772
773/***/ }),
774/* 10 */
775/***/ (function(module, exports, __webpack_require__) {
776
777module.exports = __webpack_require__(314);
778
779/***/ }),
780/* 11 */
781/***/ (function(module, exports, __webpack_require__) {
782
783var store = __webpack_require__(92)('wks');
784var uid = __webpack_require__(64);
785var Symbol = __webpack_require__(7).Symbol;
786var USE_SYMBOL = typeof Symbol == 'function';
787
788var $exports = module.exports = function (name) {
789 return store[name] || (store[name] =
790 USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
791};
792
793$exports.store = store;
794
795
796/***/ }),
797/* 12 */
798/***/ (function(module, exports, __webpack_require__) {
799
800var isObject = __webpack_require__(9);
801module.exports = function (it) {
802 if (!isObject(it)) throw TypeError(it + ' is not an object!');
803 return it;
804};
805
806
807/***/ }),
808/* 13 */
809/***/ (function(module, __webpack_exports__, __webpack_require__) {
810
811"use strict";
812__webpack_require__.r(__webpack_exports__);
813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isOAS3", function() { return isOAS3; });
814/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSwagger2", function() { return isSwagger2; });
815/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "opId", function() { return opId; });
816/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "idFromPathMethod", function() { return idFromPathMethod; });
817/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "legacyIdFromPathMethod", function() { return legacyIdFromPathMethod; });
818/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOperationRaw", function() { return getOperationRaw; });
819/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findOperation", function() { return findOperation; });
820/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eachOperation", function() { return eachOperation; });
821/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeSwagger", function() { return normalizeSwagger; });
822/* harmony import */ var _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
823/* harmony import */ var _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_0__);
824/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
825/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);
826/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35);
827/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_2__);
828/* harmony import */ var lodash_startsWith__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60);
829/* harmony import */ var lodash_startsWith__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_startsWith__WEBPACK_IMPORTED_MODULE_3__);
830
831
832
833
834
835var toLower = function toLower(str) {
836 return String.prototype.toLowerCase.call(str);
837};
838
839var escapeString = function escapeString(str) {
840 return str.replace(/[^\w]/gi, '_');
841}; // Spec version detection
842
843
844function isOAS3(spec) {
845 var oasVersion = spec.openapi;
846
847 if (!oasVersion) {
848 return false;
849 }
850
851 return lodash_startsWith__WEBPACK_IMPORTED_MODULE_3___default()(oasVersion, '3');
852}
853function isSwagger2(spec) {
854 var swaggerVersion = spec.swagger;
855
856 if (!swaggerVersion) {
857 return false;
858 }
859
860 return lodash_startsWith__WEBPACK_IMPORTED_MODULE_3___default()(swaggerVersion, '2');
861} // Strategy for determining operationId
862
863function opId(operation, pathName) {
864 var method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
865
866 var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
867 v2OperationIdCompatibilityMode = _ref.v2OperationIdCompatibilityMode;
868
869 if (!operation || _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(operation) !== 'object') {
870 return null;
871 }
872
873 var idWithoutWhitespace = (operation.operationId || '').replace(/\s/g, '');
874
875 if (idWithoutWhitespace.length) {
876 return escapeString(operation.operationId);
877 }
878
879 return idFromPathMethod(pathName, method, {
880 v2OperationIdCompatibilityMode: v2OperationIdCompatibilityMode
881 });
882} // Create a generated operationId from pathName + method
883
884function idFromPathMethod(pathName, method) {
885 var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
886 v2OperationIdCompatibilityMode = _ref2.v2OperationIdCompatibilityMode;
887
888 if (v2OperationIdCompatibilityMode) {
889 var res = "".concat(method.toLowerCase(), "_").concat(pathName).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g, '_');
890 res = res || "".concat(pathName.substring(1), "_").concat(method);
891 return res.replace(/((_){2,})/g, '_').replace(/^(_)*/g, '').replace(/([_])*$/g, '');
892 }
893
894 return "".concat(toLower(method)).concat(escapeString(pathName));
895}
896function legacyIdFromPathMethod(pathName, method) {
897 return "".concat(toLower(method), "-").concat(pathName);
898} // Get the operation, based on operationId ( just return the object, no inheritence )
899
900function getOperationRaw(spec, id) {
901 if (!spec || !spec.paths) {
902 return null;
903 }
904
905 return findOperation(spec, function (_ref3) {
906 var pathName = _ref3.pathName,
907 method = _ref3.method,
908 operation = _ref3.operation;
909
910 if (!operation || _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(operation) !== 'object') {
911 return false;
912 }
913
914 var rawOperationId = operation.operationId; // straight from the source
915
916 var operationId = opId(operation, pathName, method);
917 var legacyOperationId = legacyIdFromPathMethod(pathName, method);
918 return [operationId, legacyOperationId, rawOperationId].some(function (val) {
919 return val && val === id;
920 });
921 });
922} // Will stop iterating over the operations and return the operationObj
923// as soon as predicate returns true
924
925function findOperation(spec, predicate) {
926 return eachOperation(spec, predicate, true) || null;
927} // iterate over each operation, and fire a callback with details
928// `find=true` will stop iterating, when the cb returns truthy
929
930function eachOperation(spec, cb, find) {
931 if (!spec || _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(spec) !== 'object' || !spec.paths || _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(spec.paths) !== 'object') {
932 return null;
933 }
934
935 var paths = spec.paths; // Iterate over the spec, collecting operations
936 // eslint-disable-next-line no-restricted-syntax, guard-for-in
937
938 for (var pathName in paths) {
939 // eslint-disable-next-line no-restricted-syntax, guard-for-in
940 for (var method in paths[pathName]) {
941 if (method.toUpperCase() === 'PARAMETERS') {
942 continue; // eslint-disable-line no-continue
943 }
944
945 var operation = paths[pathName][method];
946
947 if (!operation || _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(operation) !== 'object') {
948 continue; // eslint-disable-line no-continue
949 }
950
951 var operationObj = {
952 spec: spec,
953 pathName: pathName,
954 method: method.toUpperCase(),
955 operation: operation
956 };
957 var cbValue = cb(operationObj);
958
959 if (find && cbValue) {
960 return operationObj;
961 }
962 }
963 }
964
965 return undefined;
966} // REVIEW: OAS3: identify normalization steps that need changes
967// ...maybe create `normalizeOAS3`?
968
969function normalizeSwagger(parsedSpec) {
970 var spec = parsedSpec.spec;
971 var paths = spec.paths;
972 var map = {};
973
974 if (!paths || spec.$$normalized) {
975 return parsedSpec;
976 } // eslint-disable-next-line no-restricted-syntax, guard-for-in
977
978
979 for (var pathName in paths) {
980 var path = paths[pathName];
981
982 if (!lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(path)) {
983 continue; // eslint-disable-line no-continue
984 }
985
986 var pathParameters = path.parameters; // eslint-disable-next-line no-restricted-syntax, guard-for-in
987
988 var _loop = function _loop(method) {
989 var operation = path[method];
990
991 if (!lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(operation)) {
992 return "continue"; // eslint-disable-line no-continue
993 }
994
995 var oid = opId(operation, pathName, method);
996
997 if (oid) {
998 if (map[oid]) {
999 map[oid].push(operation);
1000 } else {
1001 map[oid] = [operation];
1002 }
1003
1004 var opList = map[oid];
1005
1006 if (opList.length > 1) {
1007 opList.forEach(function (o, i) {
1008 // eslint-disable-next-line no-underscore-dangle
1009 o.__originalOperationId = o.__originalOperationId || o.operationId;
1010 o.operationId = "".concat(oid).concat(i + 1);
1011 });
1012 } else if (typeof operation.operationId !== 'undefined') {
1013 // Ensure we always add the normalized operation ID if one already exists
1014 // ( potentially different, given that we normalize our IDs)
1015 // ... _back_ to the spec. Otherwise, they might not line up
1016 var obj = opList[0]; // eslint-disable-next-line no-underscore-dangle
1017
1018 obj.__originalOperationId = obj.__originalOperationId || operation.operationId;
1019 obj.operationId = oid;
1020 }
1021 }
1022
1023 if (method !== 'parameters') {
1024 // Add inherited consumes, produces, parameters, securities
1025 var inheritsList = [];
1026 var toBeInherit = {}; // Global-levels
1027 // eslint-disable-next-line no-restricted-syntax
1028
1029 for (var key in spec) {
1030 if (key === 'produces' || key === 'consumes' || key === 'security') {
1031 toBeInherit[key] = spec[key];
1032 inheritsList.push(toBeInherit);
1033 }
1034 } // Path-levels
1035
1036
1037 if (pathParameters) {
1038 toBeInherit.parameters = pathParameters;
1039 inheritsList.push(toBeInherit);
1040 }
1041
1042 if (inheritsList.length) {
1043 // eslint-disable-next-line no-restricted-syntax
1044 var _iterator = _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_0___default()(inheritsList),
1045 _step;
1046
1047 try {
1048 for (_iterator.s(); !(_step = _iterator.n()).done;) {
1049 var inherits = _step.value;
1050
1051 // eslint-disable-next-line no-restricted-syntax
1052 for (var inheritName in inherits) {
1053 if (!operation[inheritName]) {
1054 operation[inheritName] = inherits[inheritName];
1055 } else if (inheritName === 'parameters') {
1056 // eslint-disable-next-line no-restricted-syntax
1057 var _iterator2 = _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_0___default()(inherits[inheritName]),
1058 _step2;
1059
1060 try {
1061 var _loop2 = function _loop2() {
1062 var param = _step2.value;
1063 var exists = operation[inheritName].some(function (opParam) {
1064 return opParam.name && opParam.name === param.name || opParam.$ref && opParam.$ref === param.$ref || opParam.$$ref && opParam.$$ref === param.$$ref || opParam === param;
1065 });
1066
1067 if (!exists) {
1068 operation[inheritName].push(param);
1069 }
1070 };
1071
1072 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1073 _loop2();
1074 }
1075 } catch (err) {
1076 _iterator2.e(err);
1077 } finally {
1078 _iterator2.f();
1079 }
1080 }
1081 }
1082 }
1083 } catch (err) {
1084 _iterator.e(err);
1085 } finally {
1086 _iterator.f();
1087 }
1088 }
1089 }
1090 };
1091
1092 for (var method in path) {
1093 var _ret = _loop(method);
1094
1095 if (_ret === "continue") continue;
1096 }
1097 }
1098
1099 spec.$$normalized = true;
1100 return parsedSpec;
1101}
1102
1103/***/ }),
1104/* 14 */
1105/***/ (function(module, exports, __webpack_require__) {
1106
1107module.exports = __webpack_require__(221);
1108
1109
1110/***/ }),
1111/* 15 */
1112/***/ (function(module, exports, __webpack_require__) {
1113
1114var arrayWithHoles = __webpack_require__(241);
1115
1116var iterableToArrayLimit = __webpack_require__(242);
1117
1118var unsupportedIterableToArray = __webpack_require__(106);
1119
1120var nonIterableRest = __webpack_require__(245);
1121
1122function _slicedToArray(arr, i) {
1123 return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
1124}
1125
1126module.exports = _slicedToArray;
1127
1128/***/ }),
1129/* 16 */
1130/***/ (function(module, exports, __webpack_require__) {
1131
1132// Thank's IE8 for his funny defineProperty
1133module.exports = !__webpack_require__(28)(function () {
1134 return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
1135});
1136
1137
1138/***/ }),
1139/* 17 */
1140/***/ (function(module, exports, __webpack_require__) {
1141
1142var arrayWithoutHoles = __webpack_require__(311);
1143
1144var iterableToArray = __webpack_require__(312);
1145
1146var unsupportedIterableToArray = __webpack_require__(106);
1147
1148var nonIterableSpread = __webpack_require__(313);
1149
1150function _toConsumableArray(arr) {
1151 return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
1152}
1153
1154module.exports = _toConsumableArray;
1155
1156/***/ }),
1157/* 18 */
1158/***/ (function(module, __webpack_exports__, __webpack_require__) {
1159
1160"use strict";
1161__webpack_require__.r(__webpack_exports__);
1162/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "self", function() { return self; });
1163/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return http; });
1164/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldDownloadAsText", function() { return shouldDownloadAsText; });
1165/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serializeRes", function() { return serializeRes; });
1166/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serializeHeaders", function() { return serializeHeaders; });
1167/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFile", function() { return isFile; });
1168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeFormOrQuery", function() { return encodeFormOrQuery; });
1169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeInQueryOrForm", function() { return mergeInQueryOrForm; });
1170/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeHttp", function() { return makeHttp; });
1171/* harmony import */ var _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
1172/* harmony import */ var _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0__);
1173/* harmony import */ var _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
1174/* harmony import */ var _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_1__);
1175/* harmony import */ var _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(159);
1176/* harmony import */ var _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_2__);
1177/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
1178/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3__);
1179/* harmony import */ var _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(37);
1180/* harmony import */ var _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_4__);
1181/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
1182/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5__);
1183/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4);
1184/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6__);
1185/* harmony import */ var _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15);
1186/* harmony import */ var _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__);
1187/* harmony import */ var _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76);
1188/* harmony import */ var _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_8__);
1189/* harmony import */ var _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45);
1190/* harmony import */ var _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9__);
1191/* harmony import */ var cross_fetch_polyfill__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(253);
1192/* harmony import */ var cross_fetch_polyfill__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cross_fetch_polyfill__WEBPACK_IMPORTED_MODULE_10__);
1193/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(83);
1194/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_11__);
1195/* harmony import */ var js_yaml__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(78);
1196/* harmony import */ var js_yaml__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(js_yaml__WEBPACK_IMPORTED_MODULE_12__);
1197/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46);
1198/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_13__);
1199/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(30);
1200/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_14__);
1201/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(29);
1202/* harmony import */ var buffer__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(buffer__WEBPACK_IMPORTED_MODULE_15__);
1203/* harmony import */ var _internal_form_data_monkey_patch__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(160);
1204/* harmony import */ var _execute_oas3_style_serializer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(32);
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216/* global fetch */
1217
1218
1219
1220
1221
1222
1223
1224 // For testing
1225
1226var self = {
1227 serializeRes: serializeRes,
1228 mergeInQueryOrForm: mergeInQueryOrForm
1229}; // Handles fetch-like syntax and the case where there is only one object passed-in
1230// (which will have the URL as a property). Also serilizes the response.
1231
1232function http(_x) {
1233 return _http.apply(this, arguments);
1234} // exported for testing
1235
1236function _http() {
1237 _http = _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_9___default()( /*#__PURE__*/_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(url) {
1238 var request,
1239 contentType,
1240 res,
1241 error,
1242 _error,
1243 _args = arguments;
1244
1245 return _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
1246 while (1) {
1247 switch (_context.prev = _context.next) {
1248 case 0:
1249 request = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
1250
1251 if (_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(url) === 'object') {
1252 request = url;
1253 url = request.url;
1254 }
1255
1256 request.headers = request.headers || {}; // Serializes query, for convenience
1257 // Should be the last thing we do, as its hard to mutate the URL with
1258 // the search string, but much easier to manipulate the req.query object
1259
1260 self.mergeInQueryOrForm(request); // Newlines in header values cause weird error messages from `window.fetch`,
1261 // so let's massage them out.
1262 // Context: https://stackoverflow.com/a/50709178
1263
1264 if (request.headers) {
1265 _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(request.headers).forEach(function (headerName) {
1266 var value = request.headers[headerName];
1267
1268 if (typeof value === 'string') {
1269 request.headers[headerName] = value.replace(/\n+/g, ' ');
1270 }
1271 });
1272 } // Wait for the request interceptor, if it was provided
1273 // WARNING: don't put anything between this and the request firing unless
1274 // you have a good reason!
1275
1276
1277 if (!request.requestInterceptor) {
1278 _context.next = 12;
1279 break;
1280 }
1281
1282 _context.next = 8;
1283 return request.requestInterceptor(request);
1284
1285 case 8:
1286 _context.t0 = _context.sent;
1287
1288 if (_context.t0) {
1289 _context.next = 11;
1290 break;
1291 }
1292
1293 _context.t0 = request;
1294
1295 case 11:
1296 request = _context.t0;
1297
1298 case 12:
1299 // for content-type=multipart\/form-data remove content-type from request before fetch
1300 // so that correct one with `boundary` is set
1301 contentType = request.headers['content-type'] || request.headers['Content-Type'];
1302
1303 if (/multipart\/form-data/i.test(contentType)) {
1304 delete request.headers['content-type'];
1305 delete request.headers['Content-Type'];
1306 } // eslint-disable-next-line no-undef
1307
1308
1309 _context.prev = 14;
1310 _context.next = 17;
1311 return (request.userFetch || fetch)(request.url, request);
1312
1313 case 17:
1314 res = _context.sent;
1315 _context.next = 20;
1316 return self.serializeRes(res, url, request);
1317
1318 case 20:
1319 res = _context.sent;
1320
1321 if (!request.responseInterceptor) {
1322 _context.next = 28;
1323 break;
1324 }
1325
1326 _context.next = 24;
1327 return request.responseInterceptor(res);
1328
1329 case 24:
1330 _context.t1 = _context.sent;
1331
1332 if (_context.t1) {
1333 _context.next = 27;
1334 break;
1335 }
1336
1337 _context.t1 = res;
1338
1339 case 27:
1340 res = _context.t1;
1341
1342 case 28:
1343 _context.next = 39;
1344 break;
1345
1346 case 30:
1347 _context.prev = 30;
1348 _context.t2 = _context["catch"](14);
1349
1350 if (res) {
1351 _context.next = 34;
1352 break;
1353 }
1354
1355 throw _context.t2;
1356
1357 case 34:
1358 error = new Error(res.statusText);
1359 error.status = res.status;
1360 error.statusCode = res.status;
1361 error.responseError = _context.t2;
1362 throw error;
1363
1364 case 39:
1365 if (res.ok) {
1366 _context.next = 45;
1367 break;
1368 }
1369
1370 _error = new Error(res.statusText);
1371 _error.status = res.status;
1372 _error.statusCode = res.status;
1373 _error.response = res;
1374 throw _error;
1375
1376 case 45:
1377 return _context.abrupt("return", res);
1378
1379 case 46:
1380 case "end":
1381 return _context.stop();
1382 }
1383 }
1384 }, _callee, null, [[14, 30]]);
1385 }));
1386 return _http.apply(this, arguments);
1387}
1388
1389var shouldDownloadAsText = function shouldDownloadAsText() {
1390 var contentType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1391 return /(json|xml|yaml|text)\b/.test(contentType);
1392};
1393
1394function parseBody(body, contentType) {
1395 if (contentType && (contentType.indexOf('application/json') === 0 || contentType.indexOf('+json') > 0)) {
1396 return JSON.parse(body);
1397 }
1398
1399 return js_yaml__WEBPACK_IMPORTED_MODULE_12___default.a.safeLoad(body);
1400} // Serialize the response, returns a promise with headers and the body part of the hash
1401
1402
1403function serializeRes(oriRes, url) {
1404 var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
1405 _ref$loadSpec = _ref.loadSpec,
1406 loadSpec = _ref$loadSpec === void 0 ? false : _ref$loadSpec;
1407
1408 var res = {
1409 ok: oriRes.ok,
1410 url: oriRes.url || url,
1411 status: oriRes.status,
1412 statusText: oriRes.statusText,
1413 headers: serializeHeaders(oriRes.headers)
1414 };
1415 var contentType = res.headers['content-type'];
1416 var useText = loadSpec || shouldDownloadAsText(contentType);
1417 var getBody = useText ? oriRes.text : oriRes.blob || oriRes.buffer;
1418 return getBody.call(oriRes).then(function (body) {
1419 res.text = body;
1420 res.data = body;
1421
1422 if (useText) {
1423 try {
1424 var obj = parseBody(body, contentType);
1425 res.body = obj;
1426 res.obj = obj;
1427 } catch (e) {
1428 res.parseError = e;
1429 }
1430 }
1431
1432 return res;
1433 });
1434}
1435
1436function serializeHeaderValue(value) {
1437 var isMulti = value.includes(', ');
1438 return isMulti ? value.split(', ') : value;
1439} // Serialize headers into a hash, where mutliple-headers result in an array.
1440//
1441// eg: Cookie: one
1442// Cookie: two
1443// = { Cookie: [ "one", "two" ]
1444
1445
1446function serializeHeaders() {
1447 var headers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1448 if (!lodash_isFunction__WEBPACK_IMPORTED_MODULE_14___default()(headers.entries)) return {};
1449 return _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_8___default()(headers.entries()).reduce(function (acc, _ref2) {
1450 var _ref3 = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default()(_ref2, 2),
1451 header = _ref3[0],
1452 value = _ref3[1];
1453
1454 acc[header] = serializeHeaderValue(value);
1455 return acc;
1456 }, {});
1457}
1458function isFile(obj, navigatorObj) {
1459 if (!navigatorObj && typeof navigator !== 'undefined') {
1460 // eslint-disable-next-line no-undef
1461 navigatorObj = navigator;
1462 }
1463
1464 if (navigatorObj && navigatorObj.product === 'ReactNative') {
1465 if (obj && _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(obj) === 'object' && typeof obj.uri === 'string') {
1466 return true;
1467 }
1468
1469 return false;
1470 }
1471
1472 if (typeof File !== 'undefined' && obj instanceof File) {
1473 // eslint-disable-line no-undef
1474 return true;
1475 }
1476
1477 if (typeof Blob !== 'undefined' && obj instanceof Blob) {
1478 // eslint-disable-line no-undef
1479 return true;
1480 }
1481
1482 if (typeof buffer__WEBPACK_IMPORTED_MODULE_15__["Buffer"] !== 'undefined' && obj instanceof buffer__WEBPACK_IMPORTED_MODULE_15__["Buffer"]) {
1483 return true;
1484 }
1485
1486 return obj !== null && _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(obj) === 'object' && typeof obj.pipe === 'function';
1487}
1488
1489function isArrayOfFile(obj, navigatorObj) {
1490 return _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(obj) && obj.some(function (v) {
1491 return isFile(v, navigatorObj);
1492 });
1493}
1494
1495var STYLE_SEPARATORS = {
1496 form: ',',
1497 spaceDelimited: '%20',
1498 pipeDelimited: '|'
1499};
1500var SEPARATORS = {
1501 csv: ',',
1502 ssv: '%20',
1503 tsv: '%09',
1504 pipes: '|'
1505}; // Formats a key-value and returns an array of key-value pairs.
1506//
1507// Return value example 1: [['color', 'blue']]
1508// Return value example 2: [['color', 'blue,black,brown']]
1509// Return value example 3: [['color', ['blue', 'black', 'brown']]]
1510// Return value example 4: [['color', 'R,100,G,200,B,150']]
1511// Return value example 5: [['R', '100'], ['G', '200'], ['B', '150']]
1512// Return value example 6: [['color[R]', '100'], ['color[G]', '200'], ['color[B]', '150']]
1513
1514function formatKeyValue(key, input) {
1515 var skipEncoding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1516 var collectionFormat = input.collectionFormat,
1517 allowEmptyValue = input.allowEmptyValue,
1518 serializationOption = input.serializationOption,
1519 encoding = input.encoding; // `input` can be string
1520
1521 var value = _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(input) === 'object' && !_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(input) ? input.value : input;
1522 var encodeFn = skipEncoding ? function (k) {
1523 return k.toString();
1524 } : function (k) {
1525 return encodeURIComponent(k);
1526 };
1527 var encodedKey = encodeFn(key);
1528
1529 if (typeof value === 'undefined' && allowEmptyValue) {
1530 return [[encodedKey, '']];
1531 } // file
1532
1533
1534 if (isFile(value) || isArrayOfFile(value)) {
1535 return [[encodedKey, value]];
1536 } // for OAS 3 Parameter Object for serialization
1537
1538
1539 if (serializationOption) {
1540 return formatKeyValueBySerializationOption(key, value, skipEncoding, serializationOption);
1541 } // for OAS 3 Encoding Object
1542
1543
1544 if (encoding) {
1545 if ([_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(encoding.style), _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(encoding.explode), _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(encoding.allowReserved)].some(function (type) {
1546 return type !== 'undefined';
1547 })) {
1548 return formatKeyValueBySerializationOption(key, value, skipEncoding, lodash_pick__WEBPACK_IMPORTED_MODULE_13___default()(encoding, ['style', 'explode', 'allowReserved']));
1549 }
1550
1551 if (encoding.contentType) {
1552 if (encoding.contentType === 'application/json') {
1553 // If value is a string, assume value is already a JSON string
1554 var json = typeof value === 'string' ? value : _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_4___default()(value);
1555 return [[encodedKey, encodeFn(json)]];
1556 }
1557
1558 return [[encodedKey, encodeFn(value.toString())]];
1559 } // Primitive
1560
1561
1562 if (_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(value) !== 'object') {
1563 return [[encodedKey, encodeFn(value)]];
1564 } // Array of primitives
1565
1566
1567 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(value) && value.every(function (v) {
1568 return _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(v) !== 'object';
1569 })) {
1570 return [[encodedKey, value.map(encodeFn).join(',')]];
1571 } // Array or object
1572
1573
1574 return [[encodedKey, encodeFn(_babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_4___default()(value))]];
1575 } // for OAS 2 Parameter Object
1576 // Primitive
1577
1578
1579 if (_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(value) !== 'object') {
1580 return [[encodedKey, encodeFn(value)]];
1581 } // Array
1582
1583
1584 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(value)) {
1585 if (collectionFormat === 'multi') {
1586 // In case of multipart/formdata, it is used as array.
1587 // Otherwise, the caller will convert it to a query by qs.stringify.
1588 return [[encodedKey, value.map(encodeFn)]];
1589 }
1590
1591 return [[encodedKey, value.map(encodeFn).join(SEPARATORS[collectionFormat || 'csv'])]];
1592 } // Object
1593
1594
1595 return [[encodedKey, '']];
1596}
1597
1598function formatKeyValueBySerializationOption(key, value, skipEncoding, serializationOption) {
1599 var style = serializationOption.style || 'form';
1600 var explode = typeof serializationOption.explode === 'undefined' ? style === 'form' : serializationOption.explode; // eslint-disable-next-line no-nested-ternary
1601
1602 var escape = skipEncoding ? false : serializationOption && serializationOption.allowReserved ? 'unsafe' : 'reserved';
1603
1604 var encodeFn = function encodeFn(v) {
1605 return Object(_execute_oas3_style_serializer__WEBPACK_IMPORTED_MODULE_17__["encodeDisallowedCharacters"])(v, {
1606 escape: escape
1607 });
1608 };
1609
1610 var encodeKeyFn = skipEncoding ? function (k) {
1611 return k;
1612 } : function (k) {
1613 return Object(_execute_oas3_style_serializer__WEBPACK_IMPORTED_MODULE_17__["encodeDisallowedCharacters"])(k, {
1614 escape: escape
1615 });
1616 }; // Primitive
1617
1618 if (_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_6___default()(value) !== 'object') {
1619 return [[encodeKeyFn(key), encodeFn(value)]];
1620 } // Array
1621
1622
1623 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(value)) {
1624 if (explode) {
1625 // In case of multipart/formdata, it is used as array.
1626 // Otherwise, the caller will convert it to a query by qs.stringify.
1627 return [[encodeKeyFn(key), value.map(encodeFn)]];
1628 }
1629
1630 return [[encodeKeyFn(key), value.map(encodeFn).join(STYLE_SEPARATORS[style])]];
1631 } // Object
1632
1633
1634 if (style === 'deepObject') {
1635 return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(value).map(function (valueKey) {
1636 return [encodeKeyFn("".concat(key, "[").concat(valueKey, "]")), encodeFn(value[valueKey])];
1637 });
1638 }
1639
1640 if (explode) {
1641 return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(value).map(function (valueKey) {
1642 return [encodeKeyFn(valueKey), encodeFn(value[valueKey])];
1643 });
1644 }
1645
1646 return [[encodeKeyFn(key), _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(value).map(function (valueKey) {
1647 return ["".concat(encodeKeyFn(valueKey), ",").concat(encodeFn(value[valueKey]))];
1648 }).join(',')]];
1649}
1650
1651function buildFormData(reqForm) {
1652 /**
1653 * Build a new FormData instance, support array as field value
1654 * OAS2.0 - when collectionFormat is multi
1655 * OAS3.0 - when explode of Encoding Object is true
1656 * @param {Object} reqForm - ori req.form
1657 * @return {FormData} - new FormData instance
1658 */
1659 return _babel_runtime_corejs2_core_js_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(reqForm).reduce(function (formData, _ref4) {
1660 var _ref5 = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default()(_ref4, 2),
1661 name = _ref5[0],
1662 input = _ref5[1];
1663
1664 // eslint-disable-next-line no-restricted-syntax
1665 var _iterator = _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_1___default()(formatKeyValue(name, input, true)),
1666 _step;
1667
1668 try {
1669 for (_iterator.s(); !(_step = _iterator.n()).done;) {
1670 var _step$value = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default()(_step.value, 2),
1671 key = _step$value[0],
1672 value = _step$value[1];
1673
1674 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(value)) {
1675 // eslint-disable-next-line no-restricted-syntax
1676 var _iterator2 = _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_1___default()(value),
1677 _step2;
1678
1679 try {
1680 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1681 var v = _step2.value;
1682 formData.append(key, v);
1683 }
1684 } catch (err) {
1685 _iterator2.e(err);
1686 } finally {
1687 _iterator2.f();
1688 }
1689 } else {
1690 formData.append(key, value);
1691 }
1692 }
1693 } catch (err) {
1694 _iterator.e(err);
1695 } finally {
1696 _iterator.f();
1697 }
1698
1699 return formData;
1700 }, new _internal_form_data_monkey_patch__WEBPACK_IMPORTED_MODULE_16__["default"]());
1701} // Encodes an object using appropriate serializer.
1702
1703
1704function encodeFormOrQuery(data) {
1705 /**
1706 * Encode parameter names and values
1707 * @param {Object} result - parameter names and values
1708 * @param {string} parameterName - Parameter name
1709 * @return {object} encoded parameter names and values
1710 */
1711 var encodedQuery = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(data).reduce(function (result, parameterName) {
1712 // eslint-disable-next-line no-restricted-syntax
1713 var _iterator3 = _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_1___default()(formatKeyValue(parameterName, data[parameterName])),
1714 _step3;
1715
1716 try {
1717 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1718 var _step3$value = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default()(_step3.value, 2),
1719 key = _step3$value[0],
1720 value = _step3$value[1];
1721
1722 result[key] = value;
1723 }
1724 } catch (err) {
1725 _iterator3.e(err);
1726 } finally {
1727 _iterator3.f();
1728 }
1729
1730 return result;
1731 }, {});
1732
1733 return qs__WEBPACK_IMPORTED_MODULE_11___default.a.stringify(encodedQuery, {
1734 encode: false,
1735 indices: false
1736 }) || '';
1737} // If the request has a `query` object, merge it into the request.url, and delete the object
1738// If file and/or multipart, also create FormData instance
1739
1740function mergeInQueryOrForm() {
1741 var req = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1742 var _req$url = req.url,
1743 url = _req$url === void 0 ? '' : _req$url,
1744 query = req.query,
1745 form = req.form;
1746
1747 var joinSearch = function joinSearch() {
1748 for (var _len = arguments.length, strs = new Array(_len), _key = 0; _key < _len; _key++) {
1749 strs[_key] = arguments[_key];
1750 }
1751
1752 var search = strs.filter(function (a) {
1753 return a;
1754 }).join('&'); // Only truthy value
1755
1756 return search ? "?".concat(search) : ''; // Only add '?' if there is a str
1757 };
1758
1759 if (form) {
1760 var hasFile = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(form).some(function (key) {
1761 var value = form[key].value;
1762 return isFile(value) || isArrayOfFile(value);
1763 });
1764
1765 var contentType = req.headers['content-type'] || req.headers['Content-Type'];
1766
1767 if (hasFile || /multipart\/form-data/i.test(contentType)) {
1768 req.body = buildFormData(req.form);
1769 } else {
1770 req.body = encodeFormOrQuery(form);
1771 }
1772
1773 delete req.form;
1774 }
1775
1776 if (query) {
1777 var _url$split = url.split('?'),
1778 _url$split2 = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default()(_url$split, 2),
1779 baseUrl = _url$split2[0],
1780 oriSearch = _url$split2[1];
1781
1782 var newStr = '';
1783
1784 if (oriSearch) {
1785 var oriQuery = qs__WEBPACK_IMPORTED_MODULE_11___default.a.parse(oriSearch);
1786
1787 var keysToRemove = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(query);
1788
1789 keysToRemove.forEach(function (key) {
1790 return delete oriQuery[key];
1791 });
1792 newStr = qs__WEBPACK_IMPORTED_MODULE_11___default.a.stringify(oriQuery, {
1793 encode: true
1794 });
1795 }
1796
1797 var finalStr = joinSearch(newStr, encodeFormOrQuery(query));
1798 req.url = baseUrl + finalStr;
1799 delete req.query;
1800 }
1801
1802 return req;
1803} // Wrap a http function ( there are otherways to do this, consider this deprecated )
1804
1805function makeHttp(httpFn, preFetch, postFetch) {
1806 postFetch = postFetch || function (a) {
1807 return a;
1808 };
1809
1810 preFetch = preFetch || function (a) {
1811 return a;
1812 };
1813
1814 return function (req) {
1815 if (typeof req === 'string') {
1816 req = {
1817 url: req
1818 };
1819 }
1820
1821 self.mergeInQueryOrForm(req);
1822 req = preFetch(req);
1823 return postFetch(httpFn(req));
1824 };
1825}
1826
1827/***/ }),
1828/* 19 */
1829/***/ (function(module, exports, __webpack_require__) {
1830
1831var anObject = __webpack_require__(12);
1832var IE8_DOM_DEFINE = __webpack_require__(119);
1833var toPrimitive = __webpack_require__(87);
1834var dP = Object.defineProperty;
1835
1836exports.f = __webpack_require__(16) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
1837 anObject(O);
1838 P = toPrimitive(P, true);
1839 anObject(Attributes);
1840 if (IE8_DOM_DEFINE) try {
1841 return dP(O, P, Attributes);
1842 } catch (e) { /* empty */ }
1843 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
1844 if ('value' in Attributes) O[P] = Attributes.value;
1845 return O;
1846};
1847
1848
1849/***/ }),
1850/* 20 */
1851/***/ (function(module, exports, __webpack_require__) {
1852
1853"use strict";
1854// Copyright Joyent, Inc. and other Node contributors.
1855//
1856// Permission is hereby granted, free of charge, to any person obtaining a
1857// copy of this software and associated documentation files (the
1858// "Software"), to deal in the Software without restriction, including
1859// without limitation the rights to use, copy, modify, merge, publish,
1860// distribute, sublicense, and/or sell copies of the Software, and to permit
1861// persons to whom the Software is furnished to do so, subject to the
1862// following conditions:
1863//
1864// The above copyright notice and this permission notice shall be included
1865// in all copies or substantial portions of the Software.
1866//
1867// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1868// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1869// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
1870// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1871// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1872// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
1873// USE OR OTHER DEALINGS IN THE SOFTWARE.
1874
1875
1876
1877var punycode = __webpack_require__(216);
1878var util = __webpack_require__(217);
1879
1880exports.parse = urlParse;
1881exports.resolve = urlResolve;
1882exports.resolveObject = urlResolveObject;
1883exports.format = urlFormat;
1884
1885exports.Url = Url;
1886
1887function Url() {
1888 this.protocol = null;
1889 this.slashes = null;
1890 this.auth = null;
1891 this.host = null;
1892 this.port = null;
1893 this.hostname = null;
1894 this.hash = null;
1895 this.search = null;
1896 this.query = null;
1897 this.pathname = null;
1898 this.path = null;
1899 this.href = null;
1900}
1901
1902// Reference: RFC 3986, RFC 1808, RFC 2396
1903
1904// define these here so at least they only have to be
1905// compiled once on the first module load.
1906var protocolPattern = /^([a-z0-9.+-]+:)/i,
1907 portPattern = /:[0-9]*$/,
1908
1909 // Special case for a simple path URL
1910 simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
1911
1912 // RFC 2396: characters reserved for delimiting URLs.
1913 // We actually just auto-escape these.
1914 delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
1915
1916 // RFC 2396: characters not allowed for various reasons.
1917 unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
1918
1919 // Allowed by RFCs, but cause of XSS attacks. Always escape these.
1920 autoEscape = ['\''].concat(unwise),
1921 // Characters that are never ever allowed in a hostname.
1922 // Note that any invalid chars are also handled, but these
1923 // are the ones that are *expected* to be seen, so we fast-path
1924 // them.
1925 nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
1926 hostEndingChars = ['/', '?', '#'],
1927 hostnameMaxLen = 255,
1928 hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
1929 hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
1930 // protocols that can allow "unsafe" and "unwise" chars.
1931 unsafeProtocol = {
1932 'javascript': true,
1933 'javascript:': true
1934 },
1935 // protocols that never have a hostname.
1936 hostlessProtocol = {
1937 'javascript': true,
1938 'javascript:': true
1939 },
1940 // protocols that always contain a // bit.
1941 slashedProtocol = {
1942 'http': true,
1943 'https': true,
1944 'ftp': true,
1945 'gopher': true,
1946 'file': true,
1947 'http:': true,
1948 'https:': true,
1949 'ftp:': true,
1950 'gopher:': true,
1951 'file:': true
1952 },
1953 querystring = __webpack_require__(218);
1954
1955function urlParse(url, parseQueryString, slashesDenoteHost) {
1956 if (url && util.isObject(url) && url instanceof Url) return url;
1957
1958 var u = new Url;
1959 u.parse(url, parseQueryString, slashesDenoteHost);
1960 return u;
1961}
1962
1963Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
1964 if (!util.isString(url)) {
1965 throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
1966 }
1967
1968 // Copy chrome, IE, opera backslash-handling behavior.
1969 // Back slashes before the query string get converted to forward slashes
1970 // See: https://code.google.com/p/chromium/issues/detail?id=25916
1971 var queryIndex = url.indexOf('?'),
1972 splitter =
1973 (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
1974 uSplit = url.split(splitter),
1975 slashRegex = /\\/g;
1976 uSplit[0] = uSplit[0].replace(slashRegex, '/');
1977 url = uSplit.join(splitter);
1978
1979 var rest = url;
1980
1981 // trim before proceeding.
1982 // This is to support parse stuff like " http://foo.com \n"
1983 rest = rest.trim();
1984
1985 if (!slashesDenoteHost && url.split('#').length === 1) {
1986 // Try fast path regexp
1987 var simplePath = simplePathPattern.exec(rest);
1988 if (simplePath) {
1989 this.path = rest;
1990 this.href = rest;
1991 this.pathname = simplePath[1];
1992 if (simplePath[2]) {
1993 this.search = simplePath[2];
1994 if (parseQueryString) {
1995 this.query = querystring.parse(this.search.substr(1));
1996 } else {
1997 this.query = this.search.substr(1);
1998 }
1999 } else if (parseQueryString) {
2000 this.search = '';
2001 this.query = {};
2002 }
2003 return this;
2004 }
2005 }
2006
2007 var proto = protocolPattern.exec(rest);
2008 if (proto) {
2009 proto = proto[0];
2010 var lowerProto = proto.toLowerCase();
2011 this.protocol = lowerProto;
2012 rest = rest.substr(proto.length);
2013 }
2014
2015 // figure out if it's got a host
2016 // user@server is *always* interpreted as a hostname, and url
2017 // resolution will treat //foo/bar as host=foo,path=bar because that's
2018 // how the browser resolves relative URLs.
2019 if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
2020 var slashes = rest.substr(0, 2) === '//';
2021 if (slashes && !(proto && hostlessProtocol[proto])) {
2022 rest = rest.substr(2);
2023 this.slashes = true;
2024 }
2025 }
2026
2027 if (!hostlessProtocol[proto] &&
2028 (slashes || (proto && !slashedProtocol[proto]))) {
2029
2030 // there's a hostname.
2031 // the first instance of /, ?, ;, or # ends the host.
2032 //
2033 // If there is an @ in the hostname, then non-host chars *are* allowed
2034 // to the left of the last @ sign, unless some host-ending character
2035 // comes *before* the @-sign.
2036 // URLs are obnoxious.
2037 //
2038 // ex:
2039 // http://a@b@c/ => user:a@b host:c
2040 // http://a@b?@c => user:a host:c path:/?@c
2041
2042 // v0.12 TODO(isaacs): This is not quite how Chrome does things.
2043 // Review our test case against browsers more comprehensively.
2044
2045 // find the first instance of any hostEndingChars
2046 var hostEnd = -1;
2047 for (var i = 0; i < hostEndingChars.length; i++) {
2048 var hec = rest.indexOf(hostEndingChars[i]);
2049 if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
2050 hostEnd = hec;
2051 }
2052
2053 // at this point, either we have an explicit point where the
2054 // auth portion cannot go past, or the last @ char is the decider.
2055 var auth, atSign;
2056 if (hostEnd === -1) {
2057 // atSign can be anywhere.
2058 atSign = rest.lastIndexOf('@');
2059 } else {
2060 // atSign must be in auth portion.
2061 // http://a@b/c@d => host:b auth:a path:/c@d
2062 atSign = rest.lastIndexOf('@', hostEnd);
2063 }
2064
2065 // Now we have a portion which is definitely the auth.
2066 // Pull that off.
2067 if (atSign !== -1) {
2068 auth = rest.slice(0, atSign);
2069 rest = rest.slice(atSign + 1);
2070 this.auth = decodeURIComponent(auth);
2071 }
2072
2073 // the host is the remaining to the left of the first non-host char
2074 hostEnd = -1;
2075 for (var i = 0; i < nonHostChars.length; i++) {
2076 var hec = rest.indexOf(nonHostChars[i]);
2077 if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
2078 hostEnd = hec;
2079 }
2080 // if we still have not hit it, then the entire thing is a host.
2081 if (hostEnd === -1)
2082 hostEnd = rest.length;
2083
2084 this.host = rest.slice(0, hostEnd);
2085 rest = rest.slice(hostEnd);
2086
2087 // pull out port.
2088 this.parseHost();
2089
2090 // we've indicated that there is a hostname,
2091 // so even if it's empty, it has to be present.
2092 this.hostname = this.hostname || '';
2093
2094 // if hostname begins with [ and ends with ]
2095 // assume that it's an IPv6 address.
2096 var ipv6Hostname = this.hostname[0] === '[' &&
2097 this.hostname[this.hostname.length - 1] === ']';
2098
2099 // validate a little.
2100 if (!ipv6Hostname) {
2101 var hostparts = this.hostname.split(/\./);
2102 for (var i = 0, l = hostparts.length; i < l; i++) {
2103 var part = hostparts[i];
2104 if (!part) continue;
2105 if (!part.match(hostnamePartPattern)) {
2106 var newpart = '';
2107 for (var j = 0, k = part.length; j < k; j++) {
2108 if (part.charCodeAt(j) > 127) {
2109 // we replace non-ASCII char with a temporary placeholder
2110 // we need this to make sure size of hostname is not
2111 // broken by replacing non-ASCII by nothing
2112 newpart += 'x';
2113 } else {
2114 newpart += part[j];
2115 }
2116 }
2117 // we test again with ASCII char only
2118 if (!newpart.match(hostnamePartPattern)) {
2119 var validParts = hostparts.slice(0, i);
2120 var notHost = hostparts.slice(i + 1);
2121 var bit = part.match(hostnamePartStart);
2122 if (bit) {
2123 validParts.push(bit[1]);
2124 notHost.unshift(bit[2]);
2125 }
2126 if (notHost.length) {
2127 rest = '/' + notHost.join('.') + rest;
2128 }
2129 this.hostname = validParts.join('.');
2130 break;
2131 }
2132 }
2133 }
2134 }
2135
2136 if (this.hostname.length > hostnameMaxLen) {
2137 this.hostname = '';
2138 } else {
2139 // hostnames are always lower case.
2140 this.hostname = this.hostname.toLowerCase();
2141 }
2142
2143 if (!ipv6Hostname) {
2144 // IDNA Support: Returns a punycoded representation of "domain".
2145 // It only converts parts of the domain name that
2146 // have non-ASCII characters, i.e. it doesn't matter if
2147 // you call it with a domain that already is ASCII-only.
2148 this.hostname = punycode.toASCII(this.hostname);
2149 }
2150
2151 var p = this.port ? ':' + this.port : '';
2152 var h = this.hostname || '';
2153 this.host = h + p;
2154 this.href += this.host;
2155
2156 // strip [ and ] from the hostname
2157 // the host field still retains them, though
2158 if (ipv6Hostname) {
2159 this.hostname = this.hostname.substr(1, this.hostname.length - 2);
2160 if (rest[0] !== '/') {
2161 rest = '/' + rest;
2162 }
2163 }
2164 }
2165
2166 // now rest is set to the post-host stuff.
2167 // chop off any delim chars.
2168 if (!unsafeProtocol[lowerProto]) {
2169
2170 // First, make 100% sure that any "autoEscape" chars get
2171 // escaped, even if encodeURIComponent doesn't think they
2172 // need to be.
2173 for (var i = 0, l = autoEscape.length; i < l; i++) {
2174 var ae = autoEscape[i];
2175 if (rest.indexOf(ae) === -1)
2176 continue;
2177 var esc = encodeURIComponent(ae);
2178 if (esc === ae) {
2179 esc = escape(ae);
2180 }
2181 rest = rest.split(ae).join(esc);
2182 }
2183 }
2184
2185
2186 // chop off from the tail first.
2187 var hash = rest.indexOf('#');
2188 if (hash !== -1) {
2189 // got a fragment string.
2190 this.hash = rest.substr(hash);
2191 rest = rest.slice(0, hash);
2192 }
2193 var qm = rest.indexOf('?');
2194 if (qm !== -1) {
2195 this.search = rest.substr(qm);
2196 this.query = rest.substr(qm + 1);
2197 if (parseQueryString) {
2198 this.query = querystring.parse(this.query);
2199 }
2200 rest = rest.slice(0, qm);
2201 } else if (parseQueryString) {
2202 // no query string, but parseQueryString still requested
2203 this.search = '';
2204 this.query = {};
2205 }
2206 if (rest) this.pathname = rest;
2207 if (slashedProtocol[lowerProto] &&
2208 this.hostname && !this.pathname) {
2209 this.pathname = '/';
2210 }
2211
2212 //to support http.request
2213 if (this.pathname || this.search) {
2214 var p = this.pathname || '';
2215 var s = this.search || '';
2216 this.path = p + s;
2217 }
2218
2219 // finally, reconstruct the href based on what has been validated.
2220 this.href = this.format();
2221 return this;
2222};
2223
2224// format a parsed object into a url string
2225function urlFormat(obj) {
2226 // ensure it's an object, and not a string url.
2227 // If it's an obj, this is a no-op.
2228 // this way, you can call url_format() on strings
2229 // to clean up potentially wonky urls.
2230 if (util.isString(obj)) obj = urlParse(obj);
2231 if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
2232 return obj.format();
2233}
2234
2235Url.prototype.format = function() {
2236 var auth = this.auth || '';
2237 if (auth) {
2238 auth = encodeURIComponent(auth);
2239 auth = auth.replace(/%3A/i, ':');
2240 auth += '@';
2241 }
2242
2243 var protocol = this.protocol || '',
2244 pathname = this.pathname || '',
2245 hash = this.hash || '',
2246 host = false,
2247 query = '';
2248
2249 if (this.host) {
2250 host = auth + this.host;
2251 } else if (this.hostname) {
2252 host = auth + (this.hostname.indexOf(':') === -1 ?
2253 this.hostname :
2254 '[' + this.hostname + ']');
2255 if (this.port) {
2256 host += ':' + this.port;
2257 }
2258 }
2259
2260 if (this.query &&
2261 util.isObject(this.query) &&
2262 Object.keys(this.query).length) {
2263 query = querystring.stringify(this.query);
2264 }
2265
2266 var search = this.search || (query && ('?' + query)) || '';
2267
2268 if (protocol && protocol.substr(-1) !== ':') protocol += ':';
2269
2270 // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
2271 // unless they had them to begin with.
2272 if (this.slashes ||
2273 (!protocol || slashedProtocol[protocol]) && host !== false) {
2274 host = '//' + (host || '');
2275 if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
2276 } else if (!host) {
2277 host = '';
2278 }
2279
2280 if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
2281 if (search && search.charAt(0) !== '?') search = '?' + search;
2282
2283 pathname = pathname.replace(/[?#]/g, function(match) {
2284 return encodeURIComponent(match);
2285 });
2286 search = search.replace('#', '%23');
2287
2288 return protocol + host + pathname + search + hash;
2289};
2290
2291function urlResolve(source, relative) {
2292 return urlParse(source, false, true).resolve(relative);
2293}
2294
2295Url.prototype.resolve = function(relative) {
2296 return this.resolveObject(urlParse(relative, false, true)).format();
2297};
2298
2299function urlResolveObject(source, relative) {
2300 if (!source) return relative;
2301 return urlParse(source, false, true).resolveObject(relative);
2302}
2303
2304Url.prototype.resolveObject = function(relative) {
2305 if (util.isString(relative)) {
2306 var rel = new Url();
2307 rel.parse(relative, false, true);
2308 relative = rel;
2309 }
2310
2311 var result = new Url();
2312 var tkeys = Object.keys(this);
2313 for (var tk = 0; tk < tkeys.length; tk++) {
2314 var tkey = tkeys[tk];
2315 result[tkey] = this[tkey];
2316 }
2317
2318 // hash is always overridden, no matter what.
2319 // even href="" will remove it.
2320 result.hash = relative.hash;
2321
2322 // if the relative url is empty, then there's nothing left to do here.
2323 if (relative.href === '') {
2324 result.href = result.format();
2325 return result;
2326 }
2327
2328 // hrefs like //foo/bar always cut to the protocol.
2329 if (relative.slashes && !relative.protocol) {
2330 // take everything except the protocol from relative
2331 var rkeys = Object.keys(relative);
2332 for (var rk = 0; rk < rkeys.length; rk++) {
2333 var rkey = rkeys[rk];
2334 if (rkey !== 'protocol')
2335 result[rkey] = relative[rkey];
2336 }
2337
2338 //urlParse appends trailing / to urls like http://www.example.com
2339 if (slashedProtocol[result.protocol] &&
2340 result.hostname && !result.pathname) {
2341 result.path = result.pathname = '/';
2342 }
2343
2344 result.href = result.format();
2345 return result;
2346 }
2347
2348 if (relative.protocol && relative.protocol !== result.protocol) {
2349 // if it's a known url protocol, then changing
2350 // the protocol does weird things
2351 // first, if it's not file:, then we MUST have a host,
2352 // and if there was a path
2353 // to begin with, then we MUST have a path.
2354 // if it is file:, then the host is dropped,
2355 // because that's known to be hostless.
2356 // anything else is assumed to be absolute.
2357 if (!slashedProtocol[relative.protocol]) {
2358 var keys = Object.keys(relative);
2359 for (var v = 0; v < keys.length; v++) {
2360 var k = keys[v];
2361 result[k] = relative[k];
2362 }
2363 result.href = result.format();
2364 return result;
2365 }
2366
2367 result.protocol = relative.protocol;
2368 if (!relative.host && !hostlessProtocol[relative.protocol]) {
2369 var relPath = (relative.pathname || '').split('/');
2370 while (relPath.length && !(relative.host = relPath.shift()));
2371 if (!relative.host) relative.host = '';
2372 if (!relative.hostname) relative.hostname = '';
2373 if (relPath[0] !== '') relPath.unshift('');
2374 if (relPath.length < 2) relPath.unshift('');
2375 result.pathname = relPath.join('/');
2376 } else {
2377 result.pathname = relative.pathname;
2378 }
2379 result.search = relative.search;
2380 result.query = relative.query;
2381 result.host = relative.host || '';
2382 result.auth = relative.auth;
2383 result.hostname = relative.hostname || relative.host;
2384 result.port = relative.port;
2385 // to support http.request
2386 if (result.pathname || result.search) {
2387 var p = result.pathname || '';
2388 var s = result.search || '';
2389 result.path = p + s;
2390 }
2391 result.slashes = result.slashes || relative.slashes;
2392 result.href = result.format();
2393 return result;
2394 }
2395
2396 var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
2397 isRelAbs = (
2398 relative.host ||
2399 relative.pathname && relative.pathname.charAt(0) === '/'
2400 ),
2401 mustEndAbs = (isRelAbs || isSourceAbs ||
2402 (result.host && relative.pathname)),
2403 removeAllDots = mustEndAbs,
2404 srcPath = result.pathname && result.pathname.split('/') || [],
2405 relPath = relative.pathname && relative.pathname.split('/') || [],
2406 psychotic = result.protocol && !slashedProtocol[result.protocol];
2407
2408 // if the url is a non-slashed url, then relative
2409 // links like ../.. should be able
2410 // to crawl up to the hostname, as well. This is strange.
2411 // result.protocol has already been set by now.
2412 // Later on, put the first path part into the host field.
2413 if (psychotic) {
2414 result.hostname = '';
2415 result.port = null;
2416 if (result.host) {
2417 if (srcPath[0] === '') srcPath[0] = result.host;
2418 else srcPath.unshift(result.host);
2419 }
2420 result.host = '';
2421 if (relative.protocol) {
2422 relative.hostname = null;
2423 relative.port = null;
2424 if (relative.host) {
2425 if (relPath[0] === '') relPath[0] = relative.host;
2426 else relPath.unshift(relative.host);
2427 }
2428 relative.host = null;
2429 }
2430 mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
2431 }
2432
2433 if (isRelAbs) {
2434 // it's absolute.
2435 result.host = (relative.host || relative.host === '') ?
2436 relative.host : result.host;
2437 result.hostname = (relative.hostname || relative.hostname === '') ?
2438 relative.hostname : result.hostname;
2439 result.search = relative.search;
2440 result.query = relative.query;
2441 srcPath = relPath;
2442 // fall through to the dot-handling below.
2443 } else if (relPath.length) {
2444 // it's relative
2445 // throw away the existing file, and take the new path instead.
2446 if (!srcPath) srcPath = [];
2447 srcPath.pop();
2448 srcPath = srcPath.concat(relPath);
2449 result.search = relative.search;
2450 result.query = relative.query;
2451 } else if (!util.isNullOrUndefined(relative.search)) {
2452 // just pull out the search.
2453 // like href='?foo'.
2454 // Put this after the other two cases because it simplifies the booleans
2455 if (psychotic) {
2456 result.hostname = result.host = srcPath.shift();
2457 //occationaly the auth can get stuck only in host
2458 //this especially happens in cases like
2459 //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
2460 var authInHost = result.host && result.host.indexOf('@') > 0 ?
2461 result.host.split('@') : false;
2462 if (authInHost) {
2463 result.auth = authInHost.shift();
2464 result.host = result.hostname = authInHost.shift();
2465 }
2466 }
2467 result.search = relative.search;
2468 result.query = relative.query;
2469 //to support http.request
2470 if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
2471 result.path = (result.pathname ? result.pathname : '') +
2472 (result.search ? result.search : '');
2473 }
2474 result.href = result.format();
2475 return result;
2476 }
2477
2478 if (!srcPath.length) {
2479 // no path at all. easy.
2480 // we've already handled the other stuff above.
2481 result.pathname = null;
2482 //to support http.request
2483 if (result.search) {
2484 result.path = '/' + result.search;
2485 } else {
2486 result.path = null;
2487 }
2488 result.href = result.format();
2489 return result;
2490 }
2491
2492 // if a url ENDs in . or .., then it must get a trailing slash.
2493 // however, if it ends in anything else non-slashy,
2494 // then it must NOT get a trailing slash.
2495 var last = srcPath.slice(-1)[0];
2496 var hasTrailingSlash = (
2497 (result.host || relative.host || srcPath.length > 1) &&
2498 (last === '.' || last === '..') || last === '');
2499
2500 // strip single dots, resolve double dots to parent dir
2501 // if the path tries to go above the root, `up` ends up > 0
2502 var up = 0;
2503 for (var i = srcPath.length; i >= 0; i--) {
2504 last = srcPath[i];
2505 if (last === '.') {
2506 srcPath.splice(i, 1);
2507 } else if (last === '..') {
2508 srcPath.splice(i, 1);
2509 up++;
2510 } else if (up) {
2511 srcPath.splice(i, 1);
2512 up--;
2513 }
2514 }
2515
2516 // if the path is allowed to go above the root, restore leading ..s
2517 if (!mustEndAbs && !removeAllDots) {
2518 for (; up--; up) {
2519 srcPath.unshift('..');
2520 }
2521 }
2522
2523 if (mustEndAbs && srcPath[0] !== '' &&
2524 (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
2525 srcPath.unshift('');
2526 }
2527
2528 if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
2529 srcPath.push('');
2530 }
2531
2532 var isAbsolute = srcPath[0] === '' ||
2533 (srcPath[0] && srcPath[0].charAt(0) === '/');
2534
2535 // put the host back
2536 if (psychotic) {
2537 result.hostname = result.host = isAbsolute ? '' :
2538 srcPath.length ? srcPath.shift() : '';
2539 //occationaly the auth can get stuck only in host
2540 //this especially happens in cases like
2541 //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
2542 var authInHost = result.host && result.host.indexOf('@') > 0 ?
2543 result.host.split('@') : false;
2544 if (authInHost) {
2545 result.auth = authInHost.shift();
2546 result.host = result.hostname = authInHost.shift();
2547 }
2548 }
2549
2550 mustEndAbs = mustEndAbs || (result.host && srcPath.length);
2551
2552 if (mustEndAbs && !isAbsolute) {
2553 srcPath.unshift('');
2554 }
2555
2556 if (!srcPath.length) {
2557 result.pathname = null;
2558 result.path = null;
2559 } else {
2560 result.pathname = srcPath.join('/');
2561 }
2562
2563 //to support request.http
2564 if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
2565 result.path = (result.pathname ? result.pathname : '') +
2566 (result.search ? result.search : '');
2567 }
2568 result.auth = relative.auth || result.auth;
2569 result.slashes = result.slashes || relative.slashes;
2570 result.href = result.format();
2571 return result;
2572};
2573
2574Url.prototype.parseHost = function() {
2575 var host = this.host;
2576 var port = portPattern.exec(host);
2577 if (port) {
2578 port = port[0];
2579 if (port !== ':') {
2580 this.port = port.substr(1);
2581 }
2582 host = host.substr(0, host.length - port.length);
2583 }
2584 if (host) this.hostname = host;
2585};
2586
2587
2588/***/ }),
2589/* 21 */
2590/***/ (function(module, exports, __webpack_require__) {
2591
2592var _getIterator = __webpack_require__(136);
2593
2594var _Array$isArray = __webpack_require__(0);
2595
2596var _Symbol$iterator = __webpack_require__(138);
2597
2598var _Symbol = __webpack_require__(70);
2599
2600var unsupportedIterableToArray = __webpack_require__(106);
2601
2602function _createForOfIteratorHelper(o, allowArrayLike) {
2603 var it;
2604
2605 if (typeof _Symbol === "undefined" || o[_Symbol$iterator] == null) {
2606 if (_Array$isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
2607 if (it) o = it;
2608 var i = 0;
2609
2610 var F = function F() {};
2611
2612 return {
2613 s: F,
2614 n: function n() {
2615 if (i >= o.length) return {
2616 done: true
2617 };
2618 return {
2619 done: false,
2620 value: o[i++]
2621 };
2622 },
2623 e: function e(_e) {
2624 throw _e;
2625 },
2626 f: F
2627 };
2628 }
2629
2630 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2631 }
2632
2633 var normalCompletion = true,
2634 didErr = false,
2635 err;
2636 return {
2637 s: function s() {
2638 it = _getIterator(o);
2639 },
2640 n: function n() {
2641 var step = it.next();
2642 normalCompletion = step.done;
2643 return step;
2644 },
2645 e: function e(_e2) {
2646 didErr = true;
2647 err = _e2;
2648 },
2649 f: function f() {
2650 try {
2651 if (!normalCompletion && it["return"] != null) it["return"]();
2652 } finally {
2653 if (didErr) throw err;
2654 }
2655 }
2656 };
2657}
2658
2659module.exports = _createForOfIteratorHelper;
2660
2661/***/ }),
2662/* 22 */
2663/***/ (function(module, exports, __webpack_require__) {
2664
2665module.exports = __webpack_require__(246);
2666
2667/***/ }),
2668/* 23 */
2669/***/ (function(module, exports) {
2670
2671var hasOwnProperty = {}.hasOwnProperty;
2672module.exports = function (it, key) {
2673 return hasOwnProperty.call(it, key);
2674};
2675
2676
2677/***/ }),
2678/* 24 */
2679/***/ (function(module, exports, __webpack_require__) {
2680
2681// to indexed object, toObject with fallback for non-array-like ES3 strings
2682var IObject = __webpack_require__(88);
2683var defined = __webpack_require__(89);
2684module.exports = function (it) {
2685 return IObject(defined(it));
2686};
2687
2688
2689/***/ }),
2690/* 25 */
2691/***/ (function(module, __webpack_exports__, __webpack_require__) {
2692
2693"use strict";
2694__webpack_require__.r(__webpack_exports__);
2695/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mapSpec; });
2696/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpecMap", function() { return SpecMap; });
2697/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plugins", function() { return plugins; });
2698/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
2699/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__);
2700/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
2701/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);
2702/* harmony import */ var _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22);
2703/* harmony import */ var _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2__);
2704/* harmony import */ var _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
2705/* harmony import */ var _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_3__);
2706/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
2707/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4__);
2708/* harmony import */ var _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21);
2709/* harmony import */ var _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_5__);
2710/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
2711/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6__);
2712/* harmony import */ var _babel_runtime_corejs2_core_js_object_create__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79);
2713/* harmony import */ var _babel_runtime_corejs2_core_js_object_create__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_create__WEBPACK_IMPORTED_MODULE_7__);
2714/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(10);
2715/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_8__);
2716/* harmony import */ var _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47);
2717/* harmony import */ var _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_9__);
2718/* harmony import */ var _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(38);
2719/* harmony import */ var _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_10__);
2720/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(165);
2721/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_11__);
2722/* harmony import */ var lodash_noop__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(117);
2723/* harmony import */ var lodash_noop__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash_noop__WEBPACK_IMPORTED_MODULE_12__);
2724/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(3);
2725/* harmony import */ var _lib_refs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(168);
2726/* harmony import */ var _lib_all_of__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(172);
2727/* harmony import */ var _lib_parameters__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(173);
2728/* harmony import */ var _lib_properties__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(174);
2729/* harmony import */ var _lib_context_tree__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(175);
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749var HARD_LIMIT = 100;
2750
2751var SpecMap = /*#__PURE__*/function () {
2752 _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_10___default()(SpecMap, null, [{
2753 key: "getPluginName",
2754 value: function getPluginName(plugin) {
2755 return plugin.pluginName;
2756 }
2757 }, {
2758 key: "getPatchesOfType",
2759 value: function getPatchesOfType(patches, fn) {
2760 return patches.filter(fn);
2761 }
2762 }]);
2763
2764 function SpecMap(opts) {
2765 var _this = this;
2766
2767 _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_9___default()(this, SpecMap);
2768
2769 _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_8___default()(this, {
2770 spec: '',
2771 debugLevel: 'info',
2772 plugins: [],
2773 pluginHistory: {},
2774 errors: [],
2775 mutations: [],
2776 promisedPatches: [],
2777 state: {},
2778 patches: [],
2779 context: {},
2780 contextTree: new _lib_context_tree__WEBPACK_IMPORTED_MODULE_18__["default"](),
2781 showDebug: false,
2782 allPatches: [],
2783 // only populated if showDebug is true
2784 pluginProp: 'specMap',
2785 libMethods: _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_corejs2_core_js_object_create__WEBPACK_IMPORTED_MODULE_7___default()(this), _lib__WEBPACK_IMPORTED_MODULE_13__["default"], {
2786 getInstance: function getInstance() {
2787 return _this;
2788 }
2789 }),
2790 allowMetaPatches: false
2791 }, opts); // Lib methods bound
2792
2793
2794 this.get = this._get.bind(this); // eslint-disable-line no-underscore-dangle
2795
2796 this.getContext = this._getContext.bind(this); // eslint-disable-line no-underscore-dangle
2797
2798 this.hasRun = this._hasRun.bind(this); // eslint-disable-line no-underscore-dangle
2799
2800 this.wrappedPlugins = this.plugins.map(this.wrapPlugin.bind(this)).filter(_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isFunction); // Initial patch(s)
2801
2802 this.patches.push(_lib__WEBPACK_IMPORTED_MODULE_13__["default"].add([], this.spec));
2803 this.patches.push(_lib__WEBPACK_IMPORTED_MODULE_13__["default"].context([], this.context));
2804 this.updatePatches(this.patches);
2805 }
2806
2807 _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_10___default()(SpecMap, [{
2808 key: "debug",
2809 value: function debug(level) {
2810 if (this.debugLevel === level) {
2811 var _console;
2812
2813 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2814 args[_key - 1] = arguments[_key];
2815 }
2816
2817 (_console = console).log.apply(_console, args); // eslint-disable-line no-console
2818
2819 }
2820 }
2821 }, {
2822 key: "verbose",
2823 value: function verbose(header) {
2824 if (this.debugLevel === 'verbose') {
2825 var _console2;
2826
2827 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2828 args[_key2 - 1] = arguments[_key2];
2829 }
2830
2831 (_console2 = console).log.apply(_console2, ["[".concat(header, "] ")].concat(args)); // eslint-disable-line no-console
2832
2833 }
2834 }
2835 }, {
2836 key: "wrapPlugin",
2837 value: function wrapPlugin(plugin, name) {
2838 var pathDiscriminator = this.pathDiscriminator;
2839 var ctx = null;
2840 var fn;
2841
2842 if (plugin[this.pluginProp]) {
2843 ctx = plugin;
2844 fn = plugin[this.pluginProp];
2845 } else if (_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isFunction(plugin)) {
2846 fn = plugin;
2847 } else if (_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isObject(plugin)) {
2848 fn = createKeyBasedPlugin(plugin);
2849 }
2850
2851 return _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_8___default()(fn.bind(ctx), {
2852 pluginName: plugin.name || name,
2853 isGenerator: _lib__WEBPACK_IMPORTED_MODULE_13__["default"].isGenerator(fn)
2854 }); // Expected plugin interface: {key: string, plugin: fn*}
2855 // This traverses depth-first and immediately applies yielded patches.
2856 // This strategy should work well for most plugins (including the built-ins).
2857 // We might consider making this (traversing & application) configurable later.
2858
2859 function createKeyBasedPlugin(pluginObj) {
2860 var isSubPath = function isSubPath(path, tested) {
2861 if (!_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(path)) {
2862 return true;
2863 }
2864
2865 return path.every(function (val, i) {
2866 return val === tested[i];
2867 });
2868 };
2869
2870 return /*#__PURE__*/_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(function generator(patches, specmap) {
2871 var _marked, refCache, _iterator, _step, patch, traverse;
2872
2873 return _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function generator$(_context2) {
2874 while (1) {
2875 switch (_context2.prev = _context2.next) {
2876 case 0:
2877 traverse = function _traverse(obj, path, patch) {
2878 var parentIndex, parent, indexOfFirstProperties, isRootProperties, traversed, _i, _Object$keys, key, val, updatedPath, isObj, objRef, isWithinPathDiscriminator;
2879
2880 return _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.wrap(function traverse$(_context) {
2881 while (1) {
2882 switch (_context.prev = _context.next) {
2883 case 0:
2884 if (_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isObject(obj)) {
2885 _context.next = 6;
2886 break;
2887 }
2888
2889 if (!(pluginObj.key === path[path.length - 1])) {
2890 _context.next = 4;
2891 break;
2892 }
2893
2894 _context.next = 4;
2895 return pluginObj.plugin(obj, pluginObj.key, path, specmap);
2896
2897 case 4:
2898 _context.next = 30;
2899 break;
2900
2901 case 6:
2902 parentIndex = path.length - 1;
2903 parent = path[parentIndex];
2904 indexOfFirstProperties = path.indexOf('properties');
2905 isRootProperties = parent === 'properties' && parentIndex === indexOfFirstProperties;
2906 traversed = specmap.allowMetaPatches && refCache[obj.$$ref]; // eslint-disable-next-line no-restricted-syntax
2907
2908 _i = 0, _Object$keys = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(obj);
2909
2910 case 12:
2911 if (!(_i < _Object$keys.length)) {
2912 _context.next = 30;
2913 break;
2914 }
2915
2916 key = _Object$keys[_i];
2917 val = obj[key];
2918 updatedPath = path.concat(key);
2919 isObj = _lib__WEBPACK_IMPORTED_MODULE_13__["default"].isObject(val);
2920 objRef = obj.$$ref;
2921
2922 if (traversed) {
2923 _context.next = 22;
2924 break;
2925 }
2926
2927 if (!isObj) {
2928 _context.next = 22;
2929 break;
2930 }
2931
2932 // Only store the ref if it exists
2933 if (specmap.allowMetaPatches && objRef) {
2934 refCache[objRef] = true;
2935 }
2936
2937 return _context.delegateYield(traverse(val, updatedPath, patch), "t0", 22);
2938
2939 case 22:
2940 if (!(!isRootProperties && key === pluginObj.key)) {
2941 _context.next = 27;
2942 break;
2943 }
2944
2945 isWithinPathDiscriminator = isSubPath(pathDiscriminator, path);
2946
2947 if (!(!pathDiscriminator || isWithinPathDiscriminator)) {
2948 _context.next = 27;
2949 break;
2950 }
2951
2952 _context.next = 27;
2953 return pluginObj.plugin(val, key, updatedPath, specmap, patch);
2954
2955 case 27:
2956 _i++;
2957 _context.next = 12;
2958 break;
2959
2960 case 30:
2961 case "end":
2962 return _context.stop();
2963 }
2964 }
2965 }, _marked);
2966 };
2967
2968 _marked = /*#__PURE__*/_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_3___default.a.mark(traverse);
2969 refCache = {}; // eslint-disable-next-line no-restricted-syntax
2970
2971 _iterator = _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_5___default()(patches.filter(_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isAdditiveMutation));
2972 _context2.prev = 4;
2973
2974 _iterator.s();
2975
2976 case 6:
2977 if ((_step = _iterator.n()).done) {
2978 _context2.next = 11;
2979 break;
2980 }
2981
2982 patch = _step.value;
2983 return _context2.delegateYield(traverse(patch.value, patch.path, patch), "t0", 9);
2984
2985 case 9:
2986 _context2.next = 6;
2987 break;
2988
2989 case 11:
2990 _context2.next = 16;
2991 break;
2992
2993 case 13:
2994 _context2.prev = 13;
2995 _context2.t1 = _context2["catch"](4);
2996
2997 _iterator.e(_context2.t1);
2998
2999 case 16:
3000 _context2.prev = 16;
3001
3002 _iterator.f();
3003
3004 return _context2.finish(16);
3005
3006 case 19:
3007 case "end":
3008 return _context2.stop();
3009 }
3010 }
3011 }, generator, null, [[4, 13, 16, 19]]);
3012 });
3013 }
3014 }
3015 }, {
3016 key: "nextPlugin",
3017 value: function nextPlugin() {
3018 var _this2 = this;
3019
3020 // Array.prototype.find doesn't work in IE 11 :(
3021 return lodash_find__WEBPACK_IMPORTED_MODULE_11___default()(this.wrappedPlugins, function (plugin) {
3022 var mutations = _this2.getMutationsForPlugin(plugin);
3023
3024 return mutations.length > 0;
3025 });
3026 }
3027 }, {
3028 key: "nextPromisedPatch",
3029 value: function nextPromisedPatch() {
3030 if (this.promisedPatches.length > 0) {
3031 return _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default.a.race(this.promisedPatches.map(function (patch) {
3032 return patch.value;
3033 }));
3034 }
3035
3036 return undefined;
3037 }
3038 }, {
3039 key: "getPluginHistory",
3040 value: function getPluginHistory(plugin) {
3041 var name = this.constructor.getPluginName(plugin);
3042 return this.pluginHistory[name] || [];
3043 }
3044 }, {
3045 key: "getPluginRunCount",
3046 value: function getPluginRunCount(plugin) {
3047 return this.getPluginHistory(plugin).length;
3048 }
3049 }, {
3050 key: "getPluginHistoryTip",
3051 value: function getPluginHistoryTip(plugin) {
3052 var history = this.getPluginHistory(plugin);
3053 var val = history && history[history.length - 1];
3054 return val || {};
3055 }
3056 }, {
3057 key: "getPluginMutationIndex",
3058 value: function getPluginMutationIndex(plugin) {
3059 var mi = this.getPluginHistoryTip(plugin).mutationIndex;
3060 return typeof mi !== 'number' ? -1 : mi;
3061 }
3062 }, {
3063 key: "updatePluginHistory",
3064 value: function updatePluginHistory(plugin, val) {
3065 var name = this.constructor.getPluginName(plugin);
3066 this.pluginHistory[name] = this.pluginHistory[name] || [];
3067 this.pluginHistory[name].push(val);
3068 }
3069 }, {
3070 key: "updatePatches",
3071 value: function updatePatches(patches) {
3072 var _this3 = this;
3073
3074 _lib__WEBPACK_IMPORTED_MODULE_13__["default"].normalizeArray(patches).forEach(function (patch) {
3075 if (patch instanceof Error) {
3076 _this3.errors.push(patch);
3077
3078 return;
3079 }
3080
3081 try {
3082 if (!_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isObject(patch)) {
3083 _this3.debug('updatePatches', 'Got a non-object patch', patch);
3084
3085 return;
3086 }
3087
3088 if (_this3.showDebug) {
3089 _this3.allPatches.push(patch);
3090 }
3091
3092 if (_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isPromise(patch.value)) {
3093 _this3.promisedPatches.push(patch);
3094
3095 _this3.promisedPatchThen(patch);
3096
3097 return;
3098 }
3099
3100 if (_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isContextPatch(patch)) {
3101 _this3.setContext(patch.path, patch.value);
3102
3103 return;
3104 }
3105
3106 if (_lib__WEBPACK_IMPORTED_MODULE_13__["default"].isMutation(patch)) {
3107 _this3.updateMutations(patch);
3108
3109 return;
3110 }
3111 } catch (e) {
3112 console.error(e); // eslint-disable-line no-console
3113
3114 _this3.errors.push(e);
3115 }
3116 });
3117 }
3118 }, {
3119 key: "updateMutations",
3120 value: function updateMutations(patch) {
3121 if (_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(patch.value) === 'object' && !_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(patch.value) && this.allowMetaPatches) {
3122 patch.value = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()({}, patch.value);
3123 }
3124
3125 var result = _lib__WEBPACK_IMPORTED_MODULE_13__["default"].applyPatch(this.state, patch, {
3126 allowMetaPatches: this.allowMetaPatches
3127 });
3128
3129 if (result) {
3130 this.mutations.push(patch);
3131 this.state = result;
3132 }
3133 }
3134 }, {
3135 key: "removePromisedPatch",
3136 value: function removePromisedPatch(patch) {
3137 var index = this.promisedPatches.indexOf(patch);
3138
3139 if (index < 0) {
3140 this.debug("Tried to remove a promisedPatch that isn't there!");
3141 return;
3142 }
3143
3144 this.promisedPatches.splice(index, 1);
3145 }
3146 }, {
3147 key: "promisedPatchThen",
3148 value: function promisedPatchThen(patch) {
3149 var _this4 = this;
3150
3151 patch.value = patch.value.then(function (val) {
3152 var promisedPatch = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()({}, patch), {}, {
3153 value: val
3154 });
3155
3156 _this4.removePromisedPatch(patch);
3157
3158 _this4.updatePatches(promisedPatch);
3159 }).catch(function (e) {
3160 _this4.removePromisedPatch(patch);
3161
3162 _this4.updatePatches(e);
3163 });
3164 return patch.value;
3165 }
3166 }, {
3167 key: "getMutations",
3168 value: function getMutations(from, to) {
3169 from = from || 0;
3170
3171 if (typeof to !== 'number') {
3172 to = this.mutations.length;
3173 }
3174
3175 return this.mutations.slice(from, to);
3176 }
3177 }, {
3178 key: "getCurrentMutations",
3179 value: function getCurrentMutations() {
3180 return this.getMutationsForPlugin(this.getCurrentPlugin());
3181 }
3182 }, {
3183 key: "getMutationsForPlugin",
3184 value: function getMutationsForPlugin(plugin) {
3185 var tip = this.getPluginMutationIndex(plugin);
3186 return this.getMutations(tip + 1);
3187 }
3188 }, {
3189 key: "getCurrentPlugin",
3190 value: function getCurrentPlugin() {
3191 return this.currentPlugin;
3192 }
3193 }, {
3194 key: "getLib",
3195 value: function getLib() {
3196 return this.libMethods;
3197 } // eslint-disable-next-line no-underscore-dangle
3198
3199 }, {
3200 key: "_get",
3201 value: function _get(path) {
3202 return _lib__WEBPACK_IMPORTED_MODULE_13__["default"].getIn(this.state, path);
3203 } // eslint-disable-next-line no-underscore-dangle
3204
3205 }, {
3206 key: "_getContext",
3207 value: function _getContext(path) {
3208 return this.contextTree.get(path);
3209 }
3210 }, {
3211 key: "setContext",
3212 value: function setContext(path, value) {
3213 return this.contextTree.set(path, value);
3214 } // eslint-disable-next-line no-underscore-dangle
3215
3216 }, {
3217 key: "_hasRun",
3218 value: function _hasRun(count) {
3219 var times = this.getPluginRunCount(this.getCurrentPlugin());
3220 return times > (count || 0);
3221 }
3222 }, {
3223 key: "dispatch",
3224 value: function dispatch() {
3225 var _this5 = this;
3226
3227 var that = this;
3228 var plugin = this.nextPlugin();
3229
3230 if (!plugin) {
3231 var nextPromise = this.nextPromisedPatch();
3232
3233 if (nextPromise) {
3234 return nextPromise.then(function () {
3235 return _this5.dispatch();
3236 }).catch(function () {
3237 return _this5.dispatch();
3238 });
3239 } // We're done!
3240
3241
3242 var result = {
3243 spec: this.state,
3244 errors: this.errors
3245 };
3246
3247 if (this.showDebug) {
3248 result.patches = this.allPatches;
3249 }
3250
3251 return _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default.a.resolve(result);
3252 } // Makes sure plugin isn't running an endless loop
3253
3254
3255 that.pluginCount = that.pluginCount || {};
3256 that.pluginCount[plugin] = (that.pluginCount[plugin] || 0) + 1;
3257
3258 if (that.pluginCount[plugin] > HARD_LIMIT) {
3259 return _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default.a.resolve({
3260 spec: that.state,
3261 errors: that.errors.concat(new Error("We've reached a hard limit of ".concat(HARD_LIMIT, " plugin runs")))
3262 });
3263 } // A different plugin runs, wait for all promises to resolve, then retry
3264
3265
3266 if (plugin !== this.currentPlugin && this.promisedPatches.length) {
3267 var promises = this.promisedPatches.map(function (p) {
3268 return p.value;
3269 }); // Waits for all to settle instead of Promise.all which stops on rejection
3270
3271 return _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default.a.all(promises.map(function (promise) {
3272 return promise.then(lodash_noop__WEBPACK_IMPORTED_MODULE_12___default.a, lodash_noop__WEBPACK_IMPORTED_MODULE_12___default.a);
3273 })).then(function () {
3274 return _this5.dispatch();
3275 });
3276 } // Ok, run the plugin
3277
3278
3279 return executePlugin();
3280
3281 function executePlugin() {
3282 that.currentPlugin = plugin;
3283 var mutations = that.getCurrentMutations();
3284 var lastMutationIndex = that.mutations.length - 1;
3285
3286 try {
3287 if (plugin.isGenerator) {
3288 // eslint-disable-next-line no-restricted-syntax
3289 var _iterator2 = _babel_runtime_corejs2_helpers_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_5___default()(plugin(mutations, that.getLib())),
3290 _step2;
3291
3292 try {
3293 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
3294 var yieldedPatches = _step2.value;
3295 updatePatches(yieldedPatches);
3296 }
3297 } catch (err) {
3298 _iterator2.e(err);
3299 } finally {
3300 _iterator2.f();
3301 }
3302 } else {
3303 var newPatches = plugin(mutations, that.getLib());
3304 updatePatches(newPatches);
3305 }
3306 } catch (e) {
3307 console.error(e); // eslint-disable-line no-console
3308
3309 updatePatches([_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_corejs2_core_js_object_create__WEBPACK_IMPORTED_MODULE_7___default()(e), {
3310 plugin: plugin
3311 })]);
3312 } finally {
3313 that.updatePluginHistory(plugin, {
3314 mutationIndex: lastMutationIndex
3315 });
3316 }
3317
3318 return that.dispatch();
3319 }
3320
3321 function updatePatches(patches) {
3322 if (patches) {
3323 patches = _lib__WEBPACK_IMPORTED_MODULE_13__["default"].fullyNormalizeArray(patches);
3324 that.updatePatches(patches, plugin);
3325 }
3326 }
3327 }
3328 }]);
3329
3330 return SpecMap;
3331}();
3332
3333function mapSpec(opts) {
3334 return new SpecMap(opts).dispatch();
3335}
3336var plugins = {
3337 refs: _lib_refs__WEBPACK_IMPORTED_MODULE_14__["default"],
3338 allOf: _lib_all_of__WEBPACK_IMPORTED_MODULE_15__["default"],
3339 parameters: _lib_parameters__WEBPACK_IMPORTED_MODULE_16__["default"],
3340 properties: _lib_properties__WEBPACK_IMPORTED_MODULE_17__["default"]
3341};
3342
3343
3344/***/ }),
3345/* 26 */
3346/***/ (function(module, exports, __webpack_require__) {
3347
3348// optional / simple context binding
3349var aFunction = __webpack_require__(33);
3350module.exports = function (fn, that, length) {
3351 aFunction(fn);
3352 if (that === undefined) return fn;
3353 switch (length) {
3354 case 1: return function (a) {
3355 return fn.call(that, a);
3356 };
3357 case 2: return function (a, b) {
3358 return fn.call(that, a, b);
3359 };
3360 case 3: return function (a, b, c) {
3361 return fn.call(that, a, b, c);
3362 };
3363 }
3364 return function (/* ...args */) {
3365 return fn.apply(that, arguments);
3366 };
3367};
3368
3369
3370/***/ }),
3371/* 27 */
3372/***/ (function(module, exports, __webpack_require__) {
3373
3374var dP = __webpack_require__(19);
3375var createDesc = __webpack_require__(49);
3376module.exports = __webpack_require__(16) ? function (object, key, value) {
3377 return dP.f(object, key, createDesc(1, value));
3378} : function (object, key, value) {
3379 object[key] = value;
3380 return object;
3381};
3382
3383
3384/***/ }),
3385/* 28 */
3386/***/ (function(module, exports) {
3387
3388module.exports = function (exec) {
3389 try {
3390 return !!exec();
3391 } catch (e) {
3392 return true;
3393 }
3394};
3395
3396
3397/***/ }),
3398/* 29 */
3399/***/ (function(module, exports, __webpack_require__) {
3400
3401"use strict";
3402/* WEBPACK VAR INJECTION */(function(global) {/*!
3403 * The buffer module from node.js, for the browser.
3404 *
3405 * @author Feross Aboukhadijeh <http://feross.org>
3406 * @license MIT
3407 */
3408/* eslint-disable no-proto */
3409
3410
3411
3412var base64 = __webpack_require__(269)
3413var ieee754 = __webpack_require__(270)
3414var isArray = __webpack_require__(271)
3415
3416exports.Buffer = Buffer
3417exports.SlowBuffer = SlowBuffer
3418exports.INSPECT_MAX_BYTES = 50
3419
3420/**
3421 * If `Buffer.TYPED_ARRAY_SUPPORT`:
3422 * === true Use Uint8Array implementation (fastest)
3423 * === false Use Object implementation (most compatible, even IE6)
3424 *
3425 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
3426 * Opera 11.6+, iOS 4.2+.
3427 *
3428 * Due to various browser bugs, sometimes the Object implementation will be used even
3429 * when the browser supports typed arrays.
3430 *
3431 * Note:
3432 *
3433 * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
3434 * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
3435 *
3436 * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
3437 *
3438 * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
3439 * incorrect length in some situations.
3440
3441 * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
3442 * get the Object implementation, which is slower but behaves correctly.
3443 */
3444Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
3445 ? global.TYPED_ARRAY_SUPPORT
3446 : typedArraySupport()
3447
3448/*
3449 * Export kMaxLength after typed array support is determined.
3450 */
3451exports.kMaxLength = kMaxLength()
3452
3453function typedArraySupport () {
3454 try {
3455 var arr = new Uint8Array(1)
3456 arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
3457 return arr.foo() === 42 && // typed array instances can be augmented
3458 typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
3459 arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
3460 } catch (e) {
3461 return false
3462 }
3463}
3464
3465function kMaxLength () {
3466 return Buffer.TYPED_ARRAY_SUPPORT
3467 ? 0x7fffffff
3468 : 0x3fffffff
3469}
3470
3471function createBuffer (that, length) {
3472 if (kMaxLength() < length) {
3473 throw new RangeError('Invalid typed array length')
3474 }
3475 if (Buffer.TYPED_ARRAY_SUPPORT) {
3476 // Return an augmented `Uint8Array` instance, for best performance
3477 that = new Uint8Array(length)
3478 that.__proto__ = Buffer.prototype
3479 } else {
3480 // Fallback: Return an object instance of the Buffer class
3481 if (that === null) {
3482 that = new Buffer(length)
3483 }
3484 that.length = length
3485 }
3486
3487 return that
3488}
3489
3490/**
3491 * The Buffer constructor returns instances of `Uint8Array` that have their
3492 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
3493 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
3494 * and the `Uint8Array` methods. Square bracket notation works as expected -- it
3495 * returns a single octet.
3496 *
3497 * The `Uint8Array` prototype remains unmodified.
3498 */
3499
3500function Buffer (arg, encodingOrOffset, length) {
3501 if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
3502 return new Buffer(arg, encodingOrOffset, length)
3503 }
3504
3505 // Common case.
3506 if (typeof arg === 'number') {
3507 if (typeof encodingOrOffset === 'string') {
3508 throw new Error(
3509 'If encoding is specified then the first argument must be a string'
3510 )
3511 }
3512 return allocUnsafe(this, arg)
3513 }
3514 return from(this, arg, encodingOrOffset, length)
3515}
3516
3517Buffer.poolSize = 8192 // not used by this implementation
3518
3519// TODO: Legacy, not needed anymore. Remove in next major version.
3520Buffer._augment = function (arr) {
3521 arr.__proto__ = Buffer.prototype
3522 return arr
3523}
3524
3525function from (that, value, encodingOrOffset, length) {
3526 if (typeof value === 'number') {
3527 throw new TypeError('"value" argument must not be a number')
3528 }
3529
3530 if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
3531 return fromArrayBuffer(that, value, encodingOrOffset, length)
3532 }
3533
3534 if (typeof value === 'string') {
3535 return fromString(that, value, encodingOrOffset)
3536 }
3537
3538 return fromObject(that, value)
3539}
3540
3541/**
3542 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
3543 * if value is a number.
3544 * Buffer.from(str[, encoding])
3545 * Buffer.from(array)
3546 * Buffer.from(buffer)
3547 * Buffer.from(arrayBuffer[, byteOffset[, length]])
3548 **/
3549Buffer.from = function (value, encodingOrOffset, length) {
3550 return from(null, value, encodingOrOffset, length)
3551}
3552
3553if (Buffer.TYPED_ARRAY_SUPPORT) {
3554 Buffer.prototype.__proto__ = Uint8Array.prototype
3555 Buffer.__proto__ = Uint8Array
3556 if (typeof Symbol !== 'undefined' && Symbol.species &&
3557 Buffer[Symbol.species] === Buffer) {
3558 // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
3559 Object.defineProperty(Buffer, Symbol.species, {
3560 value: null,
3561 configurable: true
3562 })
3563 }
3564}
3565
3566function assertSize (size) {
3567 if (typeof size !== 'number') {
3568 throw new TypeError('"size" argument must be a number')
3569 } else if (size < 0) {
3570 throw new RangeError('"size" argument must not be negative')
3571 }
3572}
3573
3574function alloc (that, size, fill, encoding) {
3575 assertSize(size)
3576 if (size <= 0) {
3577 return createBuffer(that, size)
3578 }
3579 if (fill !== undefined) {
3580 // Only pay attention to encoding if it's a string. This
3581 // prevents accidentally sending in a number that would
3582 // be interpretted as a start offset.
3583 return typeof encoding === 'string'
3584 ? createBuffer(that, size).fill(fill, encoding)
3585 : createBuffer(that, size).fill(fill)
3586 }
3587 return createBuffer(that, size)
3588}
3589
3590/**
3591 * Creates a new filled Buffer instance.
3592 * alloc(size[, fill[, encoding]])
3593 **/
3594Buffer.alloc = function (size, fill, encoding) {
3595 return alloc(null, size, fill, encoding)
3596}
3597
3598function allocUnsafe (that, size) {
3599 assertSize(size)
3600 that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
3601 if (!Buffer.TYPED_ARRAY_SUPPORT) {
3602 for (var i = 0; i < size; ++i) {
3603 that[i] = 0
3604 }
3605 }
3606 return that
3607}
3608
3609/**
3610 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
3611 * */
3612Buffer.allocUnsafe = function (size) {
3613 return allocUnsafe(null, size)
3614}
3615/**
3616 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
3617 */
3618Buffer.allocUnsafeSlow = function (size) {
3619 return allocUnsafe(null, size)
3620}
3621
3622function fromString (that, string, encoding) {
3623 if (typeof encoding !== 'string' || encoding === '') {
3624 encoding = 'utf8'
3625 }
3626
3627 if (!Buffer.isEncoding(encoding)) {
3628 throw new TypeError('"encoding" must be a valid string encoding')
3629 }
3630
3631 var length = byteLength(string, encoding) | 0
3632 that = createBuffer(that, length)
3633
3634 var actual = that.write(string, encoding)
3635
3636 if (actual !== length) {
3637 // Writing a hex string, for example, that contains invalid characters will
3638 // cause everything after the first invalid character to be ignored. (e.g.
3639 // 'abxxcd' will be treated as 'ab')
3640 that = that.slice(0, actual)
3641 }
3642
3643 return that
3644}
3645
3646function fromArrayLike (that, array) {
3647 var length = array.length < 0 ? 0 : checked(array.length) | 0
3648 that = createBuffer(that, length)
3649 for (var i = 0; i < length; i += 1) {
3650 that[i] = array[i] & 255
3651 }
3652 return that
3653}
3654
3655function fromArrayBuffer (that, array, byteOffset, length) {
3656 array.byteLength // this throws if `array` is not a valid ArrayBuffer
3657
3658 if (byteOffset < 0 || array.byteLength < byteOffset) {
3659 throw new RangeError('\'offset\' is out of bounds')
3660 }
3661
3662 if (array.byteLength < byteOffset + (length || 0)) {
3663 throw new RangeError('\'length\' is out of bounds')
3664 }
3665
3666 if (byteOffset === undefined && length === undefined) {
3667 array = new Uint8Array(array)
3668 } else if (length === undefined) {
3669 array = new Uint8Array(array, byteOffset)
3670 } else {
3671 array = new Uint8Array(array, byteOffset, length)
3672 }
3673
3674 if (Buffer.TYPED_ARRAY_SUPPORT) {
3675 // Return an augmented `Uint8Array` instance, for best performance
3676 that = array
3677 that.__proto__ = Buffer.prototype
3678 } else {
3679 // Fallback: Return an object instance of the Buffer class
3680 that = fromArrayLike(that, array)
3681 }
3682 return that
3683}
3684
3685function fromObject (that, obj) {
3686 if (Buffer.isBuffer(obj)) {
3687 var len = checked(obj.length) | 0
3688 that = createBuffer(that, len)
3689
3690 if (that.length === 0) {
3691 return that
3692 }
3693
3694 obj.copy(that, 0, 0, len)
3695 return that
3696 }
3697
3698 if (obj) {
3699 if ((typeof ArrayBuffer !== 'undefined' &&
3700 obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
3701 if (typeof obj.length !== 'number' || isnan(obj.length)) {
3702 return createBuffer(that, 0)
3703 }
3704 return fromArrayLike(that, obj)
3705 }
3706
3707 if (obj.type === 'Buffer' && isArray(obj.data)) {
3708 return fromArrayLike(that, obj.data)
3709 }
3710 }
3711
3712 throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
3713}
3714
3715function checked (length) {
3716 // Note: cannot use `length < kMaxLength()` here because that fails when
3717 // length is NaN (which is otherwise coerced to zero.)
3718 if (length >= kMaxLength()) {
3719 throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
3720 'size: 0x' + kMaxLength().toString(16) + ' bytes')
3721 }
3722 return length | 0
3723}
3724
3725function SlowBuffer (length) {
3726 if (+length != length) { // eslint-disable-line eqeqeq
3727 length = 0
3728 }
3729 return Buffer.alloc(+length)
3730}
3731
3732Buffer.isBuffer = function isBuffer (b) {
3733 return !!(b != null && b._isBuffer)
3734}
3735
3736Buffer.compare = function compare (a, b) {
3737 if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
3738 throw new TypeError('Arguments must be Buffers')
3739 }
3740
3741 if (a === b) return 0
3742
3743 var x = a.length
3744 var y = b.length
3745
3746 for (var i = 0, len = Math.min(x, y); i < len; ++i) {
3747 if (a[i] !== b[i]) {
3748 x = a[i]
3749 y = b[i]
3750 break
3751 }
3752 }
3753
3754 if (x < y) return -1
3755 if (y < x) return 1
3756 return 0
3757}
3758
3759Buffer.isEncoding = function isEncoding (encoding) {
3760 switch (String(encoding).toLowerCase()) {
3761 case 'hex':
3762 case 'utf8':
3763 case 'utf-8':
3764 case 'ascii':
3765 case 'latin1':
3766 case 'binary':
3767 case 'base64':
3768 case 'ucs2':
3769 case 'ucs-2':
3770 case 'utf16le':
3771 case 'utf-16le':
3772 return true
3773 default:
3774 return false
3775 }
3776}
3777
3778Buffer.concat = function concat (list, length) {
3779 if (!isArray(list)) {
3780 throw new TypeError('"list" argument must be an Array of Buffers')
3781 }
3782
3783 if (list.length === 0) {
3784 return Buffer.alloc(0)
3785 }
3786
3787 var i
3788 if (length === undefined) {
3789 length = 0
3790 for (i = 0; i < list.length; ++i) {
3791 length += list[i].length
3792 }
3793 }
3794
3795 var buffer = Buffer.allocUnsafe(length)
3796 var pos = 0
3797 for (i = 0; i < list.length; ++i) {
3798 var buf = list[i]
3799 if (!Buffer.isBuffer(buf)) {
3800 throw new TypeError('"list" argument must be an Array of Buffers')
3801 }
3802 buf.copy(buffer, pos)
3803 pos += buf.length
3804 }
3805 return buffer
3806}
3807
3808function byteLength (string, encoding) {
3809 if (Buffer.isBuffer(string)) {
3810 return string.length
3811 }
3812 if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
3813 (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
3814 return string.byteLength
3815 }
3816 if (typeof string !== 'string') {
3817 string = '' + string
3818 }
3819
3820 var len = string.length
3821 if (len === 0) return 0
3822
3823 // Use a for loop to avoid recursion
3824 var loweredCase = false
3825 for (;;) {
3826 switch (encoding) {
3827 case 'ascii':
3828 case 'latin1':
3829 case 'binary':
3830 return len
3831 case 'utf8':
3832 case 'utf-8':
3833 case undefined:
3834 return utf8ToBytes(string).length
3835 case 'ucs2':
3836 case 'ucs-2':
3837 case 'utf16le':
3838 case 'utf-16le':
3839 return len * 2
3840 case 'hex':
3841 return len >>> 1
3842 case 'base64':
3843 return base64ToBytes(string).length
3844 default:
3845 if (loweredCase) return utf8ToBytes(string).length // assume utf8
3846 encoding = ('' + encoding).toLowerCase()
3847 loweredCase = true
3848 }
3849 }
3850}
3851Buffer.byteLength = byteLength
3852
3853function slowToString (encoding, start, end) {
3854 var loweredCase = false
3855
3856 // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
3857 // property of a typed array.
3858
3859 // This behaves neither like String nor Uint8Array in that we set start/end
3860 // to their upper/lower bounds if the value passed is out of range.
3861 // undefined is handled specially as per ECMA-262 6th Edition,
3862 // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
3863 if (start === undefined || start < 0) {
3864 start = 0
3865 }
3866 // Return early if start > this.length. Done here to prevent potential uint32
3867 // coercion fail below.
3868 if (start > this.length) {
3869 return ''
3870 }
3871
3872 if (end === undefined || end > this.length) {
3873 end = this.length
3874 }
3875
3876 if (end <= 0) {
3877 return ''
3878 }
3879
3880 // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
3881 end >>>= 0
3882 start >>>= 0
3883
3884 if (end <= start) {
3885 return ''
3886 }
3887
3888 if (!encoding) encoding = 'utf8'
3889
3890 while (true) {
3891 switch (encoding) {
3892 case 'hex':
3893 return hexSlice(this, start, end)
3894
3895 case 'utf8':
3896 case 'utf-8':
3897 return utf8Slice(this, start, end)
3898
3899 case 'ascii':
3900 return asciiSlice(this, start, end)
3901
3902 case 'latin1':
3903 case 'binary':
3904 return latin1Slice(this, start, end)
3905
3906 case 'base64':
3907 return base64Slice(this, start, end)
3908
3909 case 'ucs2':
3910 case 'ucs-2':
3911 case 'utf16le':
3912 case 'utf-16le':
3913 return utf16leSlice(this, start, end)
3914
3915 default:
3916 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
3917 encoding = (encoding + '').toLowerCase()
3918 loweredCase = true
3919 }
3920 }
3921}
3922
3923// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
3924// Buffer instances.
3925Buffer.prototype._isBuffer = true
3926
3927function swap (b, n, m) {
3928 var i = b[n]
3929 b[n] = b[m]
3930 b[m] = i
3931}
3932
3933Buffer.prototype.swap16 = function swap16 () {
3934 var len = this.length
3935 if (len % 2 !== 0) {
3936 throw new RangeError('Buffer size must be a multiple of 16-bits')
3937 }
3938 for (var i = 0; i < len; i += 2) {
3939 swap(this, i, i + 1)
3940 }
3941 return this
3942}
3943
3944Buffer.prototype.swap32 = function swap32 () {
3945 var len = this.length
3946 if (len % 4 !== 0) {
3947 throw new RangeError('Buffer size must be a multiple of 32-bits')
3948 }
3949 for (var i = 0; i < len; i += 4) {
3950 swap(this, i, i + 3)
3951 swap(this, i + 1, i + 2)
3952 }
3953 return this
3954}
3955
3956Buffer.prototype.swap64 = function swap64 () {
3957 var len = this.length
3958 if (len % 8 !== 0) {
3959 throw new RangeError('Buffer size must be a multiple of 64-bits')
3960 }
3961 for (var i = 0; i < len; i += 8) {
3962 swap(this, i, i + 7)
3963 swap(this, i + 1, i + 6)
3964 swap(this, i + 2, i + 5)
3965 swap(this, i + 3, i + 4)
3966 }
3967 return this
3968}
3969
3970Buffer.prototype.toString = function toString () {
3971 var length = this.length | 0
3972 if (length === 0) return ''
3973 if (arguments.length === 0) return utf8Slice(this, 0, length)
3974 return slowToString.apply(this, arguments)
3975}
3976
3977Buffer.prototype.equals = function equals (b) {
3978 if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
3979 if (this === b) return true
3980 return Buffer.compare(this, b) === 0
3981}
3982
3983Buffer.prototype.inspect = function inspect () {
3984 var str = ''
3985 var max = exports.INSPECT_MAX_BYTES
3986 if (this.length > 0) {
3987 str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
3988 if (this.length > max) str += ' ... '
3989 }
3990 return '<Buffer ' + str + '>'
3991}
3992
3993Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
3994 if (!Buffer.isBuffer(target)) {
3995 throw new TypeError('Argument must be a Buffer')
3996 }
3997
3998 if (start === undefined) {
3999 start = 0
4000 }
4001 if (end === undefined) {
4002 end = target ? target.length : 0
4003 }
4004 if (thisStart === undefined) {
4005 thisStart = 0
4006 }
4007 if (thisEnd === undefined) {
4008 thisEnd = this.length
4009 }
4010
4011 if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
4012 throw new RangeError('out of range index')
4013 }
4014
4015 if (thisStart >= thisEnd && start >= end) {
4016 return 0
4017 }
4018 if (thisStart >= thisEnd) {
4019 return -1
4020 }
4021 if (start >= end) {
4022 return 1
4023 }
4024
4025 start >>>= 0
4026 end >>>= 0
4027 thisStart >>>= 0
4028 thisEnd >>>= 0
4029
4030 if (this === target) return 0
4031
4032 var x = thisEnd - thisStart
4033 var y = end - start
4034 var len = Math.min(x, y)
4035
4036 var thisCopy = this.slice(thisStart, thisEnd)
4037 var targetCopy = target.slice(start, end)
4038
4039 for (var i = 0; i < len; ++i) {
4040 if (thisCopy[i] !== targetCopy[i]) {
4041 x = thisCopy[i]
4042 y = targetCopy[i]
4043 break
4044 }
4045 }
4046
4047 if (x < y) return -1
4048 if (y < x) return 1
4049 return 0
4050}
4051
4052// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
4053// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
4054//
4055// Arguments:
4056// - buffer - a Buffer to search
4057// - val - a string, Buffer, or number
4058// - byteOffset - an index into `buffer`; will be clamped to an int32
4059// - encoding - an optional encoding, relevant is val is a string
4060// - dir - true for indexOf, false for lastIndexOf
4061function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
4062 // Empty buffer means no match
4063 if (buffer.length === 0) return -1
4064
4065 // Normalize byteOffset
4066 if (typeof byteOffset === 'string') {
4067 encoding = byteOffset
4068 byteOffset = 0
4069 } else if (byteOffset > 0x7fffffff) {
4070 byteOffset = 0x7fffffff
4071 } else if (byteOffset < -0x80000000) {
4072 byteOffset = -0x80000000
4073 }
4074 byteOffset = +byteOffset // Coerce to Number.
4075 if (isNaN(byteOffset)) {
4076 // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
4077 byteOffset = dir ? 0 : (buffer.length - 1)
4078 }
4079
4080 // Normalize byteOffset: negative offsets start from the end of the buffer
4081 if (byteOffset < 0) byteOffset = buffer.length + byteOffset
4082 if (byteOffset >= buffer.length) {
4083 if (dir) return -1
4084 else byteOffset = buffer.length - 1
4085 } else if (byteOffset < 0) {
4086 if (dir) byteOffset = 0
4087 else return -1
4088 }
4089
4090 // Normalize val
4091 if (typeof val === 'string') {
4092 val = Buffer.from(val, encoding)
4093 }
4094
4095 // Finally, search either indexOf (if dir is true) or lastIndexOf
4096 if (Buffer.isBuffer(val)) {
4097 // Special case: looking for empty string/buffer always fails
4098 if (val.length === 0) {
4099 return -1
4100 }
4101 return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
4102 } else if (typeof val === 'number') {
4103 val = val & 0xFF // Search for a byte value [0-255]
4104 if (Buffer.TYPED_ARRAY_SUPPORT &&
4105 typeof Uint8Array.prototype.indexOf === 'function') {
4106 if (dir) {
4107 return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
4108 } else {
4109 return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
4110 }
4111 }
4112 return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
4113 }
4114
4115 throw new TypeError('val must be string, number or Buffer')
4116}
4117
4118function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
4119 var indexSize = 1
4120 var arrLength = arr.length
4121 var valLength = val.length
4122
4123 if (encoding !== undefined) {
4124 encoding = String(encoding).toLowerCase()
4125 if (encoding === 'ucs2' || encoding === 'ucs-2' ||
4126 encoding === 'utf16le' || encoding === 'utf-16le') {
4127 if (arr.length < 2 || val.length < 2) {
4128 return -1
4129 }
4130 indexSize = 2
4131 arrLength /= 2
4132 valLength /= 2
4133 byteOffset /= 2
4134 }
4135 }
4136
4137 function read (buf, i) {
4138 if (indexSize === 1) {
4139 return buf[i]
4140 } else {
4141 return buf.readUInt16BE(i * indexSize)
4142 }
4143 }
4144
4145 var i
4146 if (dir) {
4147 var foundIndex = -1
4148 for (i = byteOffset; i < arrLength; i++) {
4149 if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
4150 if (foundIndex === -1) foundIndex = i
4151 if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
4152 } else {
4153 if (foundIndex !== -1) i -= i - foundIndex
4154 foundIndex = -1
4155 }
4156 }
4157 } else {
4158 if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
4159 for (i = byteOffset; i >= 0; i--) {
4160 var found = true
4161 for (var j = 0; j < valLength; j++) {
4162 if (read(arr, i + j) !== read(val, j)) {
4163 found = false
4164 break
4165 }
4166 }
4167 if (found) return i
4168 }
4169 }
4170
4171 return -1
4172}
4173
4174Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
4175 return this.indexOf(val, byteOffset, encoding) !== -1
4176}
4177
4178Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
4179 return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
4180}
4181
4182Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
4183 return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
4184}
4185
4186function hexWrite (buf, string, offset, length) {
4187 offset = Number(offset) || 0
4188 var remaining = buf.length - offset
4189 if (!length) {
4190 length = remaining
4191 } else {
4192 length = Number(length)
4193 if (length > remaining) {
4194 length = remaining
4195 }
4196 }
4197
4198 // must be an even number of digits
4199 var strLen = string.length
4200 if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
4201
4202 if (length > strLen / 2) {
4203 length = strLen / 2
4204 }
4205 for (var i = 0; i < length; ++i) {
4206 var parsed = parseInt(string.substr(i * 2, 2), 16)
4207 if (isNaN(parsed)) return i
4208 buf[offset + i] = parsed
4209 }
4210 return i
4211}
4212
4213function utf8Write (buf, string, offset, length) {
4214 return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
4215}
4216
4217function asciiWrite (buf, string, offset, length) {
4218 return blitBuffer(asciiToBytes(string), buf, offset, length)
4219}
4220
4221function latin1Write (buf, string, offset, length) {
4222 return asciiWrite(buf, string, offset, length)
4223}
4224
4225function base64Write (buf, string, offset, length) {
4226 return blitBuffer(base64ToBytes(string), buf, offset, length)
4227}
4228
4229function ucs2Write (buf, string, offset, length) {
4230 return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
4231}
4232
4233Buffer.prototype.write = function write (string, offset, length, encoding) {
4234 // Buffer#write(string)
4235 if (offset === undefined) {
4236 encoding = 'utf8'
4237 length = this.length
4238 offset = 0
4239 // Buffer#write(string, encoding)
4240 } else if (length === undefined && typeof offset === 'string') {
4241 encoding = offset
4242 length = this.length
4243 offset = 0
4244 // Buffer#write(string, offset[, length][, encoding])
4245 } else if (isFinite(offset)) {
4246 offset = offset | 0
4247 if (isFinite(length)) {
4248 length = length | 0
4249 if (encoding === undefined) encoding = 'utf8'
4250 } else {
4251 encoding = length
4252 length = undefined
4253 }
4254 // legacy write(string, encoding, offset, length) - remove in v0.13
4255 } else {
4256 throw new Error(
4257 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
4258 )
4259 }
4260
4261 var remaining = this.length - offset
4262 if (length === undefined || length > remaining) length = remaining
4263
4264 if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
4265 throw new RangeError('Attempt to write outside buffer bounds')
4266 }
4267
4268 if (!encoding) encoding = 'utf8'
4269
4270 var loweredCase = false
4271 for (;;) {
4272 switch (encoding) {
4273 case 'hex':
4274 return hexWrite(this, string, offset, length)
4275
4276 case 'utf8':
4277 case 'utf-8':
4278 return utf8Write(this, string, offset, length)
4279
4280 case 'ascii':
4281 return asciiWrite(this, string, offset, length)
4282
4283 case 'latin1':
4284 case 'binary':
4285 return latin1Write(this, string, offset, length)
4286
4287 case 'base64':
4288 // Warning: maxLength not taken into account in base64Write
4289 return base64Write(this, string, offset, length)
4290
4291 case 'ucs2':
4292 case 'ucs-2':
4293 case 'utf16le':
4294 case 'utf-16le':
4295 return ucs2Write(this, string, offset, length)
4296
4297 default:
4298 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
4299 encoding = ('' + encoding).toLowerCase()
4300 loweredCase = true
4301 }
4302 }
4303}
4304
4305Buffer.prototype.toJSON = function toJSON () {
4306 return {
4307 type: 'Buffer',
4308 data: Array.prototype.slice.call(this._arr || this, 0)
4309 }
4310}
4311
4312function base64Slice (buf, start, end) {
4313 if (start === 0 && end === buf.length) {
4314 return base64.fromByteArray(buf)
4315 } else {
4316 return base64.fromByteArray(buf.slice(start, end))
4317 }
4318}
4319
4320function utf8Slice (buf, start, end) {
4321 end = Math.min(buf.length, end)
4322 var res = []
4323
4324 var i = start
4325 while (i < end) {
4326 var firstByte = buf[i]
4327 var codePoint = null
4328 var bytesPerSequence = (firstByte > 0xEF) ? 4
4329 : (firstByte > 0xDF) ? 3
4330 : (firstByte > 0xBF) ? 2
4331 : 1
4332
4333 if (i + bytesPerSequence <= end) {
4334 var secondByte, thirdByte, fourthByte, tempCodePoint
4335
4336 switch (bytesPerSequence) {
4337 case 1:
4338 if (firstByte < 0x80) {
4339 codePoint = firstByte
4340 }
4341 break
4342 case 2:
4343 secondByte = buf[i + 1]
4344 if ((secondByte & 0xC0) === 0x80) {
4345 tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
4346 if (tempCodePoint > 0x7F) {
4347 codePoint = tempCodePoint
4348 }
4349 }
4350 break
4351 case 3:
4352 secondByte = buf[i + 1]
4353 thirdByte = buf[i + 2]
4354 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
4355 tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
4356 if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
4357 codePoint = tempCodePoint
4358 }
4359 }
4360 break
4361 case 4:
4362 secondByte = buf[i + 1]
4363 thirdByte = buf[i + 2]
4364 fourthByte = buf[i + 3]
4365 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
4366 tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
4367 if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
4368 codePoint = tempCodePoint
4369 }
4370 }
4371 }
4372 }
4373
4374 if (codePoint === null) {
4375 // we did not generate a valid codePoint so insert a
4376 // replacement char (U+FFFD) and advance only 1 byte
4377 codePoint = 0xFFFD
4378 bytesPerSequence = 1
4379 } else if (codePoint > 0xFFFF) {
4380 // encode to utf16 (surrogate pair dance)
4381 codePoint -= 0x10000
4382 res.push(codePoint >>> 10 & 0x3FF | 0xD800)
4383 codePoint = 0xDC00 | codePoint & 0x3FF
4384 }
4385
4386 res.push(codePoint)
4387 i += bytesPerSequence
4388 }
4389
4390 return decodeCodePointsArray(res)
4391}
4392
4393// Based on http://stackoverflow.com/a/22747272/680742, the browser with
4394// the lowest limit is Chrome, with 0x10000 args.
4395// We go 1 magnitude less, for safety
4396var MAX_ARGUMENTS_LENGTH = 0x1000
4397
4398function decodeCodePointsArray (codePoints) {
4399 var len = codePoints.length
4400 if (len <= MAX_ARGUMENTS_LENGTH) {
4401 return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
4402 }
4403
4404 // Decode in chunks to avoid "call stack size exceeded".
4405 var res = ''
4406 var i = 0
4407 while (i < len) {
4408 res += String.fromCharCode.apply(
4409 String,
4410 codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
4411 )
4412 }
4413 return res
4414}
4415
4416function asciiSlice (buf, start, end) {
4417 var ret = ''
4418 end = Math.min(buf.length, end)
4419
4420 for (var i = start; i < end; ++i) {
4421 ret += String.fromCharCode(buf[i] & 0x7F)
4422 }
4423 return ret
4424}
4425
4426function latin1Slice (buf, start, end) {
4427 var ret = ''
4428 end = Math.min(buf.length, end)
4429
4430 for (var i = start; i < end; ++i) {
4431 ret += String.fromCharCode(buf[i])
4432 }
4433 return ret
4434}
4435
4436function hexSlice (buf, start, end) {
4437 var len = buf.length
4438
4439 if (!start || start < 0) start = 0
4440 if (!end || end < 0 || end > len) end = len
4441
4442 var out = ''
4443 for (var i = start; i < end; ++i) {
4444 out += toHex(buf[i])
4445 }
4446 return out
4447}
4448
4449function utf16leSlice (buf, start, end) {
4450 var bytes = buf.slice(start, end)
4451 var res = ''
4452 for (var i = 0; i < bytes.length; i += 2) {
4453 res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
4454 }
4455 return res
4456}
4457
4458Buffer.prototype.slice = function slice (start, end) {
4459 var len = this.length
4460 start = ~~start
4461 end = end === undefined ? len : ~~end
4462
4463 if (start < 0) {
4464 start += len
4465 if (start < 0) start = 0
4466 } else if (start > len) {
4467 start = len
4468 }
4469
4470 if (end < 0) {
4471 end += len
4472 if (end < 0) end = 0
4473 } else if (end > len) {
4474 end = len
4475 }
4476
4477 if (end < start) end = start
4478
4479 var newBuf
4480 if (Buffer.TYPED_ARRAY_SUPPORT) {
4481 newBuf = this.subarray(start, end)
4482 newBuf.__proto__ = Buffer.prototype
4483 } else {
4484 var sliceLen = end - start
4485 newBuf = new Buffer(sliceLen, undefined)
4486 for (var i = 0; i < sliceLen; ++i) {
4487 newBuf[i] = this[i + start]
4488 }
4489 }
4490
4491 return newBuf
4492}
4493
4494/*
4495 * Need to make sure that buffer isn't trying to write out of bounds.
4496 */
4497function checkOffset (offset, ext, length) {
4498 if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
4499 if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
4500}
4501
4502Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
4503 offset = offset | 0
4504 byteLength = byteLength | 0
4505 if (!noAssert) checkOffset(offset, byteLength, this.length)
4506
4507 var val = this[offset]
4508 var mul = 1
4509 var i = 0
4510 while (++i < byteLength && (mul *= 0x100)) {
4511 val += this[offset + i] * mul
4512 }
4513
4514 return val
4515}
4516
4517Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
4518 offset = offset | 0
4519 byteLength = byteLength | 0
4520 if (!noAssert) {
4521 checkOffset(offset, byteLength, this.length)
4522 }
4523
4524 var val = this[offset + --byteLength]
4525 var mul = 1
4526 while (byteLength > 0 && (mul *= 0x100)) {
4527 val += this[offset + --byteLength] * mul
4528 }
4529
4530 return val
4531}
4532
4533Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
4534 if (!noAssert) checkOffset(offset, 1, this.length)
4535 return this[offset]
4536}
4537
4538Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
4539 if (!noAssert) checkOffset(offset, 2, this.length)
4540 return this[offset] | (this[offset + 1] << 8)
4541}
4542
4543Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
4544 if (!noAssert) checkOffset(offset, 2, this.length)
4545 return (this[offset] << 8) | this[offset + 1]
4546}
4547
4548Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
4549 if (!noAssert) checkOffset(offset, 4, this.length)
4550
4551 return ((this[offset]) |
4552 (this[offset + 1] << 8) |
4553 (this[offset + 2] << 16)) +
4554 (this[offset + 3] * 0x1000000)
4555}
4556
4557Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
4558 if (!noAssert) checkOffset(offset, 4, this.length)
4559
4560 return (this[offset] * 0x1000000) +
4561 ((this[offset + 1] << 16) |
4562 (this[offset + 2] << 8) |
4563 this[offset + 3])
4564}
4565
4566Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
4567 offset = offset | 0
4568 byteLength = byteLength | 0
4569 if (!noAssert) checkOffset(offset, byteLength, this.length)
4570
4571 var val = this[offset]
4572 var mul = 1
4573 var i = 0
4574 while (++i < byteLength && (mul *= 0x100)) {
4575 val += this[offset + i] * mul
4576 }
4577 mul *= 0x80
4578
4579 if (val >= mul) val -= Math.pow(2, 8 * byteLength)
4580
4581 return val
4582}
4583
4584Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
4585 offset = offset | 0
4586 byteLength = byteLength | 0
4587 if (!noAssert) checkOffset(offset, byteLength, this.length)
4588
4589 var i = byteLength
4590 var mul = 1
4591 var val = this[offset + --i]
4592 while (i > 0 && (mul *= 0x100)) {
4593 val += this[offset + --i] * mul
4594 }
4595 mul *= 0x80
4596
4597 if (val >= mul) val -= Math.pow(2, 8 * byteLength)
4598
4599 return val
4600}
4601
4602Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
4603 if (!noAssert) checkOffset(offset, 1, this.length)
4604 if (!(this[offset] & 0x80)) return (this[offset])
4605 return ((0xff - this[offset] + 1) * -1)
4606}
4607
4608Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
4609 if (!noAssert) checkOffset(offset, 2, this.length)
4610 var val = this[offset] | (this[offset + 1] << 8)
4611 return (val & 0x8000) ? val | 0xFFFF0000 : val
4612}
4613
4614Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
4615 if (!noAssert) checkOffset(offset, 2, this.length)
4616 var val = this[offset + 1] | (this[offset] << 8)
4617 return (val & 0x8000) ? val | 0xFFFF0000 : val
4618}
4619
4620Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
4621 if (!noAssert) checkOffset(offset, 4, this.length)
4622
4623 return (this[offset]) |
4624 (this[offset + 1] << 8) |
4625 (this[offset + 2] << 16) |
4626 (this[offset + 3] << 24)
4627}
4628
4629Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
4630 if (!noAssert) checkOffset(offset, 4, this.length)
4631
4632 return (this[offset] << 24) |
4633 (this[offset + 1] << 16) |
4634 (this[offset + 2] << 8) |
4635 (this[offset + 3])
4636}
4637
4638Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
4639 if (!noAssert) checkOffset(offset, 4, this.length)
4640 return ieee754.read(this, offset, true, 23, 4)
4641}
4642
4643Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
4644 if (!noAssert) checkOffset(offset, 4, this.length)
4645 return ieee754.read(this, offset, false, 23, 4)
4646}
4647
4648Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
4649 if (!noAssert) checkOffset(offset, 8, this.length)
4650 return ieee754.read(this, offset, true, 52, 8)
4651}
4652
4653Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
4654 if (!noAssert) checkOffset(offset, 8, this.length)
4655 return ieee754.read(this, offset, false, 52, 8)
4656}
4657
4658function checkInt (buf, value, offset, ext, max, min) {
4659 if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
4660 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
4661 if (offset + ext > buf.length) throw new RangeError('Index out of range')
4662}
4663
4664Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
4665 value = +value
4666 offset = offset | 0
4667 byteLength = byteLength | 0
4668 if (!noAssert) {
4669 var maxBytes = Math.pow(2, 8 * byteLength) - 1
4670 checkInt(this, value, offset, byteLength, maxBytes, 0)
4671 }
4672
4673 var mul = 1
4674 var i = 0
4675 this[offset] = value & 0xFF
4676 while (++i < byteLength && (mul *= 0x100)) {
4677 this[offset + i] = (value / mul) & 0xFF
4678 }
4679
4680 return offset + byteLength
4681}
4682
4683Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
4684 value = +value
4685 offset = offset | 0
4686 byteLength = byteLength | 0
4687 if (!noAssert) {
4688 var maxBytes = Math.pow(2, 8 * byteLength) - 1
4689 checkInt(this, value, offset, byteLength, maxBytes, 0)
4690 }
4691
4692 var i = byteLength - 1
4693 var mul = 1
4694 this[offset + i] = value & 0xFF
4695 while (--i >= 0 && (mul *= 0x100)) {
4696 this[offset + i] = (value / mul) & 0xFF
4697 }
4698
4699 return offset + byteLength
4700}
4701
4702Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
4703 value = +value
4704 offset = offset | 0
4705 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
4706 if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
4707 this[offset] = (value & 0xff)
4708 return offset + 1
4709}
4710
4711function objectWriteUInt16 (buf, value, offset, littleEndian) {
4712 if (value < 0) value = 0xffff + value + 1
4713 for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
4714 buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
4715 (littleEndian ? i : 1 - i) * 8
4716 }
4717}
4718
4719Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
4720 value = +value
4721 offset = offset | 0
4722 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
4723 if (Buffer.TYPED_ARRAY_SUPPORT) {
4724 this[offset] = (value & 0xff)
4725 this[offset + 1] = (value >>> 8)
4726 } else {
4727 objectWriteUInt16(this, value, offset, true)
4728 }
4729 return offset + 2
4730}
4731
4732Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
4733 value = +value
4734 offset = offset | 0
4735 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
4736 if (Buffer.TYPED_ARRAY_SUPPORT) {
4737 this[offset] = (value >>> 8)
4738 this[offset + 1] = (value & 0xff)
4739 } else {
4740 objectWriteUInt16(this, value, offset, false)
4741 }
4742 return offset + 2
4743}
4744
4745function objectWriteUInt32 (buf, value, offset, littleEndian) {
4746 if (value < 0) value = 0xffffffff + value + 1
4747 for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
4748 buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
4749 }
4750}
4751
4752Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
4753 value = +value
4754 offset = offset | 0
4755 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
4756 if (Buffer.TYPED_ARRAY_SUPPORT) {
4757 this[offset + 3] = (value >>> 24)
4758 this[offset + 2] = (value >>> 16)
4759 this[offset + 1] = (value >>> 8)
4760 this[offset] = (value & 0xff)
4761 } else {
4762 objectWriteUInt32(this, value, offset, true)
4763 }
4764 return offset + 4
4765}
4766
4767Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
4768 value = +value
4769 offset = offset | 0
4770 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
4771 if (Buffer.TYPED_ARRAY_SUPPORT) {
4772 this[offset] = (value >>> 24)
4773 this[offset + 1] = (value >>> 16)
4774 this[offset + 2] = (value >>> 8)
4775 this[offset + 3] = (value & 0xff)
4776 } else {
4777 objectWriteUInt32(this, value, offset, false)
4778 }
4779 return offset + 4
4780}
4781
4782Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
4783 value = +value
4784 offset = offset | 0
4785 if (!noAssert) {
4786 var limit = Math.pow(2, 8 * byteLength - 1)
4787
4788 checkInt(this, value, offset, byteLength, limit - 1, -limit)
4789 }
4790
4791 var i = 0
4792 var mul = 1
4793 var sub = 0
4794 this[offset] = value & 0xFF
4795 while (++i < byteLength && (mul *= 0x100)) {
4796 if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
4797 sub = 1
4798 }
4799 this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
4800 }
4801
4802 return offset + byteLength
4803}
4804
4805Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
4806 value = +value
4807 offset = offset | 0
4808 if (!noAssert) {
4809 var limit = Math.pow(2, 8 * byteLength - 1)
4810
4811 checkInt(this, value, offset, byteLength, limit - 1, -limit)
4812 }
4813
4814 var i = byteLength - 1
4815 var mul = 1
4816 var sub = 0
4817 this[offset + i] = value & 0xFF
4818 while (--i >= 0 && (mul *= 0x100)) {
4819 if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
4820 sub = 1
4821 }
4822 this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
4823 }
4824
4825 return offset + byteLength
4826}
4827
4828Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
4829 value = +value
4830 offset = offset | 0
4831 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
4832 if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
4833 if (value < 0) value = 0xff + value + 1
4834 this[offset] = (value & 0xff)
4835 return offset + 1
4836}
4837
4838Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
4839 value = +value
4840 offset = offset | 0
4841 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
4842 if (Buffer.TYPED_ARRAY_SUPPORT) {
4843 this[offset] = (value & 0xff)
4844 this[offset + 1] = (value >>> 8)
4845 } else {
4846 objectWriteUInt16(this, value, offset, true)
4847 }
4848 return offset + 2
4849}
4850
4851Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
4852 value = +value
4853 offset = offset | 0
4854 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
4855 if (Buffer.TYPED_ARRAY_SUPPORT) {
4856 this[offset] = (value >>> 8)
4857 this[offset + 1] = (value & 0xff)
4858 } else {
4859 objectWriteUInt16(this, value, offset, false)
4860 }
4861 return offset + 2
4862}
4863
4864Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
4865 value = +value
4866 offset = offset | 0
4867 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
4868 if (Buffer.TYPED_ARRAY_SUPPORT) {
4869 this[offset] = (value & 0xff)
4870 this[offset + 1] = (value >>> 8)
4871 this[offset + 2] = (value >>> 16)
4872 this[offset + 3] = (value >>> 24)
4873 } else {
4874 objectWriteUInt32(this, value, offset, true)
4875 }
4876 return offset + 4
4877}
4878
4879Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
4880 value = +value
4881 offset = offset | 0
4882 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
4883 if (value < 0) value = 0xffffffff + value + 1
4884 if (Buffer.TYPED_ARRAY_SUPPORT) {
4885 this[offset] = (value >>> 24)
4886 this[offset + 1] = (value >>> 16)
4887 this[offset + 2] = (value >>> 8)
4888 this[offset + 3] = (value & 0xff)
4889 } else {
4890 objectWriteUInt32(this, value, offset, false)
4891 }
4892 return offset + 4
4893}
4894
4895function checkIEEE754 (buf, value, offset, ext, max, min) {
4896 if (offset + ext > buf.length) throw new RangeError('Index out of range')
4897 if (offset < 0) throw new RangeError('Index out of range')
4898}
4899
4900function writeFloat (buf, value, offset, littleEndian, noAssert) {
4901 if (!noAssert) {
4902 checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
4903 }
4904 ieee754.write(buf, value, offset, littleEndian, 23, 4)
4905 return offset + 4
4906}
4907
4908Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
4909 return writeFloat(this, value, offset, true, noAssert)
4910}
4911
4912Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
4913 return writeFloat(this, value, offset, false, noAssert)
4914}
4915
4916function writeDouble (buf, value, offset, littleEndian, noAssert) {
4917 if (!noAssert) {
4918 checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
4919 }
4920 ieee754.write(buf, value, offset, littleEndian, 52, 8)
4921 return offset + 8
4922}
4923
4924Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
4925 return writeDouble(this, value, offset, true, noAssert)
4926}
4927
4928Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
4929 return writeDouble(this, value, offset, false, noAssert)
4930}
4931
4932// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
4933Buffer.prototype.copy = function copy (target, targetStart, start, end) {
4934 if (!start) start = 0
4935 if (!end && end !== 0) end = this.length
4936 if (targetStart >= target.length) targetStart = target.length
4937 if (!targetStart) targetStart = 0
4938 if (end > 0 && end < start) end = start
4939
4940 // Copy 0 bytes; we're done
4941 if (end === start) return 0
4942 if (target.length === 0 || this.length === 0) return 0
4943
4944 // Fatal error conditions
4945 if (targetStart < 0) {
4946 throw new RangeError('targetStart out of bounds')
4947 }
4948 if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
4949 if (end < 0) throw new RangeError('sourceEnd out of bounds')
4950
4951 // Are we oob?
4952 if (end > this.length) end = this.length
4953 if (target.length - targetStart < end - start) {
4954 end = target.length - targetStart + start
4955 }
4956
4957 var len = end - start
4958 var i
4959
4960 if (this === target && start < targetStart && targetStart < end) {
4961 // descending copy from end
4962 for (i = len - 1; i >= 0; --i) {
4963 target[i + targetStart] = this[i + start]
4964 }
4965 } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
4966 // ascending copy from start
4967 for (i = 0; i < len; ++i) {
4968 target[i + targetStart] = this[i + start]
4969 }
4970 } else {
4971 Uint8Array.prototype.set.call(
4972 target,
4973 this.subarray(start, start + len),
4974 targetStart
4975 )
4976 }
4977
4978 return len
4979}
4980
4981// Usage:
4982// buffer.fill(number[, offset[, end]])
4983// buffer.fill(buffer[, offset[, end]])
4984// buffer.fill(string[, offset[, end]][, encoding])
4985Buffer.prototype.fill = function fill (val, start, end, encoding) {
4986 // Handle string cases:
4987 if (typeof val === 'string') {
4988 if (typeof start === 'string') {
4989 encoding = start
4990 start = 0
4991 end = this.length
4992 } else if (typeof end === 'string') {
4993 encoding = end
4994 end = this.length
4995 }
4996 if (val.length === 1) {
4997 var code = val.charCodeAt(0)
4998 if (code < 256) {
4999 val = code
5000 }
5001 }
5002 if (encoding !== undefined && typeof encoding !== 'string') {
5003 throw new TypeError('encoding must be a string')
5004 }
5005 if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
5006 throw new TypeError('Unknown encoding: ' + encoding)
5007 }
5008 } else if (typeof val === 'number') {
5009 val = val & 255
5010 }
5011
5012 // Invalid ranges are not set to a default, so can range check early.
5013 if (start < 0 || this.length < start || this.length < end) {
5014 throw new RangeError('Out of range index')
5015 }
5016
5017 if (end <= start) {
5018 return this
5019 }
5020
5021 start = start >>> 0
5022 end = end === undefined ? this.length : end >>> 0
5023
5024 if (!val) val = 0
5025
5026 var i
5027 if (typeof val === 'number') {
5028 for (i = start; i < end; ++i) {
5029 this[i] = val
5030 }
5031 } else {
5032 var bytes = Buffer.isBuffer(val)
5033 ? val
5034 : utf8ToBytes(new Buffer(val, encoding).toString())
5035 var len = bytes.length
5036 for (i = 0; i < end - start; ++i) {
5037 this[i + start] = bytes[i % len]
5038 }
5039 }
5040
5041 return this
5042}
5043
5044// HELPER FUNCTIONS
5045// ================
5046
5047var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
5048
5049function base64clean (str) {
5050 // Node strips out invalid characters like \n and \t from the string, base64-js does not
5051 str = stringtrim(str).replace(INVALID_BASE64_RE, '')
5052 // Node converts strings with length < 2 to ''
5053 if (str.length < 2) return ''
5054 // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
5055 while (str.length % 4 !== 0) {
5056 str = str + '='
5057 }
5058 return str
5059}
5060
5061function stringtrim (str) {
5062 if (str.trim) return str.trim()
5063 return str.replace(/^\s+|\s+$/g, '')
5064}
5065
5066function toHex (n) {
5067 if (n < 16) return '0' + n.toString(16)
5068 return n.toString(16)
5069}
5070
5071function utf8ToBytes (string, units) {
5072 units = units || Infinity
5073 var codePoint
5074 var length = string.length
5075 var leadSurrogate = null
5076 var bytes = []
5077
5078 for (var i = 0; i < length; ++i) {
5079 codePoint = string.charCodeAt(i)
5080
5081 // is surrogate component
5082 if (codePoint > 0xD7FF && codePoint < 0xE000) {
5083 // last char was a lead
5084 if (!leadSurrogate) {
5085 // no lead yet
5086 if (codePoint > 0xDBFF) {
5087 // unexpected trail
5088 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
5089 continue
5090 } else if (i + 1 === length) {
5091 // unpaired lead
5092 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
5093 continue
5094 }
5095
5096 // valid lead
5097 leadSurrogate = codePoint
5098
5099 continue
5100 }
5101
5102 // 2 leads in a row
5103 if (codePoint < 0xDC00) {
5104 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
5105 leadSurrogate = codePoint
5106 continue
5107 }
5108
5109 // valid surrogate pair
5110 codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
5111 } else if (leadSurrogate) {
5112 // valid bmp char, but last char was a lead
5113 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
5114 }
5115
5116 leadSurrogate = null
5117
5118 // encode utf8
5119 if (codePoint < 0x80) {
5120 if ((units -= 1) < 0) break
5121 bytes.push(codePoint)
5122 } else if (codePoint < 0x800) {
5123 if ((units -= 2) < 0) break
5124 bytes.push(
5125 codePoint >> 0x6 | 0xC0,
5126 codePoint & 0x3F | 0x80
5127 )
5128 } else if (codePoint < 0x10000) {
5129 if ((units -= 3) < 0) break
5130 bytes.push(
5131 codePoint >> 0xC | 0xE0,
5132 codePoint >> 0x6 & 0x3F | 0x80,
5133 codePoint & 0x3F | 0x80
5134 )
5135 } else if (codePoint < 0x110000) {
5136 if ((units -= 4) < 0) break
5137 bytes.push(
5138 codePoint >> 0x12 | 0xF0,
5139 codePoint >> 0xC & 0x3F | 0x80,
5140 codePoint >> 0x6 & 0x3F | 0x80,
5141 codePoint & 0x3F | 0x80
5142 )
5143 } else {
5144 throw new Error('Invalid code point')
5145 }
5146 }
5147
5148 return bytes
5149}
5150
5151function asciiToBytes (str) {
5152 var byteArray = []
5153 for (var i = 0; i < str.length; ++i) {
5154 // Node's code seems to be doing this and not & 0x7F..
5155 byteArray.push(str.charCodeAt(i) & 0xFF)
5156 }
5157 return byteArray
5158}
5159
5160function utf16leToBytes (str, units) {
5161 var c, hi, lo
5162 var byteArray = []
5163 for (var i = 0; i < str.length; ++i) {
5164 if ((units -= 2) < 0) break
5165
5166 c = str.charCodeAt(i)
5167 hi = c >> 8
5168 lo = c % 256
5169 byteArray.push(lo)
5170 byteArray.push(hi)
5171 }
5172
5173 return byteArray
5174}
5175
5176function base64ToBytes (str) {
5177 return base64.toByteArray(base64clean(str))
5178}
5179
5180function blitBuffer (src, dst, offset, length) {
5181 for (var i = 0; i < length; ++i) {
5182 if ((i + offset >= dst.length) || (i >= src.length)) break
5183 dst[i + offset] = src[i]
5184 }
5185 return i
5186}
5187
5188function isnan (val) {
5189 return val !== val // eslint-disable-line no-self-compare
5190}
5191
5192/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(101)))
5193
5194/***/ }),
5195/* 30 */
5196/***/ (function(module, exports, __webpack_require__) {
5197
5198var baseGetTag = __webpack_require__(130),
5199 isObject = __webpack_require__(35);
5200
5201/** `Object#toString` result references. */
5202var asyncTag = '[object AsyncFunction]',
5203 funcTag = '[object Function]',
5204 genTag = '[object GeneratorFunction]',
5205 proxyTag = '[object Proxy]';
5206
5207/**
5208 * Checks if `value` is classified as a `Function` object.
5209 *
5210 * @static
5211 * @memberOf _
5212 * @since 0.1.0
5213 * @category Lang
5214 * @param {*} value The value to check.
5215 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
5216 * @example
5217 *
5218 * _.isFunction(_);
5219 * // => true
5220 *
5221 * _.isFunction(/abc/);
5222 * // => false
5223 */
5224function isFunction(value) {
5225 if (!isObject(value)) {
5226 return false;
5227 }
5228 // The use of `Object#toString` avoids issues with the `typeof` operator
5229 // in Safari 9 which returns 'object' for typed arrays and other constructors.
5230 var tag = baseGetTag(value);
5231 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
5232}
5233
5234module.exports = isFunction;
5235
5236
5237/***/ }),
5238/* 31 */
5239/***/ (function(module, exports, __webpack_require__) {
5240
5241var baseGet = __webpack_require__(152);
5242
5243/**
5244 * Gets the value at `path` of `object`. If the resolved value is
5245 * `undefined`, the `defaultValue` is returned in its place.
5246 *
5247 * @static
5248 * @memberOf _
5249 * @since 3.7.0
5250 * @category Object
5251 * @param {Object} object The object to query.
5252 * @param {Array|string} path The path of the property to get.
5253 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
5254 * @returns {*} Returns the resolved value.
5255 * @example
5256 *
5257 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
5258 *
5259 * _.get(object, 'a[0].b.c');
5260 * // => 3
5261 *
5262 * _.get(object, ['a', '0', 'b', 'c']);
5263 * // => 3
5264 *
5265 * _.get(object, 'a.b.c', 'default');
5266 * // => 'default'
5267 */
5268function get(object, path, defaultValue) {
5269 var result = object == null ? undefined : baseGet(object, path);
5270 return result === undefined ? defaultValue : result;
5271}
5272
5273module.exports = get;
5274
5275
5276/***/ }),
5277/* 32 */
5278/***/ (function(module, __webpack_exports__, __webpack_require__) {
5279
5280"use strict";
5281__webpack_require__.r(__webpack_exports__);
5282/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeDisallowedCharacters", function() { return encodeDisallowedCharacters; });
5283/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return stylize; });
5284/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
5285/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__);
5286/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
5287/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);
5288/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
5289/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2__);
5290/* harmony import */ var _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
5291/* harmony import */ var _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__);
5292
5293
5294
5295
5296
5297var _require = __webpack_require__(29),
5298 Buffer = _require.Buffer;
5299
5300var isRfc3986Reserved = function isRfc3986Reserved(char) {
5301 return ":/?#[]@!$&'()*+,;=".indexOf(char) > -1;
5302};
5303
5304var isRrc3986Unreserved = function isRrc3986Unreserved(char) {
5305 return /^[a-z0-9\-._~]+$/i.test(char);
5306};
5307
5308function encodeDisallowedCharacters(str) {
5309 var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
5310 escape = _ref.escape;
5311
5312 var parse = arguments.length > 2 ? arguments[2] : undefined;
5313
5314 if (typeof str === 'number') {
5315 str = str.toString();
5316 }
5317
5318 if (typeof str !== 'string' || !str.length) {
5319 return str;
5320 }
5321
5322 if (!escape) {
5323 return str;
5324 }
5325
5326 if (parse) {
5327 return JSON.parse(str);
5328 } // In ES6 you can do this quite easily by using the new ... spread operator.
5329 // This causes the string iterator (another new ES6 feature) to be used internally,
5330 // and because that iterator is designed to deal with
5331 // code points rather than UCS-2/UTF-16 code units.
5332
5333
5334 return _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3___default()(str).map(function (char) {
5335 if (isRrc3986Unreserved(char)) {
5336 return char;
5337 }
5338
5339 if (isRfc3986Reserved(char) && escape === 'unsafe') {
5340 return char;
5341 }
5342
5343 var encoded = (Buffer.from(char).toJSON().data || []).map(function (byte) {
5344 return "0".concat(byte.toString(16).toUpperCase()).slice(-2);
5345 }).map(function (encodedByte) {
5346 return "%".concat(encodedByte);
5347 }).join('');
5348 return encoded;
5349 }).join('');
5350}
5351function stylize(config) {
5352 var value = config.value;
5353
5354 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(value)) {
5355 return encodeArray(config);
5356 }
5357
5358 if (_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(value) === 'object') {
5359 return encodeObject(config);
5360 }
5361
5362 return encodePrimitive(config);
5363}
5364
5365function encodeArray(_ref2) {
5366 var key = _ref2.key,
5367 value = _ref2.value,
5368 style = _ref2.style,
5369 explode = _ref2.explode,
5370 escape = _ref2.escape;
5371
5372 var valueEncoder = function valueEncoder(str) {
5373 return encodeDisallowedCharacters(str, {
5374 escape: escape
5375 });
5376 };
5377
5378 if (style === 'simple') {
5379 return value.map(function (val) {
5380 return valueEncoder(val);
5381 }).join(',');
5382 }
5383
5384 if (style === 'label') {
5385 return ".".concat(value.map(function (val) {
5386 return valueEncoder(val);
5387 }).join('.'));
5388 }
5389
5390 if (style === 'matrix') {
5391 return value.map(function (val) {
5392 return valueEncoder(val);
5393 }).reduce(function (prev, curr) {
5394 if (!prev || explode) {
5395 return "".concat(prev || '', ";").concat(key, "=").concat(curr);
5396 }
5397
5398 return "".concat(prev, ",").concat(curr);
5399 }, '');
5400 }
5401
5402 if (style === 'form') {
5403 var after = explode ? "&".concat(key, "=") : ',';
5404 return value.map(function (val) {
5405 return valueEncoder(val);
5406 }).join(after);
5407 }
5408
5409 if (style === 'spaceDelimited') {
5410 var _after = explode ? "".concat(key, "=") : '';
5411
5412 return value.map(function (val) {
5413 return valueEncoder(val);
5414 }).join(" ".concat(_after));
5415 }
5416
5417 if (style === 'pipeDelimited') {
5418 var _after2 = explode ? "".concat(key, "=") : '';
5419
5420 return value.map(function (val) {
5421 return valueEncoder(val);
5422 }).join("|".concat(_after2));
5423 }
5424
5425 return undefined;
5426}
5427
5428function encodeObject(_ref3) {
5429 var key = _ref3.key,
5430 value = _ref3.value,
5431 style = _ref3.style,
5432 explode = _ref3.explode,
5433 escape = _ref3.escape;
5434
5435 var valueEncoder = function valueEncoder(str) {
5436 return encodeDisallowedCharacters(str, {
5437 escape: escape
5438 });
5439 };
5440
5441 var valueKeys = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(value);
5442
5443 if (style === 'simple') {
5444 return valueKeys.reduce(function (prev, curr) {
5445 var val = valueEncoder(value[curr]);
5446 var middleChar = explode ? '=' : ',';
5447 var prefix = prev ? "".concat(prev, ",") : '';
5448 return "".concat(prefix).concat(curr).concat(middleChar).concat(val);
5449 }, '');
5450 }
5451
5452 if (style === 'label') {
5453 return valueKeys.reduce(function (prev, curr) {
5454 var val = valueEncoder(value[curr]);
5455 var middleChar = explode ? '=' : '.';
5456 var prefix = prev ? "".concat(prev, ".") : '.';
5457 return "".concat(prefix).concat(curr).concat(middleChar).concat(val);
5458 }, '');
5459 }
5460
5461 if (style === 'matrix' && explode) {
5462 return valueKeys.reduce(function (prev, curr) {
5463 var val = valueEncoder(value[curr]);
5464 var prefix = prev ? "".concat(prev, ";") : ';';
5465 return "".concat(prefix).concat(curr, "=").concat(val);
5466 }, '');
5467 }
5468
5469 if (style === 'matrix') {
5470 // no explode
5471 return valueKeys.reduce(function (prev, curr) {
5472 var val = valueEncoder(value[curr]);
5473 var prefix = prev ? "".concat(prev, ",") : ";".concat(key, "=");
5474 return "".concat(prefix).concat(curr, ",").concat(val);
5475 }, '');
5476 }
5477
5478 if (style === 'form') {
5479 return valueKeys.reduce(function (prev, curr) {
5480 var val = valueEncoder(value[curr]);
5481 var prefix = prev ? "".concat(prev).concat(explode ? '&' : ',') : '';
5482 var separator = explode ? '=' : ',';
5483 return "".concat(prefix).concat(curr).concat(separator).concat(val);
5484 }, '');
5485 }
5486
5487 return undefined;
5488}
5489
5490function encodePrimitive(_ref4) {
5491 var key = _ref4.key,
5492 value = _ref4.value,
5493 style = _ref4.style,
5494 escape = _ref4.escape;
5495
5496 var valueEncoder = function valueEncoder(str) {
5497 return encodeDisallowedCharacters(str, {
5498 escape: escape
5499 });
5500 };
5501
5502 if (style === 'simple') {
5503 return valueEncoder(value);
5504 }
5505
5506 if (style === 'label') {
5507 return ".".concat(valueEncoder(value));
5508 }
5509
5510 if (style === 'matrix') {
5511 return ";".concat(key, "=").concat(valueEncoder(value));
5512 }
5513
5514 if (style === 'form') {
5515 return valueEncoder(value);
5516 }
5517
5518 if (style === 'deepObject') {
5519 return valueEncoder(value, {}, true);
5520 }
5521
5522 return undefined;
5523}
5524
5525/***/ }),
5526/* 33 */
5527/***/ (function(module, exports) {
5528
5529module.exports = function (it) {
5530 if (typeof it != 'function') throw TypeError(it + ' is not a function!');
5531 return it;
5532};
5533
5534
5535/***/ }),
5536/* 34 */
5537/***/ (function(module, exports, __webpack_require__) {
5538
5539// 7.1.13 ToObject(argument)
5540var defined = __webpack_require__(89);
5541module.exports = function (it) {
5542 return Object(defined(it));
5543};
5544
5545
5546/***/ }),
5547/* 35 */
5548/***/ (function(module, exports) {
5549
5550/**
5551 * Checks if `value` is the
5552 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
5553 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
5554 *
5555 * @static
5556 * @memberOf _
5557 * @since 0.1.0
5558 * @category Lang
5559 * @param {*} value The value to check.
5560 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
5561 * @example
5562 *
5563 * _.isObject({});
5564 * // => true
5565 *
5566 * _.isObject([1, 2, 3]);
5567 * // => true
5568 *
5569 * _.isObject(_.noop);
5570 * // => true
5571 *
5572 * _.isObject(null);
5573 * // => false
5574 */
5575function isObject(value) {
5576 var type = typeof value;
5577 return value != null && (type == 'object' || type == 'function');
5578}
5579
5580module.exports = isObject;
5581
5582
5583/***/ }),
5584/* 36 */
5585/***/ (function(module, exports, __webpack_require__) {
5586
5587var assignValue = __webpack_require__(68),
5588 copyObject = __webpack_require__(55),
5589 createAssigner = __webpack_require__(207),
5590 isArrayLike = __webpack_require__(129),
5591 isPrototype = __webpack_require__(132),
5592 keys = __webpack_require__(69);
5593
5594/** Used for built-in method references. */
5595var objectProto = Object.prototype;
5596
5597/** Used to check objects for own properties. */
5598var hasOwnProperty = objectProto.hasOwnProperty;
5599
5600/**
5601 * Assigns own enumerable string keyed properties of source objects to the
5602 * destination object. Source objects are applied from left to right.
5603 * Subsequent sources overwrite property assignments of previous sources.
5604 *
5605 * **Note:** This method mutates `object` and is loosely based on
5606 * [`Object.assign`](https://mdn.io/Object/assign).
5607 *
5608 * @static
5609 * @memberOf _
5610 * @since 0.10.0
5611 * @category Object
5612 * @param {Object} object The destination object.
5613 * @param {...Object} [sources] The source objects.
5614 * @returns {Object} Returns `object`.
5615 * @see _.assignIn
5616 * @example
5617 *
5618 * function Foo() {
5619 * this.a = 1;
5620 * }
5621 *
5622 * function Bar() {
5623 * this.c = 3;
5624 * }
5625 *
5626 * Foo.prototype.b = 2;
5627 * Bar.prototype.d = 4;
5628 *
5629 * _.assign({ 'a': 0 }, new Foo, new Bar);
5630 * // => { 'a': 1, 'c': 3 }
5631 */
5632var assign = createAssigner(function(object, source) {
5633 if (isPrototype(source) || isArrayLike(source)) {
5634 copyObject(source, keys(source), object);
5635 return;
5636 }
5637 for (var key in source) {
5638 if (hasOwnProperty.call(source, key)) {
5639 assignValue(object, key, source[key]);
5640 }
5641 }
5642});
5643
5644module.exports = assign;
5645
5646
5647/***/ }),
5648/* 37 */
5649/***/ (function(module, exports, __webpack_require__) {
5650
5651module.exports = __webpack_require__(240);
5652
5653/***/ }),
5654/* 38 */
5655/***/ (function(module, exports, __webpack_require__) {
5656
5657var _Object$defineProperty = __webpack_require__(85);
5658
5659function _defineProperties(target, props) {
5660 for (var i = 0; i < props.length; i++) {
5661 var descriptor = props[i];
5662 descriptor.enumerable = descriptor.enumerable || false;
5663 descriptor.configurable = true;
5664 if ("value" in descriptor) descriptor.writable = true;
5665
5666 _Object$defineProperty(target, descriptor.key, descriptor);
5667 }
5668}
5669
5670function _createClass(Constructor, protoProps, staticProps) {
5671 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
5672 if (staticProps) _defineProperties(Constructor, staticProps);
5673 return Constructor;
5674}
5675
5676module.exports = _createClass;
5677
5678/***/ }),
5679/* 39 */
5680/***/ (function(module, __webpack_exports__, __webpack_require__) {
5681
5682"use strict";
5683__webpack_require__.r(__webpack_exports__);
5684/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFreelyNamed", function() { return isFreelyNamed; });
5685/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateAbsoluteRefPatches", function() { return generateAbsoluteRefPatches; });
5686/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "absolutifyPointer", function() { return absolutifyPointer; });
5687/* harmony import */ var _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
5688/* harmony import */ var _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
5689/* harmony import */ var _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
5690/* harmony import */ var _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);
5691/* harmony import */ var traverse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171);
5692/* harmony import */ var traverse__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(traverse__WEBPACK_IMPORTED_MODULE_2__);
5693/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
5694/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_3__);
5695
5696
5697
5698 // This will match if the direct parent's key exactly matches an item.
5699
5700var freelyNamedKeyParents = ['properties']; // This will match if the grandparent's key exactly matches an item.
5701// NOTE that this is for finding non-free paths!
5702
5703var nonFreelyNamedKeyGrandparents = ['properties']; // This will match if the joined parent path exactly matches an item.
5704//
5705// This is mostly useful for filtering out root-level reusable item names,
5706// for example `["definitions", "$ref"]`
5707
5708var freelyNamedPaths = [// Swagger 2.0
5709'definitions', 'parameters', 'responses', 'securityDefinitions', // OpenAPI 3.0
5710'components/schemas', 'components/responses', 'components/parameters', 'components/securitySchemes']; // This will match if any of these items are substrings of the joined
5711// parent path.
5712//
5713// Warning! These are powerful. Beware of edge cases.
5714
5715var freelyNamedAncestors = ['schema/example', 'items/example'];
5716function isFreelyNamed(parentPath) {
5717 var parentKey = parentPath[parentPath.length - 1];
5718 var grandparentKey = parentPath[parentPath.length - 2];
5719 var parentStr = parentPath.join('/');
5720 return (// eslint-disable-next-line max-len
5721 freelyNamedKeyParents.indexOf(parentKey) > -1 && nonFreelyNamedKeyGrandparents.indexOf(grandparentKey) === -1 || freelyNamedPaths.indexOf(parentStr) > -1 || freelyNamedAncestors.some(function (el) {
5722 return parentStr.indexOf(el) > -1;
5723 })
5724 );
5725}
5726function generateAbsoluteRefPatches(obj, basePath) {
5727 var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
5728 specmap = _ref.specmap,
5729 _ref$getBaseUrlForNod = _ref.getBaseUrlForNodePath,
5730 getBaseUrlForNodePath = _ref$getBaseUrlForNod === void 0 ? function (path) {
5731 return specmap.getContext([].concat(_babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(basePath), _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(path))).baseDoc;
5732 } : _ref$getBaseUrlForNod,
5733 _ref$targetKeys = _ref.targetKeys,
5734 targetKeys = _ref$targetKeys === void 0 ? ['$ref', '$$ref'] : _ref$targetKeys;
5735
5736 var patches = [];
5737 traverse__WEBPACK_IMPORTED_MODULE_2___default()(obj).forEach(function callback() {
5738 if (targetKeys.indexOf(this.key) > -1) {
5739 var nodePath = this.path; // this node's path, relative to `obj`
5740
5741 var fullPath = basePath.concat(this.path);
5742 var absolutifiedRefValue = absolutifyPointer(this.node, getBaseUrlForNodePath(nodePath));
5743 patches.push(specmap.replace(fullPath, absolutifiedRefValue));
5744 }
5745 });
5746 return patches;
5747}
5748function absolutifyPointer(pointer, baseUrl) {
5749 var _pointer$split = pointer.split('#'),
5750 _pointer$split2 = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_pointer$split, 2),
5751 urlPart = _pointer$split2[0],
5752 fragmentPart = _pointer$split2[1];
5753
5754 var newRefUrlPart = url__WEBPACK_IMPORTED_MODULE_3___default.a.resolve(urlPart || '', baseUrl || '');
5755 return fragmentPart ? "".concat(newRefUrlPart, "#").concat(fragmentPart) : newRefUrlPart;
5756}
5757
5758/***/ }),
5759/* 40 */
5760/***/ (function(module, exports, __webpack_require__) {
5761
5762// 19.1.2.14 / 15.2.3.14 Object.keys(O)
5763var $keys = __webpack_require__(121);
5764var enumBugKeys = __webpack_require__(93);
5765
5766module.exports = Object.keys || function keys(O) {
5767 return $keys(O, enumBugKeys);
5768};
5769
5770
5771/***/ }),
5772/* 41 */
5773/***/ (function(module, exports) {
5774
5775module.exports = {};
5776
5777
5778/***/ }),
5779/* 42 */
5780/***/ (function(module, exports, __webpack_require__) {
5781
5782"use strict";
5783
5784
5785
5786function isNothing(subject) {
5787 return (typeof subject === 'undefined') || (subject === null);
5788}
5789
5790
5791function isObject(subject) {
5792 return (typeof subject === 'object') && (subject !== null);
5793}
5794
5795
5796function toArray(sequence) {
5797 if (Array.isArray(sequence)) return sequence;
5798 else if (isNothing(sequence)) return [];
5799
5800 return [ sequence ];
5801}
5802
5803
5804function extend(target, source) {
5805 var index, length, key, sourceKeys;
5806
5807 if (source) {
5808 sourceKeys = Object.keys(source);
5809
5810 for (index = 0, length = sourceKeys.length; index < length; index += 1) {
5811 key = sourceKeys[index];
5812 target[key] = source[key];
5813 }
5814 }
5815
5816 return target;
5817}
5818
5819
5820function repeat(string, count) {
5821 var result = '', cycle;
5822
5823 for (cycle = 0; cycle < count; cycle += 1) {
5824 result += string;
5825 }
5826
5827 return result;
5828}
5829
5830
5831function isNegativeZero(number) {
5832 return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);
5833}
5834
5835
5836module.exports.isNothing = isNothing;
5837module.exports.isObject = isObject;
5838module.exports.toArray = toArray;
5839module.exports.repeat = repeat;
5840module.exports.isNegativeZero = isNegativeZero;
5841module.exports.extend = extend;
5842
5843
5844/***/ }),
5845/* 43 */
5846/***/ (function(module, exports, __webpack_require__) {
5847
5848"use strict";
5849
5850
5851/*eslint-disable max-len*/
5852
5853var common = __webpack_require__(42);
5854var YAMLException = __webpack_require__(58);
5855var Type = __webpack_require__(8);
5856
5857
5858function compileList(schema, name, result) {
5859 var exclude = [];
5860
5861 schema.include.forEach(function (includedSchema) {
5862 result = compileList(includedSchema, name, result);
5863 });
5864
5865 schema[name].forEach(function (currentType) {
5866 result.forEach(function (previousType, previousIndex) {
5867 if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {
5868 exclude.push(previousIndex);
5869 }
5870 });
5871
5872 result.push(currentType);
5873 });
5874
5875 return result.filter(function (type, index) {
5876 return exclude.indexOf(index) === -1;
5877 });
5878}
5879
5880
5881function compileMap(/* lists... */) {
5882 var result = {
5883 scalar: {},
5884 sequence: {},
5885 mapping: {},
5886 fallback: {}
5887 }, index, length;
5888
5889 function collectType(type) {
5890 result[type.kind][type.tag] = result['fallback'][type.tag] = type;
5891 }
5892
5893 for (index = 0, length = arguments.length; index < length; index += 1) {
5894 arguments[index].forEach(collectType);
5895 }
5896 return result;
5897}
5898
5899
5900function Schema(definition) {
5901 this.include = definition.include || [];
5902 this.implicit = definition.implicit || [];
5903 this.explicit = definition.explicit || [];
5904
5905 this.implicit.forEach(function (type) {
5906 if (type.loadKind && type.loadKind !== 'scalar') {
5907 throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
5908 }
5909 });
5910
5911 this.compiledImplicit = compileList(this, 'implicit', []);
5912 this.compiledExplicit = compileList(this, 'explicit', []);
5913 this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);
5914}
5915
5916
5917Schema.DEFAULT = null;
5918
5919
5920Schema.create = function createSchema() {
5921 var schemas, types;
5922
5923 switch (arguments.length) {
5924 case 1:
5925 schemas = Schema.DEFAULT;
5926 types = arguments[0];
5927 break;
5928
5929 case 2:
5930 schemas = arguments[0];
5931 types = arguments[1];
5932 break;
5933
5934 default:
5935 throw new YAMLException('Wrong number of arguments for Schema.create function');
5936 }
5937
5938 schemas = common.toArray(schemas);
5939 types = common.toArray(types);
5940
5941 if (!schemas.every(function (schema) { return schema instanceof Schema; })) {
5942 throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');
5943 }
5944
5945 if (!types.every(function (type) { return type instanceof Type; })) {
5946 throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');
5947 }
5948
5949 return new Schema({
5950 include: schemas,
5951 explicit: types
5952 });
5953};
5954
5955
5956module.exports = Schema;
5957
5958
5959/***/ }),
5960/* 44 */
5961/***/ (function(module, exports) {
5962
5963/**
5964 * Checks if `value` is classified as an `Array` object.
5965 *
5966 * @static
5967 * @memberOf _
5968 * @since 0.1.0
5969 * @category Lang
5970 * @param {*} value The value to check.
5971 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
5972 * @example
5973 *
5974 * _.isArray([1, 2, 3]);
5975 * // => true
5976 *
5977 * _.isArray(document.body.children);
5978 * // => false
5979 *
5980 * _.isArray('abc');
5981 * // => false
5982 *
5983 * _.isArray(_.noop);
5984 * // => false
5985 */
5986var isArray = Array.isArray;
5987
5988module.exports = isArray;
5989
5990
5991/***/ }),
5992/* 45 */
5993/***/ (function(module, exports, __webpack_require__) {
5994
5995var _Promise = __webpack_require__(22);
5996
5997function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
5998 try {
5999 var info = gen[key](arg);
6000 var value = info.value;
6001 } catch (error) {
6002 reject(error);
6003 return;
6004 }
6005
6006 if (info.done) {
6007 resolve(value);
6008 } else {
6009 _Promise.resolve(value).then(_next, _throw);
6010 }
6011}
6012
6013function _asyncToGenerator(fn) {
6014 return function () {
6015 var self = this,
6016 args = arguments;
6017 return new _Promise(function (resolve, reject) {
6018 var gen = fn.apply(self, args);
6019
6020 function _next(value) {
6021 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
6022 }
6023
6024 function _throw(err) {
6025 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
6026 }
6027
6028 _next(undefined);
6029 });
6030 };
6031}
6032
6033module.exports = _asyncToGenerator;
6034
6035/***/ }),
6036/* 46 */
6037/***/ (function(module, exports, __webpack_require__) {
6038
6039var basePick = __webpack_require__(280),
6040 flatRest = __webpack_require__(291);
6041
6042/**
6043 * Creates an object composed of the picked `object` properties.
6044 *
6045 * @static
6046 * @since 0.1.0
6047 * @memberOf _
6048 * @category Object
6049 * @param {Object} object The source object.
6050 * @param {...(string|string[])} [paths] The property paths to pick.
6051 * @returns {Object} Returns the new object.
6052 * @example
6053 *
6054 * var object = { 'a': 1, 'b': '2', 'c': 3 };
6055 *
6056 * _.pick(object, ['a', 'c']);
6057 * // => { 'a': 1, 'c': 3 }
6058 */
6059var pick = flatRest(function(object, paths) {
6060 return object == null ? {} : basePick(object, paths);
6061});
6062
6063module.exports = pick;
6064
6065
6066/***/ }),
6067/* 47 */
6068/***/ (function(module, exports) {
6069
6070function _classCallCheck(instance, Constructor) {
6071 if (!(instance instanceof Constructor)) {
6072 throw new TypeError("Cannot call a class as a function");
6073 }
6074}
6075
6076module.exports = _classCallCheck;
6077
6078/***/ }),
6079/* 48 */
6080/***/ (function(module, exports, __webpack_require__) {
6081
6082var __assign = (this && this.__assign) || function () {
6083 __assign = Object.assign || function(t) {
6084 for (var s, i = 1, n = arguments.length; i < n; i++) {
6085 s = arguments[i];
6086 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6087 t[p] = s[p];
6088 }
6089 return t;
6090 };
6091 return __assign.apply(this, arguments);
6092};
6093Object.defineProperty(exports, "__esModule", { value: true });
6094/*!
6095 * https://github.com/Starcounter-Jack/JSON-Patch
6096 * (c) 2017 Joachim Wester
6097 * MIT license
6098 */
6099var helpers_1 = __webpack_require__(74);
6100var core_1 = __webpack_require__(113);
6101/* export all core functions and types */
6102var core_2 = __webpack_require__(113);
6103exports.applyOperation = core_2.applyOperation;
6104exports.applyPatch = core_2.applyPatch;
6105exports.applyReducer = core_2.applyReducer;
6106exports.getValueByPointer = core_2.getValueByPointer;
6107exports.validate = core_2.validate;
6108exports.validator = core_2.validator;
6109/* export some helpers */
6110var helpers_2 = __webpack_require__(74);
6111exports.JsonPatchError = helpers_2.PatchError;
6112exports.deepClone = helpers_2._deepClone;
6113exports.escapePathComponent = helpers_2.escapePathComponent;
6114exports.unescapePathComponent = helpers_2.unescapePathComponent;
6115var beforeDict = new WeakMap();
6116var Mirror = /** @class */ (function () {
6117 function Mirror(obj) {
6118 this.observers = new Map();
6119 this.obj = obj;
6120 }
6121 return Mirror;
6122}());
6123var ObserverInfo = /** @class */ (function () {
6124 function ObserverInfo(callback, observer) {
6125 this.callback = callback;
6126 this.observer = observer;
6127 }
6128 return ObserverInfo;
6129}());
6130function getMirror(obj) {
6131 return beforeDict.get(obj);
6132}
6133function getObserverFromMirror(mirror, callback) {
6134 return mirror.observers.get(callback);
6135}
6136function removeObserverFromMirror(mirror, observer) {
6137 mirror.observers.delete(observer.callback);
6138}
6139/**
6140 * Detach an observer from an object
6141 */
6142function unobserve(root, observer) {
6143 observer.unobserve();
6144}
6145exports.unobserve = unobserve;
6146/**
6147 * Observes changes made to an object, which can then be retrieved using generate
6148 */
6149function observe(obj, callback) {
6150 var patches = [];
6151 var observer;
6152 var mirror = getMirror(obj);
6153 if (!mirror) {
6154 mirror = new Mirror(obj);
6155 beforeDict.set(obj, mirror);
6156 }
6157 else {
6158 var observerInfo = getObserverFromMirror(mirror, callback);
6159 observer = observerInfo && observerInfo.observer;
6160 }
6161 if (observer) {
6162 return observer;
6163 }
6164 observer = {};
6165 mirror.value = helpers_1._deepClone(obj);
6166 if (callback) {
6167 observer.callback = callback;
6168 observer.next = null;
6169 var dirtyCheck = function () {
6170 generate(observer);
6171 };
6172 var fastCheck = function () {
6173 clearTimeout(observer.next);
6174 observer.next = setTimeout(dirtyCheck);
6175 };
6176 if (typeof window !== 'undefined') { //not Node
6177 window.addEventListener('mouseup', fastCheck);
6178 window.addEventListener('keyup', fastCheck);
6179 window.addEventListener('mousedown', fastCheck);
6180 window.addEventListener('keydown', fastCheck);
6181 window.addEventListener('change', fastCheck);
6182 }
6183 }
6184 observer.patches = patches;
6185 observer.object = obj;
6186 observer.unobserve = function () {
6187 generate(observer);
6188 clearTimeout(observer.next);
6189 removeObserverFromMirror(mirror, observer);
6190 if (typeof window !== 'undefined') {
6191 window.removeEventListener('mouseup', fastCheck);
6192 window.removeEventListener('keyup', fastCheck);
6193 window.removeEventListener('mousedown', fastCheck);
6194 window.removeEventListener('keydown', fastCheck);
6195 window.removeEventListener('change', fastCheck);
6196 }
6197 };
6198 mirror.observers.set(callback, new ObserverInfo(callback, observer));
6199 return observer;
6200}
6201exports.observe = observe;
6202/**
6203 * Generate an array of patches from an observer
6204 */
6205function generate(observer, invertible) {
6206 if (invertible === void 0) { invertible = false; }
6207 var mirror = beforeDict.get(observer.object);
6208 _generate(mirror.value, observer.object, observer.patches, "", invertible);
6209 if (observer.patches.length) {
6210 core_1.applyPatch(mirror.value, observer.patches);
6211 }
6212 var temp = observer.patches;
6213 if (temp.length > 0) {
6214 observer.patches = [];
6215 if (observer.callback) {
6216 observer.callback(temp);
6217 }
6218 }
6219 return temp;
6220}
6221exports.generate = generate;
6222// Dirty check if obj is different from mirror, generate patches and update mirror
6223function _generate(mirror, obj, patches, path, invertible) {
6224 if (obj === mirror) {
6225 return;
6226 }
6227 if (typeof obj.toJSON === "function") {
6228 obj = obj.toJSON();
6229 }
6230 var newKeys = helpers_1._objectKeys(obj);
6231 var oldKeys = helpers_1._objectKeys(mirror);
6232 var changed = false;
6233 var deleted = false;
6234 //if ever "move" operation is implemented here, make sure this test runs OK: "should not generate the same patch twice (move)"
6235 for (var t = oldKeys.length - 1; t >= 0; t--) {
6236 var key = oldKeys[t];
6237 var oldVal = mirror[key];
6238 if (helpers_1.hasOwnProperty(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) {
6239 var newVal = obj[key];
6240 if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null) {
6241 _generate(oldVal, newVal, patches, path + "/" + helpers_1.escapePathComponent(key), invertible);
6242 }
6243 else {
6244 if (oldVal !== newVal) {
6245 changed = true;
6246 if (invertible) {
6247 patches.push({ op: "test", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(oldVal) });
6248 }
6249 patches.push({ op: "replace", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(newVal) });
6250 }
6251 }
6252 }
6253 else if (Array.isArray(mirror) === Array.isArray(obj)) {
6254 if (invertible) {
6255 patches.push({ op: "test", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(oldVal) });
6256 }
6257 patches.push({ op: "remove", path: path + "/" + helpers_1.escapePathComponent(key) });
6258 deleted = true; // property has been deleted
6259 }
6260 else {
6261 if (invertible) {
6262 patches.push({ op: "test", path: path, value: mirror });
6263 }
6264 patches.push({ op: "replace", path: path, value: obj });
6265 changed = true;
6266 }
6267 }
6268 if (!deleted && newKeys.length == oldKeys.length) {
6269 return;
6270 }
6271 for (var t = 0; t < newKeys.length; t++) {
6272 var key = newKeys[t];
6273 if (!helpers_1.hasOwnProperty(mirror, key) && obj[key] !== undefined) {
6274 patches.push({ op: "add", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(obj[key]) });
6275 }
6276 }
6277}
6278/**
6279 * Create an array of patches from the differences in two objects
6280 */
6281function compare(tree1, tree2, invertible) {
6282 if (invertible === void 0) { invertible = false; }
6283 var patches = [];
6284 _generate(tree1, tree2, patches, '', invertible);
6285 return patches;
6286}
6287exports.compare = compare;
6288/**
6289 * Default export for backwards compat
6290 */
6291// import just to re-export as default
6292var core = __webpack_require__(113);
6293var helpers_3 = __webpack_require__(74);
6294exports.default = __assign({}, core, {
6295 // duplex
6296 unobserve: unobserve,
6297 observe: observe,
6298 generate: generate,
6299 compare: compare,
6300 // helpers
6301 JsonPatchError: helpers_3.PatchError, deepClone: helpers_1._deepClone, escapePathComponent: helpers_1.escapePathComponent,
6302 unescapePathComponent: helpers_3.unescapePathComponent });
6303
6304
6305/***/ }),
6306/* 49 */
6307/***/ (function(module, exports) {
6308
6309module.exports = function (bitmap, value) {
6310 return {
6311 enumerable: !(bitmap & 1),
6312 configurable: !(bitmap & 2),
6313 writable: !(bitmap & 4),
6314 value: value
6315 };
6316};
6317
6318
6319/***/ }),
6320/* 50 */
6321/***/ (function(module, exports) {
6322
6323var toString = {}.toString;
6324
6325module.exports = function (it) {
6326 return toString.call(it).slice(8, -1);
6327};
6328
6329
6330/***/ }),
6331/* 51 */
6332/***/ (function(module, exports) {
6333
6334module.exports = true;
6335
6336
6337/***/ }),
6338/* 52 */
6339/***/ (function(module, exports, __webpack_require__) {
6340
6341var pIE = __webpack_require__(53);
6342var createDesc = __webpack_require__(49);
6343var toIObject = __webpack_require__(24);
6344var toPrimitive = __webpack_require__(87);
6345var has = __webpack_require__(23);
6346var IE8_DOM_DEFINE = __webpack_require__(119);
6347var gOPD = Object.getOwnPropertyDescriptor;
6348
6349exports.f = __webpack_require__(16) ? gOPD : function getOwnPropertyDescriptor(O, P) {
6350 O = toIObject(O);
6351 P = toPrimitive(P, true);
6352 if (IE8_DOM_DEFINE) try {
6353 return gOPD(O, P);
6354 } catch (e) { /* empty */ }
6355 if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
6356};
6357
6358
6359/***/ }),
6360/* 53 */
6361/***/ (function(module, exports) {
6362
6363exports.f = {}.propertyIsEnumerable;
6364
6365
6366/***/ }),
6367/* 54 */
6368/***/ (function(module, exports, __webpack_require__) {
6369
6370var def = __webpack_require__(19).f;
6371var has = __webpack_require__(23);
6372var TAG = __webpack_require__(11)('toStringTag');
6373
6374module.exports = function (it, tag, stat) {
6375 if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
6376};
6377
6378
6379/***/ }),
6380/* 55 */
6381/***/ (function(module, exports, __webpack_require__) {
6382
6383var assignValue = __webpack_require__(68),
6384 baseAssignValue = __webpack_require__(127);
6385
6386/**
6387 * Copies properties of `source` to `object`.
6388 *
6389 * @private
6390 * @param {Object} source The object to copy properties from.
6391 * @param {Array} props The property identifiers to copy.
6392 * @param {Object} [object={}] The object to copy properties to.
6393 * @param {Function} [customizer] The function to customize copied values.
6394 * @returns {Object} Returns `object`.
6395 */
6396function copyObject(source, props, object, customizer) {
6397 var isNew = !object;
6398 object || (object = {});
6399
6400 var index = -1,
6401 length = props.length;
6402
6403 while (++index < length) {
6404 var key = props[index];
6405
6406 var newValue = customizer
6407 ? customizer(object[key], source[key], key, object, source)
6408 : undefined;
6409
6410 if (newValue === undefined) {
6411 newValue = source[key];
6412 }
6413 if (isNew) {
6414 baseAssignValue(object, key, newValue);
6415 } else {
6416 assignValue(object, key, newValue);
6417 }
6418 }
6419 return object;
6420}
6421
6422module.exports = copyObject;
6423
6424
6425/***/ }),
6426/* 56 */
6427/***/ (function(module, exports, __webpack_require__) {
6428
6429__webpack_require__(223);
6430var global = __webpack_require__(7);
6431var hide = __webpack_require__(27);
6432var Iterators = __webpack_require__(41);
6433var TO_STRING_TAG = __webpack_require__(11)('toStringTag');
6434
6435var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
6436 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
6437 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
6438 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
6439 'TextTrackList,TouchList').split(',');
6440
6441for (var i = 0; i < DOMIterables.length; i++) {
6442 var NAME = DOMIterables[i];
6443 var Collection = global[NAME];
6444 var proto = Collection && Collection.prototype;
6445 if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
6446 Iterators[NAME] = Iterators.Array;
6447}
6448
6449
6450/***/ }),
6451/* 57 */
6452/***/ (function(module, exports, __webpack_require__) {
6453
6454"use strict";
6455
6456var $at = __webpack_require__(227)(true);
6457
6458// 21.1.3.27 String.prototype[@@iterator]()
6459__webpack_require__(137)(String, 'String', function (iterated) {
6460 this._t = String(iterated); // target
6461 this._i = 0; // next index
6462// 21.1.5.2.1 %StringIteratorPrototype%.next()
6463}, function () {
6464 var O = this._t;
6465 var index = this._i;
6466 var point;
6467 if (index >= O.length) return { value: undefined, done: true };
6468 point = $at(O, index);
6469 this._i += point.length;
6470 return { value: point, done: false };
6471});
6472
6473
6474/***/ }),
6475/* 58 */
6476/***/ (function(module, exports, __webpack_require__) {
6477
6478"use strict";
6479// YAML error class. http://stackoverflow.com/questions/8458984
6480//
6481
6482
6483function YAMLException(reason, mark) {
6484 // Super constructor
6485 Error.call(this);
6486
6487 this.name = 'YAMLException';
6488 this.reason = reason;
6489 this.mark = mark;
6490 this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');
6491
6492 // Include stack trace in error object
6493 if (Error.captureStackTrace) {
6494 // Chrome and NodeJS
6495 Error.captureStackTrace(this, this.constructor);
6496 } else {
6497 // FF, IE 10+ and Safari 6+. Fallback for others
6498 this.stack = (new Error()).stack || '';
6499 }
6500}
6501
6502
6503// Inherit from Error
6504YAMLException.prototype = Object.create(Error.prototype);
6505YAMLException.prototype.constructor = YAMLException;
6506
6507
6508YAMLException.prototype.toString = function toString(compact) {
6509 var result = this.name + ': ';
6510
6511 result += this.reason || '(unknown reason)';
6512
6513 if (!compact && this.mark) {
6514 result += ' ' + this.mark.toString();
6515 }
6516
6517 return result;
6518};
6519
6520
6521module.exports = YAMLException;
6522
6523
6524/***/ }),
6525/* 59 */
6526/***/ (function(module, exports, __webpack_require__) {
6527
6528"use strict";
6529// JS-YAML's default schema for `safeLoad` function.
6530// It is not described in the YAML specification.
6531//
6532// This schema is based on standard YAML's Core schema and includes most of
6533// extra types described at YAML tag repository. (http://yaml.org/type/)
6534
6535
6536
6537
6538
6539var Schema = __webpack_require__(43);
6540
6541
6542module.exports = new Schema({
6543 include: [
6544 __webpack_require__(150)
6545 ],
6546 implicit: [
6547 __webpack_require__(266),
6548 __webpack_require__(267)
6549 ],
6550 explicit: [
6551 __webpack_require__(268),
6552 __webpack_require__(272),
6553 __webpack_require__(273),
6554 __webpack_require__(274)
6555 ]
6556});
6557
6558
6559/***/ }),
6560/* 60 */
6561/***/ (function(module, exports, __webpack_require__) {
6562
6563var baseClamp = __webpack_require__(214),
6564 baseToString = __webpack_require__(215),
6565 toInteger = __webpack_require__(133),
6566 toString = __webpack_require__(134);
6567
6568/**
6569 * Checks if `string` starts with the given target string.
6570 *
6571 * @static
6572 * @memberOf _
6573 * @since 3.0.0
6574 * @category String
6575 * @param {string} [string=''] The string to inspect.
6576 * @param {string} [target] The string to search for.
6577 * @param {number} [position=0] The position to search from.
6578 * @returns {boolean} Returns `true` if `string` starts with `target`,
6579 * else `false`.
6580 * @example
6581 *
6582 * _.startsWith('abc', 'a');
6583 * // => true
6584 *
6585 * _.startsWith('abc', 'b');
6586 * // => false
6587 *
6588 * _.startsWith('abc', 'b', 1);
6589 * // => true
6590 */
6591function startsWith(string, target, position) {
6592 string = toString(string);
6593 position = position == null
6594 ? 0
6595 : baseClamp(toInteger(position), 0, string.length);
6596
6597 target = baseToString(target);
6598 return string.slice(position, position + target.length) == target;
6599}
6600
6601module.exports = startsWith;
6602
6603
6604/***/ }),
6605/* 61 */
6606/***/ (function(module, __webpack_exports__, __webpack_require__) {
6607
6608"use strict";
6609__webpack_require__.r(__webpack_exports__);
6610/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeFetchJSON", function() { return makeFetchJSON; });
6611/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearCache", function() { return clearCache; });
6612/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return resolve; });
6613/* harmony import */ var _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
6614/* harmony import */ var _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0__);
6615/* harmony import */ var _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
6616/* harmony import */ var _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);
6617/* harmony import */ var _http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
6618/* harmony import */ var _specmap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
6619/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
6620/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81);
6621
6622
6623
6624
6625
6626
6627function makeFetchJSON(http) {
6628 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6629 var requestInterceptor = opts.requestInterceptor,
6630 responseInterceptor = opts.responseInterceptor; // Set credentials with 'http.withCredentials' value
6631
6632 var credentials = http.withCredentials ? 'include' : 'same-origin';
6633 return function (docPath) {
6634 return http({
6635 url: docPath,
6636 loadSpec: true,
6637 requestInterceptor: requestInterceptor,
6638 responseInterceptor: responseInterceptor,
6639 headers: {
6640 Accept: _constants__WEBPACK_IMPORTED_MODULE_5__["ACCEPT_HEADER_VALUE_FOR_DOCUMENTS"]
6641 },
6642 credentials: credentials
6643 }).then(function (res) {
6644 return res.body;
6645 });
6646 };
6647} // Wipe out the http cache
6648
6649function clearCache() {
6650 _specmap__WEBPACK_IMPORTED_MODULE_3__["plugins"].refs.clearCache();
6651}
6652function resolve(obj) {
6653 var fetch = obj.fetch,
6654 spec = obj.spec,
6655 url = obj.url,
6656 mode = obj.mode,
6657 _obj$allowMetaPatches = obj.allowMetaPatches,
6658 allowMetaPatches = _obj$allowMetaPatches === void 0 ? true : _obj$allowMetaPatches,
6659 pathDiscriminator = obj.pathDiscriminator,
6660 modelPropertyMacro = obj.modelPropertyMacro,
6661 parameterMacro = obj.parameterMacro,
6662 requestInterceptor = obj.requestInterceptor,
6663 responseInterceptor = obj.responseInterceptor,
6664 skipNormalization = obj.skipNormalization,
6665 useCircularStructures = obj.useCircularStructures;
6666 var http = obj.http,
6667 baseDoc = obj.baseDoc; // @TODO Swagger-UI uses baseDoc instead of url, this is to allow both
6668 // need to fix and pick one.
6669
6670 baseDoc = baseDoc || url; // Provide a default fetch implementation
6671 // TODO fetch should be removed, and http used instead
6672
6673 http = fetch || http || _http__WEBPACK_IMPORTED_MODULE_2__["default"];
6674
6675 if (!spec) {
6676 return makeFetchJSON(http, {
6677 requestInterceptor: requestInterceptor,
6678 responseInterceptor: responseInterceptor
6679 })(baseDoc).then(doResolve);
6680 }
6681
6682 return doResolve(spec);
6683
6684 function doResolve(_spec) {
6685 if (baseDoc) {
6686 _specmap__WEBPACK_IMPORTED_MODULE_3__["plugins"].refs.docCache[baseDoc] = _spec;
6687 } // Build a json-fetcher ( ie: give it a URL and get json out )
6688
6689
6690 _specmap__WEBPACK_IMPORTED_MODULE_3__["plugins"].refs.fetchJSON = makeFetchJSON(http, {
6691 requestInterceptor: requestInterceptor,
6692 responseInterceptor: responseInterceptor
6693 });
6694 var plugs = [_specmap__WEBPACK_IMPORTED_MODULE_3__["plugins"].refs];
6695
6696 if (typeof parameterMacro === 'function') {
6697 plugs.push(_specmap__WEBPACK_IMPORTED_MODULE_3__["plugins"].parameters);
6698 }
6699
6700 if (typeof modelPropertyMacro === 'function') {
6701 plugs.push(_specmap__WEBPACK_IMPORTED_MODULE_3__["plugins"].properties);
6702 }
6703
6704 if (mode !== 'strict') {
6705 plugs.push(_specmap__WEBPACK_IMPORTED_MODULE_3__["plugins"].allOf);
6706 } // mapSpec is where the hard work happens, see https://github.com/swagger-api/specmap for more details
6707
6708
6709 return Object(_specmap__WEBPACK_IMPORTED_MODULE_3__["default"])({
6710 spec: _spec,
6711 context: {
6712 baseDoc: baseDoc
6713 },
6714 plugins: plugs,
6715 allowMetaPatches: allowMetaPatches,
6716 // allows adding .meta patches, which include adding `$$ref`s to the spec
6717 pathDiscriminator: pathDiscriminator,
6718 // for lazy resolution
6719 parameterMacro: parameterMacro,
6720 modelPropertyMacro: modelPropertyMacro,
6721 useCircularStructures: useCircularStructures
6722 }).then(skipNormalization ? /*#__PURE__*/function () {
6723 var _ref = _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(a) {
6724 return _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
6725 while (1) {
6726 switch (_context.prev = _context.next) {
6727 case 0:
6728 return _context.abrupt("return", a);
6729
6730 case 1:
6731 case "end":
6732 return _context.stop();
6733 }
6734 }
6735 }, _callee);
6736 }));
6737
6738 return function (_x) {
6739 return _ref.apply(this, arguments);
6740 };
6741 }() : _helpers__WEBPACK_IMPORTED_MODULE_4__["normalizeSwagger"]);
6742 }
6743}
6744
6745/***/ }),
6746/* 62 */
6747/***/ (function(module, __webpack_exports__, __webpack_require__) {
6748
6749"use strict";
6750__webpack_require__.r(__webpack_exports__);
6751/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return serialize; });
6752/* harmony import */ var _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37);
6753/* harmony import */ var _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0__);
6754
6755
6756/*
6757 Serializer that serializes according to a media type instead of OpenAPI's
6758 `style` + `explode` constructs.
6759*/
6760function serialize(value, mediaType) {
6761 if (mediaType.includes('application/json')) {
6762 if (typeof value === 'string') {
6763 // Assume the user has a JSON string
6764 return value;
6765 }
6766
6767 return _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_0___default()(value);
6768 }
6769
6770 return value.toString();
6771}
6772
6773/***/ }),
6774/* 63 */
6775/***/ (function(module, exports, __webpack_require__) {
6776
6777// 7.1.15 ToLength
6778var toInteger = __webpack_require__(90);
6779var min = Math.min;
6780module.exports = function (it) {
6781 return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
6782};
6783
6784
6785/***/ }),
6786/* 64 */
6787/***/ (function(module, exports) {
6788
6789var id = 0;
6790var px = Math.random();
6791module.exports = function (key) {
6792 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
6793};
6794
6795
6796/***/ }),
6797/* 65 */
6798/***/ (function(module, exports) {
6799
6800exports.f = Object.getOwnPropertySymbols;
6801
6802
6803/***/ }),
6804/* 66 */
6805/***/ (function(module, exports, __webpack_require__) {
6806
6807var META = __webpack_require__(64)('meta');
6808var isObject = __webpack_require__(9);
6809var has = __webpack_require__(23);
6810var setDesc = __webpack_require__(19).f;
6811var id = 0;
6812var isExtensible = Object.isExtensible || function () {
6813 return true;
6814};
6815var FREEZE = !__webpack_require__(28)(function () {
6816 return isExtensible(Object.preventExtensions({}));
6817});
6818var setMeta = function (it) {
6819 setDesc(it, META, { value: {
6820 i: 'O' + ++id, // object ID
6821 w: {} // weak collections IDs
6822 } });
6823};
6824var fastKey = function (it, create) {
6825 // return primitive with prefix
6826 if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
6827 if (!has(it, META)) {
6828 // can't set metadata to uncaught frozen object
6829 if (!isExtensible(it)) return 'F';
6830 // not necessary to add metadata
6831 if (!create) return 'E';
6832 // add missing metadata
6833 setMeta(it);
6834 // return object ID
6835 } return it[META].i;
6836};
6837var getWeak = function (it, create) {
6838 if (!has(it, META)) {
6839 // can't set metadata to uncaught frozen object
6840 if (!isExtensible(it)) return true;
6841 // not necessary to add metadata
6842 if (!create) return false;
6843 // add missing metadata
6844 setMeta(it);
6845 // return hash weak collections IDs
6846 } return it[META].w;
6847};
6848// add metadata on freeze-family methods calling
6849var onFreeze = function (it) {
6850 if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
6851 return it;
6852};
6853var meta = module.exports = {
6854 KEY: META,
6855 NEED: false,
6856 fastKey: fastKey,
6857 getWeak: getWeak,
6858 onFreeze: onFreeze
6859};
6860
6861
6862/***/ }),
6863/* 67 */
6864/***/ (function(module, exports, __webpack_require__) {
6865
6866// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
6867var anObject = __webpack_require__(12);
6868var dPs = __webpack_require__(120);
6869var enumBugKeys = __webpack_require__(93);
6870var IE_PROTO = __webpack_require__(91)('IE_PROTO');
6871var Empty = function () { /* empty */ };
6872var PROTOTYPE = 'prototype';
6873
6874// Create object with fake `null` prototype: use iframe Object with cleared prototype
6875var createDict = function () {
6876 // Thrash, waste and sodomy: IE GC bug
6877 var iframe = __webpack_require__(86)('iframe');
6878 var i = enumBugKeys.length;
6879 var lt = '<';
6880 var gt = '>';
6881 var iframeDocument;
6882 iframe.style.display = 'none';
6883 __webpack_require__(126).appendChild(iframe);
6884 iframe.src = 'javascript:'; // eslint-disable-line no-script-url
6885 // createDict = iframe.contentWindow.Object;
6886 // html.removeChild(iframe);
6887 iframeDocument = iframe.contentWindow.document;
6888 iframeDocument.open();
6889 iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
6890 iframeDocument.close();
6891 createDict = iframeDocument.F;
6892 while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
6893 return createDict();
6894};
6895
6896module.exports = Object.create || function create(O, Properties) {
6897 var result;
6898 if (O !== null) {
6899 Empty[PROTOTYPE] = anObject(O);
6900 result = new Empty();
6901 Empty[PROTOTYPE] = null;
6902 // add "__proto__" for Object.getPrototypeOf polyfill
6903 result[IE_PROTO] = O;
6904 } else result = createDict();
6905 return Properties === undefined ? result : dPs(result, Properties);
6906};
6907
6908
6909/***/ }),
6910/* 68 */
6911/***/ (function(module, exports, __webpack_require__) {
6912
6913var baseAssignValue = __webpack_require__(127),
6914 eq = __webpack_require__(128);
6915
6916/** Used for built-in method references. */
6917var objectProto = Object.prototype;
6918
6919/** Used to check objects for own properties. */
6920var hasOwnProperty = objectProto.hasOwnProperty;
6921
6922/**
6923 * Assigns `value` to `key` of `object` if the existing value is not equivalent
6924 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
6925 * for equality comparisons.
6926 *
6927 * @private
6928 * @param {Object} object The object to modify.
6929 * @param {string} key The key of the property to assign.
6930 * @param {*} value The value to assign.
6931 */
6932function assignValue(object, key, value) {
6933 var objValue = object[key];
6934 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
6935 (value === undefined && !(key in object))) {
6936 baseAssignValue(object, key, value);
6937 }
6938}
6939
6940module.exports = assignValue;
6941
6942
6943/***/ }),
6944/* 69 */
6945/***/ (function(module, exports, __webpack_require__) {
6946
6947var overArg = __webpack_require__(100);
6948
6949/* Built-in method references for those with the same name as other `lodash` methods. */
6950var nativeKeys = overArg(Object.keys, Object);
6951
6952module.exports = nativeKeys;
6953
6954
6955/***/ }),
6956/* 70 */
6957/***/ (function(module, exports, __webpack_require__) {
6958
6959module.exports = __webpack_require__(232);
6960
6961/***/ }),
6962/* 71 */
6963/***/ (function(module, exports, __webpack_require__) {
6964
6965var ctx = __webpack_require__(26);
6966var call = __webpack_require__(139);
6967var isArrayIter = __webpack_require__(140);
6968var anObject = __webpack_require__(12);
6969var toLength = __webpack_require__(63);
6970var getIterFn = __webpack_require__(103);
6971var BREAK = {};
6972var RETURN = {};
6973var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
6974 var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
6975 var f = ctx(fn, that, entries ? 2 : 1);
6976 var index = 0;
6977 var length, step, iterator, result;
6978 if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
6979 // fast case for arrays with default iterator
6980 if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
6981 result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
6982 if (result === BREAK || result === RETURN) return result;
6983 } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
6984 result = call(iterator, f, step.value, entries);
6985 if (result === BREAK || result === RETURN) return result;
6986 }
6987};
6988exports.BREAK = BREAK;
6989exports.RETURN = RETURN;
6990
6991
6992/***/ }),
6993/* 72 */
6994/***/ (function(module, exports, __webpack_require__) {
6995
6996"use strict";
6997// JS-YAML's default schema for `load` function.
6998// It is not described in the YAML specification.
6999//
7000// This schema is based on JS-YAML's default safe schema and includes
7001// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.
7002//
7003// Also this schema is used as default base schema at `Schema.create` function.
7004
7005
7006
7007
7008
7009var Schema = __webpack_require__(43);
7010
7011
7012module.exports = Schema.DEFAULT = new Schema({
7013 include: [
7014 __webpack_require__(59)
7015 ],
7016 explicit: [
7017 __webpack_require__(275),
7018 __webpack_require__(276),
7019 __webpack_require__(277)
7020 ]
7021});
7022
7023
7024/***/ }),
7025/* 73 */
7026/***/ (function(module, exports, __webpack_require__) {
7027
7028var isArray = __webpack_require__(44),
7029 isKey = __webpack_require__(282),
7030 stringToPath = __webpack_require__(284),
7031 toString = __webpack_require__(134);
7032
7033/**
7034 * Casts `value` to a path array if it's not one.
7035 *
7036 * @private
7037 * @param {*} value The value to inspect.
7038 * @param {Object} [object] The object to query keys on.
7039 * @returns {Array} Returns the cast property path array.
7040 */
7041function castPath(value, object) {
7042 if (isArray(value)) {
7043 return value;
7044 }
7045 return isKey(value, object) ? [value] : stringToPath(toString(value));
7046}
7047
7048module.exports = castPath;
7049
7050
7051/***/ }),
7052/* 74 */
7053/***/ (function(module, exports) {
7054
7055/*!
7056 * https://github.com/Starcounter-Jack/JSON-Patch
7057 * (c) 2017 Joachim Wester
7058 * MIT license
7059 */
7060var __extends = (this && this.__extends) || (function () {
7061 var extendStatics = function (d, b) {
7062 extendStatics = Object.setPrototypeOf ||
7063 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7064 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7065 return extendStatics(d, b);
7066 };
7067 return function (d, b) {
7068 extendStatics(d, b);
7069 function __() { this.constructor = d; }
7070 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7071 };
7072})();
7073Object.defineProperty(exports, "__esModule", { value: true });
7074var _hasOwnProperty = Object.prototype.hasOwnProperty;
7075function hasOwnProperty(obj, key) {
7076 return _hasOwnProperty.call(obj, key);
7077}
7078exports.hasOwnProperty = hasOwnProperty;
7079function _objectKeys(obj) {
7080 if (Array.isArray(obj)) {
7081 var keys = new Array(obj.length);
7082 for (var k = 0; k < keys.length; k++) {
7083 keys[k] = "" + k;
7084 }
7085 return keys;
7086 }
7087 if (Object.keys) {
7088 return Object.keys(obj);
7089 }
7090 var keys = [];
7091 for (var i in obj) {
7092 if (hasOwnProperty(obj, i)) {
7093 keys.push(i);
7094 }
7095 }
7096 return keys;
7097}
7098exports._objectKeys = _objectKeys;
7099;
7100/**
7101* Deeply clone the object.
7102* https://jsperf.com/deep-copy-vs-json-stringify-json-parse/25 (recursiveDeepCopy)
7103* @param {any} obj value to clone
7104* @return {any} cloned obj
7105*/
7106function _deepClone(obj) {
7107 switch (typeof obj) {
7108 case "object":
7109 return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5
7110 case "undefined":
7111 return null; //this is how JSON.stringify behaves for array items
7112 default:
7113 return obj; //no need to clone primitives
7114 }
7115}
7116exports._deepClone = _deepClone;
7117//3x faster than cached /^\d+$/.test(str)
7118function isInteger(str) {
7119 var i = 0;
7120 var len = str.length;
7121 var charCode;
7122 while (i < len) {
7123 charCode = str.charCodeAt(i);
7124 if (charCode >= 48 && charCode <= 57) {
7125 i++;
7126 continue;
7127 }
7128 return false;
7129 }
7130 return true;
7131}
7132exports.isInteger = isInteger;
7133/**
7134* Escapes a json pointer path
7135* @param path The raw pointer
7136* @return the Escaped path
7137*/
7138function escapePathComponent(path) {
7139 if (path.indexOf('/') === -1 && path.indexOf('~') === -1)
7140 return path;
7141 return path.replace(/~/g, '~0').replace(/\//g, '~1');
7142}
7143exports.escapePathComponent = escapePathComponent;
7144/**
7145 * Unescapes a json pointer path
7146 * @param path The escaped pointer
7147 * @return The unescaped path
7148 */
7149function unescapePathComponent(path) {
7150 return path.replace(/~1/g, '/').replace(/~0/g, '~');
7151}
7152exports.unescapePathComponent = unescapePathComponent;
7153function _getPathRecursive(root, obj) {
7154 var found;
7155 for (var key in root) {
7156 if (hasOwnProperty(root, key)) {
7157 if (root[key] === obj) {
7158 return escapePathComponent(key) + '/';
7159 }
7160 else if (typeof root[key] === 'object') {
7161 found = _getPathRecursive(root[key], obj);
7162 if (found != '') {
7163 return escapePathComponent(key) + '/' + found;
7164 }
7165 }
7166 }
7167 }
7168 return '';
7169}
7170exports._getPathRecursive = _getPathRecursive;
7171function getPath(root, obj) {
7172 if (root === obj) {
7173 return '/';
7174 }
7175 var path = _getPathRecursive(root, obj);
7176 if (path === '') {
7177 throw new Error("Object not found in root");
7178 }
7179 return '/' + path;
7180}
7181exports.getPath = getPath;
7182/**
7183* Recursively checks whether an object has any undefined values inside.
7184*/
7185function hasUndefined(obj) {
7186 if (obj === undefined) {
7187 return true;
7188 }
7189 if (obj) {
7190 if (Array.isArray(obj)) {
7191 for (var i = 0, len = obj.length; i < len; i++) {
7192 if (hasUndefined(obj[i])) {
7193 return true;
7194 }
7195 }
7196 }
7197 else if (typeof obj === "object") {
7198 var objKeys = _objectKeys(obj);
7199 var objKeysLength = objKeys.length;
7200 for (var i = 0; i < objKeysLength; i++) {
7201 if (hasUndefined(obj[objKeys[i]])) {
7202 return true;
7203 }
7204 }
7205 }
7206 }
7207 return false;
7208}
7209exports.hasUndefined = hasUndefined;
7210function patchErrorMessageFormatter(message, args) {
7211 var messageParts = [message];
7212 for (var key in args) {
7213 var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print
7214 if (typeof value !== 'undefined') {
7215 messageParts.push(key + ": " + value);
7216 }
7217 }
7218 return messageParts.join('\n');
7219}
7220var PatchError = /** @class */ (function (_super) {
7221 __extends(PatchError, _super);
7222 function PatchError(message, name, index, operation, tree) {
7223 var _newTarget = this.constructor;
7224 var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;
7225 _this.name = name;
7226 _this.index = index;
7227 _this.operation = operation;
7228 _this.tree = tree;
7229 Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
7230 _this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });
7231 return _this;
7232 }
7233 return PatchError;
7234}(Error));
7235exports.PatchError = PatchError;
7236
7237
7238/***/ }),
7239/* 75 */
7240/***/ (function(module, exports, __webpack_require__) {
7241
7242var eq = __webpack_require__(128);
7243
7244/**
7245 * Gets the index at which the `key` is found in `array` of key-value pairs.
7246 *
7247 * @private
7248 * @param {Array} array The array to inspect.
7249 * @param {*} key The key to search for.
7250 * @returns {number} Returns the index of the matched value, else `-1`.
7251 */
7252function assocIndexOf(array, key) {
7253 var length = array.length;
7254 while (length--) {
7255 if (eq(array[length][0], key)) {
7256 return length;
7257 }
7258 }
7259 return -1;
7260}
7261
7262module.exports = assocIndexOf;
7263
7264
7265/***/ }),
7266/* 76 */
7267/***/ (function(module, exports, __webpack_require__) {
7268
7269module.exports = __webpack_require__(235);
7270
7271/***/ }),
7272/* 77 */
7273/***/ (function(module, exports, __webpack_require__) {
7274
7275var _Object$getPrototypeOf = __webpack_require__(296);
7276
7277var _Object$setPrototypeOf = __webpack_require__(154);
7278
7279function _getPrototypeOf(o) {
7280 module.exports = _getPrototypeOf = _Object$setPrototypeOf ? _Object$getPrototypeOf : function _getPrototypeOf(o) {
7281 return o.__proto__ || _Object$getPrototypeOf(o);
7282 };
7283 return _getPrototypeOf(o);
7284}
7285
7286module.exports = _getPrototypeOf;
7287
7288/***/ }),
7289/* 78 */
7290/***/ (function(module, exports, __webpack_require__) {
7291
7292"use strict";
7293
7294
7295
7296var yaml = __webpack_require__(256);
7297
7298
7299module.exports = yaml;
7300
7301
7302/***/ }),
7303/* 79 */
7304/***/ (function(module, exports, __webpack_require__) {
7305
7306module.exports = __webpack_require__(302);
7307
7308/***/ }),
7309/* 80 */
7310/***/ (function(module, __webpack_exports__, __webpack_require__) {
7311
7312"use strict";
7313__webpack_require__.r(__webpack_exports__);
7314/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createErrorType; });
7315function createErrorType(name, init) {
7316 function E() {
7317 if (!Error.captureStackTrace) {
7318 this.stack = new Error().stack;
7319 } else {
7320 Error.captureStackTrace(this, this.constructor);
7321 }
7322
7323 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7324 args[_key] = arguments[_key];
7325 }
7326
7327 this.message = args[0];
7328
7329 if (init) {
7330 init.apply(this, args);
7331 }
7332 }
7333
7334 E.prototype = new Error();
7335 E.prototype.name = name;
7336 E.prototype.constructor = E;
7337 return E;
7338}
7339
7340/***/ }),
7341/* 81 */
7342/***/ (function(module, __webpack_exports__, __webpack_require__) {
7343
7344"use strict";
7345__webpack_require__.r(__webpack_exports__);
7346/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ACCEPT_HEADER_VALUE_FOR_DOCUMENTS", function() { return ACCEPT_HEADER_VALUE_FOR_DOCUMENTS; });
7347// eslint-disable-next-line import/prefer-default-export
7348var ACCEPT_HEADER_VALUE_FOR_DOCUMENTS = 'application/json, application/yaml';
7349
7350/***/ }),
7351/* 82 */
7352/***/ (function(module, exports, __webpack_require__) {
7353
7354/* WEBPACK VAR INJECTION */(function(Buffer) {(function () {
7355 "use strict";
7356
7357 function btoa(str) {
7358 var buffer;
7359
7360 if (str instanceof Buffer) {
7361 buffer = str;
7362 } else {
7363 buffer = Buffer.from(str.toString(), 'binary');
7364 }
7365
7366 return buffer.toString('base64');
7367 }
7368
7369 module.exports = btoa;
7370}());
7371
7372/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(29).Buffer))
7373
7374/***/ }),
7375/* 83 */
7376/***/ (function(module, exports, __webpack_require__) {
7377
7378"use strict";
7379
7380
7381var stringify = __webpack_require__(254);
7382var parse = __webpack_require__(255);
7383var formats = __webpack_require__(149);
7384
7385module.exports = {
7386 formats: formats,
7387 parse: parse,
7388 stringify: stringify
7389};
7390
7391
7392/***/ }),
7393/* 84 */
7394/***/ (function(module, __webpack_exports__, __webpack_require__) {
7395
7396"use strict";
7397__webpack_require__.r(__webpack_exports__);
7398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "self", function() { return self; });
7399/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "execute", function() { return execute; });
7400/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildRequest", function() { return buildRequest; });
7401/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "baseUrl", function() { return baseUrl; });
7402/* harmony import */ var _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
7403/* harmony import */ var _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
7404/* harmony import */ var _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
7405/* harmony import */ var _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_1__);
7406/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
7407/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2__);
7408/* harmony import */ var _babel_runtime_corejs2_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(178);
7409/* harmony import */ var _babel_runtime_corejs2_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__);
7410/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
7411/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4__);
7412/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
7413/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5__);
7414/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
7415/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6__);
7416/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31);
7417/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_7__);
7418/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(179);
7419/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_8__);
7420/* harmony import */ var lodash_isArray__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(44);
7421/* harmony import */ var lodash_isArray__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_isArray__WEBPACK_IMPORTED_MODULE_9__);
7422/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(20);
7423/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_10__);
7424/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(180);
7425/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cookie__WEBPACK_IMPORTED_MODULE_11__);
7426/* harmony import */ var _http__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(18);
7427/* harmony import */ var _specmap_lib_create_error__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80);
7428/* harmony import */ var _swagger2_parameter_builders__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(181);
7429/* harmony import */ var _oas3_parameter_builders__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(182);
7430/* harmony import */ var _oas3_build_request__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(183);
7431/* harmony import */ var _swagger2_build_request__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(184);
7432/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(13);
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453var arrayOrEmpty = function arrayOrEmpty(ar) {
7454 return _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(ar) ? ar : [];
7455};
7456
7457var OperationNotFoundError = Object(_specmap_lib_create_error__WEBPACK_IMPORTED_MODULE_13__["default"])('OperationNotFoundError', function cb(message, extra, oriError) {
7458 this.originalError = oriError;
7459
7460 _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_5___default()(this, extra || {});
7461});
7462
7463var findParametersWithName = function findParametersWithName(name, parameters) {
7464 return parameters.filter(function (p) {
7465 return p.name === name;
7466 });
7467}; // removes parameters that have duplicate 'in' and 'name' properties
7468
7469
7470var deduplicateParameters = function deduplicateParameters(parameters) {
7471 var paramsMap = {};
7472 parameters.forEach(function (p) {
7473 if (!paramsMap[p.in]) {
7474 paramsMap[p.in] = {};
7475 }
7476
7477 paramsMap[p.in][p.name] = p;
7478 });
7479 var dedupedParameters = [];
7480
7481 _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(paramsMap).forEach(function (i) {
7482 _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(paramsMap[i]).forEach(function (p) {
7483 dedupedParameters.push(paramsMap[i][p]);
7484 });
7485 });
7486
7487 return dedupedParameters;
7488}; // For stubbing in tests
7489
7490
7491var self = {
7492 buildRequest: buildRequest
7493}; // Execute request, with the given operationId and parameters
7494// pathName/method or operationId is optional
7495
7496function execute(_ref) {
7497 var userHttp = _ref.http,
7498 fetch = _ref.fetch,
7499 spec = _ref.spec,
7500 operationId = _ref.operationId,
7501 pathName = _ref.pathName,
7502 method = _ref.method,
7503 parameters = _ref.parameters,
7504 securities = _ref.securities,
7505 extras = _babel_runtime_corejs2_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3___default()(_ref, ["http", "fetch", "spec", "operationId", "pathName", "method", "parameters", "securities"]);
7506
7507 // Provide default fetch implementation
7508 var http = userHttp || fetch || _http__WEBPACK_IMPORTED_MODULE_12__["default"]; // Default to _our_ http
7509
7510 if (pathName && method && !operationId) {
7511 operationId = Object(_helpers__WEBPACK_IMPORTED_MODULE_18__["legacyIdFromPathMethod"])(pathName, method);
7512 }
7513
7514 var request = self.buildRequest(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2___default()({
7515 spec: spec,
7516 operationId: operationId,
7517 parameters: parameters,
7518 securities: securities,
7519 http: http
7520 }, extras));
7521
7522 if (request.body && (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_8___default()(request.body) || lodash_isArray__WEBPACK_IMPORTED_MODULE_9___default()(request.body))) {
7523 request.body = _babel_runtime_corejs2_core_js_json_stringify__WEBPACK_IMPORTED_MODULE_1___default()(request.body);
7524 } // Build request and execute it
7525
7526
7527 return http(request);
7528} // Build a request, which can be handled by the `http.js` implementation.
7529
7530function buildRequest(options) {
7531 var spec = options.spec,
7532 operationId = options.operationId,
7533 responseContentType = options.responseContentType,
7534 scheme = options.scheme,
7535 requestInterceptor = options.requestInterceptor,
7536 responseInterceptor = options.responseInterceptor,
7537 contextUrl = options.contextUrl,
7538 userFetch = options.userFetch,
7539 server = options.server,
7540 serverVariables = options.serverVariables,
7541 http = options.http;
7542 var parameters = options.parameters,
7543 parameterBuilders = options.parameterBuilders;
7544 var specIsOAS3 = Object(_helpers__WEBPACK_IMPORTED_MODULE_18__["isOAS3"])(spec);
7545
7546 if (!parameterBuilders) {
7547 // user did not provide custom parameter builders
7548 if (specIsOAS3) {
7549 parameterBuilders = _oas3_parameter_builders__WEBPACK_IMPORTED_MODULE_15__;
7550 } else {
7551 parameterBuilders = _swagger2_parameter_builders__WEBPACK_IMPORTED_MODULE_14__["default"];
7552 }
7553 } // Set credentials with 'http.withCredentials' value
7554
7555
7556 var credentials = http && http.withCredentials ? 'include' : 'same-origin'; // Base Template
7557
7558 var req = {
7559 url: '',
7560 credentials: credentials,
7561 headers: {},
7562 cookies: {}
7563 };
7564
7565 if (requestInterceptor) {
7566 req.requestInterceptor = requestInterceptor;
7567 }
7568
7569 if (responseInterceptor) {
7570 req.responseInterceptor = responseInterceptor;
7571 }
7572
7573 if (userFetch) {
7574 req.userFetch = userFetch;
7575 }
7576
7577 var operationRaw = Object(_helpers__WEBPACK_IMPORTED_MODULE_18__["getOperationRaw"])(spec, operationId);
7578
7579 if (!operationRaw) {
7580 throw new OperationNotFoundError("Operation ".concat(operationId, " not found"));
7581 }
7582
7583 var _operationRaw$operati = operationRaw.operation,
7584 operation = _operationRaw$operati === void 0 ? {} : _operationRaw$operati,
7585 method = operationRaw.method,
7586 pathName = operationRaw.pathName;
7587 req.url += baseUrl({
7588 spec: spec,
7589 scheme: scheme,
7590 contextUrl: contextUrl,
7591 server: server,
7592 serverVariables: serverVariables,
7593 pathName: pathName,
7594 method: method
7595 }); // Mostly for testing
7596
7597 if (!operationId) {
7598 // Not removing req.cookies causes testing issues and would
7599 // change our interface, so we're always sure to remove it.
7600 // See the same statement lower down in this function for
7601 // more context.
7602 delete req.cookies;
7603 return req;
7604 }
7605
7606 req.url += pathName; // Have not yet replaced the path parameters
7607
7608 req.method = "".concat(method).toUpperCase();
7609 parameters = parameters || {};
7610 var path = spec.paths[pathName] || {};
7611
7612 if (responseContentType) {
7613 req.headers.accept = responseContentType;
7614 }
7615
7616 var combinedParameters = deduplicateParameters([].concat(arrayOrEmpty(operation.parameters)) // operation parameters
7617 .concat(arrayOrEmpty(path.parameters))); // path parameters
7618 // REVIEW: OAS3: have any key names or parameter shapes changed?
7619 // Any new features that need to be plugged in here?
7620 // Add values to request
7621
7622 combinedParameters.forEach(function (parameter) {
7623 var builder = parameterBuilders[parameter.in];
7624 var value;
7625
7626 if (parameter.in === 'body' && parameter.schema && parameter.schema.properties) {
7627 value = parameters;
7628 }
7629
7630 value = parameter && parameter.name && parameters[parameter.name];
7631
7632 if (typeof value === 'undefined') {
7633 // check for `name-in` formatted key
7634 value = parameter && parameter.name && parameters["".concat(parameter.in, ".").concat(parameter.name)];
7635 } else if (findParametersWithName(parameter.name, combinedParameters).length > 1) {
7636 // value came from `parameters[parameter.name]`
7637 // check to see if this is an ambiguous parameter
7638 // eslint-disable-next-line no-console
7639 console.warn("Parameter '".concat(parameter.name, "' is ambiguous because the defined spec has more than one parameter with the name: '").concat(parameter.name, "' and the passed-in parameter values did not define an 'in' value."));
7640 }
7641
7642 if (value === null) {
7643 return;
7644 }
7645
7646 if (typeof parameter.default !== 'undefined' && typeof value === 'undefined') {
7647 value = parameter.default;
7648 }
7649
7650 if (typeof value === 'undefined' && parameter.required && !parameter.allowEmptyValue) {
7651 throw new Error("Required parameter ".concat(parameter.name, " is not provided"));
7652 }
7653
7654 if (specIsOAS3 && parameter.schema && parameter.schema.type === 'object' && typeof value === 'string') {
7655 try {
7656 value = JSON.parse(value);
7657 } catch (e) {
7658 throw new Error('Could not parse object parameter value string as JSON');
7659 }
7660 }
7661
7662 if (builder) {
7663 builder({
7664 req: req,
7665 parameter: parameter,
7666 value: value,
7667 operation: operation,
7668 spec: spec
7669 });
7670 }
7671 }); // Do version-specific tasks, then return those results.
7672
7673 var versionSpecificOptions = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2___default()(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2___default()({}, options), {}, {
7674 operation: operation
7675 });
7676
7677 if (specIsOAS3) {
7678 req = Object(_oas3_build_request__WEBPACK_IMPORTED_MODULE_16__["default"])(versionSpecificOptions, req);
7679 } else {
7680 // If not OAS3, then treat as Swagger2.
7681 req = Object(_swagger2_build_request__WEBPACK_IMPORTED_MODULE_17__["default"])(versionSpecificOptions, req);
7682 } // If the cookie convenience object exists in our request,
7683 // serialize its content and then delete the cookie object.
7684
7685
7686 if (req.cookies && _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(req.cookies).length) {
7687 var cookieString = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(req.cookies).reduce(function (prev, cookieName) {
7688 var cookieValue = req.cookies[cookieName];
7689 var prefix = prev ? '&' : '';
7690 var stringified = cookie__WEBPACK_IMPORTED_MODULE_11___default.a.serialize(cookieName, cookieValue);
7691 return prev + prefix + stringified;
7692 }, '');
7693
7694 req.headers.Cookie = cookieString;
7695 }
7696
7697 if (req.cookies) {
7698 // even if no cookies were defined, we need to remove
7699 // the cookies key from our request, or many many legacy
7700 // tests will break.
7701 delete req.cookies;
7702 } // Will add the query object into the URL, if it exists
7703 // ... will also create a FormData instance, if multipart/form-data (eg: a file)
7704
7705
7706 Object(_http__WEBPACK_IMPORTED_MODULE_12__["mergeInQueryOrForm"])(req);
7707 return req;
7708}
7709
7710var stripNonAlpha = function stripNonAlpha(str) {
7711 return str ? str.replace(/\W/g, '') : null;
7712}; // be careful when modifying this! it is a publicly-exposed method.
7713
7714
7715function baseUrl(obj) {
7716 var specIsOAS3 = Object(_helpers__WEBPACK_IMPORTED_MODULE_18__["isOAS3"])(obj.spec);
7717 return specIsOAS3 ? oas3BaseUrl(obj) : swagger2BaseUrl(obj);
7718}
7719
7720function oas3BaseUrl(_ref2) {
7721 var spec = _ref2.spec,
7722 pathName = _ref2.pathName,
7723 method = _ref2.method,
7724 server = _ref2.server,
7725 contextUrl = _ref2.contextUrl,
7726 _ref2$serverVariables = _ref2.serverVariables,
7727 serverVariables = _ref2$serverVariables === void 0 ? {} : _ref2$serverVariables;
7728 var servers = lodash_get__WEBPACK_IMPORTED_MODULE_7___default()(spec, ['paths', pathName, (method || '').toLowerCase(), 'servers']) || lodash_get__WEBPACK_IMPORTED_MODULE_7___default()(spec, ['paths', pathName, 'servers']) || lodash_get__WEBPACK_IMPORTED_MODULE_7___default()(spec, ['servers']);
7729 var selectedServerUrl = '';
7730 var selectedServerObj = null;
7731
7732 if (server && servers && servers.length) {
7733 var serverUrls = servers.map(function (srv) {
7734 return srv.url;
7735 });
7736
7737 if (serverUrls.indexOf(server) > -1) {
7738 selectedServerUrl = server;
7739 selectedServerObj = servers[serverUrls.indexOf(server)];
7740 }
7741 }
7742
7743 if (!selectedServerUrl && servers && servers.length) {
7744 // default to the first server if we don't have one by now
7745 selectedServerUrl = servers[0].url; // eslint-disable-line semi
7746
7747 var _servers = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(servers, 1);
7748
7749 selectedServerObj = _servers[0];
7750 }
7751
7752 if (selectedServerUrl.indexOf('{') > -1) {
7753 // do variable substitution
7754 var varNames = getVariableTemplateNames(selectedServerUrl);
7755 varNames.forEach(function (vari) {
7756 if (selectedServerObj.variables && selectedServerObj.variables[vari]) {
7757 // variable is defined in server
7758 var variableDefinition = selectedServerObj.variables[vari];
7759 var variableValue = serverVariables[vari] || variableDefinition.default;
7760 var re = new RegExp("{".concat(vari, "}"), 'g');
7761 selectedServerUrl = selectedServerUrl.replace(re, variableValue);
7762 }
7763 });
7764 }
7765
7766 return buildOas3UrlWithContext(selectedServerUrl, contextUrl);
7767}
7768
7769function buildOas3UrlWithContext() {
7770 var ourUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
7771 var contextUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
7772 var parsedUrl = url__WEBPACK_IMPORTED_MODULE_10___default.a.parse(ourUrl);
7773 var parsedContextUrl = url__WEBPACK_IMPORTED_MODULE_10___default.a.parse(contextUrl);
7774 var computedScheme = stripNonAlpha(parsedUrl.protocol) || stripNonAlpha(parsedContextUrl.protocol) || '';
7775 var computedHost = parsedUrl.host || parsedContextUrl.host;
7776 var computedPath = parsedUrl.pathname || '';
7777 var res;
7778
7779 if (computedScheme && computedHost) {
7780 res = "".concat(computedScheme, "://").concat(computedHost + computedPath); // If last character is '/', trim it off
7781 } else {
7782 res = computedPath;
7783 }
7784
7785 return res[res.length - 1] === '/' ? res.slice(0, -1) : res;
7786}
7787
7788function getVariableTemplateNames(str) {
7789 var results = [];
7790 var re = /{([^}]+)}/g;
7791 var text; // eslint-disable-next-line no-cond-assign
7792
7793 while (text = re.exec(str)) {
7794 results.push(text[1]);
7795 }
7796
7797 return results;
7798} // Compose the baseUrl ( scheme + host + basePath )
7799
7800
7801function swagger2BaseUrl(_ref3) {
7802 var spec = _ref3.spec,
7803 scheme = _ref3.scheme,
7804 _ref3$contextUrl = _ref3.contextUrl,
7805 contextUrl = _ref3$contextUrl === void 0 ? '' : _ref3$contextUrl;
7806 var parsedContextUrl = url__WEBPACK_IMPORTED_MODULE_10___default.a.parse(contextUrl);
7807 var firstSchemeInSpec = _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(spec.schemes) ? spec.schemes[0] : null;
7808 var computedScheme = scheme || firstSchemeInSpec || stripNonAlpha(parsedContextUrl.protocol) || 'http';
7809 var computedHost = spec.host || parsedContextUrl.host || '';
7810 var computedPath = spec.basePath || '';
7811 var res;
7812
7813 if (computedScheme && computedHost) {
7814 // we have what we need for an absolute URL
7815 res = "".concat(computedScheme, "://").concat(computedHost + computedPath);
7816 } else {
7817 // if not, a relative URL will have to do
7818 res = computedPath;
7819 } // If last character is '/', trim it off
7820
7821
7822 return res[res.length - 1] === '/' ? res.slice(0, -1) : res;
7823}
7824
7825/***/ }),
7826/* 85 */
7827/***/ (function(module, exports, __webpack_require__) {
7828
7829module.exports = __webpack_require__(187);
7830
7831/***/ }),
7832/* 86 */
7833/***/ (function(module, exports, __webpack_require__) {
7834
7835var isObject = __webpack_require__(9);
7836var document = __webpack_require__(7).document;
7837// typeof document.createElement is 'object' in old IE
7838var is = isObject(document) && isObject(document.createElement);
7839module.exports = function (it) {
7840 return is ? document.createElement(it) : {};
7841};
7842
7843
7844/***/ }),
7845/* 87 */
7846/***/ (function(module, exports, __webpack_require__) {
7847
7848// 7.1.1 ToPrimitive(input [, PreferredType])
7849var isObject = __webpack_require__(9);
7850// instead of the ES6 spec version, we didn't implement @@toPrimitive case
7851// and the second argument - flag - preferred type is a string
7852module.exports = function (it, S) {
7853 if (!isObject(it)) return it;
7854 var fn, val;
7855 if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
7856 if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
7857 if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
7858 throw TypeError("Can't convert object to primitive value");
7859};
7860
7861
7862/***/ }),
7863/* 88 */
7864/***/ (function(module, exports, __webpack_require__) {
7865
7866// fallback for non-array-like ES3 and non-enumerable old V8 strings
7867var cof = __webpack_require__(50);
7868// eslint-disable-next-line no-prototype-builtins
7869module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
7870 return cof(it) == 'String' ? it.split('') : Object(it);
7871};
7872
7873
7874/***/ }),
7875/* 89 */
7876/***/ (function(module, exports) {
7877
7878// 7.2.1 RequireObjectCoercible(argument)
7879module.exports = function (it) {
7880 if (it == undefined) throw TypeError("Can't call method on " + it);
7881 return it;
7882};
7883
7884
7885/***/ }),
7886/* 90 */
7887/***/ (function(module, exports) {
7888
7889// 7.1.4 ToInteger
7890var ceil = Math.ceil;
7891var floor = Math.floor;
7892module.exports = function (it) {
7893 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
7894};
7895
7896
7897/***/ }),
7898/* 91 */
7899/***/ (function(module, exports, __webpack_require__) {
7900
7901var shared = __webpack_require__(92)('keys');
7902var uid = __webpack_require__(64);
7903module.exports = function (key) {
7904 return shared[key] || (shared[key] = uid(key));
7905};
7906
7907
7908/***/ }),
7909/* 92 */
7910/***/ (function(module, exports, __webpack_require__) {
7911
7912var core = __webpack_require__(5);
7913var global = __webpack_require__(7);
7914var SHARED = '__core-js_shared__';
7915var store = global[SHARED] || (global[SHARED] = {});
7916
7917(module.exports = function (key, value) {
7918 return store[key] || (store[key] = value !== undefined ? value : {});
7919})('versions', []).push({
7920 version: core.version,
7921 mode: __webpack_require__(51) ? 'pure' : 'global',
7922 copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
7923});
7924
7925
7926/***/ }),
7927/* 93 */
7928/***/ (function(module, exports) {
7929
7930// IE 8- don't enum bug keys
7931module.exports = (
7932 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
7933).split(',');
7934
7935
7936/***/ }),
7937/* 94 */
7938/***/ (function(module, exports, __webpack_require__) {
7939
7940// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
7941var $keys = __webpack_require__(121);
7942var hiddenKeys = __webpack_require__(93).concat('length', 'prototype');
7943
7944exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
7945 return $keys(O, hiddenKeys);
7946};
7947
7948
7949/***/ }),
7950/* 95 */
7951/***/ (function(module, exports, __webpack_require__) {
7952
7953// most Object methods by ES6 should accept primitives
7954var $export = __webpack_require__(6);
7955var core = __webpack_require__(5);
7956var fails = __webpack_require__(28);
7957module.exports = function (KEY, exec) {
7958 var fn = (core.Object || {})[KEY] || Object[KEY];
7959 var exp = {};
7960 exp[KEY] = exec(fn);
7961 $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
7962};
7963
7964
7965/***/ }),
7966/* 96 */
7967/***/ (function(module, exports, __webpack_require__) {
7968
7969module.exports = __webpack_require__(27);
7970
7971
7972/***/ }),
7973/* 97 */
7974/***/ (function(module, exports, __webpack_require__) {
7975
7976exports.f = __webpack_require__(11);
7977
7978
7979/***/ }),
7980/* 98 */
7981/***/ (function(module, exports, __webpack_require__) {
7982
7983var global = __webpack_require__(7);
7984var core = __webpack_require__(5);
7985var LIBRARY = __webpack_require__(51);
7986var wksExt = __webpack_require__(97);
7987var defineProperty = __webpack_require__(19).f;
7988module.exports = function (name) {
7989 var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
7990 if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
7991};
7992
7993
7994/***/ }),
7995/* 99 */
7996/***/ (function(module, exports, __webpack_require__) {
7997
7998// 7.2.2 IsArray(argument)
7999var cof = __webpack_require__(50);
8000module.exports = Array.isArray || function isArray(arg) {
8001 return cof(arg) == 'Array';
8002};
8003
8004
8005/***/ }),
8006/* 100 */
8007/***/ (function(module, exports) {
8008
8009/**
8010 * Creates a unary function that invokes `func` with its argument transformed.
8011 *
8012 * @private
8013 * @param {Function} func The function to wrap.
8014 * @param {Function} transform The argument transform.
8015 * @returns {Function} Returns the new function.
8016 */
8017function overArg(func, transform) {
8018 return function(arg) {
8019 return func(transform(arg));
8020 };
8021}
8022
8023module.exports = overArg;
8024
8025
8026/***/ }),
8027/* 101 */
8028/***/ (function(module, exports) {
8029
8030var g;
8031
8032// This works in non-strict mode
8033g = (function() {
8034 return this;
8035})();
8036
8037try {
8038 // This works if eval is allowed (see CSP)
8039 g = g || new Function("return this")();
8040} catch (e) {
8041 // This works if the window reference is available
8042 if (typeof window === "object") g = window;
8043}
8044
8045// g can still be undefined, but nothing to do about it...
8046// We return undefined, instead of nothing here, so it's
8047// easier to handle this case. if(!global) { ...}
8048
8049module.exports = g;
8050
8051
8052/***/ }),
8053/* 102 */
8054/***/ (function(module, exports, __webpack_require__) {
8055
8056// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
8057var has = __webpack_require__(23);
8058var toObject = __webpack_require__(34);
8059var IE_PROTO = __webpack_require__(91)('IE_PROTO');
8060var ObjectProto = Object.prototype;
8061
8062module.exports = Object.getPrototypeOf || function (O) {
8063 O = toObject(O);
8064 if (has(O, IE_PROTO)) return O[IE_PROTO];
8065 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
8066 return O.constructor.prototype;
8067 } return O instanceof Object ? ObjectProto : null;
8068};
8069
8070
8071/***/ }),
8072/* 103 */
8073/***/ (function(module, exports, __webpack_require__) {
8074
8075var classof = __webpack_require__(104);
8076var ITERATOR = __webpack_require__(11)('iterator');
8077var Iterators = __webpack_require__(41);
8078module.exports = __webpack_require__(5).getIteratorMethod = function (it) {
8079 if (it != undefined) return it[ITERATOR]
8080 || it['@@iterator']
8081 || Iterators[classof(it)];
8082};
8083
8084
8085/***/ }),
8086/* 104 */
8087/***/ (function(module, exports, __webpack_require__) {
8088
8089// getting tag from 19.1.3.6 Object.prototype.toString()
8090var cof = __webpack_require__(50);
8091var TAG = __webpack_require__(11)('toStringTag');
8092// ES3 wrong here
8093var ARG = cof(function () { return arguments; }()) == 'Arguments';
8094
8095// fallback for IE11 Script Access Denied error
8096var tryGet = function (it, key) {
8097 try {
8098 return it[key];
8099 } catch (e) { /* empty */ }
8100};
8101
8102module.exports = function (it) {
8103 var O, T, B;
8104 return it === undefined ? 'Undefined' : it === null ? 'Null'
8105 // @@toStringTag case
8106 : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
8107 // builtinTag case
8108 : ARG ? cof(O)
8109 // ES3 arguments fallback
8110 : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
8111};
8112
8113
8114/***/ }),
8115/* 105 */
8116/***/ (function(module, exports) {
8117
8118
8119
8120/***/ }),
8121/* 106 */
8122/***/ (function(module, exports, __webpack_require__) {
8123
8124var _Array$from = __webpack_require__(76);
8125
8126var arrayLikeToArray = __webpack_require__(142);
8127
8128function _unsupportedIterableToArray(o, minLen) {
8129 if (!o) return;
8130 if (typeof o === "string") return arrayLikeToArray(o, minLen);
8131 var n = Object.prototype.toString.call(o).slice(8, -1);
8132 if (n === "Object" && o.constructor) n = o.constructor.name;
8133 if (n === "Map" || n === "Set") return _Array$from(o);
8134 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
8135}
8136
8137module.exports = _unsupportedIterableToArray;
8138
8139/***/ }),
8140/* 107 */
8141/***/ (function(module, exports) {
8142
8143module.exports = function (it, Constructor, name, forbiddenField) {
8144 if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
8145 throw TypeError(name + ': incorrect invocation!');
8146 } return it;
8147};
8148
8149
8150/***/ }),
8151/* 108 */
8152/***/ (function(module, exports, __webpack_require__) {
8153
8154"use strict";
8155
8156// 25.4.1.5 NewPromiseCapability(C)
8157var aFunction = __webpack_require__(33);
8158
8159function PromiseCapability(C) {
8160 var resolve, reject;
8161 this.promise = new C(function ($$resolve, $$reject) {
8162 if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
8163 resolve = $$resolve;
8164 reject = $$reject;
8165 });
8166 this.resolve = aFunction(resolve);
8167 this.reject = aFunction(reject);
8168}
8169
8170module.exports.f = function (C) {
8171 return new PromiseCapability(C);
8172};
8173
8174
8175/***/ }),
8176/* 109 */
8177/***/ (function(module, exports, __webpack_require__) {
8178
8179var hide = __webpack_require__(27);
8180module.exports = function (target, src, safe) {
8181 for (var key in src) {
8182 if (safe && target[key]) target[key] = src[key];
8183 else hide(target, key, src[key]);
8184 } return target;
8185};
8186
8187
8188/***/ }),
8189/* 110 */
8190/***/ (function(module, exports, __webpack_require__) {
8191
8192"use strict";
8193
8194
8195var has = Object.prototype.hasOwnProperty;
8196var isArray = Array.isArray;
8197
8198var hexTable = (function () {
8199 var array = [];
8200 for (var i = 0; i < 256; ++i) {
8201 array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
8202 }
8203
8204 return array;
8205}());
8206
8207var compactQueue = function compactQueue(queue) {
8208 while (queue.length > 1) {
8209 var item = queue.pop();
8210 var obj = item.obj[item.prop];
8211
8212 if (isArray(obj)) {
8213 var compacted = [];
8214
8215 for (var j = 0; j < obj.length; ++j) {
8216 if (typeof obj[j] !== 'undefined') {
8217 compacted.push(obj[j]);
8218 }
8219 }
8220
8221 item.obj[item.prop] = compacted;
8222 }
8223 }
8224};
8225
8226var arrayToObject = function arrayToObject(source, options) {
8227 var obj = options && options.plainObjects ? Object.create(null) : {};
8228 for (var i = 0; i < source.length; ++i) {
8229 if (typeof source[i] !== 'undefined') {
8230 obj[i] = source[i];
8231 }
8232 }
8233
8234 return obj;
8235};
8236
8237var merge = function merge(target, source, options) {
8238 /* eslint no-param-reassign: 0 */
8239 if (!source) {
8240 return target;
8241 }
8242
8243 if (typeof source !== 'object') {
8244 if (isArray(target)) {
8245 target.push(source);
8246 } else if (target && typeof target === 'object') {
8247 if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
8248 target[source] = true;
8249 }
8250 } else {
8251 return [target, source];
8252 }
8253
8254 return target;
8255 }
8256
8257 if (!target || typeof target !== 'object') {
8258 return [target].concat(source);
8259 }
8260
8261 var mergeTarget = target;
8262 if (isArray(target) && !isArray(source)) {
8263 mergeTarget = arrayToObject(target, options);
8264 }
8265
8266 if (isArray(target) && isArray(source)) {
8267 source.forEach(function (item, i) {
8268 if (has.call(target, i)) {
8269 var targetItem = target[i];
8270 if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
8271 target[i] = merge(targetItem, item, options);
8272 } else {
8273 target.push(item);
8274 }
8275 } else {
8276 target[i] = item;
8277 }
8278 });
8279 return target;
8280 }
8281
8282 return Object.keys(source).reduce(function (acc, key) {
8283 var value = source[key];
8284
8285 if (has.call(acc, key)) {
8286 acc[key] = merge(acc[key], value, options);
8287 } else {
8288 acc[key] = value;
8289 }
8290 return acc;
8291 }, mergeTarget);
8292};
8293
8294var assign = function assignSingleSource(target, source) {
8295 return Object.keys(source).reduce(function (acc, key) {
8296 acc[key] = source[key];
8297 return acc;
8298 }, target);
8299};
8300
8301var decode = function (str, decoder, charset) {
8302 var strWithoutPlus = str.replace(/\+/g, ' ');
8303 if (charset === 'iso-8859-1') {
8304 // unescape never throws, no try...catch needed:
8305 return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
8306 }
8307 // utf-8
8308 try {
8309 return decodeURIComponent(strWithoutPlus);
8310 } catch (e) {
8311 return strWithoutPlus;
8312 }
8313};
8314
8315var encode = function encode(str, defaultEncoder, charset) {
8316 // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
8317 // It has been adapted here for stricter adherence to RFC 3986
8318 if (str.length === 0) {
8319 return str;
8320 }
8321
8322 var string = str;
8323 if (typeof str === 'symbol') {
8324 string = Symbol.prototype.toString.call(str);
8325 } else if (typeof str !== 'string') {
8326 string = String(str);
8327 }
8328
8329 if (charset === 'iso-8859-1') {
8330 return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
8331 return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
8332 });
8333 }
8334
8335 var out = '';
8336 for (var i = 0; i < string.length; ++i) {
8337 var c = string.charCodeAt(i);
8338
8339 if (
8340 c === 0x2D // -
8341 || c === 0x2E // .
8342 || c === 0x5F // _
8343 || c === 0x7E // ~
8344 || (c >= 0x30 && c <= 0x39) // 0-9
8345 || (c >= 0x41 && c <= 0x5A) // a-z
8346 || (c >= 0x61 && c <= 0x7A) // A-Z
8347 ) {
8348 out += string.charAt(i);
8349 continue;
8350 }
8351
8352 if (c < 0x80) {
8353 out = out + hexTable[c];
8354 continue;
8355 }
8356
8357 if (c < 0x800) {
8358 out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
8359 continue;
8360 }
8361
8362 if (c < 0xD800 || c >= 0xE000) {
8363 out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
8364 continue;
8365 }
8366
8367 i += 1;
8368 c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
8369 out += hexTable[0xF0 | (c >> 18)]
8370 + hexTable[0x80 | ((c >> 12) & 0x3F)]
8371 + hexTable[0x80 | ((c >> 6) & 0x3F)]
8372 + hexTable[0x80 | (c & 0x3F)];
8373 }
8374
8375 return out;
8376};
8377
8378var compact = function compact(value) {
8379 var queue = [{ obj: { o: value }, prop: 'o' }];
8380 var refs = [];
8381
8382 for (var i = 0; i < queue.length; ++i) {
8383 var item = queue[i];
8384 var obj = item.obj[item.prop];
8385
8386 var keys = Object.keys(obj);
8387 for (var j = 0; j < keys.length; ++j) {
8388 var key = keys[j];
8389 var val = obj[key];
8390 if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
8391 queue.push({ obj: obj, prop: key });
8392 refs.push(val);
8393 }
8394 }
8395 }
8396
8397 compactQueue(queue);
8398
8399 return value;
8400};
8401
8402var isRegExp = function isRegExp(obj) {
8403 return Object.prototype.toString.call(obj) === '[object RegExp]';
8404};
8405
8406var isBuffer = function isBuffer(obj) {
8407 if (!obj || typeof obj !== 'object') {
8408 return false;
8409 }
8410
8411 return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
8412};
8413
8414var combine = function combine(a, b) {
8415 return [].concat(a, b);
8416};
8417
8418var maybeMap = function maybeMap(val, fn) {
8419 if (isArray(val)) {
8420 var mapped = [];
8421 for (var i = 0; i < val.length; i += 1) {
8422 mapped.push(fn(val[i]));
8423 }
8424 return mapped;
8425 }
8426 return fn(val);
8427};
8428
8429module.exports = {
8430 arrayToObject: arrayToObject,
8431 assign: assign,
8432 combine: combine,
8433 compact: compact,
8434 decode: decode,
8435 encode: encode,
8436 isBuffer: isBuffer,
8437 isRegExp: isRegExp,
8438 maybeMap: maybeMap,
8439 merge: merge
8440};
8441
8442
8443/***/ }),
8444/* 111 */
8445/***/ (function(module, exports, __webpack_require__) {
8446
8447"use strict";
8448// Standard YAML's Failsafe schema.
8449// http://www.yaml.org/spec/1.2/spec.html#id2802346
8450
8451
8452
8453
8454
8455var Schema = __webpack_require__(43);
8456
8457
8458module.exports = new Schema({
8459 explicit: [
8460 __webpack_require__(259),
8461 __webpack_require__(260),
8462 __webpack_require__(261)
8463 ]
8464});
8465
8466
8467/***/ }),
8468/* 112 */
8469/***/ (function(module, exports) {
8470
8471/**
8472 * This method returns the first argument it receives.
8473 *
8474 * @static
8475 * @since 0.1.0
8476 * @memberOf _
8477 * @category Util
8478 * @param {*} value Any value.
8479 * @returns {*} Returns `value`.
8480 * @example
8481 *
8482 * var object = { 'a': 1 };
8483 *
8484 * console.log(_.identity(object) === object);
8485 * // => true
8486 */
8487function identity(value) {
8488 return value;
8489}
8490
8491module.exports = identity;
8492
8493
8494/***/ }),
8495/* 113 */
8496/***/ (function(module, exports, __webpack_require__) {
8497
8498Object.defineProperty(exports, "__esModule", { value: true });
8499var areEquals = __webpack_require__(319);
8500var helpers_1 = __webpack_require__(74);
8501exports.JsonPatchError = helpers_1.PatchError;
8502exports.deepClone = helpers_1._deepClone;
8503/* We use a Javascript hash to store each
8504 function. Each hash entry (property) uses
8505 the operation identifiers specified in rfc6902.
8506 In this way, we can map each patch operation
8507 to its dedicated function in efficient way.
8508 */
8509/* The operations applicable to an object */
8510var objOps = {
8511 add: function (obj, key, document) {
8512 obj[key] = this.value;
8513 return { newDocument: document };
8514 },
8515 remove: function (obj, key, document) {
8516 var removed = obj[key];
8517 delete obj[key];
8518 return { newDocument: document, removed: removed };
8519 },
8520 replace: function (obj, key, document) {
8521 var removed = obj[key];
8522 obj[key] = this.value;
8523 return { newDocument: document, removed: removed };
8524 },
8525 move: function (obj, key, document) {
8526 /* in case move target overwrites an existing value,
8527 return the removed value, this can be taxing performance-wise,
8528 and is potentially unneeded */
8529 var removed = getValueByPointer(document, this.path);
8530 if (removed) {
8531 removed = helpers_1._deepClone(removed);
8532 }
8533 var originalValue = applyOperation(document, { op: "remove", path: this.from }).removed;
8534 applyOperation(document, { op: "add", path: this.path, value: originalValue });
8535 return { newDocument: document, removed: removed };
8536 },
8537 copy: function (obj, key, document) {
8538 var valueToCopy = getValueByPointer(document, this.from);
8539 // enforce copy by value so further operations don't affect source (see issue #177)
8540 applyOperation(document, { op: "add", path: this.path, value: helpers_1._deepClone(valueToCopy) });
8541 return { newDocument: document };
8542 },
8543 test: function (obj, key, document) {
8544 return { newDocument: document, test: areEquals(obj[key], this.value) };
8545 },
8546 _get: function (obj, key, document) {
8547 this.value = obj[key];
8548 return { newDocument: document };
8549 }
8550};
8551/* The operations applicable to an array. Many are the same as for the object */
8552var arrOps = {
8553 add: function (arr, i, document) {
8554 if (helpers_1.isInteger(i)) {
8555 arr.splice(i, 0, this.value);
8556 }
8557 else { // array props
8558 arr[i] = this.value;
8559 }
8560 // this may be needed when using '-' in an array
8561 return { newDocument: document, index: i };
8562 },
8563 remove: function (arr, i, document) {
8564 var removedList = arr.splice(i, 1);
8565 return { newDocument: document, removed: removedList[0] };
8566 },
8567 replace: function (arr, i, document) {
8568 var removed = arr[i];
8569 arr[i] = this.value;
8570 return { newDocument: document, removed: removed };
8571 },
8572 move: objOps.move,
8573 copy: objOps.copy,
8574 test: objOps.test,
8575 _get: objOps._get
8576};
8577/**
8578 * Retrieves a value from a JSON document by a JSON pointer.
8579 * Returns the value.
8580 *
8581 * @param document The document to get the value from
8582 * @param pointer an escaped JSON pointer
8583 * @return The retrieved value
8584 */
8585function getValueByPointer(document, pointer) {
8586 if (pointer == '') {
8587 return document;
8588 }
8589 var getOriginalDestination = { op: "_get", path: pointer };
8590 applyOperation(document, getOriginalDestination);
8591 return getOriginalDestination.value;
8592}
8593exports.getValueByPointer = getValueByPointer;
8594/**
8595 * Apply a single JSON Patch Operation on a JSON document.
8596 * Returns the {newDocument, result} of the operation.
8597 * It modifies the `document` and `operation` objects - it gets the values by reference.
8598 * If you would like to avoid touching your values, clone them:
8599 * `jsonpatch.applyOperation(document, jsonpatch._deepClone(operation))`.
8600 *
8601 * @param document The document to patch
8602 * @param operation The operation to apply
8603 * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.
8604 * @param mutateDocument Whether to mutate the original document or clone it before applying
8605 * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.
8606 * @return `{newDocument, result}` after the operation
8607 */
8608function applyOperation(document, operation, validateOperation, mutateDocument, banPrototypeModifications, index) {
8609 if (validateOperation === void 0) { validateOperation = false; }
8610 if (mutateDocument === void 0) { mutateDocument = true; }
8611 if (banPrototypeModifications === void 0) { banPrototypeModifications = true; }
8612 if (index === void 0) { index = 0; }
8613 if (validateOperation) {
8614 if (typeof validateOperation == 'function') {
8615 validateOperation(operation, 0, document, operation.path);
8616 }
8617 else {
8618 validator(operation, 0);
8619 }
8620 }
8621 /* ROOT OPERATIONS */
8622 if (operation.path === "") {
8623 var returnValue = { newDocument: document };
8624 if (operation.op === 'add') {
8625 returnValue.newDocument = operation.value;
8626 return returnValue;
8627 }
8628 else if (operation.op === 'replace') {
8629 returnValue.newDocument = operation.value;
8630 returnValue.removed = document; //document we removed
8631 return returnValue;
8632 }
8633 else if (operation.op === 'move' || operation.op === 'copy') { // it's a move or copy to root
8634 returnValue.newDocument = getValueByPointer(document, operation.from); // get the value by json-pointer in `from` field
8635 if (operation.op === 'move') { // report removed item
8636 returnValue.removed = document;
8637 }
8638 return returnValue;
8639 }
8640 else if (operation.op === 'test') {
8641 returnValue.test = areEquals(document, operation.value);
8642 if (returnValue.test === false) {
8643 throw new exports.JsonPatchError("Test operation failed", 'TEST_OPERATION_FAILED', index, operation, document);
8644 }
8645 returnValue.newDocument = document;
8646 return returnValue;
8647 }
8648 else if (operation.op === 'remove') { // a remove on root
8649 returnValue.removed = document;
8650 returnValue.newDocument = null;
8651 return returnValue;
8652 }
8653 else if (operation.op === '_get') {
8654 operation.value = document;
8655 return returnValue;
8656 }
8657 else { /* bad operation */
8658 if (validateOperation) {
8659 throw new exports.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, document);
8660 }
8661 else {
8662 return returnValue;
8663 }
8664 }
8665 } /* END ROOT OPERATIONS */
8666 else {
8667 if (!mutateDocument) {
8668 document = helpers_1._deepClone(document);
8669 }
8670 var path = operation.path || "";
8671 var keys = path.split('/');
8672 var obj = document;
8673 var t = 1; //skip empty element - http://jsperf.com/to-shift-or-not-to-shift
8674 var len = keys.length;
8675 var existingPathFragment = undefined;
8676 var key = void 0;
8677 var validateFunction = void 0;
8678 if (typeof validateOperation == 'function') {
8679 validateFunction = validateOperation;
8680 }
8681 else {
8682 validateFunction = validator;
8683 }
8684 while (true) {
8685 key = keys[t];
8686 if (banPrototypeModifications && key == '__proto__') {
8687 throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');
8688 }
8689 if (validateOperation) {
8690 if (existingPathFragment === undefined) {
8691 if (obj[key] === undefined) {
8692 existingPathFragment = keys.slice(0, t).join('/');
8693 }
8694 else if (t == len - 1) {
8695 existingPathFragment = operation.path;
8696 }
8697 if (existingPathFragment !== undefined) {
8698 validateFunction(operation, 0, document, existingPathFragment);
8699 }
8700 }
8701 }
8702 t++;
8703 if (Array.isArray(obj)) {
8704 if (key === '-') {
8705 key = obj.length;
8706 }
8707 else {
8708 if (validateOperation && !helpers_1.isInteger(key)) {
8709 throw new exports.JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", index, operation, document);
8710 } // only parse key when it's an integer for `arr.prop` to work
8711 else if (helpers_1.isInteger(key)) {
8712 key = ~~key;
8713 }
8714 }
8715 if (t >= len) {
8716 if (validateOperation && operation.op === "add" && key > obj.length) {
8717 throw new exports.JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", index, operation, document);
8718 }
8719 var returnValue = arrOps[operation.op].call(operation, obj, key, document); // Apply patch
8720 if (returnValue.test === false) {
8721 throw new exports.JsonPatchError("Test operation failed", 'TEST_OPERATION_FAILED', index, operation, document);
8722 }
8723 return returnValue;
8724 }
8725 }
8726 else {
8727 if (key && key.indexOf('~') != -1) {
8728 key = helpers_1.unescapePathComponent(key);
8729 }
8730 if (t >= len) {
8731 var returnValue = objOps[operation.op].call(operation, obj, key, document); // Apply patch
8732 if (returnValue.test === false) {
8733 throw new exports.JsonPatchError("Test operation failed", 'TEST_OPERATION_FAILED', index, operation, document);
8734 }
8735 return returnValue;
8736 }
8737 }
8738 obj = obj[key];
8739 }
8740 }
8741}
8742exports.applyOperation = applyOperation;
8743/**
8744 * Apply a full JSON Patch array on a JSON document.
8745 * Returns the {newDocument, result} of the patch.
8746 * It modifies the `document` object and `patch` - it gets the values by reference.
8747 * If you would like to avoid touching your values, clone them:
8748 * `jsonpatch.applyPatch(document, jsonpatch._deepClone(patch))`.
8749 *
8750 * @param document The document to patch
8751 * @param patch The patch to apply
8752 * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.
8753 * @param mutateDocument Whether to mutate the original document or clone it before applying
8754 * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.
8755 * @return An array of `{newDocument, result}` after the patch
8756 */
8757function applyPatch(document, patch, validateOperation, mutateDocument, banPrototypeModifications) {
8758 if (mutateDocument === void 0) { mutateDocument = true; }
8759 if (banPrototypeModifications === void 0) { banPrototypeModifications = true; }
8760 if (validateOperation) {
8761 if (!Array.isArray(patch)) {
8762 throw new exports.JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');
8763 }
8764 }
8765 if (!mutateDocument) {
8766 document = helpers_1._deepClone(document);
8767 }
8768 var results = new Array(patch.length);
8769 for (var i = 0, length_1 = patch.length; i < length_1; i++) {
8770 // we don't need to pass mutateDocument argument because if it was true, we already deep cloned the object, we'll just pass `true`
8771 results[i] = applyOperation(document, patch[i], validateOperation, true, banPrototypeModifications, i);
8772 document = results[i].newDocument; // in case root was replaced
8773 }
8774 results.newDocument = document;
8775 return results;
8776}
8777exports.applyPatch = applyPatch;
8778/**
8779 * Apply a single JSON Patch Operation on a JSON document.
8780 * Returns the updated document.
8781 * Suitable as a reducer.
8782 *
8783 * @param document The document to patch
8784 * @param operation The operation to apply
8785 * @return The updated document
8786 */
8787function applyReducer(document, operation, index) {
8788 var operationResult = applyOperation(document, operation);
8789 if (operationResult.test === false) { // failed test
8790 throw new exports.JsonPatchError("Test operation failed", 'TEST_OPERATION_FAILED', index, operation, document);
8791 }
8792 return operationResult.newDocument;
8793}
8794exports.applyReducer = applyReducer;
8795/**
8796 * Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.
8797 * @param {object} operation - operation object (patch)
8798 * @param {number} index - index of operation in the sequence
8799 * @param {object} [document] - object where the operation is supposed to be applied
8800 * @param {string} [existingPathFragment] - comes along with `document`
8801 */
8802function validator(operation, index, document, existingPathFragment) {
8803 if (typeof operation !== 'object' || operation === null || Array.isArray(operation)) {
8804 throw new exports.JsonPatchError('Operation is not an object', 'OPERATION_NOT_AN_OBJECT', index, operation, document);
8805 }
8806 else if (!objOps[operation.op]) {
8807 throw new exports.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, document);
8808 }
8809 else if (typeof operation.path !== 'string') {
8810 throw new exports.JsonPatchError('Operation `path` property is not a string', 'OPERATION_PATH_INVALID', index, operation, document);
8811 }
8812 else if (operation.path.indexOf('/') !== 0 && operation.path.length > 0) {
8813 // paths that aren't empty string should start with "/"
8814 throw new exports.JsonPatchError('Operation `path` property must start with "/"', 'OPERATION_PATH_INVALID', index, operation, document);
8815 }
8816 else if ((operation.op === 'move' || operation.op === 'copy') && typeof operation.from !== 'string') {
8817 throw new exports.JsonPatchError('Operation `from` property is not present (applicable in `move` and `copy` operations)', 'OPERATION_FROM_REQUIRED', index, operation, document);
8818 }
8819 else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && operation.value === undefined) {
8820 throw new exports.JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_REQUIRED', index, operation, document);
8821 }
8822 else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && helpers_1.hasUndefined(operation.value)) {
8823 throw new exports.JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED', index, operation, document);
8824 }
8825 else if (document) {
8826 if (operation.op == "add") {
8827 var pathLen = operation.path.split("/").length;
8828 var existingPathLen = existingPathFragment.split("/").length;
8829 if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {
8830 throw new exports.JsonPatchError('Cannot perform an `add` operation at the desired path', 'OPERATION_PATH_CANNOT_ADD', index, operation, document);
8831 }
8832 }
8833 else if (operation.op === 'replace' || operation.op === 'remove' || operation.op === '_get') {
8834 if (operation.path !== existingPathFragment) {
8835 throw new exports.JsonPatchError('Cannot perform the operation at a path that does not exist', 'OPERATION_PATH_UNRESOLVABLE', index, operation, document);
8836 }
8837 }
8838 else if (operation.op === 'move' || operation.op === 'copy') {
8839 var existingValue = { op: "_get", path: operation.from, value: undefined };
8840 var error = validate([existingValue], document);
8841 if (error && error.name === 'OPERATION_PATH_UNRESOLVABLE') {
8842 throw new exports.JsonPatchError('Cannot perform the operation from a path that does not exist', 'OPERATION_FROM_UNRESOLVABLE', index, operation, document);
8843 }
8844 }
8845 }
8846}
8847exports.validator = validator;
8848/**
8849 * Validates a sequence of operations. If `document` parameter is provided, the sequence is additionally validated against the object document.
8850 * If error is encountered, returns a JsonPatchError object
8851 * @param sequence
8852 * @param document
8853 * @returns {JsonPatchError|undefined}
8854 */
8855function validate(sequence, document, externalValidator) {
8856 try {
8857 if (!Array.isArray(sequence)) {
8858 throw new exports.JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');
8859 }
8860 if (document) {
8861 //clone document and sequence so that we can safely try applying operations
8862 applyPatch(helpers_1._deepClone(document), helpers_1._deepClone(sequence), externalValidator || true);
8863 }
8864 else {
8865 externalValidator = externalValidator || validator;
8866 for (var i = 0; i < sequence.length; i++) {
8867 externalValidator(sequence[i], i, document, undefined);
8868 }
8869 }
8870 }
8871 catch (e) {
8872 if (e instanceof exports.JsonPatchError) {
8873 return e;
8874 }
8875 else {
8876 throw e;
8877 }
8878 }
8879}
8880exports.validate = validate;
8881/**
8882 * Default export for backwards compat
8883 */
8884exports.default = {
8885 JsonPatchError: exports.JsonPatchError,
8886 deepClone: exports.deepClone,
8887 getValueByPointer: getValueByPointer,
8888 applyOperation: applyOperation,
8889 applyPatch: applyPatch,
8890 applyReducer: applyReducer,
8891 validator: validator,
8892 validate: validate
8893};
8894
8895
8896/***/ }),
8897/* 114 */
8898/***/ (function(module, exports, __webpack_require__) {
8899
8900// 0 -> Array#forEach
8901// 1 -> Array#map
8902// 2 -> Array#filter
8903// 3 -> Array#some
8904// 4 -> Array#every
8905// 5 -> Array#find
8906// 6 -> Array#findIndex
8907var ctx = __webpack_require__(26);
8908var IObject = __webpack_require__(88);
8909var toObject = __webpack_require__(34);
8910var toLength = __webpack_require__(63);
8911var asc = __webpack_require__(351);
8912module.exports = function (TYPE, $create) {
8913 var IS_MAP = TYPE == 1;
8914 var IS_FILTER = TYPE == 2;
8915 var IS_SOME = TYPE == 3;
8916 var IS_EVERY = TYPE == 4;
8917 var IS_FIND_INDEX = TYPE == 6;
8918 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
8919 var create = $create || asc;
8920 return function ($this, callbackfn, that) {
8921 var O = toObject($this);
8922 var self = IObject(O);
8923 var f = ctx(callbackfn, that, 3);
8924 var length = toLength(self.length);
8925 var index = 0;
8926 var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
8927 var val, res;
8928 for (;length > index; index++) if (NO_HOLES || index in self) {
8929 val = self[index];
8930 res = f(val, index, O);
8931 if (TYPE) {
8932 if (IS_MAP) result[index] = res; // map
8933 else if (res) switch (TYPE) {
8934 case 3: return true; // some
8935 case 5: return val; // find
8936 case 6: return index; // findIndex
8937 case 2: result.push(val); // filter
8938 } else if (IS_EVERY) return false; // every
8939 }
8940 }
8941 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
8942 };
8943};
8944
8945
8946/***/ }),
8947/* 115 */
8948/***/ (function(module, exports, __webpack_require__) {
8949
8950var isObject = __webpack_require__(9);
8951module.exports = function (it, TYPE) {
8952 if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
8953 return it;
8954};
8955
8956
8957/***/ }),
8958/* 116 */
8959/***/ (function(module, exports, __webpack_require__) {
8960
8961var _Object$defineProperty = __webpack_require__(85);
8962
8963function _defineProperty(obj, key, value) {
8964 if (key in obj) {
8965 _Object$defineProperty(obj, key, {
8966 value: value,
8967 enumerable: true,
8968 configurable: true,
8969 writable: true
8970 });
8971 } else {
8972 obj[key] = value;
8973 }
8974
8975 return obj;
8976}
8977
8978module.exports = _defineProperty;
8979
8980/***/ }),
8981/* 117 */
8982/***/ (function(module, exports) {
8983
8984/**
8985 * This method returns `undefined`.
8986 *
8987 * @static
8988 * @memberOf _
8989 * @since 2.3.0
8990 * @category Util
8991 * @example
8992 *
8993 * _.times(2, _.noop);
8994 * // => [undefined, undefined]
8995 */
8996function noop() {
8997 // No operation performed.
8998}
8999
9000module.exports = noop;
9001
9002
9003/***/ }),
9004/* 118 */
9005/***/ (function(module, exports, __webpack_require__) {
9006
9007"use strict";
9008// Query String Utilities
9009
9010
9011
9012var QueryString = exports;
9013var Buffer = __webpack_require__(29).Buffer;
9014
9015
9016// a safe fast alternative to decodeURIComponent
9017QueryString.unescapeBuffer = function(s, decodeSpaces) {
9018 var out = new Buffer(s.length);
9019 var state = 0;
9020 var n, m, hexchar;
9021
9022 for (var inIndex = 0, outIndex = 0; inIndex <= s.length; inIndex++) {
9023 var c = inIndex < s.length ? s.charCodeAt(inIndex) : NaN;
9024 switch (state) {
9025 case 0: // Any character
9026 switch (c) {
9027 case 37: // '%'
9028 n = 0;
9029 m = 0;
9030 state = 1;
9031 break;
9032 case 43: // '+'
9033 if (decodeSpaces)
9034 c = 32; // ' '
9035 // falls through
9036 default:
9037 out[outIndex++] = c;
9038 break;
9039 }
9040 break;
9041
9042 case 1: // First hex digit
9043 hexchar = c;
9044 if (c >= 48/*0*/ && c <= 57/*9*/) {
9045 n = c - 48/*0*/;
9046 } else if (c >= 65/*A*/ && c <= 70/*F*/) {
9047 n = c - 65/*A*/ + 10;
9048 } else if (c >= 97/*a*/ && c <= 102/*f*/) {
9049 n = c - 97/*a*/ + 10;
9050 } else {
9051 out[outIndex++] = 37/*%*/;
9052 out[outIndex++] = c;
9053 state = 0;
9054 break;
9055 }
9056 state = 2;
9057 break;
9058
9059 case 2: // Second hex digit
9060 state = 0;
9061 if (c >= 48/*0*/ && c <= 57/*9*/) {
9062 m = c - 48/*0*/;
9063 } else if (c >= 65/*A*/ && c <= 70/*F*/) {
9064 m = c - 65/*A*/ + 10;
9065 } else if (c >= 97/*a*/ && c <= 102/*f*/) {
9066 m = c - 97/*a*/ + 10;
9067 } else {
9068 out[outIndex++] = 37/*%*/;
9069 out[outIndex++] = hexchar;
9070 out[outIndex++] = c;
9071 break;
9072 }
9073 out[outIndex++] = 16 * n + m;
9074 break;
9075 }
9076 }
9077
9078 // TODO support returning arbitrary buffers.
9079
9080 return out.slice(0, outIndex - 1);
9081};
9082
9083
9084function qsUnescape(s, decodeSpaces) {
9085 try {
9086 return decodeURIComponent(s);
9087 } catch (e) {
9088 return QueryString.unescapeBuffer(s, decodeSpaces).toString();
9089 }
9090}
9091QueryString.unescape = qsUnescape;
9092
9093
9094var hexTable = new Array(256);
9095for (var i = 0; i < 256; ++i)
9096 hexTable[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
9097QueryString.escape = function(str) {
9098 // replaces encodeURIComponent
9099 // http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3.4
9100 if (typeof str !== 'string')
9101 str += '';
9102 var out = '';
9103 var lastPos = 0;
9104
9105 for (var i = 0; i < str.length; ++i) {
9106 var c = str.charCodeAt(i);
9107
9108 // These characters do not need escaping (in order):
9109 // ! - . _ ~
9110 // ' ( ) *
9111 // digits
9112 // alpha (uppercase)
9113 // alpha (lowercase)
9114 if (c === 0x21 || c === 0x2D || c === 0x2E || c === 0x5F || c === 0x7E ||
9115 (c >= 0x27 && c <= 0x2A) ||
9116 (c >= 0x30 && c <= 0x39) ||
9117 (c >= 0x41 && c <= 0x5A) ||
9118 (c >= 0x61 && c <= 0x7A)) {
9119 continue;
9120 }
9121
9122 if (i - lastPos > 0)
9123 out += str.slice(lastPos, i);
9124
9125 // Other ASCII characters
9126 if (c < 0x80) {
9127 lastPos = i + 1;
9128 out += hexTable[c];
9129 continue;
9130 }
9131
9132 // Multi-byte characters ...
9133 if (c < 0x800) {
9134 lastPos = i + 1;
9135 out += hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)];
9136 continue;
9137 }
9138 if (c < 0xD800 || c >= 0xE000) {
9139 lastPos = i + 1;
9140 out += hexTable[0xE0 | (c >> 12)] +
9141 hexTable[0x80 | ((c >> 6) & 0x3F)] +
9142 hexTable[0x80 | (c & 0x3F)];
9143 continue;
9144 }
9145 // Surrogate pair
9146 ++i;
9147 var c2;
9148 if (i < str.length)
9149 c2 = str.charCodeAt(i) & 0x3FF;
9150 else
9151 throw new URIError('URI malformed');
9152 lastPos = i + 1;
9153 c = 0x10000 + (((c & 0x3FF) << 10) | c2);
9154 out += hexTable[0xF0 | (c >> 18)] +
9155 hexTable[0x80 | ((c >> 12) & 0x3F)] +
9156 hexTable[0x80 | ((c >> 6) & 0x3F)] +
9157 hexTable[0x80 | (c & 0x3F)];
9158 }
9159 if (lastPos === 0)
9160 return str;
9161 if (lastPos < str.length)
9162 return out + str.slice(lastPos);
9163 return out;
9164};
9165
9166var stringifyPrimitive = function(v) {
9167 if (typeof v === 'string')
9168 return v;
9169 if (typeof v === 'number' && isFinite(v))
9170 return '' + v;
9171 if (typeof v === 'boolean')
9172 return v ? 'true' : 'false';
9173 return '';
9174};
9175
9176
9177QueryString.stringify = QueryString.encode = function(obj, sep, eq, options) {
9178 sep = sep || '&';
9179 eq = eq || '=';
9180
9181 var encode = QueryString.escape;
9182 if (options && typeof options.encodeURIComponent === 'function') {
9183 encode = options.encodeURIComponent;
9184 }
9185
9186 if (obj !== null && typeof obj === 'object') {
9187 var keys = Object.keys(obj);
9188 var len = keys.length;
9189 var flast = len - 1;
9190 var fields = '';
9191 for (var i = 0; i < len; ++i) {
9192 var k = keys[i];
9193 var v = obj[k];
9194 var ks = encode(stringifyPrimitive(k)) + eq;
9195
9196 if (Array.isArray(v)) {
9197 var vlen = v.length;
9198 var vlast = vlen - 1;
9199 for (var j = 0; j < vlen; ++j) {
9200 fields += ks + encode(stringifyPrimitive(v[j]));
9201 if (j < vlast)
9202 fields += sep;
9203 }
9204 if (vlen && i < flast)
9205 fields += sep;
9206 } else {
9207 fields += ks + encode(stringifyPrimitive(v));
9208 if (i < flast)
9209 fields += sep;
9210 }
9211 }
9212 return fields;
9213 }
9214 return '';
9215};
9216
9217// Parse a key/val string.
9218QueryString.parse = QueryString.decode = function(qs, sep, eq, options) {
9219 sep = sep || '&';
9220 eq = eq || '=';
9221
9222 var obj = {};
9223
9224 if (typeof qs !== 'string' || qs.length === 0) {
9225 return obj;
9226 }
9227
9228 if (typeof sep !== 'string')
9229 sep += '';
9230
9231 var eqLen = eq.length;
9232 var sepLen = sep.length;
9233
9234 var maxKeys = 1000;
9235 if (options && typeof options.maxKeys === 'number') {
9236 maxKeys = options.maxKeys;
9237 }
9238
9239 var pairs = Infinity;
9240 if (maxKeys > 0)
9241 pairs = maxKeys;
9242
9243 var decode = QueryString.unescape;
9244 if (options && typeof options.decodeURIComponent === 'function') {
9245 decode = options.decodeURIComponent;
9246 }
9247 var customDecode = (decode !== qsUnescape);
9248
9249 var keys = [];
9250 var lastPos = 0;
9251 var sepIdx = 0;
9252 var eqIdx = 0;
9253 var key = '';
9254 var value = '';
9255 var keyEncoded = customDecode;
9256 var valEncoded = customDecode;
9257 var encodeCheck = 0;
9258 for (var i = 0; i < qs.length; ++i) {
9259 var code = qs.charCodeAt(i);
9260
9261 // Try matching key/value pair separator (e.g. '&')
9262 if (code === sep.charCodeAt(sepIdx)) {
9263 if (++sepIdx === sepLen) {
9264 // Key/value pair separator match!
9265 var end = i - sepIdx + 1;
9266 if (eqIdx < eqLen) {
9267 // If we didn't find the key/value separator, treat the substring as
9268 // part of the key instead of the value
9269 if (lastPos < end)
9270 key += qs.slice(lastPos, end);
9271 } else if (lastPos < end)
9272 value += qs.slice(lastPos, end);
9273 if (keyEncoded)
9274 key = decodeStr(key, decode);
9275 if (valEncoded)
9276 value = decodeStr(value, decode);
9277 // Use a key array lookup instead of using hasOwnProperty(), which is
9278 // slower
9279 if (keys.indexOf(key) === -1) {
9280 obj[key] = value;
9281 keys[keys.length] = key;
9282 } else {
9283 var curValue = obj[key];
9284 // `instanceof Array` is used instead of Array.isArray() because it
9285 // is ~15-20% faster with v8 4.7 and is safe to use because we are
9286 // using it with values being created within this function
9287 if (curValue instanceof Array)
9288 curValue[curValue.length] = value;
9289 else
9290 obj[key] = [curValue, value];
9291 }
9292 if (--pairs === 0)
9293 break;
9294 keyEncoded = valEncoded = customDecode;
9295 encodeCheck = 0;
9296 key = value = '';
9297 lastPos = i + 1;
9298 sepIdx = eqIdx = 0;
9299 }
9300 continue;
9301 } else {
9302 sepIdx = 0;
9303 if (!valEncoded) {
9304 // Try to match an (valid) encoded byte (once) to minimize unnecessary
9305 // calls to string decoding functions
9306 if (code === 37/*%*/) {
9307 encodeCheck = 1;
9308 } else if (encodeCheck > 0 &&
9309 ((code >= 48/*0*/ && code <= 57/*9*/) ||
9310 (code >= 65/*A*/ && code <= 70/*Z*/) ||
9311 (code >= 97/*a*/ && code <= 102/*z*/))) {
9312 if (++encodeCheck === 3)
9313 valEncoded = true;
9314 } else {
9315 encodeCheck = 0;
9316 }
9317 }
9318 }
9319
9320 // Try matching key/value separator (e.g. '=') if we haven't already
9321 if (eqIdx < eqLen) {
9322 if (code === eq.charCodeAt(eqIdx)) {
9323 if (++eqIdx === eqLen) {
9324 // Key/value separator match!
9325 var end = i - eqIdx + 1;
9326 if (lastPos < end)
9327 key += qs.slice(lastPos, end);
9328 encodeCheck = 0;
9329 lastPos = i + 1;
9330 }
9331 continue;
9332 } else {
9333 eqIdx = 0;
9334 if (!keyEncoded) {
9335 // Try to match an (valid) encoded byte once to minimize unnecessary
9336 // calls to string decoding functions
9337 if (code === 37/*%*/) {
9338 encodeCheck = 1;
9339 } else if (encodeCheck > 0 &&
9340 ((code >= 48/*0*/ && code <= 57/*9*/) ||
9341 (code >= 65/*A*/ && code <= 70/*Z*/) ||
9342 (code >= 97/*a*/ && code <= 102/*z*/))) {
9343 if (++encodeCheck === 3)
9344 keyEncoded = true;
9345 } else {
9346 encodeCheck = 0;
9347 }
9348 }
9349 }
9350 }
9351
9352 if (code === 43/*+*/) {
9353 if (eqIdx < eqLen) {
9354 if (i - lastPos > 0)
9355 key += qs.slice(lastPos, i);
9356 key += '%20';
9357 keyEncoded = true;
9358 } else {
9359 if (i - lastPos > 0)
9360 value += qs.slice(lastPos, i);
9361 value += '%20';
9362 valEncoded = true;
9363 }
9364 lastPos = i + 1;
9365 }
9366 }
9367
9368 // Check if we have leftover key or value data
9369 if (pairs > 0 && (lastPos < qs.length || eqIdx > 0)) {
9370 if (lastPos < qs.length) {
9371 if (eqIdx < eqLen)
9372 key += qs.slice(lastPos);
9373 else if (sepIdx < sepLen)
9374 value += qs.slice(lastPos);
9375 }
9376 if (keyEncoded)
9377 key = decodeStr(key, decode);
9378 if (valEncoded)
9379 value = decodeStr(value, decode);
9380 // Use a key array lookup instead of using hasOwnProperty(), which is
9381 // slower
9382 if (keys.indexOf(key) === -1) {
9383 obj[key] = value;
9384 keys[keys.length] = key;
9385 } else {
9386 var curValue = obj[key];
9387 // `instanceof Array` is used instead of Array.isArray() because it
9388 // is ~15-20% faster with v8 4.7 and is safe to use because we are
9389 // using it with values being created within this function
9390 if (curValue instanceof Array)
9391 curValue[curValue.length] = value;
9392 else
9393 obj[key] = [curValue, value];
9394 }
9395 }
9396
9397 return obj;
9398};
9399
9400
9401// v8 does not optimize functions with try-catch blocks, so we isolate them here
9402// to minimize the damage
9403function decodeStr(s, decoder) {
9404 try {
9405 return decoder(s);
9406 } catch (e) {
9407 return QueryString.unescape(s, true);
9408 }
9409}
9410
9411/***/ }),
9412/* 119 */
9413/***/ (function(module, exports, __webpack_require__) {
9414
9415module.exports = !__webpack_require__(16) && !__webpack_require__(28)(function () {
9416 return Object.defineProperty(__webpack_require__(86)('div'), 'a', { get: function () { return 7; } }).a != 7;
9417});
9418
9419
9420/***/ }),
9421/* 120 */
9422/***/ (function(module, exports, __webpack_require__) {
9423
9424var dP = __webpack_require__(19);
9425var anObject = __webpack_require__(12);
9426var getKeys = __webpack_require__(40);
9427
9428module.exports = __webpack_require__(16) ? Object.defineProperties : function defineProperties(O, Properties) {
9429 anObject(O);
9430 var keys = getKeys(Properties);
9431 var length = keys.length;
9432 var i = 0;
9433 var P;
9434 while (length > i) dP.f(O, P = keys[i++], Properties[P]);
9435 return O;
9436};
9437
9438
9439/***/ }),
9440/* 121 */
9441/***/ (function(module, exports, __webpack_require__) {
9442
9443var has = __webpack_require__(23);
9444var toIObject = __webpack_require__(24);
9445var arrayIndexOf = __webpack_require__(192)(false);
9446var IE_PROTO = __webpack_require__(91)('IE_PROTO');
9447
9448module.exports = function (object, names) {
9449 var O = toIObject(object);
9450 var i = 0;
9451 var result = [];
9452 var key;
9453 for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
9454 // Don't enum bug & hidden keys
9455 while (names.length > i) if (has(O, key = names[i++])) {
9456 ~arrayIndexOf(result, key) || result.push(key);
9457 }
9458 return result;
9459};
9460
9461
9462/***/ }),
9463/* 122 */
9464/***/ (function(module, exports, __webpack_require__) {
9465
9466"use strict";
9467
9468var $defineProperty = __webpack_require__(19);
9469var createDesc = __webpack_require__(49);
9470
9471module.exports = function (object, index, value) {
9472 if (index in object) $defineProperty.f(object, index, createDesc(0, value));
9473 else object[index] = value;
9474};
9475
9476
9477/***/ }),
9478/* 123 */
9479/***/ (function(module, exports, __webpack_require__) {
9480
9481module.exports = __webpack_require__(198);
9482
9483/***/ }),
9484/* 124 */
9485/***/ (function(module, exports, __webpack_require__) {
9486
9487module.exports = __webpack_require__(200);
9488
9489/***/ }),
9490/* 125 */
9491/***/ (function(module, exports, __webpack_require__) {
9492
9493"use strict";
9494
9495// ECMAScript 6 symbols shim
9496var global = __webpack_require__(7);
9497var has = __webpack_require__(23);
9498var DESCRIPTORS = __webpack_require__(16);
9499var $export = __webpack_require__(6);
9500var redefine = __webpack_require__(96);
9501var META = __webpack_require__(66).KEY;
9502var $fails = __webpack_require__(28);
9503var shared = __webpack_require__(92);
9504var setToStringTag = __webpack_require__(54);
9505var uid = __webpack_require__(64);
9506var wks = __webpack_require__(11);
9507var wksExt = __webpack_require__(97);
9508var wksDefine = __webpack_require__(98);
9509var enumKeys = __webpack_require__(201);
9510var isArray = __webpack_require__(99);
9511var anObject = __webpack_require__(12);
9512var isObject = __webpack_require__(9);
9513var toObject = __webpack_require__(34);
9514var toIObject = __webpack_require__(24);
9515var toPrimitive = __webpack_require__(87);
9516var createDesc = __webpack_require__(49);
9517var _create = __webpack_require__(67);
9518var gOPNExt = __webpack_require__(202);
9519var $GOPD = __webpack_require__(52);
9520var $GOPS = __webpack_require__(65);
9521var $DP = __webpack_require__(19);
9522var $keys = __webpack_require__(40);
9523var gOPD = $GOPD.f;
9524var dP = $DP.f;
9525var gOPN = gOPNExt.f;
9526var $Symbol = global.Symbol;
9527var $JSON = global.JSON;
9528var _stringify = $JSON && $JSON.stringify;
9529var PROTOTYPE = 'prototype';
9530var HIDDEN = wks('_hidden');
9531var TO_PRIMITIVE = wks('toPrimitive');
9532var isEnum = {}.propertyIsEnumerable;
9533var SymbolRegistry = shared('symbol-registry');
9534var AllSymbols = shared('symbols');
9535var OPSymbols = shared('op-symbols');
9536var ObjectProto = Object[PROTOTYPE];
9537var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
9538var QObject = global.QObject;
9539// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
9540var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
9541
9542// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
9543var setSymbolDesc = DESCRIPTORS && $fails(function () {
9544 return _create(dP({}, 'a', {
9545 get: function () { return dP(this, 'a', { value: 7 }).a; }
9546 })).a != 7;
9547}) ? function (it, key, D) {
9548 var protoDesc = gOPD(ObjectProto, key);
9549 if (protoDesc) delete ObjectProto[key];
9550 dP(it, key, D);
9551 if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
9552} : dP;
9553
9554var wrap = function (tag) {
9555 var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
9556 sym._k = tag;
9557 return sym;
9558};
9559
9560var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
9561 return typeof it == 'symbol';
9562} : function (it) {
9563 return it instanceof $Symbol;
9564};
9565
9566var $defineProperty = function defineProperty(it, key, D) {
9567 if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
9568 anObject(it);
9569 key = toPrimitive(key, true);
9570 anObject(D);
9571 if (has(AllSymbols, key)) {
9572 if (!D.enumerable) {
9573 if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
9574 it[HIDDEN][key] = true;
9575 } else {
9576 if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
9577 D = _create(D, { enumerable: createDesc(0, false) });
9578 } return setSymbolDesc(it, key, D);
9579 } return dP(it, key, D);
9580};
9581var $defineProperties = function defineProperties(it, P) {
9582 anObject(it);
9583 var keys = enumKeys(P = toIObject(P));
9584 var i = 0;
9585 var l = keys.length;
9586 var key;
9587 while (l > i) $defineProperty(it, key = keys[i++], P[key]);
9588 return it;
9589};
9590var $create = function create(it, P) {
9591 return P === undefined ? _create(it) : $defineProperties(_create(it), P);
9592};
9593var $propertyIsEnumerable = function propertyIsEnumerable(key) {
9594 var E = isEnum.call(this, key = toPrimitive(key, true));
9595 if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
9596 return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
9597};
9598var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
9599 it = toIObject(it);
9600 key = toPrimitive(key, true);
9601 if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
9602 var D = gOPD(it, key);
9603 if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
9604 return D;
9605};
9606var $getOwnPropertyNames = function getOwnPropertyNames(it) {
9607 var names = gOPN(toIObject(it));
9608 var result = [];
9609 var i = 0;
9610 var key;
9611 while (names.length > i) {
9612 if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
9613 } return result;
9614};
9615var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
9616 var IS_OP = it === ObjectProto;
9617 var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
9618 var result = [];
9619 var i = 0;
9620 var key;
9621 while (names.length > i) {
9622 if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
9623 } return result;
9624};
9625
9626// 19.4.1.1 Symbol([description])
9627if (!USE_NATIVE) {
9628 $Symbol = function Symbol() {
9629 if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
9630 var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
9631 var $set = function (value) {
9632 if (this === ObjectProto) $set.call(OPSymbols, value);
9633 if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
9634 setSymbolDesc(this, tag, createDesc(1, value));
9635 };
9636 if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
9637 return wrap(tag);
9638 };
9639 redefine($Symbol[PROTOTYPE], 'toString', function toString() {
9640 return this._k;
9641 });
9642
9643 $GOPD.f = $getOwnPropertyDescriptor;
9644 $DP.f = $defineProperty;
9645 __webpack_require__(94).f = gOPNExt.f = $getOwnPropertyNames;
9646 __webpack_require__(53).f = $propertyIsEnumerable;
9647 $GOPS.f = $getOwnPropertySymbols;
9648
9649 if (DESCRIPTORS && !__webpack_require__(51)) {
9650 redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
9651 }
9652
9653 wksExt.f = function (name) {
9654 return wrap(wks(name));
9655 };
9656}
9657
9658$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
9659
9660for (var es6Symbols = (
9661 // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
9662 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
9663).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
9664
9665for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
9666
9667$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
9668 // 19.4.2.1 Symbol.for(key)
9669 'for': function (key) {
9670 return has(SymbolRegistry, key += '')
9671 ? SymbolRegistry[key]
9672 : SymbolRegistry[key] = $Symbol(key);
9673 },
9674 // 19.4.2.5 Symbol.keyFor(sym)
9675 keyFor: function keyFor(sym) {
9676 if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
9677 for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
9678 },
9679 useSetter: function () { setter = true; },
9680 useSimple: function () { setter = false; }
9681});
9682
9683$export($export.S + $export.F * !USE_NATIVE, 'Object', {
9684 // 19.1.2.2 Object.create(O [, Properties])
9685 create: $create,
9686 // 19.1.2.4 Object.defineProperty(O, P, Attributes)
9687 defineProperty: $defineProperty,
9688 // 19.1.2.3 Object.defineProperties(O, Properties)
9689 defineProperties: $defineProperties,
9690 // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
9691 getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
9692 // 19.1.2.7 Object.getOwnPropertyNames(O)
9693 getOwnPropertyNames: $getOwnPropertyNames,
9694 // 19.1.2.8 Object.getOwnPropertySymbols(O)
9695 getOwnPropertySymbols: $getOwnPropertySymbols
9696});
9697
9698// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
9699// https://bugs.chromium.org/p/v8/issues/detail?id=3443
9700var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
9701
9702$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
9703 getOwnPropertySymbols: function getOwnPropertySymbols(it) {
9704 return $GOPS.f(toObject(it));
9705 }
9706});
9707
9708// 24.3.2 JSON.stringify(value [, replacer [, space]])
9709$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
9710 var S = $Symbol();
9711 // MS Edge converts symbol values to JSON as {}
9712 // WebKit converts symbol values to JSON as null
9713 // V8 throws on boxed symbols
9714 return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
9715})), 'JSON', {
9716 stringify: function stringify(it) {
9717 var args = [it];
9718 var i = 1;
9719 var replacer, $replacer;
9720 while (arguments.length > i) args.push(arguments[i++]);
9721 $replacer = replacer = args[1];
9722 if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
9723 if (!isArray(replacer)) replacer = function (key, value) {
9724 if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
9725 if (!isSymbol(value)) return value;
9726 };
9727 args[1] = replacer;
9728 return _stringify.apply($JSON, args);
9729 }
9730});
9731
9732// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
9733$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(27)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
9734// 19.4.3.5 Symbol.prototype[@@toStringTag]
9735setToStringTag($Symbol, 'Symbol');
9736// 20.2.1.9 Math[@@toStringTag]
9737setToStringTag(Math, 'Math', true);
9738// 24.3.3 JSON[@@toStringTag]
9739setToStringTag(global.JSON, 'JSON', true);
9740
9741
9742/***/ }),
9743/* 126 */
9744/***/ (function(module, exports, __webpack_require__) {
9745
9746var document = __webpack_require__(7).document;
9747module.exports = document && document.documentElement;
9748
9749
9750/***/ }),
9751/* 127 */
9752/***/ (function(module, exports, __webpack_require__) {
9753
9754var defineProperty = __webpack_require__(205);
9755
9756/**
9757 * The base implementation of `assignValue` and `assignMergeValue` without
9758 * value checks.
9759 *
9760 * @private
9761 * @param {Object} object The object to modify.
9762 * @param {string} key The key of the property to assign.
9763 * @param {*} value The value to assign.
9764 */
9765function baseAssignValue(object, key, value) {
9766 if (key == '__proto__' && defineProperty) {
9767 defineProperty(object, key, {
9768 'configurable': true,
9769 'enumerable': true,
9770 'value': value,
9771 'writable': true
9772 });
9773 } else {
9774 object[key] = value;
9775 }
9776}
9777
9778module.exports = baseAssignValue;
9779
9780
9781/***/ }),
9782/* 128 */
9783/***/ (function(module, exports) {
9784
9785/**
9786 * Performs a
9787 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9788 * comparison between two values to determine if they are equivalent.
9789 *
9790 * @static
9791 * @memberOf _
9792 * @since 4.0.0
9793 * @category Lang
9794 * @param {*} value The value to compare.
9795 * @param {*} other The other value to compare.
9796 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
9797 * @example
9798 *
9799 * var object = { 'a': 1 };
9800 * var other = { 'a': 1 };
9801 *
9802 * _.eq(object, object);
9803 * // => true
9804 *
9805 * _.eq(object, other);
9806 * // => false
9807 *
9808 * _.eq('a', 'a');
9809 * // => true
9810 *
9811 * _.eq('a', Object('a'));
9812 * // => false
9813 *
9814 * _.eq(NaN, NaN);
9815 * // => true
9816 */
9817function eq(value, other) {
9818 return value === other || (value !== value && other !== other);
9819}
9820
9821module.exports = eq;
9822
9823
9824/***/ }),
9825/* 129 */
9826/***/ (function(module, exports, __webpack_require__) {
9827
9828var isFunction = __webpack_require__(30),
9829 isLength = __webpack_require__(131);
9830
9831/**
9832 * Checks if `value` is array-like. A value is considered array-like if it's
9833 * not a function and has a `value.length` that's an integer greater than or
9834 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
9835 *
9836 * @static
9837 * @memberOf _
9838 * @since 4.0.0
9839 * @category Lang
9840 * @param {*} value The value to check.
9841 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
9842 * @example
9843 *
9844 * _.isArrayLike([1, 2, 3]);
9845 * // => true
9846 *
9847 * _.isArrayLike(document.body.children);
9848 * // => true
9849 *
9850 * _.isArrayLike('abc');
9851 * // => true
9852 *
9853 * _.isArrayLike(_.noop);
9854 * // => false
9855 */
9856function isArrayLike(value) {
9857 return value != null && isLength(value.length) && !isFunction(value);
9858}
9859
9860module.exports = isArrayLike;
9861
9862
9863/***/ }),
9864/* 130 */
9865/***/ (function(module, exports) {
9866
9867/** Used for built-in method references. */
9868var objectProto = Object.prototype;
9869
9870/**
9871 * Used to resolve the
9872 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
9873 * of values.
9874 */
9875var nativeObjectToString = objectProto.toString;
9876
9877/**
9878 * Converts `value` to a string using `Object.prototype.toString`.
9879 *
9880 * @private
9881 * @param {*} value The value to convert.
9882 * @returns {string} Returns the converted string.
9883 */
9884function objectToString(value) {
9885 return nativeObjectToString.call(value);
9886}
9887
9888module.exports = objectToString;
9889
9890
9891/***/ }),
9892/* 131 */
9893/***/ (function(module, exports) {
9894
9895/** Used as references for various `Number` constants. */
9896var MAX_SAFE_INTEGER = 9007199254740991;
9897
9898/**
9899 * Checks if `value` is a valid array-like length.
9900 *
9901 * **Note:** This method is loosely based on
9902 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
9903 *
9904 * @static
9905 * @memberOf _
9906 * @since 4.0.0
9907 * @category Lang
9908 * @param {*} value The value to check.
9909 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
9910 * @example
9911 *
9912 * _.isLength(3);
9913 * // => true
9914 *
9915 * _.isLength(Number.MIN_VALUE);
9916 * // => false
9917 *
9918 * _.isLength(Infinity);
9919 * // => false
9920 *
9921 * _.isLength('3');
9922 * // => false
9923 */
9924function isLength(value) {
9925 return typeof value == 'number' &&
9926 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
9927}
9928
9929module.exports = isLength;
9930
9931
9932/***/ }),
9933/* 132 */
9934/***/ (function(module, exports) {
9935
9936/**
9937 * This method returns `false`.
9938 *
9939 * @static
9940 * @memberOf _
9941 * @since 4.13.0
9942 * @category Util
9943 * @returns {boolean} Returns `false`.
9944 * @example
9945 *
9946 * _.times(2, _.stubFalse);
9947 * // => [false, false]
9948 */
9949function stubFalse() {
9950 return false;
9951}
9952
9953module.exports = stubFalse;
9954
9955
9956/***/ }),
9957/* 133 */
9958/***/ (function(module, exports) {
9959
9960/**
9961 * This method returns the first argument it receives.
9962 *
9963 * @static
9964 * @since 0.1.0
9965 * @memberOf _
9966 * @category Util
9967 * @param {*} value Any value.
9968 * @returns {*} Returns `value`.
9969 * @example
9970 *
9971 * var object = { 'a': 1 };
9972 *
9973 * console.log(_.identity(object) === object);
9974 * // => true
9975 */
9976function identity(value) {
9977 return value;
9978}
9979
9980module.exports = identity;
9981
9982
9983/***/ }),
9984/* 134 */
9985/***/ (function(module, exports) {
9986
9987/**
9988 * This method returns the first argument it receives.
9989 *
9990 * @static
9991 * @since 0.1.0
9992 * @memberOf _
9993 * @category Util
9994 * @param {*} value Any value.
9995 * @returns {*} Returns `value`.
9996 * @example
9997 *
9998 * var object = { 'a': 1 };
9999 *
10000 * console.log(_.identity(object) === object);
10001 * // => true
10002 */
10003function identity(value) {
10004 return value;
10005}
10006
10007module.exports = identity;
10008
10009
10010/***/ }),
10011/* 135 */
10012/***/ (function(module, exports) {
10013
10014module.exports = function(module) {
10015 if (!module.webpackPolyfill) {
10016 module.deprecate = function() {};
10017 module.paths = [];
10018 // module.parent = undefined by default
10019 if (!module.children) module.children = [];
10020 Object.defineProperty(module, "loaded", {
10021 enumerable: true,
10022 get: function() {
10023 return module.l;
10024 }
10025 });
10026 Object.defineProperty(module, "id", {
10027 enumerable: true,
10028 get: function() {
10029 return module.i;
10030 }
10031 });
10032 module.webpackPolyfill = 1;
10033 }
10034 return module;
10035};
10036
10037
10038/***/ }),
10039/* 136 */
10040/***/ (function(module, exports, __webpack_require__) {
10041
10042module.exports = __webpack_require__(222);
10043
10044/***/ }),
10045/* 137 */
10046/***/ (function(module, exports, __webpack_require__) {
10047
10048"use strict";
10049
10050var LIBRARY = __webpack_require__(51);
10051var $export = __webpack_require__(6);
10052var redefine = __webpack_require__(96);
10053var hide = __webpack_require__(27);
10054var Iterators = __webpack_require__(41);
10055var $iterCreate = __webpack_require__(226);
10056var setToStringTag = __webpack_require__(54);
10057var getPrototypeOf = __webpack_require__(102);
10058var ITERATOR = __webpack_require__(11)('iterator');
10059var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
10060var FF_ITERATOR = '@@iterator';
10061var KEYS = 'keys';
10062var VALUES = 'values';
10063
10064var returnThis = function () { return this; };
10065
10066module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
10067 $iterCreate(Constructor, NAME, next);
10068 var getMethod = function (kind) {
10069 if (!BUGGY && kind in proto) return proto[kind];
10070 switch (kind) {
10071 case KEYS: return function keys() { return new Constructor(this, kind); };
10072 case VALUES: return function values() { return new Constructor(this, kind); };
10073 } return function entries() { return new Constructor(this, kind); };
10074 };
10075 var TAG = NAME + ' Iterator';
10076 var DEF_VALUES = DEFAULT == VALUES;
10077 var VALUES_BUG = false;
10078 var proto = Base.prototype;
10079 var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
10080 var $default = $native || getMethod(DEFAULT);
10081 var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
10082 var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
10083 var methods, key, IteratorPrototype;
10084 // Fix native
10085 if ($anyNative) {
10086 IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
10087 if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
10088 // Set @@toStringTag to native iterators
10089 setToStringTag(IteratorPrototype, TAG, true);
10090 // fix for some old engines
10091 if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
10092 }
10093 }
10094 // fix Array#{values, @@iterator}.name in V8 / FF
10095 if (DEF_VALUES && $native && $native.name !== VALUES) {
10096 VALUES_BUG = true;
10097 $default = function values() { return $native.call(this); };
10098 }
10099 // Define iterator
10100 if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
10101 hide(proto, ITERATOR, $default);
10102 }
10103 // Plug for library
10104 Iterators[NAME] = $default;
10105 Iterators[TAG] = returnThis;
10106 if (DEFAULT) {
10107 methods = {
10108 values: DEF_VALUES ? $default : getMethod(VALUES),
10109 keys: IS_SET ? $default : getMethod(KEYS),
10110 entries: $entries
10111 };
10112 if (FORCED) for (key in methods) {
10113 if (!(key in proto)) redefine(proto, key, methods[key]);
10114 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
10115 }
10116 return methods;
10117};
10118
10119
10120/***/ }),
10121/* 138 */
10122/***/ (function(module, exports, __webpack_require__) {
10123
10124module.exports = __webpack_require__(231);
10125
10126/***/ }),
10127/* 139 */
10128/***/ (function(module, exports, __webpack_require__) {
10129
10130// call something on iterator step with safe closing on error
10131var anObject = __webpack_require__(12);
10132module.exports = function (iterator, fn, value, entries) {
10133 try {
10134 return entries ? fn(anObject(value)[0], value[1]) : fn(value);
10135 // 7.4.6 IteratorClose(iterator, completion)
10136 } catch (e) {
10137 var ret = iterator['return'];
10138 if (ret !== undefined) anObject(ret.call(iterator));
10139 throw e;
10140 }
10141};
10142
10143
10144/***/ }),
10145/* 140 */
10146/***/ (function(module, exports, __webpack_require__) {
10147
10148// check on default Array iterator
10149var Iterators = __webpack_require__(41);
10150var ITERATOR = __webpack_require__(11)('iterator');
10151var ArrayProto = Array.prototype;
10152
10153module.exports = function (it) {
10154 return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
10155};
10156
10157
10158/***/ }),
10159/* 141 */
10160/***/ (function(module, exports, __webpack_require__) {
10161
10162var ITERATOR = __webpack_require__(11)('iterator');
10163var SAFE_CLOSING = false;
10164
10165try {
10166 var riter = [7][ITERATOR]();
10167 riter['return'] = function () { SAFE_CLOSING = true; };
10168 // eslint-disable-next-line no-throw-literal
10169 Array.from(riter, function () { throw 2; });
10170} catch (e) { /* empty */ }
10171
10172module.exports = function (exec, skipClosing) {
10173 if (!skipClosing && !SAFE_CLOSING) return false;
10174 var safe = false;
10175 try {
10176 var arr = [7];
10177 var iter = arr[ITERATOR]();
10178 iter.next = function () { return { done: safe = true }; };
10179 arr[ITERATOR] = function () { return iter; };
10180 exec(arr);
10181 } catch (e) { /* empty */ }
10182 return safe;
10183};
10184
10185
10186/***/ }),
10187/* 142 */
10188/***/ (function(module, exports) {
10189
10190function _arrayLikeToArray(arr, len) {
10191 if (len == null || len > arr.length) len = arr.length;
10192
10193 for (var i = 0, arr2 = new Array(len); i < len; i++) {
10194 arr2[i] = arr[i];
10195 }
10196
10197 return arr2;
10198}
10199
10200module.exports = _arrayLikeToArray;
10201
10202/***/ }),
10203/* 143 */
10204/***/ (function(module, exports, __webpack_require__) {
10205
10206module.exports = __webpack_require__(243);
10207
10208/***/ }),
10209/* 144 */
10210/***/ (function(module, exports, __webpack_require__) {
10211
10212// 7.3.20 SpeciesConstructor(O, defaultConstructor)
10213var anObject = __webpack_require__(12);
10214var aFunction = __webpack_require__(33);
10215var SPECIES = __webpack_require__(11)('species');
10216module.exports = function (O, D) {
10217 var C = anObject(O).constructor;
10218 var S;
10219 return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
10220};
10221
10222
10223/***/ }),
10224/* 145 */
10225/***/ (function(module, exports, __webpack_require__) {
10226
10227var ctx = __webpack_require__(26);
10228var invoke = __webpack_require__(146);
10229var html = __webpack_require__(126);
10230var cel = __webpack_require__(86);
10231var global = __webpack_require__(7);
10232var process = global.process;
10233var setTask = global.setImmediate;
10234var clearTask = global.clearImmediate;
10235var MessageChannel = global.MessageChannel;
10236var Dispatch = global.Dispatch;
10237var counter = 0;
10238var queue = {};
10239var ONREADYSTATECHANGE = 'onreadystatechange';
10240var defer, channel, port;
10241var run = function () {
10242 var id = +this;
10243 // eslint-disable-next-line no-prototype-builtins
10244 if (queue.hasOwnProperty(id)) {
10245 var fn = queue[id];
10246 delete queue[id];
10247 fn();
10248 }
10249};
10250var listener = function (event) {
10251 run.call(event.data);
10252};
10253// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
10254if (!setTask || !clearTask) {
10255 setTask = function setImmediate(fn) {
10256 var args = [];
10257 var i = 1;
10258 while (arguments.length > i) args.push(arguments[i++]);
10259 queue[++counter] = function () {
10260 // eslint-disable-next-line no-new-func
10261 invoke(typeof fn == 'function' ? fn : Function(fn), args);
10262 };
10263 defer(counter);
10264 return counter;
10265 };
10266 clearTask = function clearImmediate(id) {
10267 delete queue[id];
10268 };
10269 // Node.js 0.8-
10270 if (__webpack_require__(50)(process) == 'process') {
10271 defer = function (id) {
10272 process.nextTick(ctx(run, id, 1));
10273 };
10274 // Sphere (JS game engine) Dispatch API
10275 } else if (Dispatch && Dispatch.now) {
10276 defer = function (id) {
10277 Dispatch.now(ctx(run, id, 1));
10278 };
10279 // Browsers with MessageChannel, includes WebWorkers
10280 } else if (MessageChannel) {
10281 channel = new MessageChannel();
10282 port = channel.port2;
10283 channel.port1.onmessage = listener;
10284 defer = ctx(port.postMessage, port, 1);
10285 // Browsers with postMessage, skip WebWorkers
10286 // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
10287 } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
10288 defer = function (id) {
10289 global.postMessage(id + '', '*');
10290 };
10291 global.addEventListener('message', listener, false);
10292 // IE8-
10293 } else if (ONREADYSTATECHANGE in cel('script')) {
10294 defer = function (id) {
10295 html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
10296 html.removeChild(this);
10297 run.call(id);
10298 };
10299 };
10300 // Rest old browsers
10301 } else {
10302 defer = function (id) {
10303 setTimeout(ctx(run, id, 1), 0);
10304 };
10305 }
10306}
10307module.exports = {
10308 set: setTask,
10309 clear: clearTask
10310};
10311
10312
10313/***/ }),
10314/* 146 */
10315/***/ (function(module, exports) {
10316
10317// fast apply, http://jsperf.lnkit.com/fast-apply/5
10318module.exports = function (fn, args, that) {
10319 var un = that === undefined;
10320 switch (args.length) {
10321 case 0: return un ? fn()
10322 : fn.call(that);
10323 case 1: return un ? fn(args[0])
10324 : fn.call(that, args[0]);
10325 case 2: return un ? fn(args[0], args[1])
10326 : fn.call(that, args[0], args[1]);
10327 case 3: return un ? fn(args[0], args[1], args[2])
10328 : fn.call(that, args[0], args[1], args[2]);
10329 case 4: return un ? fn(args[0], args[1], args[2], args[3])
10330 : fn.call(that, args[0], args[1], args[2], args[3]);
10331 } return fn.apply(that, args);
10332};
10333
10334
10335/***/ }),
10336/* 147 */
10337/***/ (function(module, exports) {
10338
10339module.exports = function (exec) {
10340 try {
10341 return { e: false, v: exec() };
10342 } catch (e) {
10343 return { e: true, v: e };
10344 }
10345};
10346
10347
10348/***/ }),
10349/* 148 */
10350/***/ (function(module, exports, __webpack_require__) {
10351
10352var anObject = __webpack_require__(12);
10353var isObject = __webpack_require__(9);
10354var newPromiseCapability = __webpack_require__(108);
10355
10356module.exports = function (C, x) {
10357 anObject(C);
10358 if (isObject(x) && x.constructor === C) return x;
10359 var promiseCapability = newPromiseCapability.f(C);
10360 var resolve = promiseCapability.resolve;
10361 resolve(x);
10362 return promiseCapability.promise;
10363};
10364
10365
10366/***/ }),
10367/* 149 */
10368/***/ (function(module, exports, __webpack_require__) {
10369
10370"use strict";
10371
10372
10373var replace = String.prototype.replace;
10374var percentTwenties = /%20/g;
10375
10376var util = __webpack_require__(110);
10377
10378var Format = {
10379 RFC1738: 'RFC1738',
10380 RFC3986: 'RFC3986'
10381};
10382
10383module.exports = util.assign(
10384 {
10385 'default': Format.RFC3986,
10386 formatters: {
10387 RFC1738: function (value) {
10388 return replace.call(value, percentTwenties, '+');
10389 },
10390 RFC3986: function (value) {
10391 return String(value);
10392 }
10393 }
10394 },
10395 Format
10396);
10397
10398
10399/***/ }),
10400/* 150 */
10401/***/ (function(module, exports, __webpack_require__) {
10402
10403"use strict";
10404// Standard YAML's Core schema.
10405// http://www.yaml.org/spec/1.2/spec.html#id2804923
10406//
10407// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
10408// So, Core schema has no distinctions from JSON schema is JS-YAML.
10409
10410
10411
10412
10413
10414var Schema = __webpack_require__(43);
10415
10416
10417module.exports = new Schema({
10418 include: [
10419 __webpack_require__(151)
10420 ]
10421});
10422
10423
10424/***/ }),
10425/* 151 */
10426/***/ (function(module, exports, __webpack_require__) {
10427
10428"use strict";
10429// Standard YAML's JSON schema.
10430// http://www.yaml.org/spec/1.2/spec.html#id2803231
10431//
10432// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
10433// So, this schema is not such strict as defined in the YAML specification.
10434// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.
10435
10436
10437
10438
10439
10440var Schema = __webpack_require__(43);
10441
10442
10443module.exports = new Schema({
10444 include: [
10445 __webpack_require__(111)
10446 ],
10447 implicit: [
10448 __webpack_require__(262),
10449 __webpack_require__(263),
10450 __webpack_require__(264),
10451 __webpack_require__(265)
10452 ]
10453});
10454
10455
10456/***/ }),
10457/* 152 */
10458/***/ (function(module, exports, __webpack_require__) {
10459
10460var castPath = __webpack_require__(73),
10461 toKey = __webpack_require__(112);
10462
10463/**
10464 * The base implementation of `_.get` without support for default values.
10465 *
10466 * @private
10467 * @param {Object} object The object to query.
10468 * @param {Array|string} path The path of the property to get.
10469 * @returns {*} Returns the resolved value.
10470 */
10471function baseGet(object, path) {
10472 path = castPath(path, object);
10473
10474 var index = 0,
10475 length = path.length;
10476
10477 while (object != null && index < length) {
10478 object = object[toKey(path[index++])];
10479 }
10480 return (index && index == length) ? object : undefined;
10481}
10482
10483module.exports = baseGet;
10484
10485
10486/***/ }),
10487/* 153 */
10488/***/ (function(module, exports) {
10489
10490/** Used as references for various `Number` constants. */
10491var MAX_SAFE_INTEGER = 9007199254740991;
10492
10493/** Used to detect unsigned integer values. */
10494var reIsUint = /^(?:0|[1-9]\d*)$/;
10495
10496/**
10497 * Checks if `value` is a valid array-like index.
10498 *
10499 * @private
10500 * @param {*} value The value to check.
10501 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
10502 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
10503 */
10504function isIndex(value, length) {
10505 var type = typeof value;
10506 length = length == null ? MAX_SAFE_INTEGER : length;
10507
10508 return !!length &&
10509 (type == 'number' ||
10510 (type != 'symbol' && reIsUint.test(value))) &&
10511 (value > -1 && value % 1 == 0 && value < length);
10512}
10513
10514module.exports = isIndex;
10515
10516
10517/***/ }),
10518/* 154 */
10519/***/ (function(module, exports, __webpack_require__) {
10520
10521module.exports = __webpack_require__(299);
10522
10523/***/ }),
10524/* 155 */
10525/***/ (function(module, exports, __webpack_require__) {
10526
10527module.exports = __webpack_require__(305);
10528
10529/***/ }),
10530/* 156 */
10531/***/ (function(module, exports, __webpack_require__) {
10532
10533"use strict";
10534
10535// 19.1.2.1 Object.assign(target, source, ...)
10536var DESCRIPTORS = __webpack_require__(16);
10537var getKeys = __webpack_require__(40);
10538var gOPS = __webpack_require__(65);
10539var pIE = __webpack_require__(53);
10540var toObject = __webpack_require__(34);
10541var IObject = __webpack_require__(88);
10542var $assign = Object.assign;
10543
10544// should work with symbols and should have deterministic property order (V8 bug)
10545module.exports = !$assign || __webpack_require__(28)(function () {
10546 var A = {};
10547 var B = {};
10548 // eslint-disable-next-line no-undef
10549 var S = Symbol();
10550 var K = 'abcdefghijklmnopqrst';
10551 A[S] = 7;
10552 K.split('').forEach(function (k) { B[k] = k; });
10553 return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
10554}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
10555 var T = toObject(target);
10556 var aLen = arguments.length;
10557 var index = 1;
10558 var getSymbols = gOPS.f;
10559 var isEnum = pIE.f;
10560 while (aLen > index) {
10561 var S = IObject(arguments[index++]);
10562 var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
10563 var length = keys.length;
10564 var j = 0;
10565 var key;
10566 while (length > j) {
10567 key = keys[j++];
10568 if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
10569 }
10570 } return T;
10571} : $assign;
10572
10573
10574/***/ }),
10575/* 157 */
10576/***/ (function(module, exports) {
10577
10578/**
10579 * This method returns the first argument it receives.
10580 *
10581 * @static
10582 * @since 0.1.0
10583 * @memberOf _
10584 * @category Util
10585 * @param {*} value Any value.
10586 * @returns {*} Returns `value`.
10587 * @example
10588 *
10589 * var object = { 'a': 1 };
10590 *
10591 * console.log(_.identity(object) === object);
10592 * // => true
10593 */
10594function identity(value) {
10595 return value;
10596}
10597
10598module.exports = identity;
10599
10600
10601/***/ }),
10602/* 158 */
10603/***/ (function(module, exports, __webpack_require__) {
10604
10605var overArg = __webpack_require__(100);
10606
10607/** Built-in value references. */
10608var getPrototype = overArg(Object.getPrototypeOf, Object);
10609
10610module.exports = getPrototype;
10611
10612
10613/***/ }),
10614/* 159 */
10615/***/ (function(module, exports, __webpack_require__) {
10616
10617module.exports = __webpack_require__(237);
10618
10619/***/ }),
10620/* 160 */
10621/***/ (function(module, __webpack_exports__, __webpack_require__) {
10622
10623"use strict";
10624__webpack_require__.r(__webpack_exports__);
10625/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "patch", function() { return patch; });
10626/* harmony import */ var _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47);
10627/* harmony import */ var _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);
10628/* harmony import */ var _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(38);
10629/* harmony import */ var _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);
10630/* harmony import */ var _babel_runtime_corejs2_helpers_get__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(161);
10631/* harmony import */ var _babel_runtime_corejs2_helpers_get__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_get__WEBPACK_IMPORTED_MODULE_2__);
10632/* harmony import */ var _babel_runtime_corejs2_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77);
10633/* harmony import */ var _babel_runtime_corejs2_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);
10634/* harmony import */ var _babel_runtime_corejs2_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(162);
10635/* harmony import */ var _babel_runtime_corejs2_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
10636/* harmony import */ var _babel_runtime_corejs2_helpers_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(163);
10637/* harmony import */ var _babel_runtime_corejs2_helpers_createSuper__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_createSuper__WEBPACK_IMPORTED_MODULE_5__);
10638/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30);
10639/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_6__);
10640/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(164);
10641/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(isomorphic_form_data__WEBPACK_IMPORTED_MODULE_7__);
10642
10643
10644
10645
10646
10647
10648
10649 // patches FormData type by mutating it.
10650// patch :: FormData -> PatchedFormData
10651
10652var patch = function patch(FormData) {
10653 var createEntry = function createEntry(field, value) {
10654 return {
10655 name: field,
10656 value: value
10657 };
10658 };
10659 /** We return original type if prototype already contains one of methods we're trying to patch.
10660 * Reasoning: if one of the methods already exists, it would access data in other
10661 * property than our `_entryList`. That could potentially create nasty
10662 * hardly detectable bugs if `form-data` library implements only couple of
10663 * methods that it misses, instead of implementing all of them.
10664 * Current solution will fail the tests to let us know that form-data library
10665 * already implements some of the methods that we try to monkey-patch, and our
10666 * monkey-patch code should then compensate the library changes easily.
10667 */
10668
10669
10670 if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(FormData.prototype.set) || lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(FormData.prototype.get) || lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(FormData.prototype.getAll) || lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(FormData.prototype.has)) {
10671 return FormData;
10672 }
10673
10674 var PatchedFormData = /*#__PURE__*/function (_FormData) {
10675 _babel_runtime_corejs2_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(PatchedFormData, _FormData);
10676
10677 var _super = _babel_runtime_corejs2_helpers_createSuper__WEBPACK_IMPORTED_MODULE_5___default()(PatchedFormData);
10678
10679 function PatchedFormData(form) {
10680 var _this;
10681
10682 _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, PatchedFormData);
10683
10684 _this = _super.call(this, form);
10685 _this.entryList = [];
10686 return _this;
10687 }
10688
10689 _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(PatchedFormData, [{
10690 key: "append",
10691 value: function append(field, value, options) {
10692 this.entryList.push(createEntry(field, value));
10693 return _babel_runtime_corejs2_helpers_get__WEBPACK_IMPORTED_MODULE_2___default()(_babel_runtime_corejs2_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(PatchedFormData.prototype), "append", this).call(this, field, value, options);
10694 }
10695 }, {
10696 key: "set",
10697 value: function set(field, value) {
10698 var newEntry = createEntry(field, value);
10699 this.entryList = this.entryList.filter(function (entry) {
10700 return entry.name !== field;
10701 });
10702 this.entryList.push(newEntry);
10703 }
10704 }, {
10705 key: "get",
10706 value: function get(field) {
10707 var foundEntry = this.entryList.find(function (entry) {
10708 return entry.name === field;
10709 });
10710 return foundEntry === undefined ? null : foundEntry;
10711 }
10712 }, {
10713 key: "getAll",
10714 value: function getAll(field) {
10715 return this.entryList.filter(function (entry) {
10716 return entry.name === field;
10717 }).map(function (entry) {
10718 return entry.value;
10719 });
10720 }
10721 }, {
10722 key: "has",
10723 value: function has(field) {
10724 return this.entryList.some(function (entry) {
10725 return entry.name === field;
10726 });
10727 }
10728 }]);
10729
10730 return PatchedFormData;
10731 }(FormData);
10732
10733 return PatchedFormData;
10734};
10735/* harmony default export */ __webpack_exports__["default"] = (patch(isomorphic_form_data__WEBPACK_IMPORTED_MODULE_7___default.a));
10736
10737/***/ }),
10738/* 161 */
10739/***/ (function(module, exports, __webpack_require__) {
10740
10741var _Object$getOwnPropertyDescriptor = __webpack_require__(123);
10742
10743var _Reflect$get = __webpack_require__(292);
10744
10745var superPropBase = __webpack_require__(295);
10746
10747function _get(target, property, receiver) {
10748 if (typeof Reflect !== "undefined" && _Reflect$get) {
10749 module.exports = _get = _Reflect$get;
10750 } else {
10751 module.exports = _get = function _get(target, property, receiver) {
10752 var base = superPropBase(target, property);
10753 if (!base) return;
10754
10755 var desc = _Object$getOwnPropertyDescriptor(base, property);
10756
10757 if (desc.get) {
10758 return desc.get.call(receiver);
10759 }
10760
10761 return desc.value;
10762 };
10763 }
10764
10765 return _get(target, property, receiver || target);
10766}
10767
10768module.exports = _get;
10769
10770/***/ }),
10771/* 162 */
10772/***/ (function(module, exports, __webpack_require__) {
10773
10774var _Object$create = __webpack_require__(79);
10775
10776var setPrototypeOf = __webpack_require__(304);
10777
10778function _inherits(subClass, superClass) {
10779 if (typeof superClass !== "function" && superClass !== null) {
10780 throw new TypeError("Super expression must either be null or a function");
10781 }
10782
10783 subClass.prototype = _Object$create(superClass && superClass.prototype, {
10784 constructor: {
10785 value: subClass,
10786 writable: true,
10787 configurable: true
10788 }
10789 });
10790 if (superClass) setPrototypeOf(subClass, superClass);
10791}
10792
10793module.exports = _inherits;
10794
10795/***/ }),
10796/* 163 */
10797/***/ (function(module, exports, __webpack_require__) {
10798
10799var _Reflect$construct = __webpack_require__(155);
10800
10801var getPrototypeOf = __webpack_require__(77);
10802
10803var isNativeReflectConstruct = __webpack_require__(308);
10804
10805var possibleConstructorReturn = __webpack_require__(309);
10806
10807function _createSuper(Derived) {
10808 var hasNativeReflectConstruct = isNativeReflectConstruct();
10809 return function _createSuperInternal() {
10810 var Super = getPrototypeOf(Derived),
10811 result;
10812
10813 if (hasNativeReflectConstruct) {
10814 var NewTarget = getPrototypeOf(this).constructor;
10815 result = _Reflect$construct(Super, arguments, NewTarget);
10816 } else {
10817 result = Super.apply(this, arguments);
10818 }
10819
10820 return possibleConstructorReturn(this, result);
10821 };
10822}
10823
10824module.exports = _createSuper;
10825
10826/***/ }),
10827/* 164 */
10828/***/ (function(module, exports) {
10829
10830module.exports = window.FormData
10831
10832
10833/***/ }),
10834/* 165 */
10835/***/ (function(module, exports, __webpack_require__) {
10836
10837var createFind = __webpack_require__(316),
10838 findIndex = __webpack_require__(317);
10839
10840/**
10841 * Iterates over elements of `collection`, returning the first element
10842 * `predicate` returns truthy for. The predicate is invoked with three
10843 * arguments: (value, index|key, collection).
10844 *
10845 * @static
10846 * @memberOf _
10847 * @since 0.1.0
10848 * @category Collection
10849 * @param {Array|Object} collection The collection to inspect.
10850 * @param {Function} [predicate=_.identity] The function invoked per iteration.
10851 * @param {number} [fromIndex=0] The index to search from.
10852 * @returns {*} Returns the matched element, else `undefined`.
10853 * @example
10854 *
10855 * var users = [
10856 * { 'user': 'barney', 'age': 36, 'active': true },
10857 * { 'user': 'fred', 'age': 40, 'active': false },
10858 * { 'user': 'pebbles', 'age': 1, 'active': true }
10859 * ];
10860 *
10861 * _.find(users, function(o) { return o.age < 40; });
10862 * // => object for 'barney'
10863 *
10864 * // The `_.matches` iteratee shorthand.
10865 * _.find(users, { 'age': 1, 'active': true });
10866 * // => object for 'pebbles'
10867 *
10868 * // The `_.matchesProperty` iteratee shorthand.
10869 * _.find(users, ['active', false]);
10870 * // => object for 'fred'
10871 *
10872 * // The `_.property` iteratee shorthand.
10873 * _.find(users, 'active');
10874 * // => object for 'barney'
10875 */
10876var find = createFind(findIndex);
10877
10878module.exports = find;
10879
10880
10881/***/ }),
10882/* 166 */
10883/***/ (function(module, exports, __webpack_require__) {
10884
10885"use strict";
10886/* WEBPACK VAR INJECTION */(function(Buffer) {/*!
10887 * @description Recursive object extending
10888 * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
10889 * @license MIT
10890 *
10891 * The MIT License (MIT)
10892 *
10893 * Copyright (c) 2013-2018 Viacheslav Lotsmanov
10894 *
10895 * Permission is hereby granted, free of charge, to any person obtaining a copy of
10896 * this software and associated documentation files (the "Software"), to deal in
10897 * the Software without restriction, including without limitation the rights to
10898 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10899 * the Software, and to permit persons to whom the Software is furnished to do so,
10900 * subject to the following conditions:
10901 *
10902 * The above copyright notice and this permission notice shall be included in all
10903 * copies or substantial portions of the Software.
10904 *
10905 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10906 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
10907 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
10908 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
10909 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
10910 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10911 */
10912
10913
10914
10915function isSpecificValue(val) {
10916 return (
10917 val instanceof Buffer
10918 || val instanceof Date
10919 || val instanceof RegExp
10920 ) ? true : false;
10921}
10922
10923function cloneSpecificValue(val) {
10924 if (val instanceof Buffer) {
10925 var x = Buffer.alloc
10926 ? Buffer.alloc(val.length)
10927 : new Buffer(val.length);
10928 val.copy(x);
10929 return x;
10930 } else if (val instanceof Date) {
10931 return new Date(val.getTime());
10932 } else if (val instanceof RegExp) {
10933 return new RegExp(val);
10934 } else {
10935 throw new Error('Unexpected situation');
10936 }
10937}
10938
10939/**
10940 * Recursive cloning array.
10941 */
10942function deepCloneArray(arr) {
10943 var clone = [];
10944 arr.forEach(function (item, index) {
10945 if (typeof item === 'object' && item !== null) {
10946 if (Array.isArray(item)) {
10947 clone[index] = deepCloneArray(item);
10948 } else if (isSpecificValue(item)) {
10949 clone[index] = cloneSpecificValue(item);
10950 } else {
10951 clone[index] = deepExtend({}, item);
10952 }
10953 } else {
10954 clone[index] = item;
10955 }
10956 });
10957 return clone;
10958}
10959
10960function safeGetProperty(object, property) {
10961 return property === '__proto__' ? undefined : object[property];
10962}
10963
10964/**
10965 * Extening object that entered in first argument.
10966 *
10967 * Returns extended object or false if have no target object or incorrect type.
10968 *
10969 * If you wish to clone source object (without modify it), just use empty new
10970 * object as first argument, like this:
10971 * deepExtend({}, yourObj_1, [yourObj_N]);
10972 */
10973var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) {
10974 if (arguments.length < 1 || typeof arguments[0] !== 'object') {
10975 return false;
10976 }
10977
10978 if (arguments.length < 2) {
10979 return arguments[0];
10980 }
10981
10982 var target = arguments[0];
10983
10984 // convert arguments to array and cut off target object
10985 var args = Array.prototype.slice.call(arguments, 1);
10986
10987 var val, src, clone;
10988
10989 args.forEach(function (obj) {
10990 // skip argument if isn't an object, is null, or is an array
10991 if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) {
10992 return;
10993 }
10994
10995 Object.keys(obj).forEach(function (key) {
10996 src = safeGetProperty(target, key); // source value
10997 val = safeGetProperty(obj, key); // new value
10998
10999 // recursion prevention
11000 if (val === target) {
11001 return;
11002
11003 /**
11004 * if new value isn't object then just overwrite by new value
11005 * instead of extending.
11006 */
11007 } else if (typeof val !== 'object' || val === null) {
11008 target[key] = val;
11009 return;
11010
11011 // just clone arrays (and recursive clone objects inside)
11012 } else if (Array.isArray(val)) {
11013 target[key] = deepCloneArray(val);
11014 return;
11015
11016 // custom cloning and overwrite for specific objects
11017 } else if (isSpecificValue(val)) {
11018 target[key] = cloneSpecificValue(val);
11019 return;
11020
11021 // overwrite by new value if source isn't object or array
11022 } else if (typeof src !== 'object' || src === null || Array.isArray(src)) {
11023 target[key] = deepExtend({}, val);
11024 return;
11025
11026 // source value and new value is objects both, extending...
11027 } else {
11028 target[key] = deepExtend(src, val);
11029 return;
11030 }
11031 });
11032 });
11033
11034 return target;
11035};
11036
11037/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(29).Buffer))
11038
11039/***/ }),
11040/* 167 */
11041/***/ (function(module, exports, __webpack_require__) {
11042
11043var baseClone = __webpack_require__(320);
11044
11045/** Used to compose bitmasks for cloning. */
11046var CLONE_DEEP_FLAG = 1,
11047 CLONE_SYMBOLS_FLAG = 4;
11048
11049/**
11050 * This method is like `_.clone` except that it recursively clones `value`.
11051 *
11052 * @static
11053 * @memberOf _
11054 * @since 1.0.0
11055 * @category Lang
11056 * @param {*} value The value to recursively clone.
11057 * @returns {*} Returns the deep cloned value.
11058 * @see _.clone
11059 * @example
11060 *
11061 * var objects = [{ 'a': 1 }, { 'b': 2 }];
11062 *
11063 * var deep = _.cloneDeep(objects);
11064 * console.log(deep[0] === objects[0]);
11065 * // => false
11066 */
11067function cloneDeep(value) {
11068 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
11069}
11070
11071module.exports = cloneDeep;
11072
11073
11074/***/ }),
11075/* 168 */
11076/***/ (function(module, __webpack_exports__, __webpack_require__) {
11077
11078"use strict";
11079__webpack_require__.r(__webpack_exports__);
11080/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
11081/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
11082/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
11083/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_1__);
11084/* harmony import */ var _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22);
11085/* harmony import */ var _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2__);
11086/* harmony import */ var _babel_runtime_corejs2_core_js_weak_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(169);
11087/* harmony import */ var _babel_runtime_corejs2_core_js_weak_map__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_weak_map__WEBPACK_IMPORTED_MODULE_3__);
11088/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
11089/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_4__);
11090/* harmony import */ var cross_fetch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(170);
11091/* harmony import */ var cross_fetch__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(cross_fetch__WEBPACK_IMPORTED_MODULE_5__);
11092/* harmony import */ var js_yaml__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(78);
11093/* harmony import */ var js_yaml__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(js_yaml__WEBPACK_IMPORTED_MODULE_6__);
11094/* harmony import */ var querystring_browser__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(118);
11095/* harmony import */ var querystring_browser__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(querystring_browser__WEBPACK_IMPORTED_MODULE_7__);
11096/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(20);
11097/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_8__);
11098/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3);
11099/* harmony import */ var _create_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(80);
11100/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(39);
11101/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(81);
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115var ABSOLUTE_URL_REGEXP = new RegExp('^([a-z]+://|//)', 'i');
11116var JSONRefError = Object(_create_error__WEBPACK_IMPORTED_MODULE_10__["default"])('JSONRefError', function cb(message, extra, oriError) {
11117 this.originalError = oriError;
11118
11119 _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_4___default()(this, extra || {});
11120});
11121var docCache = {};
11122var specmapRefs = new _babel_runtime_corejs2_core_js_weak_map__WEBPACK_IMPORTED_MODULE_3___default.a();
11123var skipResolutionTestFns = [function (path) {
11124 return (// OpenAPI 3.0 Response Media Type Example
11125 // ["paths", *, *, "responses", *, "content", *, "example"]
11126 path[0] === 'paths' && path[3] === 'responses' && path[5] === 'content' && path[7] === 'example'
11127 );
11128}, function (path) {
11129 return (// OpenAPI 3.0 Request Body Media Type Example
11130 // ["paths", *, *, "responses", *, "content", *, "example"]
11131 path[0] === 'paths' && path[3] === 'requestBody' && path[4] === 'content' && path[6] === 'example'
11132 );
11133}];
11134
11135var shouldSkipResolution = function shouldSkipResolution(path) {
11136 return skipResolutionTestFns.some(function (fn) {
11137 return fn(path);
11138 });
11139}; // =========================
11140// Core
11141// =========================
11142
11143/**
11144 * This plugin resolves the JSON pointers.
11145 * A major part of this plugin deals with cyclic references via 2 mechanisms.
11146 * 1. If a pointer was already resolved before in this path, halt.
11147 * 2. If the patch value points to one of the ancestors in this path, halt.
11148 *
11149 * Note that either one of these mechanism is sufficient, both must be in place.
11150 * For examples:
11151 *
11152 * Given the following spec, #1 alone is insufficient because after the 2nd
11153 * application, there will be a cyclic object reference.
11154 * a.b.c: $ref-d
11155 * d.e.f: $ref-a (per #1, safe to return patch as no immediate cycle)
11156 *
11157 * Given the following spec, #2 alone is insufficient because although there will
11158 * never be any cyclic object reference, the plugin will keep producing patches.
11159 * a: $ref-b
11160 * b: $ref-a
11161 */
11162
11163
11164var plugin = {
11165 key: '$ref',
11166 plugin: function plugin(ref, key, fullPath, specmap) {
11167 var specmapInstance = specmap.getInstance();
11168 var parent = fullPath.slice(0, -1);
11169
11170 if (Object(_helpers__WEBPACK_IMPORTED_MODULE_11__["isFreelyNamed"])(parent) || shouldSkipResolution(parent)) {
11171 return undefined;
11172 }
11173
11174 var _specmap$getContext = specmap.getContext(fullPath),
11175 baseDoc = _specmap$getContext.baseDoc;
11176
11177 if (typeof ref !== 'string') {
11178 return new JSONRefError('$ref: must be a string (JSON-Ref)', {
11179 $ref: ref,
11180 baseDoc: baseDoc,
11181 fullPath: fullPath
11182 });
11183 }
11184
11185 var splitString = split(ref);
11186 var refPath = splitString[0];
11187 var pointer = splitString[1] || '';
11188 var basePath;
11189
11190 try {
11191 basePath = baseDoc || refPath ? absoluteify(refPath, baseDoc) : null;
11192 } catch (e) {
11193 return wrapError(e, {
11194 pointer: pointer,
11195 $ref: ref,
11196 basePath: basePath,
11197 fullPath: fullPath
11198 });
11199 }
11200
11201 var promOrVal;
11202 var tokens;
11203
11204 if (pointerAlreadyInPath(pointer, basePath, parent, specmap)) {
11205 // Cyclic reference!
11206 // if `useCircularStructures` is not set, just leave the reference
11207 // unresolved, but absolutify it so that we don't leave an invalid $ref
11208 // path in the content
11209 if (!specmapInstance.useCircularStructures) {
11210 var _absolutifiedRef = Object(_helpers__WEBPACK_IMPORTED_MODULE_11__["absolutifyPointer"])(ref, basePath);
11211
11212 if (ref === _absolutifiedRef) {
11213 // avoids endless looping
11214 // without this, the ref plugin never stops seeing this $ref
11215 return null;
11216 }
11217
11218 return ___WEBPACK_IMPORTED_MODULE_9__["default"].replace(fullPath, _absolutifiedRef);
11219 }
11220 }
11221
11222 if (basePath == null) {
11223 tokens = jsonPointerToArray(pointer);
11224 promOrVal = specmap.get(tokens);
11225
11226 if (typeof promOrVal === 'undefined') {
11227 promOrVal = new JSONRefError("Could not resolve reference: ".concat(ref), {
11228 pointer: pointer,
11229 $ref: ref,
11230 baseDoc: baseDoc,
11231 fullPath: fullPath
11232 });
11233 }
11234 } else {
11235 promOrVal = extractFromDoc(basePath, pointer); // eslint-disable-next-line no-underscore-dangle
11236
11237 if (promOrVal.__value != null) {
11238 promOrVal = promOrVal.__value; // eslint-disable-line no-underscore-dangle
11239 } else {
11240 promOrVal = promOrVal.catch(function (e) {
11241 throw wrapError(e, {
11242 pointer: pointer,
11243 $ref: ref,
11244 baseDoc: baseDoc,
11245 fullPath: fullPath
11246 });
11247 });
11248 }
11249 }
11250
11251 if (promOrVal instanceof Error) {
11252 return [___WEBPACK_IMPORTED_MODULE_9__["default"].remove(fullPath), promOrVal];
11253 }
11254
11255 var absolutifiedRef = Object(_helpers__WEBPACK_IMPORTED_MODULE_11__["absolutifyPointer"])(ref, basePath);
11256 var patch = ___WEBPACK_IMPORTED_MODULE_9__["default"].replace(parent, promOrVal, {
11257 $$ref: absolutifiedRef
11258 });
11259
11260 if (basePath && basePath !== baseDoc) {
11261 return [patch, ___WEBPACK_IMPORTED_MODULE_9__["default"].context(parent, {
11262 baseDoc: basePath
11263 })];
11264 }
11265
11266 try {
11267 // prevents circular values from being constructed, unless we specifically
11268 // want that to happen
11269 if (!patchValueAlreadyInPath(specmap.state, patch) || specmapInstance.useCircularStructures) {
11270 return patch;
11271 }
11272 } catch (e) {
11273 // if we're catching here, path traversal failed, so we should
11274 // ditch without sending any patches back up.
11275 //
11276 // this is a narrow fix for the larger problem of patches being queued
11277 // and then having the state they were generated against be modified
11278 // before they are applied.
11279 //
11280 // TODO: re-engineer specmap patch/state management to avoid this
11281 return null;
11282 }
11283
11284 return undefined;
11285 }
11286};
11287
11288var mod = _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_4___default()(plugin, {
11289 docCache: docCache,
11290 absoluteify: absoluteify,
11291 clearCache: clearCache,
11292 JSONRefError: JSONRefError,
11293 wrapError: wrapError,
11294 getDoc: getDoc,
11295 split: split,
11296 extractFromDoc: extractFromDoc,
11297 fetchJSON: fetchJSON,
11298 extract: extract,
11299 jsonPointerToArray: jsonPointerToArray,
11300 unescapeJsonPointerToken: unescapeJsonPointerToken
11301});
11302
11303/* harmony default export */ __webpack_exports__["default"] = (mod); // =========================
11304// Utilities
11305// =========================
11306
11307/**
11308 * Resolves a path and its base to an abolute URL.
11309 * @api public
11310 */
11311
11312function absoluteify(path, basePath) {
11313 if (!ABSOLUTE_URL_REGEXP.test(path)) {
11314 if (!basePath) {
11315 throw new JSONRefError("Tried to resolve a relative URL, without having a basePath. path: '".concat(path, "' basePath: '").concat(basePath, "'"));
11316 }
11317
11318 return url__WEBPACK_IMPORTED_MODULE_8___default.a.resolve(basePath, path);
11319 }
11320
11321 return path;
11322}
11323/**
11324 * Wraps an error as JSONRefError.
11325 * @param {Error} e the error.
11326 * @param {Object} extra (optional) optional data.
11327 * @return {Error} an instance of JSONRefError.
11328 * @api public
11329 */
11330
11331
11332function wrapError(e, extra) {
11333 var message;
11334
11335 if (e && e.response && e.response.body) {
11336 message = "".concat(e.response.body.code, " ").concat(e.response.body.message);
11337 } else {
11338 message = e.message;
11339 }
11340
11341 return new JSONRefError("Could not resolve reference: ".concat(message), extra, e);
11342}
11343/**
11344 * Splits a pointer by the hash delimiter.
11345 * @api public
11346 */
11347
11348
11349function split(ref) {
11350 return (ref + '').split('#'); // eslint-disable-line prefer-template
11351}
11352/**
11353 * Extracts a pointer from its document.
11354 * @param {String} docPath the absolute document URL.
11355 * @param {String} pointer the pointer whose value is to be extracted.
11356 * @return {Promise} a promise of the pointer value.
11357 * @api public
11358 */
11359
11360
11361function extractFromDoc(docPath, pointer) {
11362 var doc = docCache[docPath];
11363
11364 if (doc && !___WEBPACK_IMPORTED_MODULE_9__["default"].isPromise(doc)) {
11365 // If doc is already available, return __value together with the promise.
11366 // __value is for special handling in cycle check:
11367 // pointerAlreadyInPath() won't work if patch.value is a promise,
11368 // thus when that promise is finally resolved, cycle might happen (because
11369 // `spec` and `docCache[basePath]` refer to the exact same object).
11370 // See test "should resolve a cyclic spec when baseDoc is specified".
11371 try {
11372 var v = extract(pointer, doc);
11373 return _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_4___default()(_babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default.a.resolve(v), {
11374 __value: v
11375 });
11376 } catch (e) {
11377 return _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default.a.reject(e);
11378 }
11379 }
11380
11381 return getDoc(docPath).then(function (_doc) {
11382 return extract(pointer, _doc);
11383 });
11384}
11385/**
11386 * Clears all document caches.
11387 * @param {String} item (optional) the name of the cache item to be cleared.
11388 * @api public
11389 */
11390
11391
11392function clearCache(item) {
11393 if (typeof item !== 'undefined') {
11394 delete docCache[item];
11395 } else {
11396 _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_1___default()(docCache).forEach(function (key) {
11397 delete docCache[key];
11398 });
11399 }
11400}
11401/**
11402 * Fetches and caches a document.
11403 * @param {String} docPath the absolute URL of the document.
11404 * @return {Promise} a promise of the document content.
11405 * @api public
11406 */
11407
11408
11409function getDoc(docPath) {
11410 var val = docCache[docPath];
11411
11412 if (val) {
11413 return ___WEBPACK_IMPORTED_MODULE_9__["default"].isPromise(val) ? val : _babel_runtime_corejs2_core_js_promise__WEBPACK_IMPORTED_MODULE_2___default.a.resolve(val);
11414 } // NOTE: we need to use `mod.fetchJSON` in order to be able to overwrite it.
11415 // Any tips on how to make this cleaner, please ping!
11416
11417
11418 docCache[docPath] = mod.fetchJSON(docPath).then(function (doc) {
11419 docCache[docPath] = doc;
11420 return doc;
11421 });
11422 return docCache[docPath];
11423}
11424/**
11425 * Fetches a document.
11426 * @param {String} docPath the absolute URL of the document.
11427 * @return {Promise} a promise of the document content.
11428 * @api public
11429 */
11430
11431
11432function fetchJSON(docPath) {
11433 return Object(cross_fetch__WEBPACK_IMPORTED_MODULE_5__["fetch"])(docPath, {
11434 headers: {
11435 Accept: _constants__WEBPACK_IMPORTED_MODULE_12__["ACCEPT_HEADER_VALUE_FOR_DOCUMENTS"]
11436 },
11437 loadSpec: true
11438 }).then(function (res) {
11439 return res.text();
11440 }).then(function (text) {
11441 return js_yaml__WEBPACK_IMPORTED_MODULE_6___default.a.safeLoad(text);
11442 });
11443}
11444/**
11445 * Extracts a pointer from an object.
11446 * @param {String[]} pointer the JSON pointer.
11447 * @param {Object} obj an object whose value is to be extracted.
11448 * @return {Object} the value to be extracted.
11449 * @api public
11450 */
11451
11452
11453function extract(pointer, obj) {
11454 var tokens = jsonPointerToArray(pointer);
11455
11456 if (tokens.length < 1) {
11457 return obj;
11458 }
11459
11460 var val = ___WEBPACK_IMPORTED_MODULE_9__["default"].getIn(obj, tokens);
11461
11462 if (typeof val === 'undefined') {
11463 throw new JSONRefError("Could not resolve pointer: ".concat(pointer, " does not exist in document"), {
11464 pointer: pointer
11465 });
11466 }
11467
11468 return val;
11469}
11470/**
11471 * Converts a JSON pointer to array.
11472 * @api public
11473 */
11474
11475
11476function jsonPointerToArray(pointer) {
11477 if (typeof pointer !== 'string') {
11478 throw new TypeError("Expected a string, got a ".concat(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(pointer)));
11479 }
11480
11481 if (pointer[0] === '/') {
11482 pointer = pointer.substr(1);
11483 }
11484
11485 if (pointer === '') {
11486 return [];
11487 }
11488
11489 return pointer.split('/').map(unescapeJsonPointerToken);
11490}
11491/**
11492 * Unescapes a JSON pointer.
11493 * @api public
11494 */
11495
11496
11497function unescapeJsonPointerToken(token) {
11498 if (typeof token !== 'string') {
11499 return token;
11500 }
11501
11502 return querystring_browser__WEBPACK_IMPORTED_MODULE_7___default.a.unescape(token.replace(/~1/g, '/').replace(/~0/g, '~'));
11503}
11504/**
11505 * Escapes a JSON pointer.
11506 * @api public
11507 */
11508
11509
11510function escapeJsonPointerToken(token) {
11511 return querystring_browser__WEBPACK_IMPORTED_MODULE_7___default.a.escape(token.replace(/~/g, '~0').replace(/\//g, '~1'));
11512}
11513
11514function arrayToJsonPointer(arr) {
11515 if (arr.length === 0) {
11516 return '';
11517 }
11518
11519 return "/".concat(arr.map(escapeJsonPointerToken).join('/'));
11520}
11521
11522var pointerBoundaryChar = function pointerBoundaryChar(c) {
11523 return !c || c === '/' || c === '#';
11524};
11525
11526function pointerIsAParent(pointer, parentPointer) {
11527 if (pointerBoundaryChar(parentPointer)) {
11528 // This is the root of the document, so its naturally a parent
11529 return true;
11530 }
11531
11532 var nextChar = pointer.charAt(parentPointer.length);
11533 var lastParentChar = parentPointer.slice(-1);
11534 return pointer.indexOf(parentPointer) === 0 && (!nextChar || nextChar === '/' || nextChar === '#') && lastParentChar !== '#';
11535} // =========================
11536// Private
11537// =========================
11538
11539/**
11540 * Checks if this pointer points back to one or more pointers along the path.
11541 */
11542
11543
11544function pointerAlreadyInPath(pointer, basePath, parent, specmap) {
11545 var refs = specmapRefs.get(specmap);
11546
11547 if (!refs) {
11548 // Stores all resolved references of a specmap instance.
11549 // Schema: path -> pointer (path's $ref value).
11550 refs = {};
11551 specmapRefs.set(specmap, refs);
11552 }
11553
11554 var parentPointer = arrayToJsonPointer(parent);
11555 var fullyQualifiedPointer = "".concat(basePath || '<specmap-base>', "#").concat(pointer); // dirty hack to strip `allof/[index]` from the path, in order to avoid cases
11556 // where we get false negatives because:
11557 // - we resolve a path, then
11558 // - allOf plugin collapsed `allOf/[index]` out of the path, then
11559 // - we try to work on a child $ref within that collapsed path.
11560 //
11561 // because of the path collapse, we lose track of it in our specmapRefs hash
11562 // solution: always throw the allOf constructs out of paths we store
11563 // TODO: solve this with a global register, or by writing more metadata in
11564 // either allOf or refs plugin
11565
11566 var safeParentPointer = parentPointer.replace(/allOf\/\d+\/?/g, ''); // Case 1: direct cycle, e.g. a.b.c.$ref: '/a.b'
11567 // Detect by checking that the parent path doesn't start with pointer.
11568 // This only applies if the pointer is internal, i.e. basePath === rootPath (could be null)
11569
11570 var rootDoc = specmap.contextTree.get([]).baseDoc;
11571
11572 if (basePath == rootDoc && pointerIsAParent(safeParentPointer, pointer)) {
11573 // eslint-disable-line
11574 return true;
11575 } // Case 2: indirect cycle
11576 // ex1: a.$ref: '/b' & b.c.$ref: '/b/c'
11577 // ex2: a.$ref: '/b/c' & b.c.$ref: '/b'
11578 // Detect by retrieving all the $refs along the path of parent
11579 // and checking if any starts with pointer or vice versa.
11580
11581
11582 var currPath = '';
11583 var hasIndirectCycle = parent.some(function (token) {
11584 currPath = "".concat(currPath, "/").concat(escapeJsonPointerToken(token));
11585 return refs[currPath] && refs[currPath].some(function (ref) {
11586 return pointerIsAParent(ref, fullyQualifiedPointer) || pointerIsAParent(fullyQualifiedPointer, ref);
11587 });
11588 });
11589
11590 if (hasIndirectCycle) {
11591 return true;
11592 } // No cycle, this ref will be resolved, so stores it now for future detection.
11593 // No need to store if has cycle, as parent path is a dead-end and won't be checked again.
11594
11595
11596 refs[safeParentPointer] = (refs[safeParentPointer] || []).concat(fullyQualifiedPointer);
11597 return undefined;
11598}
11599/**
11600 * Checks if the value of this patch ends up pointing to an ancestor along the path.
11601 */
11602
11603
11604function patchValueAlreadyInPath(root, patch) {
11605 var ancestors = [root];
11606 patch.path.reduce(function (parent, p) {
11607 ancestors.push(parent[p]);
11608 return parent[p];
11609 }, root);
11610 return pointToAncestor(patch.value);
11611
11612 function pointToAncestor(obj) {
11613 return ___WEBPACK_IMPORTED_MODULE_9__["default"].isObject(obj) && (ancestors.indexOf(obj) >= 0 || _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_1___default()(obj).some(function (k) {
11614 return pointToAncestor(obj[k]);
11615 }));
11616 }
11617}
11618
11619/***/ }),
11620/* 169 */
11621/***/ (function(module, exports, __webpack_require__) {
11622
11623module.exports = __webpack_require__(349);
11624
11625/***/ }),
11626/* 170 */
11627/***/ (function(module, exports) {
11628
11629var __self__ = (function (root) {
11630function F() {
11631this.fetch = false;
11632this.DOMException = root.DOMException
11633}
11634F.prototype = root;
11635return new F();
11636})(typeof self !== 'undefined' ? self : this);
11637(function(self) {
11638
11639var irrelevant = (function (exports) {
11640 var support = {
11641 searchParams: 'URLSearchParams' in self,
11642 iterable: 'Symbol' in self && 'iterator' in Symbol,
11643 blob:
11644 'FileReader' in self &&
11645 'Blob' in self &&
11646 (function() {
11647 try {
11648 new Blob();
11649 return true
11650 } catch (e) {
11651 return false
11652 }
11653 })(),
11654 formData: 'FormData' in self,
11655 arrayBuffer: 'ArrayBuffer' in self
11656 };
11657
11658 function isDataView(obj) {
11659 return obj && DataView.prototype.isPrototypeOf(obj)
11660 }
11661
11662 if (support.arrayBuffer) {
11663 var viewClasses = [
11664 '[object Int8Array]',
11665 '[object Uint8Array]',
11666 '[object Uint8ClampedArray]',
11667 '[object Int16Array]',
11668 '[object Uint16Array]',
11669 '[object Int32Array]',
11670 '[object Uint32Array]',
11671 '[object Float32Array]',
11672 '[object Float64Array]'
11673 ];
11674
11675 var isArrayBufferView =
11676 ArrayBuffer.isView ||
11677 function(obj) {
11678 return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
11679 };
11680 }
11681
11682 function normalizeName(name) {
11683 if (typeof name !== 'string') {
11684 name = String(name);
11685 }
11686 if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
11687 throw new TypeError('Invalid character in header field name')
11688 }
11689 return name.toLowerCase()
11690 }
11691
11692 function normalizeValue(value) {
11693 if (typeof value !== 'string') {
11694 value = String(value);
11695 }
11696 return value
11697 }
11698
11699 // Build a destructive iterator for the value list
11700 function iteratorFor(items) {
11701 var iterator = {
11702 next: function() {
11703 var value = items.shift();
11704 return {done: value === undefined, value: value}
11705 }
11706 };
11707
11708 if (support.iterable) {
11709 iterator[Symbol.iterator] = function() {
11710 return iterator
11711 };
11712 }
11713
11714 return iterator
11715 }
11716
11717 function Headers(headers) {
11718 this.map = {};
11719
11720 if (headers instanceof Headers) {
11721 headers.forEach(function(value, name) {
11722 this.append(name, value);
11723 }, this);
11724 } else if (Array.isArray(headers)) {
11725 headers.forEach(function(header) {
11726 this.append(header[0], header[1]);
11727 }, this);
11728 } else if (headers) {
11729 Object.getOwnPropertyNames(headers).forEach(function(name) {
11730 this.append(name, headers[name]);
11731 }, this);
11732 }
11733 }
11734
11735 Headers.prototype.append = function(name, value) {
11736 name = normalizeName(name);
11737 value = normalizeValue(value);
11738 var oldValue = this.map[name];
11739 this.map[name] = oldValue ? oldValue + ', ' + value : value;
11740 };
11741
11742 Headers.prototype['delete'] = function(name) {
11743 delete this.map[normalizeName(name)];
11744 };
11745
11746 Headers.prototype.get = function(name) {
11747 name = normalizeName(name);
11748 return this.has(name) ? this.map[name] : null
11749 };
11750
11751 Headers.prototype.has = function(name) {
11752 return this.map.hasOwnProperty(normalizeName(name))
11753 };
11754
11755 Headers.prototype.set = function(name, value) {
11756 this.map[normalizeName(name)] = normalizeValue(value);
11757 };
11758
11759 Headers.prototype.forEach = function(callback, thisArg) {
11760 for (var name in this.map) {
11761 if (this.map.hasOwnProperty(name)) {
11762 callback.call(thisArg, this.map[name], name, this);
11763 }
11764 }
11765 };
11766
11767 Headers.prototype.keys = function() {
11768 var items = [];
11769 this.forEach(function(value, name) {
11770 items.push(name);
11771 });
11772 return iteratorFor(items)
11773 };
11774
11775 Headers.prototype.values = function() {
11776 var items = [];
11777 this.forEach(function(value) {
11778 items.push(value);
11779 });
11780 return iteratorFor(items)
11781 };
11782
11783 Headers.prototype.entries = function() {
11784 var items = [];
11785 this.forEach(function(value, name) {
11786 items.push([name, value]);
11787 });
11788 return iteratorFor(items)
11789 };
11790
11791 if (support.iterable) {
11792 Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
11793 }
11794
11795 function consumed(body) {
11796 if (body.bodyUsed) {
11797 return Promise.reject(new TypeError('Already read'))
11798 }
11799 body.bodyUsed = true;
11800 }
11801
11802 function fileReaderReady(reader) {
11803 return new Promise(function(resolve, reject) {
11804 reader.onload = function() {
11805 resolve(reader.result);
11806 };
11807 reader.onerror = function() {
11808 reject(reader.error);
11809 };
11810 })
11811 }
11812
11813 function readBlobAsArrayBuffer(blob) {
11814 var reader = new FileReader();
11815 var promise = fileReaderReady(reader);
11816 reader.readAsArrayBuffer(blob);
11817 return promise
11818 }
11819
11820 function readBlobAsText(blob) {
11821 var reader = new FileReader();
11822 var promise = fileReaderReady(reader);
11823 reader.readAsText(blob);
11824 return promise
11825 }
11826
11827 function readArrayBufferAsText(buf) {
11828 var view = new Uint8Array(buf);
11829 var chars = new Array(view.length);
11830
11831 for (var i = 0; i < view.length; i++) {
11832 chars[i] = String.fromCharCode(view[i]);
11833 }
11834 return chars.join('')
11835 }
11836
11837 function bufferClone(buf) {
11838 if (buf.slice) {
11839 return buf.slice(0)
11840 } else {
11841 var view = new Uint8Array(buf.byteLength);
11842 view.set(new Uint8Array(buf));
11843 return view.buffer
11844 }
11845 }
11846
11847 function Body() {
11848 this.bodyUsed = false;
11849
11850 this._initBody = function(body) {
11851 this._bodyInit = body;
11852 if (!body) {
11853 this._bodyText = '';
11854 } else if (typeof body === 'string') {
11855 this._bodyText = body;
11856 } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
11857 this._bodyBlob = body;
11858 } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
11859 this._bodyFormData = body;
11860 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
11861 this._bodyText = body.toString();
11862 } else if (support.arrayBuffer && support.blob && isDataView(body)) {
11863 this._bodyArrayBuffer = bufferClone(body.buffer);
11864 // IE 10-11 can't handle a DataView body.
11865 this._bodyInit = new Blob([this._bodyArrayBuffer]);
11866 } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
11867 this._bodyArrayBuffer = bufferClone(body);
11868 } else {
11869 this._bodyText = body = Object.prototype.toString.call(body);
11870 }
11871
11872 if (!this.headers.get('content-type')) {
11873 if (typeof body === 'string') {
11874 this.headers.set('content-type', 'text/plain;charset=UTF-8');
11875 } else if (this._bodyBlob && this._bodyBlob.type) {
11876 this.headers.set('content-type', this._bodyBlob.type);
11877 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
11878 this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
11879 }
11880 }
11881 };
11882
11883 if (support.blob) {
11884 this.blob = function() {
11885 var rejected = consumed(this);
11886 if (rejected) {
11887 return rejected
11888 }
11889
11890 if (this._bodyBlob) {
11891 return Promise.resolve(this._bodyBlob)
11892 } else if (this._bodyArrayBuffer) {
11893 return Promise.resolve(new Blob([this._bodyArrayBuffer]))
11894 } else if (this._bodyFormData) {
11895 throw new Error('could not read FormData body as blob')
11896 } else {
11897 return Promise.resolve(new Blob([this._bodyText]))
11898 }
11899 };
11900
11901 this.arrayBuffer = function() {
11902 if (this._bodyArrayBuffer) {
11903 return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
11904 } else {
11905 return this.blob().then(readBlobAsArrayBuffer)
11906 }
11907 };
11908 }
11909
11910 this.text = function() {
11911 var rejected = consumed(this);
11912 if (rejected) {
11913 return rejected
11914 }
11915
11916 if (this._bodyBlob) {
11917 return readBlobAsText(this._bodyBlob)
11918 } else if (this._bodyArrayBuffer) {
11919 return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
11920 } else if (this._bodyFormData) {
11921 throw new Error('could not read FormData body as text')
11922 } else {
11923 return Promise.resolve(this._bodyText)
11924 }
11925 };
11926
11927 if (support.formData) {
11928 this.formData = function() {
11929 return this.text().then(decode)
11930 };
11931 }
11932
11933 this.json = function() {
11934 return this.text().then(JSON.parse)
11935 };
11936
11937 return this
11938 }
11939
11940 // HTTP methods whose capitalization should be normalized
11941 var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
11942
11943 function normalizeMethod(method) {
11944 var upcased = method.toUpperCase();
11945 return methods.indexOf(upcased) > -1 ? upcased : method
11946 }
11947
11948 function Request(input, options) {
11949 options = options || {};
11950 var body = options.body;
11951
11952 if (input instanceof Request) {
11953 if (input.bodyUsed) {
11954 throw new TypeError('Already read')
11955 }
11956 this.url = input.url;
11957 this.credentials = input.credentials;
11958 if (!options.headers) {
11959 this.headers = new Headers(input.headers);
11960 }
11961 this.method = input.method;
11962 this.mode = input.mode;
11963 this.signal = input.signal;
11964 if (!body && input._bodyInit != null) {
11965 body = input._bodyInit;
11966 input.bodyUsed = true;
11967 }
11968 } else {
11969 this.url = String(input);
11970 }
11971
11972 this.credentials = options.credentials || this.credentials || 'same-origin';
11973 if (options.headers || !this.headers) {
11974 this.headers = new Headers(options.headers);
11975 }
11976 this.method = normalizeMethod(options.method || this.method || 'GET');
11977 this.mode = options.mode || this.mode || null;
11978 this.signal = options.signal || this.signal;
11979 this.referrer = null;
11980
11981 if ((this.method === 'GET' || this.method === 'HEAD') && body) {
11982 throw new TypeError('Body not allowed for GET or HEAD requests')
11983 }
11984 this._initBody(body);
11985 }
11986
11987 Request.prototype.clone = function() {
11988 return new Request(this, {body: this._bodyInit})
11989 };
11990
11991 function decode(body) {
11992 var form = new FormData();
11993 body
11994 .trim()
11995 .split('&')
11996 .forEach(function(bytes) {
11997 if (bytes) {
11998 var split = bytes.split('=');
11999 var name = split.shift().replace(/\+/g, ' ');
12000 var value = split.join('=').replace(/\+/g, ' ');
12001 form.append(decodeURIComponent(name), decodeURIComponent(value));
12002 }
12003 });
12004 return form
12005 }
12006
12007 function parseHeaders(rawHeaders) {
12008 var headers = new Headers();
12009 // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
12010 // https://tools.ietf.org/html/rfc7230#section-3.2
12011 var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
12012 preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
12013 var parts = line.split(':');
12014 var key = parts.shift().trim();
12015 if (key) {
12016 var value = parts.join(':').trim();
12017 headers.append(key, value);
12018 }
12019 });
12020 return headers
12021 }
12022
12023 Body.call(Request.prototype);
12024
12025 function Response(bodyInit, options) {
12026 if (!options) {
12027 options = {};
12028 }
12029
12030 this.type = 'default';
12031 this.status = options.status === undefined ? 200 : options.status;
12032 this.ok = this.status >= 200 && this.status < 300;
12033 this.statusText = 'statusText' in options ? options.statusText : 'OK';
12034 this.headers = new Headers(options.headers);
12035 this.url = options.url || '';
12036 this._initBody(bodyInit);
12037 }
12038
12039 Body.call(Response.prototype);
12040
12041 Response.prototype.clone = function() {
12042 return new Response(this._bodyInit, {
12043 status: this.status,
12044 statusText: this.statusText,
12045 headers: new Headers(this.headers),
12046 url: this.url
12047 })
12048 };
12049
12050 Response.error = function() {
12051 var response = new Response(null, {status: 0, statusText: ''});
12052 response.type = 'error';
12053 return response
12054 };
12055
12056 var redirectStatuses = [301, 302, 303, 307, 308];
12057
12058 Response.redirect = function(url, status) {
12059 if (redirectStatuses.indexOf(status) === -1) {
12060 throw new RangeError('Invalid status code')
12061 }
12062
12063 return new Response(null, {status: status, headers: {location: url}})
12064 };
12065
12066 exports.DOMException = self.DOMException;
12067 try {
12068 new exports.DOMException();
12069 } catch (err) {
12070 exports.DOMException = function(message, name) {
12071 this.message = message;
12072 this.name = name;
12073 var error = Error(message);
12074 this.stack = error.stack;
12075 };
12076 exports.DOMException.prototype = Object.create(Error.prototype);
12077 exports.DOMException.prototype.constructor = exports.DOMException;
12078 }
12079
12080 function fetch(input, init) {
12081 return new Promise(function(resolve, reject) {
12082 var request = new Request(input, init);
12083
12084 if (request.signal && request.signal.aborted) {
12085 return reject(new exports.DOMException('Aborted', 'AbortError'))
12086 }
12087
12088 var xhr = new XMLHttpRequest();
12089
12090 function abortXhr() {
12091 xhr.abort();
12092 }
12093
12094 xhr.onload = function() {
12095 var options = {
12096 status: xhr.status,
12097 statusText: xhr.statusText,
12098 headers: parseHeaders(xhr.getAllResponseHeaders() || '')
12099 };
12100 options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
12101 var body = 'response' in xhr ? xhr.response : xhr.responseText;
12102 resolve(new Response(body, options));
12103 };
12104
12105 xhr.onerror = function() {
12106 reject(new TypeError('Network request failed'));
12107 };
12108
12109 xhr.ontimeout = function() {
12110 reject(new TypeError('Network request failed'));
12111 };
12112
12113 xhr.onabort = function() {
12114 reject(new exports.DOMException('Aborted', 'AbortError'));
12115 };
12116
12117 xhr.open(request.method, request.url, true);
12118
12119 if (request.credentials === 'include') {
12120 xhr.withCredentials = true;
12121 } else if (request.credentials === 'omit') {
12122 xhr.withCredentials = false;
12123 }
12124
12125 if ('responseType' in xhr && support.blob) {
12126 xhr.responseType = 'blob';
12127 }
12128
12129 request.headers.forEach(function(value, name) {
12130 xhr.setRequestHeader(name, value);
12131 });
12132
12133 if (request.signal) {
12134 request.signal.addEventListener('abort', abortXhr);
12135
12136 xhr.onreadystatechange = function() {
12137 // DONE (success or failure)
12138 if (xhr.readyState === 4) {
12139 request.signal.removeEventListener('abort', abortXhr);
12140 }
12141 };
12142 }
12143
12144 xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
12145 })
12146 }
12147
12148 fetch.polyfill = true;
12149
12150 if (!self.fetch) {
12151 self.fetch = fetch;
12152 self.Headers = Headers;
12153 self.Request = Request;
12154 self.Response = Response;
12155 }
12156
12157 exports.Headers = Headers;
12158 exports.Request = Request;
12159 exports.Response = Response;
12160 exports.fetch = fetch;
12161
12162 return exports;
12163
12164}({}));
12165})(__self__);
12166delete __self__.fetch.polyfill
12167exports = __self__.fetch // To enable: import fetch from 'cross-fetch'
12168exports.default = __self__.fetch // For TypeScript consumers without esModuleInterop.
12169exports.fetch = __self__.fetch // To enable: import {fetch} from 'cross-fetch'
12170exports.Headers = __self__.Headers
12171exports.Request = __self__.Request
12172exports.Response = __self__.Response
12173module.exports = exports
12174
12175
12176/***/ }),
12177/* 171 */
12178/***/ (function(module, exports) {
12179
12180var traverse = module.exports = function (obj) {
12181 return new Traverse(obj);
12182};
12183
12184function Traverse (obj) {
12185 this.value = obj;
12186}
12187
12188Traverse.prototype.get = function (ps) {
12189 var node = this.value;
12190 for (var i = 0; i < ps.length; i ++) {
12191 var key = ps[i];
12192 if (!node || !hasOwnProperty.call(node, key)) {
12193 node = undefined;
12194 break;
12195 }
12196 node = node[key];
12197 }
12198 return node;
12199};
12200
12201Traverse.prototype.has = function (ps) {
12202 var node = this.value;
12203 for (var i = 0; i < ps.length; i ++) {
12204 var key = ps[i];
12205 if (!node || !hasOwnProperty.call(node, key)) {
12206 return false;
12207 }
12208 node = node[key];
12209 }
12210 return true;
12211};
12212
12213Traverse.prototype.set = function (ps, value) {
12214 var node = this.value;
12215 for (var i = 0; i < ps.length - 1; i ++) {
12216 var key = ps[i];
12217 if (!hasOwnProperty.call(node, key)) node[key] = {};
12218 node = node[key];
12219 }
12220 node[ps[i]] = value;
12221 return value;
12222};
12223
12224Traverse.prototype.map = function (cb) {
12225 return walk(this.value, cb, true);
12226};
12227
12228Traverse.prototype.forEach = function (cb) {
12229 this.value = walk(this.value, cb, false);
12230 return this.value;
12231};
12232
12233Traverse.prototype.reduce = function (cb, init) {
12234 var skip = arguments.length === 1;
12235 var acc = skip ? this.value : init;
12236 this.forEach(function (x) {
12237 if (!this.isRoot || !skip) {
12238 acc = cb.call(this, acc, x);
12239 }
12240 });
12241 return acc;
12242};
12243
12244Traverse.prototype.paths = function () {
12245 var acc = [];
12246 this.forEach(function (x) {
12247 acc.push(this.path);
12248 });
12249 return acc;
12250};
12251
12252Traverse.prototype.nodes = function () {
12253 var acc = [];
12254 this.forEach(function (x) {
12255 acc.push(this.node);
12256 });
12257 return acc;
12258};
12259
12260Traverse.prototype.clone = function () {
12261 var parents = [], nodes = [];
12262
12263 return (function clone (src) {
12264 for (var i = 0; i < parents.length; i++) {
12265 if (parents[i] === src) {
12266 return nodes[i];
12267 }
12268 }
12269
12270 if (typeof src === 'object' && src !== null) {
12271 var dst = copy(src);
12272
12273 parents.push(src);
12274 nodes.push(dst);
12275
12276 forEach(objectKeys(src), function (key) {
12277 dst[key] = clone(src[key]);
12278 });
12279
12280 parents.pop();
12281 nodes.pop();
12282 return dst;
12283 }
12284 else {
12285 return src;
12286 }
12287 })(this.value);
12288};
12289
12290function walk (root, cb, immutable) {
12291 var path = [];
12292 var parents = [];
12293 var alive = true;
12294
12295 return (function walker (node_) {
12296 var node = immutable ? copy(node_) : node_;
12297 var modifiers = {};
12298
12299 var keepGoing = true;
12300
12301 var state = {
12302 node : node,
12303 node_ : node_,
12304 path : [].concat(path),
12305 parent : parents[parents.length - 1],
12306 parents : parents,
12307 key : path.slice(-1)[0],
12308 isRoot : path.length === 0,
12309 level : path.length,
12310 circular : null,
12311 update : function (x, stopHere) {
12312 if (!state.isRoot) {
12313 state.parent.node[state.key] = x;
12314 }
12315 state.node = x;
12316 if (stopHere) keepGoing = false;
12317 },
12318 'delete' : function (stopHere) {
12319 delete state.parent.node[state.key];
12320 if (stopHere) keepGoing = false;
12321 },
12322 remove : function (stopHere) {
12323 if (isArray(state.parent.node)) {
12324 state.parent.node.splice(state.key, 1);
12325 }
12326 else {
12327 delete state.parent.node[state.key];
12328 }
12329 if (stopHere) keepGoing = false;
12330 },
12331 keys : null,
12332 before : function (f) { modifiers.before = f },
12333 after : function (f) { modifiers.after = f },
12334 pre : function (f) { modifiers.pre = f },
12335 post : function (f) { modifiers.post = f },
12336 stop : function () { alive = false },
12337 block : function () { keepGoing = false }
12338 };
12339
12340 if (!alive) return state;
12341
12342 function updateState() {
12343 if (typeof state.node === 'object' && state.node !== null) {
12344 if (!state.keys || state.node_ !== state.node) {
12345 state.keys = objectKeys(state.node)
12346 }
12347
12348 state.isLeaf = state.keys.length == 0;
12349
12350 for (var i = 0; i < parents.length; i++) {
12351 if (parents[i].node_ === node_) {
12352 state.circular = parents[i];
12353 break;
12354 }
12355 }
12356 }
12357 else {
12358 state.isLeaf = true;
12359 state.keys = null;
12360 }
12361
12362 state.notLeaf = !state.isLeaf;
12363 state.notRoot = !state.isRoot;
12364 }
12365
12366 updateState();
12367
12368 // use return values to update if defined
12369 var ret = cb.call(state, state.node);
12370 if (ret !== undefined && state.update) state.update(ret);
12371
12372 if (modifiers.before) modifiers.before.call(state, state.node);
12373
12374 if (!keepGoing) return state;
12375
12376 if (typeof state.node == 'object'
12377 && state.node !== null && !state.circular) {
12378 parents.push(state);
12379
12380 updateState();
12381
12382 forEach(state.keys, function (key, i) {
12383 path.push(key);
12384
12385 if (modifiers.pre) modifiers.pre.call(state, state.node[key], key);
12386
12387 var child = walker(state.node[key]);
12388 if (immutable && hasOwnProperty.call(state.node, key)) {
12389 state.node[key] = child.node;
12390 }
12391
12392 child.isLast = i == state.keys.length - 1;
12393 child.isFirst = i == 0;
12394
12395 if (modifiers.post) modifiers.post.call(state, child);
12396
12397 path.pop();
12398 });
12399 parents.pop();
12400 }
12401
12402 if (modifiers.after) modifiers.after.call(state, state.node);
12403
12404 return state;
12405 })(root).node;
12406}
12407
12408function copy (src) {
12409 if (typeof src === 'object' && src !== null) {
12410 var dst;
12411
12412 if (isArray(src)) {
12413 dst = [];
12414 }
12415 else if (isDate(src)) {
12416 dst = new Date(src.getTime ? src.getTime() : src);
12417 }
12418 else if (isRegExp(src)) {
12419 dst = new RegExp(src);
12420 }
12421 else if (isError(src)) {
12422 dst = { message: src.message };
12423 }
12424 else if (isBoolean(src)) {
12425 dst = new Boolean(src);
12426 }
12427 else if (isNumber(src)) {
12428 dst = new Number(src);
12429 }
12430 else if (isString(src)) {
12431 dst = new String(src);
12432 }
12433 else if (Object.create && Object.getPrototypeOf) {
12434 dst = Object.create(Object.getPrototypeOf(src));
12435 }
12436 else if (src.constructor === Object) {
12437 dst = {};
12438 }
12439 else {
12440 var proto =
12441 (src.constructor && src.constructor.prototype)
12442 || src.__proto__
12443 || {}
12444 ;
12445 var T = function () {};
12446 T.prototype = proto;
12447 dst = new T;
12448 }
12449
12450 forEach(objectKeys(src), function (key) {
12451 dst[key] = src[key];
12452 });
12453 return dst;
12454 }
12455 else return src;
12456}
12457
12458var objectKeys = Object.keys || function keys (obj) {
12459 var res = [];
12460 for (var key in obj) res.push(key)
12461 return res;
12462};
12463
12464function toS (obj) { return Object.prototype.toString.call(obj) }
12465function isDate (obj) { return toS(obj) === '[object Date]' }
12466function isRegExp (obj) { return toS(obj) === '[object RegExp]' }
12467function isError (obj) { return toS(obj) === '[object Error]' }
12468function isBoolean (obj) { return toS(obj) === '[object Boolean]' }
12469function isNumber (obj) { return toS(obj) === '[object Number]' }
12470function isString (obj) { return toS(obj) === '[object String]' }
12471
12472var isArray = Array.isArray || function isArray (xs) {
12473 return Object.prototype.toString.call(xs) === '[object Array]';
12474};
12475
12476var forEach = function (xs, fn) {
12477 if (xs.forEach) return xs.forEach(fn)
12478 else for (var i = 0; i < xs.length; i++) {
12479 fn(xs[i], i, xs);
12480 }
12481};
12482
12483forEach(objectKeys(Traverse.prototype), function (key) {
12484 traverse[key] = function (obj) {
12485 var args = [].slice.call(arguments, 1);
12486 var t = new Traverse(obj);
12487 return t[key].apply(t, args);
12488 };
12489});
12490
12491var hasOwnProperty = Object.hasOwnProperty || function (obj, key) {
12492 return key in obj;
12493};
12494
12495
12496/***/ }),
12497/* 172 */
12498/***/ (function(module, __webpack_exports__, __webpack_require__) {
12499
12500"use strict";
12501__webpack_require__.r(__webpack_exports__);
12502/* harmony import */ var _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
12503/* harmony import */ var _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);
12504/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
12505/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1__);
12506/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
12507/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2__);
12508/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39);
12509
12510
12511
12512
12513/* harmony default export */ __webpack_exports__["default"] = ({
12514 key: 'allOf',
12515 plugin: function plugin(val, key, fullPath, specmap, patch) {
12516 // Ignore replace patches created by $ref because the changes will
12517 // occur in the original "add" patch and we don't want this plugin
12518 // to redundantly processes those "relace" patches.
12519 if (patch.meta && patch.meta.$$ref) {
12520 return undefined;
12521 }
12522
12523 var parent = fullPath.slice(0, -1);
12524
12525 if (Object(_helpers__WEBPACK_IMPORTED_MODULE_3__["isFreelyNamed"])(parent)) {
12526 return undefined;
12527 }
12528
12529 if (!_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(val)) {
12530 var err = new TypeError('allOf must be an array');
12531 err.fullPath = fullPath; // This is an array
12532
12533 return err;
12534 }
12535
12536 var alreadyAddError = false; // Find the original definition from the `patch.value` object
12537 // Remove the `allOf` property so it doesn't get added to the result of the `allOf` plugin
12538
12539 var originalDefinitionObj = patch.value;
12540 parent.forEach(function (part) {
12541 if (!originalDefinitionObj) return; // bail out if we've lost sight of our target
12542
12543 originalDefinitionObj = originalDefinitionObj[part];
12544 });
12545 originalDefinitionObj = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1___default()({}, originalDefinitionObj);
12546 delete originalDefinitionObj.allOf;
12547 var patches = []; // remove existing content
12548
12549 patches.push(specmap.replace(parent, {}));
12550 val.forEach(function (toMerge, i) {
12551 if (!specmap.isObject(toMerge)) {
12552 if (alreadyAddError) {
12553 return null;
12554 }
12555
12556 alreadyAddError = true;
12557
12558 var _err = new TypeError('Elements in allOf must be objects');
12559
12560 _err.fullPath = fullPath; // This is an array
12561
12562 return patches.push(_err);
12563 } // Deeply merge the member's contents onto the parent location
12564
12565
12566 patches.push(specmap.mergeDeep(parent, toMerge)); // Generate patches that migrate $ref values based on ContextTree information
12567 // remove ["allOf"], which will not be present when these patches are applied
12568
12569 var collapsedFullPath = fullPath.slice(0, -1);
12570 var absoluteRefPatches = Object(_helpers__WEBPACK_IMPORTED_MODULE_3__["generateAbsoluteRefPatches"])(toMerge, collapsedFullPath, {
12571 getBaseUrlForNodePath: function getBaseUrlForNodePath(nodePath) {
12572 return specmap.getContext([].concat(_babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(fullPath), [i], _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(nodePath))).baseDoc;
12573 },
12574 specmap: specmap
12575 });
12576 patches.push.apply(patches, _babel_runtime_corejs2_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(absoluteRefPatches));
12577 return undefined;
12578 }); // Merge back the values from the original definition
12579
12580 patches.push(specmap.mergeDeep(parent, originalDefinitionObj)); // If there was not an original $$ref value, make sure to remove
12581 // any $$ref value that may exist from the result of `allOf` merges
12582
12583 if (!originalDefinitionObj.$$ref) {
12584 patches.push(specmap.remove([].concat(parent, '$$ref')));
12585 }
12586
12587 return patches;
12588 }
12589});
12590
12591/***/ }),
12592/* 173 */
12593/***/ (function(module, __webpack_exports__, __webpack_require__) {
12594
12595"use strict";
12596__webpack_require__.r(__webpack_exports__);
12597/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
12598/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__);
12599/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
12600/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1__);
12601/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
12602/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2__);
12603/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
12604
12605
12606
12607
12608/* harmony default export */ __webpack_exports__["default"] = ({
12609 key: 'parameters',
12610 plugin: function plugin(parameters, key, fullPath, specmap) {
12611 if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(parameters) && parameters.length) {
12612 var val = _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_1___default()([], parameters);
12613
12614 var opPath = fullPath.slice(0, -1);
12615
12616 var op = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()({}, ___WEBPACK_IMPORTED_MODULE_3__["default"].getIn(specmap.spec, opPath));
12617
12618 parameters.forEach(function (param, i) {
12619 try {
12620 val[i].default = specmap.parameterMacro(op, param);
12621 } catch (e) {
12622 var err = new Error(e);
12623 err.fullPath = fullPath;
12624 return err;
12625 }
12626
12627 return undefined;
12628 });
12629 return ___WEBPACK_IMPORTED_MODULE_3__["default"].replace(fullPath, val);
12630 }
12631
12632 return ___WEBPACK_IMPORTED_MODULE_3__["default"].replace(fullPath, parameters);
12633 }
12634});
12635
12636/***/ }),
12637/* 174 */
12638/***/ (function(module, __webpack_exports__, __webpack_require__) {
12639
12640"use strict";
12641__webpack_require__.r(__webpack_exports__);
12642/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
12643/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__);
12644/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
12645
12646
12647/* harmony default export */ __webpack_exports__["default"] = ({
12648 key: 'properties',
12649 plugin: function plugin(properties, key, fullPath, specmap) {
12650 var val = _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()({}, properties); // eslint-disable-next-line no-restricted-syntax, guard-for-in
12651
12652
12653 for (var k in properties) {
12654 try {
12655 val[k].default = specmap.modelPropertyMacro(val[k]);
12656 } catch (e) {
12657 var err = new Error(e);
12658 err.fullPath = fullPath; // This is an array
12659
12660 return err;
12661 }
12662 }
12663
12664 var patch = ___WEBPACK_IMPORTED_MODULE_1__["default"].replace(fullPath, val);
12665 return patch;
12666 }
12667});
12668
12669/***/ }),
12670/* 175 */
12671/***/ (function(module, __webpack_exports__, __webpack_require__) {
12672
12673"use strict";
12674__webpack_require__.r(__webpack_exports__);
12675/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ContextTree; });
12676/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
12677/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__);
12678/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
12679/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1__);
12680/* harmony import */ var _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47);
12681/* harmony import */ var _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);
12682/* harmony import */ var _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38);
12683/* harmony import */ var _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);
12684
12685
12686
12687
12688
12689var ContextTree = /*#__PURE__*/function () {
12690 function ContextTree(value) {
12691 _babel_runtime_corejs2_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, ContextTree);
12692
12693 this.root = createNode(value || {});
12694 }
12695
12696 _babel_runtime_corejs2_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(ContextTree, [{
12697 key: "set",
12698 value: function set(path, value) {
12699 var parent = this.getParent(path, true);
12700
12701 if (!parent) {
12702 updateNode(this.root, value, null);
12703 return;
12704 }
12705
12706 var key = path[path.length - 1];
12707 var children = parent.children;
12708
12709 if (children[key]) {
12710 updateNode(children[key], value, parent);
12711 return;
12712 }
12713
12714 children[key] = createNode(value, parent);
12715 } // Get the "best" node (node or nearest parent) and return its value.
12716
12717 }, {
12718 key: "get",
12719 value: function get(path) {
12720 path = path || [];
12721
12722 if (path.length < 1) {
12723 return this.root.value;
12724 }
12725
12726 var branch = this.root;
12727 var child;
12728 var token;
12729
12730 for (var i = 0; i < path.length; i += 1) {
12731 token = path[i];
12732 child = branch.children;
12733
12734 if (!child[token]) {
12735 break;
12736 }
12737
12738 branch = child[token];
12739 }
12740
12741 return branch && branch.protoValue;
12742 }
12743 }, {
12744 key: "getParent",
12745 value: function getParent(path, ensureExists) {
12746 if (!path || path.length < 1) {
12747 return null;
12748 }
12749
12750 if (path.length < 2) {
12751 return this.root;
12752 }
12753
12754 return path.slice(0, -1).reduce(function (branch, token) {
12755 if (!branch) {
12756 return branch;
12757 }
12758
12759 var children = branch.children;
12760
12761 if (!children[token] && ensureExists) {
12762 children[token] = createNode(null, branch);
12763 }
12764
12765 return children[token];
12766 }, this.root);
12767 }
12768 }]);
12769
12770 return ContextTree;
12771}(); // =========================
12772// Utilities
12773// =========================
12774
12775
12776
12777
12778function createNode(value, parent) {
12779 return updateNode({
12780 children: {}
12781 }, value, parent);
12782}
12783
12784function updateNode(node, value, parent) {
12785 node.value = value || {};
12786 node.protoValue = parent ? _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_1___default()({}, parent.protoValue), node.value) : node.value;
12787
12788 _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(node.children).forEach(function (prop) {
12789 var child = node.children[prop];
12790 node.children[prop] = updateNode(child, child.value, node);
12791 });
12792
12793 return node;
12794}
12795
12796/***/ }),
12797/* 176 */
12798/***/ (function(module, __webpack_exports__, __webpack_require__) {
12799
12800"use strict";
12801__webpack_require__.r(__webpack_exports__);
12802/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return resolveSubtree; });
12803/* harmony import */ var _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
12804/* harmony import */ var _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0__);
12805/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
12806/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_1__);
12807/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
12808/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2__);
12809/* harmony import */ var _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45);
12810/* harmony import */ var _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3__);
12811/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31);
12812/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_4__);
12813/* harmony import */ var _resolver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61);
12814/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13);
12815
12816
12817
12818
12819// The subtree resolver is a higher-level interface that allows you to
12820// get the same result that you would from `Swagger.resolve`, but focuses on
12821// a subtree of your object.
12822//
12823// It makes several assumptions that allow you to think less about what resolve,
12824// specmap, and normalizeSwagger are doing: if this is not suitable for you,
12825// you can emulate `resolveSubtree`'s behavior by talking to the traditional
12826// resolver directly.
12827//
12828// By providing a top-level `obj` and a `path` to resolve within, the subtree
12829// at `path` will be resolved and normalized in the context of your top-level
12830// `obj`. You'll get the resolved subtree you're interest in as a return value
12831// (or, you can use `returnEntireTree` to get everything back).
12832//
12833// This is useful for cases where resolving your entire object is unnecessary
12834// and/or non-performant; we use this interface for lazily resolving operations
12835// and models in Swagger-UI, which allows us to handle larger definitions.
12836//
12837// It's likely that Swagger-Client will rely entirely on lazy resolving in
12838// future versions.
12839//
12840// TODO: move the remarks above into project documentation
12841
12842
12843
12844function resolveSubtree(_x, _x2) {
12845 return _resolveSubtree.apply(this, arguments);
12846}
12847
12848function _resolveSubtree() {
12849 _resolveSubtree = _babel_runtime_corejs2_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(obj, path) {
12850 var opts,
12851 returnEntireTree,
12852 baseDoc,
12853 requestInterceptor,
12854 responseInterceptor,
12855 parameterMacro,
12856 modelPropertyMacro,
12857 useCircularStructures,
12858 resolveOptions,
12859 _normalizeSwagger,
12860 normalized,
12861 result,
12862 _args = arguments;
12863
12864 return _babel_runtime_corejs2_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
12865 while (1) {
12866 switch (_context.prev = _context.next) {
12867 case 0:
12868 opts = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
12869 returnEntireTree = opts.returnEntireTree, baseDoc = opts.baseDoc, requestInterceptor = opts.requestInterceptor, responseInterceptor = opts.responseInterceptor, parameterMacro = opts.parameterMacro, modelPropertyMacro = opts.modelPropertyMacro, useCircularStructures = opts.useCircularStructures;
12870 resolveOptions = {
12871 pathDiscriminator: path,
12872 baseDoc: baseDoc,
12873 requestInterceptor: requestInterceptor,
12874 responseInterceptor: responseInterceptor,
12875 parameterMacro: parameterMacro,
12876 modelPropertyMacro: modelPropertyMacro,
12877 useCircularStructures: useCircularStructures
12878 };
12879 _normalizeSwagger = Object(_helpers__WEBPACK_IMPORTED_MODULE_6__["normalizeSwagger"])({
12880 spec: obj
12881 }), normalized = _normalizeSwagger.spec;
12882 _context.next = 6;
12883 return Object(_resolver__WEBPACK_IMPORTED_MODULE_5__["default"])(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2___default()(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_2___default()({}, resolveOptions), {}, {
12884 spec: normalized,
12885 allowMetaPatches: true,
12886 skipNormalization: true
12887 }));
12888
12889 case 6:
12890 result = _context.sent;
12891
12892 if (!returnEntireTree && _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_1___default()(path) && path.length) {
12893 result.spec = lodash_get__WEBPACK_IMPORTED_MODULE_4___default()(result.spec, path) || null;
12894 }
12895
12896 return _context.abrupt("return", result);
12897
12898 case 9:
12899 case "end":
12900 return _context.stop();
12901 }
12902 }
12903 }, _callee);
12904 }));
12905 return _resolveSubtree.apply(this, arguments);
12906}
12907
12908/***/ }),
12909/* 177 */
12910/***/ (function(module, __webpack_exports__, __webpack_require__) {
12911
12912"use strict";
12913__webpack_require__.r(__webpack_exports__);
12914/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "self", function() { return self; });
12915/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeExecute", function() { return makeExecute; });
12916/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeApisTagOperationsOperationExecute", function() { return makeApisTagOperationsOperationExecute; });
12917/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeApisTagOperation", function() { return makeApisTagOperation; });
12918/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTagOperations", function() { return mapTagOperations; });
12919/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
12920/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__);
12921/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
12922/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_1__);
12923/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46);
12924/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_2__);
12925/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
12926
12927
12928
12929
12930
12931var nullFn = function nullFn() {
12932 return null;
12933};
12934
12935var normalizeArray = function normalizeArray(arg) {
12936 return _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_1___default()(arg) ? arg : [arg];
12937}; // To allow stubbing of functions
12938
12939
12940var self = {
12941 mapTagOperations: mapTagOperations,
12942 makeExecute: makeExecute
12943}; // Make an execute, bound to arguments defined in mapTagOperation's callback (cb)
12944
12945function makeExecute() {
12946 var swaggerJs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12947 return function (_ref) {
12948 var pathName = _ref.pathName,
12949 method = _ref.method,
12950 operationId = _ref.operationId;
12951 return function (parameters) {
12952 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12953 return swaggerJs.execute(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()({
12954 spec: swaggerJs.spec
12955 }, lodash_pick__WEBPACK_IMPORTED_MODULE_2___default()(swaggerJs, 'requestInterceptor', 'responseInterceptor', 'userFetch')), {}, {
12956 pathName: pathName,
12957 method: method,
12958 parameters: parameters,
12959 operationId: operationId
12960 }, opts));
12961 };
12962 };
12963} // Creates an interface with tags+operations = execute
12964// The shape
12965// { apis: { [tag]: { operations: [operation]: { execute }}}}
12966// NOTE: this is mostly for compatibility
12967
12968function makeApisTagOperationsOperationExecute() {
12969 var swaggerJs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12970 // { apis: tag: operations: execute }
12971 var cb = self.makeExecute(swaggerJs);
12972 var tagOperations = self.mapTagOperations({
12973 v2OperationIdCompatibilityMode: swaggerJs.v2OperationIdCompatibilityMode,
12974 spec: swaggerJs.spec,
12975 cb: cb
12976 });
12977 var apis = {}; // eslint-disable-next-line no-restricted-syntax, guard-for-in
12978
12979 for (var tag in tagOperations) {
12980 apis[tag] = {
12981 operations: {}
12982 }; // eslint-disable-next-line no-restricted-syntax, guard-for-in
12983
12984 for (var op in tagOperations[tag]) {
12985 apis[tag].operations[op] = {
12986 execute: tagOperations[tag][op]
12987 };
12988 }
12989 }
12990
12991 return {
12992 apis: apis
12993 };
12994} // .apis[tag][operationId]:ExecuteFunction interface
12995
12996function makeApisTagOperation() {
12997 var swaggerJs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12998 var cb = self.makeExecute(swaggerJs);
12999 return {
13000 apis: self.mapTagOperations({
13001 v2OperationIdCompatibilityMode: swaggerJs.v2OperationIdCompatibilityMode,
13002 spec: swaggerJs.spec,
13003 cb: cb
13004 })
13005 };
13006}
13007/**
13008 * Iterates over a spec, creating a hash of {[tag]: { [operationId], ... }, ...}
13009 * with the value of calling `cb`.
13010 *
13011 * `spec` is a OAI v2.0 compliant specification object
13012 * `cb` is called with ({ spec, operation, path, method })
13013 * `defaultTag` will house all non-tagged operations
13014 *
13015 */
13016
13017function mapTagOperations(_ref2) {
13018 var spec = _ref2.spec,
13019 _ref2$cb = _ref2.cb,
13020 cb = _ref2$cb === void 0 ? nullFn : _ref2$cb,
13021 _ref2$defaultTag = _ref2.defaultTag,
13022 defaultTag = _ref2$defaultTag === void 0 ? 'default' : _ref2$defaultTag,
13023 v2OperationIdCompatibilityMode = _ref2.v2OperationIdCompatibilityMode;
13024 var operationIdCounter = {};
13025 var tagOperations = {}; // Will house all tags + operations
13026
13027 Object(_helpers__WEBPACK_IMPORTED_MODULE_3__["eachOperation"])(spec, function (_ref3) {
13028 var pathName = _ref3.pathName,
13029 method = _ref3.method,
13030 operation = _ref3.operation;
13031 var tags = operation.tags ? normalizeArray(operation.tags) : [defaultTag];
13032 tags.forEach(function (tag) {
13033 if (typeof tag !== 'string') {
13034 return;
13035 }
13036
13037 tagOperations[tag] = tagOperations[tag] || {};
13038 var tagObj = tagOperations[tag];
13039 var id = Object(_helpers__WEBPACK_IMPORTED_MODULE_3__["opId"])(operation, pathName, method, {
13040 v2OperationIdCompatibilityMode: v2OperationIdCompatibilityMode
13041 });
13042 var cbResult = cb({
13043 spec: spec,
13044 pathName: pathName,
13045 method: method,
13046 operation: operation,
13047 operationId: id
13048 });
13049
13050 if (operationIdCounter[id]) {
13051 operationIdCounter[id] += 1;
13052 tagObj["".concat(id).concat(operationIdCounter[id])] = cbResult;
13053 } else if (typeof tagObj[id] !== 'undefined') {
13054 // Bump counter ( for this operationId )
13055 var originalCounterValue = operationIdCounter[id] || 1;
13056 operationIdCounter[id] = originalCounterValue + 1; // Append _x to the operationId
13057
13058 tagObj["".concat(id).concat(operationIdCounter[id])] = cbResult; // Rename the first operationId
13059
13060 var temp = tagObj[id];
13061 delete tagObj[id];
13062 tagObj["".concat(id).concat(originalCounterValue)] = temp;
13063 } else {
13064 // Assign callback result ( usually a bound function )
13065 tagObj[id] = cbResult;
13066 }
13067 });
13068 });
13069 return tagOperations;
13070}
13071
13072/***/ }),
13073/* 178 */
13074/***/ (function(module, exports, __webpack_require__) {
13075
13076var _Object$getOwnPropertySymbols = __webpack_require__(124);
13077
13078var objectWithoutPropertiesLoose = __webpack_require__(359);
13079
13080function _objectWithoutProperties(source, excluded) {
13081 if (source == null) return {};
13082 var target = objectWithoutPropertiesLoose(source, excluded);
13083 var key, i;
13084
13085 if (_Object$getOwnPropertySymbols) {
13086 var sourceSymbolKeys = _Object$getOwnPropertySymbols(source);
13087
13088 for (i = 0; i < sourceSymbolKeys.length; i++) {
13089 key = sourceSymbolKeys[i];
13090 if (excluded.indexOf(key) >= 0) continue;
13091 if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
13092 target[key] = source[key];
13093 }
13094 }
13095
13096 return target;
13097}
13098
13099module.exports = _objectWithoutProperties;
13100
13101/***/ }),
13102/* 179 */
13103/***/ (function(module, exports, __webpack_require__) {
13104
13105var baseGetTag = __webpack_require__(130),
13106 getPrototype = __webpack_require__(158),
13107 isObjectLike = __webpack_require__(360);
13108
13109/** `Object#toString` result references. */
13110var objectTag = '[object Object]';
13111
13112/** Used for built-in method references. */
13113var funcProto = Function.prototype,
13114 objectProto = Object.prototype;
13115
13116/** Used to resolve the decompiled source of functions. */
13117var funcToString = funcProto.toString;
13118
13119/** Used to check objects for own properties. */
13120var hasOwnProperty = objectProto.hasOwnProperty;
13121
13122/** Used to infer the `Object` constructor. */
13123var objectCtorString = funcToString.call(Object);
13124
13125/**
13126 * Checks if `value` is a plain object, that is, an object created by the
13127 * `Object` constructor or one with a `[[Prototype]]` of `null`.
13128 *
13129 * @static
13130 * @memberOf _
13131 * @since 0.8.0
13132 * @category Lang
13133 * @param {*} value The value to check.
13134 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
13135 * @example
13136 *
13137 * function Foo() {
13138 * this.a = 1;
13139 * }
13140 *
13141 * _.isPlainObject(new Foo);
13142 * // => false
13143 *
13144 * _.isPlainObject([1, 2, 3]);
13145 * // => false
13146 *
13147 * _.isPlainObject({ 'x': 0, 'y': 0 });
13148 * // => true
13149 *
13150 * _.isPlainObject(Object.create(null));
13151 * // => true
13152 */
13153function isPlainObject(value) {
13154 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
13155 return false;
13156 }
13157 var proto = getPrototype(value);
13158 if (proto === null) {
13159 return true;
13160 }
13161 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
13162 return typeof Ctor == 'function' && Ctor instanceof Ctor &&
13163 funcToString.call(Ctor) == objectCtorString;
13164}
13165
13166module.exports = isPlainObject;
13167
13168
13169/***/ }),
13170/* 180 */
13171/***/ (function(module, exports, __webpack_require__) {
13172
13173"use strict";
13174/*!
13175 * cookie
13176 * Copyright(c) 2012-2014 Roman Shtylman
13177 * Copyright(c) 2015 Douglas Christopher Wilson
13178 * MIT Licensed
13179 */
13180
13181
13182
13183/**
13184 * Module exports.
13185 * @public
13186 */
13187
13188exports.parse = parse;
13189exports.serialize = serialize;
13190
13191/**
13192 * Module variables.
13193 * @private
13194 */
13195
13196var decode = decodeURIComponent;
13197var encode = encodeURIComponent;
13198var pairSplitRegExp = /; */;
13199
13200/**
13201 * RegExp to match field-content in RFC 7230 sec 3.2
13202 *
13203 * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
13204 * field-vchar = VCHAR / obs-text
13205 * obs-text = %x80-FF
13206 */
13207
13208var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
13209
13210/**
13211 * Parse a cookie header.
13212 *
13213 * Parse the given cookie header string into an object
13214 * The object has the various cookies as keys(names) => values
13215 *
13216 * @param {string} str
13217 * @param {object} [options]
13218 * @return {object}
13219 * @public
13220 */
13221
13222function parse(str, options) {
13223 if (typeof str !== 'string') {
13224 throw new TypeError('argument str must be a string');
13225 }
13226
13227 var obj = {}
13228 var opt = options || {};
13229 var pairs = str.split(pairSplitRegExp);
13230 var dec = opt.decode || decode;
13231
13232 for (var i = 0; i < pairs.length; i++) {
13233 var pair = pairs[i];
13234 var eq_idx = pair.indexOf('=');
13235
13236 // skip things that don't look like key=value
13237 if (eq_idx < 0) {
13238 continue;
13239 }
13240
13241 var key = pair.substr(0, eq_idx).trim()
13242 var val = pair.substr(++eq_idx, pair.length).trim();
13243
13244 // quoted values
13245 if ('"' == val[0]) {
13246 val = val.slice(1, -1);
13247 }
13248
13249 // only assign once
13250 if (undefined == obj[key]) {
13251 obj[key] = tryDecode(val, dec);
13252 }
13253 }
13254
13255 return obj;
13256}
13257
13258/**
13259 * Serialize data into a cookie header.
13260 *
13261 * Serialize the a name value pair into a cookie string suitable for
13262 * http headers. An optional options object specified cookie parameters.
13263 *
13264 * serialize('foo', 'bar', { httpOnly: true })
13265 * => "foo=bar; httpOnly"
13266 *
13267 * @param {string} name
13268 * @param {string} val
13269 * @param {object} [options]
13270 * @return {string}
13271 * @public
13272 */
13273
13274function serialize(name, val, options) {
13275 var opt = options || {};
13276 var enc = opt.encode || encode;
13277
13278 if (typeof enc !== 'function') {
13279 throw new TypeError('option encode is invalid');
13280 }
13281
13282 if (!fieldContentRegExp.test(name)) {
13283 throw new TypeError('argument name is invalid');
13284 }
13285
13286 var value = enc(val);
13287
13288 if (value && !fieldContentRegExp.test(value)) {
13289 throw new TypeError('argument val is invalid');
13290 }
13291
13292 var str = name + '=' + value;
13293
13294 if (null != opt.maxAge) {
13295 var maxAge = opt.maxAge - 0;
13296
13297 if (isNaN(maxAge) || !isFinite(maxAge)) {
13298 throw new TypeError('option maxAge is invalid')
13299 }
13300
13301 str += '; Max-Age=' + Math.floor(maxAge);
13302 }
13303
13304 if (opt.domain) {
13305 if (!fieldContentRegExp.test(opt.domain)) {
13306 throw new TypeError('option domain is invalid');
13307 }
13308
13309 str += '; Domain=' + opt.domain;
13310 }
13311
13312 if (opt.path) {
13313 if (!fieldContentRegExp.test(opt.path)) {
13314 throw new TypeError('option path is invalid');
13315 }
13316
13317 str += '; Path=' + opt.path;
13318 }
13319
13320 if (opt.expires) {
13321 if (typeof opt.expires.toUTCString !== 'function') {
13322 throw new TypeError('option expires is invalid');
13323 }
13324
13325 str += '; Expires=' + opt.expires.toUTCString();
13326 }
13327
13328 if (opt.httpOnly) {
13329 str += '; HttpOnly';
13330 }
13331
13332 if (opt.secure) {
13333 str += '; Secure';
13334 }
13335
13336 if (opt.sameSite) {
13337 var sameSite = typeof opt.sameSite === 'string'
13338 ? opt.sameSite.toLowerCase() : opt.sameSite;
13339
13340 switch (sameSite) {
13341 case true:
13342 str += '; SameSite=Strict';
13343 break;
13344 case 'lax':
13345 str += '; SameSite=Lax';
13346 break;
13347 case 'strict':
13348 str += '; SameSite=Strict';
13349 break;
13350 case 'none':
13351 str += '; SameSite=None';
13352 break;
13353 default:
13354 throw new TypeError('option sameSite is invalid');
13355 }
13356 }
13357
13358 return str;
13359}
13360
13361/**
13362 * Try decoding a string using a decoding function.
13363 *
13364 * @param {string} str
13365 * @param {function} decode
13366 * @private
13367 */
13368
13369function tryDecode(str, decode) {
13370 try {
13371 return decode(str);
13372 } catch (e) {
13373 return str;
13374 }
13375}
13376
13377
13378/***/ }),
13379/* 181 */
13380/***/ (function(module, __webpack_exports__, __webpack_require__) {
13381
13382"use strict";
13383__webpack_require__.r(__webpack_exports__);
13384// These functions will update the request.
13385// They'll be given {req, value, paramter, spec, operation}.
13386/* harmony default export */ __webpack_exports__["default"] = ({
13387 body: bodyBuilder,
13388 header: headerBuilder,
13389 query: queryBuilder,
13390 path: pathBuilder,
13391 formData: formDataBuilder
13392}); // Add the body to the request
13393
13394function bodyBuilder(_ref) {
13395 var req = _ref.req,
13396 value = _ref.value;
13397 req.body = value;
13398} // Add a form data object.
13399
13400
13401function formDataBuilder(_ref2) {
13402 var req = _ref2.req,
13403 value = _ref2.value,
13404 parameter = _ref2.parameter;
13405
13406 if (value || parameter.allowEmptyValue) {
13407 req.form = req.form || {};
13408 req.form[parameter.name] = {
13409 value: value,
13410 allowEmptyValue: parameter.allowEmptyValue,
13411 collectionFormat: parameter.collectionFormat
13412 };
13413 }
13414} // Add a header to the request
13415
13416
13417function headerBuilder(_ref3) {
13418 var req = _ref3.req,
13419 parameter = _ref3.parameter,
13420 value = _ref3.value;
13421 req.headers = req.headers || {};
13422
13423 if (typeof value !== 'undefined') {
13424 req.headers[parameter.name] = value;
13425 }
13426} // Replace path paramters, with values ( ie: the URL )
13427
13428
13429function pathBuilder(_ref4) {
13430 var req = _ref4.req,
13431 value = _ref4.value,
13432 parameter = _ref4.parameter;
13433 req.url = req.url.split("{".concat(parameter.name, "}")).join(encodeURIComponent(value));
13434} // Add a query to the `query` object, which will later be stringified into the URL's search
13435
13436
13437function queryBuilder(_ref5) {
13438 var req = _ref5.req,
13439 value = _ref5.value,
13440 parameter = _ref5.parameter;
13441 req.query = req.query || {};
13442
13443 if (value === false && parameter.type === 'boolean') {
13444 value = 'false';
13445 }
13446
13447 if (value === 0 && ['number', 'integer'].indexOf(parameter.type) > -1) {
13448 value = '0';
13449 }
13450
13451 if (value) {
13452 req.query[parameter.name] = {
13453 collectionFormat: parameter.collectionFormat,
13454 value: value
13455 };
13456 } else if (parameter.allowEmptyValue && value !== undefined) {
13457 var paramName = parameter.name;
13458 req.query[paramName] = req.query[paramName] || {};
13459 req.query[paramName].allowEmptyValue = true;
13460 }
13461}
13462
13463/***/ }),
13464/* 182 */
13465/***/ (function(module, __webpack_exports__, __webpack_require__) {
13466
13467"use strict";
13468__webpack_require__.r(__webpack_exports__);
13469/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "path", function() { return path; });
13470/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "query", function() { return query; });
13471/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "header", function() { return header; });
13472/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cookie", function() { return cookie; });
13473/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
13474/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_0__);
13475/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
13476/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);
13477/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
13478/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__);
13479/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46);
13480/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
13481/* harmony import */ var _style_serializer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(32);
13482/* harmony import */ var _content_serializer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(62);
13483
13484
13485
13486
13487
13488
13489function path(_ref) {
13490 var req = _ref.req,
13491 value = _ref.value,
13492 parameter = _ref.parameter;
13493 var name = parameter.name,
13494 style = parameter.style,
13495 explode = parameter.explode,
13496 content = parameter.content;
13497
13498 if (content) {
13499 var effectiveMediaType = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(content)[0];
13500
13501 req.url = req.url.split("{".concat(name, "}")).join(Object(_style_serializer__WEBPACK_IMPORTED_MODULE_4__["encodeDisallowedCharacters"])(Object(_content_serializer__WEBPACK_IMPORTED_MODULE_5__["default"])(value, effectiveMediaType), {
13502 escape: true
13503 }));
13504 return;
13505 }
13506
13507 var styledValue = Object(_style_serializer__WEBPACK_IMPORTED_MODULE_4__["default"])({
13508 key: parameter.name,
13509 value: value,
13510 style: style || 'simple',
13511 explode: explode || false,
13512 escape: true
13513 });
13514 req.url = req.url.split("{".concat(name, "}")).join(styledValue);
13515}
13516function query(_ref2) {
13517 var req = _ref2.req,
13518 value = _ref2.value,
13519 parameter = _ref2.parameter;
13520 req.query = req.query || {};
13521
13522 if (parameter.content) {
13523 var effectiveMediaType = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(parameter.content)[0];
13524
13525 req.query[parameter.name] = Object(_content_serializer__WEBPACK_IMPORTED_MODULE_5__["default"])(value, effectiveMediaType);
13526 return;
13527 }
13528
13529 if (value === false) {
13530 value = 'false';
13531 }
13532
13533 if (value === 0) {
13534 value = '0';
13535 }
13536
13537 if (value) {
13538 req.query[parameter.name] = {
13539 value: value,
13540 serializationOption: lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(parameter, ['style', 'explode', 'allowReserved'])
13541 };
13542 } else if (parameter.allowEmptyValue && value !== undefined) {
13543 var paramName = parameter.name;
13544 req.query[paramName] = req.query[paramName] || {};
13545 req.query[paramName].allowEmptyValue = true;
13546 }
13547}
13548var PARAMETER_HEADER_BLACKLIST = ['accept', 'authorization', 'content-type'];
13549function header(_ref3) {
13550 var req = _ref3.req,
13551 parameter = _ref3.parameter,
13552 value = _ref3.value;
13553 req.headers = req.headers || {};
13554
13555 if (PARAMETER_HEADER_BLACKLIST.indexOf(parameter.name.toLowerCase()) > -1) {
13556 return;
13557 }
13558
13559 if (parameter.content) {
13560 var effectiveMediaType = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(parameter.content)[0];
13561
13562 req.headers[parameter.name] = Object(_content_serializer__WEBPACK_IMPORTED_MODULE_5__["default"])(value, effectiveMediaType);
13563 return;
13564 }
13565
13566 if (typeof value !== 'undefined') {
13567 req.headers[parameter.name] = Object(_style_serializer__WEBPACK_IMPORTED_MODULE_4__["default"])({
13568 key: parameter.name,
13569 value: value,
13570 style: parameter.style || 'simple',
13571 explode: typeof parameter.explode === 'undefined' ? false : parameter.explode,
13572 escape: false
13573 });
13574 }
13575}
13576function cookie(_ref4) {
13577 var req = _ref4.req,
13578 parameter = _ref4.parameter,
13579 value = _ref4.value;
13580 req.headers = req.headers || {};
13581
13582 var type = _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(value);
13583
13584 if (parameter.content) {
13585 var effectiveMediaType = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(parameter.content)[0];
13586
13587 req.headers.Cookie = "".concat(parameter.name, "=").concat(Object(_content_serializer__WEBPACK_IMPORTED_MODULE_5__["default"])(value, effectiveMediaType));
13588 return;
13589 }
13590
13591 if (type !== 'undefined') {
13592 var prefix = type === 'object' && !_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_0___default()(value) && parameter.explode ? '' : "".concat(parameter.name, "=");
13593 req.headers.Cookie = prefix + Object(_style_serializer__WEBPACK_IMPORTED_MODULE_4__["default"])({
13594 key: parameter.name,
13595 value: value,
13596 escape: false,
13597 style: parameter.style || 'form',
13598 explode: typeof parameter.explode === 'undefined' ? false : parameter.explode
13599 });
13600 }
13601}
13602
13603/***/ }),
13604/* 183 */
13605/***/ (function(module, __webpack_exports__, __webpack_require__) {
13606
13607"use strict";
13608__webpack_require__.r(__webpack_exports__);
13609/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return buildRequest; });
13610/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applySecurities", function() { return applySecurities; });
13611/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
13612/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_0__);
13613/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
13614/* harmony import */ var _babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__);
13615/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
13616/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__);
13617/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36);
13618/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_3__);
13619/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31);
13620/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_4__);
13621/* harmony import */ var btoa__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(82);
13622/* harmony import */ var btoa__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(btoa__WEBPACK_IMPORTED_MODULE_5__);
13623
13624
13625
13626// This function runs after the common function,
13627// `src/execute/index.js#buildRequest`
13628
13629
13630
13631function buildRequest(options, req) {
13632 var operation = options.operation,
13633 requestBody = options.requestBody,
13634 securities = options.securities,
13635 spec = options.spec,
13636 attachContentTypeForEmptyPayload = options.attachContentTypeForEmptyPayload;
13637 var requestContentType = options.requestContentType;
13638 req = applySecurities({
13639 request: req,
13640 securities: securities,
13641 operation: operation,
13642 spec: spec
13643 });
13644 var requestBodyDef = operation.requestBody || {};
13645
13646 var requestBodyMediaTypes = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(requestBodyDef.content || {});
13647
13648 var isExplicitContentTypeValid = requestContentType && requestBodyMediaTypes.indexOf(requestContentType) > -1; // for OAS3: set the Content-Type
13649
13650 if (requestBody || attachContentTypeForEmptyPayload) {
13651 // does the passed requestContentType appear in the requestBody definition?
13652 if (requestContentType && isExplicitContentTypeValid) {
13653 req.headers['Content-Type'] = requestContentType;
13654 } else if (!requestContentType) {
13655 var firstMediaType = requestBodyMediaTypes[0];
13656
13657 if (firstMediaType) {
13658 req.headers['Content-Type'] = firstMediaType;
13659 requestContentType = firstMediaType;
13660 }
13661 }
13662 } else if (requestContentType && isExplicitContentTypeValid) {
13663 req.headers['Content-Type'] = requestContentType;
13664 } // for OAS3: add requestBody to request
13665
13666
13667 if (requestBody) {
13668 if (requestContentType) {
13669 if (requestBodyMediaTypes.indexOf(requestContentType) > -1) {
13670 // only attach body if the requestBody has a definition for the
13671 // contentType that has been explicitly set
13672 if (requestContentType === 'application/x-www-form-urlencoded' || requestContentType === 'multipart/form-data') {
13673 if (_babel_runtime_corejs2_helpers_typeof__WEBPACK_IMPORTED_MODULE_1___default()(requestBody) === 'object') {
13674 var encoding = (requestBodyDef.content[requestContentType] || {}).encoding || {};
13675 req.form = {};
13676
13677 _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(requestBody).forEach(function (k) {
13678 req.form[k] = {
13679 value: requestBody[k],
13680 encoding: encoding[k] || {}
13681 };
13682 });
13683 } else {
13684 req.form = requestBody;
13685 }
13686 } else {
13687 req.body = requestBody;
13688 }
13689 }
13690 } else {
13691 req.body = requestBody;
13692 }
13693 }
13694
13695 return req;
13696} // Add security values, to operations - that declare their need on them
13697// Adapted from the Swagger2 implementation
13698
13699function applySecurities(_ref) {
13700 var request = _ref.request,
13701 _ref$securities = _ref.securities,
13702 securities = _ref$securities === void 0 ? {} : _ref$securities,
13703 _ref$operation = _ref.operation,
13704 operation = _ref$operation === void 0 ? {} : _ref$operation,
13705 spec = _ref.spec;
13706 var result = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, request);
13707 var _securities$authorize = securities.authorized,
13708 authorized = _securities$authorize === void 0 ? {} : _securities$authorize;
13709 var security = operation.security || spec.security || [];
13710 var isAuthorized = authorized && !!_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(authorized).length;
13711 var securityDef = lodash_get__WEBPACK_IMPORTED_MODULE_4___default()(spec, ['components', 'securitySchemes']) || {};
13712 result.headers = result.headers || {};
13713 result.query = result.query || {};
13714
13715 if (!_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(securities).length || !isAuthorized || !security || _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_0___default()(operation.security) && !operation.security.length) {
13716 return request;
13717 }
13718
13719 security.forEach(function (securityObj) {
13720 _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(securityObj).forEach(function (key) {
13721 var auth = authorized[key];
13722 var schema = securityDef[key];
13723
13724 if (!auth) {
13725 return;
13726 }
13727
13728 var value = auth.value || auth;
13729 var type = schema.type;
13730
13731 if (auth) {
13732 if (type === 'apiKey') {
13733 if (schema.in === 'query') {
13734 result.query[schema.name] = value;
13735 }
13736
13737 if (schema.in === 'header') {
13738 result.headers[schema.name] = value;
13739 }
13740
13741 if (schema.in === 'cookie') {
13742 result.cookies[schema.name] = value;
13743 }
13744 } else if (type === 'http') {
13745 if (/^basic$/i.test(schema.scheme)) {
13746 var username = value.username || '';
13747 var password = value.password || '';
13748 var encoded = btoa__WEBPACK_IMPORTED_MODULE_5___default()("".concat(username, ":").concat(password));
13749 result.headers.Authorization = "Basic ".concat(encoded);
13750 }
13751
13752 if (/^bearer$/i.test(schema.scheme)) {
13753 result.headers.Authorization = "Bearer ".concat(value);
13754 }
13755 } else if (type === 'oauth2') {
13756 var token = auth.token || {};
13757 var tokenName = schema['x-tokenName'] || 'access_token';
13758 var tokenValue = token[tokenName];
13759 var tokenType = token.token_type;
13760
13761 if (!tokenType || tokenType.toLowerCase() === 'bearer') {
13762 tokenType = 'Bearer';
13763 }
13764
13765 result.headers.Authorization = "".concat(tokenType, " ").concat(tokenValue);
13766 }
13767 }
13768 });
13769 });
13770 return result;
13771}
13772
13773/***/ }),
13774/* 184 */
13775/***/ (function(module, __webpack_exports__, __webpack_require__) {
13776
13777"use strict";
13778__webpack_require__.r(__webpack_exports__);
13779/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return buildRequest; });
13780/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applySecurities", function() { return applySecurities; });
13781/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
13782/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0__);
13783/* harmony import */ var _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
13784/* harmony import */ var _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);
13785/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
13786/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2__);
13787/* harmony import */ var btoa__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82);
13788/* harmony import */ var btoa__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(btoa__WEBPACK_IMPORTED_MODULE_3__);
13789/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36);
13790/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_4__);
13791
13792
13793
13794
13795 // This function runs after the common function,
13796// `src/execute/index.js#buildRequest`
13797
13798function buildRequest(options, req) {
13799 var spec = options.spec,
13800 operation = options.operation,
13801 securities = options.securities,
13802 requestContentType = options.requestContentType,
13803 attachContentTypeForEmptyPayload = options.attachContentTypeForEmptyPayload; // Add securities, which are applicable
13804
13805 req = applySecurities({
13806 request: req,
13807 securities: securities,
13808 operation: operation,
13809 spec: spec
13810 });
13811
13812 if (req.body || req.form || attachContentTypeForEmptyPayload) {
13813 // all following conditionals are Swagger2 only
13814 if (requestContentType) {
13815 req.headers['Content-Type'] = requestContentType;
13816 } else if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(operation.consumes)) {
13817 var _operation$consumes = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(operation.consumes, 1);
13818
13819 req.headers['Content-Type'] = _operation$consumes[0];
13820 } else if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(spec.consumes)) {
13821 var _spec$consumes = _babel_runtime_corejs2_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(spec.consumes, 1);
13822
13823 req.headers['Content-Type'] = _spec$consumes[0];
13824 } else if (operation.parameters && operation.parameters.filter(function (p) {
13825 return p.type === 'file';
13826 }).length) {
13827 req.headers['Content-Type'] = 'multipart/form-data';
13828 } else if (operation.parameters && operation.parameters.filter(function (p) {
13829 return p.in === 'formData';
13830 }).length) {
13831 req.headers['Content-Type'] = 'application/x-www-form-urlencoded';
13832 }
13833 } else if (requestContentType) {
13834 var isBodyParamPresent = operation.parameters && operation.parameters.filter(function (p) {
13835 return p.in === 'body';
13836 }).length > 0;
13837 var isFormDataParamPresent = operation.parameters && operation.parameters.filter(function (p) {
13838 return p.in === 'formData';
13839 }).length > 0;
13840
13841 if (isBodyParamPresent || isFormDataParamPresent) {
13842 req.headers['Content-Type'] = requestContentType;
13843 }
13844 }
13845
13846 return req;
13847} // Add security values, to operations - that declare their need on them
13848
13849function applySecurities(_ref) {
13850 var request = _ref.request,
13851 _ref$securities = _ref.securities,
13852 securities = _ref$securities === void 0 ? {} : _ref$securities,
13853 _ref$operation = _ref.operation,
13854 operation = _ref$operation === void 0 ? {} : _ref$operation,
13855 spec = _ref.spec;
13856 var result = lodash_assign__WEBPACK_IMPORTED_MODULE_4___default()({}, request);
13857 var _securities$authorize = securities.authorized,
13858 authorized = _securities$authorize === void 0 ? {} : _securities$authorize,
13859 _securities$specSecur = securities.specSecurity,
13860 specSecurity = _securities$specSecur === void 0 ? [] : _securities$specSecur;
13861 var security = operation.security || specSecurity;
13862 var isAuthorized = authorized && !!_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(authorized).length;
13863 var securityDef = spec.securityDefinitions;
13864 result.headers = result.headers || {};
13865 result.query = result.query || {};
13866
13867 if (!_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(securities).length || !isAuthorized || !security || _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(operation.security) && !operation.security.length) {
13868 return request;
13869 }
13870
13871 security.forEach(function (securityObj) {
13872 _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(securityObj).forEach(function (key) {
13873 var auth = authorized[key];
13874
13875 if (!auth) {
13876 return;
13877 }
13878
13879 var token = auth.token;
13880 var value = auth.value || auth;
13881 var schema = securityDef[key];
13882 var type = schema.type;
13883 var tokenName = schema['x-tokenName'] || 'access_token';
13884 var oauthToken = token && token[tokenName];
13885 var tokenType = token && token.token_type;
13886
13887 if (auth) {
13888 if (type === 'apiKey') {
13889 var inType = schema.in === 'query' ? 'query' : 'headers';
13890 result[inType] = result[inType] || {};
13891 result[inType][schema.name] = value;
13892 } else if (type === 'basic') {
13893 if (value.header) {
13894 result.headers.authorization = value.header;
13895 } else {
13896 var username = value.username || '';
13897 var password = value.password || '';
13898 value.base64 = btoa__WEBPACK_IMPORTED_MODULE_3___default()("".concat(username, ":").concat(password));
13899 result.headers.authorization = "Basic ".concat(value.base64);
13900 }
13901 } else if (type === 'oauth2' && oauthToken) {
13902 tokenType = !tokenType || tokenType.toLowerCase() === 'bearer' ? 'Bearer' : tokenType;
13903 result.headers.authorization = "".concat(tokenType, " ").concat(oauthToken);
13904 }
13905 }
13906 });
13907 });
13908 return result;
13909}
13910
13911/***/ }),
13912/* 185 */
13913/***/ (function(module, exports, __webpack_require__) {
13914
13915module.exports = __webpack_require__(186);
13916
13917
13918/***/ }),
13919/* 186 */
13920/***/ (function(module, __webpack_exports__, __webpack_require__) {
13921
13922"use strict";
13923__webpack_require__.r(__webpack_exports__);
13924/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "helpers", function() { return helpers; });
13925/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
13926/* harmony import */ var _babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0__);
13927/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36);
13928/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_1__);
13929/* harmony import */ var lodash_startsWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60);
13930/* harmony import */ var lodash_startsWith__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_startsWith__WEBPACK_IMPORTED_MODULE_2__);
13931/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
13932/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_3__);
13933/* harmony import */ var _http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
13934/* harmony import */ var _resolver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(61);
13935/* harmony import */ var _subtree_resolver__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(176);
13936/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(177);
13937/* harmony import */ var _execute__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84);
13938/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(13);
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949Swagger.http = _http__WEBPACK_IMPORTED_MODULE_4__["default"];
13950Swagger.makeHttp = _http__WEBPACK_IMPORTED_MODULE_4__["makeHttp"].bind(null, Swagger.http);
13951Swagger.resolve = _resolver__WEBPACK_IMPORTED_MODULE_5__["default"];
13952Swagger.resolveSubtree = _subtree_resolver__WEBPACK_IMPORTED_MODULE_6__["default"];
13953Swagger.execute = _execute__WEBPACK_IMPORTED_MODULE_8__["execute"];
13954Swagger.serializeRes = _http__WEBPACK_IMPORTED_MODULE_4__["serializeRes"];
13955Swagger.serializeHeaders = _http__WEBPACK_IMPORTED_MODULE_4__["serializeHeaders"];
13956Swagger.clearCache = _resolver__WEBPACK_IMPORTED_MODULE_5__["clearCache"];
13957Swagger.makeApisTagOperation = _interfaces__WEBPACK_IMPORTED_MODULE_7__["makeApisTagOperation"];
13958Swagger.buildRequest = _execute__WEBPACK_IMPORTED_MODULE_8__["buildRequest"];
13959Swagger.helpers = {
13960 opId: _helpers__WEBPACK_IMPORTED_MODULE_9__["opId"]
13961};
13962Swagger.getBaseUrl = _execute__WEBPACK_IMPORTED_MODULE_8__["baseUrl"];
13963
13964function Swagger(url) {
13965 var _this = this;
13966
13967 var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13968
13969 // Allow url as a separate argument
13970 if (typeof url === 'string') {
13971 opts.url = url;
13972 } else {
13973 opts = url;
13974 }
13975
13976 if (!(this instanceof Swagger)) {
13977 return new Swagger(opts);
13978 }
13979
13980 lodash_assign__WEBPACK_IMPORTED_MODULE_1___default()(this, opts);
13981 var prom = this.resolve().then(function () {
13982 if (!_this.disableInterfaces) {
13983 lodash_assign__WEBPACK_IMPORTED_MODULE_1___default()(_this, Swagger.makeApisTagOperation(_this));
13984 }
13985
13986 return _this;
13987 }); // Expose this instance on the promise that gets returned
13988
13989 prom.client = this;
13990 return prom;
13991}
13992
13993Swagger.prototype = {
13994 http: _http__WEBPACK_IMPORTED_MODULE_4__["default"],
13995 execute: function execute(options) {
13996 this.applyDefaults();
13997 return Swagger.execute(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()({
13998 spec: this.spec,
13999 http: this.http,
14000 securities: {
14001 authorized: this.authorizations
14002 },
14003 contextUrl: typeof this.url === 'string' ? this.url : undefined,
14004 requestInterceptor: this.requestInterceptor || null,
14005 responseInterceptor: this.responseInterceptor || null
14006 }, options));
14007 },
14008 resolve: function resolve() {
14009 var _this2 = this;
14010
14011 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14012 return Swagger.resolve(_babel_runtime_corejs2_helpers_objectSpread2__WEBPACK_IMPORTED_MODULE_0___default()({
14013 spec: this.spec,
14014 url: this.url,
14015 http: this.http || this.fetch,
14016 allowMetaPatches: this.allowMetaPatches,
14017 useCircularStructures: this.useCircularStructures,
14018 requestInterceptor: this.requestInterceptor || null,
14019 responseInterceptor: this.responseInterceptor || null
14020 }, options)).then(function (obj) {
14021 _this2.originalSpec = _this2.spec;
14022 _this2.spec = obj.spec;
14023 _this2.errors = obj.errors;
14024 return _this2;
14025 });
14026 }
14027};
14028
14029Swagger.prototype.applyDefaults = function applyDefaults() {
14030 var spec = this.spec;
14031 var specUrl = this.url; // TODO: OAS3: support servers here
14032
14033 if (specUrl && lodash_startsWith__WEBPACK_IMPORTED_MODULE_2___default()(specUrl, 'http')) {
14034 var parsed = url__WEBPACK_IMPORTED_MODULE_3___default.a.parse(specUrl);
14035
14036 if (!spec.host) {
14037 spec.host = parsed.host;
14038 }
14039
14040 if (!spec.schemes) {
14041 spec.schemes = [parsed.protocol.replace(':', '')];
14042 }
14043
14044 if (!spec.basePath) {
14045 spec.basePath = '/';
14046 }
14047 }
14048}; // add backwards compatibility with older versions of swagger-ui
14049// Refs https://github.com/swagger-api/swagger-ui/issues/6210
14050
14051
14052var helpers = Swagger.helpers;
14053
14054/* harmony default export */ __webpack_exports__["default"] = (Swagger);
14055
14056/***/ }),
14057/* 187 */
14058/***/ (function(module, exports, __webpack_require__) {
14059
14060__webpack_require__(188);
14061var $Object = __webpack_require__(5).Object;
14062module.exports = function defineProperty(it, key, desc) {
14063 return $Object.defineProperty(it, key, desc);
14064};
14065
14066
14067/***/ }),
14068/* 188 */
14069/***/ (function(module, exports, __webpack_require__) {
14070
14071var $export = __webpack_require__(6);
14072// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
14073$export($export.S + $export.F * !__webpack_require__(16), 'Object', { defineProperty: __webpack_require__(19).f });
14074
14075
14076/***/ }),
14077/* 189 */
14078/***/ (function(module, exports, __webpack_require__) {
14079
14080module.exports = __webpack_require__(190);
14081
14082/***/ }),
14083/* 190 */
14084/***/ (function(module, exports, __webpack_require__) {
14085
14086__webpack_require__(191);
14087var $Object = __webpack_require__(5).Object;
14088module.exports = function defineProperties(T, D) {
14089 return $Object.defineProperties(T, D);
14090};
14091
14092
14093/***/ }),
14094/* 191 */
14095/***/ (function(module, exports, __webpack_require__) {
14096
14097var $export = __webpack_require__(6);
14098// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
14099$export($export.S + $export.F * !__webpack_require__(16), 'Object', { defineProperties: __webpack_require__(120) });
14100
14101
14102/***/ }),
14103/* 192 */
14104/***/ (function(module, exports, __webpack_require__) {
14105
14106// false -> Array#indexOf
14107// true -> Array#includes
14108var toIObject = __webpack_require__(24);
14109var toLength = __webpack_require__(63);
14110var toAbsoluteIndex = __webpack_require__(193);
14111module.exports = function (IS_INCLUDES) {
14112 return function ($this, el, fromIndex) {
14113 var O = toIObject($this);
14114 var length = toLength(O.length);
14115 var index = toAbsoluteIndex(fromIndex, length);
14116 var value;
14117 // Array#includes uses SameValueZero equality algorithm
14118 // eslint-disable-next-line no-self-compare
14119 if (IS_INCLUDES && el != el) while (length > index) {
14120 value = O[index++];
14121 // eslint-disable-next-line no-self-compare
14122 if (value != value) return true;
14123 // Array#indexOf ignores holes, Array#includes - not
14124 } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
14125 if (O[index] === el) return IS_INCLUDES || index || 0;
14126 } return !IS_INCLUDES && -1;
14127 };
14128};
14129
14130
14131/***/ }),
14132/* 193 */
14133/***/ (function(module, exports, __webpack_require__) {
14134
14135var toInteger = __webpack_require__(90);
14136var max = Math.max;
14137var min = Math.min;
14138module.exports = function (index, length) {
14139 index = toInteger(index);
14140 return index < 0 ? max(index + length, 0) : min(index, length);
14141};
14142
14143
14144/***/ }),
14145/* 194 */
14146/***/ (function(module, exports, __webpack_require__) {
14147
14148module.exports = __webpack_require__(195);
14149
14150/***/ }),
14151/* 195 */
14152/***/ (function(module, exports, __webpack_require__) {
14153
14154__webpack_require__(196);
14155module.exports = __webpack_require__(5).Object.getOwnPropertyDescriptors;
14156
14157
14158/***/ }),
14159/* 196 */
14160/***/ (function(module, exports, __webpack_require__) {
14161
14162// https://github.com/tc39/proposal-object-getownpropertydescriptors
14163var $export = __webpack_require__(6);
14164var ownKeys = __webpack_require__(197);
14165var toIObject = __webpack_require__(24);
14166var gOPD = __webpack_require__(52);
14167var createProperty = __webpack_require__(122);
14168
14169$export($export.S, 'Object', {
14170 getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
14171 var O = toIObject(object);
14172 var getDesc = gOPD.f;
14173 var keys = ownKeys(O);
14174 var result = {};
14175 var i = 0;
14176 var key, desc;
14177 while (keys.length > i) {
14178 desc = getDesc(O, key = keys[i++]);
14179 if (desc !== undefined) createProperty(result, key, desc);
14180 }
14181 return result;
14182 }
14183});
14184
14185
14186/***/ }),
14187/* 197 */
14188/***/ (function(module, exports, __webpack_require__) {
14189
14190// all object keys, includes non-enumerable and symbols
14191var gOPN = __webpack_require__(94);
14192var gOPS = __webpack_require__(65);
14193var anObject = __webpack_require__(12);
14194var Reflect = __webpack_require__(7).Reflect;
14195module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
14196 var keys = gOPN.f(anObject(it));
14197 var getSymbols = gOPS.f;
14198 return getSymbols ? keys.concat(getSymbols(it)) : keys;
14199};
14200
14201
14202/***/ }),
14203/* 198 */
14204/***/ (function(module, exports, __webpack_require__) {
14205
14206__webpack_require__(199);
14207var $Object = __webpack_require__(5).Object;
14208module.exports = function getOwnPropertyDescriptor(it, key) {
14209 return $Object.getOwnPropertyDescriptor(it, key);
14210};
14211
14212
14213/***/ }),
14214/* 199 */
14215/***/ (function(module, exports, __webpack_require__) {
14216
14217// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
14218var toIObject = __webpack_require__(24);
14219var $getOwnPropertyDescriptor = __webpack_require__(52).f;
14220
14221__webpack_require__(95)('getOwnPropertyDescriptor', function () {
14222 return function getOwnPropertyDescriptor(it, key) {
14223 return $getOwnPropertyDescriptor(toIObject(it), key);
14224 };
14225});
14226
14227
14228/***/ }),
14229/* 200 */
14230/***/ (function(module, exports, __webpack_require__) {
14231
14232__webpack_require__(125);
14233module.exports = __webpack_require__(5).Object.getOwnPropertySymbols;
14234
14235
14236/***/ }),
14237/* 201 */
14238/***/ (function(module, exports, __webpack_require__) {
14239
14240// all enumerable object keys, includes symbols
14241var getKeys = __webpack_require__(40);
14242var gOPS = __webpack_require__(65);
14243var pIE = __webpack_require__(53);
14244module.exports = function (it) {
14245 var result = getKeys(it);
14246 var getSymbols = gOPS.f;
14247 if (getSymbols) {
14248 var symbols = getSymbols(it);
14249 var isEnum = pIE.f;
14250 var i = 0;
14251 var key;
14252 while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
14253 } return result;
14254};
14255
14256
14257/***/ }),
14258/* 202 */
14259/***/ (function(module, exports, __webpack_require__) {
14260
14261// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
14262var toIObject = __webpack_require__(24);
14263var gOPN = __webpack_require__(94).f;
14264var toString = {}.toString;
14265
14266var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
14267 ? Object.getOwnPropertyNames(window) : [];
14268
14269var getWindowNames = function (it) {
14270 try {
14271 return gOPN(it);
14272 } catch (e) {
14273 return windowNames.slice();
14274 }
14275};
14276
14277module.exports.f = function getOwnPropertyNames(it) {
14278 return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
14279};
14280
14281
14282/***/ }),
14283/* 203 */
14284/***/ (function(module, exports, __webpack_require__) {
14285
14286__webpack_require__(204);
14287module.exports = __webpack_require__(5).Object.keys;
14288
14289
14290/***/ }),
14291/* 204 */
14292/***/ (function(module, exports, __webpack_require__) {
14293
14294// 19.1.2.14 Object.keys(O)
14295var toObject = __webpack_require__(34);
14296var $keys = __webpack_require__(40);
14297
14298__webpack_require__(95)('keys', function () {
14299 return function keys(it) {
14300 return $keys(toObject(it));
14301 };
14302});
14303
14304
14305/***/ }),
14306/* 205 */
14307/***/ (function(module, exports, __webpack_require__) {
14308
14309var getNative = __webpack_require__(206);
14310
14311var defineProperty = (function() {
14312 try {
14313 var func = getNative(Object, 'defineProperty');
14314 func({}, '', {});
14315 return func;
14316 } catch (e) {}
14317}());
14318
14319module.exports = defineProperty;
14320
14321
14322/***/ }),
14323/* 206 */
14324/***/ (function(module, exports) {
14325
14326/**
14327 * Gets the value at `key` of `object`.
14328 *
14329 * @private
14330 * @param {Object} [object] The object to query.
14331 * @param {string} key The key of the property to get.
14332 * @returns {*} Returns the property value.
14333 */
14334function getValue(object, key) {
14335 return object == null ? undefined : object[key];
14336}
14337
14338module.exports = getValue;
14339
14340
14341/***/ }),
14342/* 207 */
14343/***/ (function(module, exports, __webpack_require__) {
14344
14345var baseRest = __webpack_require__(208),
14346 isIterateeCall = __webpack_require__(213);
14347
14348/**
14349 * Creates a function like `_.assign`.
14350 *
14351 * @private
14352 * @param {Function} assigner The function to assign values.
14353 * @returns {Function} Returns the new assigner function.
14354 */
14355function createAssigner(assigner) {
14356 return baseRest(function(object, sources) {
14357 var index = -1,
14358 length = sources.length,
14359 customizer = length > 1 ? sources[length - 1] : undefined,
14360 guard = length > 2 ? sources[2] : undefined;
14361
14362 customizer = (assigner.length > 3 && typeof customizer == 'function')
14363 ? (length--, customizer)
14364 : undefined;
14365
14366 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
14367 customizer = length < 3 ? undefined : customizer;
14368 length = 1;
14369 }
14370 object = Object(object);
14371 while (++index < length) {
14372 var source = sources[index];
14373 if (source) {
14374 assigner(object, source, index, customizer);
14375 }
14376 }
14377 return object;
14378 });
14379}
14380
14381module.exports = createAssigner;
14382
14383
14384/***/ }),
14385/* 208 */
14386/***/ (function(module, exports, __webpack_require__) {
14387
14388var identity = __webpack_require__(209),
14389 overRest = __webpack_require__(210),
14390 setToString = __webpack_require__(212);
14391
14392/**
14393 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
14394 *
14395 * @private
14396 * @param {Function} func The function to apply a rest parameter to.
14397 * @param {number} [start=func.length-1] The start position of the rest parameter.
14398 * @returns {Function} Returns the new function.
14399 */
14400function baseRest(func, start) {
14401 return setToString(overRest(func, start, identity), func + '');
14402}
14403
14404module.exports = baseRest;
14405
14406
14407/***/ }),
14408/* 209 */
14409/***/ (function(module, exports) {
14410
14411/**
14412 * This method returns the first argument it receives.
14413 *
14414 * @static
14415 * @since 0.1.0
14416 * @memberOf _
14417 * @category Util
14418 * @param {*} value Any value.
14419 * @returns {*} Returns `value`.
14420 * @example
14421 *
14422 * var object = { 'a': 1 };
14423 *
14424 * console.log(_.identity(object) === object);
14425 * // => true
14426 */
14427function identity(value) {
14428 return value;
14429}
14430
14431module.exports = identity;
14432
14433
14434/***/ }),
14435/* 210 */
14436/***/ (function(module, exports, __webpack_require__) {
14437
14438var apply = __webpack_require__(211);
14439
14440/* Built-in method references for those with the same name as other `lodash` methods. */
14441var nativeMax = Math.max;
14442
14443/**
14444 * A specialized version of `baseRest` which transforms the rest array.
14445 *
14446 * @private
14447 * @param {Function} func The function to apply a rest parameter to.
14448 * @param {number} [start=func.length-1] The start position of the rest parameter.
14449 * @param {Function} transform The rest array transform.
14450 * @returns {Function} Returns the new function.
14451 */
14452function overRest(func, start, transform) {
14453 start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
14454 return function() {
14455 var args = arguments,
14456 index = -1,
14457 length = nativeMax(args.length - start, 0),
14458 array = Array(length);
14459
14460 while (++index < length) {
14461 array[index] = args[start + index];
14462 }
14463 index = -1;
14464 var otherArgs = Array(start + 1);
14465 while (++index < start) {
14466 otherArgs[index] = args[index];
14467 }
14468 otherArgs[start] = transform(array);
14469 return apply(func, this, otherArgs);
14470 };
14471}
14472
14473module.exports = overRest;
14474
14475
14476/***/ }),
14477/* 211 */
14478/***/ (function(module, exports) {
14479
14480/**
14481 * A faster alternative to `Function#apply`, this function invokes `func`
14482 * with the `this` binding of `thisArg` and the arguments of `args`.
14483 *
14484 * @private
14485 * @param {Function} func The function to invoke.
14486 * @param {*} thisArg The `this` binding of `func`.
14487 * @param {Array} args The arguments to invoke `func` with.
14488 * @returns {*} Returns the result of `func`.
14489 */
14490function apply(func, thisArg, args) {
14491 switch (args.length) {
14492 case 0: return func.call(thisArg);
14493 case 1: return func.call(thisArg, args[0]);
14494 case 2: return func.call(thisArg, args[0], args[1]);
14495 case 3: return func.call(thisArg, args[0], args[1], args[2]);
14496 }
14497 return func.apply(thisArg, args);
14498}
14499
14500module.exports = apply;
14501
14502
14503/***/ }),
14504/* 212 */
14505/***/ (function(module, exports) {
14506
14507/**
14508 * This method returns the first argument it receives.
14509 *
14510 * @static
14511 * @since 0.1.0
14512 * @memberOf _
14513 * @category Util
14514 * @param {*} value Any value.
14515 * @returns {*} Returns `value`.
14516 * @example
14517 *
14518 * var object = { 'a': 1 };
14519 *
14520 * console.log(_.identity(object) === object);
14521 * // => true
14522 */
14523function identity(value) {
14524 return value;
14525}
14526
14527module.exports = identity;
14528
14529
14530/***/ }),
14531/* 213 */
14532/***/ (function(module, exports) {
14533
14534/**
14535 * This method returns `false`.
14536 *
14537 * @static
14538 * @memberOf _
14539 * @since 4.13.0
14540 * @category Util
14541 * @returns {boolean} Returns `false`.
14542 * @example
14543 *
14544 * _.times(2, _.stubFalse);
14545 * // => [false, false]
14546 */
14547function stubFalse() {
14548 return false;
14549}
14550
14551module.exports = stubFalse;
14552
14553
14554/***/ }),
14555/* 214 */
14556/***/ (function(module, exports) {
14557
14558/**
14559 * The base implementation of `_.clamp` which doesn't coerce arguments.
14560 *
14561 * @private
14562 * @param {number} number The number to clamp.
14563 * @param {number} [lower] The lower bound.
14564 * @param {number} upper The upper bound.
14565 * @returns {number} Returns the clamped number.
14566 */
14567function baseClamp(number, lower, upper) {
14568 if (number === number) {
14569 if (upper !== undefined) {
14570 number = number <= upper ? number : upper;
14571 }
14572 if (lower !== undefined) {
14573 number = number >= lower ? number : lower;
14574 }
14575 }
14576 return number;
14577}
14578
14579module.exports = baseClamp;
14580
14581
14582/***/ }),
14583/* 215 */
14584/***/ (function(module, exports) {
14585
14586/**
14587 * This method returns the first argument it receives.
14588 *
14589 * @static
14590 * @since 0.1.0
14591 * @memberOf _
14592 * @category Util
14593 * @param {*} value Any value.
14594 * @returns {*} Returns `value`.
14595 * @example
14596 *
14597 * var object = { 'a': 1 };
14598 *
14599 * console.log(_.identity(object) === object);
14600 * // => true
14601 */
14602function identity(value) {
14603 return value;
14604}
14605
14606module.exports = identity;
14607
14608
14609/***/ }),
14610/* 216 */
14611/***/ (function(module, exports, __webpack_require__) {
14612
14613/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.3.2 by @mathias */
14614;(function(root) {
14615
14616 /** Detect free variables */
14617 var freeExports = true && exports &&
14618 !exports.nodeType && exports;
14619 var freeModule = true && module &&
14620 !module.nodeType && module;
14621 var freeGlobal = typeof global == 'object' && global;
14622 if (
14623 freeGlobal.global === freeGlobal ||
14624 freeGlobal.window === freeGlobal ||
14625 freeGlobal.self === freeGlobal
14626 ) {
14627 root = freeGlobal;
14628 }
14629
14630 /**
14631 * The `punycode` object.
14632 * @name punycode
14633 * @type Object
14634 */
14635 var punycode,
14636
14637 /** Highest positive signed 32-bit float value */
14638 maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
14639
14640 /** Bootstring parameters */
14641 base = 36,
14642 tMin = 1,
14643 tMax = 26,
14644 skew = 38,
14645 damp = 700,
14646 initialBias = 72,
14647 initialN = 128, // 0x80
14648 delimiter = '-', // '\x2D'
14649
14650 /** Regular expressions */
14651 regexPunycode = /^xn--/,
14652 regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
14653 regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
14654
14655 /** Error messages */
14656 errors = {
14657 'overflow': 'Overflow: input needs wider integers to process',
14658 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
14659 'invalid-input': 'Invalid input'
14660 },
14661
14662 /** Convenience shortcuts */
14663 baseMinusTMin = base - tMin,
14664 floor = Math.floor,
14665 stringFromCharCode = String.fromCharCode,
14666
14667 /** Temporary variable */
14668 key;
14669
14670 /*--------------------------------------------------------------------------*/
14671
14672 /**
14673 * A generic error utility function.
14674 * @private
14675 * @param {String} type The error type.
14676 * @returns {Error} Throws a `RangeError` with the applicable error message.
14677 */
14678 function error(type) {
14679 throw RangeError(errors[type]);
14680 }
14681
14682 /**
14683 * A generic `Array#map` utility function.
14684 * @private
14685 * @param {Array} array The array to iterate over.
14686 * @param {Function} callback The function that gets called for every array
14687 * item.
14688 * @returns {Array} A new array of values returned by the callback function.
14689 */
14690 function map(array, fn) {
14691 var length = array.length;
14692 var result = [];
14693 while (length--) {
14694 result[length] = fn(array[length]);
14695 }
14696 return result;
14697 }
14698
14699 /**
14700 * A simple `Array#map`-like wrapper to work with domain name strings or email
14701 * addresses.
14702 * @private
14703 * @param {String} domain The domain name or email address.
14704 * @param {Function} callback The function that gets called for every
14705 * character.
14706 * @returns {Array} A new string of characters returned by the callback
14707 * function.
14708 */
14709 function mapDomain(string, fn) {
14710 var parts = string.split('@');
14711 var result = '';
14712 if (parts.length > 1) {
14713 // In email addresses, only the domain name should be punycoded. Leave
14714 // the local part (i.e. everything up to `@`) intact.
14715 result = parts[0] + '@';
14716 string = parts[1];
14717 }
14718 // Avoid `split(regex)` for IE8 compatibility. See #17.
14719 string = string.replace(regexSeparators, '\x2E');
14720 var labels = string.split('.');
14721 var encoded = map(labels, fn).join('.');
14722 return result + encoded;
14723 }
14724
14725 /**
14726 * Creates an array containing the numeric code points of each Unicode
14727 * character in the string. While JavaScript uses UCS-2 internally,
14728 * this function will convert a pair of surrogate halves (each of which
14729 * UCS-2 exposes as separate characters) into a single code point,
14730 * matching UTF-16.
14731 * @see `punycode.ucs2.encode`
14732 * @see <https://mathiasbynens.be/notes/javascript-encoding>
14733 * @memberOf punycode.ucs2
14734 * @name decode
14735 * @param {String} string The Unicode input string (UCS-2).
14736 * @returns {Array} The new array of code points.
14737 */
14738 function ucs2decode(string) {
14739 var output = [],
14740 counter = 0,
14741 length = string.length,
14742 value,
14743 extra;
14744 while (counter < length) {
14745 value = string.charCodeAt(counter++);
14746 if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
14747 // high surrogate, and there is a next character
14748 extra = string.charCodeAt(counter++);
14749 if ((extra & 0xFC00) == 0xDC00) { // low surrogate
14750 output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
14751 } else {
14752 // unmatched surrogate; only append this code unit, in case the next
14753 // code unit is the high surrogate of a surrogate pair
14754 output.push(value);
14755 counter--;
14756 }
14757 } else {
14758 output.push(value);
14759 }
14760 }
14761 return output;
14762 }
14763
14764 /**
14765 * Creates a string based on an array of numeric code points.
14766 * @see `punycode.ucs2.decode`
14767 * @memberOf punycode.ucs2
14768 * @name encode
14769 * @param {Array} codePoints The array of numeric code points.
14770 * @returns {String} The new Unicode string (UCS-2).
14771 */
14772 function ucs2encode(array) {
14773 return map(array, function(value) {
14774 var output = '';
14775 if (value > 0xFFFF) {
14776 value -= 0x10000;
14777 output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
14778 value = 0xDC00 | value & 0x3FF;
14779 }
14780 output += stringFromCharCode(value);
14781 return output;
14782 }).join('');
14783 }
14784
14785 /**
14786 * Converts a basic code point into a digit/integer.
14787 * @see `digitToBasic()`
14788 * @private
14789 * @param {Number} codePoint The basic numeric code point value.
14790 * @returns {Number} The numeric value of a basic code point (for use in
14791 * representing integers) in the range `0` to `base - 1`, or `base` if
14792 * the code point does not represent a value.
14793 */
14794 function basicToDigit(codePoint) {
14795 if (codePoint - 48 < 10) {
14796 return codePoint - 22;
14797 }
14798 if (codePoint - 65 < 26) {
14799 return codePoint - 65;
14800 }
14801 if (codePoint - 97 < 26) {
14802 return codePoint - 97;
14803 }
14804 return base;
14805 }
14806
14807 /**
14808 * Converts a digit/integer into a basic code point.
14809 * @see `basicToDigit()`
14810 * @private
14811 * @param {Number} digit The numeric value of a basic code point.
14812 * @returns {Number} The basic code point whose value (when used for
14813 * representing integers) is `digit`, which needs to be in the range
14814 * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
14815 * used; else, the lowercase form is used. The behavior is undefined
14816 * if `flag` is non-zero and `digit` has no uppercase form.
14817 */
14818 function digitToBasic(digit, flag) {
14819 // 0..25 map to ASCII a..z or A..Z
14820 // 26..35 map to ASCII 0..9
14821 return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
14822 }
14823
14824 /**
14825 * Bias adaptation function as per section 3.4 of RFC 3492.
14826 * http://tools.ietf.org/html/rfc3492#section-3.4
14827 * @private
14828 */
14829 function adapt(delta, numPoints, firstTime) {
14830 var k = 0;
14831 delta = firstTime ? floor(delta / damp) : delta >> 1;
14832 delta += floor(delta / numPoints);
14833 for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
14834 delta = floor(delta / baseMinusTMin);
14835 }
14836 return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
14837 }
14838
14839 /**
14840 * Converts a Punycode string of ASCII-only symbols to a string of Unicode
14841 * symbols.
14842 * @memberOf punycode
14843 * @param {String} input The Punycode string of ASCII-only symbols.
14844 * @returns {String} The resulting string of Unicode symbols.
14845 */
14846 function decode(input) {
14847 // Don't use UCS-2
14848 var output = [],
14849 inputLength = input.length,
14850 out,
14851 i = 0,
14852 n = initialN,
14853 bias = initialBias,
14854 basic,
14855 j,
14856 index,
14857 oldi,
14858 w,
14859 k,
14860 digit,
14861 t,
14862 /** Cached calculation results */
14863 baseMinusT;
14864
14865 // Handle the basic code points: let `basic` be the number of input code
14866 // points before the last delimiter, or `0` if there is none, then copy
14867 // the first basic code points to the output.
14868
14869 basic = input.lastIndexOf(delimiter);
14870 if (basic < 0) {
14871 basic = 0;
14872 }
14873
14874 for (j = 0; j < basic; ++j) {
14875 // if it's not a basic code point
14876 if (input.charCodeAt(j) >= 0x80) {
14877 error('not-basic');
14878 }
14879 output.push(input.charCodeAt(j));
14880 }
14881
14882 // Main decoding loop: start just after the last delimiter if any basic code
14883 // points were copied; start at the beginning otherwise.
14884
14885 for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
14886
14887 // `index` is the index of the next character to be consumed.
14888 // Decode a generalized variable-length integer into `delta`,
14889 // which gets added to `i`. The overflow checking is easier
14890 // if we increase `i` as we go, then subtract off its starting
14891 // value at the end to obtain `delta`.
14892 for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
14893
14894 if (index >= inputLength) {
14895 error('invalid-input');
14896 }
14897
14898 digit = basicToDigit(input.charCodeAt(index++));
14899
14900 if (digit >= base || digit > floor((maxInt - i) / w)) {
14901 error('overflow');
14902 }
14903
14904 i += digit * w;
14905 t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
14906
14907 if (digit < t) {
14908 break;
14909 }
14910
14911 baseMinusT = base - t;
14912 if (w > floor(maxInt / baseMinusT)) {
14913 error('overflow');
14914 }
14915
14916 w *= baseMinusT;
14917
14918 }
14919
14920 out = output.length + 1;
14921 bias = adapt(i - oldi, out, oldi == 0);
14922
14923 // `i` was supposed to wrap around from `out` to `0`,
14924 // incrementing `n` each time, so we'll fix that now:
14925 if (floor(i / out) > maxInt - n) {
14926 error('overflow');
14927 }
14928
14929 n += floor(i / out);
14930 i %= out;
14931
14932 // Insert `n` at position `i` of the output
14933 output.splice(i++, 0, n);
14934
14935 }
14936
14937 return ucs2encode(output);
14938 }
14939
14940 /**
14941 * Converts a string of Unicode symbols (e.g. a domain name label) to a
14942 * Punycode string of ASCII-only symbols.
14943 * @memberOf punycode
14944 * @param {String} input The string of Unicode symbols.
14945 * @returns {String} The resulting Punycode string of ASCII-only symbols.
14946 */
14947 function encode(input) {
14948 var n,
14949 delta,
14950 handledCPCount,
14951 basicLength,
14952 bias,
14953 j,
14954 m,
14955 q,
14956 k,
14957 t,
14958 currentValue,
14959 output = [],
14960 /** `inputLength` will hold the number of code points in `input`. */
14961 inputLength,
14962 /** Cached calculation results */
14963 handledCPCountPlusOne,
14964 baseMinusT,
14965 qMinusT;
14966
14967 // Convert the input in UCS-2 to Unicode
14968 input = ucs2decode(input);
14969
14970 // Cache the length
14971 inputLength = input.length;
14972
14973 // Initialize the state
14974 n = initialN;
14975 delta = 0;
14976 bias = initialBias;
14977
14978 // Handle the basic code points
14979 for (j = 0; j < inputLength; ++j) {
14980 currentValue = input[j];
14981 if (currentValue < 0x80) {
14982 output.push(stringFromCharCode(currentValue));
14983 }
14984 }
14985
14986 handledCPCount = basicLength = output.length;
14987
14988 // `handledCPCount` is the number of code points that have been handled;
14989 // `basicLength` is the number of basic code points.
14990
14991 // Finish the basic string - if it is not empty - with a delimiter
14992 if (basicLength) {
14993 output.push(delimiter);
14994 }
14995
14996 // Main encoding loop:
14997 while (handledCPCount < inputLength) {
14998
14999 // All non-basic code points < n have been handled already. Find the next
15000 // larger one:
15001 for (m = maxInt, j = 0; j < inputLength; ++j) {
15002 currentValue = input[j];
15003 if (currentValue >= n && currentValue < m) {
15004 m = currentValue;
15005 }
15006 }
15007
15008 // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
15009 // but guard against overflow
15010 handledCPCountPlusOne = handledCPCount + 1;
15011 if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
15012 error('overflow');
15013 }
15014
15015 delta += (m - n) * handledCPCountPlusOne;
15016 n = m;
15017
15018 for (j = 0; j < inputLength; ++j) {
15019 currentValue = input[j];
15020
15021 if (currentValue < n && ++delta > maxInt) {
15022 error('overflow');
15023 }
15024
15025 if (currentValue == n) {
15026 // Represent delta as a generalized variable-length integer
15027 for (q = delta, k = base; /* no condition */; k += base) {
15028 t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
15029 if (q < t) {
15030 break;
15031 }
15032 qMinusT = q - t;
15033 baseMinusT = base - t;
15034 output.push(
15035 stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
15036 );
15037 q = floor(qMinusT / baseMinusT);
15038 }
15039
15040 output.push(stringFromCharCode(digitToBasic(q, 0)));
15041 bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
15042 delta = 0;
15043 ++handledCPCount;
15044 }
15045 }
15046
15047 ++delta;
15048 ++n;
15049
15050 }
15051 return output.join('');
15052 }
15053
15054 /**
15055 * Converts a Punycode string representing a domain name or an email address
15056 * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
15057 * it doesn't matter if you call it on a string that has already been
15058 * converted to Unicode.
15059 * @memberOf punycode
15060 * @param {String} input The Punycoded domain name or email address to
15061 * convert to Unicode.
15062 * @returns {String} The Unicode representation of the given Punycode
15063 * string.
15064 */
15065 function toUnicode(input) {
15066 return mapDomain(input, function(string) {
15067 return regexPunycode.test(string)
15068 ? decode(string.slice(4).toLowerCase())
15069 : string;
15070 });
15071 }
15072
15073 /**
15074 * Converts a Unicode string representing a domain name or an email address to
15075 * Punycode. Only the non-ASCII parts of the domain name will be converted,
15076 * i.e. it doesn't matter if you call it with a domain that's already in
15077 * ASCII.
15078 * @memberOf punycode
15079 * @param {String} input The domain name or email address to convert, as a
15080 * Unicode string.
15081 * @returns {String} The Punycode representation of the given domain name or
15082 * email address.
15083 */
15084 function toASCII(input) {
15085 return mapDomain(input, function(string) {
15086 return regexNonASCII.test(string)
15087 ? 'xn--' + encode(string)
15088 : string;
15089 });
15090 }
15091
15092 /*--------------------------------------------------------------------------*/
15093
15094 /** Define the public API */
15095 punycode = {
15096 /**
15097 * A string representing the current Punycode.js version number.
15098 * @memberOf punycode
15099 * @type String
15100 */
15101 'version': '1.3.2',
15102 /**
15103 * An object of methods to convert from JavaScript's internal character
15104 * representation (UCS-2) to Unicode code points, and back.
15105 * @see <https://mathiasbynens.be/notes/javascript-encoding>
15106 * @memberOf punycode
15107 * @type Object
15108 */
15109 'ucs2': {
15110 'decode': ucs2decode,
15111 'encode': ucs2encode
15112 },
15113 'decode': decode,
15114 'encode': encode,
15115 'toASCII': toASCII,
15116 'toUnicode': toUnicode
15117 };
15118
15119 /** Expose `punycode` */
15120 // Some AMD build optimizers, like r.js, check for specific condition patterns
15121 // like the following:
15122 if (
15123 true
15124 ) {
15125 !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
15126 return punycode;
15127 }).call(exports, __webpack_require__, exports, module),
15128 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
15129 } else {}
15130
15131}(this));
15132
15133/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(135)(module), __webpack_require__(101)))
15134
15135/***/ }),
15136/* 217 */
15137/***/ (function(module, exports, __webpack_require__) {
15138
15139"use strict";
15140
15141
15142module.exports = {
15143 isString: function(arg) {
15144 return typeof(arg) === 'string';
15145 },
15146 isObject: function(arg) {
15147 return typeof(arg) === 'object' && arg !== null;
15148 },
15149 isNull: function(arg) {
15150 return arg === null;
15151 },
15152 isNullOrUndefined: function(arg) {
15153 return arg == null;
15154 }
15155};
15156
15157
15158/***/ }),
15159/* 218 */
15160/***/ (function(module, exports, __webpack_require__) {
15161
15162"use strict";
15163
15164
15165exports.decode = exports.parse = __webpack_require__(219);
15166exports.encode = exports.stringify = __webpack_require__(220);
15167
15168
15169/***/ }),
15170/* 219 */
15171/***/ (function(module, exports, __webpack_require__) {
15172
15173"use strict";
15174// Copyright Joyent, Inc. and other Node contributors.
15175//
15176// Permission is hereby granted, free of charge, to any person obtaining a
15177// copy of this software and associated documentation files (the
15178// "Software"), to deal in the Software without restriction, including
15179// without limitation the rights to use, copy, modify, merge, publish,
15180// distribute, sublicense, and/or sell copies of the Software, and to permit
15181// persons to whom the Software is furnished to do so, subject to the
15182// following conditions:
15183//
15184// The above copyright notice and this permission notice shall be included
15185// in all copies or substantial portions of the Software.
15186//
15187// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15188// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15189// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
15190// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15191// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
15192// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
15193// USE OR OTHER DEALINGS IN THE SOFTWARE.
15194
15195
15196
15197// If obj.hasOwnProperty has been overridden, then calling
15198// obj.hasOwnProperty(prop) will break.
15199// See: https://github.com/joyent/node/issues/1707
15200function hasOwnProperty(obj, prop) {
15201 return Object.prototype.hasOwnProperty.call(obj, prop);
15202}
15203
15204module.exports = function(qs, sep, eq, options) {
15205 sep = sep || '&';
15206 eq = eq || '=';
15207 var obj = {};
15208
15209 if (typeof qs !== 'string' || qs.length === 0) {
15210 return obj;
15211 }
15212
15213 var regexp = /\+/g;
15214 qs = qs.split(sep);
15215
15216 var maxKeys = 1000;
15217 if (options && typeof options.maxKeys === 'number') {
15218 maxKeys = options.maxKeys;
15219 }
15220
15221 var len = qs.length;
15222 // maxKeys <= 0 means that we should not limit keys count
15223 if (maxKeys > 0 && len > maxKeys) {
15224 len = maxKeys;
15225 }
15226
15227 for (var i = 0; i < len; ++i) {
15228 var x = qs[i].replace(regexp, '%20'),
15229 idx = x.indexOf(eq),
15230 kstr, vstr, k, v;
15231
15232 if (idx >= 0) {
15233 kstr = x.substr(0, idx);
15234 vstr = x.substr(idx + 1);
15235 } else {
15236 kstr = x;
15237 vstr = '';
15238 }
15239
15240 k = decodeURIComponent(kstr);
15241 v = decodeURIComponent(vstr);
15242
15243 if (!hasOwnProperty(obj, k)) {
15244 obj[k] = v;
15245 } else if (isArray(obj[k])) {
15246 obj[k].push(v);
15247 } else {
15248 obj[k] = [obj[k], v];
15249 }
15250 }
15251
15252 return obj;
15253};
15254
15255var isArray = Array.isArray || function (xs) {
15256 return Object.prototype.toString.call(xs) === '[object Array]';
15257};
15258
15259
15260/***/ }),
15261/* 220 */
15262/***/ (function(module, exports, __webpack_require__) {
15263
15264"use strict";
15265// Copyright Joyent, Inc. and other Node contributors.
15266//
15267// Permission is hereby granted, free of charge, to any person obtaining a
15268// copy of this software and associated documentation files (the
15269// "Software"), to deal in the Software without restriction, including
15270// without limitation the rights to use, copy, modify, merge, publish,
15271// distribute, sublicense, and/or sell copies of the Software, and to permit
15272// persons to whom the Software is furnished to do so, subject to the
15273// following conditions:
15274//
15275// The above copyright notice and this permission notice shall be included
15276// in all copies or substantial portions of the Software.
15277//
15278// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15279// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15280// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
15281// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15282// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
15283// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
15284// USE OR OTHER DEALINGS IN THE SOFTWARE.
15285
15286
15287
15288var stringifyPrimitive = function(v) {
15289 switch (typeof v) {
15290 case 'string':
15291 return v;
15292
15293 case 'boolean':
15294 return v ? 'true' : 'false';
15295
15296 case 'number':
15297 return isFinite(v) ? v : '';
15298
15299 default:
15300 return '';
15301 }
15302};
15303
15304module.exports = function(obj, sep, eq, name) {
15305 sep = sep || '&';
15306 eq = eq || '=';
15307 if (obj === null) {
15308 obj = undefined;
15309 }
15310
15311 if (typeof obj === 'object') {
15312 return map(objectKeys(obj), function(k) {
15313 var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
15314 if (isArray(obj[k])) {
15315 return map(obj[k], function(v) {
15316 return ks + encodeURIComponent(stringifyPrimitive(v));
15317 }).join(sep);
15318 } else {
15319 return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
15320 }
15321 }).join(sep);
15322
15323 }
15324
15325 if (!name) return '';
15326 return encodeURIComponent(stringifyPrimitive(name)) + eq +
15327 encodeURIComponent(stringifyPrimitive(obj));
15328};
15329
15330var isArray = Array.isArray || function (xs) {
15331 return Object.prototype.toString.call(xs) === '[object Array]';
15332};
15333
15334function map (xs, f) {
15335 if (xs.map) return xs.map(f);
15336 var res = [];
15337 for (var i = 0; i < xs.length; i++) {
15338 res.push(f(xs[i], i));
15339 }
15340 return res;
15341}
15342
15343var objectKeys = Object.keys || function (obj) {
15344 var res = [];
15345 for (var key in obj) {
15346 if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
15347 }
15348 return res;
15349};
15350
15351
15352/***/ }),
15353/* 221 */
15354/***/ (function(module, exports, __webpack_require__) {
15355
15356/**
15357 * Copyright (c) 2014-present, Facebook, Inc.
15358 *
15359 * This source code is licensed under the MIT license found in the
15360 * LICENSE file in the root directory of this source tree.
15361 */
15362
15363var runtime = (function (exports) {
15364 "use strict";
15365
15366 var Op = Object.prototype;
15367 var hasOwn = Op.hasOwnProperty;
15368 var undefined; // More compressible than void 0.
15369 var $Symbol = typeof Symbol === "function" ? Symbol : {};
15370 var iteratorSymbol = $Symbol.iterator || "@@iterator";
15371 var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
15372 var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
15373
15374 function wrap(innerFn, outerFn, self, tryLocsList) {
15375 // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
15376 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
15377 var generator = Object.create(protoGenerator.prototype);
15378 var context = new Context(tryLocsList || []);
15379
15380 // The ._invoke method unifies the implementations of the .next,
15381 // .throw, and .return methods.
15382 generator._invoke = makeInvokeMethod(innerFn, self, context);
15383
15384 return generator;
15385 }
15386 exports.wrap = wrap;
15387
15388 // Try/catch helper to minimize deoptimizations. Returns a completion
15389 // record like context.tryEntries[i].completion. This interface could
15390 // have been (and was previously) designed to take a closure to be
15391 // invoked without arguments, but in all the cases we care about we
15392 // already have an existing method we want to call, so there's no need
15393 // to create a new function object. We can even get away with assuming
15394 // the method takes exactly one argument, since that happens to be true
15395 // in every case, so we don't have to touch the arguments object. The
15396 // only additional allocation required is the completion record, which
15397 // has a stable shape and so hopefully should be cheap to allocate.
15398 function tryCatch(fn, obj, arg) {
15399 try {
15400 return { type: "normal", arg: fn.call(obj, arg) };
15401 } catch (err) {
15402 return { type: "throw", arg: err };
15403 }
15404 }
15405
15406 var GenStateSuspendedStart = "suspendedStart";
15407 var GenStateSuspendedYield = "suspendedYield";
15408 var GenStateExecuting = "executing";
15409 var GenStateCompleted = "completed";
15410
15411 // Returning this object from the innerFn has the same effect as
15412 // breaking out of the dispatch switch statement.
15413 var ContinueSentinel = {};
15414
15415 // Dummy constructor functions that we use as the .constructor and
15416 // .constructor.prototype properties for functions that return Generator
15417 // objects. For full spec compliance, you may wish to configure your
15418 // minifier not to mangle the names of these two functions.
15419 function Generator() {}
15420 function GeneratorFunction() {}
15421 function GeneratorFunctionPrototype() {}
15422
15423 // This is a polyfill for %IteratorPrototype% for environments that
15424 // don't natively support it.
15425 var IteratorPrototype = {};
15426 IteratorPrototype[iteratorSymbol] = function () {
15427 return this;
15428 };
15429
15430 var getProto = Object.getPrototypeOf;
15431 var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
15432 if (NativeIteratorPrototype &&
15433 NativeIteratorPrototype !== Op &&
15434 hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
15435 // This environment has a native %IteratorPrototype%; use it instead
15436 // of the polyfill.
15437 IteratorPrototype = NativeIteratorPrototype;
15438 }
15439
15440 var Gp = GeneratorFunctionPrototype.prototype =
15441 Generator.prototype = Object.create(IteratorPrototype);
15442 GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
15443 GeneratorFunctionPrototype.constructor = GeneratorFunction;
15444 GeneratorFunctionPrototype[toStringTagSymbol] =
15445 GeneratorFunction.displayName = "GeneratorFunction";
15446
15447 // Helper for defining the .next, .throw, and .return methods of the
15448 // Iterator interface in terms of a single ._invoke method.
15449 function defineIteratorMethods(prototype) {
15450 ["next", "throw", "return"].forEach(function(method) {
15451 prototype[method] = function(arg) {
15452 return this._invoke(method, arg);
15453 };
15454 });
15455 }
15456
15457 exports.isGeneratorFunction = function(genFun) {
15458 var ctor = typeof genFun === "function" && genFun.constructor;
15459 return ctor
15460 ? ctor === GeneratorFunction ||
15461 // For the native GeneratorFunction constructor, the best we can
15462 // do is to check its .name property.
15463 (ctor.displayName || ctor.name) === "GeneratorFunction"
15464 : false;
15465 };
15466
15467 exports.mark = function(genFun) {
15468 if (Object.setPrototypeOf) {
15469 Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
15470 } else {
15471 genFun.__proto__ = GeneratorFunctionPrototype;
15472 if (!(toStringTagSymbol in genFun)) {
15473 genFun[toStringTagSymbol] = "GeneratorFunction";
15474 }
15475 }
15476 genFun.prototype = Object.create(Gp);
15477 return genFun;
15478 };
15479
15480 // Within the body of any async function, `await x` is transformed to
15481 // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
15482 // `hasOwn.call(value, "__await")` to determine if the yielded value is
15483 // meant to be awaited.
15484 exports.awrap = function(arg) {
15485 return { __await: arg };
15486 };
15487
15488 function AsyncIterator(generator, PromiseImpl) {
15489 function invoke(method, arg, resolve, reject) {
15490 var record = tryCatch(generator[method], generator, arg);
15491 if (record.type === "throw") {
15492 reject(record.arg);
15493 } else {
15494 var result = record.arg;
15495 var value = result.value;
15496 if (value &&
15497 typeof value === "object" &&
15498 hasOwn.call(value, "__await")) {
15499 return PromiseImpl.resolve(value.__await).then(function(value) {
15500 invoke("next", value, resolve, reject);
15501 }, function(err) {
15502 invoke("throw", err, resolve, reject);
15503 });
15504 }
15505
15506 return PromiseImpl.resolve(value).then(function(unwrapped) {
15507 // When a yielded Promise is resolved, its final value becomes
15508 // the .value of the Promise<{value,done}> result for the
15509 // current iteration.
15510 result.value = unwrapped;
15511 resolve(result);
15512 }, function(error) {
15513 // If a rejected Promise was yielded, throw the rejection back
15514 // into the async generator function so it can be handled there.
15515 return invoke("throw", error, resolve, reject);
15516 });
15517 }
15518 }
15519
15520 var previousPromise;
15521
15522 function enqueue(method, arg) {
15523 function callInvokeWithMethodAndArg() {
15524 return new PromiseImpl(function(resolve, reject) {
15525 invoke(method, arg, resolve, reject);
15526 });
15527 }
15528
15529 return previousPromise =
15530 // If enqueue has been called before, then we want to wait until
15531 // all previous Promises have been resolved before calling invoke,
15532 // so that results are always delivered in the correct order. If
15533 // enqueue has not been called before, then it is important to
15534 // call invoke immediately, without waiting on a callback to fire,
15535 // so that the async generator function has the opportunity to do
15536 // any necessary setup in a predictable way. This predictability
15537 // is why the Promise constructor synchronously invokes its
15538 // executor callback, and why async functions synchronously
15539 // execute code before the first await. Since we implement simple
15540 // async functions in terms of async generators, it is especially
15541 // important to get this right, even though it requires care.
15542 previousPromise ? previousPromise.then(
15543 callInvokeWithMethodAndArg,
15544 // Avoid propagating failures to Promises returned by later
15545 // invocations of the iterator.
15546 callInvokeWithMethodAndArg
15547 ) : callInvokeWithMethodAndArg();
15548 }
15549
15550 // Define the unified helper method that is used to implement .next,
15551 // .throw, and .return (see defineIteratorMethods).
15552 this._invoke = enqueue;
15553 }
15554
15555 defineIteratorMethods(AsyncIterator.prototype);
15556 AsyncIterator.prototype[asyncIteratorSymbol] = function () {
15557 return this;
15558 };
15559 exports.AsyncIterator = AsyncIterator;
15560
15561 // Note that simple async functions are implemented on top of
15562 // AsyncIterator objects; they just return a Promise for the value of
15563 // the final result produced by the iterator.
15564 exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
15565 if (PromiseImpl === void 0) PromiseImpl = Promise;
15566
15567 var iter = new AsyncIterator(
15568 wrap(innerFn, outerFn, self, tryLocsList),
15569 PromiseImpl
15570 );
15571
15572 return exports.isGeneratorFunction(outerFn)
15573 ? iter // If outerFn is a generator, return the full iterator.
15574 : iter.next().then(function(result) {
15575 return result.done ? result.value : iter.next();
15576 });
15577 };
15578
15579 function makeInvokeMethod(innerFn, self, context) {
15580 var state = GenStateSuspendedStart;
15581
15582 return function invoke(method, arg) {
15583 if (state === GenStateExecuting) {
15584 throw new Error("Generator is already running");
15585 }
15586
15587 if (state === GenStateCompleted) {
15588 if (method === "throw") {
15589 throw arg;
15590 }
15591
15592 // Be forgiving, per 25.3.3.3.3 of the spec:
15593 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
15594 return doneResult();
15595 }
15596
15597 context.method = method;
15598 context.arg = arg;
15599
15600 while (true) {
15601 var delegate = context.delegate;
15602 if (delegate) {
15603 var delegateResult = maybeInvokeDelegate(delegate, context);
15604 if (delegateResult) {
15605 if (delegateResult === ContinueSentinel) continue;
15606 return delegateResult;
15607 }
15608 }
15609
15610 if (context.method === "next") {
15611 // Setting context._sent for legacy support of Babel's
15612 // function.sent implementation.
15613 context.sent = context._sent = context.arg;
15614
15615 } else if (context.method === "throw") {
15616 if (state === GenStateSuspendedStart) {
15617 state = GenStateCompleted;
15618 throw context.arg;
15619 }
15620
15621 context.dispatchException(context.arg);
15622
15623 } else if (context.method === "return") {
15624 context.abrupt("return", context.arg);
15625 }
15626
15627 state = GenStateExecuting;
15628
15629 var record = tryCatch(innerFn, self, context);
15630 if (record.type === "normal") {
15631 // If an exception is thrown from innerFn, we leave state ===
15632 // GenStateExecuting and loop back for another invocation.
15633 state = context.done
15634 ? GenStateCompleted
15635 : GenStateSuspendedYield;
15636
15637 if (record.arg === ContinueSentinel) {
15638 continue;
15639 }
15640
15641 return {
15642 value: record.arg,
15643 done: context.done
15644 };
15645
15646 } else if (record.type === "throw") {
15647 state = GenStateCompleted;
15648 // Dispatch the exception by looping back around to the
15649 // context.dispatchException(context.arg) call above.
15650 context.method = "throw";
15651 context.arg = record.arg;
15652 }
15653 }
15654 };
15655 }
15656
15657 // Call delegate.iterator[context.method](context.arg) and handle the
15658 // result, either by returning a { value, done } result from the
15659 // delegate iterator, or by modifying context.method and context.arg,
15660 // setting context.delegate to null, and returning the ContinueSentinel.
15661 function maybeInvokeDelegate(delegate, context) {
15662 var method = delegate.iterator[context.method];
15663 if (method === undefined) {
15664 // A .throw or .return when the delegate iterator has no .throw
15665 // method always terminates the yield* loop.
15666 context.delegate = null;
15667
15668 if (context.method === "throw") {
15669 // Note: ["return"] must be used for ES3 parsing compatibility.
15670 if (delegate.iterator["return"]) {
15671 // If the delegate iterator has a return method, give it a
15672 // chance to clean up.
15673 context.method = "return";
15674 context.arg = undefined;
15675 maybeInvokeDelegate(delegate, context);
15676
15677 if (context.method === "throw") {
15678 // If maybeInvokeDelegate(context) changed context.method from
15679 // "return" to "throw", let that override the TypeError below.
15680 return ContinueSentinel;
15681 }
15682 }
15683
15684 context.method = "throw";
15685 context.arg = new TypeError(
15686 "The iterator does not provide a 'throw' method");
15687 }
15688
15689 return ContinueSentinel;
15690 }
15691
15692 var record = tryCatch(method, delegate.iterator, context.arg);
15693
15694 if (record.type === "throw") {
15695 context.method = "throw";
15696 context.arg = record.arg;
15697 context.delegate = null;
15698 return ContinueSentinel;
15699 }
15700
15701 var info = record.arg;
15702
15703 if (! info) {
15704 context.method = "throw";
15705 context.arg = new TypeError("iterator result is not an object");
15706 context.delegate = null;
15707 return ContinueSentinel;
15708 }
15709
15710 if (info.done) {
15711 // Assign the result of the finished delegate to the temporary
15712 // variable specified by delegate.resultName (see delegateYield).
15713 context[delegate.resultName] = info.value;
15714
15715 // Resume execution at the desired location (see delegateYield).
15716 context.next = delegate.nextLoc;
15717
15718 // If context.method was "throw" but the delegate handled the
15719 // exception, let the outer generator proceed normally. If
15720 // context.method was "next", forget context.arg since it has been
15721 // "consumed" by the delegate iterator. If context.method was
15722 // "return", allow the original .return call to continue in the
15723 // outer generator.
15724 if (context.method !== "return") {
15725 context.method = "next";
15726 context.arg = undefined;
15727 }
15728
15729 } else {
15730 // Re-yield the result returned by the delegate method.
15731 return info;
15732 }
15733
15734 // The delegate iterator is finished, so forget it and continue with
15735 // the outer generator.
15736 context.delegate = null;
15737 return ContinueSentinel;
15738 }
15739
15740 // Define Generator.prototype.{next,throw,return} in terms of the
15741 // unified ._invoke helper method.
15742 defineIteratorMethods(Gp);
15743
15744 Gp[toStringTagSymbol] = "Generator";
15745
15746 // A Generator should always return itself as the iterator object when the
15747 // @@iterator function is called on it. Some browsers' implementations of the
15748 // iterator prototype chain incorrectly implement this, causing the Generator
15749 // object to not be returned from this call. This ensures that doesn't happen.
15750 // See https://github.com/facebook/regenerator/issues/274 for more details.
15751 Gp[iteratorSymbol] = function() {
15752 return this;
15753 };
15754
15755 Gp.toString = function() {
15756 return "[object Generator]";
15757 };
15758
15759 function pushTryEntry(locs) {
15760 var entry = { tryLoc: locs[0] };
15761
15762 if (1 in locs) {
15763 entry.catchLoc = locs[1];
15764 }
15765
15766 if (2 in locs) {
15767 entry.finallyLoc = locs[2];
15768 entry.afterLoc = locs[3];
15769 }
15770
15771 this.tryEntries.push(entry);
15772 }
15773
15774 function resetTryEntry(entry) {
15775 var record = entry.completion || {};
15776 record.type = "normal";
15777 delete record.arg;
15778 entry.completion = record;
15779 }
15780
15781 function Context(tryLocsList) {
15782 // The root entry object (effectively a try statement without a catch
15783 // or a finally block) gives us a place to store values thrown from
15784 // locations where there is no enclosing try statement.
15785 this.tryEntries = [{ tryLoc: "root" }];
15786 tryLocsList.forEach(pushTryEntry, this);
15787 this.reset(true);
15788 }
15789
15790 exports.keys = function(object) {
15791 var keys = [];
15792 for (var key in object) {
15793 keys.push(key);
15794 }
15795 keys.reverse();
15796
15797 // Rather than returning an object with a next method, we keep
15798 // things simple and return the next function itself.
15799 return function next() {
15800 while (keys.length) {
15801 var key = keys.pop();
15802 if (key in object) {
15803 next.value = key;
15804 next.done = false;
15805 return next;
15806 }
15807 }
15808
15809 // To avoid creating an additional object, we just hang the .value
15810 // and .done properties off the next function object itself. This
15811 // also ensures that the minifier will not anonymize the function.
15812 next.done = true;
15813 return next;
15814 };
15815 };
15816
15817 function values(iterable) {
15818 if (iterable) {
15819 var iteratorMethod = iterable[iteratorSymbol];
15820 if (iteratorMethod) {
15821 return iteratorMethod.call(iterable);
15822 }
15823
15824 if (typeof iterable.next === "function") {
15825 return iterable;
15826 }
15827
15828 if (!isNaN(iterable.length)) {
15829 var i = -1, next = function next() {
15830 while (++i < iterable.length) {
15831 if (hasOwn.call(iterable, i)) {
15832 next.value = iterable[i];
15833 next.done = false;
15834 return next;
15835 }
15836 }
15837
15838 next.value = undefined;
15839 next.done = true;
15840
15841 return next;
15842 };
15843
15844 return next.next = next;
15845 }
15846 }
15847
15848 // Return an iterator with no values.
15849 return { next: doneResult };
15850 }
15851 exports.values = values;
15852
15853 function doneResult() {
15854 return { value: undefined, done: true };
15855 }
15856
15857 Context.prototype = {
15858 constructor: Context,
15859
15860 reset: function(skipTempReset) {
15861 this.prev = 0;
15862 this.next = 0;
15863 // Resetting context._sent for legacy support of Babel's
15864 // function.sent implementation.
15865 this.sent = this._sent = undefined;
15866 this.done = false;
15867 this.delegate = null;
15868
15869 this.method = "next";
15870 this.arg = undefined;
15871
15872 this.tryEntries.forEach(resetTryEntry);
15873
15874 if (!skipTempReset) {
15875 for (var name in this) {
15876 // Not sure about the optimal order of these conditions:
15877 if (name.charAt(0) === "t" &&
15878 hasOwn.call(this, name) &&
15879 !isNaN(+name.slice(1))) {
15880 this[name] = undefined;
15881 }
15882 }
15883 }
15884 },
15885
15886 stop: function() {
15887 this.done = true;
15888
15889 var rootEntry = this.tryEntries[0];
15890 var rootRecord = rootEntry.completion;
15891 if (rootRecord.type === "throw") {
15892 throw rootRecord.arg;
15893 }
15894
15895 return this.rval;
15896 },
15897
15898 dispatchException: function(exception) {
15899 if (this.done) {
15900 throw exception;
15901 }
15902
15903 var context = this;
15904 function handle(loc, caught) {
15905 record.type = "throw";
15906 record.arg = exception;
15907 context.next = loc;
15908
15909 if (caught) {
15910 // If the dispatched exception was caught by a catch block,
15911 // then let that catch block handle the exception normally.
15912 context.method = "next";
15913 context.arg = undefined;
15914 }
15915
15916 return !! caught;
15917 }
15918
15919 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
15920 var entry = this.tryEntries[i];
15921 var record = entry.completion;
15922
15923 if (entry.tryLoc === "root") {
15924 // Exception thrown outside of any try block that could handle
15925 // it, so set the completion value of the entire function to
15926 // throw the exception.
15927 return handle("end");
15928 }
15929
15930 if (entry.tryLoc <= this.prev) {
15931 var hasCatch = hasOwn.call(entry, "catchLoc");
15932 var hasFinally = hasOwn.call(entry, "finallyLoc");
15933
15934 if (hasCatch && hasFinally) {
15935 if (this.prev < entry.catchLoc) {
15936 return handle(entry.catchLoc, true);
15937 } else if (this.prev < entry.finallyLoc) {
15938 return handle(entry.finallyLoc);
15939 }
15940
15941 } else if (hasCatch) {
15942 if (this.prev < entry.catchLoc) {
15943 return handle(entry.catchLoc, true);
15944 }
15945
15946 } else if (hasFinally) {
15947 if (this.prev < entry.finallyLoc) {
15948 return handle(entry.finallyLoc);
15949 }
15950
15951 } else {
15952 throw new Error("try statement without catch or finally");
15953 }
15954 }
15955 }
15956 },
15957
15958 abrupt: function(type, arg) {
15959 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
15960 var entry = this.tryEntries[i];
15961 if (entry.tryLoc <= this.prev &&
15962 hasOwn.call(entry, "finallyLoc") &&
15963 this.prev < entry.finallyLoc) {
15964 var finallyEntry = entry;
15965 break;
15966 }
15967 }
15968
15969 if (finallyEntry &&
15970 (type === "break" ||
15971 type === "continue") &&
15972 finallyEntry.tryLoc <= arg &&
15973 arg <= finallyEntry.finallyLoc) {
15974 // Ignore the finally entry if control is not jumping to a
15975 // location outside the try/catch block.
15976 finallyEntry = null;
15977 }
15978
15979 var record = finallyEntry ? finallyEntry.completion : {};
15980 record.type = type;
15981 record.arg = arg;
15982
15983 if (finallyEntry) {
15984 this.method = "next";
15985 this.next = finallyEntry.finallyLoc;
15986 return ContinueSentinel;
15987 }
15988
15989 return this.complete(record);
15990 },
15991
15992 complete: function(record, afterLoc) {
15993 if (record.type === "throw") {
15994 throw record.arg;
15995 }
15996
15997 if (record.type === "break" ||
15998 record.type === "continue") {
15999 this.next = record.arg;
16000 } else if (record.type === "return") {
16001 this.rval = this.arg = record.arg;
16002 this.method = "return";
16003 this.next = "end";
16004 } else if (record.type === "normal" && afterLoc) {
16005 this.next = afterLoc;
16006 }
16007
16008 return ContinueSentinel;
16009 },
16010
16011 finish: function(finallyLoc) {
16012 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
16013 var entry = this.tryEntries[i];
16014 if (entry.finallyLoc === finallyLoc) {
16015 this.complete(entry.completion, entry.afterLoc);
16016 resetTryEntry(entry);
16017 return ContinueSentinel;
16018 }
16019 }
16020 },
16021
16022 "catch": function(tryLoc) {
16023 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
16024 var entry = this.tryEntries[i];
16025 if (entry.tryLoc === tryLoc) {
16026 var record = entry.completion;
16027 if (record.type === "throw") {
16028 var thrown = record.arg;
16029 resetTryEntry(entry);
16030 }
16031 return thrown;
16032 }
16033 }
16034
16035 // The context.catch method must only be called with a location
16036 // argument that corresponds to a known catch block.
16037 throw new Error("illegal catch attempt");
16038 },
16039
16040 delegateYield: function(iterable, resultName, nextLoc) {
16041 this.delegate = {
16042 iterator: values(iterable),
16043 resultName: resultName,
16044 nextLoc: nextLoc
16045 };
16046
16047 if (this.method === "next") {
16048 // Deliberately forget the last sent value so that we don't
16049 // accidentally pass it on to the delegate.
16050 this.arg = undefined;
16051 }
16052
16053 return ContinueSentinel;
16054 }
16055 };
16056
16057 // Regardless of whether this script is executing as a CommonJS module
16058 // or not, return the runtime object so that we can declare the variable
16059 // regeneratorRuntime in the outer scope, which allows this module to be
16060 // injected easily by `bin/regenerator --include-runtime script.js`.
16061 return exports;
16062
16063}(
16064 // If this script is executing as a CommonJS module, use module.exports
16065 // as the regeneratorRuntime namespace. Otherwise create a new empty
16066 // object. Either way, the resulting object will be used to initialize
16067 // the regeneratorRuntime variable at the top of this file.
16068 true ? module.exports : undefined
16069));
16070
16071try {
16072 regeneratorRuntime = runtime;
16073} catch (accidentalStrictMode) {
16074 // This module should not be running in strict mode, so the above
16075 // assignment should always work unless something is misconfigured. Just
16076 // in case runtime.js accidentally runs in strict mode, we can escape
16077 // strict mode using a global Function call. This could conceivably fail
16078 // if a Content Security Policy forbids using Function, but in that case
16079 // the proper solution is to fix the accidental strict mode problem. If
16080 // you've misconfigured your bundler to force strict mode and applied a
16081 // CSP to forbid Function, and you're not willing to fix either of those
16082 // problems, please detail your unique predicament in a GitHub issue.
16083 Function("r", "regeneratorRuntime = r")(runtime);
16084}
16085
16086
16087/***/ }),
16088/* 222 */
16089/***/ (function(module, exports, __webpack_require__) {
16090
16091__webpack_require__(56);
16092__webpack_require__(57);
16093module.exports = __webpack_require__(228);
16094
16095
16096/***/ }),
16097/* 223 */
16098/***/ (function(module, exports, __webpack_require__) {
16099
16100"use strict";
16101
16102var addToUnscopables = __webpack_require__(224);
16103var step = __webpack_require__(225);
16104var Iterators = __webpack_require__(41);
16105var toIObject = __webpack_require__(24);
16106
16107// 22.1.3.4 Array.prototype.entries()
16108// 22.1.3.13 Array.prototype.keys()
16109// 22.1.3.29 Array.prototype.values()
16110// 22.1.3.30 Array.prototype[@@iterator]()
16111module.exports = __webpack_require__(137)(Array, 'Array', function (iterated, kind) {
16112 this._t = toIObject(iterated); // target
16113 this._i = 0; // next index
16114 this._k = kind; // kind
16115// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
16116}, function () {
16117 var O = this._t;
16118 var kind = this._k;
16119 var index = this._i++;
16120 if (!O || index >= O.length) {
16121 this._t = undefined;
16122 return step(1);
16123 }
16124 if (kind == 'keys') return step(0, index);
16125 if (kind == 'values') return step(0, O[index]);
16126 return step(0, [index, O[index]]);
16127}, 'values');
16128
16129// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
16130Iterators.Arguments = Iterators.Array;
16131
16132addToUnscopables('keys');
16133addToUnscopables('values');
16134addToUnscopables('entries');
16135
16136
16137/***/ }),
16138/* 224 */
16139/***/ (function(module, exports) {
16140
16141module.exports = function () { /* empty */ };
16142
16143
16144/***/ }),
16145/* 225 */
16146/***/ (function(module, exports) {
16147
16148module.exports = function (done, value) {
16149 return { value: value, done: !!done };
16150};
16151
16152
16153/***/ }),
16154/* 226 */
16155/***/ (function(module, exports, __webpack_require__) {
16156
16157"use strict";
16158
16159var create = __webpack_require__(67);
16160var descriptor = __webpack_require__(49);
16161var setToStringTag = __webpack_require__(54);
16162var IteratorPrototype = {};
16163
16164// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
16165__webpack_require__(27)(IteratorPrototype, __webpack_require__(11)('iterator'), function () { return this; });
16166
16167module.exports = function (Constructor, NAME, next) {
16168 Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
16169 setToStringTag(Constructor, NAME + ' Iterator');
16170};
16171
16172
16173/***/ }),
16174/* 227 */
16175/***/ (function(module, exports, __webpack_require__) {
16176
16177var toInteger = __webpack_require__(90);
16178var defined = __webpack_require__(89);
16179// true -> String#at
16180// false -> String#codePointAt
16181module.exports = function (TO_STRING) {
16182 return function (that, pos) {
16183 var s = String(defined(that));
16184 var i = toInteger(pos);
16185 var l = s.length;
16186 var a, b;
16187 if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
16188 a = s.charCodeAt(i);
16189 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
16190 ? TO_STRING ? s.charAt(i) : a
16191 : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
16192 };
16193};
16194
16195
16196/***/ }),
16197/* 228 */
16198/***/ (function(module, exports, __webpack_require__) {
16199
16200var anObject = __webpack_require__(12);
16201var get = __webpack_require__(103);
16202module.exports = __webpack_require__(5).getIterator = function (it) {
16203 var iterFn = get(it);
16204 if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
16205 return anObject(iterFn.call(it));
16206};
16207
16208
16209/***/ }),
16210/* 229 */
16211/***/ (function(module, exports, __webpack_require__) {
16212
16213__webpack_require__(230);
16214module.exports = __webpack_require__(5).Array.isArray;
16215
16216
16217/***/ }),
16218/* 230 */
16219/***/ (function(module, exports, __webpack_require__) {
16220
16221// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
16222var $export = __webpack_require__(6);
16223
16224$export($export.S, 'Array', { isArray: __webpack_require__(99) });
16225
16226
16227/***/ }),
16228/* 231 */
16229/***/ (function(module, exports, __webpack_require__) {
16230
16231__webpack_require__(57);
16232__webpack_require__(56);
16233module.exports = __webpack_require__(97).f('iterator');
16234
16235
16236/***/ }),
16237/* 232 */
16238/***/ (function(module, exports, __webpack_require__) {
16239
16240__webpack_require__(125);
16241__webpack_require__(105);
16242__webpack_require__(233);
16243__webpack_require__(234);
16244module.exports = __webpack_require__(5).Symbol;
16245
16246
16247/***/ }),
16248/* 233 */
16249/***/ (function(module, exports, __webpack_require__) {
16250
16251__webpack_require__(98)('asyncIterator');
16252
16253
16254/***/ }),
16255/* 234 */
16256/***/ (function(module, exports, __webpack_require__) {
16257
16258__webpack_require__(98)('observable');
16259
16260
16261/***/ }),
16262/* 235 */
16263/***/ (function(module, exports, __webpack_require__) {
16264
16265__webpack_require__(57);
16266__webpack_require__(236);
16267module.exports = __webpack_require__(5).Array.from;
16268
16269
16270/***/ }),
16271/* 236 */
16272/***/ (function(module, exports, __webpack_require__) {
16273
16274"use strict";
16275
16276var ctx = __webpack_require__(26);
16277var $export = __webpack_require__(6);
16278var toObject = __webpack_require__(34);
16279var call = __webpack_require__(139);
16280var isArrayIter = __webpack_require__(140);
16281var toLength = __webpack_require__(63);
16282var createProperty = __webpack_require__(122);
16283var getIterFn = __webpack_require__(103);
16284
16285$export($export.S + $export.F * !__webpack_require__(141)(function (iter) { Array.from(iter); }), 'Array', {
16286 // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
16287 from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
16288 var O = toObject(arrayLike);
16289 var C = typeof this == 'function' ? this : Array;
16290 var aLen = arguments.length;
16291 var mapfn = aLen > 1 ? arguments[1] : undefined;
16292 var mapping = mapfn !== undefined;
16293 var index = 0;
16294 var iterFn = getIterFn(O);
16295 var length, result, step, iterator;
16296 if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
16297 // if object isn't iterable or it's array with default iterator - use simple case
16298 if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
16299 for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
16300 createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
16301 }
16302 } else {
16303 length = toLength(O.length);
16304 for (result = new C(length); length > index; index++) {
16305 createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
16306 }
16307 }
16308 result.length = index;
16309 return result;
16310 }
16311});
16312
16313
16314/***/ }),
16315/* 237 */
16316/***/ (function(module, exports, __webpack_require__) {
16317
16318__webpack_require__(238);
16319module.exports = __webpack_require__(5).Object.entries;
16320
16321
16322/***/ }),
16323/* 238 */
16324/***/ (function(module, exports, __webpack_require__) {
16325
16326// https://github.com/tc39/proposal-object-values-entries
16327var $export = __webpack_require__(6);
16328var $entries = __webpack_require__(239)(true);
16329
16330$export($export.S, 'Object', {
16331 entries: function entries(it) {
16332 return $entries(it);
16333 }
16334});
16335
16336
16337/***/ }),
16338/* 239 */
16339/***/ (function(module, exports, __webpack_require__) {
16340
16341var DESCRIPTORS = __webpack_require__(16);
16342var getKeys = __webpack_require__(40);
16343var toIObject = __webpack_require__(24);
16344var isEnum = __webpack_require__(53).f;
16345module.exports = function (isEntries) {
16346 return function (it) {
16347 var O = toIObject(it);
16348 var keys = getKeys(O);
16349 var length = keys.length;
16350 var i = 0;
16351 var result = [];
16352 var key;
16353 while (length > i) {
16354 key = keys[i++];
16355 if (!DESCRIPTORS || isEnum.call(O, key)) {
16356 result.push(isEntries ? [key, O[key]] : O[key]);
16357 }
16358 }
16359 return result;
16360 };
16361};
16362
16363
16364/***/ }),
16365/* 240 */
16366/***/ (function(module, exports, __webpack_require__) {
16367
16368var core = __webpack_require__(5);
16369var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });
16370module.exports = function stringify(it) { // eslint-disable-line no-unused-vars
16371 return $JSON.stringify.apply($JSON, arguments);
16372};
16373
16374
16375/***/ }),
16376/* 241 */
16377/***/ (function(module, exports, __webpack_require__) {
16378
16379var _Array$isArray = __webpack_require__(0);
16380
16381function _arrayWithHoles(arr) {
16382 if (_Array$isArray(arr)) return arr;
16383}
16384
16385module.exports = _arrayWithHoles;
16386
16387/***/ }),
16388/* 242 */
16389/***/ (function(module, exports, __webpack_require__) {
16390
16391var _getIterator = __webpack_require__(136);
16392
16393var _isIterable = __webpack_require__(143);
16394
16395var _Symbol = __webpack_require__(70);
16396
16397function _iterableToArrayLimit(arr, i) {
16398 if (typeof _Symbol === "undefined" || !_isIterable(Object(arr))) return;
16399 var _arr = [];
16400 var _n = true;
16401 var _d = false;
16402 var _e = undefined;
16403
16404 try {
16405 for (var _i = _getIterator(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
16406 _arr.push(_s.value);
16407
16408 if (i && _arr.length === i) break;
16409 }
16410 } catch (err) {
16411 _d = true;
16412 _e = err;
16413 } finally {
16414 try {
16415 if (!_n && _i["return"] != null) _i["return"]();
16416 } finally {
16417 if (_d) throw _e;
16418 }
16419 }
16420
16421 return _arr;
16422}
16423
16424module.exports = _iterableToArrayLimit;
16425
16426/***/ }),
16427/* 243 */
16428/***/ (function(module, exports, __webpack_require__) {
16429
16430__webpack_require__(56);
16431__webpack_require__(57);
16432module.exports = __webpack_require__(244);
16433
16434
16435/***/ }),
16436/* 244 */
16437/***/ (function(module, exports, __webpack_require__) {
16438
16439var classof = __webpack_require__(104);
16440var ITERATOR = __webpack_require__(11)('iterator');
16441var Iterators = __webpack_require__(41);
16442module.exports = __webpack_require__(5).isIterable = function (it) {
16443 var O = Object(it);
16444 return O[ITERATOR] !== undefined
16445 || '@@iterator' in O
16446 // eslint-disable-next-line no-prototype-builtins
16447 || Iterators.hasOwnProperty(classof(O));
16448};
16449
16450
16451/***/ }),
16452/* 245 */
16453/***/ (function(module, exports) {
16454
16455function _nonIterableRest() {
16456 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16457}
16458
16459module.exports = _nonIterableRest;
16460
16461/***/ }),
16462/* 246 */
16463/***/ (function(module, exports, __webpack_require__) {
16464
16465__webpack_require__(105);
16466__webpack_require__(57);
16467__webpack_require__(56);
16468__webpack_require__(247);
16469__webpack_require__(251);
16470__webpack_require__(252);
16471module.exports = __webpack_require__(5).Promise;
16472
16473
16474/***/ }),
16475/* 247 */
16476/***/ (function(module, exports, __webpack_require__) {
16477
16478"use strict";
16479
16480var LIBRARY = __webpack_require__(51);
16481var global = __webpack_require__(7);
16482var ctx = __webpack_require__(26);
16483var classof = __webpack_require__(104);
16484var $export = __webpack_require__(6);
16485var isObject = __webpack_require__(9);
16486var aFunction = __webpack_require__(33);
16487var anInstance = __webpack_require__(107);
16488var forOf = __webpack_require__(71);
16489var speciesConstructor = __webpack_require__(144);
16490var task = __webpack_require__(145).set;
16491var microtask = __webpack_require__(248)();
16492var newPromiseCapabilityModule = __webpack_require__(108);
16493var perform = __webpack_require__(147);
16494var userAgent = __webpack_require__(249);
16495var promiseResolve = __webpack_require__(148);
16496var PROMISE = 'Promise';
16497var TypeError = global.TypeError;
16498var process = global.process;
16499var versions = process && process.versions;
16500var v8 = versions && versions.v8 || '';
16501var $Promise = global[PROMISE];
16502var isNode = classof(process) == 'process';
16503var empty = function () { /* empty */ };
16504var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
16505var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
16506
16507var USE_NATIVE = !!function () {
16508 try {
16509 // correct subclassing with @@species support
16510 var promise = $Promise.resolve(1);
16511 var FakePromise = (promise.constructor = {})[__webpack_require__(11)('species')] = function (exec) {
16512 exec(empty, empty);
16513 };
16514 // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
16515 return (isNode || typeof PromiseRejectionEvent == 'function')
16516 && promise.then(empty) instanceof FakePromise
16517 // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
16518 // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
16519 // we can't detect it synchronously, so just check versions
16520 && v8.indexOf('6.6') !== 0
16521 && userAgent.indexOf('Chrome/66') === -1;
16522 } catch (e) { /* empty */ }
16523}();
16524
16525// helpers
16526var isThenable = function (it) {
16527 var then;
16528 return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
16529};
16530var notify = function (promise, isReject) {
16531 if (promise._n) return;
16532 promise._n = true;
16533 var chain = promise._c;
16534 microtask(function () {
16535 var value = promise._v;
16536 var ok = promise._s == 1;
16537 var i = 0;
16538 var run = function (reaction) {
16539 var handler = ok ? reaction.ok : reaction.fail;
16540 var resolve = reaction.resolve;
16541 var reject = reaction.reject;
16542 var domain = reaction.domain;
16543 var result, then, exited;
16544 try {
16545 if (handler) {
16546 if (!ok) {
16547 if (promise._h == 2) onHandleUnhandled(promise);
16548 promise._h = 1;
16549 }
16550 if (handler === true) result = value;
16551 else {
16552 if (domain) domain.enter();
16553 result = handler(value); // may throw
16554 if (domain) {
16555 domain.exit();
16556 exited = true;
16557 }
16558 }
16559 if (result === reaction.promise) {
16560 reject(TypeError('Promise-chain cycle'));
16561 } else if (then = isThenable(result)) {
16562 then.call(result, resolve, reject);
16563 } else resolve(result);
16564 } else reject(value);
16565 } catch (e) {
16566 if (domain && !exited) domain.exit();
16567 reject(e);
16568 }
16569 };
16570 while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
16571 promise._c = [];
16572 promise._n = false;
16573 if (isReject && !promise._h) onUnhandled(promise);
16574 });
16575};
16576var onUnhandled = function (promise) {
16577 task.call(global, function () {
16578 var value = promise._v;
16579 var unhandled = isUnhandled(promise);
16580 var result, handler, console;
16581 if (unhandled) {
16582 result = perform(function () {
16583 if (isNode) {
16584 process.emit('unhandledRejection', value, promise);
16585 } else if (handler = global.onunhandledrejection) {
16586 handler({ promise: promise, reason: value });
16587 } else if ((console = global.console) && console.error) {
16588 console.error('Unhandled promise rejection', value);
16589 }
16590 });
16591 // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
16592 promise._h = isNode || isUnhandled(promise) ? 2 : 1;
16593 } promise._a = undefined;
16594 if (unhandled && result.e) throw result.v;
16595 });
16596};
16597var isUnhandled = function (promise) {
16598 return promise._h !== 1 && (promise._a || promise._c).length === 0;
16599};
16600var onHandleUnhandled = function (promise) {
16601 task.call(global, function () {
16602 var handler;
16603 if (isNode) {
16604 process.emit('rejectionHandled', promise);
16605 } else if (handler = global.onrejectionhandled) {
16606 handler({ promise: promise, reason: promise._v });
16607 }
16608 });
16609};
16610var $reject = function (value) {
16611 var promise = this;
16612 if (promise._d) return;
16613 promise._d = true;
16614 promise = promise._w || promise; // unwrap
16615 promise._v = value;
16616 promise._s = 2;
16617 if (!promise._a) promise._a = promise._c.slice();
16618 notify(promise, true);
16619};
16620var $resolve = function (value) {
16621 var promise = this;
16622 var then;
16623 if (promise._d) return;
16624 promise._d = true;
16625 promise = promise._w || promise; // unwrap
16626 try {
16627 if (promise === value) throw TypeError("Promise can't be resolved itself");
16628 if (then = isThenable(value)) {
16629 microtask(function () {
16630 var wrapper = { _w: promise, _d: false }; // wrap
16631 try {
16632 then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
16633 } catch (e) {
16634 $reject.call(wrapper, e);
16635 }
16636 });
16637 } else {
16638 promise._v = value;
16639 promise._s = 1;
16640 notify(promise, false);
16641 }
16642 } catch (e) {
16643 $reject.call({ _w: promise, _d: false }, e); // wrap
16644 }
16645};
16646
16647// constructor polyfill
16648if (!USE_NATIVE) {
16649 // 25.4.3.1 Promise(executor)
16650 $Promise = function Promise(executor) {
16651 anInstance(this, $Promise, PROMISE, '_h');
16652 aFunction(executor);
16653 Internal.call(this);
16654 try {
16655 executor(ctx($resolve, this, 1), ctx($reject, this, 1));
16656 } catch (err) {
16657 $reject.call(this, err);
16658 }
16659 };
16660 // eslint-disable-next-line no-unused-vars
16661 Internal = function Promise(executor) {
16662 this._c = []; // <- awaiting reactions
16663 this._a = undefined; // <- checked in isUnhandled reactions
16664 this._s = 0; // <- state
16665 this._d = false; // <- done
16666 this._v = undefined; // <- value
16667 this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
16668 this._n = false; // <- notify
16669 };
16670 Internal.prototype = __webpack_require__(109)($Promise.prototype, {
16671 // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
16672 then: function then(onFulfilled, onRejected) {
16673 var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
16674 reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
16675 reaction.fail = typeof onRejected == 'function' && onRejected;
16676 reaction.domain = isNode ? process.domain : undefined;
16677 this._c.push(reaction);
16678 if (this._a) this._a.push(reaction);
16679 if (this._s) notify(this, false);
16680 return reaction.promise;
16681 },
16682 // 25.4.5.1 Promise.prototype.catch(onRejected)
16683 'catch': function (onRejected) {
16684 return this.then(undefined, onRejected);
16685 }
16686 });
16687 OwnPromiseCapability = function () {
16688 var promise = new Internal();
16689 this.promise = promise;
16690 this.resolve = ctx($resolve, promise, 1);
16691 this.reject = ctx($reject, promise, 1);
16692 };
16693 newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
16694 return C === $Promise || C === Wrapper
16695 ? new OwnPromiseCapability(C)
16696 : newGenericPromiseCapability(C);
16697 };
16698}
16699
16700$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
16701__webpack_require__(54)($Promise, PROMISE);
16702__webpack_require__(250)(PROMISE);
16703Wrapper = __webpack_require__(5)[PROMISE];
16704
16705// statics
16706$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
16707 // 25.4.4.5 Promise.reject(r)
16708 reject: function reject(r) {
16709 var capability = newPromiseCapability(this);
16710 var $$reject = capability.reject;
16711 $$reject(r);
16712 return capability.promise;
16713 }
16714});
16715$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
16716 // 25.4.4.6 Promise.resolve(x)
16717 resolve: function resolve(x) {
16718 return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
16719 }
16720});
16721$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(141)(function (iter) {
16722 $Promise.all(iter)['catch'](empty);
16723})), PROMISE, {
16724 // 25.4.4.1 Promise.all(iterable)
16725 all: function all(iterable) {
16726 var C = this;
16727 var capability = newPromiseCapability(C);
16728 var resolve = capability.resolve;
16729 var reject = capability.reject;
16730 var result = perform(function () {
16731 var values = [];
16732 var index = 0;
16733 var remaining = 1;
16734 forOf(iterable, false, function (promise) {
16735 var $index = index++;
16736 var alreadyCalled = false;
16737 values.push(undefined);
16738 remaining++;
16739 C.resolve(promise).then(function (value) {
16740 if (alreadyCalled) return;
16741 alreadyCalled = true;
16742 values[$index] = value;
16743 --remaining || resolve(values);
16744 }, reject);
16745 });
16746 --remaining || resolve(values);
16747 });
16748 if (result.e) reject(result.v);
16749 return capability.promise;
16750 },
16751 // 25.4.4.4 Promise.race(iterable)
16752 race: function race(iterable) {
16753 var C = this;
16754 var capability = newPromiseCapability(C);
16755 var reject = capability.reject;
16756 var result = perform(function () {
16757 forOf(iterable, false, function (promise) {
16758 C.resolve(promise).then(capability.resolve, reject);
16759 });
16760 });
16761 if (result.e) reject(result.v);
16762 return capability.promise;
16763 }
16764});
16765
16766
16767/***/ }),
16768/* 248 */
16769/***/ (function(module, exports, __webpack_require__) {
16770
16771var global = __webpack_require__(7);
16772var macrotask = __webpack_require__(145).set;
16773var Observer = global.MutationObserver || global.WebKitMutationObserver;
16774var process = global.process;
16775var Promise = global.Promise;
16776var isNode = __webpack_require__(50)(process) == 'process';
16777
16778module.exports = function () {
16779 var head, last, notify;
16780
16781 var flush = function () {
16782 var parent, fn;
16783 if (isNode && (parent = process.domain)) parent.exit();
16784 while (head) {
16785 fn = head.fn;
16786 head = head.next;
16787 try {
16788 fn();
16789 } catch (e) {
16790 if (head) notify();
16791 else last = undefined;
16792 throw e;
16793 }
16794 } last = undefined;
16795 if (parent) parent.enter();
16796 };
16797
16798 // Node.js
16799 if (isNode) {
16800 notify = function () {
16801 process.nextTick(flush);
16802 };
16803 // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
16804 } else if (Observer && !(global.navigator && global.navigator.standalone)) {
16805 var toggle = true;
16806 var node = document.createTextNode('');
16807 new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
16808 notify = function () {
16809 node.data = toggle = !toggle;
16810 };
16811 // environments with maybe non-completely correct, but existent Promise
16812 } else if (Promise && Promise.resolve) {
16813 // Promise.resolve without an argument throws an error in LG WebOS 2
16814 var promise = Promise.resolve(undefined);
16815 notify = function () {
16816 promise.then(flush);
16817 };
16818 // for other environments - macrotask based on:
16819 // - setImmediate
16820 // - MessageChannel
16821 // - window.postMessag
16822 // - onreadystatechange
16823 // - setTimeout
16824 } else {
16825 notify = function () {
16826 // strange IE + webpack dev server bug - use .call(global)
16827 macrotask.call(global, flush);
16828 };
16829 }
16830
16831 return function (fn) {
16832 var task = { fn: fn, next: undefined };
16833 if (last) last.next = task;
16834 if (!head) {
16835 head = task;
16836 notify();
16837 } last = task;
16838 };
16839};
16840
16841
16842/***/ }),
16843/* 249 */
16844/***/ (function(module, exports, __webpack_require__) {
16845
16846var global = __webpack_require__(7);
16847var navigator = global.navigator;
16848
16849module.exports = navigator && navigator.userAgent || '';
16850
16851
16852/***/ }),
16853/* 250 */
16854/***/ (function(module, exports, __webpack_require__) {
16855
16856"use strict";
16857
16858var global = __webpack_require__(7);
16859var core = __webpack_require__(5);
16860var dP = __webpack_require__(19);
16861var DESCRIPTORS = __webpack_require__(16);
16862var SPECIES = __webpack_require__(11)('species');
16863
16864module.exports = function (KEY) {
16865 var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
16866 if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
16867 configurable: true,
16868 get: function () { return this; }
16869 });
16870};
16871
16872
16873/***/ }),
16874/* 251 */
16875/***/ (function(module, exports, __webpack_require__) {
16876
16877"use strict";
16878// https://github.com/tc39/proposal-promise-finally
16879
16880var $export = __webpack_require__(6);
16881var core = __webpack_require__(5);
16882var global = __webpack_require__(7);
16883var speciesConstructor = __webpack_require__(144);
16884var promiseResolve = __webpack_require__(148);
16885
16886$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
16887 var C = speciesConstructor(this, core.Promise || global.Promise);
16888 var isFunction = typeof onFinally == 'function';
16889 return this.then(
16890 isFunction ? function (x) {
16891 return promiseResolve(C, onFinally()).then(function () { return x; });
16892 } : onFinally,
16893 isFunction ? function (e) {
16894 return promiseResolve(C, onFinally()).then(function () { throw e; });
16895 } : onFinally
16896 );
16897} });
16898
16899
16900/***/ }),
16901/* 252 */
16902/***/ (function(module, exports, __webpack_require__) {
16903
16904"use strict";
16905
16906// https://github.com/tc39/proposal-promise-try
16907var $export = __webpack_require__(6);
16908var newPromiseCapability = __webpack_require__(108);
16909var perform = __webpack_require__(147);
16910
16911$export($export.S, 'Promise', { 'try': function (callbackfn) {
16912 var promiseCapability = newPromiseCapability.f(this);
16913 var result = perform(callbackfn);
16914 (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
16915 return promiseCapability.promise;
16916} });
16917
16918
16919/***/ }),
16920/* 253 */
16921/***/ (function(module, exports) {
16922
16923(function(self) {
16924
16925var irrelevant = (function (exports) {
16926 var support = {
16927 searchParams: 'URLSearchParams' in self,
16928 iterable: 'Symbol' in self && 'iterator' in Symbol,
16929 blob:
16930 'FileReader' in self &&
16931 'Blob' in self &&
16932 (function() {
16933 try {
16934 new Blob();
16935 return true
16936 } catch (e) {
16937 return false
16938 }
16939 })(),
16940 formData: 'FormData' in self,
16941 arrayBuffer: 'ArrayBuffer' in self
16942 };
16943
16944 function isDataView(obj) {
16945 return obj && DataView.prototype.isPrototypeOf(obj)
16946 }
16947
16948 if (support.arrayBuffer) {
16949 var viewClasses = [
16950 '[object Int8Array]',
16951 '[object Uint8Array]',
16952 '[object Uint8ClampedArray]',
16953 '[object Int16Array]',
16954 '[object Uint16Array]',
16955 '[object Int32Array]',
16956 '[object Uint32Array]',
16957 '[object Float32Array]',
16958 '[object Float64Array]'
16959 ];
16960
16961 var isArrayBufferView =
16962 ArrayBuffer.isView ||
16963 function(obj) {
16964 return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
16965 };
16966 }
16967
16968 function normalizeName(name) {
16969 if (typeof name !== 'string') {
16970 name = String(name);
16971 }
16972 if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
16973 throw new TypeError('Invalid character in header field name')
16974 }
16975 return name.toLowerCase()
16976 }
16977
16978 function normalizeValue(value) {
16979 if (typeof value !== 'string') {
16980 value = String(value);
16981 }
16982 return value
16983 }
16984
16985 // Build a destructive iterator for the value list
16986 function iteratorFor(items) {
16987 var iterator = {
16988 next: function() {
16989 var value = items.shift();
16990 return {done: value === undefined, value: value}
16991 }
16992 };
16993
16994 if (support.iterable) {
16995 iterator[Symbol.iterator] = function() {
16996 return iterator
16997 };
16998 }
16999
17000 return iterator
17001 }
17002
17003 function Headers(headers) {
17004 this.map = {};
17005
17006 if (headers instanceof Headers) {
17007 headers.forEach(function(value, name) {
17008 this.append(name, value);
17009 }, this);
17010 } else if (Array.isArray(headers)) {
17011 headers.forEach(function(header) {
17012 this.append(header[0], header[1]);
17013 }, this);
17014 } else if (headers) {
17015 Object.getOwnPropertyNames(headers).forEach(function(name) {
17016 this.append(name, headers[name]);
17017 }, this);
17018 }
17019 }
17020
17021 Headers.prototype.append = function(name, value) {
17022 name = normalizeName(name);
17023 value = normalizeValue(value);
17024 var oldValue = this.map[name];
17025 this.map[name] = oldValue ? oldValue + ', ' + value : value;
17026 };
17027
17028 Headers.prototype['delete'] = function(name) {
17029 delete this.map[normalizeName(name)];
17030 };
17031
17032 Headers.prototype.get = function(name) {
17033 name = normalizeName(name);
17034 return this.has(name) ? this.map[name] : null
17035 };
17036
17037 Headers.prototype.has = function(name) {
17038 return this.map.hasOwnProperty(normalizeName(name))
17039 };
17040
17041 Headers.prototype.set = function(name, value) {
17042 this.map[normalizeName(name)] = normalizeValue(value);
17043 };
17044
17045 Headers.prototype.forEach = function(callback, thisArg) {
17046 for (var name in this.map) {
17047 if (this.map.hasOwnProperty(name)) {
17048 callback.call(thisArg, this.map[name], name, this);
17049 }
17050 }
17051 };
17052
17053 Headers.prototype.keys = function() {
17054 var items = [];
17055 this.forEach(function(value, name) {
17056 items.push(name);
17057 });
17058 return iteratorFor(items)
17059 };
17060
17061 Headers.prototype.values = function() {
17062 var items = [];
17063 this.forEach(function(value) {
17064 items.push(value);
17065 });
17066 return iteratorFor(items)
17067 };
17068
17069 Headers.prototype.entries = function() {
17070 var items = [];
17071 this.forEach(function(value, name) {
17072 items.push([name, value]);
17073 });
17074 return iteratorFor(items)
17075 };
17076
17077 if (support.iterable) {
17078 Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
17079 }
17080
17081 function consumed(body) {
17082 if (body.bodyUsed) {
17083 return Promise.reject(new TypeError('Already read'))
17084 }
17085 body.bodyUsed = true;
17086 }
17087
17088 function fileReaderReady(reader) {
17089 return new Promise(function(resolve, reject) {
17090 reader.onload = function() {
17091 resolve(reader.result);
17092 };
17093 reader.onerror = function() {
17094 reject(reader.error);
17095 };
17096 })
17097 }
17098
17099 function readBlobAsArrayBuffer(blob) {
17100 var reader = new FileReader();
17101 var promise = fileReaderReady(reader);
17102 reader.readAsArrayBuffer(blob);
17103 return promise
17104 }
17105
17106 function readBlobAsText(blob) {
17107 var reader = new FileReader();
17108 var promise = fileReaderReady(reader);
17109 reader.readAsText(blob);
17110 return promise
17111 }
17112
17113 function readArrayBufferAsText(buf) {
17114 var view = new Uint8Array(buf);
17115 var chars = new Array(view.length);
17116
17117 for (var i = 0; i < view.length; i++) {
17118 chars[i] = String.fromCharCode(view[i]);
17119 }
17120 return chars.join('')
17121 }
17122
17123 function bufferClone(buf) {
17124 if (buf.slice) {
17125 return buf.slice(0)
17126 } else {
17127 var view = new Uint8Array(buf.byteLength);
17128 view.set(new Uint8Array(buf));
17129 return view.buffer
17130 }
17131 }
17132
17133 function Body() {
17134 this.bodyUsed = false;
17135
17136 this._initBody = function(body) {
17137 this._bodyInit = body;
17138 if (!body) {
17139 this._bodyText = '';
17140 } else if (typeof body === 'string') {
17141 this._bodyText = body;
17142 } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
17143 this._bodyBlob = body;
17144 } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
17145 this._bodyFormData = body;
17146 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
17147 this._bodyText = body.toString();
17148 } else if (support.arrayBuffer && support.blob && isDataView(body)) {
17149 this._bodyArrayBuffer = bufferClone(body.buffer);
17150 // IE 10-11 can't handle a DataView body.
17151 this._bodyInit = new Blob([this._bodyArrayBuffer]);
17152 } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
17153 this._bodyArrayBuffer = bufferClone(body);
17154 } else {
17155 this._bodyText = body = Object.prototype.toString.call(body);
17156 }
17157
17158 if (!this.headers.get('content-type')) {
17159 if (typeof body === 'string') {
17160 this.headers.set('content-type', 'text/plain;charset=UTF-8');
17161 } else if (this._bodyBlob && this._bodyBlob.type) {
17162 this.headers.set('content-type', this._bodyBlob.type);
17163 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
17164 this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
17165 }
17166 }
17167 };
17168
17169 if (support.blob) {
17170 this.blob = function() {
17171 var rejected = consumed(this);
17172 if (rejected) {
17173 return rejected
17174 }
17175
17176 if (this._bodyBlob) {
17177 return Promise.resolve(this._bodyBlob)
17178 } else if (this._bodyArrayBuffer) {
17179 return Promise.resolve(new Blob([this._bodyArrayBuffer]))
17180 } else if (this._bodyFormData) {
17181 throw new Error('could not read FormData body as blob')
17182 } else {
17183 return Promise.resolve(new Blob([this._bodyText]))
17184 }
17185 };
17186
17187 this.arrayBuffer = function() {
17188 if (this._bodyArrayBuffer) {
17189 return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
17190 } else {
17191 return this.blob().then(readBlobAsArrayBuffer)
17192 }
17193 };
17194 }
17195
17196 this.text = function() {
17197 var rejected = consumed(this);
17198 if (rejected) {
17199 return rejected
17200 }
17201
17202 if (this._bodyBlob) {
17203 return readBlobAsText(this._bodyBlob)
17204 } else if (this._bodyArrayBuffer) {
17205 return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
17206 } else if (this._bodyFormData) {
17207 throw new Error('could not read FormData body as text')
17208 } else {
17209 return Promise.resolve(this._bodyText)
17210 }
17211 };
17212
17213 if (support.formData) {
17214 this.formData = function() {
17215 return this.text().then(decode)
17216 };
17217 }
17218
17219 this.json = function() {
17220 return this.text().then(JSON.parse)
17221 };
17222
17223 return this
17224 }
17225
17226 // HTTP methods whose capitalization should be normalized
17227 var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
17228
17229 function normalizeMethod(method) {
17230 var upcased = method.toUpperCase();
17231 return methods.indexOf(upcased) > -1 ? upcased : method
17232 }
17233
17234 function Request(input, options) {
17235 options = options || {};
17236 var body = options.body;
17237
17238 if (input instanceof Request) {
17239 if (input.bodyUsed) {
17240 throw new TypeError('Already read')
17241 }
17242 this.url = input.url;
17243 this.credentials = input.credentials;
17244 if (!options.headers) {
17245 this.headers = new Headers(input.headers);
17246 }
17247 this.method = input.method;
17248 this.mode = input.mode;
17249 this.signal = input.signal;
17250 if (!body && input._bodyInit != null) {
17251 body = input._bodyInit;
17252 input.bodyUsed = true;
17253 }
17254 } else {
17255 this.url = String(input);
17256 }
17257
17258 this.credentials = options.credentials || this.credentials || 'same-origin';
17259 if (options.headers || !this.headers) {
17260 this.headers = new Headers(options.headers);
17261 }
17262 this.method = normalizeMethod(options.method || this.method || 'GET');
17263 this.mode = options.mode || this.mode || null;
17264 this.signal = options.signal || this.signal;
17265 this.referrer = null;
17266
17267 if ((this.method === 'GET' || this.method === 'HEAD') && body) {
17268 throw new TypeError('Body not allowed for GET or HEAD requests')
17269 }
17270 this._initBody(body);
17271 }
17272
17273 Request.prototype.clone = function() {
17274 return new Request(this, {body: this._bodyInit})
17275 };
17276
17277 function decode(body) {
17278 var form = new FormData();
17279 body
17280 .trim()
17281 .split('&')
17282 .forEach(function(bytes) {
17283 if (bytes) {
17284 var split = bytes.split('=');
17285 var name = split.shift().replace(/\+/g, ' ');
17286 var value = split.join('=').replace(/\+/g, ' ');
17287 form.append(decodeURIComponent(name), decodeURIComponent(value));
17288 }
17289 });
17290 return form
17291 }
17292
17293 function parseHeaders(rawHeaders) {
17294 var headers = new Headers();
17295 // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
17296 // https://tools.ietf.org/html/rfc7230#section-3.2
17297 var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
17298 preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
17299 var parts = line.split(':');
17300 var key = parts.shift().trim();
17301 if (key) {
17302 var value = parts.join(':').trim();
17303 headers.append(key, value);
17304 }
17305 });
17306 return headers
17307 }
17308
17309 Body.call(Request.prototype);
17310
17311 function Response(bodyInit, options) {
17312 if (!options) {
17313 options = {};
17314 }
17315
17316 this.type = 'default';
17317 this.status = options.status === undefined ? 200 : options.status;
17318 this.ok = this.status >= 200 && this.status < 300;
17319 this.statusText = 'statusText' in options ? options.statusText : 'OK';
17320 this.headers = new Headers(options.headers);
17321 this.url = options.url || '';
17322 this._initBody(bodyInit);
17323 }
17324
17325 Body.call(Response.prototype);
17326
17327 Response.prototype.clone = function() {
17328 return new Response(this._bodyInit, {
17329 status: this.status,
17330 statusText: this.statusText,
17331 headers: new Headers(this.headers),
17332 url: this.url
17333 })
17334 };
17335
17336 Response.error = function() {
17337 var response = new Response(null, {status: 0, statusText: ''});
17338 response.type = 'error';
17339 return response
17340 };
17341
17342 var redirectStatuses = [301, 302, 303, 307, 308];
17343
17344 Response.redirect = function(url, status) {
17345 if (redirectStatuses.indexOf(status) === -1) {
17346 throw new RangeError('Invalid status code')
17347 }
17348
17349 return new Response(null, {status: status, headers: {location: url}})
17350 };
17351
17352 exports.DOMException = self.DOMException;
17353 try {
17354 new exports.DOMException();
17355 } catch (err) {
17356 exports.DOMException = function(message, name) {
17357 this.message = message;
17358 this.name = name;
17359 var error = Error(message);
17360 this.stack = error.stack;
17361 };
17362 exports.DOMException.prototype = Object.create(Error.prototype);
17363 exports.DOMException.prototype.constructor = exports.DOMException;
17364 }
17365
17366 function fetch(input, init) {
17367 return new Promise(function(resolve, reject) {
17368 var request = new Request(input, init);
17369
17370 if (request.signal && request.signal.aborted) {
17371 return reject(new exports.DOMException('Aborted', 'AbortError'))
17372 }
17373
17374 var xhr = new XMLHttpRequest();
17375
17376 function abortXhr() {
17377 xhr.abort();
17378 }
17379
17380 xhr.onload = function() {
17381 var options = {
17382 status: xhr.status,
17383 statusText: xhr.statusText,
17384 headers: parseHeaders(xhr.getAllResponseHeaders() || '')
17385 };
17386 options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
17387 var body = 'response' in xhr ? xhr.response : xhr.responseText;
17388 resolve(new Response(body, options));
17389 };
17390
17391 xhr.onerror = function() {
17392 reject(new TypeError('Network request failed'));
17393 };
17394
17395 xhr.ontimeout = function() {
17396 reject(new TypeError('Network request failed'));
17397 };
17398
17399 xhr.onabort = function() {
17400 reject(new exports.DOMException('Aborted', 'AbortError'));
17401 };
17402
17403 xhr.open(request.method, request.url, true);
17404
17405 if (request.credentials === 'include') {
17406 xhr.withCredentials = true;
17407 } else if (request.credentials === 'omit') {
17408 xhr.withCredentials = false;
17409 }
17410
17411 if ('responseType' in xhr && support.blob) {
17412 xhr.responseType = 'blob';
17413 }
17414
17415 request.headers.forEach(function(value, name) {
17416 xhr.setRequestHeader(name, value);
17417 });
17418
17419 if (request.signal) {
17420 request.signal.addEventListener('abort', abortXhr);
17421
17422 xhr.onreadystatechange = function() {
17423 // DONE (success or failure)
17424 if (xhr.readyState === 4) {
17425 request.signal.removeEventListener('abort', abortXhr);
17426 }
17427 };
17428 }
17429
17430 xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
17431 })
17432 }
17433
17434 fetch.polyfill = true;
17435
17436 if (!self.fetch) {
17437 self.fetch = fetch;
17438 self.Headers = Headers;
17439 self.Request = Request;
17440 self.Response = Response;
17441 }
17442
17443 exports.Headers = Headers;
17444 exports.Request = Request;
17445 exports.Response = Response;
17446 exports.fetch = fetch;
17447
17448 return exports;
17449
17450}({}));
17451})(typeof self !== 'undefined' ? self : this);
17452
17453
17454/***/ }),
17455/* 254 */
17456/***/ (function(module, exports, __webpack_require__) {
17457
17458"use strict";
17459
17460
17461var utils = __webpack_require__(110);
17462var formats = __webpack_require__(149);
17463var has = Object.prototype.hasOwnProperty;
17464
17465var arrayPrefixGenerators = {
17466 brackets: function brackets(prefix) {
17467 return prefix + '[]';
17468 },
17469 comma: 'comma',
17470 indices: function indices(prefix, key) {
17471 return prefix + '[' + key + ']';
17472 },
17473 repeat: function repeat(prefix) {
17474 return prefix;
17475 }
17476};
17477
17478var isArray = Array.isArray;
17479var push = Array.prototype.push;
17480var pushToArray = function (arr, valueOrArray) {
17481 push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
17482};
17483
17484var toISO = Date.prototype.toISOString;
17485
17486var defaultFormat = formats['default'];
17487var defaults = {
17488 addQueryPrefix: false,
17489 allowDots: false,
17490 charset: 'utf-8',
17491 charsetSentinel: false,
17492 delimiter: '&',
17493 encode: true,
17494 encoder: utils.encode,
17495 encodeValuesOnly: false,
17496 format: defaultFormat,
17497 formatter: formats.formatters[defaultFormat],
17498 // deprecated
17499 indices: false,
17500 serializeDate: function serializeDate(date) {
17501 return toISO.call(date);
17502 },
17503 skipNulls: false,
17504 strictNullHandling: false
17505};
17506
17507var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
17508 return typeof v === 'string'
17509 || typeof v === 'number'
17510 || typeof v === 'boolean'
17511 || typeof v === 'symbol'
17512 || typeof v === 'bigint';
17513};
17514
17515var stringify = function stringify(
17516 object,
17517 prefix,
17518 generateArrayPrefix,
17519 strictNullHandling,
17520 skipNulls,
17521 encoder,
17522 filter,
17523 sort,
17524 allowDots,
17525 serializeDate,
17526 formatter,
17527 encodeValuesOnly,
17528 charset
17529) {
17530 var obj = object;
17531 if (typeof filter === 'function') {
17532 obj = filter(prefix, obj);
17533 } else if (obj instanceof Date) {
17534 obj = serializeDate(obj);
17535 } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
17536 obj = utils.maybeMap(obj, function (value) {
17537 if (value instanceof Date) {
17538 return serializeDate(value);
17539 }
17540 return value;
17541 }).join(',');
17542 }
17543
17544 if (obj === null) {
17545 if (strictNullHandling) {
17546 return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;
17547 }
17548
17549 obj = '';
17550 }
17551
17552 if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
17553 if (encoder) {
17554 var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');
17555 return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];
17556 }
17557 return [formatter(prefix) + '=' + formatter(String(obj))];
17558 }
17559
17560 var values = [];
17561
17562 if (typeof obj === 'undefined') {
17563 return values;
17564 }
17565
17566 var objKeys;
17567 if (isArray(filter)) {
17568 objKeys = filter;
17569 } else {
17570 var keys = Object.keys(obj);
17571 objKeys = sort ? keys.sort(sort) : keys;
17572 }
17573
17574 for (var i = 0; i < objKeys.length; ++i) {
17575 var key = objKeys[i];
17576 var value = obj[key];
17577
17578 if (skipNulls && value === null) {
17579 continue;
17580 }
17581
17582 var keyPrefix = isArray(obj)
17583 ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
17584 : prefix + (allowDots ? '.' + key : '[' + key + ']');
17585
17586 pushToArray(values, stringify(
17587 value,
17588 keyPrefix,
17589 generateArrayPrefix,
17590 strictNullHandling,
17591 skipNulls,
17592 encoder,
17593 filter,
17594 sort,
17595 allowDots,
17596 serializeDate,
17597 formatter,
17598 encodeValuesOnly,
17599 charset
17600 ));
17601 }
17602
17603 return values;
17604};
17605
17606var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
17607 if (!opts) {
17608 return defaults;
17609 }
17610
17611 if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
17612 throw new TypeError('Encoder has to be a function.');
17613 }
17614
17615 var charset = opts.charset || defaults.charset;
17616 if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
17617 throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
17618 }
17619
17620 var format = formats['default'];
17621 if (typeof opts.format !== 'undefined') {
17622 if (!has.call(formats.formatters, opts.format)) {
17623 throw new TypeError('Unknown format option provided.');
17624 }
17625 format = opts.format;
17626 }
17627 var formatter = formats.formatters[format];
17628
17629 var filter = defaults.filter;
17630 if (typeof opts.filter === 'function' || isArray(opts.filter)) {
17631 filter = opts.filter;
17632 }
17633
17634 return {
17635 addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
17636 allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
17637 charset: charset,
17638 charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
17639 delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
17640 encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
17641 encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
17642 encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
17643 filter: filter,
17644 formatter: formatter,
17645 serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
17646 skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
17647 sort: typeof opts.sort === 'function' ? opts.sort : null,
17648 strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
17649 };
17650};
17651
17652module.exports = function (object, opts) {
17653 var obj = object;
17654 var options = normalizeStringifyOptions(opts);
17655
17656 var objKeys;
17657 var filter;
17658
17659 if (typeof options.filter === 'function') {
17660 filter = options.filter;
17661 obj = filter('', obj);
17662 } else if (isArray(options.filter)) {
17663 filter = options.filter;
17664 objKeys = filter;
17665 }
17666
17667 var keys = [];
17668
17669 if (typeof obj !== 'object' || obj === null) {
17670 return '';
17671 }
17672
17673 var arrayFormat;
17674 if (opts && opts.arrayFormat in arrayPrefixGenerators) {
17675 arrayFormat = opts.arrayFormat;
17676 } else if (opts && 'indices' in opts) {
17677 arrayFormat = opts.indices ? 'indices' : 'repeat';
17678 } else {
17679 arrayFormat = 'indices';
17680 }
17681
17682 var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
17683
17684 if (!objKeys) {
17685 objKeys = Object.keys(obj);
17686 }
17687
17688 if (options.sort) {
17689 objKeys.sort(options.sort);
17690 }
17691
17692 for (var i = 0; i < objKeys.length; ++i) {
17693 var key = objKeys[i];
17694
17695 if (options.skipNulls && obj[key] === null) {
17696 continue;
17697 }
17698 pushToArray(keys, stringify(
17699 obj[key],
17700 key,
17701 generateArrayPrefix,
17702 options.strictNullHandling,
17703 options.skipNulls,
17704 options.encode ? options.encoder : null,
17705 options.filter,
17706 options.sort,
17707 options.allowDots,
17708 options.serializeDate,
17709 options.formatter,
17710 options.encodeValuesOnly,
17711 options.charset
17712 ));
17713 }
17714
17715 var joined = keys.join(options.delimiter);
17716 var prefix = options.addQueryPrefix === true ? '?' : '';
17717
17718 if (options.charsetSentinel) {
17719 if (options.charset === 'iso-8859-1') {
17720 // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
17721 prefix += 'utf8=%26%2310003%3B&';
17722 } else {
17723 // encodeURIComponent('✓')
17724 prefix += 'utf8=%E2%9C%93&';
17725 }
17726 }
17727
17728 return joined.length > 0 ? prefix + joined : '';
17729};
17730
17731
17732/***/ }),
17733/* 255 */
17734/***/ (function(module, exports, __webpack_require__) {
17735
17736"use strict";
17737
17738
17739var utils = __webpack_require__(110);
17740
17741var has = Object.prototype.hasOwnProperty;
17742var isArray = Array.isArray;
17743
17744var defaults = {
17745 allowDots: false,
17746 allowPrototypes: false,
17747 arrayLimit: 20,
17748 charset: 'utf-8',
17749 charsetSentinel: false,
17750 comma: false,
17751 decoder: utils.decode,
17752 delimiter: '&',
17753 depth: 5,
17754 ignoreQueryPrefix: false,
17755 interpretNumericEntities: false,
17756 parameterLimit: 1000,
17757 parseArrays: true,
17758 plainObjects: false,
17759 strictNullHandling: false
17760};
17761
17762var interpretNumericEntities = function (str) {
17763 return str.replace(/&#(\d+);/g, function ($0, numberStr) {
17764 return String.fromCharCode(parseInt(numberStr, 10));
17765 });
17766};
17767
17768var parseArrayValue = function (val, options) {
17769 if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
17770 return val.split(',');
17771 }
17772
17773 return val;
17774};
17775
17776// This is what browsers will submit when the ✓ character occurs in an
17777// application/x-www-form-urlencoded body and the encoding of the page containing
17778// the form is iso-8859-1, or when the submitted form has an accept-charset
17779// attribute of iso-8859-1. Presumably also with other charsets that do not contain
17780// the ✓ character, such as us-ascii.
17781var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
17782
17783// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
17784var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
17785
17786var parseValues = function parseQueryStringValues(str, options) {
17787 var obj = {};
17788 var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
17789 var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
17790 var parts = cleanStr.split(options.delimiter, limit);
17791 var skipIndex = -1; // Keep track of where the utf8 sentinel was found
17792 var i;
17793
17794 var charset = options.charset;
17795 if (options.charsetSentinel) {
17796 for (i = 0; i < parts.length; ++i) {
17797 if (parts[i].indexOf('utf8=') === 0) {
17798 if (parts[i] === charsetSentinel) {
17799 charset = 'utf-8';
17800 } else if (parts[i] === isoSentinel) {
17801 charset = 'iso-8859-1';
17802 }
17803 skipIndex = i;
17804 i = parts.length; // The eslint settings do not allow break;
17805 }
17806 }
17807 }
17808
17809 for (i = 0; i < parts.length; ++i) {
17810 if (i === skipIndex) {
17811 continue;
17812 }
17813 var part = parts[i];
17814
17815 var bracketEqualsPos = part.indexOf(']=');
17816 var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
17817
17818 var key, val;
17819 if (pos === -1) {
17820 key = options.decoder(part, defaults.decoder, charset, 'key');
17821 val = options.strictNullHandling ? null : '';
17822 } else {
17823 key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
17824 val = utils.maybeMap(
17825 parseArrayValue(part.slice(pos + 1), options),
17826 function (encodedVal) {
17827 return options.decoder(encodedVal, defaults.decoder, charset, 'value');
17828 }
17829 );
17830 }
17831
17832 if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
17833 val = interpretNumericEntities(val);
17834 }
17835
17836 if (part.indexOf('[]=') > -1) {
17837 val = isArray(val) ? [val] : val;
17838 }
17839
17840 if (has.call(obj, key)) {
17841 obj[key] = utils.combine(obj[key], val);
17842 } else {
17843 obj[key] = val;
17844 }
17845 }
17846
17847 return obj;
17848};
17849
17850var parseObject = function (chain, val, options, valuesParsed) {
17851 var leaf = valuesParsed ? val : parseArrayValue(val, options);
17852
17853 for (var i = chain.length - 1; i >= 0; --i) {
17854 var obj;
17855 var root = chain[i];
17856
17857 if (root === '[]' && options.parseArrays) {
17858 obj = [].concat(leaf);
17859 } else {
17860 obj = options.plainObjects ? Object.create(null) : {};
17861 var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
17862 var index = parseInt(cleanRoot, 10);
17863 if (!options.parseArrays && cleanRoot === '') {
17864 obj = { 0: leaf };
17865 } else if (
17866 !isNaN(index)
17867 && root !== cleanRoot
17868 && String(index) === cleanRoot
17869 && index >= 0
17870 && (options.parseArrays && index <= options.arrayLimit)
17871 ) {
17872 obj = [];
17873 obj[index] = leaf;
17874 } else {
17875 obj[cleanRoot] = leaf;
17876 }
17877 }
17878
17879 leaf = obj; // eslint-disable-line no-param-reassign
17880 }
17881
17882 return leaf;
17883};
17884
17885var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
17886 if (!givenKey) {
17887 return;
17888 }
17889
17890 // Transform dot notation to bracket notation
17891 var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
17892
17893 // The regex chunks
17894
17895 var brackets = /(\[[^[\]]*])/;
17896 var child = /(\[[^[\]]*])/g;
17897
17898 // Get the parent
17899
17900 var segment = options.depth > 0 && brackets.exec(key);
17901 var parent = segment ? key.slice(0, segment.index) : key;
17902
17903 // Stash the parent if it exists
17904
17905 var keys = [];
17906 if (parent) {
17907 // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
17908 if (!options.plainObjects && has.call(Object.prototype, parent)) {
17909 if (!options.allowPrototypes) {
17910 return;
17911 }
17912 }
17913
17914 keys.push(parent);
17915 }
17916
17917 // Loop through children appending to the array until we hit depth
17918
17919 var i = 0;
17920 while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
17921 i += 1;
17922 if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
17923 if (!options.allowPrototypes) {
17924 return;
17925 }
17926 }
17927 keys.push(segment[1]);
17928 }
17929
17930 // If there's a remainder, just add whatever is left
17931
17932 if (segment) {
17933 keys.push('[' + key.slice(segment.index) + ']');
17934 }
17935
17936 return parseObject(keys, val, options, valuesParsed);
17937};
17938
17939var normalizeParseOptions = function normalizeParseOptions(opts) {
17940 if (!opts) {
17941 return defaults;
17942 }
17943
17944 if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
17945 throw new TypeError('Decoder has to be a function.');
17946 }
17947
17948 if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
17949 throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
17950 }
17951 var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
17952
17953 return {
17954 allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
17955 allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
17956 arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
17957 charset: charset,
17958 charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
17959 comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
17960 decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
17961 delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
17962 // eslint-disable-next-line no-implicit-coercion, no-extra-parens
17963 depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
17964 ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
17965 interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
17966 parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
17967 parseArrays: opts.parseArrays !== false,
17968 plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
17969 strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
17970 };
17971};
17972
17973module.exports = function (str, opts) {
17974 var options = normalizeParseOptions(opts);
17975
17976 if (str === '' || str === null || typeof str === 'undefined') {
17977 return options.plainObjects ? Object.create(null) : {};
17978 }
17979
17980 var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
17981 var obj = options.plainObjects ? Object.create(null) : {};
17982
17983 // Iterate over the keys and setup the new object
17984
17985 var keys = Object.keys(tempObj);
17986 for (var i = 0; i < keys.length; ++i) {
17987 var key = keys[i];
17988 var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
17989 obj = utils.merge(obj, newObj, options);
17990 }
17991
17992 return utils.compact(obj);
17993};
17994
17995
17996/***/ }),
17997/* 256 */
17998/***/ (function(module, exports, __webpack_require__) {
17999
18000"use strict";
18001
18002
18003
18004var loader = __webpack_require__(257);
18005var dumper = __webpack_require__(279);
18006
18007
18008function deprecated(name) {
18009 return function () {
18010 throw new Error('Function ' + name + ' is deprecated and cannot be used.');
18011 };
18012}
18013
18014
18015module.exports.Type = __webpack_require__(8);
18016module.exports.Schema = __webpack_require__(43);
18017module.exports.FAILSAFE_SCHEMA = __webpack_require__(111);
18018module.exports.JSON_SCHEMA = __webpack_require__(151);
18019module.exports.CORE_SCHEMA = __webpack_require__(150);
18020module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(59);
18021module.exports.DEFAULT_FULL_SCHEMA = __webpack_require__(72);
18022module.exports.load = loader.load;
18023module.exports.loadAll = loader.loadAll;
18024module.exports.safeLoad = loader.safeLoad;
18025module.exports.safeLoadAll = loader.safeLoadAll;
18026module.exports.dump = dumper.dump;
18027module.exports.safeDump = dumper.safeDump;
18028module.exports.YAMLException = __webpack_require__(58);
18029
18030// Deprecated schema names from JS-YAML 2.0.x
18031module.exports.MINIMAL_SCHEMA = __webpack_require__(111);
18032module.exports.SAFE_SCHEMA = __webpack_require__(59);
18033module.exports.DEFAULT_SCHEMA = __webpack_require__(72);
18034
18035// Deprecated functions from JS-YAML 1.x.x
18036module.exports.scan = deprecated('scan');
18037module.exports.parse = deprecated('parse');
18038module.exports.compose = deprecated('compose');
18039module.exports.addConstructor = deprecated('addConstructor');
18040
18041
18042/***/ }),
18043/* 257 */
18044/***/ (function(module, exports, __webpack_require__) {
18045
18046"use strict";
18047
18048
18049/*eslint-disable max-len,no-use-before-define*/
18050
18051var common = __webpack_require__(42);
18052var YAMLException = __webpack_require__(58);
18053var Mark = __webpack_require__(258);
18054var DEFAULT_SAFE_SCHEMA = __webpack_require__(59);
18055var DEFAULT_FULL_SCHEMA = __webpack_require__(72);
18056
18057
18058var _hasOwnProperty = Object.prototype.hasOwnProperty;
18059
18060
18061var CONTEXT_FLOW_IN = 1;
18062var CONTEXT_FLOW_OUT = 2;
18063var CONTEXT_BLOCK_IN = 3;
18064var CONTEXT_BLOCK_OUT = 4;
18065
18066
18067var CHOMPING_CLIP = 1;
18068var CHOMPING_STRIP = 2;
18069var CHOMPING_KEEP = 3;
18070
18071
18072var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
18073var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
18074var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
18075var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
18076var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
18077
18078
18079function _class(obj) { return Object.prototype.toString.call(obj); }
18080
18081function is_EOL(c) {
18082 return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);
18083}
18084
18085function is_WHITE_SPACE(c) {
18086 return (c === 0x09/* Tab */) || (c === 0x20/* Space */);
18087}
18088
18089function is_WS_OR_EOL(c) {
18090 return (c === 0x09/* Tab */) ||
18091 (c === 0x20/* Space */) ||
18092 (c === 0x0A/* LF */) ||
18093 (c === 0x0D/* CR */);
18094}
18095
18096function is_FLOW_INDICATOR(c) {
18097 return c === 0x2C/* , */ ||
18098 c === 0x5B/* [ */ ||
18099 c === 0x5D/* ] */ ||
18100 c === 0x7B/* { */ ||
18101 c === 0x7D/* } */;
18102}
18103
18104function fromHexCode(c) {
18105 var lc;
18106
18107 if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
18108 return c - 0x30;
18109 }
18110
18111 /*eslint-disable no-bitwise*/
18112 lc = c | 0x20;
18113
18114 if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {
18115 return lc - 0x61 + 10;
18116 }
18117
18118 return -1;
18119}
18120
18121function escapedHexLen(c) {
18122 if (c === 0x78/* x */) { return 2; }
18123 if (c === 0x75/* u */) { return 4; }
18124 if (c === 0x55/* U */) { return 8; }
18125 return 0;
18126}
18127
18128function fromDecimalCode(c) {
18129 if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
18130 return c - 0x30;
18131 }
18132
18133 return -1;
18134}
18135
18136function simpleEscapeSequence(c) {
18137 /* eslint-disable indent */
18138 return (c === 0x30/* 0 */) ? '\x00' :
18139 (c === 0x61/* a */) ? '\x07' :
18140 (c === 0x62/* b */) ? '\x08' :
18141 (c === 0x74/* t */) ? '\x09' :
18142 (c === 0x09/* Tab */) ? '\x09' :
18143 (c === 0x6E/* n */) ? '\x0A' :
18144 (c === 0x76/* v */) ? '\x0B' :
18145 (c === 0x66/* f */) ? '\x0C' :
18146 (c === 0x72/* r */) ? '\x0D' :
18147 (c === 0x65/* e */) ? '\x1B' :
18148 (c === 0x20/* Space */) ? ' ' :
18149 (c === 0x22/* " */) ? '\x22' :
18150 (c === 0x2F/* / */) ? '/' :
18151 (c === 0x5C/* \ */) ? '\x5C' :
18152 (c === 0x4E/* N */) ? '\x85' :
18153 (c === 0x5F/* _ */) ? '\xA0' :
18154 (c === 0x4C/* L */) ? '\u2028' :
18155 (c === 0x50/* P */) ? '\u2029' : '';
18156}
18157
18158function charFromCodepoint(c) {
18159 if (c <= 0xFFFF) {
18160 return String.fromCharCode(c);
18161 }
18162 // Encode UTF-16 surrogate pair
18163 // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
18164 return String.fromCharCode(
18165 ((c - 0x010000) >> 10) + 0xD800,
18166 ((c - 0x010000) & 0x03FF) + 0xDC00
18167 );
18168}
18169
18170var simpleEscapeCheck = new Array(256); // integer, for fast access
18171var simpleEscapeMap = new Array(256);
18172for (var i = 0; i < 256; i++) {
18173 simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
18174 simpleEscapeMap[i] = simpleEscapeSequence(i);
18175}
18176
18177
18178function State(input, options) {
18179 this.input = input;
18180
18181 this.filename = options['filename'] || null;
18182 this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;
18183 this.onWarning = options['onWarning'] || null;
18184 this.legacy = options['legacy'] || false;
18185 this.json = options['json'] || false;
18186 this.listener = options['listener'] || null;
18187
18188 this.implicitTypes = this.schema.compiledImplicit;
18189 this.typeMap = this.schema.compiledTypeMap;
18190
18191 this.length = input.length;
18192 this.position = 0;
18193 this.line = 0;
18194 this.lineStart = 0;
18195 this.lineIndent = 0;
18196
18197 this.documents = [];
18198
18199 /*
18200 this.version;
18201 this.checkLineBreaks;
18202 this.tagMap;
18203 this.anchorMap;
18204 this.tag;
18205 this.anchor;
18206 this.kind;
18207 this.result;*/
18208
18209}
18210
18211
18212function generateError(state, message) {
18213 return new YAMLException(
18214 message,
18215 new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)));
18216}
18217
18218function throwError(state, message) {
18219 throw generateError(state, message);
18220}
18221
18222function throwWarning(state, message) {
18223 if (state.onWarning) {
18224 state.onWarning.call(null, generateError(state, message));
18225 }
18226}
18227
18228
18229var directiveHandlers = {
18230
18231 YAML: function handleYamlDirective(state, name, args) {
18232
18233 var match, major, minor;
18234
18235 if (state.version !== null) {
18236 throwError(state, 'duplication of %YAML directive');
18237 }
18238
18239 if (args.length !== 1) {
18240 throwError(state, 'YAML directive accepts exactly one argument');
18241 }
18242
18243 match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
18244
18245 if (match === null) {
18246 throwError(state, 'ill-formed argument of the YAML directive');
18247 }
18248
18249 major = parseInt(match[1], 10);
18250 minor = parseInt(match[2], 10);
18251
18252 if (major !== 1) {
18253 throwError(state, 'unacceptable YAML version of the document');
18254 }
18255
18256 state.version = args[0];
18257 state.checkLineBreaks = (minor < 2);
18258
18259 if (minor !== 1 && minor !== 2) {
18260 throwWarning(state, 'unsupported YAML version of the document');
18261 }
18262 },
18263
18264 TAG: function handleTagDirective(state, name, args) {
18265
18266 var handle, prefix;
18267
18268 if (args.length !== 2) {
18269 throwError(state, 'TAG directive accepts exactly two arguments');
18270 }
18271
18272 handle = args[0];
18273 prefix = args[1];
18274
18275 if (!PATTERN_TAG_HANDLE.test(handle)) {
18276 throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');
18277 }
18278
18279 if (_hasOwnProperty.call(state.tagMap, handle)) {
18280 throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
18281 }
18282
18283 if (!PATTERN_TAG_URI.test(prefix)) {
18284 throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');
18285 }
18286
18287 state.tagMap[handle] = prefix;
18288 }
18289};
18290
18291
18292function captureSegment(state, start, end, checkJson) {
18293 var _position, _length, _character, _result;
18294
18295 if (start < end) {
18296 _result = state.input.slice(start, end);
18297
18298 if (checkJson) {
18299 for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
18300 _character = _result.charCodeAt(_position);
18301 if (!(_character === 0x09 ||
18302 (0x20 <= _character && _character <= 0x10FFFF))) {
18303 throwError(state, 'expected valid JSON character');
18304 }
18305 }
18306 } else if (PATTERN_NON_PRINTABLE.test(_result)) {
18307 throwError(state, 'the stream contains non-printable characters');
18308 }
18309
18310 state.result += _result;
18311 }
18312}
18313
18314function mergeMappings(state, destination, source, overridableKeys) {
18315 var sourceKeys, key, index, quantity;
18316
18317 if (!common.isObject(source)) {
18318 throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
18319 }
18320
18321 sourceKeys = Object.keys(source);
18322
18323 for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
18324 key = sourceKeys[index];
18325
18326 if (!_hasOwnProperty.call(destination, key)) {
18327 destination[key] = source[key];
18328 overridableKeys[key] = true;
18329 }
18330 }
18331}
18332
18333function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {
18334 var index, quantity;
18335
18336 // The output is a plain object here, so keys can only be strings.
18337 // We need to convert keyNode to a string, but doing so can hang the process
18338 // (deeply nested arrays that explode exponentially using aliases).
18339 if (Array.isArray(keyNode)) {
18340 keyNode = Array.prototype.slice.call(keyNode);
18341
18342 for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
18343 if (Array.isArray(keyNode[index])) {
18344 throwError(state, 'nested arrays are not supported inside keys');
18345 }
18346
18347 if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {
18348 keyNode[index] = '[object Object]';
18349 }
18350 }
18351 }
18352
18353 // Avoid code execution in load() via toString property
18354 // (still use its own toString for arrays, timestamps,
18355 // and whatever user schema extensions happen to have @@toStringTag)
18356 if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {
18357 keyNode = '[object Object]';
18358 }
18359
18360
18361 keyNode = String(keyNode);
18362
18363 if (_result === null) {
18364 _result = {};
18365 }
18366
18367 if (keyTag === 'tag:yaml.org,2002:merge') {
18368 if (Array.isArray(valueNode)) {
18369 for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
18370 mergeMappings(state, _result, valueNode[index], overridableKeys);
18371 }
18372 } else {
18373 mergeMappings(state, _result, valueNode, overridableKeys);
18374 }
18375 } else {
18376 if (!state.json &&
18377 !_hasOwnProperty.call(overridableKeys, keyNode) &&
18378 _hasOwnProperty.call(_result, keyNode)) {
18379 state.line = startLine || state.line;
18380 state.position = startPos || state.position;
18381 throwError(state, 'duplicated mapping key');
18382 }
18383 _result[keyNode] = valueNode;
18384 delete overridableKeys[keyNode];
18385 }
18386
18387 return _result;
18388}
18389
18390function readLineBreak(state) {
18391 var ch;
18392
18393 ch = state.input.charCodeAt(state.position);
18394
18395 if (ch === 0x0A/* LF */) {
18396 state.position++;
18397 } else if (ch === 0x0D/* CR */) {
18398 state.position++;
18399 if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {
18400 state.position++;
18401 }
18402 } else {
18403 throwError(state, 'a line break is expected');
18404 }
18405
18406 state.line += 1;
18407 state.lineStart = state.position;
18408}
18409
18410function skipSeparationSpace(state, allowComments, checkIndent) {
18411 var lineBreaks = 0,
18412 ch = state.input.charCodeAt(state.position);
18413
18414 while (ch !== 0) {
18415 while (is_WHITE_SPACE(ch)) {
18416 ch = state.input.charCodeAt(++state.position);
18417 }
18418
18419 if (allowComments && ch === 0x23/* # */) {
18420 do {
18421 ch = state.input.charCodeAt(++state.position);
18422 } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);
18423 }
18424
18425 if (is_EOL(ch)) {
18426 readLineBreak(state);
18427
18428 ch = state.input.charCodeAt(state.position);
18429 lineBreaks++;
18430 state.lineIndent = 0;
18431
18432 while (ch === 0x20/* Space */) {
18433 state.lineIndent++;
18434 ch = state.input.charCodeAt(++state.position);
18435 }
18436 } else {
18437 break;
18438 }
18439 }
18440
18441 if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
18442 throwWarning(state, 'deficient indentation');
18443 }
18444
18445 return lineBreaks;
18446}
18447
18448function testDocumentSeparator(state) {
18449 var _position = state.position,
18450 ch;
18451
18452 ch = state.input.charCodeAt(_position);
18453
18454 // Condition state.position === state.lineStart is tested
18455 // in parent on each call, for efficiency. No needs to test here again.
18456 if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&
18457 ch === state.input.charCodeAt(_position + 1) &&
18458 ch === state.input.charCodeAt(_position + 2)) {
18459
18460 _position += 3;
18461
18462 ch = state.input.charCodeAt(_position);
18463
18464 if (ch === 0 || is_WS_OR_EOL(ch)) {
18465 return true;
18466 }
18467 }
18468
18469 return false;
18470}
18471
18472function writeFoldedLines(state, count) {
18473 if (count === 1) {
18474 state.result += ' ';
18475 } else if (count > 1) {
18476 state.result += common.repeat('\n', count - 1);
18477 }
18478}
18479
18480
18481function readPlainScalar(state, nodeIndent, withinFlowCollection) {
18482 var preceding,
18483 following,
18484 captureStart,
18485 captureEnd,
18486 hasPendingContent,
18487 _line,
18488 _lineStart,
18489 _lineIndent,
18490 _kind = state.kind,
18491 _result = state.result,
18492 ch;
18493
18494 ch = state.input.charCodeAt(state.position);
18495
18496 if (is_WS_OR_EOL(ch) ||
18497 is_FLOW_INDICATOR(ch) ||
18498 ch === 0x23/* # */ ||
18499 ch === 0x26/* & */ ||
18500 ch === 0x2A/* * */ ||
18501 ch === 0x21/* ! */ ||
18502 ch === 0x7C/* | */ ||
18503 ch === 0x3E/* > */ ||
18504 ch === 0x27/* ' */ ||
18505 ch === 0x22/* " */ ||
18506 ch === 0x25/* % */ ||
18507 ch === 0x40/* @ */ ||
18508 ch === 0x60/* ` */) {
18509 return false;
18510 }
18511
18512 if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {
18513 following = state.input.charCodeAt(state.position + 1);
18514
18515 if (is_WS_OR_EOL(following) ||
18516 withinFlowCollection && is_FLOW_INDICATOR(following)) {
18517 return false;
18518 }
18519 }
18520
18521 state.kind = 'scalar';
18522 state.result = '';
18523 captureStart = captureEnd = state.position;
18524 hasPendingContent = false;
18525
18526 while (ch !== 0) {
18527 if (ch === 0x3A/* : */) {
18528 following = state.input.charCodeAt(state.position + 1);
18529
18530 if (is_WS_OR_EOL(following) ||
18531 withinFlowCollection && is_FLOW_INDICATOR(following)) {
18532 break;
18533 }
18534
18535 } else if (ch === 0x23/* # */) {
18536 preceding = state.input.charCodeAt(state.position - 1);
18537
18538 if (is_WS_OR_EOL(preceding)) {
18539 break;
18540 }
18541
18542 } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||
18543 withinFlowCollection && is_FLOW_INDICATOR(ch)) {
18544 break;
18545
18546 } else if (is_EOL(ch)) {
18547 _line = state.line;
18548 _lineStart = state.lineStart;
18549 _lineIndent = state.lineIndent;
18550 skipSeparationSpace(state, false, -1);
18551
18552 if (state.lineIndent >= nodeIndent) {
18553 hasPendingContent = true;
18554 ch = state.input.charCodeAt(state.position);
18555 continue;
18556 } else {
18557 state.position = captureEnd;
18558 state.line = _line;
18559 state.lineStart = _lineStart;
18560 state.lineIndent = _lineIndent;
18561 break;
18562 }
18563 }
18564
18565 if (hasPendingContent) {
18566 captureSegment(state, captureStart, captureEnd, false);
18567 writeFoldedLines(state, state.line - _line);
18568 captureStart = captureEnd = state.position;
18569 hasPendingContent = false;
18570 }
18571
18572 if (!is_WHITE_SPACE(ch)) {
18573 captureEnd = state.position + 1;
18574 }
18575
18576 ch = state.input.charCodeAt(++state.position);
18577 }
18578
18579 captureSegment(state, captureStart, captureEnd, false);
18580
18581 if (state.result) {
18582 return true;
18583 }
18584
18585 state.kind = _kind;
18586 state.result = _result;
18587 return false;
18588}
18589
18590function readSingleQuotedScalar(state, nodeIndent) {
18591 var ch,
18592 captureStart, captureEnd;
18593
18594 ch = state.input.charCodeAt(state.position);
18595
18596 if (ch !== 0x27/* ' */) {
18597 return false;
18598 }
18599
18600 state.kind = 'scalar';
18601 state.result = '';
18602 state.position++;
18603 captureStart = captureEnd = state.position;
18604
18605 while ((ch = state.input.charCodeAt(state.position)) !== 0) {
18606 if (ch === 0x27/* ' */) {
18607 captureSegment(state, captureStart, state.position, true);
18608 ch = state.input.charCodeAt(++state.position);
18609
18610 if (ch === 0x27/* ' */) {
18611 captureStart = state.position;
18612 state.position++;
18613 captureEnd = state.position;
18614 } else {
18615 return true;
18616 }
18617
18618 } else if (is_EOL(ch)) {
18619 captureSegment(state, captureStart, captureEnd, true);
18620 writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
18621 captureStart = captureEnd = state.position;
18622
18623 } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
18624 throwError(state, 'unexpected end of the document within a single quoted scalar');
18625
18626 } else {
18627 state.position++;
18628 captureEnd = state.position;
18629 }
18630 }
18631
18632 throwError(state, 'unexpected end of the stream within a single quoted scalar');
18633}
18634
18635function readDoubleQuotedScalar(state, nodeIndent) {
18636 var captureStart,
18637 captureEnd,
18638 hexLength,
18639 hexResult,
18640 tmp,
18641 ch;
18642
18643 ch = state.input.charCodeAt(state.position);
18644
18645 if (ch !== 0x22/* " */) {
18646 return false;
18647 }
18648
18649 state.kind = 'scalar';
18650 state.result = '';
18651 state.position++;
18652 captureStart = captureEnd = state.position;
18653
18654 while ((ch = state.input.charCodeAt(state.position)) !== 0) {
18655 if (ch === 0x22/* " */) {
18656 captureSegment(state, captureStart, state.position, true);
18657 state.position++;
18658 return true;
18659
18660 } else if (ch === 0x5C/* \ */) {
18661 captureSegment(state, captureStart, state.position, true);
18662 ch = state.input.charCodeAt(++state.position);
18663
18664 if (is_EOL(ch)) {
18665 skipSeparationSpace(state, false, nodeIndent);
18666
18667 // TODO: rework to inline fn with no type cast?
18668 } else if (ch < 256 && simpleEscapeCheck[ch]) {
18669 state.result += simpleEscapeMap[ch];
18670 state.position++;
18671
18672 } else if ((tmp = escapedHexLen(ch)) > 0) {
18673 hexLength = tmp;
18674 hexResult = 0;
18675
18676 for (; hexLength > 0; hexLength--) {
18677 ch = state.input.charCodeAt(++state.position);
18678
18679 if ((tmp = fromHexCode(ch)) >= 0) {
18680 hexResult = (hexResult << 4) + tmp;
18681
18682 } else {
18683 throwError(state, 'expected hexadecimal character');
18684 }
18685 }
18686
18687 state.result += charFromCodepoint(hexResult);
18688
18689 state.position++;
18690
18691 } else {
18692 throwError(state, 'unknown escape sequence');
18693 }
18694
18695 captureStart = captureEnd = state.position;
18696
18697 } else if (is_EOL(ch)) {
18698 captureSegment(state, captureStart, captureEnd, true);
18699 writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
18700 captureStart = captureEnd = state.position;
18701
18702 } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
18703 throwError(state, 'unexpected end of the document within a double quoted scalar');
18704
18705 } else {
18706 state.position++;
18707 captureEnd = state.position;
18708 }
18709 }
18710
18711 throwError(state, 'unexpected end of the stream within a double quoted scalar');
18712}
18713
18714function readFlowCollection(state, nodeIndent) {
18715 var readNext = true,
18716 _line,
18717 _tag = state.tag,
18718 _result,
18719 _anchor = state.anchor,
18720 following,
18721 terminator,
18722 isPair,
18723 isExplicitPair,
18724 isMapping,
18725 overridableKeys = {},
18726 keyNode,
18727 keyTag,
18728 valueNode,
18729 ch;
18730
18731 ch = state.input.charCodeAt(state.position);
18732
18733 if (ch === 0x5B/* [ */) {
18734 terminator = 0x5D;/* ] */
18735 isMapping = false;
18736 _result = [];
18737 } else if (ch === 0x7B/* { */) {
18738 terminator = 0x7D;/* } */
18739 isMapping = true;
18740 _result = {};
18741 } else {
18742 return false;
18743 }
18744
18745 if (state.anchor !== null) {
18746 state.anchorMap[state.anchor] = _result;
18747 }
18748
18749 ch = state.input.charCodeAt(++state.position);
18750
18751 while (ch !== 0) {
18752 skipSeparationSpace(state, true, nodeIndent);
18753
18754 ch = state.input.charCodeAt(state.position);
18755
18756 if (ch === terminator) {
18757 state.position++;
18758 state.tag = _tag;
18759 state.anchor = _anchor;
18760 state.kind = isMapping ? 'mapping' : 'sequence';
18761 state.result = _result;
18762 return true;
18763 } else if (!readNext) {
18764 throwError(state, 'missed comma between flow collection entries');
18765 }
18766
18767 keyTag = keyNode = valueNode = null;
18768 isPair = isExplicitPair = false;
18769
18770 if (ch === 0x3F/* ? */) {
18771 following = state.input.charCodeAt(state.position + 1);
18772
18773 if (is_WS_OR_EOL(following)) {
18774 isPair = isExplicitPair = true;
18775 state.position++;
18776 skipSeparationSpace(state, true, nodeIndent);
18777 }
18778 }
18779
18780 _line = state.line;
18781 composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
18782 keyTag = state.tag;
18783 keyNode = state.result;
18784 skipSeparationSpace(state, true, nodeIndent);
18785
18786 ch = state.input.charCodeAt(state.position);
18787
18788 if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {
18789 isPair = true;
18790 ch = state.input.charCodeAt(++state.position);
18791 skipSeparationSpace(state, true, nodeIndent);
18792 composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
18793 valueNode = state.result;
18794 }
18795
18796 if (isMapping) {
18797 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);
18798 } else if (isPair) {
18799 _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));
18800 } else {
18801 _result.push(keyNode);
18802 }
18803
18804 skipSeparationSpace(state, true, nodeIndent);
18805
18806 ch = state.input.charCodeAt(state.position);
18807
18808 if (ch === 0x2C/* , */) {
18809 readNext = true;
18810 ch = state.input.charCodeAt(++state.position);
18811 } else {
18812 readNext = false;
18813 }
18814 }
18815
18816 throwError(state, 'unexpected end of the stream within a flow collection');
18817}
18818
18819function readBlockScalar(state, nodeIndent) {
18820 var captureStart,
18821 folding,
18822 chomping = CHOMPING_CLIP,
18823 didReadContent = false,
18824 detectedIndent = false,
18825 textIndent = nodeIndent,
18826 emptyLines = 0,
18827 atMoreIndented = false,
18828 tmp,
18829 ch;
18830
18831 ch = state.input.charCodeAt(state.position);
18832
18833 if (ch === 0x7C/* | */) {
18834 folding = false;
18835 } else if (ch === 0x3E/* > */) {
18836 folding = true;
18837 } else {
18838 return false;
18839 }
18840
18841 state.kind = 'scalar';
18842 state.result = '';
18843
18844 while (ch !== 0) {
18845 ch = state.input.charCodeAt(++state.position);
18846
18847 if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
18848 if (CHOMPING_CLIP === chomping) {
18849 chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;
18850 } else {
18851 throwError(state, 'repeat of a chomping mode identifier');
18852 }
18853
18854 } else if ((tmp = fromDecimalCode(ch)) >= 0) {
18855 if (tmp === 0) {
18856 throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');
18857 } else if (!detectedIndent) {
18858 textIndent = nodeIndent + tmp - 1;
18859 detectedIndent = true;
18860 } else {
18861 throwError(state, 'repeat of an indentation width identifier');
18862 }
18863
18864 } else {
18865 break;
18866 }
18867 }
18868
18869 if (is_WHITE_SPACE(ch)) {
18870 do { ch = state.input.charCodeAt(++state.position); }
18871 while (is_WHITE_SPACE(ch));
18872
18873 if (ch === 0x23/* # */) {
18874 do { ch = state.input.charCodeAt(++state.position); }
18875 while (!is_EOL(ch) && (ch !== 0));
18876 }
18877 }
18878
18879 while (ch !== 0) {
18880 readLineBreak(state);
18881 state.lineIndent = 0;
18882
18883 ch = state.input.charCodeAt(state.position);
18884
18885 while ((!detectedIndent || state.lineIndent < textIndent) &&
18886 (ch === 0x20/* Space */)) {
18887 state.lineIndent++;
18888 ch = state.input.charCodeAt(++state.position);
18889 }
18890
18891 if (!detectedIndent && state.lineIndent > textIndent) {
18892 textIndent = state.lineIndent;
18893 }
18894
18895 if (is_EOL(ch)) {
18896 emptyLines++;
18897 continue;
18898 }
18899
18900 // End of the scalar.
18901 if (state.lineIndent < textIndent) {
18902
18903 // Perform the chomping.
18904 if (chomping === CHOMPING_KEEP) {
18905 state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
18906 } else if (chomping === CHOMPING_CLIP) {
18907 if (didReadContent) { // i.e. only if the scalar is not empty.
18908 state.result += '\n';
18909 }
18910 }
18911
18912 // Break this `while` cycle and go to the funciton's epilogue.
18913 break;
18914 }
18915
18916 // Folded style: use fancy rules to handle line breaks.
18917 if (folding) {
18918
18919 // Lines starting with white space characters (more-indented lines) are not folded.
18920 if (is_WHITE_SPACE(ch)) {
18921 atMoreIndented = true;
18922 // except for the first content line (cf. Example 8.1)
18923 state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
18924
18925 // End of more-indented block.
18926 } else if (atMoreIndented) {
18927 atMoreIndented = false;
18928 state.result += common.repeat('\n', emptyLines + 1);
18929
18930 // Just one line break - perceive as the same line.
18931 } else if (emptyLines === 0) {
18932 if (didReadContent) { // i.e. only if we have already read some scalar content.
18933 state.result += ' ';
18934 }
18935
18936 // Several line breaks - perceive as different lines.
18937 } else {
18938 state.result += common.repeat('\n', emptyLines);
18939 }
18940
18941 // Literal style: just add exact number of line breaks between content lines.
18942 } else {
18943 // Keep all line breaks except the header line break.
18944 state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
18945 }
18946
18947 didReadContent = true;
18948 detectedIndent = true;
18949 emptyLines = 0;
18950 captureStart = state.position;
18951
18952 while (!is_EOL(ch) && (ch !== 0)) {
18953 ch = state.input.charCodeAt(++state.position);
18954 }
18955
18956 captureSegment(state, captureStart, state.position, false);
18957 }
18958
18959 return true;
18960}
18961
18962function readBlockSequence(state, nodeIndent) {
18963 var _line,
18964 _tag = state.tag,
18965 _anchor = state.anchor,
18966 _result = [],
18967 following,
18968 detected = false,
18969 ch;
18970
18971 if (state.anchor !== null) {
18972 state.anchorMap[state.anchor] = _result;
18973 }
18974
18975 ch = state.input.charCodeAt(state.position);
18976
18977 while (ch !== 0) {
18978
18979 if (ch !== 0x2D/* - */) {
18980 break;
18981 }
18982
18983 following = state.input.charCodeAt(state.position + 1);
18984
18985 if (!is_WS_OR_EOL(following)) {
18986 break;
18987 }
18988
18989 detected = true;
18990 state.position++;
18991
18992 if (skipSeparationSpace(state, true, -1)) {
18993 if (state.lineIndent <= nodeIndent) {
18994 _result.push(null);
18995 ch = state.input.charCodeAt(state.position);
18996 continue;
18997 }
18998 }
18999
19000 _line = state.line;
19001 composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
19002 _result.push(state.result);
19003 skipSeparationSpace(state, true, -1);
19004
19005 ch = state.input.charCodeAt(state.position);
19006
19007 if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
19008 throwError(state, 'bad indentation of a sequence entry');
19009 } else if (state.lineIndent < nodeIndent) {
19010 break;
19011 }
19012 }
19013
19014 if (detected) {
19015 state.tag = _tag;
19016 state.anchor = _anchor;
19017 state.kind = 'sequence';
19018 state.result = _result;
19019 return true;
19020 }
19021 return false;
19022}
19023
19024function readBlockMapping(state, nodeIndent, flowIndent) {
19025 var following,
19026 allowCompact,
19027 _line,
19028 _pos,
19029 _tag = state.tag,
19030 _anchor = state.anchor,
19031 _result = {},
19032 overridableKeys = {},
19033 keyTag = null,
19034 keyNode = null,
19035 valueNode = null,
19036 atExplicitKey = false,
19037 detected = false,
19038 ch;
19039
19040 if (state.anchor !== null) {
19041 state.anchorMap[state.anchor] = _result;
19042 }
19043
19044 ch = state.input.charCodeAt(state.position);
19045
19046 while (ch !== 0) {
19047 following = state.input.charCodeAt(state.position + 1);
19048 _line = state.line; // Save the current line.
19049 _pos = state.position;
19050
19051 //
19052 // Explicit notation case. There are two separate blocks:
19053 // first for the key (denoted by "?") and second for the value (denoted by ":")
19054 //
19055 if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {
19056
19057 if (ch === 0x3F/* ? */) {
19058 if (atExplicitKey) {
19059 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
19060 keyTag = keyNode = valueNode = null;
19061 }
19062
19063 detected = true;
19064 atExplicitKey = true;
19065 allowCompact = true;
19066
19067 } else if (atExplicitKey) {
19068 // i.e. 0x3A/* : */ === character after the explicit key.
19069 atExplicitKey = false;
19070 allowCompact = true;
19071
19072 } else {
19073 throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
19074 }
19075
19076 state.position += 1;
19077 ch = following;
19078
19079 //
19080 // Implicit notation case. Flow-style node as the key first, then ":", and the value.
19081 //
19082 } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
19083
19084 if (state.line === _line) {
19085 ch = state.input.charCodeAt(state.position);
19086
19087 while (is_WHITE_SPACE(ch)) {
19088 ch = state.input.charCodeAt(++state.position);
19089 }
19090
19091 if (ch === 0x3A/* : */) {
19092 ch = state.input.charCodeAt(++state.position);
19093
19094 if (!is_WS_OR_EOL(ch)) {
19095 throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');
19096 }
19097
19098 if (atExplicitKey) {
19099 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
19100 keyTag = keyNode = valueNode = null;
19101 }
19102
19103 detected = true;
19104 atExplicitKey = false;
19105 allowCompact = false;
19106 keyTag = state.tag;
19107 keyNode = state.result;
19108
19109 } else if (detected) {
19110 throwError(state, 'can not read an implicit mapping pair; a colon is missed');
19111
19112 } else {
19113 state.tag = _tag;
19114 state.anchor = _anchor;
19115 return true; // Keep the result of `composeNode`.
19116 }
19117
19118 } else if (detected) {
19119 throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');
19120
19121 } else {
19122 state.tag = _tag;
19123 state.anchor = _anchor;
19124 return true; // Keep the result of `composeNode`.
19125 }
19126
19127 } else {
19128 break; // Reading is done. Go to the epilogue.
19129 }
19130
19131 //
19132 // Common reading code for both explicit and implicit notations.
19133 //
19134 if (state.line === _line || state.lineIndent > nodeIndent) {
19135 if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
19136 if (atExplicitKey) {
19137 keyNode = state.result;
19138 } else {
19139 valueNode = state.result;
19140 }
19141 }
19142
19143 if (!atExplicitKey) {
19144 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos);
19145 keyTag = keyNode = valueNode = null;
19146 }
19147
19148 skipSeparationSpace(state, true, -1);
19149 ch = state.input.charCodeAt(state.position);
19150 }
19151
19152 if (state.lineIndent > nodeIndent && (ch !== 0)) {
19153 throwError(state, 'bad indentation of a mapping entry');
19154 } else if (state.lineIndent < nodeIndent) {
19155 break;
19156 }
19157 }
19158
19159 //
19160 // Epilogue.
19161 //
19162
19163 // Special case: last mapping's node contains only the key in explicit notation.
19164 if (atExplicitKey) {
19165 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);
19166 }
19167
19168 // Expose the resulting mapping.
19169 if (detected) {
19170 state.tag = _tag;
19171 state.anchor = _anchor;
19172 state.kind = 'mapping';
19173 state.result = _result;
19174 }
19175
19176 return detected;
19177}
19178
19179function readTagProperty(state) {
19180 var _position,
19181 isVerbatim = false,
19182 isNamed = false,
19183 tagHandle,
19184 tagName,
19185 ch;
19186
19187 ch = state.input.charCodeAt(state.position);
19188
19189 if (ch !== 0x21/* ! */) return false;
19190
19191 if (state.tag !== null) {
19192 throwError(state, 'duplication of a tag property');
19193 }
19194
19195 ch = state.input.charCodeAt(++state.position);
19196
19197 if (ch === 0x3C/* < */) {
19198 isVerbatim = true;
19199 ch = state.input.charCodeAt(++state.position);
19200
19201 } else if (ch === 0x21/* ! */) {
19202 isNamed = true;
19203 tagHandle = '!!';
19204 ch = state.input.charCodeAt(++state.position);
19205
19206 } else {
19207 tagHandle = '!';
19208 }
19209
19210 _position = state.position;
19211
19212 if (isVerbatim) {
19213 do { ch = state.input.charCodeAt(++state.position); }
19214 while (ch !== 0 && ch !== 0x3E/* > */);
19215
19216 if (state.position < state.length) {
19217 tagName = state.input.slice(_position, state.position);
19218 ch = state.input.charCodeAt(++state.position);
19219 } else {
19220 throwError(state, 'unexpected end of the stream within a verbatim tag');
19221 }
19222 } else {
19223 while (ch !== 0 && !is_WS_OR_EOL(ch)) {
19224
19225 if (ch === 0x21/* ! */) {
19226 if (!isNamed) {
19227 tagHandle = state.input.slice(_position - 1, state.position + 1);
19228
19229 if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
19230 throwError(state, 'named tag handle cannot contain such characters');
19231 }
19232
19233 isNamed = true;
19234 _position = state.position + 1;
19235 } else {
19236 throwError(state, 'tag suffix cannot contain exclamation marks');
19237 }
19238 }
19239
19240 ch = state.input.charCodeAt(++state.position);
19241 }
19242
19243 tagName = state.input.slice(_position, state.position);
19244
19245 if (PATTERN_FLOW_INDICATORS.test(tagName)) {
19246 throwError(state, 'tag suffix cannot contain flow indicator characters');
19247 }
19248 }
19249
19250 if (tagName && !PATTERN_TAG_URI.test(tagName)) {
19251 throwError(state, 'tag name cannot contain such characters: ' + tagName);
19252 }
19253
19254 if (isVerbatim) {
19255 state.tag = tagName;
19256
19257 } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
19258 state.tag = state.tagMap[tagHandle] + tagName;
19259
19260 } else if (tagHandle === '!') {
19261 state.tag = '!' + tagName;
19262
19263 } else if (tagHandle === '!!') {
19264 state.tag = 'tag:yaml.org,2002:' + tagName;
19265
19266 } else {
19267 throwError(state, 'undeclared tag handle "' + tagHandle + '"');
19268 }
19269
19270 return true;
19271}
19272
19273function readAnchorProperty(state) {
19274 var _position,
19275 ch;
19276
19277 ch = state.input.charCodeAt(state.position);
19278
19279 if (ch !== 0x26/* & */) return false;
19280
19281 if (state.anchor !== null) {
19282 throwError(state, 'duplication of an anchor property');
19283 }
19284
19285 ch = state.input.charCodeAt(++state.position);
19286 _position = state.position;
19287
19288 while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
19289 ch = state.input.charCodeAt(++state.position);
19290 }
19291
19292 if (state.position === _position) {
19293 throwError(state, 'name of an anchor node must contain at least one character');
19294 }
19295
19296 state.anchor = state.input.slice(_position, state.position);
19297 return true;
19298}
19299
19300function readAlias(state) {
19301 var _position, alias,
19302 ch;
19303
19304 ch = state.input.charCodeAt(state.position);
19305
19306 if (ch !== 0x2A/* * */) return false;
19307
19308 ch = state.input.charCodeAt(++state.position);
19309 _position = state.position;
19310
19311 while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
19312 ch = state.input.charCodeAt(++state.position);
19313 }
19314
19315 if (state.position === _position) {
19316 throwError(state, 'name of an alias node must contain at least one character');
19317 }
19318
19319 alias = state.input.slice(_position, state.position);
19320
19321 if (!state.anchorMap.hasOwnProperty(alias)) {
19322 throwError(state, 'unidentified alias "' + alias + '"');
19323 }
19324
19325 state.result = state.anchorMap[alias];
19326 skipSeparationSpace(state, true, -1);
19327 return true;
19328}
19329
19330function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
19331 var allowBlockStyles,
19332 allowBlockScalars,
19333 allowBlockCollections,
19334 indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent
19335 atNewLine = false,
19336 hasContent = false,
19337 typeIndex,
19338 typeQuantity,
19339 type,
19340 flowIndent,
19341 blockIndent;
19342
19343 if (state.listener !== null) {
19344 state.listener('open', state);
19345 }
19346
19347 state.tag = null;
19348 state.anchor = null;
19349 state.kind = null;
19350 state.result = null;
19351
19352 allowBlockStyles = allowBlockScalars = allowBlockCollections =
19353 CONTEXT_BLOCK_OUT === nodeContext ||
19354 CONTEXT_BLOCK_IN === nodeContext;
19355
19356 if (allowToSeek) {
19357 if (skipSeparationSpace(state, true, -1)) {
19358 atNewLine = true;
19359
19360 if (state.lineIndent > parentIndent) {
19361 indentStatus = 1;
19362 } else if (state.lineIndent === parentIndent) {
19363 indentStatus = 0;
19364 } else if (state.lineIndent < parentIndent) {
19365 indentStatus = -1;
19366 }
19367 }
19368 }
19369
19370 if (indentStatus === 1) {
19371 while (readTagProperty(state) || readAnchorProperty(state)) {
19372 if (skipSeparationSpace(state, true, -1)) {
19373 atNewLine = true;
19374 allowBlockCollections = allowBlockStyles;
19375
19376 if (state.lineIndent > parentIndent) {
19377 indentStatus = 1;
19378 } else if (state.lineIndent === parentIndent) {
19379 indentStatus = 0;
19380 } else if (state.lineIndent < parentIndent) {
19381 indentStatus = -1;
19382 }
19383 } else {
19384 allowBlockCollections = false;
19385 }
19386 }
19387 }
19388
19389 if (allowBlockCollections) {
19390 allowBlockCollections = atNewLine || allowCompact;
19391 }
19392
19393 if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
19394 if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
19395 flowIndent = parentIndent;
19396 } else {
19397 flowIndent = parentIndent + 1;
19398 }
19399
19400 blockIndent = state.position - state.lineStart;
19401
19402 if (indentStatus === 1) {
19403 if (allowBlockCollections &&
19404 (readBlockSequence(state, blockIndent) ||
19405 readBlockMapping(state, blockIndent, flowIndent)) ||
19406 readFlowCollection(state, flowIndent)) {
19407 hasContent = true;
19408 } else {
19409 if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||
19410 readSingleQuotedScalar(state, flowIndent) ||
19411 readDoubleQuotedScalar(state, flowIndent)) {
19412 hasContent = true;
19413
19414 } else if (readAlias(state)) {
19415 hasContent = true;
19416
19417 if (state.tag !== null || state.anchor !== null) {
19418 throwError(state, 'alias node should not have any properties');
19419 }
19420
19421 } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
19422 hasContent = true;
19423
19424 if (state.tag === null) {
19425 state.tag = '?';
19426 }
19427 }
19428
19429 if (state.anchor !== null) {
19430 state.anchorMap[state.anchor] = state.result;
19431 }
19432 }
19433 } else if (indentStatus === 0) {
19434 // Special case: block sequences are allowed to have same indentation level as the parent.
19435 // http://www.yaml.org/spec/1.2/spec.html#id2799784
19436 hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
19437 }
19438 }
19439
19440 if (state.tag !== null && state.tag !== '!') {
19441 if (state.tag === '?') {
19442 // Implicit resolving is not allowed for non-scalar types, and '?'
19443 // non-specific tag is only automatically assigned to plain scalars.
19444 //
19445 // We only need to check kind conformity in case user explicitly assigns '?'
19446 // tag, for example like this: "!<?> [0]"
19447 //
19448 if (state.result !== null && state.kind !== 'scalar') {
19449 throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
19450 }
19451
19452 for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
19453 type = state.implicitTypes[typeIndex];
19454
19455 if (type.resolve(state.result)) { // `state.result` updated in resolver if matched
19456 state.result = type.construct(state.result);
19457 state.tag = type.tag;
19458 if (state.anchor !== null) {
19459 state.anchorMap[state.anchor] = state.result;
19460 }
19461 break;
19462 }
19463 }
19464 } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {
19465 type = state.typeMap[state.kind || 'fallback'][state.tag];
19466
19467 if (state.result !== null && type.kind !== state.kind) {
19468 throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
19469 }
19470
19471 if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched
19472 throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');
19473 } else {
19474 state.result = type.construct(state.result);
19475 if (state.anchor !== null) {
19476 state.anchorMap[state.anchor] = state.result;
19477 }
19478 }
19479 } else {
19480 throwError(state, 'unknown tag !<' + state.tag + '>');
19481 }
19482 }
19483
19484 if (state.listener !== null) {
19485 state.listener('close', state);
19486 }
19487 return state.tag !== null || state.anchor !== null || hasContent;
19488}
19489
19490function readDocument(state) {
19491 var documentStart = state.position,
19492 _position,
19493 directiveName,
19494 directiveArgs,
19495 hasDirectives = false,
19496 ch;
19497
19498 state.version = null;
19499 state.checkLineBreaks = state.legacy;
19500 state.tagMap = {};
19501 state.anchorMap = {};
19502
19503 while ((ch = state.input.charCodeAt(state.position)) !== 0) {
19504 skipSeparationSpace(state, true, -1);
19505
19506 ch = state.input.charCodeAt(state.position);
19507
19508 if (state.lineIndent > 0 || ch !== 0x25/* % */) {
19509 break;
19510 }
19511
19512 hasDirectives = true;
19513 ch = state.input.charCodeAt(++state.position);
19514 _position = state.position;
19515
19516 while (ch !== 0 && !is_WS_OR_EOL(ch)) {
19517 ch = state.input.charCodeAt(++state.position);
19518 }
19519
19520 directiveName = state.input.slice(_position, state.position);
19521 directiveArgs = [];
19522
19523 if (directiveName.length < 1) {
19524 throwError(state, 'directive name must not be less than one character in length');
19525 }
19526
19527 while (ch !== 0) {
19528 while (is_WHITE_SPACE(ch)) {
19529 ch = state.input.charCodeAt(++state.position);
19530 }
19531
19532 if (ch === 0x23/* # */) {
19533 do { ch = state.input.charCodeAt(++state.position); }
19534 while (ch !== 0 && !is_EOL(ch));
19535 break;
19536 }
19537
19538 if (is_EOL(ch)) break;
19539
19540 _position = state.position;
19541
19542 while (ch !== 0 && !is_WS_OR_EOL(ch)) {
19543 ch = state.input.charCodeAt(++state.position);
19544 }
19545
19546 directiveArgs.push(state.input.slice(_position, state.position));
19547 }
19548
19549 if (ch !== 0) readLineBreak(state);
19550
19551 if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
19552 directiveHandlers[directiveName](state, directiveName, directiveArgs);
19553 } else {
19554 throwWarning(state, 'unknown document directive "' + directiveName + '"');
19555 }
19556 }
19557
19558 skipSeparationSpace(state, true, -1);
19559
19560 if (state.lineIndent === 0 &&
19561 state.input.charCodeAt(state.position) === 0x2D/* - */ &&
19562 state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&
19563 state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {
19564 state.position += 3;
19565 skipSeparationSpace(state, true, -1);
19566
19567 } else if (hasDirectives) {
19568 throwError(state, 'directives end mark is expected');
19569 }
19570
19571 composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
19572 skipSeparationSpace(state, true, -1);
19573
19574 if (state.checkLineBreaks &&
19575 PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
19576 throwWarning(state, 'non-ASCII line breaks are interpreted as content');
19577 }
19578
19579 state.documents.push(state.result);
19580
19581 if (state.position === state.lineStart && testDocumentSeparator(state)) {
19582
19583 if (state.input.charCodeAt(state.position) === 0x2E/* . */) {
19584 state.position += 3;
19585 skipSeparationSpace(state, true, -1);
19586 }
19587 return;
19588 }
19589
19590 if (state.position < (state.length - 1)) {
19591 throwError(state, 'end of the stream or a document separator is expected');
19592 } else {
19593 return;
19594 }
19595}
19596
19597
19598function loadDocuments(input, options) {
19599 input = String(input);
19600 options = options || {};
19601
19602 if (input.length !== 0) {
19603
19604 // Add tailing `\n` if not exists
19605 if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&
19606 input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {
19607 input += '\n';
19608 }
19609
19610 // Strip BOM
19611 if (input.charCodeAt(0) === 0xFEFF) {
19612 input = input.slice(1);
19613 }
19614 }
19615
19616 var state = new State(input, options);
19617
19618 var nullpos = input.indexOf('\0');
19619
19620 if (nullpos !== -1) {
19621 state.position = nullpos;
19622 throwError(state, 'null byte is not allowed in input');
19623 }
19624
19625 // Use 0 as string terminator. That significantly simplifies bounds check.
19626 state.input += '\0';
19627
19628 while (state.input.charCodeAt(state.position) === 0x20/* Space */) {
19629 state.lineIndent += 1;
19630 state.position += 1;
19631 }
19632
19633 while (state.position < (state.length - 1)) {
19634 readDocument(state);
19635 }
19636
19637 return state.documents;
19638}
19639
19640
19641function loadAll(input, iterator, options) {
19642 if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {
19643 options = iterator;
19644 iterator = null;
19645 }
19646
19647 var documents = loadDocuments(input, options);
19648
19649 if (typeof iterator !== 'function') {
19650 return documents;
19651 }
19652
19653 for (var index = 0, length = documents.length; index < length; index += 1) {
19654 iterator(documents[index]);
19655 }
19656}
19657
19658
19659function load(input, options) {
19660 var documents = loadDocuments(input, options);
19661
19662 if (documents.length === 0) {
19663 /*eslint-disable no-undefined*/
19664 return undefined;
19665 } else if (documents.length === 1) {
19666 return documents[0];
19667 }
19668 throw new YAMLException('expected a single document in the stream, but found more');
19669}
19670
19671
19672function safeLoadAll(input, iterator, options) {
19673 if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') {
19674 options = iterator;
19675 iterator = null;
19676 }
19677
19678 return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
19679}
19680
19681
19682function safeLoad(input, options) {
19683 return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
19684}
19685
19686
19687module.exports.loadAll = loadAll;
19688module.exports.load = load;
19689module.exports.safeLoadAll = safeLoadAll;
19690module.exports.safeLoad = safeLoad;
19691
19692
19693/***/ }),
19694/* 258 */
19695/***/ (function(module, exports, __webpack_require__) {
19696
19697"use strict";
19698
19699
19700
19701var common = __webpack_require__(42);
19702
19703
19704function Mark(name, buffer, position, line, column) {
19705 this.name = name;
19706 this.buffer = buffer;
19707 this.position = position;
19708 this.line = line;
19709 this.column = column;
19710}
19711
19712
19713Mark.prototype.getSnippet = function getSnippet(indent, maxLength) {
19714 var head, start, tail, end, snippet;
19715
19716 if (!this.buffer) return null;
19717
19718 indent = indent || 4;
19719 maxLength = maxLength || 75;
19720
19721 head = '';
19722 start = this.position;
19723
19724 while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) {
19725 start -= 1;
19726 if (this.position - start > (maxLength / 2 - 1)) {
19727 head = ' ... ';
19728 start += 5;
19729 break;
19730 }
19731 }
19732
19733 tail = '';
19734 end = this.position;
19735
19736 while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) {
19737 end += 1;
19738 if (end - this.position > (maxLength / 2 - 1)) {
19739 tail = ' ... ';
19740 end -= 5;
19741 break;
19742 }
19743 }
19744
19745 snippet = this.buffer.slice(start, end);
19746
19747 return common.repeat(' ', indent) + head + snippet + tail + '\n' +
19748 common.repeat(' ', indent + this.position - start + head.length) + '^';
19749};
19750
19751
19752Mark.prototype.toString = function toString(compact) {
19753 var snippet, where = '';
19754
19755 if (this.name) {
19756 where += 'in "' + this.name + '" ';
19757 }
19758
19759 where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);
19760
19761 if (!compact) {
19762 snippet = this.getSnippet();
19763
19764 if (snippet) {
19765 where += ':\n' + snippet;
19766 }
19767 }
19768
19769 return where;
19770};
19771
19772
19773module.exports = Mark;
19774
19775
19776/***/ }),
19777/* 259 */
19778/***/ (function(module, exports, __webpack_require__) {
19779
19780"use strict";
19781
19782
19783var Type = __webpack_require__(8);
19784
19785module.exports = new Type('tag:yaml.org,2002:str', {
19786 kind: 'scalar',
19787 construct: function (data) { return data !== null ? data : ''; }
19788});
19789
19790
19791/***/ }),
19792/* 260 */
19793/***/ (function(module, exports, __webpack_require__) {
19794
19795"use strict";
19796
19797
19798var Type = __webpack_require__(8);
19799
19800module.exports = new Type('tag:yaml.org,2002:seq', {
19801 kind: 'sequence',
19802 construct: function (data) { return data !== null ? data : []; }
19803});
19804
19805
19806/***/ }),
19807/* 261 */
19808/***/ (function(module, exports, __webpack_require__) {
19809
19810"use strict";
19811
19812
19813var Type = __webpack_require__(8);
19814
19815module.exports = new Type('tag:yaml.org,2002:map', {
19816 kind: 'mapping',
19817 construct: function (data) { return data !== null ? data : {}; }
19818});
19819
19820
19821/***/ }),
19822/* 262 */
19823/***/ (function(module, exports, __webpack_require__) {
19824
19825"use strict";
19826
19827
19828var Type = __webpack_require__(8);
19829
19830function resolveYamlNull(data) {
19831 if (data === null) return true;
19832
19833 var max = data.length;
19834
19835 return (max === 1 && data === '~') ||
19836 (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));
19837}
19838
19839function constructYamlNull() {
19840 return null;
19841}
19842
19843function isNull(object) {
19844 return object === null;
19845}
19846
19847module.exports = new Type('tag:yaml.org,2002:null', {
19848 kind: 'scalar',
19849 resolve: resolveYamlNull,
19850 construct: constructYamlNull,
19851 predicate: isNull,
19852 represent: {
19853 canonical: function () { return '~'; },
19854 lowercase: function () { return 'null'; },
19855 uppercase: function () { return 'NULL'; },
19856 camelcase: function () { return 'Null'; }
19857 },
19858 defaultStyle: 'lowercase'
19859});
19860
19861
19862/***/ }),
19863/* 263 */
19864/***/ (function(module, exports, __webpack_require__) {
19865
19866"use strict";
19867
19868
19869var Type = __webpack_require__(8);
19870
19871function resolveYamlBoolean(data) {
19872 if (data === null) return false;
19873
19874 var max = data.length;
19875
19876 return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
19877 (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));
19878}
19879
19880function constructYamlBoolean(data) {
19881 return data === 'true' ||
19882 data === 'True' ||
19883 data === 'TRUE';
19884}
19885
19886function isBoolean(object) {
19887 return Object.prototype.toString.call(object) === '[object Boolean]';
19888}
19889
19890module.exports = new Type('tag:yaml.org,2002:bool', {
19891 kind: 'scalar',
19892 resolve: resolveYamlBoolean,
19893 construct: constructYamlBoolean,
19894 predicate: isBoolean,
19895 represent: {
19896 lowercase: function (object) { return object ? 'true' : 'false'; },
19897 uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },
19898 camelcase: function (object) { return object ? 'True' : 'False'; }
19899 },
19900 defaultStyle: 'lowercase'
19901});
19902
19903
19904/***/ }),
19905/* 264 */
19906/***/ (function(module, exports, __webpack_require__) {
19907
19908"use strict";
19909
19910
19911var common = __webpack_require__(42);
19912var Type = __webpack_require__(8);
19913
19914function isHexCode(c) {
19915 return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||
19916 ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||
19917 ((0x61/* a */ <= c) && (c <= 0x66/* f */));
19918}
19919
19920function isOctCode(c) {
19921 return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));
19922}
19923
19924function isDecCode(c) {
19925 return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));
19926}
19927
19928function resolveYamlInteger(data) {
19929 if (data === null) return false;
19930
19931 var max = data.length,
19932 index = 0,
19933 hasDigits = false,
19934 ch;
19935
19936 if (!max) return false;
19937
19938 ch = data[index];
19939
19940 // sign
19941 if (ch === '-' || ch === '+') {
19942 ch = data[++index];
19943 }
19944
19945 if (ch === '0') {
19946 // 0
19947 if (index + 1 === max) return true;
19948 ch = data[++index];
19949
19950 // base 2, base 8, base 16
19951
19952 if (ch === 'b') {
19953 // base 2
19954 index++;
19955
19956 for (; index < max; index++) {
19957 ch = data[index];
19958 if (ch === '_') continue;
19959 if (ch !== '0' && ch !== '1') return false;
19960 hasDigits = true;
19961 }
19962 return hasDigits && ch !== '_';
19963 }
19964
19965
19966 if (ch === 'x') {
19967 // base 16
19968 index++;
19969
19970 for (; index < max; index++) {
19971 ch = data[index];
19972 if (ch === '_') continue;
19973 if (!isHexCode(data.charCodeAt(index))) return false;
19974 hasDigits = true;
19975 }
19976 return hasDigits && ch !== '_';
19977 }
19978
19979 // base 8
19980 for (; index < max; index++) {
19981 ch = data[index];
19982 if (ch === '_') continue;
19983 if (!isOctCode(data.charCodeAt(index))) return false;
19984 hasDigits = true;
19985 }
19986 return hasDigits && ch !== '_';
19987 }
19988
19989 // base 10 (except 0) or base 60
19990
19991 // value should not start with `_`;
19992 if (ch === '_') return false;
19993
19994 for (; index < max; index++) {
19995 ch = data[index];
19996 if (ch === '_') continue;
19997 if (ch === ':') break;
19998 if (!isDecCode(data.charCodeAt(index))) {
19999 return false;
20000 }
20001 hasDigits = true;
20002 }
20003
20004 // Should have digits and should not end with `_`
20005 if (!hasDigits || ch === '_') return false;
20006
20007 // if !base60 - done;
20008 if (ch !== ':') return true;
20009
20010 // base60 almost not used, no needs to optimize
20011 return /^(:[0-5]?[0-9])+$/.test(data.slice(index));
20012}
20013
20014function constructYamlInteger(data) {
20015 var value = data, sign = 1, ch, base, digits = [];
20016
20017 if (value.indexOf('_') !== -1) {
20018 value = value.replace(/_/g, '');
20019 }
20020
20021 ch = value[0];
20022
20023 if (ch === '-' || ch === '+') {
20024 if (ch === '-') sign = -1;
20025 value = value.slice(1);
20026 ch = value[0];
20027 }
20028
20029 if (value === '0') return 0;
20030
20031 if (ch === '0') {
20032 if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);
20033 if (value[1] === 'x') return sign * parseInt(value, 16);
20034 return sign * parseInt(value, 8);
20035 }
20036
20037 if (value.indexOf(':') !== -1) {
20038 value.split(':').forEach(function (v) {
20039 digits.unshift(parseInt(v, 10));
20040 });
20041
20042 value = 0;
20043 base = 1;
20044
20045 digits.forEach(function (d) {
20046 value += (d * base);
20047 base *= 60;
20048 });
20049
20050 return sign * value;
20051
20052 }
20053
20054 return sign * parseInt(value, 10);
20055}
20056
20057function isInteger(object) {
20058 return (Object.prototype.toString.call(object)) === '[object Number]' &&
20059 (object % 1 === 0 && !common.isNegativeZero(object));
20060}
20061
20062module.exports = new Type('tag:yaml.org,2002:int', {
20063 kind: 'scalar',
20064 resolve: resolveYamlInteger,
20065 construct: constructYamlInteger,
20066 predicate: isInteger,
20067 represent: {
20068 binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },
20069 octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); },
20070 decimal: function (obj) { return obj.toString(10); },
20071 /* eslint-disable max-len */
20072 hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }
20073 },
20074 defaultStyle: 'decimal',
20075 styleAliases: {
20076 binary: [ 2, 'bin' ],
20077 octal: [ 8, 'oct' ],
20078 decimal: [ 10, 'dec' ],
20079 hexadecimal: [ 16, 'hex' ]
20080 }
20081});
20082
20083
20084/***/ }),
20085/* 265 */
20086/***/ (function(module, exports, __webpack_require__) {
20087
20088"use strict";
20089
20090
20091var common = __webpack_require__(42);
20092var Type = __webpack_require__(8);
20093
20094var YAML_FLOAT_PATTERN = new RegExp(
20095 // 2.5e4, 2.5 and integers
20096 '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +
20097 // .2e4, .2
20098 // special case, seems not from spec
20099 '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +
20100 // 20:59
20101 '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' +
20102 // .inf
20103 '|[-+]?\\.(?:inf|Inf|INF)' +
20104 // .nan
20105 '|\\.(?:nan|NaN|NAN))$');
20106
20107function resolveYamlFloat(data) {
20108 if (data === null) return false;
20109
20110 if (!YAML_FLOAT_PATTERN.test(data) ||
20111 // Quick hack to not allow integers end with `_`
20112 // Probably should update regexp & check speed
20113 data[data.length - 1] === '_') {
20114 return false;
20115 }
20116
20117 return true;
20118}
20119
20120function constructYamlFloat(data) {
20121 var value, sign, base, digits;
20122
20123 value = data.replace(/_/g, '').toLowerCase();
20124 sign = value[0] === '-' ? -1 : 1;
20125 digits = [];
20126
20127 if ('+-'.indexOf(value[0]) >= 0) {
20128 value = value.slice(1);
20129 }
20130
20131 if (value === '.inf') {
20132 return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
20133
20134 } else if (value === '.nan') {
20135 return NaN;
20136
20137 } else if (value.indexOf(':') >= 0) {
20138 value.split(':').forEach(function (v) {
20139 digits.unshift(parseFloat(v, 10));
20140 });
20141
20142 value = 0.0;
20143 base = 1;
20144
20145 digits.forEach(function (d) {
20146 value += d * base;
20147 base *= 60;
20148 });
20149
20150 return sign * value;
20151
20152 }
20153 return sign * parseFloat(value, 10);
20154}
20155
20156
20157var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
20158
20159function representYamlFloat(object, style) {
20160 var res;
20161
20162 if (isNaN(object)) {
20163 switch (style) {
20164 case 'lowercase': return '.nan';
20165 case 'uppercase': return '.NAN';
20166 case 'camelcase': return '.NaN';
20167 }
20168 } else if (Number.POSITIVE_INFINITY === object) {
20169 switch (style) {
20170 case 'lowercase': return '.inf';
20171 case 'uppercase': return '.INF';
20172 case 'camelcase': return '.Inf';
20173 }
20174 } else if (Number.NEGATIVE_INFINITY === object) {
20175 switch (style) {
20176 case 'lowercase': return '-.inf';
20177 case 'uppercase': return '-.INF';
20178 case 'camelcase': return '-.Inf';
20179 }
20180 } else if (common.isNegativeZero(object)) {
20181 return '-0.0';
20182 }
20183
20184 res = object.toString(10);
20185
20186 // JS stringifier can build scientific format without dots: 5e-100,
20187 // while YAML requres dot: 5.e-100. Fix it with simple hack
20188
20189 return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
20190}
20191
20192function isFloat(object) {
20193 return (Object.prototype.toString.call(object) === '[object Number]') &&
20194 (object % 1 !== 0 || common.isNegativeZero(object));
20195}
20196
20197module.exports = new Type('tag:yaml.org,2002:float', {
20198 kind: 'scalar',
20199 resolve: resolveYamlFloat,
20200 construct: constructYamlFloat,
20201 predicate: isFloat,
20202 represent: representYamlFloat,
20203 defaultStyle: 'lowercase'
20204});
20205
20206
20207/***/ }),
20208/* 266 */
20209/***/ (function(module, exports, __webpack_require__) {
20210
20211"use strict";
20212
20213
20214var Type = __webpack_require__(8);
20215
20216var YAML_DATE_REGEXP = new RegExp(
20217 '^([0-9][0-9][0-9][0-9])' + // [1] year
20218 '-([0-9][0-9])' + // [2] month
20219 '-([0-9][0-9])$'); // [3] day
20220
20221var YAML_TIMESTAMP_REGEXP = new RegExp(
20222 '^([0-9][0-9][0-9][0-9])' + // [1] year
20223 '-([0-9][0-9]?)' + // [2] month
20224 '-([0-9][0-9]?)' + // [3] day
20225 '(?:[Tt]|[ \\t]+)' + // ...
20226 '([0-9][0-9]?)' + // [4] hour
20227 ':([0-9][0-9])' + // [5] minute
20228 ':([0-9][0-9])' + // [6] second
20229 '(?:\\.([0-9]*))?' + // [7] fraction
20230 '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
20231 '(?::([0-9][0-9]))?))?$'); // [11] tz_minute
20232
20233function resolveYamlTimestamp(data) {
20234 if (data === null) return false;
20235 if (YAML_DATE_REGEXP.exec(data) !== null) return true;
20236 if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
20237 return false;
20238}
20239
20240function constructYamlTimestamp(data) {
20241 var match, year, month, day, hour, minute, second, fraction = 0,
20242 delta = null, tz_hour, tz_minute, date;
20243
20244 match = YAML_DATE_REGEXP.exec(data);
20245 if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
20246
20247 if (match === null) throw new Error('Date resolve error');
20248
20249 // match: [1] year [2] month [3] day
20250
20251 year = +(match[1]);
20252 month = +(match[2]) - 1; // JS month starts with 0
20253 day = +(match[3]);
20254
20255 if (!match[4]) { // no hour
20256 return new Date(Date.UTC(year, month, day));
20257 }
20258
20259 // match: [4] hour [5] minute [6] second [7] fraction
20260
20261 hour = +(match[4]);
20262 minute = +(match[5]);
20263 second = +(match[6]);
20264
20265 if (match[7]) {
20266 fraction = match[7].slice(0, 3);
20267 while (fraction.length < 3) { // milli-seconds
20268 fraction += '0';
20269 }
20270 fraction = +fraction;
20271 }
20272
20273 // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
20274
20275 if (match[9]) {
20276 tz_hour = +(match[10]);
20277 tz_minute = +(match[11] || 0);
20278 delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
20279 if (match[9] === '-') delta = -delta;
20280 }
20281
20282 date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
20283
20284 if (delta) date.setTime(date.getTime() - delta);
20285
20286 return date;
20287}
20288
20289function representYamlTimestamp(object /*, style*/) {
20290 return object.toISOString();
20291}
20292
20293module.exports = new Type('tag:yaml.org,2002:timestamp', {
20294 kind: 'scalar',
20295 resolve: resolveYamlTimestamp,
20296 construct: constructYamlTimestamp,
20297 instanceOf: Date,
20298 represent: representYamlTimestamp
20299});
20300
20301
20302/***/ }),
20303/* 267 */
20304/***/ (function(module, exports, __webpack_require__) {
20305
20306"use strict";
20307
20308
20309var Type = __webpack_require__(8);
20310
20311function resolveYamlMerge(data) {
20312 return data === '<<' || data === null;
20313}
20314
20315module.exports = new Type('tag:yaml.org,2002:merge', {
20316 kind: 'scalar',
20317 resolve: resolveYamlMerge
20318});
20319
20320
20321/***/ }),
20322/* 268 */
20323/***/ (function(module, exports, __webpack_require__) {
20324
20325"use strict";
20326var require;
20327
20328/*eslint-disable no-bitwise*/
20329
20330var NodeBuffer;
20331
20332try {
20333 // A trick for browserified version, to not include `Buffer` shim
20334 var _require = require;
20335 NodeBuffer = __webpack_require__(29).Buffer;
20336} catch (__) {}
20337
20338var Type = __webpack_require__(8);
20339
20340
20341// [ 64, 65, 66 ] -> [ padding, CR, LF ]
20342var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';
20343
20344
20345function resolveYamlBinary(data) {
20346 if (data === null) return false;
20347
20348 var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
20349
20350 // Convert one by one.
20351 for (idx = 0; idx < max; idx++) {
20352 code = map.indexOf(data.charAt(idx));
20353
20354 // Skip CR/LF
20355 if (code > 64) continue;
20356
20357 // Fail on illegal characters
20358 if (code < 0) return false;
20359
20360 bitlen += 6;
20361 }
20362
20363 // If there are any bits left, source was corrupted
20364 return (bitlen % 8) === 0;
20365}
20366
20367function constructYamlBinary(data) {
20368 var idx, tailbits,
20369 input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan
20370 max = input.length,
20371 map = BASE64_MAP,
20372 bits = 0,
20373 result = [];
20374
20375 // Collect by 6*4 bits (3 bytes)
20376
20377 for (idx = 0; idx < max; idx++) {
20378 if ((idx % 4 === 0) && idx) {
20379 result.push((bits >> 16) & 0xFF);
20380 result.push((bits >> 8) & 0xFF);
20381 result.push(bits & 0xFF);
20382 }
20383
20384 bits = (bits << 6) | map.indexOf(input.charAt(idx));
20385 }
20386
20387 // Dump tail
20388
20389 tailbits = (max % 4) * 6;
20390
20391 if (tailbits === 0) {
20392 result.push((bits >> 16) & 0xFF);
20393 result.push((bits >> 8) & 0xFF);
20394 result.push(bits & 0xFF);
20395 } else if (tailbits === 18) {
20396 result.push((bits >> 10) & 0xFF);
20397 result.push((bits >> 2) & 0xFF);
20398 } else if (tailbits === 12) {
20399 result.push((bits >> 4) & 0xFF);
20400 }
20401
20402 // Wrap into Buffer for NodeJS and leave Array for browser
20403 if (NodeBuffer) {
20404 // Support node 6.+ Buffer API when available
20405 return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result);
20406 }
20407
20408 return result;
20409}
20410
20411function representYamlBinary(object /*, style*/) {
20412 var result = '', bits = 0, idx, tail,
20413 max = object.length,
20414 map = BASE64_MAP;
20415
20416 // Convert every three bytes to 4 ASCII characters.
20417
20418 for (idx = 0; idx < max; idx++) {
20419 if ((idx % 3 === 0) && idx) {
20420 result += map[(bits >> 18) & 0x3F];
20421 result += map[(bits >> 12) & 0x3F];
20422 result += map[(bits >> 6) & 0x3F];
20423 result += map[bits & 0x3F];
20424 }
20425
20426 bits = (bits << 8) + object[idx];
20427 }
20428
20429 // Dump tail
20430
20431 tail = max % 3;
20432
20433 if (tail === 0) {
20434 result += map[(bits >> 18) & 0x3F];
20435 result += map[(bits >> 12) & 0x3F];
20436 result += map[(bits >> 6) & 0x3F];
20437 result += map[bits & 0x3F];
20438 } else if (tail === 2) {
20439 result += map[(bits >> 10) & 0x3F];
20440 result += map[(bits >> 4) & 0x3F];
20441 result += map[(bits << 2) & 0x3F];
20442 result += map[64];
20443 } else if (tail === 1) {
20444 result += map[(bits >> 2) & 0x3F];
20445 result += map[(bits << 4) & 0x3F];
20446 result += map[64];
20447 result += map[64];
20448 }
20449
20450 return result;
20451}
20452
20453function isBinary(object) {
20454 return NodeBuffer && NodeBuffer.isBuffer(object);
20455}
20456
20457module.exports = new Type('tag:yaml.org,2002:binary', {
20458 kind: 'scalar',
20459 resolve: resolveYamlBinary,
20460 construct: constructYamlBinary,
20461 predicate: isBinary,
20462 represent: representYamlBinary
20463});
20464
20465
20466/***/ }),
20467/* 269 */
20468/***/ (function(module, exports, __webpack_require__) {
20469
20470"use strict";
20471
20472
20473exports.byteLength = byteLength
20474exports.toByteArray = toByteArray
20475exports.fromByteArray = fromByteArray
20476
20477var lookup = []
20478var revLookup = []
20479var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
20480
20481var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
20482for (var i = 0, len = code.length; i < len; ++i) {
20483 lookup[i] = code[i]
20484 revLookup[code.charCodeAt(i)] = i
20485}
20486
20487// Support decoding URL-safe base64 strings, as Node.js does.
20488// See: https://en.wikipedia.org/wiki/Base64#URL_applications
20489revLookup['-'.charCodeAt(0)] = 62
20490revLookup['_'.charCodeAt(0)] = 63
20491
20492function getLens (b64) {
20493 var len = b64.length
20494
20495 if (len % 4 > 0) {
20496 throw new Error('Invalid string. Length must be a multiple of 4')
20497 }
20498
20499 // Trim off extra bytes after placeholder bytes are found
20500 // See: https://github.com/beatgammit/base64-js/issues/42
20501 var validLen = b64.indexOf('=')
20502 if (validLen === -1) validLen = len
20503
20504 var placeHoldersLen = validLen === len
20505 ? 0
20506 : 4 - (validLen % 4)
20507
20508 return [validLen, placeHoldersLen]
20509}
20510
20511// base64 is 4/3 + up to two characters of the original data
20512function byteLength (b64) {
20513 var lens = getLens(b64)
20514 var validLen = lens[0]
20515 var placeHoldersLen = lens[1]
20516 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
20517}
20518
20519function _byteLength (b64, validLen, placeHoldersLen) {
20520 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
20521}
20522
20523function toByteArray (b64) {
20524 var tmp
20525 var lens = getLens(b64)
20526 var validLen = lens[0]
20527 var placeHoldersLen = lens[1]
20528
20529 var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
20530
20531 var curByte = 0
20532
20533 // if there are placeholders, only get up to the last complete 4 chars
20534 var len = placeHoldersLen > 0
20535 ? validLen - 4
20536 : validLen
20537
20538 var i
20539 for (i = 0; i < len; i += 4) {
20540 tmp =
20541 (revLookup[b64.charCodeAt(i)] << 18) |
20542 (revLookup[b64.charCodeAt(i + 1)] << 12) |
20543 (revLookup[b64.charCodeAt(i + 2)] << 6) |
20544 revLookup[b64.charCodeAt(i + 3)]
20545 arr[curByte++] = (tmp >> 16) & 0xFF
20546 arr[curByte++] = (tmp >> 8) & 0xFF
20547 arr[curByte++] = tmp & 0xFF
20548 }
20549
20550 if (placeHoldersLen === 2) {
20551 tmp =
20552 (revLookup[b64.charCodeAt(i)] << 2) |
20553 (revLookup[b64.charCodeAt(i + 1)] >> 4)
20554 arr[curByte++] = tmp & 0xFF
20555 }
20556
20557 if (placeHoldersLen === 1) {
20558 tmp =
20559 (revLookup[b64.charCodeAt(i)] << 10) |
20560 (revLookup[b64.charCodeAt(i + 1)] << 4) |
20561 (revLookup[b64.charCodeAt(i + 2)] >> 2)
20562 arr[curByte++] = (tmp >> 8) & 0xFF
20563 arr[curByte++] = tmp & 0xFF
20564 }
20565
20566 return arr
20567}
20568
20569function tripletToBase64 (num) {
20570 return lookup[num >> 18 & 0x3F] +
20571 lookup[num >> 12 & 0x3F] +
20572 lookup[num >> 6 & 0x3F] +
20573 lookup[num & 0x3F]
20574}
20575
20576function encodeChunk (uint8, start, end) {
20577 var tmp
20578 var output = []
20579 for (var i = start; i < end; i += 3) {
20580 tmp =
20581 ((uint8[i] << 16) & 0xFF0000) +
20582 ((uint8[i + 1] << 8) & 0xFF00) +
20583 (uint8[i + 2] & 0xFF)
20584 output.push(tripletToBase64(tmp))
20585 }
20586 return output.join('')
20587}
20588
20589function fromByteArray (uint8) {
20590 var tmp
20591 var len = uint8.length
20592 var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
20593 var parts = []
20594 var maxChunkLength = 16383 // must be multiple of 3
20595
20596 // go through the array every three bytes, we'll deal with trailing stuff later
20597 for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
20598 parts.push(encodeChunk(
20599 uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
20600 ))
20601 }
20602
20603 // pad the end with zeros, but make sure to not forget the extra bytes
20604 if (extraBytes === 1) {
20605 tmp = uint8[len - 1]
20606 parts.push(
20607 lookup[tmp >> 2] +
20608 lookup[(tmp << 4) & 0x3F] +
20609 '=='
20610 )
20611 } else if (extraBytes === 2) {
20612 tmp = (uint8[len - 2] << 8) + uint8[len - 1]
20613 parts.push(
20614 lookup[tmp >> 10] +
20615 lookup[(tmp >> 4) & 0x3F] +
20616 lookup[(tmp << 2) & 0x3F] +
20617 '='
20618 )
20619 }
20620
20621 return parts.join('')
20622}
20623
20624
20625/***/ }),
20626/* 270 */
20627/***/ (function(module, exports) {
20628
20629exports.read = function (buffer, offset, isLE, mLen, nBytes) {
20630 var e, m
20631 var eLen = (nBytes * 8) - mLen - 1
20632 var eMax = (1 << eLen) - 1
20633 var eBias = eMax >> 1
20634 var nBits = -7
20635 var i = isLE ? (nBytes - 1) : 0
20636 var d = isLE ? -1 : 1
20637 var s = buffer[offset + i]
20638
20639 i += d
20640
20641 e = s & ((1 << (-nBits)) - 1)
20642 s >>= (-nBits)
20643 nBits += eLen
20644 for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
20645
20646 m = e & ((1 << (-nBits)) - 1)
20647 e >>= (-nBits)
20648 nBits += mLen
20649 for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
20650
20651 if (e === 0) {
20652 e = 1 - eBias
20653 } else if (e === eMax) {
20654 return m ? NaN : ((s ? -1 : 1) * Infinity)
20655 } else {
20656 m = m + Math.pow(2, mLen)
20657 e = e - eBias
20658 }
20659 return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
20660}
20661
20662exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
20663 var e, m, c
20664 var eLen = (nBytes * 8) - mLen - 1
20665 var eMax = (1 << eLen) - 1
20666 var eBias = eMax >> 1
20667 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
20668 var i = isLE ? 0 : (nBytes - 1)
20669 var d = isLE ? 1 : -1
20670 var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
20671
20672 value = Math.abs(value)
20673
20674 if (isNaN(value) || value === Infinity) {
20675 m = isNaN(value) ? 1 : 0
20676 e = eMax
20677 } else {
20678 e = Math.floor(Math.log(value) / Math.LN2)
20679 if (value * (c = Math.pow(2, -e)) < 1) {
20680 e--
20681 c *= 2
20682 }
20683 if (e + eBias >= 1) {
20684 value += rt / c
20685 } else {
20686 value += rt * Math.pow(2, 1 - eBias)
20687 }
20688 if (value * c >= 2) {
20689 e++
20690 c /= 2
20691 }
20692
20693 if (e + eBias >= eMax) {
20694 m = 0
20695 e = eMax
20696 } else if (e + eBias >= 1) {
20697 m = ((value * c) - 1) * Math.pow(2, mLen)
20698 e = e + eBias
20699 } else {
20700 m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
20701 e = 0
20702 }
20703 }
20704
20705 for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
20706
20707 e = (e << mLen) | m
20708 eLen += mLen
20709 for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
20710
20711 buffer[offset + i - d] |= s * 128
20712}
20713
20714
20715/***/ }),
20716/* 271 */
20717/***/ (function(module, exports) {
20718
20719var toString = {}.toString;
20720
20721module.exports = Array.isArray || function (arr) {
20722 return toString.call(arr) == '[object Array]';
20723};
20724
20725
20726/***/ }),
20727/* 272 */
20728/***/ (function(module, exports, __webpack_require__) {
20729
20730"use strict";
20731
20732
20733var Type = __webpack_require__(8);
20734
20735var _hasOwnProperty = Object.prototype.hasOwnProperty;
20736var _toString = Object.prototype.toString;
20737
20738function resolveYamlOmap(data) {
20739 if (data === null) return true;
20740
20741 var objectKeys = [], index, length, pair, pairKey, pairHasKey,
20742 object = data;
20743
20744 for (index = 0, length = object.length; index < length; index += 1) {
20745 pair = object[index];
20746 pairHasKey = false;
20747
20748 if (_toString.call(pair) !== '[object Object]') return false;
20749
20750 for (pairKey in pair) {
20751 if (_hasOwnProperty.call(pair, pairKey)) {
20752 if (!pairHasKey) pairHasKey = true;
20753 else return false;
20754 }
20755 }
20756
20757 if (!pairHasKey) return false;
20758
20759 if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
20760 else return false;
20761 }
20762
20763 return true;
20764}
20765
20766function constructYamlOmap(data) {
20767 return data !== null ? data : [];
20768}
20769
20770module.exports = new Type('tag:yaml.org,2002:omap', {
20771 kind: 'sequence',
20772 resolve: resolveYamlOmap,
20773 construct: constructYamlOmap
20774});
20775
20776
20777/***/ }),
20778/* 273 */
20779/***/ (function(module, exports, __webpack_require__) {
20780
20781"use strict";
20782
20783
20784var Type = __webpack_require__(8);
20785
20786var _toString = Object.prototype.toString;
20787
20788function resolveYamlPairs(data) {
20789 if (data === null) return true;
20790
20791 var index, length, pair, keys, result,
20792 object = data;
20793
20794 result = new Array(object.length);
20795
20796 for (index = 0, length = object.length; index < length; index += 1) {
20797 pair = object[index];
20798
20799 if (_toString.call(pair) !== '[object Object]') return false;
20800
20801 keys = Object.keys(pair);
20802
20803 if (keys.length !== 1) return false;
20804
20805 result[index] = [ keys[0], pair[keys[0]] ];
20806 }
20807
20808 return true;
20809}
20810
20811function constructYamlPairs(data) {
20812 if (data === null) return [];
20813
20814 var index, length, pair, keys, result,
20815 object = data;
20816
20817 result = new Array(object.length);
20818
20819 for (index = 0, length = object.length; index < length; index += 1) {
20820 pair = object[index];
20821
20822 keys = Object.keys(pair);
20823
20824 result[index] = [ keys[0], pair[keys[0]] ];
20825 }
20826
20827 return result;
20828}
20829
20830module.exports = new Type('tag:yaml.org,2002:pairs', {
20831 kind: 'sequence',
20832 resolve: resolveYamlPairs,
20833 construct: constructYamlPairs
20834});
20835
20836
20837/***/ }),
20838/* 274 */
20839/***/ (function(module, exports, __webpack_require__) {
20840
20841"use strict";
20842
20843
20844var Type = __webpack_require__(8);
20845
20846var _hasOwnProperty = Object.prototype.hasOwnProperty;
20847
20848function resolveYamlSet(data) {
20849 if (data === null) return true;
20850
20851 var key, object = data;
20852
20853 for (key in object) {
20854 if (_hasOwnProperty.call(object, key)) {
20855 if (object[key] !== null) return false;
20856 }
20857 }
20858
20859 return true;
20860}
20861
20862function constructYamlSet(data) {
20863 return data !== null ? data : {};
20864}
20865
20866module.exports = new Type('tag:yaml.org,2002:set', {
20867 kind: 'mapping',
20868 resolve: resolveYamlSet,
20869 construct: constructYamlSet
20870});
20871
20872
20873/***/ }),
20874/* 275 */
20875/***/ (function(module, exports, __webpack_require__) {
20876
20877"use strict";
20878
20879
20880var Type = __webpack_require__(8);
20881
20882function resolveJavascriptUndefined() {
20883 return true;
20884}
20885
20886function constructJavascriptUndefined() {
20887 /*eslint-disable no-undefined*/
20888 return undefined;
20889}
20890
20891function representJavascriptUndefined() {
20892 return '';
20893}
20894
20895function isUndefined(object) {
20896 return typeof object === 'undefined';
20897}
20898
20899module.exports = new Type('tag:yaml.org,2002:js/undefined', {
20900 kind: 'scalar',
20901 resolve: resolveJavascriptUndefined,
20902 construct: constructJavascriptUndefined,
20903 predicate: isUndefined,
20904 represent: representJavascriptUndefined
20905});
20906
20907
20908/***/ }),
20909/* 276 */
20910/***/ (function(module, exports, __webpack_require__) {
20911
20912"use strict";
20913
20914
20915var Type = __webpack_require__(8);
20916
20917function resolveJavascriptRegExp(data) {
20918 if (data === null) return false;
20919 if (data.length === 0) return false;
20920
20921 var regexp = data,
20922 tail = /\/([gim]*)$/.exec(data),
20923 modifiers = '';
20924
20925 // if regexp starts with '/' it can have modifiers and must be properly closed
20926 // `/foo/gim` - modifiers tail can be maximum 3 chars
20927 if (regexp[0] === '/') {
20928 if (tail) modifiers = tail[1];
20929
20930 if (modifiers.length > 3) return false;
20931 // if expression starts with /, is should be properly terminated
20932 if (regexp[regexp.length - modifiers.length - 1] !== '/') return false;
20933 }
20934
20935 return true;
20936}
20937
20938function constructJavascriptRegExp(data) {
20939 var regexp = data,
20940 tail = /\/([gim]*)$/.exec(data),
20941 modifiers = '';
20942
20943 // `/foo/gim` - tail can be maximum 4 chars
20944 if (regexp[0] === '/') {
20945 if (tail) modifiers = tail[1];
20946 regexp = regexp.slice(1, regexp.length - modifiers.length - 1);
20947 }
20948
20949 return new RegExp(regexp, modifiers);
20950}
20951
20952function representJavascriptRegExp(object /*, style*/) {
20953 var result = '/' + object.source + '/';
20954
20955 if (object.global) result += 'g';
20956 if (object.multiline) result += 'm';
20957 if (object.ignoreCase) result += 'i';
20958
20959 return result;
20960}
20961
20962function isRegExp(object) {
20963 return Object.prototype.toString.call(object) === '[object RegExp]';
20964}
20965
20966module.exports = new Type('tag:yaml.org,2002:js/regexp', {
20967 kind: 'scalar',
20968 resolve: resolveJavascriptRegExp,
20969 construct: constructJavascriptRegExp,
20970 predicate: isRegExp,
20971 represent: representJavascriptRegExp
20972});
20973
20974
20975/***/ }),
20976/* 277 */
20977/***/ (function(module, exports, __webpack_require__) {
20978
20979"use strict";
20980var require;
20981
20982var esprima;
20983
20984// Browserified version does not have esprima
20985//
20986// 1. For node.js just require module as deps
20987// 2. For browser try to require mudule via external AMD system.
20988// If not found - try to fallback to window.esprima. If not
20989// found too - then fail to parse.
20990//
20991try {
20992 // workaround to exclude package from browserify list.
20993 var _require = require;
20994 esprima = __webpack_require__(278);
20995} catch (_) {
20996 /* eslint-disable no-redeclare */
20997 /* global window */
20998 if (typeof window !== 'undefined') esprima = window.esprima;
20999}
21000
21001var Type = __webpack_require__(8);
21002
21003function resolveJavascriptFunction(data) {
21004 if (data === null) return false;
21005
21006 try {
21007 var source = '(' + data + ')',
21008 ast = esprima.parse(source, { range: true });
21009
21010 if (ast.type !== 'Program' ||
21011 ast.body.length !== 1 ||
21012 ast.body[0].type !== 'ExpressionStatement' ||
21013 (ast.body[0].expression.type !== 'ArrowFunctionExpression' &&
21014 ast.body[0].expression.type !== 'FunctionExpression')) {
21015 return false;
21016 }
21017
21018 return true;
21019 } catch (err) {
21020 return false;
21021 }
21022}
21023
21024function constructJavascriptFunction(data) {
21025 /*jslint evil:true*/
21026
21027 var source = '(' + data + ')',
21028 ast = esprima.parse(source, { range: true }),
21029 params = [],
21030 body;
21031
21032 if (ast.type !== 'Program' ||
21033 ast.body.length !== 1 ||
21034 ast.body[0].type !== 'ExpressionStatement' ||
21035 (ast.body[0].expression.type !== 'ArrowFunctionExpression' &&
21036 ast.body[0].expression.type !== 'FunctionExpression')) {
21037 throw new Error('Failed to resolve function');
21038 }
21039
21040 ast.body[0].expression.params.forEach(function (param) {
21041 params.push(param.name);
21042 });
21043
21044 body = ast.body[0].expression.body.range;
21045
21046 // Esprima's ranges include the first '{' and the last '}' characters on
21047 // function expressions. So cut them out.
21048 if (ast.body[0].expression.body.type === 'BlockStatement') {
21049 /*eslint-disable no-new-func*/
21050 return new Function(params, source.slice(body[0] + 1, body[1] - 1));
21051 }
21052 // ES6 arrow functions can omit the BlockStatement. In that case, just return
21053 // the body.
21054 /*eslint-disable no-new-func*/
21055 return new Function(params, 'return ' + source.slice(body[0], body[1]));
21056}
21057
21058function representJavascriptFunction(object /*, style*/) {
21059 return object.toString();
21060}
21061
21062function isFunction(object) {
21063 return Object.prototype.toString.call(object) === '[object Function]';
21064}
21065
21066module.exports = new Type('tag:yaml.org,2002:js/function', {
21067 kind: 'scalar',
21068 resolve: resolveJavascriptFunction,
21069 construct: constructJavascriptFunction,
21070 predicate: isFunction,
21071 represent: representJavascriptFunction
21072});
21073
21074
21075/***/ }),
21076/* 278 */
21077/***/ (function(module, exports) {
21078
21079if(typeof __WEBPACK_EXTERNAL_MODULE__278__ === 'undefined') {var e = new Error("Cannot find module 'esprima'"); e.code = 'MODULE_NOT_FOUND'; throw e;}
21080module.exports = __WEBPACK_EXTERNAL_MODULE__278__;
21081
21082/***/ }),
21083/* 279 */
21084/***/ (function(module, exports, __webpack_require__) {
21085
21086"use strict";
21087
21088
21089/*eslint-disable no-use-before-define*/
21090
21091var common = __webpack_require__(42);
21092var YAMLException = __webpack_require__(58);
21093var DEFAULT_FULL_SCHEMA = __webpack_require__(72);
21094var DEFAULT_SAFE_SCHEMA = __webpack_require__(59);
21095
21096var _toString = Object.prototype.toString;
21097var _hasOwnProperty = Object.prototype.hasOwnProperty;
21098
21099var CHAR_TAB = 0x09; /* Tab */
21100var CHAR_LINE_FEED = 0x0A; /* LF */
21101var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */
21102var CHAR_SPACE = 0x20; /* Space */
21103var CHAR_EXCLAMATION = 0x21; /* ! */
21104var CHAR_DOUBLE_QUOTE = 0x22; /* " */
21105var CHAR_SHARP = 0x23; /* # */
21106var CHAR_PERCENT = 0x25; /* % */
21107var CHAR_AMPERSAND = 0x26; /* & */
21108var CHAR_SINGLE_QUOTE = 0x27; /* ' */
21109var CHAR_ASTERISK = 0x2A; /* * */
21110var CHAR_COMMA = 0x2C; /* , */
21111var CHAR_MINUS = 0x2D; /* - */
21112var CHAR_COLON = 0x3A; /* : */
21113var CHAR_EQUALS = 0x3D; /* = */
21114var CHAR_GREATER_THAN = 0x3E; /* > */
21115var CHAR_QUESTION = 0x3F; /* ? */
21116var CHAR_COMMERCIAL_AT = 0x40; /* @ */
21117var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */
21118var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
21119var CHAR_GRAVE_ACCENT = 0x60; /* ` */
21120var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */
21121var CHAR_VERTICAL_LINE = 0x7C; /* | */
21122var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */
21123
21124var ESCAPE_SEQUENCES = {};
21125
21126ESCAPE_SEQUENCES[0x00] = '\\0';
21127ESCAPE_SEQUENCES[0x07] = '\\a';
21128ESCAPE_SEQUENCES[0x08] = '\\b';
21129ESCAPE_SEQUENCES[0x09] = '\\t';
21130ESCAPE_SEQUENCES[0x0A] = '\\n';
21131ESCAPE_SEQUENCES[0x0B] = '\\v';
21132ESCAPE_SEQUENCES[0x0C] = '\\f';
21133ESCAPE_SEQUENCES[0x0D] = '\\r';
21134ESCAPE_SEQUENCES[0x1B] = '\\e';
21135ESCAPE_SEQUENCES[0x22] = '\\"';
21136ESCAPE_SEQUENCES[0x5C] = '\\\\';
21137ESCAPE_SEQUENCES[0x85] = '\\N';
21138ESCAPE_SEQUENCES[0xA0] = '\\_';
21139ESCAPE_SEQUENCES[0x2028] = '\\L';
21140ESCAPE_SEQUENCES[0x2029] = '\\P';
21141
21142var DEPRECATED_BOOLEANS_SYNTAX = [
21143 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
21144 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
21145];
21146
21147function compileStyleMap(schema, map) {
21148 var result, keys, index, length, tag, style, type;
21149
21150 if (map === null) return {};
21151
21152 result = {};
21153 keys = Object.keys(map);
21154
21155 for (index = 0, length = keys.length; index < length; index += 1) {
21156 tag = keys[index];
21157 style = String(map[tag]);
21158
21159 if (tag.slice(0, 2) === '!!') {
21160 tag = 'tag:yaml.org,2002:' + tag.slice(2);
21161 }
21162 type = schema.compiledTypeMap['fallback'][tag];
21163
21164 if (type && _hasOwnProperty.call(type.styleAliases, style)) {
21165 style = type.styleAliases[style];
21166 }
21167
21168 result[tag] = style;
21169 }
21170
21171 return result;
21172}
21173
21174function encodeHex(character) {
21175 var string, handle, length;
21176
21177 string = character.toString(16).toUpperCase();
21178
21179 if (character <= 0xFF) {
21180 handle = 'x';
21181 length = 2;
21182 } else if (character <= 0xFFFF) {
21183 handle = 'u';
21184 length = 4;
21185 } else if (character <= 0xFFFFFFFF) {
21186 handle = 'U';
21187 length = 8;
21188 } else {
21189 throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');
21190 }
21191
21192 return '\\' + handle + common.repeat('0', length - string.length) + string;
21193}
21194
21195function State(options) {
21196 this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;
21197 this.indent = Math.max(1, (options['indent'] || 2));
21198 this.noArrayIndent = options['noArrayIndent'] || false;
21199 this.skipInvalid = options['skipInvalid'] || false;
21200 this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
21201 this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
21202 this.sortKeys = options['sortKeys'] || false;
21203 this.lineWidth = options['lineWidth'] || 80;
21204 this.noRefs = options['noRefs'] || false;
21205 this.noCompatMode = options['noCompatMode'] || false;
21206 this.condenseFlow = options['condenseFlow'] || false;
21207
21208 this.implicitTypes = this.schema.compiledImplicit;
21209 this.explicitTypes = this.schema.compiledExplicit;
21210
21211 this.tag = null;
21212 this.result = '';
21213
21214 this.duplicates = [];
21215 this.usedDuplicates = null;
21216}
21217
21218// Indents every line in a string. Empty lines (\n only) are not indented.
21219function indentString(string, spaces) {
21220 var ind = common.repeat(' ', spaces),
21221 position = 0,
21222 next = -1,
21223 result = '',
21224 line,
21225 length = string.length;
21226
21227 while (position < length) {
21228 next = string.indexOf('\n', position);
21229 if (next === -1) {
21230 line = string.slice(position);
21231 position = length;
21232 } else {
21233 line = string.slice(position, next + 1);
21234 position = next + 1;
21235 }
21236
21237 if (line.length && line !== '\n') result += ind;
21238
21239 result += line;
21240 }
21241
21242 return result;
21243}
21244
21245function generateNextLine(state, level) {
21246 return '\n' + common.repeat(' ', state.indent * level);
21247}
21248
21249function testImplicitResolving(state, str) {
21250 var index, length, type;
21251
21252 for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
21253 type = state.implicitTypes[index];
21254
21255 if (type.resolve(str)) {
21256 return true;
21257 }
21258 }
21259
21260 return false;
21261}
21262
21263// [33] s-white ::= s-space | s-tab
21264function isWhitespace(c) {
21265 return c === CHAR_SPACE || c === CHAR_TAB;
21266}
21267
21268// Returns true if the character can be printed without escaping.
21269// From YAML 1.2: "any allowed characters known to be non-printable
21270// should also be escaped. [However,] This isn’t mandatory"
21271// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029.
21272function isPrintable(c) {
21273 return (0x00020 <= c && c <= 0x00007E)
21274 || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)
21275 || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */)
21276 || (0x10000 <= c && c <= 0x10FFFF);
21277}
21278
21279// [34] ns-char ::= nb-char - s-white
21280// [27] nb-char ::= c-printable - b-char - c-byte-order-mark
21281// [26] b-char ::= b-line-feed | b-carriage-return
21282// [24] b-line-feed ::= #xA /* LF */
21283// [25] b-carriage-return ::= #xD /* CR */
21284// [3] c-byte-order-mark ::= #xFEFF
21285function isNsChar(c) {
21286 return isPrintable(c) && !isWhitespace(c)
21287 // byte-order-mark
21288 && c !== 0xFEFF
21289 // b-char
21290 && c !== CHAR_CARRIAGE_RETURN
21291 && c !== CHAR_LINE_FEED;
21292}
21293
21294// Simplified test for values allowed after the first character in plain style.
21295function isPlainSafe(c, prev) {
21296 // Uses a subset of nb-char - c-flow-indicator - ":" - "#"
21297 // where nb-char ::= c-printable - b-char - c-byte-order-mark.
21298 return isPrintable(c) && c !== 0xFEFF
21299 // - c-flow-indicator
21300 && c !== CHAR_COMMA
21301 && c !== CHAR_LEFT_SQUARE_BRACKET
21302 && c !== CHAR_RIGHT_SQUARE_BRACKET
21303 && c !== CHAR_LEFT_CURLY_BRACKET
21304 && c !== CHAR_RIGHT_CURLY_BRACKET
21305 // - ":" - "#"
21306 // /* An ns-char preceding */ "#"
21307 && c !== CHAR_COLON
21308 && ((c !== CHAR_SHARP) || (prev && isNsChar(prev)));
21309}
21310
21311// Simplified test for values allowed as the first character in plain style.
21312function isPlainSafeFirst(c) {
21313 // Uses a subset of ns-char - c-indicator
21314 // where ns-char = nb-char - s-white.
21315 return isPrintable(c) && c !== 0xFEFF
21316 && !isWhitespace(c) // - s-white
21317 // - (c-indicator ::=
21318 // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
21319 && c !== CHAR_MINUS
21320 && c !== CHAR_QUESTION
21321 && c !== CHAR_COLON
21322 && c !== CHAR_COMMA
21323 && c !== CHAR_LEFT_SQUARE_BRACKET
21324 && c !== CHAR_RIGHT_SQUARE_BRACKET
21325 && c !== CHAR_LEFT_CURLY_BRACKET
21326 && c !== CHAR_RIGHT_CURLY_BRACKET
21327 // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
21328 && c !== CHAR_SHARP
21329 && c !== CHAR_AMPERSAND
21330 && c !== CHAR_ASTERISK
21331 && c !== CHAR_EXCLAMATION
21332 && c !== CHAR_VERTICAL_LINE
21333 && c !== CHAR_EQUALS
21334 && c !== CHAR_GREATER_THAN
21335 && c !== CHAR_SINGLE_QUOTE
21336 && c !== CHAR_DOUBLE_QUOTE
21337 // | “%” | “@” | “`”)
21338 && c !== CHAR_PERCENT
21339 && c !== CHAR_COMMERCIAL_AT
21340 && c !== CHAR_GRAVE_ACCENT;
21341}
21342
21343// Determines whether block indentation indicator is required.
21344function needIndentIndicator(string) {
21345 var leadingSpaceRe = /^\n* /;
21346 return leadingSpaceRe.test(string);
21347}
21348
21349var STYLE_PLAIN = 1,
21350 STYLE_SINGLE = 2,
21351 STYLE_LITERAL = 3,
21352 STYLE_FOLDED = 4,
21353 STYLE_DOUBLE = 5;
21354
21355// Determines which scalar styles are possible and returns the preferred style.
21356// lineWidth = -1 => no limit.
21357// Pre-conditions: str.length > 0.
21358// Post-conditions:
21359// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string.
21360// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).
21361// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).
21362function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {
21363 var i;
21364 var char, prev_char;
21365 var hasLineBreak = false;
21366 var hasFoldableLine = false; // only checked if shouldTrackWidth
21367 var shouldTrackWidth = lineWidth !== -1;
21368 var previousLineBreak = -1; // count the first line correctly
21369 var plain = isPlainSafeFirst(string.charCodeAt(0))
21370 && !isWhitespace(string.charCodeAt(string.length - 1));
21371
21372 if (singleLineOnly) {
21373 // Case: no block styles.
21374 // Check for disallowed characters to rule out plain and single.
21375 for (i = 0; i < string.length; i++) {
21376 char = string.charCodeAt(i);
21377 if (!isPrintable(char)) {
21378 return STYLE_DOUBLE;
21379 }
21380 prev_char = i > 0 ? string.charCodeAt(i - 1) : null;
21381 plain = plain && isPlainSafe(char, prev_char);
21382 }
21383 } else {
21384 // Case: block styles permitted.
21385 for (i = 0; i < string.length; i++) {
21386 char = string.charCodeAt(i);
21387 if (char === CHAR_LINE_FEED) {
21388 hasLineBreak = true;
21389 // Check if any line can be folded.
21390 if (shouldTrackWidth) {
21391 hasFoldableLine = hasFoldableLine ||
21392 // Foldable line = too long, and not more-indented.
21393 (i - previousLineBreak - 1 > lineWidth &&
21394 string[previousLineBreak + 1] !== ' ');
21395 previousLineBreak = i;
21396 }
21397 } else if (!isPrintable(char)) {
21398 return STYLE_DOUBLE;
21399 }
21400 prev_char = i > 0 ? string.charCodeAt(i - 1) : null;
21401 plain = plain && isPlainSafe(char, prev_char);
21402 }
21403 // in case the end is missing a \n
21404 hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&
21405 (i - previousLineBreak - 1 > lineWidth &&
21406 string[previousLineBreak + 1] !== ' '));
21407 }
21408 // Although every style can represent \n without escaping, prefer block styles
21409 // for multiline, since they're more readable and they don't add empty lines.
21410 // Also prefer folding a super-long line.
21411 if (!hasLineBreak && !hasFoldableLine) {
21412 // Strings interpretable as another type have to be quoted;
21413 // e.g. the string 'true' vs. the boolean true.
21414 return plain && !testAmbiguousType(string)
21415 ? STYLE_PLAIN : STYLE_SINGLE;
21416 }
21417 // Edge case: block indentation indicator can only have one digit.
21418 if (indentPerLevel > 9 && needIndentIndicator(string)) {
21419 return STYLE_DOUBLE;
21420 }
21421 // At this point we know block styles are valid.
21422 // Prefer literal style unless we want to fold.
21423 return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
21424}
21425
21426// Note: line breaking/folding is implemented for only the folded style.
21427// NB. We drop the last trailing newline (if any) of a returned block scalar
21428// since the dumper adds its own newline. This always works:
21429// • No ending newline => unaffected; already using strip "-" chomping.
21430// • Ending newline => removed then restored.
21431// Importantly, this keeps the "+" chomp indicator from gaining an extra line.
21432function writeScalar(state, string, level, iskey) {
21433 state.dump = (function () {
21434 if (string.length === 0) {
21435 return "''";
21436 }
21437 if (!state.noCompatMode &&
21438 DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {
21439 return "'" + string + "'";
21440 }
21441
21442 var indent = state.indent * Math.max(1, level); // no 0-indent scalars
21443 // As indentation gets deeper, let the width decrease monotonically
21444 // to the lower bound min(state.lineWidth, 40).
21445 // Note that this implies
21446 // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.
21447 // state.lineWidth > 40 + state.indent: width decreases until the lower bound.
21448 // This behaves better than a constant minimum width which disallows narrower options,
21449 // or an indent threshold which causes the width to suddenly increase.
21450 var lineWidth = state.lineWidth === -1
21451 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
21452
21453 // Without knowing if keys are implicit/explicit, assume implicit for safety.
21454 var singleLineOnly = iskey
21455 // No block styles in flow mode.
21456 || (state.flowLevel > -1 && level >= state.flowLevel);
21457 function testAmbiguity(string) {
21458 return testImplicitResolving(state, string);
21459 }
21460
21461 switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {
21462 case STYLE_PLAIN:
21463 return string;
21464 case STYLE_SINGLE:
21465 return "'" + string.replace(/'/g, "''") + "'";
21466 case STYLE_LITERAL:
21467 return '|' + blockHeader(string, state.indent)
21468 + dropEndingNewline(indentString(string, indent));
21469 case STYLE_FOLDED:
21470 return '>' + blockHeader(string, state.indent)
21471 + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
21472 case STYLE_DOUBLE:
21473 return '"' + escapeString(string, lineWidth) + '"';
21474 default:
21475 throw new YAMLException('impossible error: invalid scalar style');
21476 }
21477 }());
21478}
21479
21480// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.
21481function blockHeader(string, indentPerLevel) {
21482 var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';
21483
21484 // note the special case: the string '\n' counts as a "trailing" empty line.
21485 var clip = string[string.length - 1] === '\n';
21486 var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
21487 var chomp = keep ? '+' : (clip ? '' : '-');
21488
21489 return indentIndicator + chomp + '\n';
21490}
21491
21492// (See the note for writeScalar.)
21493function dropEndingNewline(string) {
21494 return string[string.length - 1] === '\n' ? string.slice(0, -1) : string;
21495}
21496
21497// Note: a long line without a suitable break point will exceed the width limit.
21498// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.
21499function foldString(string, width) {
21500 // In folded style, $k$ consecutive newlines output as $k+1$ newlines—
21501 // unless they're before or after a more-indented line, or at the very
21502 // beginning or end, in which case $k$ maps to $k$.
21503 // Therefore, parse each chunk as newline(s) followed by a content line.
21504 var lineRe = /(\n+)([^\n]*)/g;
21505
21506 // first line (possibly an empty line)
21507 var result = (function () {
21508 var nextLF = string.indexOf('\n');
21509 nextLF = nextLF !== -1 ? nextLF : string.length;
21510 lineRe.lastIndex = nextLF;
21511 return foldLine(string.slice(0, nextLF), width);
21512 }());
21513 // If we haven't reached the first content line yet, don't add an extra \n.
21514 var prevMoreIndented = string[0] === '\n' || string[0] === ' ';
21515 var moreIndented;
21516
21517 // rest of the lines
21518 var match;
21519 while ((match = lineRe.exec(string))) {
21520 var prefix = match[1], line = match[2];
21521 moreIndented = (line[0] === ' ');
21522 result += prefix
21523 + (!prevMoreIndented && !moreIndented && line !== ''
21524 ? '\n' : '')
21525 + foldLine(line, width);
21526 prevMoreIndented = moreIndented;
21527 }
21528
21529 return result;
21530}
21531
21532// Greedy line breaking.
21533// Picks the longest line under the limit each time,
21534// otherwise settles for the shortest line over the limit.
21535// NB. More-indented lines *cannot* be folded, as that would add an extra \n.
21536function foldLine(line, width) {
21537 if (line === '' || line[0] === ' ') return line;
21538
21539 // Since a more-indented line adds a \n, breaks can't be followed by a space.
21540 var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.
21541 var match;
21542 // start is an inclusive index. end, curr, and next are exclusive.
21543 var start = 0, end, curr = 0, next = 0;
21544 var result = '';
21545
21546 // Invariants: 0 <= start <= length-1.
21547 // 0 <= curr <= next <= max(0, length-2). curr - start <= width.
21548 // Inside the loop:
21549 // A match implies length >= 2, so curr and next are <= length-2.
21550 while ((match = breakRe.exec(line))) {
21551 next = match.index;
21552 // maintain invariant: curr - start <= width
21553 if (next - start > width) {
21554 end = (curr > start) ? curr : next; // derive end <= length-2
21555 result += '\n' + line.slice(start, end);
21556 // skip the space that was output as \n
21557 start = end + 1; // derive start <= length-1
21558 }
21559 curr = next;
21560 }
21561
21562 // By the invariants, start <= length-1, so there is something left over.
21563 // It is either the whole string or a part starting from non-whitespace.
21564 result += '\n';
21565 // Insert a break if the remainder is too long and there is a break available.
21566 if (line.length - start > width && curr > start) {
21567 result += line.slice(start, curr) + '\n' + line.slice(curr + 1);
21568 } else {
21569 result += line.slice(start);
21570 }
21571
21572 return result.slice(1); // drop extra \n joiner
21573}
21574
21575// Escapes a double-quoted string.
21576function escapeString(string) {
21577 var result = '';
21578 var char, nextChar;
21579 var escapeSeq;
21580
21581 for (var i = 0; i < string.length; i++) {
21582 char = string.charCodeAt(i);
21583 // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates").
21584 if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) {
21585 nextChar = string.charCodeAt(i + 1);
21586 if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) {
21587 // Combine the surrogate pair and store it escaped.
21588 result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);
21589 // Advance index one extra since we already used that char here.
21590 i++; continue;
21591 }
21592 }
21593 escapeSeq = ESCAPE_SEQUENCES[char];
21594 result += !escapeSeq && isPrintable(char)
21595 ? string[i]
21596 : escapeSeq || encodeHex(char);
21597 }
21598
21599 return result;
21600}
21601
21602function writeFlowSequence(state, level, object) {
21603 var _result = '',
21604 _tag = state.tag,
21605 index,
21606 length;
21607
21608 for (index = 0, length = object.length; index < length; index += 1) {
21609 // Write only valid elements.
21610 if (writeNode(state, level, object[index], false, false)) {
21611 if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : '');
21612 _result += state.dump;
21613 }
21614 }
21615
21616 state.tag = _tag;
21617 state.dump = '[' + _result + ']';
21618}
21619
21620function writeBlockSequence(state, level, object, compact) {
21621 var _result = '',
21622 _tag = state.tag,
21623 index,
21624 length;
21625
21626 for (index = 0, length = object.length; index < length; index += 1) {
21627 // Write only valid elements.
21628 if (writeNode(state, level + 1, object[index], true, true)) {
21629 if (!compact || index !== 0) {
21630 _result += generateNextLine(state, level);
21631 }
21632
21633 if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
21634 _result += '-';
21635 } else {
21636 _result += '- ';
21637 }
21638
21639 _result += state.dump;
21640 }
21641 }
21642
21643 state.tag = _tag;
21644 state.dump = _result || '[]'; // Empty sequence if no valid values.
21645}
21646
21647function writeFlowMapping(state, level, object) {
21648 var _result = '',
21649 _tag = state.tag,
21650 objectKeyList = Object.keys(object),
21651 index,
21652 length,
21653 objectKey,
21654 objectValue,
21655 pairBuffer;
21656
21657 for (index = 0, length = objectKeyList.length; index < length; index += 1) {
21658
21659 pairBuffer = '';
21660 if (index !== 0) pairBuffer += ', ';
21661
21662 if (state.condenseFlow) pairBuffer += '"';
21663
21664 objectKey = objectKeyList[index];
21665 objectValue = object[objectKey];
21666
21667 if (!writeNode(state, level, objectKey, false, false)) {
21668 continue; // Skip this pair because of invalid key;
21669 }
21670
21671 if (state.dump.length > 1024) pairBuffer += '? ';
21672
21673 pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
21674
21675 if (!writeNode(state, level, objectValue, false, false)) {
21676 continue; // Skip this pair because of invalid value.
21677 }
21678
21679 pairBuffer += state.dump;
21680
21681 // Both key and value are valid.
21682 _result += pairBuffer;
21683 }
21684
21685 state.tag = _tag;
21686 state.dump = '{' + _result + '}';
21687}
21688
21689function writeBlockMapping(state, level, object, compact) {
21690 var _result = '',
21691 _tag = state.tag,
21692 objectKeyList = Object.keys(object),
21693 index,
21694 length,
21695 objectKey,
21696 objectValue,
21697 explicitPair,
21698 pairBuffer;
21699
21700 // Allow sorting keys so that the output file is deterministic
21701 if (state.sortKeys === true) {
21702 // Default sorting
21703 objectKeyList.sort();
21704 } else if (typeof state.sortKeys === 'function') {
21705 // Custom sort function
21706 objectKeyList.sort(state.sortKeys);
21707 } else if (state.sortKeys) {
21708 // Something is wrong
21709 throw new YAMLException('sortKeys must be a boolean or a function');
21710 }
21711
21712 for (index = 0, length = objectKeyList.length; index < length; index += 1) {
21713 pairBuffer = '';
21714
21715 if (!compact || index !== 0) {
21716 pairBuffer += generateNextLine(state, level);
21717 }
21718
21719 objectKey = objectKeyList[index];
21720 objectValue = object[objectKey];
21721
21722 if (!writeNode(state, level + 1, objectKey, true, true, true)) {
21723 continue; // Skip this pair because of invalid key.
21724 }
21725
21726 explicitPair = (state.tag !== null && state.tag !== '?') ||
21727 (state.dump && state.dump.length > 1024);
21728
21729 if (explicitPair) {
21730 if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
21731 pairBuffer += '?';
21732 } else {
21733 pairBuffer += '? ';
21734 }
21735 }
21736
21737 pairBuffer += state.dump;
21738
21739 if (explicitPair) {
21740 pairBuffer += generateNextLine(state, level);
21741 }
21742
21743 if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
21744 continue; // Skip this pair because of invalid value.
21745 }
21746
21747 if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
21748 pairBuffer += ':';
21749 } else {
21750 pairBuffer += ': ';
21751 }
21752
21753 pairBuffer += state.dump;
21754
21755 // Both key and value are valid.
21756 _result += pairBuffer;
21757 }
21758
21759 state.tag = _tag;
21760 state.dump = _result || '{}'; // Empty mapping if no valid pairs.
21761}
21762
21763function detectType(state, object, explicit) {
21764 var _result, typeList, index, length, type, style;
21765
21766 typeList = explicit ? state.explicitTypes : state.implicitTypes;
21767
21768 for (index = 0, length = typeList.length; index < length; index += 1) {
21769 type = typeList[index];
21770
21771 if ((type.instanceOf || type.predicate) &&
21772 (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&
21773 (!type.predicate || type.predicate(object))) {
21774
21775 state.tag = explicit ? type.tag : '?';
21776
21777 if (type.represent) {
21778 style = state.styleMap[type.tag] || type.defaultStyle;
21779
21780 if (_toString.call(type.represent) === '[object Function]') {
21781 _result = type.represent(object, style);
21782 } else if (_hasOwnProperty.call(type.represent, style)) {
21783 _result = type.represent[style](object, style);
21784 } else {
21785 throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
21786 }
21787
21788 state.dump = _result;
21789 }
21790
21791 return true;
21792 }
21793 }
21794
21795 return false;
21796}
21797
21798// Serializes `object` and writes it to global `result`.
21799// Returns true on success, or false on invalid object.
21800//
21801function writeNode(state, level, object, block, compact, iskey) {
21802 state.tag = null;
21803 state.dump = object;
21804
21805 if (!detectType(state, object, false)) {
21806 detectType(state, object, true);
21807 }
21808
21809 var type = _toString.call(state.dump);
21810
21811 if (block) {
21812 block = (state.flowLevel < 0 || state.flowLevel > level);
21813 }
21814
21815 var objectOrArray = type === '[object Object]' || type === '[object Array]',
21816 duplicateIndex,
21817 duplicate;
21818
21819 if (objectOrArray) {
21820 duplicateIndex = state.duplicates.indexOf(object);
21821 duplicate = duplicateIndex !== -1;
21822 }
21823
21824 if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
21825 compact = false;
21826 }
21827
21828 if (duplicate && state.usedDuplicates[duplicateIndex]) {
21829 state.dump = '*ref_' + duplicateIndex;
21830 } else {
21831 if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
21832 state.usedDuplicates[duplicateIndex] = true;
21833 }
21834 if (type === '[object Object]') {
21835 if (block && (Object.keys(state.dump).length !== 0)) {
21836 writeBlockMapping(state, level, state.dump, compact);
21837 if (duplicate) {
21838 state.dump = '&ref_' + duplicateIndex + state.dump;
21839 }
21840 } else {
21841 writeFlowMapping(state, level, state.dump);
21842 if (duplicate) {
21843 state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
21844 }
21845 }
21846 } else if (type === '[object Array]') {
21847 var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level;
21848 if (block && (state.dump.length !== 0)) {
21849 writeBlockSequence(state, arrayLevel, state.dump, compact);
21850 if (duplicate) {
21851 state.dump = '&ref_' + duplicateIndex + state.dump;
21852 }
21853 } else {
21854 writeFlowSequence(state, arrayLevel, state.dump);
21855 if (duplicate) {
21856 state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
21857 }
21858 }
21859 } else if (type === '[object String]') {
21860 if (state.tag !== '?') {
21861 writeScalar(state, state.dump, level, iskey);
21862 }
21863 } else {
21864 if (state.skipInvalid) return false;
21865 throw new YAMLException('unacceptable kind of an object to dump ' + type);
21866 }
21867
21868 if (state.tag !== null && state.tag !== '?') {
21869 state.dump = '!<' + state.tag + '> ' + state.dump;
21870 }
21871 }
21872
21873 return true;
21874}
21875
21876function getDuplicateReferences(object, state) {
21877 var objects = [],
21878 duplicatesIndexes = [],
21879 index,
21880 length;
21881
21882 inspectNode(object, objects, duplicatesIndexes);
21883
21884 for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
21885 state.duplicates.push(objects[duplicatesIndexes[index]]);
21886 }
21887 state.usedDuplicates = new Array(length);
21888}
21889
21890function inspectNode(object, objects, duplicatesIndexes) {
21891 var objectKeyList,
21892 index,
21893 length;
21894
21895 if (object !== null && typeof object === 'object') {
21896 index = objects.indexOf(object);
21897 if (index !== -1) {
21898 if (duplicatesIndexes.indexOf(index) === -1) {
21899 duplicatesIndexes.push(index);
21900 }
21901 } else {
21902 objects.push(object);
21903
21904 if (Array.isArray(object)) {
21905 for (index = 0, length = object.length; index < length; index += 1) {
21906 inspectNode(object[index], objects, duplicatesIndexes);
21907 }
21908 } else {
21909 objectKeyList = Object.keys(object);
21910
21911 for (index = 0, length = objectKeyList.length; index < length; index += 1) {
21912 inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
21913 }
21914 }
21915 }
21916 }
21917}
21918
21919function dump(input, options) {
21920 options = options || {};
21921
21922 var state = new State(options);
21923
21924 if (!state.noRefs) getDuplicateReferences(input, state);
21925
21926 if (writeNode(state, 0, input, true, true)) return state.dump + '\n';
21927
21928 return '';
21929}
21930
21931function safeDump(input, options) {
21932 return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
21933}
21934
21935module.exports.dump = dump;
21936module.exports.safeDump = safeDump;
21937
21938
21939/***/ }),
21940/* 280 */
21941/***/ (function(module, exports, __webpack_require__) {
21942
21943var basePickBy = __webpack_require__(281),
21944 hasIn = __webpack_require__(287);
21945
21946/**
21947 * The base implementation of `_.pick` without support for individual
21948 * property identifiers.
21949 *
21950 * @private
21951 * @param {Object} object The source object.
21952 * @param {string[]} paths The property paths to pick.
21953 * @returns {Object} Returns the new object.
21954 */
21955function basePick(object, paths) {
21956 return basePickBy(object, paths, function(value, path) {
21957 return hasIn(object, path);
21958 });
21959}
21960
21961module.exports = basePick;
21962
21963
21964/***/ }),
21965/* 281 */
21966/***/ (function(module, exports, __webpack_require__) {
21967
21968var baseGet = __webpack_require__(152),
21969 baseSet = __webpack_require__(286),
21970 castPath = __webpack_require__(73);
21971
21972/**
21973 * The base implementation of `_.pickBy` without support for iteratee shorthands.
21974 *
21975 * @private
21976 * @param {Object} object The source object.
21977 * @param {string[]} paths The property paths to pick.
21978 * @param {Function} predicate The function invoked per property.
21979 * @returns {Object} Returns the new object.
21980 */
21981function basePickBy(object, paths, predicate) {
21982 var index = -1,
21983 length = paths.length,
21984 result = {};
21985
21986 while (++index < length) {
21987 var path = paths[index],
21988 value = baseGet(object, path);
21989
21990 if (predicate(value, path)) {
21991 baseSet(result, castPath(path, object), value);
21992 }
21993 }
21994 return result;
21995}
21996
21997module.exports = basePickBy;
21998
21999
22000/***/ }),
22001/* 282 */
22002/***/ (function(module, exports, __webpack_require__) {
22003
22004var isArray = __webpack_require__(44),
22005 isSymbol = __webpack_require__(283);
22006
22007/** Used to match property names within property paths. */
22008var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
22009 reIsPlainProp = /^\w*$/;
22010
22011/**
22012 * Checks if `value` is a property name and not a property path.
22013 *
22014 * @private
22015 * @param {*} value The value to check.
22016 * @param {Object} [object] The object to query keys on.
22017 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
22018 */
22019function isKey(value, object) {
22020 if (isArray(value)) {
22021 return false;
22022 }
22023 var type = typeof value;
22024 if (type == 'number' || type == 'symbol' || type == 'boolean' ||
22025 value == null || isSymbol(value)) {
22026 return true;
22027 }
22028 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
22029 (object != null && value in Object(object));
22030}
22031
22032module.exports = isKey;
22033
22034
22035/***/ }),
22036/* 283 */
22037/***/ (function(module, exports) {
22038
22039/**
22040 * This method returns `false`.
22041 *
22042 * @static
22043 * @memberOf _
22044 * @since 4.13.0
22045 * @category Util
22046 * @returns {boolean} Returns `false`.
22047 * @example
22048 *
22049 * _.times(2, _.stubFalse);
22050 * // => [false, false]
22051 */
22052function stubFalse() {
22053 return false;
22054}
22055
22056module.exports = stubFalse;
22057
22058
22059/***/ }),
22060/* 284 */
22061/***/ (function(module, exports, __webpack_require__) {
22062
22063var memoizeCapped = __webpack_require__(285);
22064
22065/** Used to match property names within property paths. */
22066var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
22067
22068/** Used to match backslashes in property paths. */
22069var reEscapeChar = /\\(\\)?/g;
22070
22071/**
22072 * Converts `string` to a property path array.
22073 *
22074 * @private
22075 * @param {string} string The string to convert.
22076 * @returns {Array} Returns the property path array.
22077 */
22078var stringToPath = memoizeCapped(function(string) {
22079 var result = [];
22080 if (string.charCodeAt(0) === 46 /* . */) {
22081 result.push('');
22082 }
22083 string.replace(rePropName, function(match, number, quote, subString) {
22084 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
22085 });
22086 return result;
22087});
22088
22089module.exports = stringToPath;
22090
22091
22092/***/ }),
22093/* 285 */
22094/***/ (function(module, exports) {
22095
22096/**
22097 * This method returns the first argument it receives.
22098 *
22099 * @static
22100 * @since 0.1.0
22101 * @memberOf _
22102 * @category Util
22103 * @param {*} value Any value.
22104 * @returns {*} Returns `value`.
22105 * @example
22106 *
22107 * var object = { 'a': 1 };
22108 *
22109 * console.log(_.identity(object) === object);
22110 * // => true
22111 */
22112function identity(value) {
22113 return value;
22114}
22115
22116module.exports = identity;
22117
22118
22119/***/ }),
22120/* 286 */
22121/***/ (function(module, exports, __webpack_require__) {
22122
22123var assignValue = __webpack_require__(68),
22124 castPath = __webpack_require__(73),
22125 isIndex = __webpack_require__(153),
22126 isObject = __webpack_require__(35),
22127 toKey = __webpack_require__(112);
22128
22129/**
22130 * The base implementation of `_.set`.
22131 *
22132 * @private
22133 * @param {Object} object The object to modify.
22134 * @param {Array|string} path The path of the property to set.
22135 * @param {*} value The value to set.
22136 * @param {Function} [customizer] The function to customize path creation.
22137 * @returns {Object} Returns `object`.
22138 */
22139function baseSet(object, path, value, customizer) {
22140 if (!isObject(object)) {
22141 return object;
22142 }
22143 path = castPath(path, object);
22144
22145 var index = -1,
22146 length = path.length,
22147 lastIndex = length - 1,
22148 nested = object;
22149
22150 while (nested != null && ++index < length) {
22151 var key = toKey(path[index]),
22152 newValue = value;
22153
22154 if (index != lastIndex) {
22155 var objValue = nested[key];
22156 newValue = customizer ? customizer(objValue, key, nested) : undefined;
22157 if (newValue === undefined) {
22158 newValue = isObject(objValue)
22159 ? objValue
22160 : (isIndex(path[index + 1]) ? [] : {});
22161 }
22162 }
22163 assignValue(nested, key, newValue);
22164 nested = nested[key];
22165 }
22166 return object;
22167}
22168
22169module.exports = baseSet;
22170
22171
22172/***/ }),
22173/* 287 */
22174/***/ (function(module, exports, __webpack_require__) {
22175
22176var baseHasIn = __webpack_require__(288),
22177 hasPath = __webpack_require__(289);
22178
22179/**
22180 * Checks if `path` is a direct or inherited property of `object`.
22181 *
22182 * @static
22183 * @memberOf _
22184 * @since 4.0.0
22185 * @category Object
22186 * @param {Object} object The object to query.
22187 * @param {Array|string} path The path to check.
22188 * @returns {boolean} Returns `true` if `path` exists, else `false`.
22189 * @example
22190 *
22191 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
22192 *
22193 * _.hasIn(object, 'a');
22194 * // => true
22195 *
22196 * _.hasIn(object, 'a.b');
22197 * // => true
22198 *
22199 * _.hasIn(object, ['a', 'b']);
22200 * // => true
22201 *
22202 * _.hasIn(object, 'b');
22203 * // => false
22204 */
22205function hasIn(object, path) {
22206 return object != null && hasPath(object, path, baseHasIn);
22207}
22208
22209module.exports = hasIn;
22210
22211
22212/***/ }),
22213/* 288 */
22214/***/ (function(module, exports) {
22215
22216/**
22217 * The base implementation of `_.hasIn` without support for deep paths.
22218 *
22219 * @private
22220 * @param {Object} [object] The object to query.
22221 * @param {Array|string} key The key to check.
22222 * @returns {boolean} Returns `true` if `key` exists, else `false`.
22223 */
22224function baseHasIn(object, key) {
22225 return object != null && key in Object(object);
22226}
22227
22228module.exports = baseHasIn;
22229
22230
22231/***/ }),
22232/* 289 */
22233/***/ (function(module, exports, __webpack_require__) {
22234
22235var castPath = __webpack_require__(73),
22236 isArguments = __webpack_require__(290),
22237 isArray = __webpack_require__(44),
22238 isIndex = __webpack_require__(153),
22239 isLength = __webpack_require__(131),
22240 toKey = __webpack_require__(112);
22241
22242/**
22243 * Checks if `path` exists on `object`.
22244 *
22245 * @private
22246 * @param {Object} object The object to query.
22247 * @param {Array|string} path The path to check.
22248 * @param {Function} hasFunc The function to check properties.
22249 * @returns {boolean} Returns `true` if `path` exists, else `false`.
22250 */
22251function hasPath(object, path, hasFunc) {
22252 path = castPath(path, object);
22253
22254 var index = -1,
22255 length = path.length,
22256 result = false;
22257
22258 while (++index < length) {
22259 var key = toKey(path[index]);
22260 if (!(result = object != null && hasFunc(object, key))) {
22261 break;
22262 }
22263 object = object[key];
22264 }
22265 if (result || ++index != length) {
22266 return result;
22267 }
22268 length = object == null ? 0 : object.length;
22269 return !!length && isLength(length) && isIndex(key, length) &&
22270 (isArray(object) || isArguments(object));
22271}
22272
22273module.exports = hasPath;
22274
22275
22276/***/ }),
22277/* 290 */
22278/***/ (function(module, exports) {
22279
22280/**
22281 * This method returns `false`.
22282 *
22283 * @static
22284 * @memberOf _
22285 * @since 4.13.0
22286 * @category Util
22287 * @returns {boolean} Returns `false`.
22288 * @example
22289 *
22290 * _.times(2, _.stubFalse);
22291 * // => [false, false]
22292 */
22293function stubFalse() {
22294 return false;
22295}
22296
22297module.exports = stubFalse;
22298
22299
22300/***/ }),
22301/* 291 */
22302/***/ (function(module, exports) {
22303
22304/**
22305 * This method returns the first argument it receives.
22306 *
22307 * @static
22308 * @since 0.1.0
22309 * @memberOf _
22310 * @category Util
22311 * @param {*} value Any value.
22312 * @returns {*} Returns `value`.
22313 * @example
22314 *
22315 * var object = { 'a': 1 };
22316 *
22317 * console.log(_.identity(object) === object);
22318 * // => true
22319 */
22320function identity(value) {
22321 return value;
22322}
22323
22324module.exports = identity;
22325
22326
22327/***/ }),
22328/* 292 */
22329/***/ (function(module, exports, __webpack_require__) {
22330
22331module.exports = __webpack_require__(293);
22332
22333/***/ }),
22334/* 293 */
22335/***/ (function(module, exports, __webpack_require__) {
22336
22337__webpack_require__(294);
22338module.exports = __webpack_require__(5).Reflect.get;
22339
22340
22341/***/ }),
22342/* 294 */
22343/***/ (function(module, exports, __webpack_require__) {
22344
22345// 26.1.6 Reflect.get(target, propertyKey [, receiver])
22346var gOPD = __webpack_require__(52);
22347var getPrototypeOf = __webpack_require__(102);
22348var has = __webpack_require__(23);
22349var $export = __webpack_require__(6);
22350var isObject = __webpack_require__(9);
22351var anObject = __webpack_require__(12);
22352
22353function get(target, propertyKey /* , receiver */) {
22354 var receiver = arguments.length < 3 ? target : arguments[2];
22355 var desc, proto;
22356 if (anObject(target) === receiver) return target[propertyKey];
22357 if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
22358 ? desc.value
22359 : desc.get !== undefined
22360 ? desc.get.call(receiver)
22361 : undefined;
22362 if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
22363}
22364
22365$export($export.S, 'Reflect', { get: get });
22366
22367
22368/***/ }),
22369/* 295 */
22370/***/ (function(module, exports, __webpack_require__) {
22371
22372var getPrototypeOf = __webpack_require__(77);
22373
22374function _superPropBase(object, property) {
22375 while (!Object.prototype.hasOwnProperty.call(object, property)) {
22376 object = getPrototypeOf(object);
22377 if (object === null) break;
22378 }
22379
22380 return object;
22381}
22382
22383module.exports = _superPropBase;
22384
22385/***/ }),
22386/* 296 */
22387/***/ (function(module, exports, __webpack_require__) {
22388
22389module.exports = __webpack_require__(297);
22390
22391/***/ }),
22392/* 297 */
22393/***/ (function(module, exports, __webpack_require__) {
22394
22395__webpack_require__(298);
22396module.exports = __webpack_require__(5).Object.getPrototypeOf;
22397
22398
22399/***/ }),
22400/* 298 */
22401/***/ (function(module, exports, __webpack_require__) {
22402
22403// 19.1.2.9 Object.getPrototypeOf(O)
22404var toObject = __webpack_require__(34);
22405var $getPrototypeOf = __webpack_require__(102);
22406
22407__webpack_require__(95)('getPrototypeOf', function () {
22408 return function getPrototypeOf(it) {
22409 return $getPrototypeOf(toObject(it));
22410 };
22411});
22412
22413
22414/***/ }),
22415/* 299 */
22416/***/ (function(module, exports, __webpack_require__) {
22417
22418__webpack_require__(300);
22419module.exports = __webpack_require__(5).Object.setPrototypeOf;
22420
22421
22422/***/ }),
22423/* 300 */
22424/***/ (function(module, exports, __webpack_require__) {
22425
22426// 19.1.3.19 Object.setPrototypeOf(O, proto)
22427var $export = __webpack_require__(6);
22428$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(301).set });
22429
22430
22431/***/ }),
22432/* 301 */
22433/***/ (function(module, exports, __webpack_require__) {
22434
22435// Works with __proto__ only. Old v8 can't work with null proto objects.
22436/* eslint-disable no-proto */
22437var isObject = __webpack_require__(9);
22438var anObject = __webpack_require__(12);
22439var check = function (O, proto) {
22440 anObject(O);
22441 if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
22442};
22443module.exports = {
22444 set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
22445 function (test, buggy, set) {
22446 try {
22447 set = __webpack_require__(26)(Function.call, __webpack_require__(52).f(Object.prototype, '__proto__').set, 2);
22448 set(test, []);
22449 buggy = !(test instanceof Array);
22450 } catch (e) { buggy = true; }
22451 return function setPrototypeOf(O, proto) {
22452 check(O, proto);
22453 if (buggy) O.__proto__ = proto;
22454 else set(O, proto);
22455 return O;
22456 };
22457 }({}, false) : undefined),
22458 check: check
22459};
22460
22461
22462/***/ }),
22463/* 302 */
22464/***/ (function(module, exports, __webpack_require__) {
22465
22466__webpack_require__(303);
22467var $Object = __webpack_require__(5).Object;
22468module.exports = function create(P, D) {
22469 return $Object.create(P, D);
22470};
22471
22472
22473/***/ }),
22474/* 303 */
22475/***/ (function(module, exports, __webpack_require__) {
22476
22477var $export = __webpack_require__(6);
22478// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
22479$export($export.S, 'Object', { create: __webpack_require__(67) });
22480
22481
22482/***/ }),
22483/* 304 */
22484/***/ (function(module, exports, __webpack_require__) {
22485
22486var _Object$setPrototypeOf = __webpack_require__(154);
22487
22488function _setPrototypeOf(o, p) {
22489 module.exports = _setPrototypeOf = _Object$setPrototypeOf || function _setPrototypeOf(o, p) {
22490 o.__proto__ = p;
22491 return o;
22492 };
22493
22494 return _setPrototypeOf(o, p);
22495}
22496
22497module.exports = _setPrototypeOf;
22498
22499/***/ }),
22500/* 305 */
22501/***/ (function(module, exports, __webpack_require__) {
22502
22503__webpack_require__(306);
22504module.exports = __webpack_require__(5).Reflect.construct;
22505
22506
22507/***/ }),
22508/* 306 */
22509/***/ (function(module, exports, __webpack_require__) {
22510
22511// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
22512var $export = __webpack_require__(6);
22513var create = __webpack_require__(67);
22514var aFunction = __webpack_require__(33);
22515var anObject = __webpack_require__(12);
22516var isObject = __webpack_require__(9);
22517var fails = __webpack_require__(28);
22518var bind = __webpack_require__(307);
22519var rConstruct = (__webpack_require__(7).Reflect || {}).construct;
22520
22521// MS Edge supports only 2 arguments and argumentsList argument is optional
22522// FF Nightly sets third argument as `new.target`, but does not create `this` from it
22523var NEW_TARGET_BUG = fails(function () {
22524 function F() { /* empty */ }
22525 return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
22526});
22527var ARGS_BUG = !fails(function () {
22528 rConstruct(function () { /* empty */ });
22529});
22530
22531$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
22532 construct: function construct(Target, args /* , newTarget */) {
22533 aFunction(Target);
22534 anObject(args);
22535 var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
22536 if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
22537 if (Target == newTarget) {
22538 // w/o altered newTarget, optimization for 0-4 arguments
22539 switch (args.length) {
22540 case 0: return new Target();
22541 case 1: return new Target(args[0]);
22542 case 2: return new Target(args[0], args[1]);
22543 case 3: return new Target(args[0], args[1], args[2]);
22544 case 4: return new Target(args[0], args[1], args[2], args[3]);
22545 }
22546 // w/o altered newTarget, lot of arguments case
22547 var $args = [null];
22548 $args.push.apply($args, args);
22549 return new (bind.apply(Target, $args))();
22550 }
22551 // with altered newTarget, not support built-in constructors
22552 var proto = newTarget.prototype;
22553 var instance = create(isObject(proto) ? proto : Object.prototype);
22554 var result = Function.apply.call(Target, instance, args);
22555 return isObject(result) ? result : instance;
22556 }
22557});
22558
22559
22560/***/ }),
22561/* 307 */
22562/***/ (function(module, exports, __webpack_require__) {
22563
22564"use strict";
22565
22566var aFunction = __webpack_require__(33);
22567var isObject = __webpack_require__(9);
22568var invoke = __webpack_require__(146);
22569var arraySlice = [].slice;
22570var factories = {};
22571
22572var construct = function (F, len, args) {
22573 if (!(len in factories)) {
22574 for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
22575 // eslint-disable-next-line no-new-func
22576 factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
22577 } return factories[len](F, args);
22578};
22579
22580module.exports = Function.bind || function bind(that /* , ...args */) {
22581 var fn = aFunction(this);
22582 var partArgs = arraySlice.call(arguments, 1);
22583 var bound = function (/* args... */) {
22584 var args = partArgs.concat(arraySlice.call(arguments));
22585 return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
22586 };
22587 if (isObject(fn.prototype)) bound.prototype = fn.prototype;
22588 return bound;
22589};
22590
22591
22592/***/ }),
22593/* 308 */
22594/***/ (function(module, exports, __webpack_require__) {
22595
22596var _Reflect$construct = __webpack_require__(155);
22597
22598function _isNativeReflectConstruct() {
22599 if (typeof Reflect === "undefined" || !_Reflect$construct) return false;
22600 if (_Reflect$construct.sham) return false;
22601 if (typeof Proxy === "function") return true;
22602
22603 try {
22604 Date.prototype.toString.call(_Reflect$construct(Date, [], function () {}));
22605 return true;
22606 } catch (e) {
22607 return false;
22608 }
22609}
22610
22611module.exports = _isNativeReflectConstruct;
22612
22613/***/ }),
22614/* 309 */
22615/***/ (function(module, exports, __webpack_require__) {
22616
22617var _typeof = __webpack_require__(4);
22618
22619var assertThisInitialized = __webpack_require__(310);
22620
22621function _possibleConstructorReturn(self, call) {
22622 if (call && (_typeof(call) === "object" || typeof call === "function")) {
22623 return call;
22624 }
22625
22626 return assertThisInitialized(self);
22627}
22628
22629module.exports = _possibleConstructorReturn;
22630
22631/***/ }),
22632/* 310 */
22633/***/ (function(module, exports) {
22634
22635function _assertThisInitialized(self) {
22636 if (self === void 0) {
22637 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
22638 }
22639
22640 return self;
22641}
22642
22643module.exports = _assertThisInitialized;
22644
22645/***/ }),
22646/* 311 */
22647/***/ (function(module, exports, __webpack_require__) {
22648
22649var _Array$isArray = __webpack_require__(0);
22650
22651var arrayLikeToArray = __webpack_require__(142);
22652
22653function _arrayWithoutHoles(arr) {
22654 if (_Array$isArray(arr)) return arrayLikeToArray(arr);
22655}
22656
22657module.exports = _arrayWithoutHoles;
22658
22659/***/ }),
22660/* 312 */
22661/***/ (function(module, exports, __webpack_require__) {
22662
22663var _Array$from = __webpack_require__(76);
22664
22665var _isIterable = __webpack_require__(143);
22666
22667var _Symbol = __webpack_require__(70);
22668
22669function _iterableToArray(iter) {
22670 if (typeof _Symbol !== "undefined" && _isIterable(Object(iter))) return _Array$from(iter);
22671}
22672
22673module.exports = _iterableToArray;
22674
22675/***/ }),
22676/* 313 */
22677/***/ (function(module, exports) {
22678
22679function _nonIterableSpread() {
22680 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
22681}
22682
22683module.exports = _nonIterableSpread;
22684
22685/***/ }),
22686/* 314 */
22687/***/ (function(module, exports, __webpack_require__) {
22688
22689__webpack_require__(315);
22690module.exports = __webpack_require__(5).Object.assign;
22691
22692
22693/***/ }),
22694/* 315 */
22695/***/ (function(module, exports, __webpack_require__) {
22696
22697// 19.1.3.1 Object.assign(target, source)
22698var $export = __webpack_require__(6);
22699
22700$export($export.S + $export.F, 'Object', { assign: __webpack_require__(156) });
22701
22702
22703/***/ }),
22704/* 316 */
22705/***/ (function(module, exports, __webpack_require__) {
22706
22707var baseIteratee = __webpack_require__(157),
22708 isArrayLike = __webpack_require__(129),
22709 keys = __webpack_require__(69);
22710
22711/**
22712 * Creates a `_.find` or `_.findLast` function.
22713 *
22714 * @private
22715 * @param {Function} findIndexFunc The function to find the collection index.
22716 * @returns {Function} Returns the new find function.
22717 */
22718function createFind(findIndexFunc) {
22719 return function(collection, predicate, fromIndex) {
22720 var iterable = Object(collection);
22721 if (!isArrayLike(collection)) {
22722 var iteratee = baseIteratee(predicate, 3);
22723 collection = keys(collection);
22724 predicate = function(key) { return iteratee(iterable[key], key, iterable); };
22725 }
22726 var index = findIndexFunc(collection, predicate, fromIndex);
22727 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
22728 };
22729}
22730
22731module.exports = createFind;
22732
22733
22734/***/ }),
22735/* 317 */
22736/***/ (function(module, exports, __webpack_require__) {
22737
22738var baseFindIndex = __webpack_require__(318),
22739 baseIteratee = __webpack_require__(157),
22740 toInteger = __webpack_require__(133);
22741
22742/* Built-in method references for those with the same name as other `lodash` methods. */
22743var nativeMax = Math.max;
22744
22745/**
22746 * This method is like `_.find` except that it returns the index of the first
22747 * element `predicate` returns truthy for instead of the element itself.
22748 *
22749 * @static
22750 * @memberOf _
22751 * @since 1.1.0
22752 * @category Array
22753 * @param {Array} array The array to inspect.
22754 * @param {Function} [predicate=_.identity] The function invoked per iteration.
22755 * @param {number} [fromIndex=0] The index to search from.
22756 * @returns {number} Returns the index of the found element, else `-1`.
22757 * @example
22758 *
22759 * var users = [
22760 * { 'user': 'barney', 'active': false },
22761 * { 'user': 'fred', 'active': false },
22762 * { 'user': 'pebbles', 'active': true }
22763 * ];
22764 *
22765 * _.findIndex(users, function(o) { return o.user == 'barney'; });
22766 * // => 0
22767 *
22768 * // The `_.matches` iteratee shorthand.
22769 * _.findIndex(users, { 'user': 'fred', 'active': false });
22770 * // => 1
22771 *
22772 * // The `_.matchesProperty` iteratee shorthand.
22773 * _.findIndex(users, ['active', false]);
22774 * // => 0
22775 *
22776 * // The `_.property` iteratee shorthand.
22777 * _.findIndex(users, 'active');
22778 * // => 2
22779 */
22780function findIndex(array, predicate, fromIndex) {
22781 var length = array == null ? 0 : array.length;
22782 if (!length) {
22783 return -1;
22784 }
22785 var index = fromIndex == null ? 0 : toInteger(fromIndex);
22786 if (index < 0) {
22787 index = nativeMax(length + index, 0);
22788 }
22789 return baseFindIndex(array, baseIteratee(predicate, 3), index);
22790}
22791
22792module.exports = findIndex;
22793
22794
22795/***/ }),
22796/* 318 */
22797/***/ (function(module, exports) {
22798
22799/**
22800 * The base implementation of `_.findIndex` and `_.findLastIndex` without
22801 * support for iteratee shorthands.
22802 *
22803 * @private
22804 * @param {Array} array The array to inspect.
22805 * @param {Function} predicate The function invoked per iteration.
22806 * @param {number} fromIndex The index to search from.
22807 * @param {boolean} [fromRight] Specify iterating from right to left.
22808 * @returns {number} Returns the index of the matched value, else `-1`.
22809 */
22810function baseFindIndex(array, predicate, fromIndex, fromRight) {
22811 var length = array.length,
22812 index = fromIndex + (fromRight ? 1 : -1);
22813
22814 while ((fromRight ? index-- : ++index < length)) {
22815 if (predicate(array[index], index, array)) {
22816 return index;
22817 }
22818 }
22819 return -1;
22820}
22821
22822module.exports = baseFindIndex;
22823
22824
22825/***/ }),
22826/* 319 */
22827/***/ (function(module, exports, __webpack_require__) {
22828
22829"use strict";
22830
22831
22832var isArray = Array.isArray;
22833var keyList = Object.keys;
22834var hasProp = Object.prototype.hasOwnProperty;
22835
22836module.exports = function equal(a, b) {
22837 if (a === b) return true;
22838
22839 if (a && b && typeof a == 'object' && typeof b == 'object') {
22840 var arrA = isArray(a)
22841 , arrB = isArray(b)
22842 , i
22843 , length
22844 , key;
22845
22846 if (arrA && arrB) {
22847 length = a.length;
22848 if (length != b.length) return false;
22849 for (i = length; i-- !== 0;)
22850 if (!equal(a[i], b[i])) return false;
22851 return true;
22852 }
22853
22854 if (arrA != arrB) return false;
22855
22856 var dateA = a instanceof Date
22857 , dateB = b instanceof Date;
22858 if (dateA != dateB) return false;
22859 if (dateA && dateB) return a.getTime() == b.getTime();
22860
22861 var regexpA = a instanceof RegExp
22862 , regexpB = b instanceof RegExp;
22863 if (regexpA != regexpB) return false;
22864 if (regexpA && regexpB) return a.toString() == b.toString();
22865
22866 var keys = keyList(a);
22867 length = keys.length;
22868
22869 if (length !== keyList(b).length)
22870 return false;
22871
22872 for (i = length; i-- !== 0;)
22873 if (!hasProp.call(b, keys[i])) return false;
22874
22875 for (i = length; i-- !== 0;) {
22876 key = keys[i];
22877 if (!equal(a[key], b[key])) return false;
22878 }
22879
22880 return true;
22881 }
22882
22883 return a!==a && b!==b;
22884};
22885
22886
22887/***/ }),
22888/* 320 */
22889/***/ (function(module, exports, __webpack_require__) {
22890
22891var Stack = __webpack_require__(321),
22892 arrayEach = __webpack_require__(327),
22893 assignValue = __webpack_require__(68),
22894 baseAssign = __webpack_require__(328),
22895 baseAssignIn = __webpack_require__(329),
22896 cloneBuffer = __webpack_require__(331),
22897 copyArray = __webpack_require__(334),
22898 copySymbols = __webpack_require__(335),
22899 copySymbolsIn = __webpack_require__(337),
22900 getAllKeys = __webpack_require__(339),
22901 getAllKeysIn = __webpack_require__(340),
22902 getTag = __webpack_require__(341),
22903 initCloneArray = __webpack_require__(342),
22904 initCloneByTag = __webpack_require__(343),
22905 initCloneObject = __webpack_require__(344),
22906 isArray = __webpack_require__(44),
22907 isBuffer = __webpack_require__(346),
22908 isMap = __webpack_require__(347),
22909 isObject = __webpack_require__(35),
22910 isSet = __webpack_require__(348),
22911 keys = __webpack_require__(69);
22912
22913/** Used to compose bitmasks for cloning. */
22914var CLONE_DEEP_FLAG = 1,
22915 CLONE_FLAT_FLAG = 2,
22916 CLONE_SYMBOLS_FLAG = 4;
22917
22918/** `Object#toString` result references. */
22919var argsTag = '[object Arguments]',
22920 arrayTag = '[object Array]',
22921 boolTag = '[object Boolean]',
22922 dateTag = '[object Date]',
22923 errorTag = '[object Error]',
22924 funcTag = '[object Function]',
22925 genTag = '[object GeneratorFunction]',
22926 mapTag = '[object Map]',
22927 numberTag = '[object Number]',
22928 objectTag = '[object Object]',
22929 regexpTag = '[object RegExp]',
22930 setTag = '[object Set]',
22931 stringTag = '[object String]',
22932 symbolTag = '[object Symbol]',
22933 weakMapTag = '[object WeakMap]';
22934
22935var arrayBufferTag = '[object ArrayBuffer]',
22936 dataViewTag = '[object DataView]',
22937 float32Tag = '[object Float32Array]',
22938 float64Tag = '[object Float64Array]',
22939 int8Tag = '[object Int8Array]',
22940 int16Tag = '[object Int16Array]',
22941 int32Tag = '[object Int32Array]',
22942 uint8Tag = '[object Uint8Array]',
22943 uint8ClampedTag = '[object Uint8ClampedArray]',
22944 uint16Tag = '[object Uint16Array]',
22945 uint32Tag = '[object Uint32Array]';
22946
22947/** Used to identify `toStringTag` values supported by `_.clone`. */
22948var cloneableTags = {};
22949cloneableTags[argsTag] = cloneableTags[arrayTag] =
22950cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
22951cloneableTags[boolTag] = cloneableTags[dateTag] =
22952cloneableTags[float32Tag] = cloneableTags[float64Tag] =
22953cloneableTags[int8Tag] = cloneableTags[int16Tag] =
22954cloneableTags[int32Tag] = cloneableTags[mapTag] =
22955cloneableTags[numberTag] = cloneableTags[objectTag] =
22956cloneableTags[regexpTag] = cloneableTags[setTag] =
22957cloneableTags[stringTag] = cloneableTags[symbolTag] =
22958cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
22959cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
22960cloneableTags[errorTag] = cloneableTags[funcTag] =
22961cloneableTags[weakMapTag] = false;
22962
22963/**
22964 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
22965 * traversed objects.
22966 *
22967 * @private
22968 * @param {*} value The value to clone.
22969 * @param {boolean} bitmask The bitmask flags.
22970 * 1 - Deep clone
22971 * 2 - Flatten inherited properties
22972 * 4 - Clone symbols
22973 * @param {Function} [customizer] The function to customize cloning.
22974 * @param {string} [key] The key of `value`.
22975 * @param {Object} [object] The parent object of `value`.
22976 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
22977 * @returns {*} Returns the cloned value.
22978 */
22979function baseClone(value, bitmask, customizer, key, object, stack) {
22980 var result,
22981 isDeep = bitmask & CLONE_DEEP_FLAG,
22982 isFlat = bitmask & CLONE_FLAT_FLAG,
22983 isFull = bitmask & CLONE_SYMBOLS_FLAG;
22984
22985 if (customizer) {
22986 result = object ? customizer(value, key, object, stack) : customizer(value);
22987 }
22988 if (result !== undefined) {
22989 return result;
22990 }
22991 if (!isObject(value)) {
22992 return value;
22993 }
22994 var isArr = isArray(value);
22995 if (isArr) {
22996 result = initCloneArray(value);
22997 if (!isDeep) {
22998 return copyArray(value, result);
22999 }
23000 } else {
23001 var tag = getTag(value),
23002 isFunc = tag == funcTag || tag == genTag;
23003
23004 if (isBuffer(value)) {
23005 return cloneBuffer(value, isDeep);
23006 }
23007 if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
23008 result = (isFlat || isFunc) ? {} : initCloneObject(value);
23009 if (!isDeep) {
23010 return isFlat
23011 ? copySymbolsIn(value, baseAssignIn(result, value))
23012 : copySymbols(value, baseAssign(result, value));
23013 }
23014 } else {
23015 if (!cloneableTags[tag]) {
23016 return object ? value : {};
23017 }
23018 result = initCloneByTag(value, tag, isDeep);
23019 }
23020 }
23021 // Check for circular references and return its corresponding clone.
23022 stack || (stack = new Stack);
23023 var stacked = stack.get(value);
23024 if (stacked) {
23025 return stacked;
23026 }
23027 stack.set(value, result);
23028
23029 if (isSet(value)) {
23030 value.forEach(function(subValue) {
23031 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
23032 });
23033 } else if (isMap(value)) {
23034 value.forEach(function(subValue, key) {
23035 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
23036 });
23037 }
23038
23039 var keysFunc = isFull
23040 ? (isFlat ? getAllKeysIn : getAllKeys)
23041 : (isFlat ? keysIn : keys);
23042
23043 var props = isArr ? undefined : keysFunc(value);
23044 arrayEach(props || value, function(subValue, key) {
23045 if (props) {
23046 key = subValue;
23047 subValue = value[key];
23048 }
23049 // Recursively populate clone (susceptible to call stack limits).
23050 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
23051 });
23052 return result;
23053}
23054
23055module.exports = baseClone;
23056
23057
23058/***/ }),
23059/* 321 */
23060/***/ (function(module, exports, __webpack_require__) {
23061
23062var listCacheClear = __webpack_require__(322),
23063 listCacheDelete = __webpack_require__(323),
23064 listCacheGet = __webpack_require__(324),
23065 listCacheHas = __webpack_require__(325),
23066 listCacheSet = __webpack_require__(326);
23067
23068/**
23069 * Creates an list cache object.
23070 *
23071 * @private
23072 * @constructor
23073 * @param {Array} [entries] The key-value pairs to cache.
23074 */
23075function ListCache(entries) {
23076 var index = -1,
23077 length = entries == null ? 0 : entries.length;
23078
23079 this.clear();
23080 while (++index < length) {
23081 var entry = entries[index];
23082 this.set(entry[0], entry[1]);
23083 }
23084}
23085
23086// Add methods to `ListCache`.
23087ListCache.prototype.clear = listCacheClear;
23088ListCache.prototype['delete'] = listCacheDelete;
23089ListCache.prototype.get = listCacheGet;
23090ListCache.prototype.has = listCacheHas;
23091ListCache.prototype.set = listCacheSet;
23092
23093module.exports = ListCache;
23094
23095
23096/***/ }),
23097/* 322 */
23098/***/ (function(module, exports) {
23099
23100/**
23101 * Removes all key-value entries from the list cache.
23102 *
23103 * @private
23104 * @name clear
23105 * @memberOf ListCache
23106 */
23107function listCacheClear() {
23108 this.__data__ = [];
23109 this.size = 0;
23110}
23111
23112module.exports = listCacheClear;
23113
23114
23115/***/ }),
23116/* 323 */
23117/***/ (function(module, exports, __webpack_require__) {
23118
23119var assocIndexOf = __webpack_require__(75);
23120
23121/** Used for built-in method references. */
23122var arrayProto = Array.prototype;
23123
23124/** Built-in value references. */
23125var splice = arrayProto.splice;
23126
23127/**
23128 * Removes `key` and its value from the list cache.
23129 *
23130 * @private
23131 * @name delete
23132 * @memberOf ListCache
23133 * @param {string} key The key of the value to remove.
23134 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
23135 */
23136function listCacheDelete(key) {
23137 var data = this.__data__,
23138 index = assocIndexOf(data, key);
23139
23140 if (index < 0) {
23141 return false;
23142 }
23143 var lastIndex = data.length - 1;
23144 if (index == lastIndex) {
23145 data.pop();
23146 } else {
23147 splice.call(data, index, 1);
23148 }
23149 --this.size;
23150 return true;
23151}
23152
23153module.exports = listCacheDelete;
23154
23155
23156/***/ }),
23157/* 324 */
23158/***/ (function(module, exports, __webpack_require__) {
23159
23160var assocIndexOf = __webpack_require__(75);
23161
23162/**
23163 * Gets the list cache value for `key`.
23164 *
23165 * @private
23166 * @name get
23167 * @memberOf ListCache
23168 * @param {string} key The key of the value to get.
23169 * @returns {*} Returns the entry value.
23170 */
23171function listCacheGet(key) {
23172 var data = this.__data__,
23173 index = assocIndexOf(data, key);
23174
23175 return index < 0 ? undefined : data[index][1];
23176}
23177
23178module.exports = listCacheGet;
23179
23180
23181/***/ }),
23182/* 325 */
23183/***/ (function(module, exports, __webpack_require__) {
23184
23185var assocIndexOf = __webpack_require__(75);
23186
23187/**
23188 * Checks if a list cache value for `key` exists.
23189 *
23190 * @private
23191 * @name has
23192 * @memberOf ListCache
23193 * @param {string} key The key of the entry to check.
23194 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
23195 */
23196function listCacheHas(key) {
23197 return assocIndexOf(this.__data__, key) > -1;
23198}
23199
23200module.exports = listCacheHas;
23201
23202
23203/***/ }),
23204/* 326 */
23205/***/ (function(module, exports, __webpack_require__) {
23206
23207var assocIndexOf = __webpack_require__(75);
23208
23209/**
23210 * Sets the list cache `key` to `value`.
23211 *
23212 * @private
23213 * @name set
23214 * @memberOf ListCache
23215 * @param {string} key The key of the value to set.
23216 * @param {*} value The value to set.
23217 * @returns {Object} Returns the list cache instance.
23218 */
23219function listCacheSet(key, value) {
23220 var data = this.__data__,
23221 index = assocIndexOf(data, key);
23222
23223 if (index < 0) {
23224 ++this.size;
23225 data.push([key, value]);
23226 } else {
23227 data[index][1] = value;
23228 }
23229 return this;
23230}
23231
23232module.exports = listCacheSet;
23233
23234
23235/***/ }),
23236/* 327 */
23237/***/ (function(module, exports) {
23238
23239/**
23240 * A specialized version of `_.forEach` for arrays without support for
23241 * iteratee shorthands.
23242 *
23243 * @private
23244 * @param {Array} [array] The array to iterate over.
23245 * @param {Function} iteratee The function invoked per iteration.
23246 * @returns {Array} Returns `array`.
23247 */
23248function arrayEach(array, iteratee) {
23249 var index = -1,
23250 length = array == null ? 0 : array.length;
23251
23252 while (++index < length) {
23253 if (iteratee(array[index], index, array) === false) {
23254 break;
23255 }
23256 }
23257 return array;
23258}
23259
23260module.exports = arrayEach;
23261
23262
23263/***/ }),
23264/* 328 */
23265/***/ (function(module, exports, __webpack_require__) {
23266
23267var copyObject = __webpack_require__(55),
23268 keys = __webpack_require__(69);
23269
23270/**
23271 * The base implementation of `_.assign` without support for multiple sources
23272 * or `customizer` functions.
23273 *
23274 * @private
23275 * @param {Object} object The destination object.
23276 * @param {Object} source The source object.
23277 * @returns {Object} Returns `object`.
23278 */
23279function baseAssign(object, source) {
23280 return object && copyObject(source, keys(source), object);
23281}
23282
23283module.exports = baseAssign;
23284
23285
23286/***/ }),
23287/* 329 */
23288/***/ (function(module, exports, __webpack_require__) {
23289
23290var copyObject = __webpack_require__(55),
23291 keysIn = __webpack_require__(330);
23292
23293/**
23294 * The base implementation of `_.assignIn` without support for multiple sources
23295 * or `customizer` functions.
23296 *
23297 * @private
23298 * @param {Object} object The destination object.
23299 * @param {Object} source The source object.
23300 * @returns {Object} Returns `object`.
23301 */
23302function baseAssignIn(object, source) {
23303 return object && copyObject(source, keysIn(source), object);
23304}
23305
23306module.exports = baseAssignIn;
23307
23308
23309/***/ }),
23310/* 330 */
23311/***/ (function(module, exports) {
23312
23313/**
23314 * This function is like
23315 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
23316 * except that it includes inherited enumerable properties.
23317 *
23318 * @private
23319 * @param {Object} object The object to query.
23320 * @returns {Array} Returns the array of property names.
23321 */
23322function nativeKeysIn(object) {
23323 var result = [];
23324 if (object != null) {
23325 for (var key in Object(object)) {
23326 result.push(key);
23327 }
23328 }
23329 return result;
23330}
23331
23332module.exports = nativeKeysIn;
23333
23334
23335/***/ }),
23336/* 331 */
23337/***/ (function(module, exports, __webpack_require__) {
23338
23339/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(332);
23340
23341/** Detect free variable `exports`. */
23342var freeExports = true && exports && !exports.nodeType && exports;
23343
23344/** Detect free variable `module`. */
23345var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
23346
23347/** Detect the popular CommonJS extension `module.exports`. */
23348var moduleExports = freeModule && freeModule.exports === freeExports;
23349
23350/** Built-in value references. */
23351var Buffer = moduleExports ? root.Buffer : undefined,
23352 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
23353
23354/**
23355 * Creates a clone of `buffer`.
23356 *
23357 * @private
23358 * @param {Buffer} buffer The buffer to clone.
23359 * @param {boolean} [isDeep] Specify a deep clone.
23360 * @returns {Buffer} Returns the cloned buffer.
23361 */
23362function cloneBuffer(buffer, isDeep) {
23363 if (isDeep) {
23364 return buffer.slice();
23365 }
23366 var length = buffer.length,
23367 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
23368
23369 buffer.copy(result);
23370 return result;
23371}
23372
23373module.exports = cloneBuffer;
23374
23375/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(135)(module)))
23376
23377/***/ }),
23378/* 332 */
23379/***/ (function(module, exports, __webpack_require__) {
23380
23381var freeGlobal = __webpack_require__(333);
23382
23383/** Detect free variable `self`. */
23384var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
23385
23386/** Used as a reference to the global object. */
23387var root = freeGlobal || freeSelf || Function('return this')();
23388
23389module.exports = root;
23390
23391
23392/***/ }),
23393/* 333 */
23394/***/ (function(module, exports, __webpack_require__) {
23395
23396/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
23397var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
23398
23399module.exports = freeGlobal;
23400
23401/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(101)))
23402
23403/***/ }),
23404/* 334 */
23405/***/ (function(module, exports) {
23406
23407/**
23408 * Copies the values of `source` to `array`.
23409 *
23410 * @private
23411 * @param {Array} source The array to copy values from.
23412 * @param {Array} [array=[]] The array to copy values to.
23413 * @returns {Array} Returns `array`.
23414 */
23415function copyArray(source, array) {
23416 var index = -1,
23417 length = source.length;
23418
23419 array || (array = Array(length));
23420 while (++index < length) {
23421 array[index] = source[index];
23422 }
23423 return array;
23424}
23425
23426module.exports = copyArray;
23427
23428
23429/***/ }),
23430/* 335 */
23431/***/ (function(module, exports, __webpack_require__) {
23432
23433var copyObject = __webpack_require__(55),
23434 getSymbols = __webpack_require__(336);
23435
23436/**
23437 * Copies own symbols of `source` to `object`.
23438 *
23439 * @private
23440 * @param {Object} source The object to copy symbols from.
23441 * @param {Object} [object={}] The object to copy symbols to.
23442 * @returns {Object} Returns `object`.
23443 */
23444function copySymbols(source, object) {
23445 return copyObject(source, getSymbols(source), object);
23446}
23447
23448module.exports = copySymbols;
23449
23450
23451/***/ }),
23452/* 336 */
23453/***/ (function(module, exports) {
23454
23455/**
23456 * This method returns a new empty array.
23457 *
23458 * @static
23459 * @memberOf _
23460 * @since 4.13.0
23461 * @category Util
23462 * @returns {Array} Returns the new empty array.
23463 * @example
23464 *
23465 * var arrays = _.times(2, _.stubArray);
23466 *
23467 * console.log(arrays);
23468 * // => [[], []]
23469 *
23470 * console.log(arrays[0] === arrays[1]);
23471 * // => false
23472 */
23473function stubArray() {
23474 return [];
23475}
23476
23477module.exports = stubArray;
23478
23479
23480/***/ }),
23481/* 337 */
23482/***/ (function(module, exports, __webpack_require__) {
23483
23484var copyObject = __webpack_require__(55),
23485 getSymbolsIn = __webpack_require__(338);
23486
23487/**
23488 * Copies own and inherited symbols of `source` to `object`.
23489 *
23490 * @private
23491 * @param {Object} source The object to copy symbols from.
23492 * @param {Object} [object={}] The object to copy symbols to.
23493 * @returns {Object} Returns `object`.
23494 */
23495function copySymbolsIn(source, object) {
23496 return copyObject(source, getSymbolsIn(source), object);
23497}
23498
23499module.exports = copySymbolsIn;
23500
23501
23502/***/ }),
23503/* 338 */
23504/***/ (function(module, exports) {
23505
23506/**
23507 * This method returns a new empty array.
23508 *
23509 * @static
23510 * @memberOf _
23511 * @since 4.13.0
23512 * @category Util
23513 * @returns {Array} Returns the new empty array.
23514 * @example
23515 *
23516 * var arrays = _.times(2, _.stubArray);
23517 *
23518 * console.log(arrays);
23519 * // => [[], []]
23520 *
23521 * console.log(arrays[0] === arrays[1]);
23522 * // => false
23523 */
23524function stubArray() {
23525 return [];
23526}
23527
23528module.exports = stubArray;
23529
23530
23531/***/ }),
23532/* 339 */
23533/***/ (function(module, exports, __webpack_require__) {
23534
23535var overArg = __webpack_require__(100);
23536
23537/* Built-in method references for those with the same name as other `lodash` methods. */
23538var nativeKeys = overArg(Object.keys, Object);
23539
23540module.exports = nativeKeys;
23541
23542
23543/***/ }),
23544/* 340 */
23545/***/ (function(module, exports) {
23546
23547/**
23548 * This function is like
23549 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
23550 * except that it includes inherited enumerable properties.
23551 *
23552 * @private
23553 * @param {Object} object The object to query.
23554 * @returns {Array} Returns the array of property names.
23555 */
23556function nativeKeysIn(object) {
23557 var result = [];
23558 if (object != null) {
23559 for (var key in Object(object)) {
23560 result.push(key);
23561 }
23562 }
23563 return result;
23564}
23565
23566module.exports = nativeKeysIn;
23567
23568
23569/***/ }),
23570/* 341 */
23571/***/ (function(module, exports) {
23572
23573/** Used for built-in method references. */
23574var objectProto = Object.prototype;
23575
23576/**
23577 * Used to resolve the
23578 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
23579 * of values.
23580 */
23581var nativeObjectToString = objectProto.toString;
23582
23583/**
23584 * Converts `value` to a string using `Object.prototype.toString`.
23585 *
23586 * @private
23587 * @param {*} value The value to convert.
23588 * @returns {string} Returns the converted string.
23589 */
23590function objectToString(value) {
23591 return nativeObjectToString.call(value);
23592}
23593
23594module.exports = objectToString;
23595
23596
23597/***/ }),
23598/* 342 */
23599/***/ (function(module, exports) {
23600
23601/** Used for built-in method references. */
23602var objectProto = Object.prototype;
23603
23604/** Used to check objects for own properties. */
23605var hasOwnProperty = objectProto.hasOwnProperty;
23606
23607/**
23608 * Initializes an array clone.
23609 *
23610 * @private
23611 * @param {Array} array The array to clone.
23612 * @returns {Array} Returns the initialized clone.
23613 */
23614function initCloneArray(array) {
23615 var length = array.length,
23616 result = new array.constructor(length);
23617
23618 // Add properties assigned by `RegExp#exec`.
23619 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
23620 result.index = array.index;
23621 result.input = array.input;
23622 }
23623 return result;
23624}
23625
23626module.exports = initCloneArray;
23627
23628
23629/***/ }),
23630/* 343 */
23631/***/ (function(module, exports) {
23632
23633/**
23634 * This method returns the first argument it receives.
23635 *
23636 * @static
23637 * @since 0.1.0
23638 * @memberOf _
23639 * @category Util
23640 * @param {*} value Any value.
23641 * @returns {*} Returns `value`.
23642 * @example
23643 *
23644 * var object = { 'a': 1 };
23645 *
23646 * console.log(_.identity(object) === object);
23647 * // => true
23648 */
23649function identity(value) {
23650 return value;
23651}
23652
23653module.exports = identity;
23654
23655
23656/***/ }),
23657/* 344 */
23658/***/ (function(module, exports, __webpack_require__) {
23659
23660var baseCreate = __webpack_require__(345),
23661 getPrototype = __webpack_require__(158),
23662 isPrototype = __webpack_require__(132);
23663
23664/**
23665 * Initializes an object clone.
23666 *
23667 * @private
23668 * @param {Object} object The object to clone.
23669 * @returns {Object} Returns the initialized clone.
23670 */
23671function initCloneObject(object) {
23672 return (typeof object.constructor == 'function' && !isPrototype(object))
23673 ? baseCreate(getPrototype(object))
23674 : {};
23675}
23676
23677module.exports = initCloneObject;
23678
23679
23680/***/ }),
23681/* 345 */
23682/***/ (function(module, exports, __webpack_require__) {
23683
23684var isObject = __webpack_require__(35);
23685
23686/** Built-in value references. */
23687var objectCreate = Object.create;
23688
23689/**
23690 * The base implementation of `_.create` without support for assigning
23691 * properties to the created object.
23692 *
23693 * @private
23694 * @param {Object} proto The object to inherit from.
23695 * @returns {Object} Returns the new object.
23696 */
23697var baseCreate = (function() {
23698 function object() {}
23699 return function(proto) {
23700 if (!isObject(proto)) {
23701 return {};
23702 }
23703 if (objectCreate) {
23704 return objectCreate(proto);
23705 }
23706 object.prototype = proto;
23707 var result = new object;
23708 object.prototype = undefined;
23709 return result;
23710 };
23711}());
23712
23713module.exports = baseCreate;
23714
23715
23716/***/ }),
23717/* 346 */
23718/***/ (function(module, exports) {
23719
23720/**
23721 * This method returns `false`.
23722 *
23723 * @static
23724 * @memberOf _
23725 * @since 4.13.0
23726 * @category Util
23727 * @returns {boolean} Returns `false`.
23728 * @example
23729 *
23730 * _.times(2, _.stubFalse);
23731 * // => [false, false]
23732 */
23733function stubFalse() {
23734 return false;
23735}
23736
23737module.exports = stubFalse;
23738
23739
23740/***/ }),
23741/* 347 */
23742/***/ (function(module, exports) {
23743
23744/**
23745 * This method returns `false`.
23746 *
23747 * @static
23748 * @memberOf _
23749 * @since 4.13.0
23750 * @category Util
23751 * @returns {boolean} Returns `false`.
23752 * @example
23753 *
23754 * _.times(2, _.stubFalse);
23755 * // => [false, false]
23756 */
23757function stubFalse() {
23758 return false;
23759}
23760
23761module.exports = stubFalse;
23762
23763
23764/***/ }),
23765/* 348 */
23766/***/ (function(module, exports) {
23767
23768/**
23769 * This method returns `false`.
23770 *
23771 * @static
23772 * @memberOf _
23773 * @since 4.13.0
23774 * @category Util
23775 * @returns {boolean} Returns `false`.
23776 * @example
23777 *
23778 * _.times(2, _.stubFalse);
23779 * // => [false, false]
23780 */
23781function stubFalse() {
23782 return false;
23783}
23784
23785module.exports = stubFalse;
23786
23787
23788/***/ }),
23789/* 349 */
23790/***/ (function(module, exports, __webpack_require__) {
23791
23792__webpack_require__(105);
23793__webpack_require__(56);
23794__webpack_require__(350);
23795__webpack_require__(355);
23796__webpack_require__(357);
23797module.exports = __webpack_require__(5).WeakMap;
23798
23799
23800/***/ }),
23801/* 350 */
23802/***/ (function(module, exports, __webpack_require__) {
23803
23804"use strict";
23805
23806var global = __webpack_require__(7);
23807var each = __webpack_require__(114)(0);
23808var redefine = __webpack_require__(96);
23809var meta = __webpack_require__(66);
23810var assign = __webpack_require__(156);
23811var weak = __webpack_require__(353);
23812var isObject = __webpack_require__(9);
23813var validate = __webpack_require__(115);
23814var NATIVE_WEAK_MAP = __webpack_require__(115);
23815var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
23816var WEAK_MAP = 'WeakMap';
23817var getWeak = meta.getWeak;
23818var isExtensible = Object.isExtensible;
23819var uncaughtFrozenStore = weak.ufstore;
23820var InternalMap;
23821
23822var wrapper = function (get) {
23823 return function WeakMap() {
23824 return get(this, arguments.length > 0 ? arguments[0] : undefined);
23825 };
23826};
23827
23828var methods = {
23829 // 23.3.3.3 WeakMap.prototype.get(key)
23830 get: function get(key) {
23831 if (isObject(key)) {
23832 var data = getWeak(key);
23833 if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
23834 return data ? data[this._i] : undefined;
23835 }
23836 },
23837 // 23.3.3.5 WeakMap.prototype.set(key, value)
23838 set: function set(key, value) {
23839 return weak.def(validate(this, WEAK_MAP), key, value);
23840 }
23841};
23842
23843// 23.3 WeakMap Objects
23844var $WeakMap = module.exports = __webpack_require__(354)(WEAK_MAP, wrapper, methods, weak, true, true);
23845
23846// IE11 WeakMap frozen keys fix
23847if (NATIVE_WEAK_MAP && IS_IE11) {
23848 InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
23849 assign(InternalMap.prototype, methods);
23850 meta.NEED = true;
23851 each(['delete', 'has', 'get', 'set'], function (key) {
23852 var proto = $WeakMap.prototype;
23853 var method = proto[key];
23854 redefine(proto, key, function (a, b) {
23855 // store frozen objects on internal weakmap shim
23856 if (isObject(a) && !isExtensible(a)) {
23857 if (!this._f) this._f = new InternalMap();
23858 var result = this._f[key](a, b);
23859 return key == 'set' ? this : result;
23860 // store all the rest on native weakmap
23861 } return method.call(this, a, b);
23862 });
23863 });
23864}
23865
23866
23867/***/ }),
23868/* 351 */
23869/***/ (function(module, exports, __webpack_require__) {
23870
23871// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
23872var speciesConstructor = __webpack_require__(352);
23873
23874module.exports = function (original, length) {
23875 return new (speciesConstructor(original))(length);
23876};
23877
23878
23879/***/ }),
23880/* 352 */
23881/***/ (function(module, exports, __webpack_require__) {
23882
23883var isObject = __webpack_require__(9);
23884var isArray = __webpack_require__(99);
23885var SPECIES = __webpack_require__(11)('species');
23886
23887module.exports = function (original) {
23888 var C;
23889 if (isArray(original)) {
23890 C = original.constructor;
23891 // cross-realm fallback
23892 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
23893 if (isObject(C)) {
23894 C = C[SPECIES];
23895 if (C === null) C = undefined;
23896 }
23897 } return C === undefined ? Array : C;
23898};
23899
23900
23901/***/ }),
23902/* 353 */
23903/***/ (function(module, exports, __webpack_require__) {
23904
23905"use strict";
23906
23907var redefineAll = __webpack_require__(109);
23908var getWeak = __webpack_require__(66).getWeak;
23909var anObject = __webpack_require__(12);
23910var isObject = __webpack_require__(9);
23911var anInstance = __webpack_require__(107);
23912var forOf = __webpack_require__(71);
23913var createArrayMethod = __webpack_require__(114);
23914var $has = __webpack_require__(23);
23915var validate = __webpack_require__(115);
23916var arrayFind = createArrayMethod(5);
23917var arrayFindIndex = createArrayMethod(6);
23918var id = 0;
23919
23920// fallback for uncaught frozen keys
23921var uncaughtFrozenStore = function (that) {
23922 return that._l || (that._l = new UncaughtFrozenStore());
23923};
23924var UncaughtFrozenStore = function () {
23925 this.a = [];
23926};
23927var findUncaughtFrozen = function (store, key) {
23928 return arrayFind(store.a, function (it) {
23929 return it[0] === key;
23930 });
23931};
23932UncaughtFrozenStore.prototype = {
23933 get: function (key) {
23934 var entry = findUncaughtFrozen(this, key);
23935 if (entry) return entry[1];
23936 },
23937 has: function (key) {
23938 return !!findUncaughtFrozen(this, key);
23939 },
23940 set: function (key, value) {
23941 var entry = findUncaughtFrozen(this, key);
23942 if (entry) entry[1] = value;
23943 else this.a.push([key, value]);
23944 },
23945 'delete': function (key) {
23946 var index = arrayFindIndex(this.a, function (it) {
23947 return it[0] === key;
23948 });
23949 if (~index) this.a.splice(index, 1);
23950 return !!~index;
23951 }
23952};
23953
23954module.exports = {
23955 getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
23956 var C = wrapper(function (that, iterable) {
23957 anInstance(that, C, NAME, '_i');
23958 that._t = NAME; // collection type
23959 that._i = id++; // collection id
23960 that._l = undefined; // leak store for uncaught frozen objects
23961 if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
23962 });
23963 redefineAll(C.prototype, {
23964 // 23.3.3.2 WeakMap.prototype.delete(key)
23965 // 23.4.3.3 WeakSet.prototype.delete(value)
23966 'delete': function (key) {
23967 if (!isObject(key)) return false;
23968 var data = getWeak(key);
23969 if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
23970 return data && $has(data, this._i) && delete data[this._i];
23971 },
23972 // 23.3.3.4 WeakMap.prototype.has(key)
23973 // 23.4.3.4 WeakSet.prototype.has(value)
23974 has: function has(key) {
23975 if (!isObject(key)) return false;
23976 var data = getWeak(key);
23977 if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
23978 return data && $has(data, this._i);
23979 }
23980 });
23981 return C;
23982 },
23983 def: function (that, key, value) {
23984 var data = getWeak(anObject(key), true);
23985 if (data === true) uncaughtFrozenStore(that).set(key, value);
23986 else data[that._i] = value;
23987 return that;
23988 },
23989 ufstore: uncaughtFrozenStore
23990};
23991
23992
23993/***/ }),
23994/* 354 */
23995/***/ (function(module, exports, __webpack_require__) {
23996
23997"use strict";
23998
23999var global = __webpack_require__(7);
24000var $export = __webpack_require__(6);
24001var meta = __webpack_require__(66);
24002var fails = __webpack_require__(28);
24003var hide = __webpack_require__(27);
24004var redefineAll = __webpack_require__(109);
24005var forOf = __webpack_require__(71);
24006var anInstance = __webpack_require__(107);
24007var isObject = __webpack_require__(9);
24008var setToStringTag = __webpack_require__(54);
24009var dP = __webpack_require__(19).f;
24010var each = __webpack_require__(114)(0);
24011var DESCRIPTORS = __webpack_require__(16);
24012
24013module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
24014 var Base = global[NAME];
24015 var C = Base;
24016 var ADDER = IS_MAP ? 'set' : 'add';
24017 var proto = C && C.prototype;
24018 var O = {};
24019 if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
24020 new C().entries().next();
24021 }))) {
24022 // create collection constructor
24023 C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
24024 redefineAll(C.prototype, methods);
24025 meta.NEED = true;
24026 } else {
24027 C = wrapper(function (target, iterable) {
24028 anInstance(target, C, NAME, '_c');
24029 target._c = new Base();
24030 if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target);
24031 });
24032 each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {
24033 var IS_ADDER = KEY == 'add' || KEY == 'set';
24034 if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) {
24035 anInstance(this, C, KEY);
24036 if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;
24037 var result = this._c[KEY](a === 0 ? 0 : a, b);
24038 return IS_ADDER ? this : result;
24039 });
24040 });
24041 IS_WEAK || dP(C.prototype, 'size', {
24042 get: function () {
24043 return this._c.size;
24044 }
24045 });
24046 }
24047
24048 setToStringTag(C, NAME);
24049
24050 O[NAME] = C;
24051 $export($export.G + $export.W + $export.F, O);
24052
24053 if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
24054
24055 return C;
24056};
24057
24058
24059/***/ }),
24060/* 355 */
24061/***/ (function(module, exports, __webpack_require__) {
24062
24063// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
24064__webpack_require__(356)('WeakMap');
24065
24066
24067/***/ }),
24068/* 356 */
24069/***/ (function(module, exports, __webpack_require__) {
24070
24071"use strict";
24072
24073// https://tc39.github.io/proposal-setmap-offrom/
24074var $export = __webpack_require__(6);
24075
24076module.exports = function (COLLECTION) {
24077 $export($export.S, COLLECTION, { of: function of() {
24078 var length = arguments.length;
24079 var A = new Array(length);
24080 while (length--) A[length] = arguments[length];
24081 return new this(A);
24082 } });
24083};
24084
24085
24086/***/ }),
24087/* 357 */
24088/***/ (function(module, exports, __webpack_require__) {
24089
24090// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
24091__webpack_require__(358)('WeakMap');
24092
24093
24094/***/ }),
24095/* 358 */
24096/***/ (function(module, exports, __webpack_require__) {
24097
24098"use strict";
24099
24100// https://tc39.github.io/proposal-setmap-offrom/
24101var $export = __webpack_require__(6);
24102var aFunction = __webpack_require__(33);
24103var ctx = __webpack_require__(26);
24104var forOf = __webpack_require__(71);
24105
24106module.exports = function (COLLECTION) {
24107 $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
24108 var mapFn = arguments[1];
24109 var mapping, A, n, cb;
24110 aFunction(this);
24111 mapping = mapFn !== undefined;
24112 if (mapping) aFunction(mapFn);
24113 if (source == undefined) return new this();
24114 A = [];
24115 if (mapping) {
24116 n = 0;
24117 cb = ctx(mapFn, arguments[2], 2);
24118 forOf(source, false, function (nextItem) {
24119 A.push(cb(nextItem, n++));
24120 });
24121 } else {
24122 forOf(source, false, A.push, A);
24123 }
24124 return new this(A);
24125 } });
24126};
24127
24128
24129/***/ }),
24130/* 359 */
24131/***/ (function(module, exports, __webpack_require__) {
24132
24133var _Object$keys = __webpack_require__(1);
24134
24135function _objectWithoutPropertiesLoose(source, excluded) {
24136 if (source == null) return {};
24137 var target = {};
24138
24139 var sourceKeys = _Object$keys(source);
24140
24141 var key, i;
24142
24143 for (i = 0; i < sourceKeys.length; i++) {
24144 key = sourceKeys[i];
24145 if (excluded.indexOf(key) >= 0) continue;
24146 target[key] = source[key];
24147 }
24148
24149 return target;
24150}
24151
24152module.exports = _objectWithoutPropertiesLoose;
24153
24154/***/ }),
24155/* 360 */
24156/***/ (function(module, exports) {
24157
24158/**
24159 * Checks if `value` is object-like. A value is object-like if it's not `null`
24160 * and has a `typeof` result of "object".
24161 *
24162 * @static
24163 * @memberOf _
24164 * @since 4.0.0
24165 * @category Lang
24166 * @param {*} value The value to check.
24167 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
24168 * @example
24169 *
24170 * _.isObjectLike({});
24171 * // => true
24172 *
24173 * _.isObjectLike([1, 2, 3]);
24174 * // => true
24175 *
24176 * _.isObjectLike(_.noop);
24177 * // => false
24178 *
24179 * _.isObjectLike(null);
24180 * // => false
24181 */
24182function isObjectLike(value) {
24183 return value != null && typeof value == 'object';
24184}
24185
24186module.exports = isObjectLike;
24187
24188
24189/***/ })
24190/******/ ])["default"];
24191});
\No newline at end of file