UNPKG

525 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory();
4 else if(typeof define === 'function' && define.amd)
5 define([], factory);
6 else if(typeof exports === 'object')
7 exports["contentfulManagement"] = factory();
8 else
9 root["contentfulManagement"] = factory();
10})(window, function() {
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 = 0);
95/******/ })
96/************************************************************************/
97/******/ ({
98
99/***/ "../node_modules/axios/index.js":
100/*!**************************************!*\
101 !*** ../node_modules/axios/index.js ***!
102 \**************************************/
103/*! no static exports found */
104/***/ (function(module, exports, __webpack_require__) {
105
106module.exports = __webpack_require__(/*! ./lib/axios */ "../node_modules/axios/lib/axios.js");
107
108/***/ }),
109
110/***/ "../node_modules/axios/lib/adapters/xhr.js":
111/*!*************************************************!*\
112 !*** ../node_modules/axios/lib/adapters/xhr.js ***!
113 \*************************************************/
114/*! no static exports found */
115/***/ (function(module, exports, __webpack_require__) {
116
117"use strict";
118
119
120var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
121var settle = __webpack_require__(/*! ./../core/settle */ "../node_modules/axios/lib/core/settle.js");
122var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "../node_modules/axios/lib/helpers/buildURL.js");
123var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "../node_modules/axios/lib/core/buildFullPath.js");
124var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "../node_modules/axios/lib/helpers/parseHeaders.js");
125var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "../node_modules/axios/lib/helpers/isURLSameOrigin.js");
126var createError = __webpack_require__(/*! ../core/createError */ "../node_modules/axios/lib/core/createError.js");
127
128module.exports = function xhrAdapter(config) {
129 return new Promise(function dispatchXhrRequest(resolve, reject) {
130 var requestData = config.data;
131 var requestHeaders = config.headers;
132
133 if (utils.isFormData(requestData)) {
134 delete requestHeaders['Content-Type']; // Let the browser set it
135 }
136
137 var request = new XMLHttpRequest();
138
139 // HTTP basic authentication
140 if (config.auth) {
141 var username = config.auth.username || '';
142 var password = config.auth.password || '';
143 requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
144 }
145
146 var fullPath = buildFullPath(config.baseURL, config.url);
147 request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
148
149 // Set the request timeout in MS
150 request.timeout = config.timeout;
151
152 // Listen for ready state
153 request.onreadystatechange = function handleLoad() {
154 if (!request || request.readyState !== 4) {
155 return;
156 }
157
158 // The request errored out and we didn't get a response, this will be
159 // handled by onerror instead
160 // With one exception: request that using file: protocol, most browsers
161 // will return status as 0 even though it's a successful request
162 if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
163 return;
164 }
165
166 // Prepare the response
167 var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
168 var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
169 var response = {
170 data: responseData,
171 status: request.status,
172 statusText: request.statusText,
173 headers: responseHeaders,
174 config: config,
175 request: request
176 };
177
178 settle(resolve, reject, response);
179
180 // Clean up request
181 request = null;
182 };
183
184 // Handle browser request cancellation (as opposed to a manual cancellation)
185 request.onabort = function handleAbort() {
186 if (!request) {
187 return;
188 }
189
190 reject(createError('Request aborted', config, 'ECONNABORTED', request));
191
192 // Clean up request
193 request = null;
194 };
195
196 // Handle low level network errors
197 request.onerror = function handleError() {
198 // Real errors are hidden from us by the browser
199 // onerror should only fire if it's a network error
200 reject(createError('Network Error', config, null, request));
201
202 // Clean up request
203 request = null;
204 };
205
206 // Handle timeout
207 request.ontimeout = function handleTimeout() {
208 var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
209 if (config.timeoutErrorMessage) {
210 timeoutErrorMessage = config.timeoutErrorMessage;
211 }
212 reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
213 request));
214
215 // Clean up request
216 request = null;
217 };
218
219 // Add xsrf header
220 // This is only done if running in a standard browser environment.
221 // Specifically not if we're in a web worker, or react-native.
222 if (utils.isStandardBrowserEnv()) {
223 var cookies = __webpack_require__(/*! ./../helpers/cookies */ "../node_modules/axios/lib/helpers/cookies.js");
224
225 // Add xsrf header
226 var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
227 cookies.read(config.xsrfCookieName) :
228 undefined;
229
230 if (xsrfValue) {
231 requestHeaders[config.xsrfHeaderName] = xsrfValue;
232 }
233 }
234
235 // Add headers to the request
236 if ('setRequestHeader' in request) {
237 utils.forEach(requestHeaders, function setRequestHeader(val, key) {
238 if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
239 // Remove Content-Type if data is undefined
240 delete requestHeaders[key];
241 } else {
242 // Otherwise add header to the request
243 request.setRequestHeader(key, val);
244 }
245 });
246 }
247
248 // Add withCredentials to request if needed
249 if (!utils.isUndefined(config.withCredentials)) {
250 request.withCredentials = !!config.withCredentials;
251 }
252
253 // Add responseType to request if needed
254 if (config.responseType) {
255 try {
256 request.responseType = config.responseType;
257 } catch (e) {
258 // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
259 // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
260 if (config.responseType !== 'json') {
261 throw e;
262 }
263 }
264 }
265
266 // Handle progress if needed
267 if (typeof config.onDownloadProgress === 'function') {
268 request.addEventListener('progress', config.onDownloadProgress);
269 }
270
271 // Not all browsers support upload events
272 if (typeof config.onUploadProgress === 'function' && request.upload) {
273 request.upload.addEventListener('progress', config.onUploadProgress);
274 }
275
276 if (config.cancelToken) {
277 // Handle cancellation
278 config.cancelToken.promise.then(function onCanceled(cancel) {
279 if (!request) {
280 return;
281 }
282
283 request.abort();
284 reject(cancel);
285 // Clean up request
286 request = null;
287 });
288 }
289
290 if (requestData === undefined) {
291 requestData = null;
292 }
293
294 // Send the request
295 request.send(requestData);
296 });
297};
298
299
300/***/ }),
301
302/***/ "../node_modules/axios/lib/axios.js":
303/*!******************************************!*\
304 !*** ../node_modules/axios/lib/axios.js ***!
305 \******************************************/
306/*! no static exports found */
307/***/ (function(module, exports, __webpack_require__) {
308
309"use strict";
310
311
312var utils = __webpack_require__(/*! ./utils */ "../node_modules/axios/lib/utils.js");
313var bind = __webpack_require__(/*! ./helpers/bind */ "../node_modules/axios/lib/helpers/bind.js");
314var Axios = __webpack_require__(/*! ./core/Axios */ "../node_modules/axios/lib/core/Axios.js");
315var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "../node_modules/axios/lib/core/mergeConfig.js");
316var defaults = __webpack_require__(/*! ./defaults */ "../node_modules/axios/lib/defaults.js");
317
318/**
319 * Create an instance of Axios
320 *
321 * @param {Object} defaultConfig The default config for the instance
322 * @return {Axios} A new instance of Axios
323 */
324function createInstance(defaultConfig) {
325 var context = new Axios(defaultConfig);
326 var instance = bind(Axios.prototype.request, context);
327
328 // Copy axios.prototype to instance
329 utils.extend(instance, Axios.prototype, context);
330
331 // Copy context to instance
332 utils.extend(instance, context);
333
334 return instance;
335}
336
337// Create the default instance to be exported
338var axios = createInstance(defaults);
339
340// Expose Axios class to allow class inheritance
341axios.Axios = Axios;
342
343// Factory for creating new instances
344axios.create = function create(instanceConfig) {
345 return createInstance(mergeConfig(axios.defaults, instanceConfig));
346};
347
348// Expose Cancel & CancelToken
349axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
350axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "../node_modules/axios/lib/cancel/CancelToken.js");
351axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
352
353// Expose all/spread
354axios.all = function all(promises) {
355 return Promise.all(promises);
356};
357axios.spread = __webpack_require__(/*! ./helpers/spread */ "../node_modules/axios/lib/helpers/spread.js");
358
359module.exports = axios;
360
361// Allow use of default import syntax in TypeScript
362module.exports.default = axios;
363
364
365/***/ }),
366
367/***/ "../node_modules/axios/lib/cancel/Cancel.js":
368/*!**************************************************!*\
369 !*** ../node_modules/axios/lib/cancel/Cancel.js ***!
370 \**************************************************/
371/*! no static exports found */
372/***/ (function(module, exports, __webpack_require__) {
373
374"use strict";
375
376
377/**
378 * A `Cancel` is an object that is thrown when an operation is canceled.
379 *
380 * @class
381 * @param {string=} message The message.
382 */
383function Cancel(message) {
384 this.message = message;
385}
386
387Cancel.prototype.toString = function toString() {
388 return 'Cancel' + (this.message ? ': ' + this.message : '');
389};
390
391Cancel.prototype.__CANCEL__ = true;
392
393module.exports = Cancel;
394
395
396/***/ }),
397
398/***/ "../node_modules/axios/lib/cancel/CancelToken.js":
399/*!*******************************************************!*\
400 !*** ../node_modules/axios/lib/cancel/CancelToken.js ***!
401 \*******************************************************/
402/*! no static exports found */
403/***/ (function(module, exports, __webpack_require__) {
404
405"use strict";
406
407
408var Cancel = __webpack_require__(/*! ./Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
409
410/**
411 * A `CancelToken` is an object that can be used to request cancellation of an operation.
412 *
413 * @class
414 * @param {Function} executor The executor function.
415 */
416function CancelToken(executor) {
417 if (typeof executor !== 'function') {
418 throw new TypeError('executor must be a function.');
419 }
420
421 var resolvePromise;
422 this.promise = new Promise(function promiseExecutor(resolve) {
423 resolvePromise = resolve;
424 });
425
426 var token = this;
427 executor(function cancel(message) {
428 if (token.reason) {
429 // Cancellation has already been requested
430 return;
431 }
432
433 token.reason = new Cancel(message);
434 resolvePromise(token.reason);
435 });
436}
437
438/**
439 * Throws a `Cancel` if cancellation has been requested.
440 */
441CancelToken.prototype.throwIfRequested = function throwIfRequested() {
442 if (this.reason) {
443 throw this.reason;
444 }
445};
446
447/**
448 * Returns an object that contains a new `CancelToken` and a function that, when called,
449 * cancels the `CancelToken`.
450 */
451CancelToken.source = function source() {
452 var cancel;
453 var token = new CancelToken(function executor(c) {
454 cancel = c;
455 });
456 return {
457 token: token,
458 cancel: cancel
459 };
460};
461
462module.exports = CancelToken;
463
464
465/***/ }),
466
467/***/ "../node_modules/axios/lib/cancel/isCancel.js":
468/*!****************************************************!*\
469 !*** ../node_modules/axios/lib/cancel/isCancel.js ***!
470 \****************************************************/
471/*! no static exports found */
472/***/ (function(module, exports, __webpack_require__) {
473
474"use strict";
475
476
477module.exports = function isCancel(value) {
478 return !!(value && value.__CANCEL__);
479};
480
481
482/***/ }),
483
484/***/ "../node_modules/axios/lib/core/Axios.js":
485/*!***********************************************!*\
486 !*** ../node_modules/axios/lib/core/Axios.js ***!
487 \***********************************************/
488/*! no static exports found */
489/***/ (function(module, exports, __webpack_require__) {
490
491"use strict";
492
493
494var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
495var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "../node_modules/axios/lib/helpers/buildURL.js");
496var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "../node_modules/axios/lib/core/InterceptorManager.js");
497var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "../node_modules/axios/lib/core/dispatchRequest.js");
498var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "../node_modules/axios/lib/core/mergeConfig.js");
499
500/**
501 * Create a new instance of Axios
502 *
503 * @param {Object} instanceConfig The default config for the instance
504 */
505function Axios(instanceConfig) {
506 this.defaults = instanceConfig;
507 this.interceptors = {
508 request: new InterceptorManager(),
509 response: new InterceptorManager()
510 };
511}
512
513/**
514 * Dispatch a request
515 *
516 * @param {Object} config The config specific for this request (merged with this.defaults)
517 */
518Axios.prototype.request = function request(config) {
519 /*eslint no-param-reassign:0*/
520 // Allow for axios('example/url'[, config]) a la fetch API
521 if (typeof config === 'string') {
522 config = arguments[1] || {};
523 config.url = arguments[0];
524 } else {
525 config = config || {};
526 }
527
528 config = mergeConfig(this.defaults, config);
529
530 // Set config.method
531 if (config.method) {
532 config.method = config.method.toLowerCase();
533 } else if (this.defaults.method) {
534 config.method = this.defaults.method.toLowerCase();
535 } else {
536 config.method = 'get';
537 }
538
539 // Hook up interceptors middleware
540 var chain = [dispatchRequest, undefined];
541 var promise = Promise.resolve(config);
542
543 this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
544 chain.unshift(interceptor.fulfilled, interceptor.rejected);
545 });
546
547 this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
548 chain.push(interceptor.fulfilled, interceptor.rejected);
549 });
550
551 while (chain.length) {
552 promise = promise.then(chain.shift(), chain.shift());
553 }
554
555 return promise;
556};
557
558Axios.prototype.getUri = function getUri(config) {
559 config = mergeConfig(this.defaults, config);
560 return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
561};
562
563// Provide aliases for supported request methods
564utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
565 /*eslint func-names:0*/
566 Axios.prototype[method] = function(url, config) {
567 return this.request(utils.merge(config || {}, {
568 method: method,
569 url: url
570 }));
571 };
572});
573
574utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
575 /*eslint func-names:0*/
576 Axios.prototype[method] = function(url, data, config) {
577 return this.request(utils.merge(config || {}, {
578 method: method,
579 url: url,
580 data: data
581 }));
582 };
583});
584
585module.exports = Axios;
586
587
588/***/ }),
589
590/***/ "../node_modules/axios/lib/core/InterceptorManager.js":
591/*!************************************************************!*\
592 !*** ../node_modules/axios/lib/core/InterceptorManager.js ***!
593 \************************************************************/
594/*! no static exports found */
595/***/ (function(module, exports, __webpack_require__) {
596
597"use strict";
598
599
600var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
601
602function InterceptorManager() {
603 this.handlers = [];
604}
605
606/**
607 * Add a new interceptor to the stack
608 *
609 * @param {Function} fulfilled The function to handle `then` for a `Promise`
610 * @param {Function} rejected The function to handle `reject` for a `Promise`
611 *
612 * @return {Number} An ID used to remove interceptor later
613 */
614InterceptorManager.prototype.use = function use(fulfilled, rejected) {
615 this.handlers.push({
616 fulfilled: fulfilled,
617 rejected: rejected
618 });
619 return this.handlers.length - 1;
620};
621
622/**
623 * Remove an interceptor from the stack
624 *
625 * @param {Number} id The ID that was returned by `use`
626 */
627InterceptorManager.prototype.eject = function eject(id) {
628 if (this.handlers[id]) {
629 this.handlers[id] = null;
630 }
631};
632
633/**
634 * Iterate over all the registered interceptors
635 *
636 * This method is particularly useful for skipping over any
637 * interceptors that may have become `null` calling `eject`.
638 *
639 * @param {Function} fn The function to call for each interceptor
640 */
641InterceptorManager.prototype.forEach = function forEach(fn) {
642 utils.forEach(this.handlers, function forEachHandler(h) {
643 if (h !== null) {
644 fn(h);
645 }
646 });
647};
648
649module.exports = InterceptorManager;
650
651
652/***/ }),
653
654/***/ "../node_modules/axios/lib/core/buildFullPath.js":
655/*!*******************************************************!*\
656 !*** ../node_modules/axios/lib/core/buildFullPath.js ***!
657 \*******************************************************/
658/*! no static exports found */
659/***/ (function(module, exports, __webpack_require__) {
660
661"use strict";
662
663
664var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "../node_modules/axios/lib/helpers/isAbsoluteURL.js");
665var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "../node_modules/axios/lib/helpers/combineURLs.js");
666
667/**
668 * Creates a new URL by combining the baseURL with the requestedURL,
669 * only when the requestedURL is not already an absolute URL.
670 * If the requestURL is absolute, this function returns the requestedURL untouched.
671 *
672 * @param {string} baseURL The base URL
673 * @param {string} requestedURL Absolute or relative URL to combine
674 * @returns {string} The combined full path
675 */
676module.exports = function buildFullPath(baseURL, requestedURL) {
677 if (baseURL && !isAbsoluteURL(requestedURL)) {
678 return combineURLs(baseURL, requestedURL);
679 }
680 return requestedURL;
681};
682
683
684/***/ }),
685
686/***/ "../node_modules/axios/lib/core/createError.js":
687/*!*****************************************************!*\
688 !*** ../node_modules/axios/lib/core/createError.js ***!
689 \*****************************************************/
690/*! no static exports found */
691/***/ (function(module, exports, __webpack_require__) {
692
693"use strict";
694
695
696var enhanceError = __webpack_require__(/*! ./enhanceError */ "../node_modules/axios/lib/core/enhanceError.js");
697
698/**
699 * Create an Error with the specified message, config, error code, request and response.
700 *
701 * @param {string} message The error message.
702 * @param {Object} config The config.
703 * @param {string} [code] The error code (for example, 'ECONNABORTED').
704 * @param {Object} [request] The request.
705 * @param {Object} [response] The response.
706 * @returns {Error} The created error.
707 */
708module.exports = function createError(message, config, code, request, response) {
709 var error = new Error(message);
710 return enhanceError(error, config, code, request, response);
711};
712
713
714/***/ }),
715
716/***/ "../node_modules/axios/lib/core/dispatchRequest.js":
717/*!*********************************************************!*\
718 !*** ../node_modules/axios/lib/core/dispatchRequest.js ***!
719 \*********************************************************/
720/*! no static exports found */
721/***/ (function(module, exports, __webpack_require__) {
722
723"use strict";
724
725
726var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
727var transformData = __webpack_require__(/*! ./transformData */ "../node_modules/axios/lib/core/transformData.js");
728var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
729var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults.js");
730
731/**
732 * Throws a `Cancel` if cancellation has been requested.
733 */
734function throwIfCancellationRequested(config) {
735 if (config.cancelToken) {
736 config.cancelToken.throwIfRequested();
737 }
738}
739
740/**
741 * Dispatch a request to the server using the configured adapter.
742 *
743 * @param {object} config The config that is to be used for the request
744 * @returns {Promise} The Promise to be fulfilled
745 */
746module.exports = function dispatchRequest(config) {
747 throwIfCancellationRequested(config);
748
749 // Ensure headers exist
750 config.headers = config.headers || {};
751
752 // Transform request data
753 config.data = transformData(
754 config.data,
755 config.headers,
756 config.transformRequest
757 );
758
759 // Flatten headers
760 config.headers = utils.merge(
761 config.headers.common || {},
762 config.headers[config.method] || {},
763 config.headers
764 );
765
766 utils.forEach(
767 ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
768 function cleanHeaderConfig(method) {
769 delete config.headers[method];
770 }
771 );
772
773 var adapter = config.adapter || defaults.adapter;
774
775 return adapter(config).then(function onAdapterResolution(response) {
776 throwIfCancellationRequested(config);
777
778 // Transform response data
779 response.data = transformData(
780 response.data,
781 response.headers,
782 config.transformResponse
783 );
784
785 return response;
786 }, function onAdapterRejection(reason) {
787 if (!isCancel(reason)) {
788 throwIfCancellationRequested(config);
789
790 // Transform response data
791 if (reason && reason.response) {
792 reason.response.data = transformData(
793 reason.response.data,
794 reason.response.headers,
795 config.transformResponse
796 );
797 }
798 }
799
800 return Promise.reject(reason);
801 });
802};
803
804
805/***/ }),
806
807/***/ "../node_modules/axios/lib/core/enhanceError.js":
808/*!******************************************************!*\
809 !*** ../node_modules/axios/lib/core/enhanceError.js ***!
810 \******************************************************/
811/*! no static exports found */
812/***/ (function(module, exports, __webpack_require__) {
813
814"use strict";
815
816
817/**
818 * Update an Error with the specified config, error code, and response.
819 *
820 * @param {Error} error The error to update.
821 * @param {Object} config The config.
822 * @param {string} [code] The error code (for example, 'ECONNABORTED').
823 * @param {Object} [request] The request.
824 * @param {Object} [response] The response.
825 * @returns {Error} The error.
826 */
827module.exports = function enhanceError(error, config, code, request, response) {
828 error.config = config;
829 if (code) {
830 error.code = code;
831 }
832
833 error.request = request;
834 error.response = response;
835 error.isAxiosError = true;
836
837 error.toJSON = function() {
838 return {
839 // Standard
840 message: this.message,
841 name: this.name,
842 // Microsoft
843 description: this.description,
844 number: this.number,
845 // Mozilla
846 fileName: this.fileName,
847 lineNumber: this.lineNumber,
848 columnNumber: this.columnNumber,
849 stack: this.stack,
850 // Axios
851 config: this.config,
852 code: this.code
853 };
854 };
855 return error;
856};
857
858
859/***/ }),
860
861/***/ "../node_modules/axios/lib/core/mergeConfig.js":
862/*!*****************************************************!*\
863 !*** ../node_modules/axios/lib/core/mergeConfig.js ***!
864 \*****************************************************/
865/*! no static exports found */
866/***/ (function(module, exports, __webpack_require__) {
867
868"use strict";
869
870
871var utils = __webpack_require__(/*! ../utils */ "../node_modules/axios/lib/utils.js");
872
873/**
874 * Config-specific merge-function which creates a new config-object
875 * by merging two configuration objects together.
876 *
877 * @param {Object} config1
878 * @param {Object} config2
879 * @returns {Object} New object resulting from merging config2 to config1
880 */
881module.exports = function mergeConfig(config1, config2) {
882 // eslint-disable-next-line no-param-reassign
883 config2 = config2 || {};
884 var config = {};
885
886 var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];
887 var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];
888 var defaultToConfig2Keys = [
889 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',
890 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
891 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',
892 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',
893 'httpsAgent', 'cancelToken', 'socketPath'
894 ];
895
896 utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
897 if (typeof config2[prop] !== 'undefined') {
898 config[prop] = config2[prop];
899 }
900 });
901
902 utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {
903 if (utils.isObject(config2[prop])) {
904 config[prop] = utils.deepMerge(config1[prop], config2[prop]);
905 } else if (typeof config2[prop] !== 'undefined') {
906 config[prop] = config2[prop];
907 } else if (utils.isObject(config1[prop])) {
908 config[prop] = utils.deepMerge(config1[prop]);
909 } else if (typeof config1[prop] !== 'undefined') {
910 config[prop] = config1[prop];
911 }
912 });
913
914 utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
915 if (typeof config2[prop] !== 'undefined') {
916 config[prop] = config2[prop];
917 } else if (typeof config1[prop] !== 'undefined') {
918 config[prop] = config1[prop];
919 }
920 });
921
922 var axiosKeys = valueFromConfig2Keys
923 .concat(mergeDeepPropertiesKeys)
924 .concat(defaultToConfig2Keys);
925
926 var otherKeys = Object
927 .keys(config2)
928 .filter(function filterAxiosKeys(key) {
929 return axiosKeys.indexOf(key) === -1;
930 });
931
932 utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {
933 if (typeof config2[prop] !== 'undefined') {
934 config[prop] = config2[prop];
935 } else if (typeof config1[prop] !== 'undefined') {
936 config[prop] = config1[prop];
937 }
938 });
939
940 return config;
941};
942
943
944/***/ }),
945
946/***/ "../node_modules/axios/lib/core/settle.js":
947/*!************************************************!*\
948 !*** ../node_modules/axios/lib/core/settle.js ***!
949 \************************************************/
950/*! no static exports found */
951/***/ (function(module, exports, __webpack_require__) {
952
953"use strict";
954
955
956var createError = __webpack_require__(/*! ./createError */ "../node_modules/axios/lib/core/createError.js");
957
958/**
959 * Resolve or reject a Promise based on response status.
960 *
961 * @param {Function} resolve A function that resolves the promise.
962 * @param {Function} reject A function that rejects the promise.
963 * @param {object} response The response.
964 */
965module.exports = function settle(resolve, reject, response) {
966 var validateStatus = response.config.validateStatus;
967 if (!validateStatus || validateStatus(response.status)) {
968 resolve(response);
969 } else {
970 reject(createError(
971 'Request failed with status code ' + response.status,
972 response.config,
973 null,
974 response.request,
975 response
976 ));
977 }
978};
979
980
981/***/ }),
982
983/***/ "../node_modules/axios/lib/core/transformData.js":
984/*!*******************************************************!*\
985 !*** ../node_modules/axios/lib/core/transformData.js ***!
986 \*******************************************************/
987/*! no static exports found */
988/***/ (function(module, exports, __webpack_require__) {
989
990"use strict";
991
992
993var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
994
995/**
996 * Transform the data for a request or a response
997 *
998 * @param {Object|String} data The data to be transformed
999 * @param {Array} headers The headers for the request or response
1000 * @param {Array|Function} fns A single function or Array of functions
1001 * @returns {*} The resulting transformed data
1002 */
1003module.exports = function transformData(data, headers, fns) {
1004 /*eslint no-param-reassign:0*/
1005 utils.forEach(fns, function transform(fn) {
1006 data = fn(data, headers);
1007 });
1008
1009 return data;
1010};
1011
1012
1013/***/ }),
1014
1015/***/ "../node_modules/axios/lib/defaults.js":
1016/*!*********************************************!*\
1017 !*** ../node_modules/axios/lib/defaults.js ***!
1018 \*********************************************/
1019/*! no static exports found */
1020/***/ (function(module, exports, __webpack_require__) {
1021
1022"use strict";
1023/* WEBPACK VAR INJECTION */(function(process) {
1024
1025var utils = __webpack_require__(/*! ./utils */ "../node_modules/axios/lib/utils.js");
1026var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "../node_modules/axios/lib/helpers/normalizeHeaderName.js");
1027
1028var DEFAULT_CONTENT_TYPE = {
1029 'Content-Type': 'application/x-www-form-urlencoded'
1030};
1031
1032function setContentTypeIfUnset(headers, value) {
1033 if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
1034 headers['Content-Type'] = value;
1035 }
1036}
1037
1038function getDefaultAdapter() {
1039 var adapter;
1040 if (typeof XMLHttpRequest !== 'undefined') {
1041 // For browsers use XHR adapter
1042 adapter = __webpack_require__(/*! ./adapters/xhr */ "../node_modules/axios/lib/adapters/xhr.js");
1043 } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
1044 // For node use HTTP adapter
1045 adapter = __webpack_require__(/*! ./adapters/http */ "../node_modules/axios/lib/adapters/xhr.js");
1046 }
1047 return adapter;
1048}
1049
1050var defaults = {
1051 adapter: getDefaultAdapter(),
1052
1053 transformRequest: [function transformRequest(data, headers) {
1054 normalizeHeaderName(headers, 'Accept');
1055 normalizeHeaderName(headers, 'Content-Type');
1056 if (utils.isFormData(data) ||
1057 utils.isArrayBuffer(data) ||
1058 utils.isBuffer(data) ||
1059 utils.isStream(data) ||
1060 utils.isFile(data) ||
1061 utils.isBlob(data)
1062 ) {
1063 return data;
1064 }
1065 if (utils.isArrayBufferView(data)) {
1066 return data.buffer;
1067 }
1068 if (utils.isURLSearchParams(data)) {
1069 setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
1070 return data.toString();
1071 }
1072 if (utils.isObject(data)) {
1073 setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
1074 return JSON.stringify(data);
1075 }
1076 return data;
1077 }],
1078
1079 transformResponse: [function transformResponse(data) {
1080 /*eslint no-param-reassign:0*/
1081 if (typeof data === 'string') {
1082 try {
1083 data = JSON.parse(data);
1084 } catch (e) { /* Ignore */ }
1085 }
1086 return data;
1087 }],
1088
1089 /**
1090 * A timeout in milliseconds to abort a request. If set to 0 (default) a
1091 * timeout is not created.
1092 */
1093 timeout: 0,
1094
1095 xsrfCookieName: 'XSRF-TOKEN',
1096 xsrfHeaderName: 'X-XSRF-TOKEN',
1097
1098 maxContentLength: -1,
1099
1100 validateStatus: function validateStatus(status) {
1101 return status >= 200 && status < 300;
1102 }
1103};
1104
1105defaults.headers = {
1106 common: {
1107 'Accept': 'application/json, text/plain, */*'
1108 }
1109};
1110
1111utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
1112 defaults.headers[method] = {};
1113});
1114
1115utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1116 defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
1117});
1118
1119module.exports = defaults;
1120
1121/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "../node_modules/process/browser.js")))
1122
1123/***/ }),
1124
1125/***/ "../node_modules/axios/lib/helpers/bind.js":
1126/*!*************************************************!*\
1127 !*** ../node_modules/axios/lib/helpers/bind.js ***!
1128 \*************************************************/
1129/*! no static exports found */
1130/***/ (function(module, exports, __webpack_require__) {
1131
1132"use strict";
1133
1134
1135module.exports = function bind(fn, thisArg) {
1136 return function wrap() {
1137 var args = new Array(arguments.length);
1138 for (var i = 0; i < args.length; i++) {
1139 args[i] = arguments[i];
1140 }
1141 return fn.apply(thisArg, args);
1142 };
1143};
1144
1145
1146/***/ }),
1147
1148/***/ "../node_modules/axios/lib/helpers/buildURL.js":
1149/*!*****************************************************!*\
1150 !*** ../node_modules/axios/lib/helpers/buildURL.js ***!
1151 \*****************************************************/
1152/*! no static exports found */
1153/***/ (function(module, exports, __webpack_require__) {
1154
1155"use strict";
1156
1157
1158var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
1159
1160function encode(val) {
1161 return encodeURIComponent(val).
1162 replace(/%40/gi, '@').
1163 replace(/%3A/gi, ':').
1164 replace(/%24/g, '$').
1165 replace(/%2C/gi, ',').
1166 replace(/%20/g, '+').
1167 replace(/%5B/gi, '[').
1168 replace(/%5D/gi, ']');
1169}
1170
1171/**
1172 * Build a URL by appending params to the end
1173 *
1174 * @param {string} url The base of the url (e.g., http://www.google.com)
1175 * @param {object} [params] The params to be appended
1176 * @returns {string} The formatted url
1177 */
1178module.exports = function buildURL(url, params, paramsSerializer) {
1179 /*eslint no-param-reassign:0*/
1180 if (!params) {
1181 return url;
1182 }
1183
1184 var serializedParams;
1185 if (paramsSerializer) {
1186 serializedParams = paramsSerializer(params);
1187 } else if (utils.isURLSearchParams(params)) {
1188 serializedParams = params.toString();
1189 } else {
1190 var parts = [];
1191
1192 utils.forEach(params, function serialize(val, key) {
1193 if (val === null || typeof val === 'undefined') {
1194 return;
1195 }
1196
1197 if (utils.isArray(val)) {
1198 key = key + '[]';
1199 } else {
1200 val = [val];
1201 }
1202
1203 utils.forEach(val, function parseValue(v) {
1204 if (utils.isDate(v)) {
1205 v = v.toISOString();
1206 } else if (utils.isObject(v)) {
1207 v = JSON.stringify(v);
1208 }
1209 parts.push(encode(key) + '=' + encode(v));
1210 });
1211 });
1212
1213 serializedParams = parts.join('&');
1214 }
1215
1216 if (serializedParams) {
1217 var hashmarkIndex = url.indexOf('#');
1218 if (hashmarkIndex !== -1) {
1219 url = url.slice(0, hashmarkIndex);
1220 }
1221
1222 url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1223 }
1224
1225 return url;
1226};
1227
1228
1229/***/ }),
1230
1231/***/ "../node_modules/axios/lib/helpers/combineURLs.js":
1232/*!********************************************************!*\
1233 !*** ../node_modules/axios/lib/helpers/combineURLs.js ***!
1234 \********************************************************/
1235/*! no static exports found */
1236/***/ (function(module, exports, __webpack_require__) {
1237
1238"use strict";
1239
1240
1241/**
1242 * Creates a new URL by combining the specified URLs
1243 *
1244 * @param {string} baseURL The base URL
1245 * @param {string} relativeURL The relative URL
1246 * @returns {string} The combined URL
1247 */
1248module.exports = function combineURLs(baseURL, relativeURL) {
1249 return relativeURL
1250 ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1251 : baseURL;
1252};
1253
1254
1255/***/ }),
1256
1257/***/ "../node_modules/axios/lib/helpers/cookies.js":
1258/*!****************************************************!*\
1259 !*** ../node_modules/axios/lib/helpers/cookies.js ***!
1260 \****************************************************/
1261/*! no static exports found */
1262/***/ (function(module, exports, __webpack_require__) {
1263
1264"use strict";
1265
1266
1267var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
1268
1269module.exports = (
1270 utils.isStandardBrowserEnv() ?
1271
1272 // Standard browser envs support document.cookie
1273 (function standardBrowserEnv() {
1274 return {
1275 write: function write(name, value, expires, path, domain, secure) {
1276 var cookie = [];
1277 cookie.push(name + '=' + encodeURIComponent(value));
1278
1279 if (utils.isNumber(expires)) {
1280 cookie.push('expires=' + new Date(expires).toGMTString());
1281 }
1282
1283 if (utils.isString(path)) {
1284 cookie.push('path=' + path);
1285 }
1286
1287 if (utils.isString(domain)) {
1288 cookie.push('domain=' + domain);
1289 }
1290
1291 if (secure === true) {
1292 cookie.push('secure');
1293 }
1294
1295 document.cookie = cookie.join('; ');
1296 },
1297
1298 read: function read(name) {
1299 var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1300 return (match ? decodeURIComponent(match[3]) : null);
1301 },
1302
1303 remove: function remove(name) {
1304 this.write(name, '', Date.now() - 86400000);
1305 }
1306 };
1307 })() :
1308
1309 // Non standard browser env (web workers, react-native) lack needed support.
1310 (function nonStandardBrowserEnv() {
1311 return {
1312 write: function write() {},
1313 read: function read() { return null; },
1314 remove: function remove() {}
1315 };
1316 })()
1317);
1318
1319
1320/***/ }),
1321
1322/***/ "../node_modules/axios/lib/helpers/isAbsoluteURL.js":
1323/*!**********************************************************!*\
1324 !*** ../node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
1325 \**********************************************************/
1326/*! no static exports found */
1327/***/ (function(module, exports, __webpack_require__) {
1328
1329"use strict";
1330
1331
1332/**
1333 * Determines whether the specified URL is absolute
1334 *
1335 * @param {string} url The URL to test
1336 * @returns {boolean} True if the specified URL is absolute, otherwise false
1337 */
1338module.exports = function isAbsoluteURL(url) {
1339 // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1340 // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1341 // by any combination of letters, digits, plus, period, or hyphen.
1342 return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1343};
1344
1345
1346/***/ }),
1347
1348/***/ "../node_modules/axios/lib/helpers/isURLSameOrigin.js":
1349/*!************************************************************!*\
1350 !*** ../node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
1351 \************************************************************/
1352/*! no static exports found */
1353/***/ (function(module, exports, __webpack_require__) {
1354
1355"use strict";
1356
1357
1358var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
1359
1360module.exports = (
1361 utils.isStandardBrowserEnv() ?
1362
1363 // Standard browser envs have full support of the APIs needed to test
1364 // whether the request URL is of the same origin as current location.
1365 (function standardBrowserEnv() {
1366 var msie = /(msie|trident)/i.test(navigator.userAgent);
1367 var urlParsingNode = document.createElement('a');
1368 var originURL;
1369
1370 /**
1371 * Parse a URL to discover it's components
1372 *
1373 * @param {String} url The URL to be parsed
1374 * @returns {Object}
1375 */
1376 function resolveURL(url) {
1377 var href = url;
1378
1379 if (msie) {
1380 // IE needs attribute set twice to normalize properties
1381 urlParsingNode.setAttribute('href', href);
1382 href = urlParsingNode.href;
1383 }
1384
1385 urlParsingNode.setAttribute('href', href);
1386
1387 // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
1388 return {
1389 href: urlParsingNode.href,
1390 protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
1391 host: urlParsingNode.host,
1392 search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
1393 hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
1394 hostname: urlParsingNode.hostname,
1395 port: urlParsingNode.port,
1396 pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
1397 urlParsingNode.pathname :
1398 '/' + urlParsingNode.pathname
1399 };
1400 }
1401
1402 originURL = resolveURL(window.location.href);
1403
1404 /**
1405 * Determine if a URL shares the same origin as the current location
1406 *
1407 * @param {String} requestURL The URL to test
1408 * @returns {boolean} True if URL shares the same origin, otherwise false
1409 */
1410 return function isURLSameOrigin(requestURL) {
1411 var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
1412 return (parsed.protocol === originURL.protocol &&
1413 parsed.host === originURL.host);
1414 };
1415 })() :
1416
1417 // Non standard browser envs (web workers, react-native) lack needed support.
1418 (function nonStandardBrowserEnv() {
1419 return function isURLSameOrigin() {
1420 return true;
1421 };
1422 })()
1423);
1424
1425
1426/***/ }),
1427
1428/***/ "../node_modules/axios/lib/helpers/normalizeHeaderName.js":
1429/*!****************************************************************!*\
1430 !*** ../node_modules/axios/lib/helpers/normalizeHeaderName.js ***!
1431 \****************************************************************/
1432/*! no static exports found */
1433/***/ (function(module, exports, __webpack_require__) {
1434
1435"use strict";
1436
1437
1438var utils = __webpack_require__(/*! ../utils */ "../node_modules/axios/lib/utils.js");
1439
1440module.exports = function normalizeHeaderName(headers, normalizedName) {
1441 utils.forEach(headers, function processHeader(value, name) {
1442 if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
1443 headers[normalizedName] = value;
1444 delete headers[name];
1445 }
1446 });
1447};
1448
1449
1450/***/ }),
1451
1452/***/ "../node_modules/axios/lib/helpers/parseHeaders.js":
1453/*!*********************************************************!*\
1454 !*** ../node_modules/axios/lib/helpers/parseHeaders.js ***!
1455 \*********************************************************/
1456/*! no static exports found */
1457/***/ (function(module, exports, __webpack_require__) {
1458
1459"use strict";
1460
1461
1462var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
1463
1464// Headers whose duplicates are ignored by node
1465// c.f. https://nodejs.org/api/http.html#http_message_headers
1466var ignoreDuplicateOf = [
1467 'age', 'authorization', 'content-length', 'content-type', 'etag',
1468 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1469 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1470 'referer', 'retry-after', 'user-agent'
1471];
1472
1473/**
1474 * Parse headers into an object
1475 *
1476 * ```
1477 * Date: Wed, 27 Aug 2014 08:58:49 GMT
1478 * Content-Type: application/json
1479 * Connection: keep-alive
1480 * Transfer-Encoding: chunked
1481 * ```
1482 *
1483 * @param {String} headers Headers needing to be parsed
1484 * @returns {Object} Headers parsed into an object
1485 */
1486module.exports = function parseHeaders(headers) {
1487 var parsed = {};
1488 var key;
1489 var val;
1490 var i;
1491
1492 if (!headers) { return parsed; }
1493
1494 utils.forEach(headers.split('\n'), function parser(line) {
1495 i = line.indexOf(':');
1496 key = utils.trim(line.substr(0, i)).toLowerCase();
1497 val = utils.trim(line.substr(i + 1));
1498
1499 if (key) {
1500 if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
1501 return;
1502 }
1503 if (key === 'set-cookie') {
1504 parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
1505 } else {
1506 parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1507 }
1508 }
1509 });
1510
1511 return parsed;
1512};
1513
1514
1515/***/ }),
1516
1517/***/ "../node_modules/axios/lib/helpers/spread.js":
1518/*!***************************************************!*\
1519 !*** ../node_modules/axios/lib/helpers/spread.js ***!
1520 \***************************************************/
1521/*! no static exports found */
1522/***/ (function(module, exports, __webpack_require__) {
1523
1524"use strict";
1525
1526
1527/**
1528 * Syntactic sugar for invoking a function and expanding an array for arguments.
1529 *
1530 * Common use case would be to use `Function.prototype.apply`.
1531 *
1532 * ```js
1533 * function f(x, y, z) {}
1534 * var args = [1, 2, 3];
1535 * f.apply(null, args);
1536 * ```
1537 *
1538 * With `spread` this example can be re-written.
1539 *
1540 * ```js
1541 * spread(function(x, y, z) {})([1, 2, 3]);
1542 * ```
1543 *
1544 * @param {Function} callback
1545 * @returns {Function}
1546 */
1547module.exports = function spread(callback) {
1548 return function wrap(arr) {
1549 return callback.apply(null, arr);
1550 };
1551};
1552
1553
1554/***/ }),
1555
1556/***/ "../node_modules/axios/lib/utils.js":
1557/*!******************************************!*\
1558 !*** ../node_modules/axios/lib/utils.js ***!
1559 \******************************************/
1560/*! no static exports found */
1561/***/ (function(module, exports, __webpack_require__) {
1562
1563"use strict";
1564
1565
1566var bind = __webpack_require__(/*! ./helpers/bind */ "../node_modules/axios/lib/helpers/bind.js");
1567
1568/*global toString:true*/
1569
1570// utils is a library of generic helper functions non-specific to axios
1571
1572var toString = Object.prototype.toString;
1573
1574/**
1575 * Determine if a value is an Array
1576 *
1577 * @param {Object} val The value to test
1578 * @returns {boolean} True if value is an Array, otherwise false
1579 */
1580function isArray(val) {
1581 return toString.call(val) === '[object Array]';
1582}
1583
1584/**
1585 * Determine if a value is undefined
1586 *
1587 * @param {Object} val The value to test
1588 * @returns {boolean} True if the value is undefined, otherwise false
1589 */
1590function isUndefined(val) {
1591 return typeof val === 'undefined';
1592}
1593
1594/**
1595 * Determine if a value is a Buffer
1596 *
1597 * @param {Object} val The value to test
1598 * @returns {boolean} True if value is a Buffer, otherwise false
1599 */
1600function isBuffer(val) {
1601 return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
1602 && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
1603}
1604
1605/**
1606 * Determine if a value is an ArrayBuffer
1607 *
1608 * @param {Object} val The value to test
1609 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
1610 */
1611function isArrayBuffer(val) {
1612 return toString.call(val) === '[object ArrayBuffer]';
1613}
1614
1615/**
1616 * Determine if a value is a FormData
1617 *
1618 * @param {Object} val The value to test
1619 * @returns {boolean} True if value is an FormData, otherwise false
1620 */
1621function isFormData(val) {
1622 return (typeof FormData !== 'undefined') && (val instanceof FormData);
1623}
1624
1625/**
1626 * Determine if a value is a view on an ArrayBuffer
1627 *
1628 * @param {Object} val The value to test
1629 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
1630 */
1631function isArrayBufferView(val) {
1632 var result;
1633 if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
1634 result = ArrayBuffer.isView(val);
1635 } else {
1636 result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
1637 }
1638 return result;
1639}
1640
1641/**
1642 * Determine if a value is a String
1643 *
1644 * @param {Object} val The value to test
1645 * @returns {boolean} True if value is a String, otherwise false
1646 */
1647function isString(val) {
1648 return typeof val === 'string';
1649}
1650
1651/**
1652 * Determine if a value is a Number
1653 *
1654 * @param {Object} val The value to test
1655 * @returns {boolean} True if value is a Number, otherwise false
1656 */
1657function isNumber(val) {
1658 return typeof val === 'number';
1659}
1660
1661/**
1662 * Determine if a value is an Object
1663 *
1664 * @param {Object} val The value to test
1665 * @returns {boolean} True if value is an Object, otherwise false
1666 */
1667function isObject(val) {
1668 return val !== null && typeof val === 'object';
1669}
1670
1671/**
1672 * Determine if a value is a Date
1673 *
1674 * @param {Object} val The value to test
1675 * @returns {boolean} True if value is a Date, otherwise false
1676 */
1677function isDate(val) {
1678 return toString.call(val) === '[object Date]';
1679}
1680
1681/**
1682 * Determine if a value is a File
1683 *
1684 * @param {Object} val The value to test
1685 * @returns {boolean} True if value is a File, otherwise false
1686 */
1687function isFile(val) {
1688 return toString.call(val) === '[object File]';
1689}
1690
1691/**
1692 * Determine if a value is a Blob
1693 *
1694 * @param {Object} val The value to test
1695 * @returns {boolean} True if value is a Blob, otherwise false
1696 */
1697function isBlob(val) {
1698 return toString.call(val) === '[object Blob]';
1699}
1700
1701/**
1702 * Determine if a value is a Function
1703 *
1704 * @param {Object} val The value to test
1705 * @returns {boolean} True if value is a Function, otherwise false
1706 */
1707function isFunction(val) {
1708 return toString.call(val) === '[object Function]';
1709}
1710
1711/**
1712 * Determine if a value is a Stream
1713 *
1714 * @param {Object} val The value to test
1715 * @returns {boolean} True if value is a Stream, otherwise false
1716 */
1717function isStream(val) {
1718 return isObject(val) && isFunction(val.pipe);
1719}
1720
1721/**
1722 * Determine if a value is a URLSearchParams object
1723 *
1724 * @param {Object} val The value to test
1725 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
1726 */
1727function isURLSearchParams(val) {
1728 return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
1729}
1730
1731/**
1732 * Trim excess whitespace off the beginning and end of a string
1733 *
1734 * @param {String} str The String to trim
1735 * @returns {String} The String freed of excess whitespace
1736 */
1737function trim(str) {
1738 return str.replace(/^\s*/, '').replace(/\s*$/, '');
1739}
1740
1741/**
1742 * Determine if we're running in a standard browser environment
1743 *
1744 * This allows axios to run in a web worker, and react-native.
1745 * Both environments support XMLHttpRequest, but not fully standard globals.
1746 *
1747 * web workers:
1748 * typeof window -> undefined
1749 * typeof document -> undefined
1750 *
1751 * react-native:
1752 * navigator.product -> 'ReactNative'
1753 * nativescript
1754 * navigator.product -> 'NativeScript' or 'NS'
1755 */
1756function isStandardBrowserEnv() {
1757 if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
1758 navigator.product === 'NativeScript' ||
1759 navigator.product === 'NS')) {
1760 return false;
1761 }
1762 return (
1763 typeof window !== 'undefined' &&
1764 typeof document !== 'undefined'
1765 );
1766}
1767
1768/**
1769 * Iterate over an Array or an Object invoking a function for each item.
1770 *
1771 * If `obj` is an Array callback will be called passing
1772 * the value, index, and complete array for each item.
1773 *
1774 * If 'obj' is an Object callback will be called passing
1775 * the value, key, and complete object for each property.
1776 *
1777 * @param {Object|Array} obj The object to iterate
1778 * @param {Function} fn The callback to invoke for each item
1779 */
1780function forEach(obj, fn) {
1781 // Don't bother if no value provided
1782 if (obj === null || typeof obj === 'undefined') {
1783 return;
1784 }
1785
1786 // Force an array if not already something iterable
1787 if (typeof obj !== 'object') {
1788 /*eslint no-param-reassign:0*/
1789 obj = [obj];
1790 }
1791
1792 if (isArray(obj)) {
1793 // Iterate over array values
1794 for (var i = 0, l = obj.length; i < l; i++) {
1795 fn.call(null, obj[i], i, obj);
1796 }
1797 } else {
1798 // Iterate over object keys
1799 for (var key in obj) {
1800 if (Object.prototype.hasOwnProperty.call(obj, key)) {
1801 fn.call(null, obj[key], key, obj);
1802 }
1803 }
1804 }
1805}
1806
1807/**
1808 * Accepts varargs expecting each argument to be an object, then
1809 * immutably merges the properties of each object and returns result.
1810 *
1811 * When multiple objects contain the same key the later object in
1812 * the arguments list will take precedence.
1813 *
1814 * Example:
1815 *
1816 * ```js
1817 * var result = merge({foo: 123}, {foo: 456});
1818 * console.log(result.foo); // outputs 456
1819 * ```
1820 *
1821 * @param {Object} obj1 Object to merge
1822 * @returns {Object} Result of all merge properties
1823 */
1824function merge(/* obj1, obj2, obj3, ... */) {
1825 var result = {};
1826 function assignValue(val, key) {
1827 if (typeof result[key] === 'object' && typeof val === 'object') {
1828 result[key] = merge(result[key], val);
1829 } else {
1830 result[key] = val;
1831 }
1832 }
1833
1834 for (var i = 0, l = arguments.length; i < l; i++) {
1835 forEach(arguments[i], assignValue);
1836 }
1837 return result;
1838}
1839
1840/**
1841 * Function equal to merge with the difference being that no reference
1842 * to original objects is kept.
1843 *
1844 * @see merge
1845 * @param {Object} obj1 Object to merge
1846 * @returns {Object} Result of all merge properties
1847 */
1848function deepMerge(/* obj1, obj2, obj3, ... */) {
1849 var result = {};
1850 function assignValue(val, key) {
1851 if (typeof result[key] === 'object' && typeof val === 'object') {
1852 result[key] = deepMerge(result[key], val);
1853 } else if (typeof val === 'object') {
1854 result[key] = deepMerge({}, val);
1855 } else {
1856 result[key] = val;
1857 }
1858 }
1859
1860 for (var i = 0, l = arguments.length; i < l; i++) {
1861 forEach(arguments[i], assignValue);
1862 }
1863 return result;
1864}
1865
1866/**
1867 * Extends object a by mutably adding to it the properties of object b.
1868 *
1869 * @param {Object} a The object to be extended
1870 * @param {Object} b The object to copy properties from
1871 * @param {Object} thisArg The object to bind function to
1872 * @return {Object} The resulting value of object a
1873 */
1874function extend(a, b, thisArg) {
1875 forEach(b, function assignValue(val, key) {
1876 if (thisArg && typeof val === 'function') {
1877 a[key] = bind(val, thisArg);
1878 } else {
1879 a[key] = val;
1880 }
1881 });
1882 return a;
1883}
1884
1885module.exports = {
1886 isArray: isArray,
1887 isArrayBuffer: isArrayBuffer,
1888 isBuffer: isBuffer,
1889 isFormData: isFormData,
1890 isArrayBufferView: isArrayBufferView,
1891 isString: isString,
1892 isNumber: isNumber,
1893 isObject: isObject,
1894 isUndefined: isUndefined,
1895 isDate: isDate,
1896 isFile: isFile,
1897 isBlob: isBlob,
1898 isFunction: isFunction,
1899 isStream: isStream,
1900 isURLSearchParams: isURLSearchParams,
1901 isStandardBrowserEnv: isStandardBrowserEnv,
1902 forEach: forEach,
1903 merge: merge,
1904 deepMerge: deepMerge,
1905 extend: extend,
1906 trim: trim
1907};
1908
1909
1910/***/ }),
1911
1912/***/ "../node_modules/contentful-sdk-core/dist/index.es-modules.js":
1913/*!********************************************************************!*\
1914 !*** ../node_modules/contentful-sdk-core/dist/index.es-modules.js ***!
1915 \********************************************************************/
1916/*! exports provided: createHttpClient, createRequestConfig, enforceObjPath, freezeSys, getUserAgentHeader, toPlainObject */
1917/***/ (function(module, __webpack_exports__, __webpack_require__) {
1918
1919"use strict";
1920__webpack_require__.r(__webpack_exports__);
1921/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createHttpClient", function() { return createHttpClient; });
1922/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRequestConfig", function() { return createRequestConfig; });
1923/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enforceObjPath", function() { return enforceObjPath; });
1924/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "freezeSys", function() { return freezeSys; });
1925/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUserAgentHeader", function() { return getUserAgentHeader; });
1926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toPlainObject", function() { return toPlainObject; });
1927/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
1928/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
1929/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ "../node_modules/qs/lib/index.js");
1930/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
1931/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isPlainObject */ "../node_modules/lodash/isPlainObject.js");
1932/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__);
1933/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! os */ 1);
1934/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_3__);
1935
1936
1937
1938
1939
1940function _defineProperty(obj, key, value) {
1941 if (key in obj) {
1942 Object.defineProperty(obj, key, {
1943 value: value,
1944 enumerable: true,
1945 configurable: true,
1946 writable: true
1947 });
1948 } else {
1949 obj[key] = value;
1950 }
1951
1952 return obj;
1953}
1954
1955function ownKeys(object, enumerableOnly) {
1956 var keys = Object.keys(object);
1957
1958 if (Object.getOwnPropertySymbols) {
1959 var symbols = Object.getOwnPropertySymbols(object);
1960 if (enumerableOnly) symbols = symbols.filter(function (sym) {
1961 return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1962 });
1963 keys.push.apply(keys, symbols);
1964 }
1965
1966 return keys;
1967}
1968
1969function _objectSpread2(target) {
1970 for (var i = 1; i < arguments.length; i++) {
1971 var source = arguments[i] != null ? arguments[i] : {};
1972
1973 if (i % 2) {
1974 ownKeys(Object(source), true).forEach(function (key) {
1975 _defineProperty(target, key, source[key]);
1976 });
1977 } else if (Object.getOwnPropertyDescriptors) {
1978 Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1979 } else {
1980 ownKeys(Object(source)).forEach(function (key) {
1981 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1982 });
1983 }
1984 }
1985
1986 return target;
1987}
1988
1989function _slicedToArray(arr, i) {
1990 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1991}
1992
1993function _arrayWithHoles(arr) {
1994 if (Array.isArray(arr)) return arr;
1995}
1996
1997function _iterableToArrayLimit(arr, i) {
1998 if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
1999 var _arr = [];
2000 var _n = true;
2001 var _d = false;
2002 var _e = undefined;
2003
2004 try {
2005 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
2006 _arr.push(_s.value);
2007
2008 if (i && _arr.length === i) break;
2009 }
2010 } catch (err) {
2011 _d = true;
2012 _e = err;
2013 } finally {
2014 try {
2015 if (!_n && _i["return"] != null) _i["return"]();
2016 } finally {
2017 if (_d) throw _e;
2018 }
2019 }
2020
2021 return _arr;
2022}
2023
2024function _unsupportedIterableToArray(o, minLen) {
2025 if (!o) return;
2026 if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2027 var n = Object.prototype.toString.call(o).slice(8, -1);
2028 if (n === "Object" && o.constructor) n = o.constructor.name;
2029 if (n === "Map" || n === "Set") return Array.from(n);
2030 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2031}
2032
2033function _arrayLikeToArray(arr, len) {
2034 if (len == null || len > arr.length) len = arr.length;
2035
2036 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
2037
2038 return arr2;
2039}
2040
2041function _nonIterableRest() {
2042 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2043}
2044
2045var attempts = {};
2046var networkErrorAttempts = 0;
2047function rateLimit(instance) {
2048 var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
2049 var _instance$defaults = instance.defaults,
2050 _instance$defaults$re = _instance$defaults.responseLogger,
2051 responseLogger = _instance$defaults$re === void 0 ? function () {
2052 return undefined;
2053 } : _instance$defaults$re,
2054 _instance$defaults$re2 = _instance$defaults.requestLogger,
2055 requestLogger = _instance$defaults$re2 === void 0 ? function () {
2056 return undefined;
2057 } : _instance$defaults$re2;
2058 instance.interceptors.request.use(function (config) {
2059 requestLogger(config);
2060 return config;
2061 }, function (error) {
2062 return Promise.reject(error);
2063 });
2064 instance.interceptors.response.use(function (response) {
2065 // we don't need to do anything here
2066 responseLogger(response);
2067 return response;
2068 }, function (error) {
2069 var response = error.response,
2070 config = error.config; // Do not retry if it is disabled or no request config exists (not an axios error)
2071
2072 if (!config || !instance.defaults.retryOnError) {
2073 return Promise.reject(error);
2074 }
2075
2076 var retryErrorType = null;
2077 var wait = 0; // Errors without response did not recieve anything from the server
2078
2079 if (!response) {
2080 retryErrorType = 'Connection';
2081 networkErrorAttempts++;
2082
2083 if (networkErrorAttempts > maxRetry) {
2084 error.attempts = networkErrorAttempts;
2085 return Promise.reject(error);
2086 }
2087
2088 wait = Math.pow(Math.SQRT2, networkErrorAttempts);
2089 response = {};
2090 } else {
2091 networkErrorAttempts = 0;
2092 }
2093
2094 if (response.status >= 500 && response.status < 600) {
2095 // 5** errors are server related
2096 retryErrorType = "Server ".concat(response.status);
2097 var headers = response.headers || {};
2098 var requestId = headers['x-contentful-request-id'] || null;
2099 attempts[requestId] = attempts[requestId] || 0;
2100 attempts[requestId]++; // we reject if there are too many errors with the same request id or request id is not defined
2101
2102 if (attempts[requestId] > maxRetry || !requestId) {
2103 error.attempts = attempts[requestId];
2104 return Promise.reject(error);
2105 }
2106
2107 wait = Math.pow(Math.SQRT2, attempts[requestId]);
2108 } else if (response.status === 429) {
2109 // 429 errors are exceeded rate limit exceptions
2110 retryErrorType = 'Rate limit'; // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413
2111
2112 if (response.headers && error.response.headers['x-contentful-ratelimit-reset']) {
2113 wait = response.headers['x-contentful-ratelimit-reset'];
2114 }
2115 }
2116
2117 var delay = function delay(ms) {
2118 return new Promise(function (resolve) {
2119 setTimeout(resolve, ms);
2120 });
2121 };
2122
2123 if (retryErrorType) {
2124 // convert to ms and add jitter
2125 wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);
2126 instance.defaults.logHandler('warning', "".concat(retryErrorType, " error occurred. Waiting for ").concat(wait, " ms before retrying..."));
2127 /* Somehow between the interceptor and retrying the request the httpAgent/httpsAgent gets transformed from an Agent-like object
2128 to a regular object, causing failures on retries after rate limits. Removing these properties here fixes the error, but retry
2129 requests still use the original http/httpsAgent property */
2130
2131 delete config.httpAgent;
2132 delete config.httpsAgent;
2133 return delay(wait).then(function () {
2134 return instance(config);
2135 });
2136 }
2137
2138 return Promise.reject(error);
2139 });
2140}
2141
2142function isNode() {
2143 /**
2144 * Polyfills of 'process' might set process.browser === true
2145 *
2146 * See:
2147 * https://github.com/webpack/node-libs-browser/blob/master/mock/process.js#L8
2148 * https://github.com/defunctzombie/node-process/blob/master/browser.js#L156
2149 **/
2150 return typeof process !== 'undefined' && !process.browser;
2151}
2152function getNodeVersion() {
2153 return process.versions && process.versions.node ? "v".concat(process.versions.node) : process.version;
2154}
2155
2156// Also enforces toplevel domain specified, no spaces and no protocol
2157
2158var HOST_REGEX = /^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;
2159/**
2160 * Create pre configured axios instance
2161 * @private
2162 * @param {Object} axios - Axios library
2163 * @param {Object} httpClientParams - Initialization parameters for the HTTP client
2164 * @prop {string} space - Space ID
2165 * @prop {string} accessToken - Access Token
2166 * @prop {boolean=} insecure - If we should use http instead
2167 * @prop {string=} host - Alternate host
2168 * @prop {Object=} httpAgent - HTTP agent for node
2169 * @prop {Object=} httpsAgent - HTTPS agent for node
2170 * @prop {function=} adapter - Axios adapter to handle requests
2171 * @prop {function=} requestLogger - Gets called on every request triggered by the SDK, takes the axios request config as an argument
2172 * @prop {function=} responseLogger - Gets called on every response, takes axios response object as an argument
2173 * @prop {Object=} proxy - Axios proxy config
2174 * @prop {Object=} headers - Additional headers
2175 * @prop {function=} logHandler - A log handler function to process given log messages & errors. Receives the log level (error, warning & info) and the actual log data (Error object or string). (Default can be found here: https://github.com/contentful/contentful-sdk-core/blob/master/lib/create-http-client.js)
2176 * @return {Object} Initialized axios instance
2177 */
2178
2179function createHttpClient(axios, options) {
2180 var defaultConfig = {
2181 insecure: false,
2182 retryOnError: true,
2183 logHandler: function logHandler(level, data) {
2184 if (level === 'error' && data) {
2185 var title = [data.name, data.message].filter(function (a) {
2186 return a;
2187 }).join(' - ');
2188 console.error("[error] ".concat(title));
2189 console.error(data);
2190 return;
2191 }
2192
2193 console.log("[".concat(level, "] ").concat(data));
2194 },
2195 // Passed to axios
2196 headers: {},
2197 httpAgent: false,
2198 httpsAgent: false,
2199 timeout: 30000,
2200 proxy: false,
2201 basePath: '',
2202 adapter: false,
2203 maxContentLength: 1073741824 // 1GB
2204
2205 };
2206
2207 var config = _objectSpread2({}, defaultConfig, {}, options);
2208
2209 if (!config.accessToken) {
2210 var missingAccessTokenError = new TypeError('Expected parameter accessToken');
2211 config.logHandler('error', missingAccessTokenError);
2212 throw missingAccessTokenError;
2213 } // Construct axios baseURL option
2214
2215
2216 var protocol = config.insecure ? 'http' : 'https';
2217 var space = config.space ? "".concat(config.space, "/") : '';
2218 var hostname = config.defaultHostname;
2219 var port = config.insecure ? 80 : 443;
2220
2221 if (config.host && HOST_REGEX.test(config.host)) {
2222 var parsed = config.host.split(':');
2223
2224 if (parsed.length === 2) {
2225 var _parsed = _slicedToArray(parsed, 2);
2226
2227 hostname = _parsed[0];
2228 port = _parsed[1];
2229 } else {
2230 hostname = parsed[0];
2231 }
2232 } // Ensure that basePath does start but not end with a slash
2233
2234
2235 if (config.basePath) {
2236 config.basePath = "/".concat(config.basePath.split('/').filter(Boolean).join('/'));
2237 }
2238
2239 var baseURL = options.baseURL || "".concat(protocol, "://").concat(hostname, ":").concat(port).concat(config.basePath, "/spaces/").concat(space);
2240
2241 if (!config.headers['Authorization']) {
2242 config.headers['Authorization'] = 'Bearer ' + config.accessToken;
2243 } // Set these headers only for node because browsers don't like it when you
2244 // override user-agent or accept-encoding.
2245 // The SDKs should set their own X-Contentful-User-Agent.
2246
2247
2248 if (isNode()) {
2249 config.headers['user-agent'] = 'node.js/' + getNodeVersion();
2250 config.headers['Accept-Encoding'] = 'gzip';
2251 }
2252
2253 var axiosOptions = {
2254 // Axios
2255 baseURL: baseURL,
2256 headers: config.headers,
2257 httpAgent: config.httpAgent,
2258 httpsAgent: config.httpsAgent,
2259 paramsSerializer: qs__WEBPACK_IMPORTED_MODULE_1___default.a.stringify,
2260 proxy: config.proxy,
2261 timeout: config.timeout,
2262 adapter: config.adapter,
2263 maxContentLength: config.maxContentLength,
2264 // Contentful
2265 logHandler: config.logHandler,
2266 responseLogger: config.responseLogger,
2267 requestLogger: config.requestLogger,
2268 retryOnError: config.retryOnError
2269 };
2270 var instance = axios.create(axiosOptions);
2271 instance.httpClientParams = options;
2272 /**
2273 * Creates a new axios instance with the same default base parameters as the
2274 * current one, and with any overrides passed to the newParams object
2275 * This is useful as the SDKs use dependency injection to get the axios library
2276 * and the version of the library comes from different places depending
2277 * on whether it's a browser build or a node.js build.
2278 * @private
2279 * @param {Object} httpClientParams - Initialization parameters for the HTTP client
2280 * @return {Object} Initialized axios instance
2281 */
2282
2283 instance.cloneWithNewParams = function (newParams) {
2284 return createHttpClient(axios, _objectSpread2({}, lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(options), {}, newParams));
2285 };
2286
2287 rateLimit(instance, config.retryLimit);
2288 return instance;
2289}
2290
2291/**
2292 * Creates request parameters configuration by parsing an existing query object
2293 * @private
2294 * @param {Object} query
2295 * @return {Object} Config object with `params` property, ready to be used in axios
2296 */
2297
2298function createRequestConfig(_ref) {
2299 var query = _ref.query;
2300 var config = {};
2301 delete query.resolveLinks;
2302 config.params = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(query);
2303 return config;
2304}
2305
2306function enforceObjPath(obj, path) {
2307 if (!(path in obj)) {
2308 var err = new Error();
2309 err.name = 'PropertyMissing';
2310 err.message = "Required property ".concat(path, " missing from:\n\n").concat(JSON.stringify(obj), "\n\n");
2311 throw err;
2312 }
2313
2314 return true;
2315}
2316
2317function freezeObjectDeep(obj) {
2318 Object.keys(obj).forEach(function (key) {
2319 var value = obj[key];
2320
2321 if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(value)) {
2322 freezeObjectDeep(value);
2323 }
2324 });
2325 return Object.freeze(obj);
2326}
2327
2328function freezeSys(obj) {
2329 freezeObjectDeep(obj.sys || {});
2330 return obj;
2331}
2332
2333function isReactNative() {
2334 return typeof window !== 'undefined' && 'navigator' in window && 'product' in window.navigator && window.navigator.product === 'ReactNative';
2335}
2336
2337function getBrowserOS() {
2338 if (!window) {
2339 return null;
2340 }
2341
2342 var userAgent = window.navigator.userAgent;
2343 var platform = window.navigator.platform;
2344 var macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];
2345 var windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];
2346 var iosPlatforms = ['iPhone', 'iPad', 'iPod'];
2347 var os = null;
2348
2349 if (macosPlatforms.indexOf(platform) !== -1) {
2350 os = 'macOS';
2351 } else if (iosPlatforms.indexOf(platform) !== -1) {
2352 os = 'iOS';
2353 } else if (windowsPlatforms.indexOf(platform) !== -1) {
2354 os = 'Windows';
2355 } else if (/Android/.test(userAgent)) {
2356 os = 'Android';
2357 } else if (/Linux/.test(platform)) {
2358 os = 'Linux';
2359 }
2360
2361 return os;
2362}
2363
2364function getNodeOS() {
2365 var os = Object(os__WEBPACK_IMPORTED_MODULE_3__["platform"])() || 'linux';
2366 var version = Object(os__WEBPACK_IMPORTED_MODULE_3__["release"])() || '0.0.0';
2367 var osMap = {
2368 android: 'Android',
2369 aix: 'Linux',
2370 darwin: 'macOS',
2371 freebsd: 'Linux',
2372 linux: 'Linux',
2373 openbsd: 'Linux',
2374 sunos: 'Linux',
2375 win32: 'Windows'
2376 };
2377
2378 if (os in osMap) {
2379 return "".concat(osMap[os] || 'Linux', "/").concat(version);
2380 }
2381
2382 return null;
2383}
2384
2385function getUserAgentHeader(sdk, application, integration, feature) {
2386 var headerParts = [];
2387
2388 if (application) {
2389 headerParts.push("app ".concat(application));
2390 }
2391
2392 if (integration) {
2393 headerParts.push("integration ".concat(integration));
2394 }
2395
2396 if (feature) {
2397 headerParts.push('feature ' + feature);
2398 }
2399
2400 headerParts.push("sdk ".concat(sdk));
2401 var os = null;
2402
2403 try {
2404 if (isReactNative()) {
2405 os = getBrowserOS();
2406 headerParts.push('platform ReactNative');
2407 } else if (isNode()) {
2408 os = getNodeOS();
2409 headerParts.push("platform node.js/".concat(getNodeVersion()));
2410 } else {
2411 os = getBrowserOS();
2412 headerParts.push("platform browser");
2413 }
2414 } catch (e) {
2415 os = null;
2416 }
2417
2418 if (os) {
2419 headerParts.push("os ".concat(os));
2420 }
2421
2422 return "".concat(headerParts.filter(function (item) {
2423 return item !== '';
2424 }).join('; '), ";");
2425}
2426
2427/**
2428 * Mixes in a method to return just a plain object with no additional methods
2429 * @private
2430 * @param {Object} data - Any plain JSON response returned from the API
2431 * @return {Object} Enhanced object with toPlainObject method
2432 */
2433
2434function toPlainObject(data) {
2435 return Object.defineProperty(data, 'toPlainObject', {
2436 enumerable: false,
2437 configurable: false,
2438 writable: false,
2439 value: function value() {
2440 return lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(this);
2441 }
2442 });
2443}
2444
2445
2446
2447/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "../node_modules/process/browser.js")))
2448
2449/***/ }),
2450
2451/***/ "../node_modules/core-js/fn/array/from.js":
2452/*!************************************************!*\
2453 !*** ../node_modules/core-js/fn/array/from.js ***!
2454 \************************************************/
2455/*! no static exports found */
2456/***/ (function(module, exports, __webpack_require__) {
2457
2458__webpack_require__(/*! ../../modules/es6.string.iterator */ "../node_modules/core-js/modules/es6.string.iterator.js");
2459__webpack_require__(/*! ../../modules/es6.array.from */ "../node_modules/core-js/modules/es6.array.from.js");
2460module.exports = __webpack_require__(/*! ../../modules/_core */ "../node_modules/core-js/modules/_core.js").Array.from;
2461
2462
2463/***/ }),
2464
2465/***/ "../node_modules/core-js/fn/object/assign.js":
2466/*!***************************************************!*\
2467 !*** ../node_modules/core-js/fn/object/assign.js ***!
2468 \***************************************************/
2469/*! no static exports found */
2470/***/ (function(module, exports, __webpack_require__) {
2471
2472__webpack_require__(/*! ../../modules/es6.object.assign */ "../node_modules/core-js/modules/es6.object.assign.js");
2473module.exports = __webpack_require__(/*! ../../modules/_core */ "../node_modules/core-js/modules/_core.js").Object.assign;
2474
2475
2476/***/ }),
2477
2478/***/ "../node_modules/core-js/fn/promise.js":
2479/*!*********************************************!*\
2480 !*** ../node_modules/core-js/fn/promise.js ***!
2481 \*********************************************/
2482/*! no static exports found */
2483/***/ (function(module, exports, __webpack_require__) {
2484
2485__webpack_require__(/*! ../modules/es6.object.to-string */ "../node_modules/core-js/modules/es6.object.to-string.js");
2486__webpack_require__(/*! ../modules/es6.string.iterator */ "../node_modules/core-js/modules/es6.string.iterator.js");
2487__webpack_require__(/*! ../modules/web.dom.iterable */ "../node_modules/core-js/modules/web.dom.iterable.js");
2488__webpack_require__(/*! ../modules/es6.promise */ "../node_modules/core-js/modules/es6.promise.js");
2489__webpack_require__(/*! ../modules/es7.promise.finally */ "../node_modules/core-js/modules/es7.promise.finally.js");
2490__webpack_require__(/*! ../modules/es7.promise.try */ "../node_modules/core-js/modules/es7.promise.try.js");
2491module.exports = __webpack_require__(/*! ../modules/_core */ "../node_modules/core-js/modules/_core.js").Promise;
2492
2493
2494/***/ }),
2495
2496/***/ "../node_modules/core-js/modules/_a-function.js":
2497/*!******************************************************!*\
2498 !*** ../node_modules/core-js/modules/_a-function.js ***!
2499 \******************************************************/
2500/*! no static exports found */
2501/***/ (function(module, exports) {
2502
2503module.exports = function (it) {
2504 if (typeof it != 'function') throw TypeError(it + ' is not a function!');
2505 return it;
2506};
2507
2508
2509/***/ }),
2510
2511/***/ "../node_modules/core-js/modules/_add-to-unscopables.js":
2512/*!**************************************************************!*\
2513 !*** ../node_modules/core-js/modules/_add-to-unscopables.js ***!
2514 \**************************************************************/
2515/*! no static exports found */
2516/***/ (function(module, exports, __webpack_require__) {
2517
2518// 22.1.3.31 Array.prototype[@@unscopables]
2519var UNSCOPABLES = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('unscopables');
2520var ArrayProto = Array.prototype;
2521if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(/*! ./_hide */ "../node_modules/core-js/modules/_hide.js")(ArrayProto, UNSCOPABLES, {});
2522module.exports = function (key) {
2523 ArrayProto[UNSCOPABLES][key] = true;
2524};
2525
2526
2527/***/ }),
2528
2529/***/ "../node_modules/core-js/modules/_an-instance.js":
2530/*!*******************************************************!*\
2531 !*** ../node_modules/core-js/modules/_an-instance.js ***!
2532 \*******************************************************/
2533/*! no static exports found */
2534/***/ (function(module, exports) {
2535
2536module.exports = function (it, Constructor, name, forbiddenField) {
2537 if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
2538 throw TypeError(name + ': incorrect invocation!');
2539 } return it;
2540};
2541
2542
2543/***/ }),
2544
2545/***/ "../node_modules/core-js/modules/_an-object.js":
2546/*!*****************************************************!*\
2547 !*** ../node_modules/core-js/modules/_an-object.js ***!
2548 \*****************************************************/
2549/*! no static exports found */
2550/***/ (function(module, exports, __webpack_require__) {
2551
2552var isObject = __webpack_require__(/*! ./_is-object */ "../node_modules/core-js/modules/_is-object.js");
2553module.exports = function (it) {
2554 if (!isObject(it)) throw TypeError(it + ' is not an object!');
2555 return it;
2556};
2557
2558
2559/***/ }),
2560
2561/***/ "../node_modules/core-js/modules/_array-includes.js":
2562/*!**********************************************************!*\
2563 !*** ../node_modules/core-js/modules/_array-includes.js ***!
2564 \**********************************************************/
2565/*! no static exports found */
2566/***/ (function(module, exports, __webpack_require__) {
2567
2568// false -> Array#indexOf
2569// true -> Array#includes
2570var toIObject = __webpack_require__(/*! ./_to-iobject */ "../node_modules/core-js/modules/_to-iobject.js");
2571var toLength = __webpack_require__(/*! ./_to-length */ "../node_modules/core-js/modules/_to-length.js");
2572var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "../node_modules/core-js/modules/_to-absolute-index.js");
2573module.exports = function (IS_INCLUDES) {
2574 return function ($this, el, fromIndex) {
2575 var O = toIObject($this);
2576 var length = toLength(O.length);
2577 var index = toAbsoluteIndex(fromIndex, length);
2578 var value;
2579 // Array#includes uses SameValueZero equality algorithm
2580 // eslint-disable-next-line no-self-compare
2581 if (IS_INCLUDES && el != el) while (length > index) {
2582 value = O[index++];
2583 // eslint-disable-next-line no-self-compare
2584 if (value != value) return true;
2585 // Array#indexOf ignores holes, Array#includes - not
2586 } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
2587 if (O[index] === el) return IS_INCLUDES || index || 0;
2588 } return !IS_INCLUDES && -1;
2589 };
2590};
2591
2592
2593/***/ }),
2594
2595/***/ "../node_modules/core-js/modules/_classof.js":
2596/*!***************************************************!*\
2597 !*** ../node_modules/core-js/modules/_classof.js ***!
2598 \***************************************************/
2599/*! no static exports found */
2600/***/ (function(module, exports, __webpack_require__) {
2601
2602// getting tag from 19.1.3.6 Object.prototype.toString()
2603var cof = __webpack_require__(/*! ./_cof */ "../node_modules/core-js/modules/_cof.js");
2604var TAG = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('toStringTag');
2605// ES3 wrong here
2606var ARG = cof(function () { return arguments; }()) == 'Arguments';
2607
2608// fallback for IE11 Script Access Denied error
2609var tryGet = function (it, key) {
2610 try {
2611 return it[key];
2612 } catch (e) { /* empty */ }
2613};
2614
2615module.exports = function (it) {
2616 var O, T, B;
2617 return it === undefined ? 'Undefined' : it === null ? 'Null'
2618 // @@toStringTag case
2619 : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
2620 // builtinTag case
2621 : ARG ? cof(O)
2622 // ES3 arguments fallback
2623 : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
2624};
2625
2626
2627/***/ }),
2628
2629/***/ "../node_modules/core-js/modules/_cof.js":
2630/*!***********************************************!*\
2631 !*** ../node_modules/core-js/modules/_cof.js ***!
2632 \***********************************************/
2633/*! no static exports found */
2634/***/ (function(module, exports) {
2635
2636var toString = {}.toString;
2637
2638module.exports = function (it) {
2639 return toString.call(it).slice(8, -1);
2640};
2641
2642
2643/***/ }),
2644
2645/***/ "../node_modules/core-js/modules/_core.js":
2646/*!************************************************!*\
2647 !*** ../node_modules/core-js/modules/_core.js ***!
2648 \************************************************/
2649/*! no static exports found */
2650/***/ (function(module, exports) {
2651
2652var core = module.exports = { version: '2.6.11' };
2653if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
2654
2655
2656/***/ }),
2657
2658/***/ "../node_modules/core-js/modules/_create-property.js":
2659/*!***********************************************************!*\
2660 !*** ../node_modules/core-js/modules/_create-property.js ***!
2661 \***********************************************************/
2662/*! no static exports found */
2663/***/ (function(module, exports, __webpack_require__) {
2664
2665"use strict";
2666
2667var $defineProperty = __webpack_require__(/*! ./_object-dp */ "../node_modules/core-js/modules/_object-dp.js");
2668var createDesc = __webpack_require__(/*! ./_property-desc */ "../node_modules/core-js/modules/_property-desc.js");
2669
2670module.exports = function (object, index, value) {
2671 if (index in object) $defineProperty.f(object, index, createDesc(0, value));
2672 else object[index] = value;
2673};
2674
2675
2676/***/ }),
2677
2678/***/ "../node_modules/core-js/modules/_ctx.js":
2679/*!***********************************************!*\
2680 !*** ../node_modules/core-js/modules/_ctx.js ***!
2681 \***********************************************/
2682/*! no static exports found */
2683/***/ (function(module, exports, __webpack_require__) {
2684
2685// optional / simple context binding
2686var aFunction = __webpack_require__(/*! ./_a-function */ "../node_modules/core-js/modules/_a-function.js");
2687module.exports = function (fn, that, length) {
2688 aFunction(fn);
2689 if (that === undefined) return fn;
2690 switch (length) {
2691 case 1: return function (a) {
2692 return fn.call(that, a);
2693 };
2694 case 2: return function (a, b) {
2695 return fn.call(that, a, b);
2696 };
2697 case 3: return function (a, b, c) {
2698 return fn.call(that, a, b, c);
2699 };
2700 }
2701 return function (/* ...args */) {
2702 return fn.apply(that, arguments);
2703 };
2704};
2705
2706
2707/***/ }),
2708
2709/***/ "../node_modules/core-js/modules/_defined.js":
2710/*!***************************************************!*\
2711 !*** ../node_modules/core-js/modules/_defined.js ***!
2712 \***************************************************/
2713/*! no static exports found */
2714/***/ (function(module, exports) {
2715
2716// 7.2.1 RequireObjectCoercible(argument)
2717module.exports = function (it) {
2718 if (it == undefined) throw TypeError("Can't call method on " + it);
2719 return it;
2720};
2721
2722
2723/***/ }),
2724
2725/***/ "../node_modules/core-js/modules/_descriptors.js":
2726/*!*******************************************************!*\
2727 !*** ../node_modules/core-js/modules/_descriptors.js ***!
2728 \*******************************************************/
2729/*! no static exports found */
2730/***/ (function(module, exports, __webpack_require__) {
2731
2732// Thank's IE8 for his funny defineProperty
2733module.exports = !__webpack_require__(/*! ./_fails */ "../node_modules/core-js/modules/_fails.js")(function () {
2734 return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
2735});
2736
2737
2738/***/ }),
2739
2740/***/ "../node_modules/core-js/modules/_dom-create.js":
2741/*!******************************************************!*\
2742 !*** ../node_modules/core-js/modules/_dom-create.js ***!
2743 \******************************************************/
2744/*! no static exports found */
2745/***/ (function(module, exports, __webpack_require__) {
2746
2747var isObject = __webpack_require__(/*! ./_is-object */ "../node_modules/core-js/modules/_is-object.js");
2748var document = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js").document;
2749// typeof document.createElement is 'object' in old IE
2750var is = isObject(document) && isObject(document.createElement);
2751module.exports = function (it) {
2752 return is ? document.createElement(it) : {};
2753};
2754
2755
2756/***/ }),
2757
2758/***/ "../node_modules/core-js/modules/_enum-bug-keys.js":
2759/*!*********************************************************!*\
2760 !*** ../node_modules/core-js/modules/_enum-bug-keys.js ***!
2761 \*********************************************************/
2762/*! no static exports found */
2763/***/ (function(module, exports) {
2764
2765// IE 8- don't enum bug keys
2766module.exports = (
2767 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
2768).split(',');
2769
2770
2771/***/ }),
2772
2773/***/ "../node_modules/core-js/modules/_export.js":
2774/*!**************************************************!*\
2775 !*** ../node_modules/core-js/modules/_export.js ***!
2776 \**************************************************/
2777/*! no static exports found */
2778/***/ (function(module, exports, __webpack_require__) {
2779
2780var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
2781var core = __webpack_require__(/*! ./_core */ "../node_modules/core-js/modules/_core.js");
2782var hide = __webpack_require__(/*! ./_hide */ "../node_modules/core-js/modules/_hide.js");
2783var redefine = __webpack_require__(/*! ./_redefine */ "../node_modules/core-js/modules/_redefine.js");
2784var ctx = __webpack_require__(/*! ./_ctx */ "../node_modules/core-js/modules/_ctx.js");
2785var PROTOTYPE = 'prototype';
2786
2787var $export = function (type, name, source) {
2788 var IS_FORCED = type & $export.F;
2789 var IS_GLOBAL = type & $export.G;
2790 var IS_STATIC = type & $export.S;
2791 var IS_PROTO = type & $export.P;
2792 var IS_BIND = type & $export.B;
2793 var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
2794 var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
2795 var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
2796 var key, own, out, exp;
2797 if (IS_GLOBAL) source = name;
2798 for (key in source) {
2799 // contains in native
2800 own = !IS_FORCED && target && target[key] !== undefined;
2801 // export native or passed
2802 out = (own ? target : source)[key];
2803 // bind timers to global for call from export context
2804 exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
2805 // extend global
2806 if (target) redefine(target, key, out, type & $export.U);
2807 // export
2808 if (exports[key] != out) hide(exports, key, exp);
2809 if (IS_PROTO && expProto[key] != out) expProto[key] = out;
2810 }
2811};
2812global.core = core;
2813// type bitmap
2814$export.F = 1; // forced
2815$export.G = 2; // global
2816$export.S = 4; // static
2817$export.P = 8; // proto
2818$export.B = 16; // bind
2819$export.W = 32; // wrap
2820$export.U = 64; // safe
2821$export.R = 128; // real proto method for `library`
2822module.exports = $export;
2823
2824
2825/***/ }),
2826
2827/***/ "../node_modules/core-js/modules/_fails.js":
2828/*!*************************************************!*\
2829 !*** ../node_modules/core-js/modules/_fails.js ***!
2830 \*************************************************/
2831/*! no static exports found */
2832/***/ (function(module, exports) {
2833
2834module.exports = function (exec) {
2835 try {
2836 return !!exec();
2837 } catch (e) {
2838 return true;
2839 }
2840};
2841
2842
2843/***/ }),
2844
2845/***/ "../node_modules/core-js/modules/_for-of.js":
2846/*!**************************************************!*\
2847 !*** ../node_modules/core-js/modules/_for-of.js ***!
2848 \**************************************************/
2849/*! no static exports found */
2850/***/ (function(module, exports, __webpack_require__) {
2851
2852var ctx = __webpack_require__(/*! ./_ctx */ "../node_modules/core-js/modules/_ctx.js");
2853var call = __webpack_require__(/*! ./_iter-call */ "../node_modules/core-js/modules/_iter-call.js");
2854var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "../node_modules/core-js/modules/_is-array-iter.js");
2855var anObject = __webpack_require__(/*! ./_an-object */ "../node_modules/core-js/modules/_an-object.js");
2856var toLength = __webpack_require__(/*! ./_to-length */ "../node_modules/core-js/modules/_to-length.js");
2857var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "../node_modules/core-js/modules/core.get-iterator-method.js");
2858var BREAK = {};
2859var RETURN = {};
2860var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
2861 var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
2862 var f = ctx(fn, that, entries ? 2 : 1);
2863 var index = 0;
2864 var length, step, iterator, result;
2865 if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
2866 // fast case for arrays with default iterator
2867 if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
2868 result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
2869 if (result === BREAK || result === RETURN) return result;
2870 } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
2871 result = call(iterator, f, step.value, entries);
2872 if (result === BREAK || result === RETURN) return result;
2873 }
2874};
2875exports.BREAK = BREAK;
2876exports.RETURN = RETURN;
2877
2878
2879/***/ }),
2880
2881/***/ "../node_modules/core-js/modules/_function-to-string.js":
2882/*!**************************************************************!*\
2883 !*** ../node_modules/core-js/modules/_function-to-string.js ***!
2884 \**************************************************************/
2885/*! no static exports found */
2886/***/ (function(module, exports, __webpack_require__) {
2887
2888module.exports = __webpack_require__(/*! ./_shared */ "../node_modules/core-js/modules/_shared.js")('native-function-to-string', Function.toString);
2889
2890
2891/***/ }),
2892
2893/***/ "../node_modules/core-js/modules/_global.js":
2894/*!**************************************************!*\
2895 !*** ../node_modules/core-js/modules/_global.js ***!
2896 \**************************************************/
2897/*! no static exports found */
2898/***/ (function(module, exports) {
2899
2900// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
2901var global = module.exports = typeof window != 'undefined' && window.Math == Math
2902 ? window : typeof self != 'undefined' && self.Math == Math ? self
2903 // eslint-disable-next-line no-new-func
2904 : Function('return this')();
2905if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
2906
2907
2908/***/ }),
2909
2910/***/ "../node_modules/core-js/modules/_has.js":
2911/*!***********************************************!*\
2912 !*** ../node_modules/core-js/modules/_has.js ***!
2913 \***********************************************/
2914/*! no static exports found */
2915/***/ (function(module, exports) {
2916
2917var hasOwnProperty = {}.hasOwnProperty;
2918module.exports = function (it, key) {
2919 return hasOwnProperty.call(it, key);
2920};
2921
2922
2923/***/ }),
2924
2925/***/ "../node_modules/core-js/modules/_hide.js":
2926/*!************************************************!*\
2927 !*** ../node_modules/core-js/modules/_hide.js ***!
2928 \************************************************/
2929/*! no static exports found */
2930/***/ (function(module, exports, __webpack_require__) {
2931
2932var dP = __webpack_require__(/*! ./_object-dp */ "../node_modules/core-js/modules/_object-dp.js");
2933var createDesc = __webpack_require__(/*! ./_property-desc */ "../node_modules/core-js/modules/_property-desc.js");
2934module.exports = __webpack_require__(/*! ./_descriptors */ "../node_modules/core-js/modules/_descriptors.js") ? function (object, key, value) {
2935 return dP.f(object, key, createDesc(1, value));
2936} : function (object, key, value) {
2937 object[key] = value;
2938 return object;
2939};
2940
2941
2942/***/ }),
2943
2944/***/ "../node_modules/core-js/modules/_html.js":
2945/*!************************************************!*\
2946 !*** ../node_modules/core-js/modules/_html.js ***!
2947 \************************************************/
2948/*! no static exports found */
2949/***/ (function(module, exports, __webpack_require__) {
2950
2951var document = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js").document;
2952module.exports = document && document.documentElement;
2953
2954
2955/***/ }),
2956
2957/***/ "../node_modules/core-js/modules/_ie8-dom-define.js":
2958/*!**********************************************************!*\
2959 !*** ../node_modules/core-js/modules/_ie8-dom-define.js ***!
2960 \**********************************************************/
2961/*! no static exports found */
2962/***/ (function(module, exports, __webpack_require__) {
2963
2964module.exports = !__webpack_require__(/*! ./_descriptors */ "../node_modules/core-js/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "../node_modules/core-js/modules/_fails.js")(function () {
2965 return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "../node_modules/core-js/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
2966});
2967
2968
2969/***/ }),
2970
2971/***/ "../node_modules/core-js/modules/_invoke.js":
2972/*!**************************************************!*\
2973 !*** ../node_modules/core-js/modules/_invoke.js ***!
2974 \**************************************************/
2975/*! no static exports found */
2976/***/ (function(module, exports) {
2977
2978// fast apply, http://jsperf.lnkit.com/fast-apply/5
2979module.exports = function (fn, args, that) {
2980 var un = that === undefined;
2981 switch (args.length) {
2982 case 0: return un ? fn()
2983 : fn.call(that);
2984 case 1: return un ? fn(args[0])
2985 : fn.call(that, args[0]);
2986 case 2: return un ? fn(args[0], args[1])
2987 : fn.call(that, args[0], args[1]);
2988 case 3: return un ? fn(args[0], args[1], args[2])
2989 : fn.call(that, args[0], args[1], args[2]);
2990 case 4: return un ? fn(args[0], args[1], args[2], args[3])
2991 : fn.call(that, args[0], args[1], args[2], args[3]);
2992 } return fn.apply(that, args);
2993};
2994
2995
2996/***/ }),
2997
2998/***/ "../node_modules/core-js/modules/_iobject.js":
2999/*!***************************************************!*\
3000 !*** ../node_modules/core-js/modules/_iobject.js ***!
3001 \***************************************************/
3002/*! no static exports found */
3003/***/ (function(module, exports, __webpack_require__) {
3004
3005// fallback for non-array-like ES3 and non-enumerable old V8 strings
3006var cof = __webpack_require__(/*! ./_cof */ "../node_modules/core-js/modules/_cof.js");
3007// eslint-disable-next-line no-prototype-builtins
3008module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
3009 return cof(it) == 'String' ? it.split('') : Object(it);
3010};
3011
3012
3013/***/ }),
3014
3015/***/ "../node_modules/core-js/modules/_is-array-iter.js":
3016/*!*********************************************************!*\
3017 !*** ../node_modules/core-js/modules/_is-array-iter.js ***!
3018 \*********************************************************/
3019/*! no static exports found */
3020/***/ (function(module, exports, __webpack_require__) {
3021
3022// check on default Array iterator
3023var Iterators = __webpack_require__(/*! ./_iterators */ "../node_modules/core-js/modules/_iterators.js");
3024var ITERATOR = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('iterator');
3025var ArrayProto = Array.prototype;
3026
3027module.exports = function (it) {
3028 return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
3029};
3030
3031
3032/***/ }),
3033
3034/***/ "../node_modules/core-js/modules/_is-object.js":
3035/*!*****************************************************!*\
3036 !*** ../node_modules/core-js/modules/_is-object.js ***!
3037 \*****************************************************/
3038/*! no static exports found */
3039/***/ (function(module, exports) {
3040
3041module.exports = function (it) {
3042 return typeof it === 'object' ? it !== null : typeof it === 'function';
3043};
3044
3045
3046/***/ }),
3047
3048/***/ "../node_modules/core-js/modules/_iter-call.js":
3049/*!*****************************************************!*\
3050 !*** ../node_modules/core-js/modules/_iter-call.js ***!
3051 \*****************************************************/
3052/*! no static exports found */
3053/***/ (function(module, exports, __webpack_require__) {
3054
3055// call something on iterator step with safe closing on error
3056var anObject = __webpack_require__(/*! ./_an-object */ "../node_modules/core-js/modules/_an-object.js");
3057module.exports = function (iterator, fn, value, entries) {
3058 try {
3059 return entries ? fn(anObject(value)[0], value[1]) : fn(value);
3060 // 7.4.6 IteratorClose(iterator, completion)
3061 } catch (e) {
3062 var ret = iterator['return'];
3063 if (ret !== undefined) anObject(ret.call(iterator));
3064 throw e;
3065 }
3066};
3067
3068
3069/***/ }),
3070
3071/***/ "../node_modules/core-js/modules/_iter-create.js":
3072/*!*******************************************************!*\
3073 !*** ../node_modules/core-js/modules/_iter-create.js ***!
3074 \*******************************************************/
3075/*! no static exports found */
3076/***/ (function(module, exports, __webpack_require__) {
3077
3078"use strict";
3079
3080var create = __webpack_require__(/*! ./_object-create */ "../node_modules/core-js/modules/_object-create.js");
3081var descriptor = __webpack_require__(/*! ./_property-desc */ "../node_modules/core-js/modules/_property-desc.js");
3082var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "../node_modules/core-js/modules/_set-to-string-tag.js");
3083var IteratorPrototype = {};
3084
3085// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
3086__webpack_require__(/*! ./_hide */ "../node_modules/core-js/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('iterator'), function () { return this; });
3087
3088module.exports = function (Constructor, NAME, next) {
3089 Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
3090 setToStringTag(Constructor, NAME + ' Iterator');
3091};
3092
3093
3094/***/ }),
3095
3096/***/ "../node_modules/core-js/modules/_iter-define.js":
3097/*!*******************************************************!*\
3098 !*** ../node_modules/core-js/modules/_iter-define.js ***!
3099 \*******************************************************/
3100/*! no static exports found */
3101/***/ (function(module, exports, __webpack_require__) {
3102
3103"use strict";
3104
3105var LIBRARY = __webpack_require__(/*! ./_library */ "../node_modules/core-js/modules/_library.js");
3106var $export = __webpack_require__(/*! ./_export */ "../node_modules/core-js/modules/_export.js");
3107var redefine = __webpack_require__(/*! ./_redefine */ "../node_modules/core-js/modules/_redefine.js");
3108var hide = __webpack_require__(/*! ./_hide */ "../node_modules/core-js/modules/_hide.js");
3109var Iterators = __webpack_require__(/*! ./_iterators */ "../node_modules/core-js/modules/_iterators.js");
3110var $iterCreate = __webpack_require__(/*! ./_iter-create */ "../node_modules/core-js/modules/_iter-create.js");
3111var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "../node_modules/core-js/modules/_set-to-string-tag.js");
3112var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "../node_modules/core-js/modules/_object-gpo.js");
3113var ITERATOR = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('iterator');
3114var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
3115var FF_ITERATOR = '@@iterator';
3116var KEYS = 'keys';
3117var VALUES = 'values';
3118
3119var returnThis = function () { return this; };
3120
3121module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
3122 $iterCreate(Constructor, NAME, next);
3123 var getMethod = function (kind) {
3124 if (!BUGGY && kind in proto) return proto[kind];
3125 switch (kind) {
3126 case KEYS: return function keys() { return new Constructor(this, kind); };
3127 case VALUES: return function values() { return new Constructor(this, kind); };
3128 } return function entries() { return new Constructor(this, kind); };
3129 };
3130 var TAG = NAME + ' Iterator';
3131 var DEF_VALUES = DEFAULT == VALUES;
3132 var VALUES_BUG = false;
3133 var proto = Base.prototype;
3134 var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
3135 var $default = $native || getMethod(DEFAULT);
3136 var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
3137 var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
3138 var methods, key, IteratorPrototype;
3139 // Fix native
3140 if ($anyNative) {
3141 IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
3142 if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
3143 // Set @@toStringTag to native iterators
3144 setToStringTag(IteratorPrototype, TAG, true);
3145 // fix for some old engines
3146 if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
3147 }
3148 }
3149 // fix Array#{values, @@iterator}.name in V8 / FF
3150 if (DEF_VALUES && $native && $native.name !== VALUES) {
3151 VALUES_BUG = true;
3152 $default = function values() { return $native.call(this); };
3153 }
3154 // Define iterator
3155 if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
3156 hide(proto, ITERATOR, $default);
3157 }
3158 // Plug for library
3159 Iterators[NAME] = $default;
3160 Iterators[TAG] = returnThis;
3161 if (DEFAULT) {
3162 methods = {
3163 values: DEF_VALUES ? $default : getMethod(VALUES),
3164 keys: IS_SET ? $default : getMethod(KEYS),
3165 entries: $entries
3166 };
3167 if (FORCED) for (key in methods) {
3168 if (!(key in proto)) redefine(proto, key, methods[key]);
3169 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
3170 }
3171 return methods;
3172};
3173
3174
3175/***/ }),
3176
3177/***/ "../node_modules/core-js/modules/_iter-detect.js":
3178/*!*******************************************************!*\
3179 !*** ../node_modules/core-js/modules/_iter-detect.js ***!
3180 \*******************************************************/
3181/*! no static exports found */
3182/***/ (function(module, exports, __webpack_require__) {
3183
3184var ITERATOR = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('iterator');
3185var SAFE_CLOSING = false;
3186
3187try {
3188 var riter = [7][ITERATOR]();
3189 riter['return'] = function () { SAFE_CLOSING = true; };
3190 // eslint-disable-next-line no-throw-literal
3191 Array.from(riter, function () { throw 2; });
3192} catch (e) { /* empty */ }
3193
3194module.exports = function (exec, skipClosing) {
3195 if (!skipClosing && !SAFE_CLOSING) return false;
3196 var safe = false;
3197 try {
3198 var arr = [7];
3199 var iter = arr[ITERATOR]();
3200 iter.next = function () { return { done: safe = true }; };
3201 arr[ITERATOR] = function () { return iter; };
3202 exec(arr);
3203 } catch (e) { /* empty */ }
3204 return safe;
3205};
3206
3207
3208/***/ }),
3209
3210/***/ "../node_modules/core-js/modules/_iter-step.js":
3211/*!*****************************************************!*\
3212 !*** ../node_modules/core-js/modules/_iter-step.js ***!
3213 \*****************************************************/
3214/*! no static exports found */
3215/***/ (function(module, exports) {
3216
3217module.exports = function (done, value) {
3218 return { value: value, done: !!done };
3219};
3220
3221
3222/***/ }),
3223
3224/***/ "../node_modules/core-js/modules/_iterators.js":
3225/*!*****************************************************!*\
3226 !*** ../node_modules/core-js/modules/_iterators.js ***!
3227 \*****************************************************/
3228/*! no static exports found */
3229/***/ (function(module, exports) {
3230
3231module.exports = {};
3232
3233
3234/***/ }),
3235
3236/***/ "../node_modules/core-js/modules/_library.js":
3237/*!***************************************************!*\
3238 !*** ../node_modules/core-js/modules/_library.js ***!
3239 \***************************************************/
3240/*! no static exports found */
3241/***/ (function(module, exports) {
3242
3243module.exports = false;
3244
3245
3246/***/ }),
3247
3248/***/ "../node_modules/core-js/modules/_microtask.js":
3249/*!*****************************************************!*\
3250 !*** ../node_modules/core-js/modules/_microtask.js ***!
3251 \*****************************************************/
3252/*! no static exports found */
3253/***/ (function(module, exports, __webpack_require__) {
3254
3255var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
3256var macrotask = __webpack_require__(/*! ./_task */ "../node_modules/core-js/modules/_task.js").set;
3257var Observer = global.MutationObserver || global.WebKitMutationObserver;
3258var process = global.process;
3259var Promise = global.Promise;
3260var isNode = __webpack_require__(/*! ./_cof */ "../node_modules/core-js/modules/_cof.js")(process) == 'process';
3261
3262module.exports = function () {
3263 var head, last, notify;
3264
3265 var flush = function () {
3266 var parent, fn;
3267 if (isNode && (parent = process.domain)) parent.exit();
3268 while (head) {
3269 fn = head.fn;
3270 head = head.next;
3271 try {
3272 fn();
3273 } catch (e) {
3274 if (head) notify();
3275 else last = undefined;
3276 throw e;
3277 }
3278 } last = undefined;
3279 if (parent) parent.enter();
3280 };
3281
3282 // Node.js
3283 if (isNode) {
3284 notify = function () {
3285 process.nextTick(flush);
3286 };
3287 // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
3288 } else if (Observer && !(global.navigator && global.navigator.standalone)) {
3289 var toggle = true;
3290 var node = document.createTextNode('');
3291 new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
3292 notify = function () {
3293 node.data = toggle = !toggle;
3294 };
3295 // environments with maybe non-completely correct, but existent Promise
3296 } else if (Promise && Promise.resolve) {
3297 // Promise.resolve without an argument throws an error in LG WebOS 2
3298 var promise = Promise.resolve(undefined);
3299 notify = function () {
3300 promise.then(flush);
3301 };
3302 // for other environments - macrotask based on:
3303 // - setImmediate
3304 // - MessageChannel
3305 // - window.postMessag
3306 // - onreadystatechange
3307 // - setTimeout
3308 } else {
3309 notify = function () {
3310 // strange IE + webpack dev server bug - use .call(global)
3311 macrotask.call(global, flush);
3312 };
3313 }
3314
3315 return function (fn) {
3316 var task = { fn: fn, next: undefined };
3317 if (last) last.next = task;
3318 if (!head) {
3319 head = task;
3320 notify();
3321 } last = task;
3322 };
3323};
3324
3325
3326/***/ }),
3327
3328/***/ "../node_modules/core-js/modules/_new-promise-capability.js":
3329/*!******************************************************************!*\
3330 !*** ../node_modules/core-js/modules/_new-promise-capability.js ***!
3331 \******************************************************************/
3332/*! no static exports found */
3333/***/ (function(module, exports, __webpack_require__) {
3334
3335"use strict";
3336
3337// 25.4.1.5 NewPromiseCapability(C)
3338var aFunction = __webpack_require__(/*! ./_a-function */ "../node_modules/core-js/modules/_a-function.js");
3339
3340function PromiseCapability(C) {
3341 var resolve, reject;
3342 this.promise = new C(function ($$resolve, $$reject) {
3343 if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
3344 resolve = $$resolve;
3345 reject = $$reject;
3346 });
3347 this.resolve = aFunction(resolve);
3348 this.reject = aFunction(reject);
3349}
3350
3351module.exports.f = function (C) {
3352 return new PromiseCapability(C);
3353};
3354
3355
3356/***/ }),
3357
3358/***/ "../node_modules/core-js/modules/_object-assign.js":
3359/*!*********************************************************!*\
3360 !*** ../node_modules/core-js/modules/_object-assign.js ***!
3361 \*********************************************************/
3362/*! no static exports found */
3363/***/ (function(module, exports, __webpack_require__) {
3364
3365"use strict";
3366
3367// 19.1.2.1 Object.assign(target, source, ...)
3368var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../node_modules/core-js/modules/_descriptors.js");
3369var getKeys = __webpack_require__(/*! ./_object-keys */ "../node_modules/core-js/modules/_object-keys.js");
3370var gOPS = __webpack_require__(/*! ./_object-gops */ "../node_modules/core-js/modules/_object-gops.js");
3371var pIE = __webpack_require__(/*! ./_object-pie */ "../node_modules/core-js/modules/_object-pie.js");
3372var toObject = __webpack_require__(/*! ./_to-object */ "../node_modules/core-js/modules/_to-object.js");
3373var IObject = __webpack_require__(/*! ./_iobject */ "../node_modules/core-js/modules/_iobject.js");
3374var $assign = Object.assign;
3375
3376// should work with symbols and should have deterministic property order (V8 bug)
3377module.exports = !$assign || __webpack_require__(/*! ./_fails */ "../node_modules/core-js/modules/_fails.js")(function () {
3378 var A = {};
3379 var B = {};
3380 // eslint-disable-next-line no-undef
3381 var S = Symbol();
3382 var K = 'abcdefghijklmnopqrst';
3383 A[S] = 7;
3384 K.split('').forEach(function (k) { B[k] = k; });
3385 return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
3386}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
3387 var T = toObject(target);
3388 var aLen = arguments.length;
3389 var index = 1;
3390 var getSymbols = gOPS.f;
3391 var isEnum = pIE.f;
3392 while (aLen > index) {
3393 var S = IObject(arguments[index++]);
3394 var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
3395 var length = keys.length;
3396 var j = 0;
3397 var key;
3398 while (length > j) {
3399 key = keys[j++];
3400 if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
3401 }
3402 } return T;
3403} : $assign;
3404
3405
3406/***/ }),
3407
3408/***/ "../node_modules/core-js/modules/_object-create.js":
3409/*!*********************************************************!*\
3410 !*** ../node_modules/core-js/modules/_object-create.js ***!
3411 \*********************************************************/
3412/*! no static exports found */
3413/***/ (function(module, exports, __webpack_require__) {
3414
3415// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
3416var anObject = __webpack_require__(/*! ./_an-object */ "../node_modules/core-js/modules/_an-object.js");
3417var dPs = __webpack_require__(/*! ./_object-dps */ "../node_modules/core-js/modules/_object-dps.js");
3418var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "../node_modules/core-js/modules/_enum-bug-keys.js");
3419var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "../node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
3420var Empty = function () { /* empty */ };
3421var PROTOTYPE = 'prototype';
3422
3423// Create object with fake `null` prototype: use iframe Object with cleared prototype
3424var createDict = function () {
3425 // Thrash, waste and sodomy: IE GC bug
3426 var iframe = __webpack_require__(/*! ./_dom-create */ "../node_modules/core-js/modules/_dom-create.js")('iframe');
3427 var i = enumBugKeys.length;
3428 var lt = '<';
3429 var gt = '>';
3430 var iframeDocument;
3431 iframe.style.display = 'none';
3432 __webpack_require__(/*! ./_html */ "../node_modules/core-js/modules/_html.js").appendChild(iframe);
3433 iframe.src = 'javascript:'; // eslint-disable-line no-script-url
3434 // createDict = iframe.contentWindow.Object;
3435 // html.removeChild(iframe);
3436 iframeDocument = iframe.contentWindow.document;
3437 iframeDocument.open();
3438 iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
3439 iframeDocument.close();
3440 createDict = iframeDocument.F;
3441 while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
3442 return createDict();
3443};
3444
3445module.exports = Object.create || function create(O, Properties) {
3446 var result;
3447 if (O !== null) {
3448 Empty[PROTOTYPE] = anObject(O);
3449 result = new Empty();
3450 Empty[PROTOTYPE] = null;
3451 // add "__proto__" for Object.getPrototypeOf polyfill
3452 result[IE_PROTO] = O;
3453 } else result = createDict();
3454 return Properties === undefined ? result : dPs(result, Properties);
3455};
3456
3457
3458/***/ }),
3459
3460/***/ "../node_modules/core-js/modules/_object-dp.js":
3461/*!*****************************************************!*\
3462 !*** ../node_modules/core-js/modules/_object-dp.js ***!
3463 \*****************************************************/
3464/*! no static exports found */
3465/***/ (function(module, exports, __webpack_require__) {
3466
3467var anObject = __webpack_require__(/*! ./_an-object */ "../node_modules/core-js/modules/_an-object.js");
3468var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "../node_modules/core-js/modules/_ie8-dom-define.js");
3469var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../node_modules/core-js/modules/_to-primitive.js");
3470var dP = Object.defineProperty;
3471
3472exports.f = __webpack_require__(/*! ./_descriptors */ "../node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
3473 anObject(O);
3474 P = toPrimitive(P, true);
3475 anObject(Attributes);
3476 if (IE8_DOM_DEFINE) try {
3477 return dP(O, P, Attributes);
3478 } catch (e) { /* empty */ }
3479 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
3480 if ('value' in Attributes) O[P] = Attributes.value;
3481 return O;
3482};
3483
3484
3485/***/ }),
3486
3487/***/ "../node_modules/core-js/modules/_object-dps.js":
3488/*!******************************************************!*\
3489 !*** ../node_modules/core-js/modules/_object-dps.js ***!
3490 \******************************************************/
3491/*! no static exports found */
3492/***/ (function(module, exports, __webpack_require__) {
3493
3494var dP = __webpack_require__(/*! ./_object-dp */ "../node_modules/core-js/modules/_object-dp.js");
3495var anObject = __webpack_require__(/*! ./_an-object */ "../node_modules/core-js/modules/_an-object.js");
3496var getKeys = __webpack_require__(/*! ./_object-keys */ "../node_modules/core-js/modules/_object-keys.js");
3497
3498module.exports = __webpack_require__(/*! ./_descriptors */ "../node_modules/core-js/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) {
3499 anObject(O);
3500 var keys = getKeys(Properties);
3501 var length = keys.length;
3502 var i = 0;
3503 var P;
3504 while (length > i) dP.f(O, P = keys[i++], Properties[P]);
3505 return O;
3506};
3507
3508
3509/***/ }),
3510
3511/***/ "../node_modules/core-js/modules/_object-gops.js":
3512/*!*******************************************************!*\
3513 !*** ../node_modules/core-js/modules/_object-gops.js ***!
3514 \*******************************************************/
3515/*! no static exports found */
3516/***/ (function(module, exports) {
3517
3518exports.f = Object.getOwnPropertySymbols;
3519
3520
3521/***/ }),
3522
3523/***/ "../node_modules/core-js/modules/_object-gpo.js":
3524/*!******************************************************!*\
3525 !*** ../node_modules/core-js/modules/_object-gpo.js ***!
3526 \******************************************************/
3527/*! no static exports found */
3528/***/ (function(module, exports, __webpack_require__) {
3529
3530// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
3531var has = __webpack_require__(/*! ./_has */ "../node_modules/core-js/modules/_has.js");
3532var toObject = __webpack_require__(/*! ./_to-object */ "../node_modules/core-js/modules/_to-object.js");
3533var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "../node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
3534var ObjectProto = Object.prototype;
3535
3536module.exports = Object.getPrototypeOf || function (O) {
3537 O = toObject(O);
3538 if (has(O, IE_PROTO)) return O[IE_PROTO];
3539 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
3540 return O.constructor.prototype;
3541 } return O instanceof Object ? ObjectProto : null;
3542};
3543
3544
3545/***/ }),
3546
3547/***/ "../node_modules/core-js/modules/_object-keys-internal.js":
3548/*!****************************************************************!*\
3549 !*** ../node_modules/core-js/modules/_object-keys-internal.js ***!
3550 \****************************************************************/
3551/*! no static exports found */
3552/***/ (function(module, exports, __webpack_require__) {
3553
3554var has = __webpack_require__(/*! ./_has */ "../node_modules/core-js/modules/_has.js");
3555var toIObject = __webpack_require__(/*! ./_to-iobject */ "../node_modules/core-js/modules/_to-iobject.js");
3556var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "../node_modules/core-js/modules/_array-includes.js")(false);
3557var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "../node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
3558
3559module.exports = function (object, names) {
3560 var O = toIObject(object);
3561 var i = 0;
3562 var result = [];
3563 var key;
3564 for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
3565 // Don't enum bug & hidden keys
3566 while (names.length > i) if (has(O, key = names[i++])) {
3567 ~arrayIndexOf(result, key) || result.push(key);
3568 }
3569 return result;
3570};
3571
3572
3573/***/ }),
3574
3575/***/ "../node_modules/core-js/modules/_object-keys.js":
3576/*!*******************************************************!*\
3577 !*** ../node_modules/core-js/modules/_object-keys.js ***!
3578 \*******************************************************/
3579/*! no static exports found */
3580/***/ (function(module, exports, __webpack_require__) {
3581
3582// 19.1.2.14 / 15.2.3.14 Object.keys(O)
3583var $keys = __webpack_require__(/*! ./_object-keys-internal */ "../node_modules/core-js/modules/_object-keys-internal.js");
3584var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "../node_modules/core-js/modules/_enum-bug-keys.js");
3585
3586module.exports = Object.keys || function keys(O) {
3587 return $keys(O, enumBugKeys);
3588};
3589
3590
3591/***/ }),
3592
3593/***/ "../node_modules/core-js/modules/_object-pie.js":
3594/*!******************************************************!*\
3595 !*** ../node_modules/core-js/modules/_object-pie.js ***!
3596 \******************************************************/
3597/*! no static exports found */
3598/***/ (function(module, exports) {
3599
3600exports.f = {}.propertyIsEnumerable;
3601
3602
3603/***/ }),
3604
3605/***/ "../node_modules/core-js/modules/_perform.js":
3606/*!***************************************************!*\
3607 !*** ../node_modules/core-js/modules/_perform.js ***!
3608 \***************************************************/
3609/*! no static exports found */
3610/***/ (function(module, exports) {
3611
3612module.exports = function (exec) {
3613 try {
3614 return { e: false, v: exec() };
3615 } catch (e) {
3616 return { e: true, v: e };
3617 }
3618};
3619
3620
3621/***/ }),
3622
3623/***/ "../node_modules/core-js/modules/_promise-resolve.js":
3624/*!***********************************************************!*\
3625 !*** ../node_modules/core-js/modules/_promise-resolve.js ***!
3626 \***********************************************************/
3627/*! no static exports found */
3628/***/ (function(module, exports, __webpack_require__) {
3629
3630var anObject = __webpack_require__(/*! ./_an-object */ "../node_modules/core-js/modules/_an-object.js");
3631var isObject = __webpack_require__(/*! ./_is-object */ "../node_modules/core-js/modules/_is-object.js");
3632var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "../node_modules/core-js/modules/_new-promise-capability.js");
3633
3634module.exports = function (C, x) {
3635 anObject(C);
3636 if (isObject(x) && x.constructor === C) return x;
3637 var promiseCapability = newPromiseCapability.f(C);
3638 var resolve = promiseCapability.resolve;
3639 resolve(x);
3640 return promiseCapability.promise;
3641};
3642
3643
3644/***/ }),
3645
3646/***/ "../node_modules/core-js/modules/_property-desc.js":
3647/*!*********************************************************!*\
3648 !*** ../node_modules/core-js/modules/_property-desc.js ***!
3649 \*********************************************************/
3650/*! no static exports found */
3651/***/ (function(module, exports) {
3652
3653module.exports = function (bitmap, value) {
3654 return {
3655 enumerable: !(bitmap & 1),
3656 configurable: !(bitmap & 2),
3657 writable: !(bitmap & 4),
3658 value: value
3659 };
3660};
3661
3662
3663/***/ }),
3664
3665/***/ "../node_modules/core-js/modules/_redefine-all.js":
3666/*!********************************************************!*\
3667 !*** ../node_modules/core-js/modules/_redefine-all.js ***!
3668 \********************************************************/
3669/*! no static exports found */
3670/***/ (function(module, exports, __webpack_require__) {
3671
3672var redefine = __webpack_require__(/*! ./_redefine */ "../node_modules/core-js/modules/_redefine.js");
3673module.exports = function (target, src, safe) {
3674 for (var key in src) redefine(target, key, src[key], safe);
3675 return target;
3676};
3677
3678
3679/***/ }),
3680
3681/***/ "../node_modules/core-js/modules/_redefine.js":
3682/*!****************************************************!*\
3683 !*** ../node_modules/core-js/modules/_redefine.js ***!
3684 \****************************************************/
3685/*! no static exports found */
3686/***/ (function(module, exports, __webpack_require__) {
3687
3688var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
3689var hide = __webpack_require__(/*! ./_hide */ "../node_modules/core-js/modules/_hide.js");
3690var has = __webpack_require__(/*! ./_has */ "../node_modules/core-js/modules/_has.js");
3691var SRC = __webpack_require__(/*! ./_uid */ "../node_modules/core-js/modules/_uid.js")('src');
3692var $toString = __webpack_require__(/*! ./_function-to-string */ "../node_modules/core-js/modules/_function-to-string.js");
3693var TO_STRING = 'toString';
3694var TPL = ('' + $toString).split(TO_STRING);
3695
3696__webpack_require__(/*! ./_core */ "../node_modules/core-js/modules/_core.js").inspectSource = function (it) {
3697 return $toString.call(it);
3698};
3699
3700(module.exports = function (O, key, val, safe) {
3701 var isFunction = typeof val == 'function';
3702 if (isFunction) has(val, 'name') || hide(val, 'name', key);
3703 if (O[key] === val) return;
3704 if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
3705 if (O === global) {
3706 O[key] = val;
3707 } else if (!safe) {
3708 delete O[key];
3709 hide(O, key, val);
3710 } else if (O[key]) {
3711 O[key] = val;
3712 } else {
3713 hide(O, key, val);
3714 }
3715// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
3716})(Function.prototype, TO_STRING, function toString() {
3717 return typeof this == 'function' && this[SRC] || $toString.call(this);
3718});
3719
3720
3721/***/ }),
3722
3723/***/ "../node_modules/core-js/modules/_set-species.js":
3724/*!*******************************************************!*\
3725 !*** ../node_modules/core-js/modules/_set-species.js ***!
3726 \*******************************************************/
3727/*! no static exports found */
3728/***/ (function(module, exports, __webpack_require__) {
3729
3730"use strict";
3731
3732var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
3733var dP = __webpack_require__(/*! ./_object-dp */ "../node_modules/core-js/modules/_object-dp.js");
3734var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../node_modules/core-js/modules/_descriptors.js");
3735var SPECIES = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('species');
3736
3737module.exports = function (KEY) {
3738 var C = global[KEY];
3739 if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
3740 configurable: true,
3741 get: function () { return this; }
3742 });
3743};
3744
3745
3746/***/ }),
3747
3748/***/ "../node_modules/core-js/modules/_set-to-string-tag.js":
3749/*!*************************************************************!*\
3750 !*** ../node_modules/core-js/modules/_set-to-string-tag.js ***!
3751 \*************************************************************/
3752/*! no static exports found */
3753/***/ (function(module, exports, __webpack_require__) {
3754
3755var def = __webpack_require__(/*! ./_object-dp */ "../node_modules/core-js/modules/_object-dp.js").f;
3756var has = __webpack_require__(/*! ./_has */ "../node_modules/core-js/modules/_has.js");
3757var TAG = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('toStringTag');
3758
3759module.exports = function (it, tag, stat) {
3760 if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
3761};
3762
3763
3764/***/ }),
3765
3766/***/ "../node_modules/core-js/modules/_shared-key.js":
3767/*!******************************************************!*\
3768 !*** ../node_modules/core-js/modules/_shared-key.js ***!
3769 \******************************************************/
3770/*! no static exports found */
3771/***/ (function(module, exports, __webpack_require__) {
3772
3773var shared = __webpack_require__(/*! ./_shared */ "../node_modules/core-js/modules/_shared.js")('keys');
3774var uid = __webpack_require__(/*! ./_uid */ "../node_modules/core-js/modules/_uid.js");
3775module.exports = function (key) {
3776 return shared[key] || (shared[key] = uid(key));
3777};
3778
3779
3780/***/ }),
3781
3782/***/ "../node_modules/core-js/modules/_shared.js":
3783/*!**************************************************!*\
3784 !*** ../node_modules/core-js/modules/_shared.js ***!
3785 \**************************************************/
3786/*! no static exports found */
3787/***/ (function(module, exports, __webpack_require__) {
3788
3789var core = __webpack_require__(/*! ./_core */ "../node_modules/core-js/modules/_core.js");
3790var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
3791var SHARED = '__core-js_shared__';
3792var store = global[SHARED] || (global[SHARED] = {});
3793
3794(module.exports = function (key, value) {
3795 return store[key] || (store[key] = value !== undefined ? value : {});
3796})('versions', []).push({
3797 version: core.version,
3798 mode: __webpack_require__(/*! ./_library */ "../node_modules/core-js/modules/_library.js") ? 'pure' : 'global',
3799 copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
3800});
3801
3802
3803/***/ }),
3804
3805/***/ "../node_modules/core-js/modules/_species-constructor.js":
3806/*!***************************************************************!*\
3807 !*** ../node_modules/core-js/modules/_species-constructor.js ***!
3808 \***************************************************************/
3809/*! no static exports found */
3810/***/ (function(module, exports, __webpack_require__) {
3811
3812// 7.3.20 SpeciesConstructor(O, defaultConstructor)
3813var anObject = __webpack_require__(/*! ./_an-object */ "../node_modules/core-js/modules/_an-object.js");
3814var aFunction = __webpack_require__(/*! ./_a-function */ "../node_modules/core-js/modules/_a-function.js");
3815var SPECIES = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('species');
3816module.exports = function (O, D) {
3817 var C = anObject(O).constructor;
3818 var S;
3819 return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
3820};
3821
3822
3823/***/ }),
3824
3825/***/ "../node_modules/core-js/modules/_string-at.js":
3826/*!*****************************************************!*\
3827 !*** ../node_modules/core-js/modules/_string-at.js ***!
3828 \*****************************************************/
3829/*! no static exports found */
3830/***/ (function(module, exports, __webpack_require__) {
3831
3832var toInteger = __webpack_require__(/*! ./_to-integer */ "../node_modules/core-js/modules/_to-integer.js");
3833var defined = __webpack_require__(/*! ./_defined */ "../node_modules/core-js/modules/_defined.js");
3834// true -> String#at
3835// false -> String#codePointAt
3836module.exports = function (TO_STRING) {
3837 return function (that, pos) {
3838 var s = String(defined(that));
3839 var i = toInteger(pos);
3840 var l = s.length;
3841 var a, b;
3842 if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
3843 a = s.charCodeAt(i);
3844 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
3845 ? TO_STRING ? s.charAt(i) : a
3846 : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
3847 };
3848};
3849
3850
3851/***/ }),
3852
3853/***/ "../node_modules/core-js/modules/_task.js":
3854/*!************************************************!*\
3855 !*** ../node_modules/core-js/modules/_task.js ***!
3856 \************************************************/
3857/*! no static exports found */
3858/***/ (function(module, exports, __webpack_require__) {
3859
3860var ctx = __webpack_require__(/*! ./_ctx */ "../node_modules/core-js/modules/_ctx.js");
3861var invoke = __webpack_require__(/*! ./_invoke */ "../node_modules/core-js/modules/_invoke.js");
3862var html = __webpack_require__(/*! ./_html */ "../node_modules/core-js/modules/_html.js");
3863var cel = __webpack_require__(/*! ./_dom-create */ "../node_modules/core-js/modules/_dom-create.js");
3864var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
3865var process = global.process;
3866var setTask = global.setImmediate;
3867var clearTask = global.clearImmediate;
3868var MessageChannel = global.MessageChannel;
3869var Dispatch = global.Dispatch;
3870var counter = 0;
3871var queue = {};
3872var ONREADYSTATECHANGE = 'onreadystatechange';
3873var defer, channel, port;
3874var run = function () {
3875 var id = +this;
3876 // eslint-disable-next-line no-prototype-builtins
3877 if (queue.hasOwnProperty(id)) {
3878 var fn = queue[id];
3879 delete queue[id];
3880 fn();
3881 }
3882};
3883var listener = function (event) {
3884 run.call(event.data);
3885};
3886// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
3887if (!setTask || !clearTask) {
3888 setTask = function setImmediate(fn) {
3889 var args = [];
3890 var i = 1;
3891 while (arguments.length > i) args.push(arguments[i++]);
3892 queue[++counter] = function () {
3893 // eslint-disable-next-line no-new-func
3894 invoke(typeof fn == 'function' ? fn : Function(fn), args);
3895 };
3896 defer(counter);
3897 return counter;
3898 };
3899 clearTask = function clearImmediate(id) {
3900 delete queue[id];
3901 };
3902 // Node.js 0.8-
3903 if (__webpack_require__(/*! ./_cof */ "../node_modules/core-js/modules/_cof.js")(process) == 'process') {
3904 defer = function (id) {
3905 process.nextTick(ctx(run, id, 1));
3906 };
3907 // Sphere (JS game engine) Dispatch API
3908 } else if (Dispatch && Dispatch.now) {
3909 defer = function (id) {
3910 Dispatch.now(ctx(run, id, 1));
3911 };
3912 // Browsers with MessageChannel, includes WebWorkers
3913 } else if (MessageChannel) {
3914 channel = new MessageChannel();
3915 port = channel.port2;
3916 channel.port1.onmessage = listener;
3917 defer = ctx(port.postMessage, port, 1);
3918 // Browsers with postMessage, skip WebWorkers
3919 // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
3920 } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
3921 defer = function (id) {
3922 global.postMessage(id + '', '*');
3923 };
3924 global.addEventListener('message', listener, false);
3925 // IE8-
3926 } else if (ONREADYSTATECHANGE in cel('script')) {
3927 defer = function (id) {
3928 html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
3929 html.removeChild(this);
3930 run.call(id);
3931 };
3932 };
3933 // Rest old browsers
3934 } else {
3935 defer = function (id) {
3936 setTimeout(ctx(run, id, 1), 0);
3937 };
3938 }
3939}
3940module.exports = {
3941 set: setTask,
3942 clear: clearTask
3943};
3944
3945
3946/***/ }),
3947
3948/***/ "../node_modules/core-js/modules/_to-absolute-index.js":
3949/*!*************************************************************!*\
3950 !*** ../node_modules/core-js/modules/_to-absolute-index.js ***!
3951 \*************************************************************/
3952/*! no static exports found */
3953/***/ (function(module, exports, __webpack_require__) {
3954
3955var toInteger = __webpack_require__(/*! ./_to-integer */ "../node_modules/core-js/modules/_to-integer.js");
3956var max = Math.max;
3957var min = Math.min;
3958module.exports = function (index, length) {
3959 index = toInteger(index);
3960 return index < 0 ? max(index + length, 0) : min(index, length);
3961};
3962
3963
3964/***/ }),
3965
3966/***/ "../node_modules/core-js/modules/_to-integer.js":
3967/*!******************************************************!*\
3968 !*** ../node_modules/core-js/modules/_to-integer.js ***!
3969 \******************************************************/
3970/*! no static exports found */
3971/***/ (function(module, exports) {
3972
3973// 7.1.4 ToInteger
3974var ceil = Math.ceil;
3975var floor = Math.floor;
3976module.exports = function (it) {
3977 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
3978};
3979
3980
3981/***/ }),
3982
3983/***/ "../node_modules/core-js/modules/_to-iobject.js":
3984/*!******************************************************!*\
3985 !*** ../node_modules/core-js/modules/_to-iobject.js ***!
3986 \******************************************************/
3987/*! no static exports found */
3988/***/ (function(module, exports, __webpack_require__) {
3989
3990// to indexed object, toObject with fallback for non-array-like ES3 strings
3991var IObject = __webpack_require__(/*! ./_iobject */ "../node_modules/core-js/modules/_iobject.js");
3992var defined = __webpack_require__(/*! ./_defined */ "../node_modules/core-js/modules/_defined.js");
3993module.exports = function (it) {
3994 return IObject(defined(it));
3995};
3996
3997
3998/***/ }),
3999
4000/***/ "../node_modules/core-js/modules/_to-length.js":
4001/*!*****************************************************!*\
4002 !*** ../node_modules/core-js/modules/_to-length.js ***!
4003 \*****************************************************/
4004/*! no static exports found */
4005/***/ (function(module, exports, __webpack_require__) {
4006
4007// 7.1.15 ToLength
4008var toInteger = __webpack_require__(/*! ./_to-integer */ "../node_modules/core-js/modules/_to-integer.js");
4009var min = Math.min;
4010module.exports = function (it) {
4011 return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
4012};
4013
4014
4015/***/ }),
4016
4017/***/ "../node_modules/core-js/modules/_to-object.js":
4018/*!*****************************************************!*\
4019 !*** ../node_modules/core-js/modules/_to-object.js ***!
4020 \*****************************************************/
4021/*! no static exports found */
4022/***/ (function(module, exports, __webpack_require__) {
4023
4024// 7.1.13 ToObject(argument)
4025var defined = __webpack_require__(/*! ./_defined */ "../node_modules/core-js/modules/_defined.js");
4026module.exports = function (it) {
4027 return Object(defined(it));
4028};
4029
4030
4031/***/ }),
4032
4033/***/ "../node_modules/core-js/modules/_to-primitive.js":
4034/*!********************************************************!*\
4035 !*** ../node_modules/core-js/modules/_to-primitive.js ***!
4036 \********************************************************/
4037/*! no static exports found */
4038/***/ (function(module, exports, __webpack_require__) {
4039
4040// 7.1.1 ToPrimitive(input [, PreferredType])
4041var isObject = __webpack_require__(/*! ./_is-object */ "../node_modules/core-js/modules/_is-object.js");
4042// instead of the ES6 spec version, we didn't implement @@toPrimitive case
4043// and the second argument - flag - preferred type is a string
4044module.exports = function (it, S) {
4045 if (!isObject(it)) return it;
4046 var fn, val;
4047 if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
4048 if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
4049 if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
4050 throw TypeError("Can't convert object to primitive value");
4051};
4052
4053
4054/***/ }),
4055
4056/***/ "../node_modules/core-js/modules/_uid.js":
4057/*!***********************************************!*\
4058 !*** ../node_modules/core-js/modules/_uid.js ***!
4059 \***********************************************/
4060/*! no static exports found */
4061/***/ (function(module, exports) {
4062
4063var id = 0;
4064var px = Math.random();
4065module.exports = function (key) {
4066 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
4067};
4068
4069
4070/***/ }),
4071
4072/***/ "../node_modules/core-js/modules/_user-agent.js":
4073/*!******************************************************!*\
4074 !*** ../node_modules/core-js/modules/_user-agent.js ***!
4075 \******************************************************/
4076/*! no static exports found */
4077/***/ (function(module, exports, __webpack_require__) {
4078
4079var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
4080var navigator = global.navigator;
4081
4082module.exports = navigator && navigator.userAgent || '';
4083
4084
4085/***/ }),
4086
4087/***/ "../node_modules/core-js/modules/_wks.js":
4088/*!***********************************************!*\
4089 !*** ../node_modules/core-js/modules/_wks.js ***!
4090 \***********************************************/
4091/*! no static exports found */
4092/***/ (function(module, exports, __webpack_require__) {
4093
4094var store = __webpack_require__(/*! ./_shared */ "../node_modules/core-js/modules/_shared.js")('wks');
4095var uid = __webpack_require__(/*! ./_uid */ "../node_modules/core-js/modules/_uid.js");
4096var Symbol = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js").Symbol;
4097var USE_SYMBOL = typeof Symbol == 'function';
4098
4099var $exports = module.exports = function (name) {
4100 return store[name] || (store[name] =
4101 USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
4102};
4103
4104$exports.store = store;
4105
4106
4107/***/ }),
4108
4109/***/ "../node_modules/core-js/modules/core.get-iterator-method.js":
4110/*!*******************************************************************!*\
4111 !*** ../node_modules/core-js/modules/core.get-iterator-method.js ***!
4112 \*******************************************************************/
4113/*! no static exports found */
4114/***/ (function(module, exports, __webpack_require__) {
4115
4116var classof = __webpack_require__(/*! ./_classof */ "../node_modules/core-js/modules/_classof.js");
4117var ITERATOR = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('iterator');
4118var Iterators = __webpack_require__(/*! ./_iterators */ "../node_modules/core-js/modules/_iterators.js");
4119module.exports = __webpack_require__(/*! ./_core */ "../node_modules/core-js/modules/_core.js").getIteratorMethod = function (it) {
4120 if (it != undefined) return it[ITERATOR]
4121 || it['@@iterator']
4122 || Iterators[classof(it)];
4123};
4124
4125
4126/***/ }),
4127
4128/***/ "../node_modules/core-js/modules/es6.array.from.js":
4129/*!*********************************************************!*\
4130 !*** ../node_modules/core-js/modules/es6.array.from.js ***!
4131 \*********************************************************/
4132/*! no static exports found */
4133/***/ (function(module, exports, __webpack_require__) {
4134
4135"use strict";
4136
4137var ctx = __webpack_require__(/*! ./_ctx */ "../node_modules/core-js/modules/_ctx.js");
4138var $export = __webpack_require__(/*! ./_export */ "../node_modules/core-js/modules/_export.js");
4139var toObject = __webpack_require__(/*! ./_to-object */ "../node_modules/core-js/modules/_to-object.js");
4140var call = __webpack_require__(/*! ./_iter-call */ "../node_modules/core-js/modules/_iter-call.js");
4141var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "../node_modules/core-js/modules/_is-array-iter.js");
4142var toLength = __webpack_require__(/*! ./_to-length */ "../node_modules/core-js/modules/_to-length.js");
4143var createProperty = __webpack_require__(/*! ./_create-property */ "../node_modules/core-js/modules/_create-property.js");
4144var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "../node_modules/core-js/modules/core.get-iterator-method.js");
4145
4146$export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ "../node_modules/core-js/modules/_iter-detect.js")(function (iter) { Array.from(iter); }), 'Array', {
4147 // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
4148 from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
4149 var O = toObject(arrayLike);
4150 var C = typeof this == 'function' ? this : Array;
4151 var aLen = arguments.length;
4152 var mapfn = aLen > 1 ? arguments[1] : undefined;
4153 var mapping = mapfn !== undefined;
4154 var index = 0;
4155 var iterFn = getIterFn(O);
4156 var length, result, step, iterator;
4157 if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
4158 // if object isn't iterable or it's array with default iterator - use simple case
4159 if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
4160 for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
4161 createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
4162 }
4163 } else {
4164 length = toLength(O.length);
4165 for (result = new C(length); length > index; index++) {
4166 createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
4167 }
4168 }
4169 result.length = index;
4170 return result;
4171 }
4172});
4173
4174
4175/***/ }),
4176
4177/***/ "../node_modules/core-js/modules/es6.array.iterator.js":
4178/*!*************************************************************!*\
4179 !*** ../node_modules/core-js/modules/es6.array.iterator.js ***!
4180 \*************************************************************/
4181/*! no static exports found */
4182/***/ (function(module, exports, __webpack_require__) {
4183
4184"use strict";
4185
4186var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "../node_modules/core-js/modules/_add-to-unscopables.js");
4187var step = __webpack_require__(/*! ./_iter-step */ "../node_modules/core-js/modules/_iter-step.js");
4188var Iterators = __webpack_require__(/*! ./_iterators */ "../node_modules/core-js/modules/_iterators.js");
4189var toIObject = __webpack_require__(/*! ./_to-iobject */ "../node_modules/core-js/modules/_to-iobject.js");
4190
4191// 22.1.3.4 Array.prototype.entries()
4192// 22.1.3.13 Array.prototype.keys()
4193// 22.1.3.29 Array.prototype.values()
4194// 22.1.3.30 Array.prototype[@@iterator]()
4195module.exports = __webpack_require__(/*! ./_iter-define */ "../node_modules/core-js/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) {
4196 this._t = toIObject(iterated); // target
4197 this._i = 0; // next index
4198 this._k = kind; // kind
4199// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
4200}, function () {
4201 var O = this._t;
4202 var kind = this._k;
4203 var index = this._i++;
4204 if (!O || index >= O.length) {
4205 this._t = undefined;
4206 return step(1);
4207 }
4208 if (kind == 'keys') return step(0, index);
4209 if (kind == 'values') return step(0, O[index]);
4210 return step(0, [index, O[index]]);
4211}, 'values');
4212
4213// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
4214Iterators.Arguments = Iterators.Array;
4215
4216addToUnscopables('keys');
4217addToUnscopables('values');
4218addToUnscopables('entries');
4219
4220
4221/***/ }),
4222
4223/***/ "../node_modules/core-js/modules/es6.object.assign.js":
4224/*!************************************************************!*\
4225 !*** ../node_modules/core-js/modules/es6.object.assign.js ***!
4226 \************************************************************/
4227/*! no static exports found */
4228/***/ (function(module, exports, __webpack_require__) {
4229
4230// 19.1.3.1 Object.assign(target, source)
4231var $export = __webpack_require__(/*! ./_export */ "../node_modules/core-js/modules/_export.js");
4232
4233$export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "../node_modules/core-js/modules/_object-assign.js") });
4234
4235
4236/***/ }),
4237
4238/***/ "../node_modules/core-js/modules/es6.object.to-string.js":
4239/*!***************************************************************!*\
4240 !*** ../node_modules/core-js/modules/es6.object.to-string.js ***!
4241 \***************************************************************/
4242/*! no static exports found */
4243/***/ (function(module, exports, __webpack_require__) {
4244
4245"use strict";
4246
4247// 19.1.3.6 Object.prototype.toString()
4248var classof = __webpack_require__(/*! ./_classof */ "../node_modules/core-js/modules/_classof.js");
4249var test = {};
4250test[__webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('toStringTag')] = 'z';
4251if (test + '' != '[object z]') {
4252 __webpack_require__(/*! ./_redefine */ "../node_modules/core-js/modules/_redefine.js")(Object.prototype, 'toString', function toString() {
4253 return '[object ' + classof(this) + ']';
4254 }, true);
4255}
4256
4257
4258/***/ }),
4259
4260/***/ "../node_modules/core-js/modules/es6.promise.js":
4261/*!******************************************************!*\
4262 !*** ../node_modules/core-js/modules/es6.promise.js ***!
4263 \******************************************************/
4264/*! no static exports found */
4265/***/ (function(module, exports, __webpack_require__) {
4266
4267"use strict";
4268
4269var LIBRARY = __webpack_require__(/*! ./_library */ "../node_modules/core-js/modules/_library.js");
4270var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
4271var ctx = __webpack_require__(/*! ./_ctx */ "../node_modules/core-js/modules/_ctx.js");
4272var classof = __webpack_require__(/*! ./_classof */ "../node_modules/core-js/modules/_classof.js");
4273var $export = __webpack_require__(/*! ./_export */ "../node_modules/core-js/modules/_export.js");
4274var isObject = __webpack_require__(/*! ./_is-object */ "../node_modules/core-js/modules/_is-object.js");
4275var aFunction = __webpack_require__(/*! ./_a-function */ "../node_modules/core-js/modules/_a-function.js");
4276var anInstance = __webpack_require__(/*! ./_an-instance */ "../node_modules/core-js/modules/_an-instance.js");
4277var forOf = __webpack_require__(/*! ./_for-of */ "../node_modules/core-js/modules/_for-of.js");
4278var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "../node_modules/core-js/modules/_species-constructor.js");
4279var task = __webpack_require__(/*! ./_task */ "../node_modules/core-js/modules/_task.js").set;
4280var microtask = __webpack_require__(/*! ./_microtask */ "../node_modules/core-js/modules/_microtask.js")();
4281var newPromiseCapabilityModule = __webpack_require__(/*! ./_new-promise-capability */ "../node_modules/core-js/modules/_new-promise-capability.js");
4282var perform = __webpack_require__(/*! ./_perform */ "../node_modules/core-js/modules/_perform.js");
4283var userAgent = __webpack_require__(/*! ./_user-agent */ "../node_modules/core-js/modules/_user-agent.js");
4284var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "../node_modules/core-js/modules/_promise-resolve.js");
4285var PROMISE = 'Promise';
4286var TypeError = global.TypeError;
4287var process = global.process;
4288var versions = process && process.versions;
4289var v8 = versions && versions.v8 || '';
4290var $Promise = global[PROMISE];
4291var isNode = classof(process) == 'process';
4292var empty = function () { /* empty */ };
4293var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
4294var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
4295
4296var USE_NATIVE = !!function () {
4297 try {
4298 // correct subclassing with @@species support
4299 var promise = $Promise.resolve(1);
4300 var FakePromise = (promise.constructor = {})[__webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js")('species')] = function (exec) {
4301 exec(empty, empty);
4302 };
4303 // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
4304 return (isNode || typeof PromiseRejectionEvent == 'function')
4305 && promise.then(empty) instanceof FakePromise
4306 // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
4307 // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
4308 // we can't detect it synchronously, so just check versions
4309 && v8.indexOf('6.6') !== 0
4310 && userAgent.indexOf('Chrome/66') === -1;
4311 } catch (e) { /* empty */ }
4312}();
4313
4314// helpers
4315var isThenable = function (it) {
4316 var then;
4317 return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
4318};
4319var notify = function (promise, isReject) {
4320 if (promise._n) return;
4321 promise._n = true;
4322 var chain = promise._c;
4323 microtask(function () {
4324 var value = promise._v;
4325 var ok = promise._s == 1;
4326 var i = 0;
4327 var run = function (reaction) {
4328 var handler = ok ? reaction.ok : reaction.fail;
4329 var resolve = reaction.resolve;
4330 var reject = reaction.reject;
4331 var domain = reaction.domain;
4332 var result, then, exited;
4333 try {
4334 if (handler) {
4335 if (!ok) {
4336 if (promise._h == 2) onHandleUnhandled(promise);
4337 promise._h = 1;
4338 }
4339 if (handler === true) result = value;
4340 else {
4341 if (domain) domain.enter();
4342 result = handler(value); // may throw
4343 if (domain) {
4344 domain.exit();
4345 exited = true;
4346 }
4347 }
4348 if (result === reaction.promise) {
4349 reject(TypeError('Promise-chain cycle'));
4350 } else if (then = isThenable(result)) {
4351 then.call(result, resolve, reject);
4352 } else resolve(result);
4353 } else reject(value);
4354 } catch (e) {
4355 if (domain && !exited) domain.exit();
4356 reject(e);
4357 }
4358 };
4359 while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
4360 promise._c = [];
4361 promise._n = false;
4362 if (isReject && !promise._h) onUnhandled(promise);
4363 });
4364};
4365var onUnhandled = function (promise) {
4366 task.call(global, function () {
4367 var value = promise._v;
4368 var unhandled = isUnhandled(promise);
4369 var result, handler, console;
4370 if (unhandled) {
4371 result = perform(function () {
4372 if (isNode) {
4373 process.emit('unhandledRejection', value, promise);
4374 } else if (handler = global.onunhandledrejection) {
4375 handler({ promise: promise, reason: value });
4376 } else if ((console = global.console) && console.error) {
4377 console.error('Unhandled promise rejection', value);
4378 }
4379 });
4380 // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
4381 promise._h = isNode || isUnhandled(promise) ? 2 : 1;
4382 } promise._a = undefined;
4383 if (unhandled && result.e) throw result.v;
4384 });
4385};
4386var isUnhandled = function (promise) {
4387 return promise._h !== 1 && (promise._a || promise._c).length === 0;
4388};
4389var onHandleUnhandled = function (promise) {
4390 task.call(global, function () {
4391 var handler;
4392 if (isNode) {
4393 process.emit('rejectionHandled', promise);
4394 } else if (handler = global.onrejectionhandled) {
4395 handler({ promise: promise, reason: promise._v });
4396 }
4397 });
4398};
4399var $reject = function (value) {
4400 var promise = this;
4401 if (promise._d) return;
4402 promise._d = true;
4403 promise = promise._w || promise; // unwrap
4404 promise._v = value;
4405 promise._s = 2;
4406 if (!promise._a) promise._a = promise._c.slice();
4407 notify(promise, true);
4408};
4409var $resolve = function (value) {
4410 var promise = this;
4411 var then;
4412 if (promise._d) return;
4413 promise._d = true;
4414 promise = promise._w || promise; // unwrap
4415 try {
4416 if (promise === value) throw TypeError("Promise can't be resolved itself");
4417 if (then = isThenable(value)) {
4418 microtask(function () {
4419 var wrapper = { _w: promise, _d: false }; // wrap
4420 try {
4421 then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
4422 } catch (e) {
4423 $reject.call(wrapper, e);
4424 }
4425 });
4426 } else {
4427 promise._v = value;
4428 promise._s = 1;
4429 notify(promise, false);
4430 }
4431 } catch (e) {
4432 $reject.call({ _w: promise, _d: false }, e); // wrap
4433 }
4434};
4435
4436// constructor polyfill
4437if (!USE_NATIVE) {
4438 // 25.4.3.1 Promise(executor)
4439 $Promise = function Promise(executor) {
4440 anInstance(this, $Promise, PROMISE, '_h');
4441 aFunction(executor);
4442 Internal.call(this);
4443 try {
4444 executor(ctx($resolve, this, 1), ctx($reject, this, 1));
4445 } catch (err) {
4446 $reject.call(this, err);
4447 }
4448 };
4449 // eslint-disable-next-line no-unused-vars
4450 Internal = function Promise(executor) {
4451 this._c = []; // <- awaiting reactions
4452 this._a = undefined; // <- checked in isUnhandled reactions
4453 this._s = 0; // <- state
4454 this._d = false; // <- done
4455 this._v = undefined; // <- value
4456 this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
4457 this._n = false; // <- notify
4458 };
4459 Internal.prototype = __webpack_require__(/*! ./_redefine-all */ "../node_modules/core-js/modules/_redefine-all.js")($Promise.prototype, {
4460 // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
4461 then: function then(onFulfilled, onRejected) {
4462 var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
4463 reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
4464 reaction.fail = typeof onRejected == 'function' && onRejected;
4465 reaction.domain = isNode ? process.domain : undefined;
4466 this._c.push(reaction);
4467 if (this._a) this._a.push(reaction);
4468 if (this._s) notify(this, false);
4469 return reaction.promise;
4470 },
4471 // 25.4.5.1 Promise.prototype.catch(onRejected)
4472 'catch': function (onRejected) {
4473 return this.then(undefined, onRejected);
4474 }
4475 });
4476 OwnPromiseCapability = function () {
4477 var promise = new Internal();
4478 this.promise = promise;
4479 this.resolve = ctx($resolve, promise, 1);
4480 this.reject = ctx($reject, promise, 1);
4481 };
4482 newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
4483 return C === $Promise || C === Wrapper
4484 ? new OwnPromiseCapability(C)
4485 : newGenericPromiseCapability(C);
4486 };
4487}
4488
4489$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
4490__webpack_require__(/*! ./_set-to-string-tag */ "../node_modules/core-js/modules/_set-to-string-tag.js")($Promise, PROMISE);
4491__webpack_require__(/*! ./_set-species */ "../node_modules/core-js/modules/_set-species.js")(PROMISE);
4492Wrapper = __webpack_require__(/*! ./_core */ "../node_modules/core-js/modules/_core.js")[PROMISE];
4493
4494// statics
4495$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
4496 // 25.4.4.5 Promise.reject(r)
4497 reject: function reject(r) {
4498 var capability = newPromiseCapability(this);
4499 var $$reject = capability.reject;
4500 $$reject(r);
4501 return capability.promise;
4502 }
4503});
4504$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
4505 // 25.4.4.6 Promise.resolve(x)
4506 resolve: function resolve(x) {
4507 return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
4508 }
4509});
4510$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(/*! ./_iter-detect */ "../node_modules/core-js/modules/_iter-detect.js")(function (iter) {
4511 $Promise.all(iter)['catch'](empty);
4512})), PROMISE, {
4513 // 25.4.4.1 Promise.all(iterable)
4514 all: function all(iterable) {
4515 var C = this;
4516 var capability = newPromiseCapability(C);
4517 var resolve = capability.resolve;
4518 var reject = capability.reject;
4519 var result = perform(function () {
4520 var values = [];
4521 var index = 0;
4522 var remaining = 1;
4523 forOf(iterable, false, function (promise) {
4524 var $index = index++;
4525 var alreadyCalled = false;
4526 values.push(undefined);
4527 remaining++;
4528 C.resolve(promise).then(function (value) {
4529 if (alreadyCalled) return;
4530 alreadyCalled = true;
4531 values[$index] = value;
4532 --remaining || resolve(values);
4533 }, reject);
4534 });
4535 --remaining || resolve(values);
4536 });
4537 if (result.e) reject(result.v);
4538 return capability.promise;
4539 },
4540 // 25.4.4.4 Promise.race(iterable)
4541 race: function race(iterable) {
4542 var C = this;
4543 var capability = newPromiseCapability(C);
4544 var reject = capability.reject;
4545 var result = perform(function () {
4546 forOf(iterable, false, function (promise) {
4547 C.resolve(promise).then(capability.resolve, reject);
4548 });
4549 });
4550 if (result.e) reject(result.v);
4551 return capability.promise;
4552 }
4553});
4554
4555
4556/***/ }),
4557
4558/***/ "../node_modules/core-js/modules/es6.string.iterator.js":
4559/*!**************************************************************!*\
4560 !*** ../node_modules/core-js/modules/es6.string.iterator.js ***!
4561 \**************************************************************/
4562/*! no static exports found */
4563/***/ (function(module, exports, __webpack_require__) {
4564
4565"use strict";
4566
4567var $at = __webpack_require__(/*! ./_string-at */ "../node_modules/core-js/modules/_string-at.js")(true);
4568
4569// 21.1.3.27 String.prototype[@@iterator]()
4570__webpack_require__(/*! ./_iter-define */ "../node_modules/core-js/modules/_iter-define.js")(String, 'String', function (iterated) {
4571 this._t = String(iterated); // target
4572 this._i = 0; // next index
4573// 21.1.5.2.1 %StringIteratorPrototype%.next()
4574}, function () {
4575 var O = this._t;
4576 var index = this._i;
4577 var point;
4578 if (index >= O.length) return { value: undefined, done: true };
4579 point = $at(O, index);
4580 this._i += point.length;
4581 return { value: point, done: false };
4582});
4583
4584
4585/***/ }),
4586
4587/***/ "../node_modules/core-js/modules/es7.promise.finally.js":
4588/*!**************************************************************!*\
4589 !*** ../node_modules/core-js/modules/es7.promise.finally.js ***!
4590 \**************************************************************/
4591/*! no static exports found */
4592/***/ (function(module, exports, __webpack_require__) {
4593
4594"use strict";
4595// https://github.com/tc39/proposal-promise-finally
4596
4597var $export = __webpack_require__(/*! ./_export */ "../node_modules/core-js/modules/_export.js");
4598var core = __webpack_require__(/*! ./_core */ "../node_modules/core-js/modules/_core.js");
4599var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
4600var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "../node_modules/core-js/modules/_species-constructor.js");
4601var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "../node_modules/core-js/modules/_promise-resolve.js");
4602
4603$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
4604 var C = speciesConstructor(this, core.Promise || global.Promise);
4605 var isFunction = typeof onFinally == 'function';
4606 return this.then(
4607 isFunction ? function (x) {
4608 return promiseResolve(C, onFinally()).then(function () { return x; });
4609 } : onFinally,
4610 isFunction ? function (e) {
4611 return promiseResolve(C, onFinally()).then(function () { throw e; });
4612 } : onFinally
4613 );
4614} });
4615
4616
4617/***/ }),
4618
4619/***/ "../node_modules/core-js/modules/es7.promise.try.js":
4620/*!**********************************************************!*\
4621 !*** ../node_modules/core-js/modules/es7.promise.try.js ***!
4622 \**********************************************************/
4623/*! no static exports found */
4624/***/ (function(module, exports, __webpack_require__) {
4625
4626"use strict";
4627
4628// https://github.com/tc39/proposal-promise-try
4629var $export = __webpack_require__(/*! ./_export */ "../node_modules/core-js/modules/_export.js");
4630var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "../node_modules/core-js/modules/_new-promise-capability.js");
4631var perform = __webpack_require__(/*! ./_perform */ "../node_modules/core-js/modules/_perform.js");
4632
4633$export($export.S, 'Promise', { 'try': function (callbackfn) {
4634 var promiseCapability = newPromiseCapability.f(this);
4635 var result = perform(callbackfn);
4636 (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
4637 return promiseCapability.promise;
4638} });
4639
4640
4641/***/ }),
4642
4643/***/ "../node_modules/core-js/modules/web.dom.iterable.js":
4644/*!***********************************************************!*\
4645 !*** ../node_modules/core-js/modules/web.dom.iterable.js ***!
4646 \***********************************************************/
4647/*! no static exports found */
4648/***/ (function(module, exports, __webpack_require__) {
4649
4650var $iterators = __webpack_require__(/*! ./es6.array.iterator */ "../node_modules/core-js/modules/es6.array.iterator.js");
4651var getKeys = __webpack_require__(/*! ./_object-keys */ "../node_modules/core-js/modules/_object-keys.js");
4652var redefine = __webpack_require__(/*! ./_redefine */ "../node_modules/core-js/modules/_redefine.js");
4653var global = __webpack_require__(/*! ./_global */ "../node_modules/core-js/modules/_global.js");
4654var hide = __webpack_require__(/*! ./_hide */ "../node_modules/core-js/modules/_hide.js");
4655var Iterators = __webpack_require__(/*! ./_iterators */ "../node_modules/core-js/modules/_iterators.js");
4656var wks = __webpack_require__(/*! ./_wks */ "../node_modules/core-js/modules/_wks.js");
4657var ITERATOR = wks('iterator');
4658var TO_STRING_TAG = wks('toStringTag');
4659var ArrayValues = Iterators.Array;
4660
4661var DOMIterables = {
4662 CSSRuleList: true, // TODO: Not spec compliant, should be false.
4663 CSSStyleDeclaration: false,
4664 CSSValueList: false,
4665 ClientRectList: false,
4666 DOMRectList: false,
4667 DOMStringList: false,
4668 DOMTokenList: true,
4669 DataTransferItemList: false,
4670 FileList: false,
4671 HTMLAllCollection: false,
4672 HTMLCollection: false,
4673 HTMLFormElement: false,
4674 HTMLSelectElement: false,
4675 MediaList: true, // TODO: Not spec compliant, should be false.
4676 MimeTypeArray: false,
4677 NamedNodeMap: false,
4678 NodeList: true,
4679 PaintRequestList: false,
4680 Plugin: false,
4681 PluginArray: false,
4682 SVGLengthList: false,
4683 SVGNumberList: false,
4684 SVGPathSegList: false,
4685 SVGPointList: false,
4686 SVGStringList: false,
4687 SVGTransformList: false,
4688 SourceBufferList: false,
4689 StyleSheetList: true, // TODO: Not spec compliant, should be false.
4690 TextTrackCueList: false,
4691 TextTrackList: false,
4692 TouchList: false
4693};
4694
4695for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
4696 var NAME = collections[i];
4697 var explicit = DOMIterables[NAME];
4698 var Collection = global[NAME];
4699 var proto = Collection && Collection.prototype;
4700 var key;
4701 if (proto) {
4702 if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
4703 if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
4704 Iterators[NAME] = ArrayValues;
4705 if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
4706 }
4707}
4708
4709
4710/***/ }),
4711
4712/***/ "../node_modules/lodash/_Hash.js":
4713/*!***************************************!*\
4714 !*** ../node_modules/lodash/_Hash.js ***!
4715 \***************************************/
4716/*! no static exports found */
4717/***/ (function(module, exports, __webpack_require__) {
4718
4719var hashClear = __webpack_require__(/*! ./_hashClear */ "../node_modules/lodash/_hashClear.js"),
4720 hashDelete = __webpack_require__(/*! ./_hashDelete */ "../node_modules/lodash/_hashDelete.js"),
4721 hashGet = __webpack_require__(/*! ./_hashGet */ "../node_modules/lodash/_hashGet.js"),
4722 hashHas = __webpack_require__(/*! ./_hashHas */ "../node_modules/lodash/_hashHas.js"),
4723 hashSet = __webpack_require__(/*! ./_hashSet */ "../node_modules/lodash/_hashSet.js");
4724
4725/**
4726 * Creates a hash object.
4727 *
4728 * @private
4729 * @constructor
4730 * @param {Array} [entries] The key-value pairs to cache.
4731 */
4732function Hash(entries) {
4733 var index = -1,
4734 length = entries == null ? 0 : entries.length;
4735
4736 this.clear();
4737 while (++index < length) {
4738 var entry = entries[index];
4739 this.set(entry[0], entry[1]);
4740 }
4741}
4742
4743// Add methods to `Hash`.
4744Hash.prototype.clear = hashClear;
4745Hash.prototype['delete'] = hashDelete;
4746Hash.prototype.get = hashGet;
4747Hash.prototype.has = hashHas;
4748Hash.prototype.set = hashSet;
4749
4750module.exports = Hash;
4751
4752
4753/***/ }),
4754
4755/***/ "../node_modules/lodash/_ListCache.js":
4756/*!********************************************!*\
4757 !*** ../node_modules/lodash/_ListCache.js ***!
4758 \********************************************/
4759/*! no static exports found */
4760/***/ (function(module, exports, __webpack_require__) {
4761
4762var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "../node_modules/lodash/_listCacheClear.js"),
4763 listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "../node_modules/lodash/_listCacheDelete.js"),
4764 listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "../node_modules/lodash/_listCacheGet.js"),
4765 listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "../node_modules/lodash/_listCacheHas.js"),
4766 listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "../node_modules/lodash/_listCacheSet.js");
4767
4768/**
4769 * Creates an list cache object.
4770 *
4771 * @private
4772 * @constructor
4773 * @param {Array} [entries] The key-value pairs to cache.
4774 */
4775function ListCache(entries) {
4776 var index = -1,
4777 length = entries == null ? 0 : entries.length;
4778
4779 this.clear();
4780 while (++index < length) {
4781 var entry = entries[index];
4782 this.set(entry[0], entry[1]);
4783 }
4784}
4785
4786// Add methods to `ListCache`.
4787ListCache.prototype.clear = listCacheClear;
4788ListCache.prototype['delete'] = listCacheDelete;
4789ListCache.prototype.get = listCacheGet;
4790ListCache.prototype.has = listCacheHas;
4791ListCache.prototype.set = listCacheSet;
4792
4793module.exports = ListCache;
4794
4795
4796/***/ }),
4797
4798/***/ "../node_modules/lodash/_Map.js":
4799/*!**************************************!*\
4800 !*** ../node_modules/lodash/_Map.js ***!
4801 \**************************************/
4802/*! no static exports found */
4803/***/ (function(module, exports, __webpack_require__) {
4804
4805var getNative = __webpack_require__(/*! ./_getNative */ "../node_modules/lodash/_getNative.js"),
4806 root = __webpack_require__(/*! ./_root */ "../node_modules/lodash/_root.js");
4807
4808/* Built-in method references that are verified to be native. */
4809var Map = getNative(root, 'Map');
4810
4811module.exports = Map;
4812
4813
4814/***/ }),
4815
4816/***/ "../node_modules/lodash/_MapCache.js":
4817/*!*******************************************!*\
4818 !*** ../node_modules/lodash/_MapCache.js ***!
4819 \*******************************************/
4820/*! no static exports found */
4821/***/ (function(module, exports, __webpack_require__) {
4822
4823var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "../node_modules/lodash/_mapCacheClear.js"),
4824 mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "../node_modules/lodash/_mapCacheDelete.js"),
4825 mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "../node_modules/lodash/_mapCacheGet.js"),
4826 mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "../node_modules/lodash/_mapCacheHas.js"),
4827 mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "../node_modules/lodash/_mapCacheSet.js");
4828
4829/**
4830 * Creates a map cache object to store key-value pairs.
4831 *
4832 * @private
4833 * @constructor
4834 * @param {Array} [entries] The key-value pairs to cache.
4835 */
4836function MapCache(entries) {
4837 var index = -1,
4838 length = entries == null ? 0 : entries.length;
4839
4840 this.clear();
4841 while (++index < length) {
4842 var entry = entries[index];
4843 this.set(entry[0], entry[1]);
4844 }
4845}
4846
4847// Add methods to `MapCache`.
4848MapCache.prototype.clear = mapCacheClear;
4849MapCache.prototype['delete'] = mapCacheDelete;
4850MapCache.prototype.get = mapCacheGet;
4851MapCache.prototype.has = mapCacheHas;
4852MapCache.prototype.set = mapCacheSet;
4853
4854module.exports = MapCache;
4855
4856
4857/***/ }),
4858
4859/***/ "../node_modules/lodash/_Stack.js":
4860/*!****************************************!*\
4861 !*** ../node_modules/lodash/_Stack.js ***!
4862 \****************************************/
4863/*! no static exports found */
4864/***/ (function(module, exports, __webpack_require__) {
4865
4866var ListCache = __webpack_require__(/*! ./_ListCache */ "../node_modules/lodash/_ListCache.js"),
4867 stackClear = __webpack_require__(/*! ./_stackClear */ "../node_modules/lodash/_stackClear.js"),
4868 stackDelete = __webpack_require__(/*! ./_stackDelete */ "../node_modules/lodash/_stackDelete.js"),
4869 stackGet = __webpack_require__(/*! ./_stackGet */ "../node_modules/lodash/_stackGet.js"),
4870 stackHas = __webpack_require__(/*! ./_stackHas */ "../node_modules/lodash/_stackHas.js"),
4871 stackSet = __webpack_require__(/*! ./_stackSet */ "../node_modules/lodash/_stackSet.js");
4872
4873/**
4874 * Creates a stack cache object to store key-value pairs.
4875 *
4876 * @private
4877 * @constructor
4878 * @param {Array} [entries] The key-value pairs to cache.
4879 */
4880function Stack(entries) {
4881 var data = this.__data__ = new ListCache(entries);
4882 this.size = data.size;
4883}
4884
4885// Add methods to `Stack`.
4886Stack.prototype.clear = stackClear;
4887Stack.prototype['delete'] = stackDelete;
4888Stack.prototype.get = stackGet;
4889Stack.prototype.has = stackHas;
4890Stack.prototype.set = stackSet;
4891
4892module.exports = Stack;
4893
4894
4895/***/ }),
4896
4897/***/ "../node_modules/lodash/_arrayEach.js":
4898/*!********************************************!*\
4899 !*** ../node_modules/lodash/_arrayEach.js ***!
4900 \********************************************/
4901/*! no static exports found */
4902/***/ (function(module, exports) {
4903
4904/**
4905 * A specialized version of `_.forEach` for arrays without support for
4906 * iteratee shorthands.
4907 *
4908 * @private
4909 * @param {Array} [array] The array to iterate over.
4910 * @param {Function} iteratee The function invoked per iteration.
4911 * @returns {Array} Returns `array`.
4912 */
4913function arrayEach(array, iteratee) {
4914 var index = -1,
4915 length = array == null ? 0 : array.length;
4916
4917 while (++index < length) {
4918 if (iteratee(array[index], index, array) === false) {
4919 break;
4920 }
4921 }
4922 return array;
4923}
4924
4925module.exports = arrayEach;
4926
4927
4928/***/ }),
4929
4930/***/ "../node_modules/lodash/_assignValue.js":
4931/*!**********************************************!*\
4932 !*** ../node_modules/lodash/_assignValue.js ***!
4933 \**********************************************/
4934/*! no static exports found */
4935/***/ (function(module, exports, __webpack_require__) {
4936
4937var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "../node_modules/lodash/_baseAssignValue.js"),
4938 eq = __webpack_require__(/*! ./eq */ "../node_modules/lodash/eq.js");
4939
4940/** Used for built-in method references. */
4941var objectProto = Object.prototype;
4942
4943/** Used to check objects for own properties. */
4944var hasOwnProperty = objectProto.hasOwnProperty;
4945
4946/**
4947 * Assigns `value` to `key` of `object` if the existing value is not equivalent
4948 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
4949 * for equality comparisons.
4950 *
4951 * @private
4952 * @param {Object} object The object to modify.
4953 * @param {string} key The key of the property to assign.
4954 * @param {*} value The value to assign.
4955 */
4956function assignValue(object, key, value) {
4957 var objValue = object[key];
4958 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
4959 (value === undefined && !(key in object))) {
4960 baseAssignValue(object, key, value);
4961 }
4962}
4963
4964module.exports = assignValue;
4965
4966
4967/***/ }),
4968
4969/***/ "../node_modules/lodash/_assocIndexOf.js":
4970/*!***********************************************!*\
4971 !*** ../node_modules/lodash/_assocIndexOf.js ***!
4972 \***********************************************/
4973/*! no static exports found */
4974/***/ (function(module, exports, __webpack_require__) {
4975
4976var eq = __webpack_require__(/*! ./eq */ "../node_modules/lodash/eq.js");
4977
4978/**
4979 * Gets the index at which the `key` is found in `array` of key-value pairs.
4980 *
4981 * @private
4982 * @param {Array} array The array to inspect.
4983 * @param {*} key The key to search for.
4984 * @returns {number} Returns the index of the matched value, else `-1`.
4985 */
4986function assocIndexOf(array, key) {
4987 var length = array.length;
4988 while (length--) {
4989 if (eq(array[length][0], key)) {
4990 return length;
4991 }
4992 }
4993 return -1;
4994}
4995
4996module.exports = assocIndexOf;
4997
4998
4999/***/ }),
5000
5001/***/ "../node_modules/lodash/_baseAssign.js":
5002/*!*********************************************!*\
5003 !*** ../node_modules/lodash/_baseAssign.js ***!
5004 \*********************************************/
5005/*! no static exports found */
5006/***/ (function(module, exports, __webpack_require__) {
5007
5008var copyObject = __webpack_require__(/*! ./_copyObject */ "../node_modules/lodash/_copyObject.js"),
5009 keys = __webpack_require__(/*! ./keys */ "../node_modules/lodash/keys.js");
5010
5011/**
5012 * The base implementation of `_.assign` without support for multiple sources
5013 * or `customizer` functions.
5014 *
5015 * @private
5016 * @param {Object} object The destination object.
5017 * @param {Object} source The source object.
5018 * @returns {Object} Returns `object`.
5019 */
5020function baseAssign(object, source) {
5021 return object && copyObject(source, keys(source), object);
5022}
5023
5024module.exports = baseAssign;
5025
5026
5027/***/ }),
5028
5029/***/ "../node_modules/lodash/_baseAssignIn.js":
5030/*!***********************************************!*\
5031 !*** ../node_modules/lodash/_baseAssignIn.js ***!
5032 \***********************************************/
5033/*! no static exports found */
5034/***/ (function(module, exports, __webpack_require__) {
5035
5036var copyObject = __webpack_require__(/*! ./_copyObject */ "../node_modules/lodash/_copyObject.js"),
5037 keysIn = __webpack_require__(/*! ./keysIn */ "../node_modules/lodash/keysIn.js");
5038
5039/**
5040 * The base implementation of `_.assignIn` without support for multiple sources
5041 * or `customizer` functions.
5042 *
5043 * @private
5044 * @param {Object} object The destination object.
5045 * @param {Object} source The source object.
5046 * @returns {Object} Returns `object`.
5047 */
5048function baseAssignIn(object, source) {
5049 return object && copyObject(source, keysIn(source), object);
5050}
5051
5052module.exports = baseAssignIn;
5053
5054
5055/***/ }),
5056
5057/***/ "../node_modules/lodash/_baseAssignValue.js":
5058/*!**************************************************!*\
5059 !*** ../node_modules/lodash/_baseAssignValue.js ***!
5060 \**************************************************/
5061/*! no static exports found */
5062/***/ (function(module, exports, __webpack_require__) {
5063
5064var defineProperty = __webpack_require__(/*! ./_defineProperty */ "../node_modules/lodash/_defineProperty.js");
5065
5066/**
5067 * The base implementation of `assignValue` and `assignMergeValue` without
5068 * value checks.
5069 *
5070 * @private
5071 * @param {Object} object The object to modify.
5072 * @param {string} key The key of the property to assign.
5073 * @param {*} value The value to assign.
5074 */
5075function baseAssignValue(object, key, value) {
5076 if (key == '__proto__' && defineProperty) {
5077 defineProperty(object, key, {
5078 'configurable': true,
5079 'enumerable': true,
5080 'value': value,
5081 'writable': true
5082 });
5083 } else {
5084 object[key] = value;
5085 }
5086}
5087
5088module.exports = baseAssignValue;
5089
5090
5091/***/ }),
5092
5093/***/ "../node_modules/lodash/_baseClone.js":
5094/*!********************************************!*\
5095 !*** ../node_modules/lodash/_baseClone.js ***!
5096 \********************************************/
5097/*! no static exports found */
5098/***/ (function(module, exports, __webpack_require__) {
5099
5100var Stack = __webpack_require__(/*! ./_Stack */ "../node_modules/lodash/_Stack.js"),
5101 arrayEach = __webpack_require__(/*! ./_arrayEach */ "../node_modules/lodash/_arrayEach.js"),
5102 assignValue = __webpack_require__(/*! ./_assignValue */ "../node_modules/lodash/_assignValue.js"),
5103 baseAssign = __webpack_require__(/*! ./_baseAssign */ "../node_modules/lodash/_baseAssign.js"),
5104 baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ "../node_modules/lodash/_baseAssignIn.js"),
5105 cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "../node_modules/lodash/_cloneBuffer.js"),
5106 copyArray = __webpack_require__(/*! ./_copyArray */ "../node_modules/lodash/_copyArray.js"),
5107 copySymbols = __webpack_require__(/*! ./_copySymbols */ "../node_modules/lodash/_copySymbols.js"),
5108 copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ "../node_modules/lodash/_copySymbolsIn.js"),
5109 getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "../node_modules/lodash/_getAllKeys.js"),
5110 getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ "../node_modules/lodash/_getAllKeysIn.js"),
5111 getTag = __webpack_require__(/*! ./_getTag */ "../node_modules/lodash/_getTag.js"),
5112 initCloneArray = __webpack_require__(/*! ./_initCloneArray */ "../node_modules/lodash/_initCloneArray.js"),
5113 initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ "../node_modules/lodash/_initCloneByTag.js"),
5114 initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "../node_modules/lodash/_initCloneObject.js"),
5115 isArray = __webpack_require__(/*! ./isArray */ "../node_modules/lodash/isArray.js"),
5116 isBuffer = __webpack_require__(/*! ./isBuffer */ "../node_modules/lodash/isBuffer.js"),
5117 isMap = __webpack_require__(/*! ./isMap */ "../node_modules/lodash/isMap.js"),
5118 isObject = __webpack_require__(/*! ./isObject */ "../node_modules/lodash/isObject.js"),
5119 isSet = __webpack_require__(/*! ./isSet */ "../node_modules/lodash/isSet.js"),
5120 keys = __webpack_require__(/*! ./keys */ "../node_modules/lodash/keys.js");
5121
5122/** Used to compose bitmasks for cloning. */
5123var CLONE_DEEP_FLAG = 1,
5124 CLONE_FLAT_FLAG = 2,
5125 CLONE_SYMBOLS_FLAG = 4;
5126
5127/** `Object#toString` result references. */
5128var argsTag = '[object Arguments]',
5129 arrayTag = '[object Array]',
5130 boolTag = '[object Boolean]',
5131 dateTag = '[object Date]',
5132 errorTag = '[object Error]',
5133 funcTag = '[object Function]',
5134 genTag = '[object GeneratorFunction]',
5135 mapTag = '[object Map]',
5136 numberTag = '[object Number]',
5137 objectTag = '[object Object]',
5138 regexpTag = '[object RegExp]',
5139 setTag = '[object Set]',
5140 stringTag = '[object String]',
5141 symbolTag = '[object Symbol]',
5142 weakMapTag = '[object WeakMap]';
5143
5144var arrayBufferTag = '[object ArrayBuffer]',
5145 dataViewTag = '[object DataView]',
5146 float32Tag = '[object Float32Array]',
5147 float64Tag = '[object Float64Array]',
5148 int8Tag = '[object Int8Array]',
5149 int16Tag = '[object Int16Array]',
5150 int32Tag = '[object Int32Array]',
5151 uint8Tag = '[object Uint8Array]',
5152 uint8ClampedTag = '[object Uint8ClampedArray]',
5153 uint16Tag = '[object Uint16Array]',
5154 uint32Tag = '[object Uint32Array]';
5155
5156/** Used to identify `toStringTag` values supported by `_.clone`. */
5157var cloneableTags = {};
5158cloneableTags[argsTag] = cloneableTags[arrayTag] =
5159cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
5160cloneableTags[boolTag] = cloneableTags[dateTag] =
5161cloneableTags[float32Tag] = cloneableTags[float64Tag] =
5162cloneableTags[int8Tag] = cloneableTags[int16Tag] =
5163cloneableTags[int32Tag] = cloneableTags[mapTag] =
5164cloneableTags[numberTag] = cloneableTags[objectTag] =
5165cloneableTags[regexpTag] = cloneableTags[setTag] =
5166cloneableTags[stringTag] = cloneableTags[symbolTag] =
5167cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
5168cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
5169cloneableTags[errorTag] = cloneableTags[funcTag] =
5170cloneableTags[weakMapTag] = false;
5171
5172/**
5173 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
5174 * traversed objects.
5175 *
5176 * @private
5177 * @param {*} value The value to clone.
5178 * @param {boolean} bitmask The bitmask flags.
5179 * 1 - Deep clone
5180 * 2 - Flatten inherited properties
5181 * 4 - Clone symbols
5182 * @param {Function} [customizer] The function to customize cloning.
5183 * @param {string} [key] The key of `value`.
5184 * @param {Object} [object] The parent object of `value`.
5185 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
5186 * @returns {*} Returns the cloned value.
5187 */
5188function baseClone(value, bitmask, customizer, key, object, stack) {
5189 var result,
5190 isDeep = bitmask & CLONE_DEEP_FLAG,
5191 isFlat = bitmask & CLONE_FLAT_FLAG,
5192 isFull = bitmask & CLONE_SYMBOLS_FLAG;
5193
5194 if (customizer) {
5195 result = object ? customizer(value, key, object, stack) : customizer(value);
5196 }
5197 if (result !== undefined) {
5198 return result;
5199 }
5200 if (!isObject(value)) {
5201 return value;
5202 }
5203 var isArr = isArray(value);
5204 if (isArr) {
5205 result = initCloneArray(value);
5206 if (!isDeep) {
5207 return copyArray(value, result);
5208 }
5209 } else {
5210 var tag = getTag(value),
5211 isFunc = tag == funcTag || tag == genTag;
5212
5213 if (isBuffer(value)) {
5214 return cloneBuffer(value, isDeep);
5215 }
5216 if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
5217 result = (isFlat || isFunc) ? {} : initCloneObject(value);
5218 if (!isDeep) {
5219 return isFlat
5220 ? copySymbolsIn(value, baseAssignIn(result, value))
5221 : copySymbols(value, baseAssign(result, value));
5222 }
5223 } else {
5224 if (!cloneableTags[tag]) {
5225 return object ? value : {};
5226 }
5227 result = initCloneByTag(value, tag, isDeep);
5228 }
5229 }
5230 // Check for circular references and return its corresponding clone.
5231 stack || (stack = new Stack);
5232 var stacked = stack.get(value);
5233 if (stacked) {
5234 return stacked;
5235 }
5236 stack.set(value, result);
5237
5238 if (isSet(value)) {
5239 value.forEach(function(subValue) {
5240 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
5241 });
5242 } else if (isMap(value)) {
5243 value.forEach(function(subValue, key) {
5244 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
5245 });
5246 }
5247
5248 var keysFunc = isFull
5249 ? (isFlat ? getAllKeysIn : getAllKeys)
5250 : (isFlat ? keysIn : keys);
5251
5252 var props = isArr ? undefined : keysFunc(value);
5253 arrayEach(props || value, function(subValue, key) {
5254 if (props) {
5255 key = subValue;
5256 subValue = value[key];
5257 }
5258 // Recursively populate clone (susceptible to call stack limits).
5259 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
5260 });
5261 return result;
5262}
5263
5264module.exports = baseClone;
5265
5266
5267/***/ }),
5268
5269/***/ "../node_modules/lodash/_baseCreate.js":
5270/*!*********************************************!*\
5271 !*** ../node_modules/lodash/_baseCreate.js ***!
5272 \*********************************************/
5273/*! no static exports found */
5274/***/ (function(module, exports, __webpack_require__) {
5275
5276var isObject = __webpack_require__(/*! ./isObject */ "../node_modules/lodash/isObject.js");
5277
5278/** Built-in value references. */
5279var objectCreate = Object.create;
5280
5281/**
5282 * The base implementation of `_.create` without support for assigning
5283 * properties to the created object.
5284 *
5285 * @private
5286 * @param {Object} proto The object to inherit from.
5287 * @returns {Object} Returns the new object.
5288 */
5289var baseCreate = (function() {
5290 function object() {}
5291 return function(proto) {
5292 if (!isObject(proto)) {
5293 return {};
5294 }
5295 if (objectCreate) {
5296 return objectCreate(proto);
5297 }
5298 object.prototype = proto;
5299 var result = new object;
5300 object.prototype = undefined;
5301 return result;
5302 };
5303}());
5304
5305module.exports = baseCreate;
5306
5307
5308/***/ }),
5309
5310/***/ "../node_modules/lodash/_baseGet.js":
5311/*!******************************************!*\
5312 !*** ../node_modules/lodash/_baseGet.js ***!
5313 \******************************************/
5314/*! no static exports found */
5315/***/ (function(module, exports) {
5316
5317/**
5318 * Gets the value at `key` of `object`.
5319 *
5320 * @private
5321 * @param {Object} [object] The object to query.
5322 * @param {string} key The key of the property to get.
5323 * @returns {*} Returns the property value.
5324 */
5325function getValue(object, key) {
5326 return object == null ? undefined : object[key];
5327}
5328
5329module.exports = getValue;
5330
5331
5332/***/ }),
5333
5334/***/ "../node_modules/lodash/_baseGetTag.js":
5335/*!*********************************************!*\
5336 !*** ../node_modules/lodash/_baseGetTag.js ***!
5337 \*********************************************/
5338/*! no static exports found */
5339/***/ (function(module, exports) {
5340
5341/** Used for built-in method references. */
5342var objectProto = Object.prototype;
5343
5344/**
5345 * Used to resolve the
5346 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
5347 * of values.
5348 */
5349var nativeObjectToString = objectProto.toString;
5350
5351/**
5352 * Converts `value` to a string using `Object.prototype.toString`.
5353 *
5354 * @private
5355 * @param {*} value The value to convert.
5356 * @returns {string} Returns the converted string.
5357 */
5358function objectToString(value) {
5359 return nativeObjectToString.call(value);
5360}
5361
5362module.exports = objectToString;
5363
5364
5365/***/ }),
5366
5367/***/ "../node_modules/lodash/_cloneBuffer.js":
5368/*!**********************************************!*\
5369 !*** ../node_modules/lodash/_cloneBuffer.js ***!
5370 \**********************************************/
5371/*! no static exports found */
5372/***/ (function(module, exports, __webpack_require__) {
5373
5374/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "../node_modules/lodash/_root.js");
5375
5376/** Detect free variable `exports`. */
5377var freeExports = true && exports && !exports.nodeType && exports;
5378
5379/** Detect free variable `module`. */
5380var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
5381
5382/** Detect the popular CommonJS extension `module.exports`. */
5383var moduleExports = freeModule && freeModule.exports === freeExports;
5384
5385/** Built-in value references. */
5386var Buffer = moduleExports ? root.Buffer : undefined,
5387 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
5388
5389/**
5390 * Creates a clone of `buffer`.
5391 *
5392 * @private
5393 * @param {Buffer} buffer The buffer to clone.
5394 * @param {boolean} [isDeep] Specify a deep clone.
5395 * @returns {Buffer} Returns the cloned buffer.
5396 */
5397function cloneBuffer(buffer, isDeep) {
5398 if (isDeep) {
5399 return buffer.slice();
5400 }
5401 var length = buffer.length,
5402 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
5403
5404 buffer.copy(result);
5405 return result;
5406}
5407
5408module.exports = cloneBuffer;
5409
5410/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "../node_modules/webpack/buildin/module.js")(module)))
5411
5412/***/ }),
5413
5414/***/ "../node_modules/lodash/_copyArray.js":
5415/*!********************************************!*\
5416 !*** ../node_modules/lodash/_copyArray.js ***!
5417 \********************************************/
5418/*! no static exports found */
5419/***/ (function(module, exports) {
5420
5421/**
5422 * Copies the values of `source` to `array`.
5423 *
5424 * @private
5425 * @param {Array} source The array to copy values from.
5426 * @param {Array} [array=[]] The array to copy values to.
5427 * @returns {Array} Returns `array`.
5428 */
5429function copyArray(source, array) {
5430 var index = -1,
5431 length = source.length;
5432
5433 array || (array = Array(length));
5434 while (++index < length) {
5435 array[index] = source[index];
5436 }
5437 return array;
5438}
5439
5440module.exports = copyArray;
5441
5442
5443/***/ }),
5444
5445/***/ "../node_modules/lodash/_copyObject.js":
5446/*!*********************************************!*\
5447 !*** ../node_modules/lodash/_copyObject.js ***!
5448 \*********************************************/
5449/*! no static exports found */
5450/***/ (function(module, exports, __webpack_require__) {
5451
5452var assignValue = __webpack_require__(/*! ./_assignValue */ "../node_modules/lodash/_assignValue.js"),
5453 baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "../node_modules/lodash/_baseAssignValue.js");
5454
5455/**
5456 * Copies properties of `source` to `object`.
5457 *
5458 * @private
5459 * @param {Object} source The object to copy properties from.
5460 * @param {Array} props The property identifiers to copy.
5461 * @param {Object} [object={}] The object to copy properties to.
5462 * @param {Function} [customizer] The function to customize copied values.
5463 * @returns {Object} Returns `object`.
5464 */
5465function copyObject(source, props, object, customizer) {
5466 var isNew = !object;
5467 object || (object = {});
5468
5469 var index = -1,
5470 length = props.length;
5471
5472 while (++index < length) {
5473 var key = props[index];
5474
5475 var newValue = customizer
5476 ? customizer(object[key], source[key], key, object, source)
5477 : undefined;
5478
5479 if (newValue === undefined) {
5480 newValue = source[key];
5481 }
5482 if (isNew) {
5483 baseAssignValue(object, key, newValue);
5484 } else {
5485 assignValue(object, key, newValue);
5486 }
5487 }
5488 return object;
5489}
5490
5491module.exports = copyObject;
5492
5493
5494/***/ }),
5495
5496/***/ "../node_modules/lodash/_copySymbols.js":
5497/*!**********************************************!*\
5498 !*** ../node_modules/lodash/_copySymbols.js ***!
5499 \**********************************************/
5500/*! no static exports found */
5501/***/ (function(module, exports, __webpack_require__) {
5502
5503var copyObject = __webpack_require__(/*! ./_copyObject */ "../node_modules/lodash/_copyObject.js"),
5504 getSymbols = __webpack_require__(/*! ./_getSymbols */ "../node_modules/lodash/_getSymbols.js");
5505
5506/**
5507 * Copies own symbols of `source` to `object`.
5508 *
5509 * @private
5510 * @param {Object} source The object to copy symbols from.
5511 * @param {Object} [object={}] The object to copy symbols to.
5512 * @returns {Object} Returns `object`.
5513 */
5514function copySymbols(source, object) {
5515 return copyObject(source, getSymbols(source), object);
5516}
5517
5518module.exports = copySymbols;
5519
5520
5521/***/ }),
5522
5523/***/ "../node_modules/lodash/_copySymbolsIn.js":
5524/*!************************************************!*\
5525 !*** ../node_modules/lodash/_copySymbolsIn.js ***!
5526 \************************************************/
5527/*! no static exports found */
5528/***/ (function(module, exports, __webpack_require__) {
5529
5530var copyObject = __webpack_require__(/*! ./_copyObject */ "../node_modules/lodash/_copyObject.js"),
5531 getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "../node_modules/lodash/_getSymbolsIn.js");
5532
5533/**
5534 * Copies own and inherited symbols of `source` to `object`.
5535 *
5536 * @private
5537 * @param {Object} source The object to copy symbols from.
5538 * @param {Object} [object={}] The object to copy symbols to.
5539 * @returns {Object} Returns `object`.
5540 */
5541function copySymbolsIn(source, object) {
5542 return copyObject(source, getSymbolsIn(source), object);
5543}
5544
5545module.exports = copySymbolsIn;
5546
5547
5548/***/ }),
5549
5550/***/ "../node_modules/lodash/_defineProperty.js":
5551/*!*************************************************!*\
5552 !*** ../node_modules/lodash/_defineProperty.js ***!
5553 \*************************************************/
5554/*! no static exports found */
5555/***/ (function(module, exports, __webpack_require__) {
5556
5557var getNative = __webpack_require__(/*! ./_getNative */ "../node_modules/lodash/_getNative.js");
5558
5559var defineProperty = (function() {
5560 try {
5561 var func = getNative(Object, 'defineProperty');
5562 func({}, '', {});
5563 return func;
5564 } catch (e) {}
5565}());
5566
5567module.exports = defineProperty;
5568
5569
5570/***/ }),
5571
5572/***/ "../node_modules/lodash/_freeGlobal.js":
5573/*!*********************************************!*\
5574 !*** ../node_modules/lodash/_freeGlobal.js ***!
5575 \*********************************************/
5576/*! no static exports found */
5577/***/ (function(module, exports, __webpack_require__) {
5578
5579/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
5580var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
5581
5582module.exports = freeGlobal;
5583
5584/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
5585
5586/***/ }),
5587
5588/***/ "../node_modules/lodash/_getAllKeys.js":
5589/*!*********************************************!*\
5590 !*** ../node_modules/lodash/_getAllKeys.js ***!
5591 \*********************************************/
5592/*! no static exports found */
5593/***/ (function(module, exports, __webpack_require__) {
5594
5595var overArg = __webpack_require__(/*! ./_overArg */ "../node_modules/lodash/_overArg.js");
5596
5597/* Built-in method references for those with the same name as other `lodash` methods. */
5598var nativeKeys = overArg(Object.keys, Object);
5599
5600module.exports = nativeKeys;
5601
5602
5603/***/ }),
5604
5605/***/ "../node_modules/lodash/_getAllKeysIn.js":
5606/*!***********************************************!*\
5607 !*** ../node_modules/lodash/_getAllKeysIn.js ***!
5608 \***********************************************/
5609/*! no static exports found */
5610/***/ (function(module, exports) {
5611
5612/**
5613 * This function is like
5614 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
5615 * except that it includes inherited enumerable properties.
5616 *
5617 * @private
5618 * @param {Object} object The object to query.
5619 * @returns {Array} Returns the array of property names.
5620 */
5621function nativeKeysIn(object) {
5622 var result = [];
5623 if (object != null) {
5624 for (var key in Object(object)) {
5625 result.push(key);
5626 }
5627 }
5628 return result;
5629}
5630
5631module.exports = nativeKeysIn;
5632
5633
5634/***/ }),
5635
5636/***/ "../node_modules/lodash/_getMapData.js":
5637/*!*********************************************!*\
5638 !*** ../node_modules/lodash/_getMapData.js ***!
5639 \*********************************************/
5640/*! no static exports found */
5641/***/ (function(module, exports, __webpack_require__) {
5642
5643var isKeyable = __webpack_require__(/*! ./_isKeyable */ "../node_modules/lodash/_isKeyable.js");
5644
5645/**
5646 * Gets the data for `map`.
5647 *
5648 * @private
5649 * @param {Object} map The map to query.
5650 * @param {string} key The reference key.
5651 * @returns {*} Returns the map data.
5652 */
5653function getMapData(map, key) {
5654 var data = map.__data__;
5655 return isKeyable(key)
5656 ? data[typeof key == 'string' ? 'string' : 'hash']
5657 : data.map;
5658}
5659
5660module.exports = getMapData;
5661
5662
5663/***/ }),
5664
5665/***/ "../node_modules/lodash/_getNative.js":
5666/*!********************************************!*\
5667 !*** ../node_modules/lodash/_getNative.js ***!
5668 \********************************************/
5669/*! no static exports found */
5670/***/ (function(module, exports) {
5671
5672/**
5673 * Gets the value at `key` of `object`.
5674 *
5675 * @private
5676 * @param {Object} [object] The object to query.
5677 * @param {string} key The key of the property to get.
5678 * @returns {*} Returns the property value.
5679 */
5680function getValue(object, key) {
5681 return object == null ? undefined : object[key];
5682}
5683
5684module.exports = getValue;
5685
5686
5687/***/ }),
5688
5689/***/ "../node_modules/lodash/_getPrototype.js":
5690/*!***********************************************!*\
5691 !*** ../node_modules/lodash/_getPrototype.js ***!
5692 \***********************************************/
5693/*! no static exports found */
5694/***/ (function(module, exports, __webpack_require__) {
5695
5696var overArg = __webpack_require__(/*! ./_overArg */ "../node_modules/lodash/_overArg.js");
5697
5698/** Built-in value references. */
5699var getPrototype = overArg(Object.getPrototypeOf, Object);
5700
5701module.exports = getPrototype;
5702
5703
5704/***/ }),
5705
5706/***/ "../node_modules/lodash/_getSymbols.js":
5707/*!*********************************************!*\
5708 !*** ../node_modules/lodash/_getSymbols.js ***!
5709 \*********************************************/
5710/*! no static exports found */
5711/***/ (function(module, exports) {
5712
5713/**
5714 * This method returns a new empty array.
5715 *
5716 * @static
5717 * @memberOf _
5718 * @since 4.13.0
5719 * @category Util
5720 * @returns {Array} Returns the new empty array.
5721 * @example
5722 *
5723 * var arrays = _.times(2, _.stubArray);
5724 *
5725 * console.log(arrays);
5726 * // => [[], []]
5727 *
5728 * console.log(arrays[0] === arrays[1]);
5729 * // => false
5730 */
5731function stubArray() {
5732 return [];
5733}
5734
5735module.exports = stubArray;
5736
5737
5738/***/ }),
5739
5740/***/ "../node_modules/lodash/_getSymbolsIn.js":
5741/*!***********************************************!*\
5742 !*** ../node_modules/lodash/_getSymbolsIn.js ***!
5743 \***********************************************/
5744/*! no static exports found */
5745/***/ (function(module, exports) {
5746
5747/**
5748 * This method returns a new empty array.
5749 *
5750 * @static
5751 * @memberOf _
5752 * @since 4.13.0
5753 * @category Util
5754 * @returns {Array} Returns the new empty array.
5755 * @example
5756 *
5757 * var arrays = _.times(2, _.stubArray);
5758 *
5759 * console.log(arrays);
5760 * // => [[], []]
5761 *
5762 * console.log(arrays[0] === arrays[1]);
5763 * // => false
5764 */
5765function stubArray() {
5766 return [];
5767}
5768
5769module.exports = stubArray;
5770
5771
5772/***/ }),
5773
5774/***/ "../node_modules/lodash/_getTag.js":
5775/*!*****************************************!*\
5776 !*** ../node_modules/lodash/_getTag.js ***!
5777 \*****************************************/
5778/*! no static exports found */
5779/***/ (function(module, exports) {
5780
5781/** Used for built-in method references. */
5782var objectProto = Object.prototype;
5783
5784/**
5785 * Used to resolve the
5786 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
5787 * of values.
5788 */
5789var nativeObjectToString = objectProto.toString;
5790
5791/**
5792 * Converts `value` to a string using `Object.prototype.toString`.
5793 *
5794 * @private
5795 * @param {*} value The value to convert.
5796 * @returns {string} Returns the converted string.
5797 */
5798function objectToString(value) {
5799 return nativeObjectToString.call(value);
5800}
5801
5802module.exports = objectToString;
5803
5804
5805/***/ }),
5806
5807/***/ "../node_modules/lodash/_hashClear.js":
5808/*!********************************************!*\
5809 !*** ../node_modules/lodash/_hashClear.js ***!
5810 \********************************************/
5811/*! no static exports found */
5812/***/ (function(module, exports, __webpack_require__) {
5813
5814var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "../node_modules/lodash/_nativeCreate.js");
5815
5816/**
5817 * Removes all key-value entries from the hash.
5818 *
5819 * @private
5820 * @name clear
5821 * @memberOf Hash
5822 */
5823function hashClear() {
5824 this.__data__ = nativeCreate ? nativeCreate(null) : {};
5825 this.size = 0;
5826}
5827
5828module.exports = hashClear;
5829
5830
5831/***/ }),
5832
5833/***/ "../node_modules/lodash/_hashDelete.js":
5834/*!*********************************************!*\
5835 !*** ../node_modules/lodash/_hashDelete.js ***!
5836 \*********************************************/
5837/*! no static exports found */
5838/***/ (function(module, exports) {
5839
5840/**
5841 * Removes `key` and its value from the hash.
5842 *
5843 * @private
5844 * @name delete
5845 * @memberOf Hash
5846 * @param {Object} hash The hash to modify.
5847 * @param {string} key The key of the value to remove.
5848 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
5849 */
5850function hashDelete(key) {
5851 var result = this.has(key) && delete this.__data__[key];
5852 this.size -= result ? 1 : 0;
5853 return result;
5854}
5855
5856module.exports = hashDelete;
5857
5858
5859/***/ }),
5860
5861/***/ "../node_modules/lodash/_hashGet.js":
5862/*!******************************************!*\
5863 !*** ../node_modules/lodash/_hashGet.js ***!
5864 \******************************************/
5865/*! no static exports found */
5866/***/ (function(module, exports, __webpack_require__) {
5867
5868var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "../node_modules/lodash/_nativeCreate.js");
5869
5870/** Used to stand-in for `undefined` hash values. */
5871var HASH_UNDEFINED = '__lodash_hash_undefined__';
5872
5873/** Used for built-in method references. */
5874var objectProto = Object.prototype;
5875
5876/** Used to check objects for own properties. */
5877var hasOwnProperty = objectProto.hasOwnProperty;
5878
5879/**
5880 * Gets the hash value for `key`.
5881 *
5882 * @private
5883 * @name get
5884 * @memberOf Hash
5885 * @param {string} key The key of the value to get.
5886 * @returns {*} Returns the entry value.
5887 */
5888function hashGet(key) {
5889 var data = this.__data__;
5890 if (nativeCreate) {
5891 var result = data[key];
5892 return result === HASH_UNDEFINED ? undefined : result;
5893 }
5894 return hasOwnProperty.call(data, key) ? data[key] : undefined;
5895}
5896
5897module.exports = hashGet;
5898
5899
5900/***/ }),
5901
5902/***/ "../node_modules/lodash/_hashHas.js":
5903/*!******************************************!*\
5904 !*** ../node_modules/lodash/_hashHas.js ***!
5905 \******************************************/
5906/*! no static exports found */
5907/***/ (function(module, exports, __webpack_require__) {
5908
5909var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "../node_modules/lodash/_nativeCreate.js");
5910
5911/** Used for built-in method references. */
5912var objectProto = Object.prototype;
5913
5914/** Used to check objects for own properties. */
5915var hasOwnProperty = objectProto.hasOwnProperty;
5916
5917/**
5918 * Checks if a hash value for `key` exists.
5919 *
5920 * @private
5921 * @name has
5922 * @memberOf Hash
5923 * @param {string} key The key of the entry to check.
5924 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
5925 */
5926function hashHas(key) {
5927 var data = this.__data__;
5928 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
5929}
5930
5931module.exports = hashHas;
5932
5933
5934/***/ }),
5935
5936/***/ "../node_modules/lodash/_hashSet.js":
5937/*!******************************************!*\
5938 !*** ../node_modules/lodash/_hashSet.js ***!
5939 \******************************************/
5940/*! no static exports found */
5941/***/ (function(module, exports, __webpack_require__) {
5942
5943var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "../node_modules/lodash/_nativeCreate.js");
5944
5945/** Used to stand-in for `undefined` hash values. */
5946var HASH_UNDEFINED = '__lodash_hash_undefined__';
5947
5948/**
5949 * Sets the hash `key` to `value`.
5950 *
5951 * @private
5952 * @name set
5953 * @memberOf Hash
5954 * @param {string} key The key of the value to set.
5955 * @param {*} value The value to set.
5956 * @returns {Object} Returns the hash instance.
5957 */
5958function hashSet(key, value) {
5959 var data = this.__data__;
5960 this.size += this.has(key) ? 0 : 1;
5961 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
5962 return this;
5963}
5964
5965module.exports = hashSet;
5966
5967
5968/***/ }),
5969
5970/***/ "../node_modules/lodash/_initCloneArray.js":
5971/*!*************************************************!*\
5972 !*** ../node_modules/lodash/_initCloneArray.js ***!
5973 \*************************************************/
5974/*! no static exports found */
5975/***/ (function(module, exports) {
5976
5977/** Used for built-in method references. */
5978var objectProto = Object.prototype;
5979
5980/** Used to check objects for own properties. */
5981var hasOwnProperty = objectProto.hasOwnProperty;
5982
5983/**
5984 * Initializes an array clone.
5985 *
5986 * @private
5987 * @param {Array} array The array to clone.
5988 * @returns {Array} Returns the initialized clone.
5989 */
5990function initCloneArray(array) {
5991 var length = array.length,
5992 result = new array.constructor(length);
5993
5994 // Add properties assigned by `RegExp#exec`.
5995 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
5996 result.index = array.index;
5997 result.input = array.input;
5998 }
5999 return result;
6000}
6001
6002module.exports = initCloneArray;
6003
6004
6005/***/ }),
6006
6007/***/ "../node_modules/lodash/_initCloneByTag.js":
6008/*!*************************************************!*\
6009 !*** ../node_modules/lodash/_initCloneByTag.js ***!
6010 \*************************************************/
6011/*! no static exports found */
6012/***/ (function(module, exports) {
6013
6014/**
6015 * This method returns the first argument it receives.
6016 *
6017 * @static
6018 * @since 0.1.0
6019 * @memberOf _
6020 * @category Util
6021 * @param {*} value Any value.
6022 * @returns {*} Returns `value`.
6023 * @example
6024 *
6025 * var object = { 'a': 1 };
6026 *
6027 * console.log(_.identity(object) === object);
6028 * // => true
6029 */
6030function identity(value) {
6031 return value;
6032}
6033
6034module.exports = identity;
6035
6036
6037/***/ }),
6038
6039/***/ "../node_modules/lodash/_initCloneObject.js":
6040/*!**************************************************!*\
6041 !*** ../node_modules/lodash/_initCloneObject.js ***!
6042 \**************************************************/
6043/*! no static exports found */
6044/***/ (function(module, exports, __webpack_require__) {
6045
6046var baseCreate = __webpack_require__(/*! ./_baseCreate */ "../node_modules/lodash/_baseCreate.js"),
6047 getPrototype = __webpack_require__(/*! ./_getPrototype */ "../node_modules/lodash/_getPrototype.js"),
6048 isPrototype = __webpack_require__(/*! ./_isPrototype */ "../node_modules/lodash/_isPrototype.js");
6049
6050/**
6051 * Initializes an object clone.
6052 *
6053 * @private
6054 * @param {Object} object The object to clone.
6055 * @returns {Object} Returns the initialized clone.
6056 */
6057function initCloneObject(object) {
6058 return (typeof object.constructor == 'function' && !isPrototype(object))
6059 ? baseCreate(getPrototype(object))
6060 : {};
6061}
6062
6063module.exports = initCloneObject;
6064
6065
6066/***/ }),
6067
6068/***/ "../node_modules/lodash/_isKeyable.js":
6069/*!********************************************!*\
6070 !*** ../node_modules/lodash/_isKeyable.js ***!
6071 \********************************************/
6072/*! no static exports found */
6073/***/ (function(module, exports) {
6074
6075/**
6076 * Checks if `value` is suitable for use as unique object key.
6077 *
6078 * @private
6079 * @param {*} value The value to check.
6080 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
6081 */
6082function isKeyable(value) {
6083 var type = typeof value;
6084 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
6085 ? (value !== '__proto__')
6086 : (value === null);
6087}
6088
6089module.exports = isKeyable;
6090
6091
6092/***/ }),
6093
6094/***/ "../node_modules/lodash/_isPrototype.js":
6095/*!**********************************************!*\
6096 !*** ../node_modules/lodash/_isPrototype.js ***!
6097 \**********************************************/
6098/*! no static exports found */
6099/***/ (function(module, exports) {
6100
6101/**
6102 * This method returns `false`.
6103 *
6104 * @static
6105 * @memberOf _
6106 * @since 4.13.0
6107 * @category Util
6108 * @returns {boolean} Returns `false`.
6109 * @example
6110 *
6111 * _.times(2, _.stubFalse);
6112 * // => [false, false]
6113 */
6114function stubFalse() {
6115 return false;
6116}
6117
6118module.exports = stubFalse;
6119
6120
6121/***/ }),
6122
6123/***/ "../node_modules/lodash/_listCacheClear.js":
6124/*!*************************************************!*\
6125 !*** ../node_modules/lodash/_listCacheClear.js ***!
6126 \*************************************************/
6127/*! no static exports found */
6128/***/ (function(module, exports) {
6129
6130/**
6131 * Removes all key-value entries from the list cache.
6132 *
6133 * @private
6134 * @name clear
6135 * @memberOf ListCache
6136 */
6137function listCacheClear() {
6138 this.__data__ = [];
6139 this.size = 0;
6140}
6141
6142module.exports = listCacheClear;
6143
6144
6145/***/ }),
6146
6147/***/ "../node_modules/lodash/_listCacheDelete.js":
6148/*!**************************************************!*\
6149 !*** ../node_modules/lodash/_listCacheDelete.js ***!
6150 \**************************************************/
6151/*! no static exports found */
6152/***/ (function(module, exports, __webpack_require__) {
6153
6154var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "../node_modules/lodash/_assocIndexOf.js");
6155
6156/** Used for built-in method references. */
6157var arrayProto = Array.prototype;
6158
6159/** Built-in value references. */
6160var splice = arrayProto.splice;
6161
6162/**
6163 * Removes `key` and its value from the list cache.
6164 *
6165 * @private
6166 * @name delete
6167 * @memberOf ListCache
6168 * @param {string} key The key of the value to remove.
6169 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
6170 */
6171function listCacheDelete(key) {
6172 var data = this.__data__,
6173 index = assocIndexOf(data, key);
6174
6175 if (index < 0) {
6176 return false;
6177 }
6178 var lastIndex = data.length - 1;
6179 if (index == lastIndex) {
6180 data.pop();
6181 } else {
6182 splice.call(data, index, 1);
6183 }
6184 --this.size;
6185 return true;
6186}
6187
6188module.exports = listCacheDelete;
6189
6190
6191/***/ }),
6192
6193/***/ "../node_modules/lodash/_listCacheGet.js":
6194/*!***********************************************!*\
6195 !*** ../node_modules/lodash/_listCacheGet.js ***!
6196 \***********************************************/
6197/*! no static exports found */
6198/***/ (function(module, exports, __webpack_require__) {
6199
6200var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "../node_modules/lodash/_assocIndexOf.js");
6201
6202/**
6203 * Gets the list cache value for `key`.
6204 *
6205 * @private
6206 * @name get
6207 * @memberOf ListCache
6208 * @param {string} key The key of the value to get.
6209 * @returns {*} Returns the entry value.
6210 */
6211function listCacheGet(key) {
6212 var data = this.__data__,
6213 index = assocIndexOf(data, key);
6214
6215 return index < 0 ? undefined : data[index][1];
6216}
6217
6218module.exports = listCacheGet;
6219
6220
6221/***/ }),
6222
6223/***/ "../node_modules/lodash/_listCacheHas.js":
6224/*!***********************************************!*\
6225 !*** ../node_modules/lodash/_listCacheHas.js ***!
6226 \***********************************************/
6227/*! no static exports found */
6228/***/ (function(module, exports, __webpack_require__) {
6229
6230var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "../node_modules/lodash/_assocIndexOf.js");
6231
6232/**
6233 * Checks if a list cache value for `key` exists.
6234 *
6235 * @private
6236 * @name has
6237 * @memberOf ListCache
6238 * @param {string} key The key of the entry to check.
6239 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
6240 */
6241function listCacheHas(key) {
6242 return assocIndexOf(this.__data__, key) > -1;
6243}
6244
6245module.exports = listCacheHas;
6246
6247
6248/***/ }),
6249
6250/***/ "../node_modules/lodash/_listCacheSet.js":
6251/*!***********************************************!*\
6252 !*** ../node_modules/lodash/_listCacheSet.js ***!
6253 \***********************************************/
6254/*! no static exports found */
6255/***/ (function(module, exports, __webpack_require__) {
6256
6257var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "../node_modules/lodash/_assocIndexOf.js");
6258
6259/**
6260 * Sets the list cache `key` to `value`.
6261 *
6262 * @private
6263 * @name set
6264 * @memberOf ListCache
6265 * @param {string} key The key of the value to set.
6266 * @param {*} value The value to set.
6267 * @returns {Object} Returns the list cache instance.
6268 */
6269function listCacheSet(key, value) {
6270 var data = this.__data__,
6271 index = assocIndexOf(data, key);
6272
6273 if (index < 0) {
6274 ++this.size;
6275 data.push([key, value]);
6276 } else {
6277 data[index][1] = value;
6278 }
6279 return this;
6280}
6281
6282module.exports = listCacheSet;
6283
6284
6285/***/ }),
6286
6287/***/ "../node_modules/lodash/_mapCacheClear.js":
6288/*!************************************************!*\
6289 !*** ../node_modules/lodash/_mapCacheClear.js ***!
6290 \************************************************/
6291/*! no static exports found */
6292/***/ (function(module, exports, __webpack_require__) {
6293
6294var Hash = __webpack_require__(/*! ./_Hash */ "../node_modules/lodash/_Hash.js"),
6295 ListCache = __webpack_require__(/*! ./_ListCache */ "../node_modules/lodash/_ListCache.js"),
6296 Map = __webpack_require__(/*! ./_Map */ "../node_modules/lodash/_Map.js");
6297
6298/**
6299 * Removes all key-value entries from the map.
6300 *
6301 * @private
6302 * @name clear
6303 * @memberOf MapCache
6304 */
6305function mapCacheClear() {
6306 this.size = 0;
6307 this.__data__ = {
6308 'hash': new Hash,
6309 'map': new (Map || ListCache),
6310 'string': new Hash
6311 };
6312}
6313
6314module.exports = mapCacheClear;
6315
6316
6317/***/ }),
6318
6319/***/ "../node_modules/lodash/_mapCacheDelete.js":
6320/*!*************************************************!*\
6321 !*** ../node_modules/lodash/_mapCacheDelete.js ***!
6322 \*************************************************/
6323/*! no static exports found */
6324/***/ (function(module, exports, __webpack_require__) {
6325
6326var getMapData = __webpack_require__(/*! ./_getMapData */ "../node_modules/lodash/_getMapData.js");
6327
6328/**
6329 * Removes `key` and its value from the map.
6330 *
6331 * @private
6332 * @name delete
6333 * @memberOf MapCache
6334 * @param {string} key The key of the value to remove.
6335 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
6336 */
6337function mapCacheDelete(key) {
6338 var result = getMapData(this, key)['delete'](key);
6339 this.size -= result ? 1 : 0;
6340 return result;
6341}
6342
6343module.exports = mapCacheDelete;
6344
6345
6346/***/ }),
6347
6348/***/ "../node_modules/lodash/_mapCacheGet.js":
6349/*!**********************************************!*\
6350 !*** ../node_modules/lodash/_mapCacheGet.js ***!
6351 \**********************************************/
6352/*! no static exports found */
6353/***/ (function(module, exports, __webpack_require__) {
6354
6355var getMapData = __webpack_require__(/*! ./_getMapData */ "../node_modules/lodash/_getMapData.js");
6356
6357/**
6358 * Gets the map value for `key`.
6359 *
6360 * @private
6361 * @name get
6362 * @memberOf MapCache
6363 * @param {string} key The key of the value to get.
6364 * @returns {*} Returns the entry value.
6365 */
6366function mapCacheGet(key) {
6367 return getMapData(this, key).get(key);
6368}
6369
6370module.exports = mapCacheGet;
6371
6372
6373/***/ }),
6374
6375/***/ "../node_modules/lodash/_mapCacheHas.js":
6376/*!**********************************************!*\
6377 !*** ../node_modules/lodash/_mapCacheHas.js ***!
6378 \**********************************************/
6379/*! no static exports found */
6380/***/ (function(module, exports, __webpack_require__) {
6381
6382var getMapData = __webpack_require__(/*! ./_getMapData */ "../node_modules/lodash/_getMapData.js");
6383
6384/**
6385 * Checks if a map value for `key` exists.
6386 *
6387 * @private
6388 * @name has
6389 * @memberOf MapCache
6390 * @param {string} key The key of the entry to check.
6391 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
6392 */
6393function mapCacheHas(key) {
6394 return getMapData(this, key).has(key);
6395}
6396
6397module.exports = mapCacheHas;
6398
6399
6400/***/ }),
6401
6402/***/ "../node_modules/lodash/_mapCacheSet.js":
6403/*!**********************************************!*\
6404 !*** ../node_modules/lodash/_mapCacheSet.js ***!
6405 \**********************************************/
6406/*! no static exports found */
6407/***/ (function(module, exports, __webpack_require__) {
6408
6409var getMapData = __webpack_require__(/*! ./_getMapData */ "../node_modules/lodash/_getMapData.js");
6410
6411/**
6412 * Sets the map `key` to `value`.
6413 *
6414 * @private
6415 * @name set
6416 * @memberOf MapCache
6417 * @param {string} key The key of the value to set.
6418 * @param {*} value The value to set.
6419 * @returns {Object} Returns the map cache instance.
6420 */
6421function mapCacheSet(key, value) {
6422 var data = getMapData(this, key),
6423 size = data.size;
6424
6425 data.set(key, value);
6426 this.size += data.size == size ? 0 : 1;
6427 return this;
6428}
6429
6430module.exports = mapCacheSet;
6431
6432
6433/***/ }),
6434
6435/***/ "../node_modules/lodash/_nativeCreate.js":
6436/*!***********************************************!*\
6437 !*** ../node_modules/lodash/_nativeCreate.js ***!
6438 \***********************************************/
6439/*! no static exports found */
6440/***/ (function(module, exports, __webpack_require__) {
6441
6442var getNative = __webpack_require__(/*! ./_getNative */ "../node_modules/lodash/_getNative.js");
6443
6444/* Built-in method references that are verified to be native. */
6445var nativeCreate = getNative(Object, 'create');
6446
6447module.exports = nativeCreate;
6448
6449
6450/***/ }),
6451
6452/***/ "../node_modules/lodash/_overArg.js":
6453/*!******************************************!*\
6454 !*** ../node_modules/lodash/_overArg.js ***!
6455 \******************************************/
6456/*! no static exports found */
6457/***/ (function(module, exports) {
6458
6459/**
6460 * Creates a unary function that invokes `func` with its argument transformed.
6461 *
6462 * @private
6463 * @param {Function} func The function to wrap.
6464 * @param {Function} transform The argument transform.
6465 * @returns {Function} Returns the new function.
6466 */
6467function overArg(func, transform) {
6468 return function(arg) {
6469 return func(transform(arg));
6470 };
6471}
6472
6473module.exports = overArg;
6474
6475
6476/***/ }),
6477
6478/***/ "../node_modules/lodash/_root.js":
6479/*!***************************************!*\
6480 !*** ../node_modules/lodash/_root.js ***!
6481 \***************************************/
6482/*! no static exports found */
6483/***/ (function(module, exports, __webpack_require__) {
6484
6485var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "../node_modules/lodash/_freeGlobal.js");
6486
6487/** Detect free variable `self`. */
6488var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
6489
6490/** Used as a reference to the global object. */
6491var root = freeGlobal || freeSelf || Function('return this')();
6492
6493module.exports = root;
6494
6495
6496/***/ }),
6497
6498/***/ "../node_modules/lodash/_stackClear.js":
6499/*!*********************************************!*\
6500 !*** ../node_modules/lodash/_stackClear.js ***!
6501 \*********************************************/
6502/*! no static exports found */
6503/***/ (function(module, exports, __webpack_require__) {
6504
6505var ListCache = __webpack_require__(/*! ./_ListCache */ "../node_modules/lodash/_ListCache.js");
6506
6507/**
6508 * Removes all key-value entries from the stack.
6509 *
6510 * @private
6511 * @name clear
6512 * @memberOf Stack
6513 */
6514function stackClear() {
6515 this.__data__ = new ListCache;
6516 this.size = 0;
6517}
6518
6519module.exports = stackClear;
6520
6521
6522/***/ }),
6523
6524/***/ "../node_modules/lodash/_stackDelete.js":
6525/*!**********************************************!*\
6526 !*** ../node_modules/lodash/_stackDelete.js ***!
6527 \**********************************************/
6528/*! no static exports found */
6529/***/ (function(module, exports) {
6530
6531/**
6532 * Removes `key` and its value from the stack.
6533 *
6534 * @private
6535 * @name delete
6536 * @memberOf Stack
6537 * @param {string} key The key of the value to remove.
6538 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
6539 */
6540function stackDelete(key) {
6541 var data = this.__data__,
6542 result = data['delete'](key);
6543
6544 this.size = data.size;
6545 return result;
6546}
6547
6548module.exports = stackDelete;
6549
6550
6551/***/ }),
6552
6553/***/ "../node_modules/lodash/_stackGet.js":
6554/*!*******************************************!*\
6555 !*** ../node_modules/lodash/_stackGet.js ***!
6556 \*******************************************/
6557/*! no static exports found */
6558/***/ (function(module, exports) {
6559
6560/**
6561 * Gets the stack value for `key`.
6562 *
6563 * @private
6564 * @name get
6565 * @memberOf Stack
6566 * @param {string} key The key of the value to get.
6567 * @returns {*} Returns the entry value.
6568 */
6569function stackGet(key) {
6570 return this.__data__.get(key);
6571}
6572
6573module.exports = stackGet;
6574
6575
6576/***/ }),
6577
6578/***/ "../node_modules/lodash/_stackHas.js":
6579/*!*******************************************!*\
6580 !*** ../node_modules/lodash/_stackHas.js ***!
6581 \*******************************************/
6582/*! no static exports found */
6583/***/ (function(module, exports) {
6584
6585/**
6586 * Checks if a stack value for `key` exists.
6587 *
6588 * @private
6589 * @name has
6590 * @memberOf Stack
6591 * @param {string} key The key of the entry to check.
6592 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
6593 */
6594function stackHas(key) {
6595 return this.__data__.has(key);
6596}
6597
6598module.exports = stackHas;
6599
6600
6601/***/ }),
6602
6603/***/ "../node_modules/lodash/_stackSet.js":
6604/*!*******************************************!*\
6605 !*** ../node_modules/lodash/_stackSet.js ***!
6606 \*******************************************/
6607/*! no static exports found */
6608/***/ (function(module, exports, __webpack_require__) {
6609
6610var ListCache = __webpack_require__(/*! ./_ListCache */ "../node_modules/lodash/_ListCache.js"),
6611 Map = __webpack_require__(/*! ./_Map */ "../node_modules/lodash/_Map.js"),
6612 MapCache = __webpack_require__(/*! ./_MapCache */ "../node_modules/lodash/_MapCache.js");
6613
6614/** Used as the size to enable large array optimizations. */
6615var LARGE_ARRAY_SIZE = 200;
6616
6617/**
6618 * Sets the stack `key` to `value`.
6619 *
6620 * @private
6621 * @name set
6622 * @memberOf Stack
6623 * @param {string} key The key of the value to set.
6624 * @param {*} value The value to set.
6625 * @returns {Object} Returns the stack cache instance.
6626 */
6627function stackSet(key, value) {
6628 var data = this.__data__;
6629 if (data instanceof ListCache) {
6630 var pairs = data.__data__;
6631 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
6632 pairs.push([key, value]);
6633 this.size = ++data.size;
6634 return this;
6635 }
6636 data = this.__data__ = new MapCache(pairs);
6637 }
6638 data.set(key, value);
6639 this.size = data.size;
6640 return this;
6641}
6642
6643module.exports = stackSet;
6644
6645
6646/***/ }),
6647
6648/***/ "../node_modules/lodash/cloneDeep.js":
6649/*!*******************************************!*\
6650 !*** ../node_modules/lodash/cloneDeep.js ***!
6651 \*******************************************/
6652/*! no static exports found */
6653/***/ (function(module, exports, __webpack_require__) {
6654
6655var baseClone = __webpack_require__(/*! ./_baseClone */ "../node_modules/lodash/_baseClone.js");
6656
6657/** Used to compose bitmasks for cloning. */
6658var CLONE_DEEP_FLAG = 1,
6659 CLONE_SYMBOLS_FLAG = 4;
6660
6661/**
6662 * This method is like `_.clone` except that it recursively clones `value`.
6663 *
6664 * @static
6665 * @memberOf _
6666 * @since 1.0.0
6667 * @category Lang
6668 * @param {*} value The value to recursively clone.
6669 * @returns {*} Returns the deep cloned value.
6670 * @see _.clone
6671 * @example
6672 *
6673 * var objects = [{ 'a': 1 }, { 'b': 2 }];
6674 *
6675 * var deep = _.cloneDeep(objects);
6676 * console.log(deep[0] === objects[0]);
6677 * // => false
6678 */
6679function cloneDeep(value) {
6680 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
6681}
6682
6683module.exports = cloneDeep;
6684
6685
6686/***/ }),
6687
6688/***/ "../node_modules/lodash/eq.js":
6689/*!************************************!*\
6690 !*** ../node_modules/lodash/eq.js ***!
6691 \************************************/
6692/*! no static exports found */
6693/***/ (function(module, exports) {
6694
6695/**
6696 * Performs a
6697 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
6698 * comparison between two values to determine if they are equivalent.
6699 *
6700 * @static
6701 * @memberOf _
6702 * @since 4.0.0
6703 * @category Lang
6704 * @param {*} value The value to compare.
6705 * @param {*} other The other value to compare.
6706 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
6707 * @example
6708 *
6709 * var object = { 'a': 1 };
6710 * var other = { 'a': 1 };
6711 *
6712 * _.eq(object, object);
6713 * // => true
6714 *
6715 * _.eq(object, other);
6716 * // => false
6717 *
6718 * _.eq('a', 'a');
6719 * // => true
6720 *
6721 * _.eq('a', Object('a'));
6722 * // => false
6723 *
6724 * _.eq(NaN, NaN);
6725 * // => true
6726 */
6727function eq(value, other) {
6728 return value === other || (value !== value && other !== other);
6729}
6730
6731module.exports = eq;
6732
6733
6734/***/ }),
6735
6736/***/ "../node_modules/lodash/get.js":
6737/*!*************************************!*\
6738 !*** ../node_modules/lodash/get.js ***!
6739 \*************************************/
6740/*! no static exports found */
6741/***/ (function(module, exports, __webpack_require__) {
6742
6743var baseGet = __webpack_require__(/*! ./_baseGet */ "../node_modules/lodash/_baseGet.js");
6744
6745/**
6746 * Gets the value at `path` of `object`. If the resolved value is
6747 * `undefined`, the `defaultValue` is returned in its place.
6748 *
6749 * @static
6750 * @memberOf _
6751 * @since 3.7.0
6752 * @category Object
6753 * @param {Object} object The object to query.
6754 * @param {Array|string} path The path of the property to get.
6755 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
6756 * @returns {*} Returns the resolved value.
6757 * @example
6758 *
6759 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
6760 *
6761 * _.get(object, 'a[0].b.c');
6762 * // => 3
6763 *
6764 * _.get(object, ['a', '0', 'b', 'c']);
6765 * // => 3
6766 *
6767 * _.get(object, 'a.b.c', 'default');
6768 * // => 'default'
6769 */
6770function get(object, path, defaultValue) {
6771 var result = object == null ? undefined : baseGet(object, path);
6772 return result === undefined ? defaultValue : result;
6773}
6774
6775module.exports = get;
6776
6777
6778/***/ }),
6779
6780/***/ "../node_modules/lodash/isArray.js":
6781/*!*****************************************!*\
6782 !*** ../node_modules/lodash/isArray.js ***!
6783 \*****************************************/
6784/*! no static exports found */
6785/***/ (function(module, exports) {
6786
6787/**
6788 * Checks if `value` is classified as an `Array` object.
6789 *
6790 * @static
6791 * @memberOf _
6792 * @since 0.1.0
6793 * @category Lang
6794 * @param {*} value The value to check.
6795 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
6796 * @example
6797 *
6798 * _.isArray([1, 2, 3]);
6799 * // => true
6800 *
6801 * _.isArray(document.body.children);
6802 * // => false
6803 *
6804 * _.isArray('abc');
6805 * // => false
6806 *
6807 * _.isArray(_.noop);
6808 * // => false
6809 */
6810var isArray = Array.isArray;
6811
6812module.exports = isArray;
6813
6814
6815/***/ }),
6816
6817/***/ "../node_modules/lodash/isBuffer.js":
6818/*!******************************************!*\
6819 !*** ../node_modules/lodash/isBuffer.js ***!
6820 \******************************************/
6821/*! no static exports found */
6822/***/ (function(module, exports) {
6823
6824/**
6825 * This method returns `false`.
6826 *
6827 * @static
6828 * @memberOf _
6829 * @since 4.13.0
6830 * @category Util
6831 * @returns {boolean} Returns `false`.
6832 * @example
6833 *
6834 * _.times(2, _.stubFalse);
6835 * // => [false, false]
6836 */
6837function stubFalse() {
6838 return false;
6839}
6840
6841module.exports = stubFalse;
6842
6843
6844/***/ }),
6845
6846/***/ "../node_modules/lodash/isMap.js":
6847/*!***************************************!*\
6848 !*** ../node_modules/lodash/isMap.js ***!
6849 \***************************************/
6850/*! no static exports found */
6851/***/ (function(module, exports) {
6852
6853/**
6854 * This method returns `false`.
6855 *
6856 * @static
6857 * @memberOf _
6858 * @since 4.13.0
6859 * @category Util
6860 * @returns {boolean} Returns `false`.
6861 * @example
6862 *
6863 * _.times(2, _.stubFalse);
6864 * // => [false, false]
6865 */
6866function stubFalse() {
6867 return false;
6868}
6869
6870module.exports = stubFalse;
6871
6872
6873/***/ }),
6874
6875/***/ "../node_modules/lodash/isObject.js":
6876/*!******************************************!*\
6877 !*** ../node_modules/lodash/isObject.js ***!
6878 \******************************************/
6879/*! no static exports found */
6880/***/ (function(module, exports) {
6881
6882/**
6883 * Checks if `value` is the
6884 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
6885 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
6886 *
6887 * @static
6888 * @memberOf _
6889 * @since 0.1.0
6890 * @category Lang
6891 * @param {*} value The value to check.
6892 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
6893 * @example
6894 *
6895 * _.isObject({});
6896 * // => true
6897 *
6898 * _.isObject([1, 2, 3]);
6899 * // => true
6900 *
6901 * _.isObject(_.noop);
6902 * // => true
6903 *
6904 * _.isObject(null);
6905 * // => false
6906 */
6907function isObject(value) {
6908 var type = typeof value;
6909 return value != null && (type == 'object' || type == 'function');
6910}
6911
6912module.exports = isObject;
6913
6914
6915/***/ }),
6916
6917/***/ "../node_modules/lodash/isObjectLike.js":
6918/*!**********************************************!*\
6919 !*** ../node_modules/lodash/isObjectLike.js ***!
6920 \**********************************************/
6921/*! no static exports found */
6922/***/ (function(module, exports) {
6923
6924/**
6925 * Checks if `value` is object-like. A value is object-like if it's not `null`
6926 * and has a `typeof` result of "object".
6927 *
6928 * @static
6929 * @memberOf _
6930 * @since 4.0.0
6931 * @category Lang
6932 * @param {*} value The value to check.
6933 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
6934 * @example
6935 *
6936 * _.isObjectLike({});
6937 * // => true
6938 *
6939 * _.isObjectLike([1, 2, 3]);
6940 * // => true
6941 *
6942 * _.isObjectLike(_.noop);
6943 * // => false
6944 *
6945 * _.isObjectLike(null);
6946 * // => false
6947 */
6948function isObjectLike(value) {
6949 return value != null && typeof value == 'object';
6950}
6951
6952module.exports = isObjectLike;
6953
6954
6955/***/ }),
6956
6957/***/ "../node_modules/lodash/isPlainObject.js":
6958/*!***********************************************!*\
6959 !*** ../node_modules/lodash/isPlainObject.js ***!
6960 \***********************************************/
6961/*! no static exports found */
6962/***/ (function(module, exports, __webpack_require__) {
6963
6964var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../node_modules/lodash/_baseGetTag.js"),
6965 getPrototype = __webpack_require__(/*! ./_getPrototype */ "../node_modules/lodash/_getPrototype.js"),
6966 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../node_modules/lodash/isObjectLike.js");
6967
6968/** `Object#toString` result references. */
6969var objectTag = '[object Object]';
6970
6971/** Used for built-in method references. */
6972var funcProto = Function.prototype,
6973 objectProto = Object.prototype;
6974
6975/** Used to resolve the decompiled source of functions. */
6976var funcToString = funcProto.toString;
6977
6978/** Used to check objects for own properties. */
6979var hasOwnProperty = objectProto.hasOwnProperty;
6980
6981/** Used to infer the `Object` constructor. */
6982var objectCtorString = funcToString.call(Object);
6983
6984/**
6985 * Checks if `value` is a plain object, that is, an object created by the
6986 * `Object` constructor or one with a `[[Prototype]]` of `null`.
6987 *
6988 * @static
6989 * @memberOf _
6990 * @since 0.8.0
6991 * @category Lang
6992 * @param {*} value The value to check.
6993 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
6994 * @example
6995 *
6996 * function Foo() {
6997 * this.a = 1;
6998 * }
6999 *
7000 * _.isPlainObject(new Foo);
7001 * // => false
7002 *
7003 * _.isPlainObject([1, 2, 3]);
7004 * // => false
7005 *
7006 * _.isPlainObject({ 'x': 0, 'y': 0 });
7007 * // => true
7008 *
7009 * _.isPlainObject(Object.create(null));
7010 * // => true
7011 */
7012function isPlainObject(value) {
7013 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
7014 return false;
7015 }
7016 var proto = getPrototype(value);
7017 if (proto === null) {
7018 return true;
7019 }
7020 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
7021 return typeof Ctor == 'function' && Ctor instanceof Ctor &&
7022 funcToString.call(Ctor) == objectCtorString;
7023}
7024
7025module.exports = isPlainObject;
7026
7027
7028/***/ }),
7029
7030/***/ "../node_modules/lodash/isSet.js":
7031/*!***************************************!*\
7032 !*** ../node_modules/lodash/isSet.js ***!
7033 \***************************************/
7034/*! no static exports found */
7035/***/ (function(module, exports) {
7036
7037/**
7038 * This method returns `false`.
7039 *
7040 * @static
7041 * @memberOf _
7042 * @since 4.13.0
7043 * @category Util
7044 * @returns {boolean} Returns `false`.
7045 * @example
7046 *
7047 * _.times(2, _.stubFalse);
7048 * // => [false, false]
7049 */
7050function stubFalse() {
7051 return false;
7052}
7053
7054module.exports = stubFalse;
7055
7056
7057/***/ }),
7058
7059/***/ "../node_modules/lodash/keys.js":
7060/*!**************************************!*\
7061 !*** ../node_modules/lodash/keys.js ***!
7062 \**************************************/
7063/*! no static exports found */
7064/***/ (function(module, exports, __webpack_require__) {
7065
7066var overArg = __webpack_require__(/*! ./_overArg */ "../node_modules/lodash/_overArg.js");
7067
7068/* Built-in method references for those with the same name as other `lodash` methods. */
7069var nativeKeys = overArg(Object.keys, Object);
7070
7071module.exports = nativeKeys;
7072
7073
7074/***/ }),
7075
7076/***/ "../node_modules/lodash/keysIn.js":
7077/*!****************************************!*\
7078 !*** ../node_modules/lodash/keysIn.js ***!
7079 \****************************************/
7080/*! no static exports found */
7081/***/ (function(module, exports) {
7082
7083/**
7084 * This function is like
7085 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
7086 * except that it includes inherited enumerable properties.
7087 *
7088 * @private
7089 * @param {Object} object The object to query.
7090 * @returns {Array} Returns the array of property names.
7091 */
7092function nativeKeysIn(object) {
7093 var result = [];
7094 if (object != null) {
7095 for (var key in Object(object)) {
7096 result.push(key);
7097 }
7098 }
7099 return result;
7100}
7101
7102module.exports = nativeKeysIn;
7103
7104
7105/***/ }),
7106
7107/***/ "../node_modules/process/browser.js":
7108/*!******************************************!*\
7109 !*** ../node_modules/process/browser.js ***!
7110 \******************************************/
7111/*! no static exports found */
7112/***/ (function(module, exports) {
7113
7114// shim for using process in browser
7115var process = module.exports = {};
7116
7117// cached from whatever global is present so that test runners that stub it
7118// don't break things. But we need to wrap it in a try catch in case it is
7119// wrapped in strict mode code which doesn't define any globals. It's inside a
7120// function because try/catches deoptimize in certain engines.
7121
7122var cachedSetTimeout;
7123var cachedClearTimeout;
7124
7125function defaultSetTimout() {
7126 throw new Error('setTimeout has not been defined');
7127}
7128function defaultClearTimeout () {
7129 throw new Error('clearTimeout has not been defined');
7130}
7131(function () {
7132 try {
7133 if (typeof setTimeout === 'function') {
7134 cachedSetTimeout = setTimeout;
7135 } else {
7136 cachedSetTimeout = defaultSetTimout;
7137 }
7138 } catch (e) {
7139 cachedSetTimeout = defaultSetTimout;
7140 }
7141 try {
7142 if (typeof clearTimeout === 'function') {
7143 cachedClearTimeout = clearTimeout;
7144 } else {
7145 cachedClearTimeout = defaultClearTimeout;
7146 }
7147 } catch (e) {
7148 cachedClearTimeout = defaultClearTimeout;
7149 }
7150} ())
7151function runTimeout(fun) {
7152 if (cachedSetTimeout === setTimeout) {
7153 //normal enviroments in sane situations
7154 return setTimeout(fun, 0);
7155 }
7156 // if setTimeout wasn't available but was latter defined
7157 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
7158 cachedSetTimeout = setTimeout;
7159 return setTimeout(fun, 0);
7160 }
7161 try {
7162 // when when somebody has screwed with setTimeout but no I.E. maddness
7163 return cachedSetTimeout(fun, 0);
7164 } catch(e){
7165 try {
7166 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7167 return cachedSetTimeout.call(null, fun, 0);
7168 } catch(e){
7169 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
7170 return cachedSetTimeout.call(this, fun, 0);
7171 }
7172 }
7173
7174
7175}
7176function runClearTimeout(marker) {
7177 if (cachedClearTimeout === clearTimeout) {
7178 //normal enviroments in sane situations
7179 return clearTimeout(marker);
7180 }
7181 // if clearTimeout wasn't available but was latter defined
7182 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7183 cachedClearTimeout = clearTimeout;
7184 return clearTimeout(marker);
7185 }
7186 try {
7187 // when when somebody has screwed with setTimeout but no I.E. maddness
7188 return cachedClearTimeout(marker);
7189 } catch (e){
7190 try {
7191 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7192 return cachedClearTimeout.call(null, marker);
7193 } catch (e){
7194 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
7195 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7196 return cachedClearTimeout.call(this, marker);
7197 }
7198 }
7199
7200
7201
7202}
7203var queue = [];
7204var draining = false;
7205var currentQueue;
7206var queueIndex = -1;
7207
7208function cleanUpNextTick() {
7209 if (!draining || !currentQueue) {
7210 return;
7211 }
7212 draining = false;
7213 if (currentQueue.length) {
7214 queue = currentQueue.concat(queue);
7215 } else {
7216 queueIndex = -1;
7217 }
7218 if (queue.length) {
7219 drainQueue();
7220 }
7221}
7222
7223function drainQueue() {
7224 if (draining) {
7225 return;
7226 }
7227 var timeout = runTimeout(cleanUpNextTick);
7228 draining = true;
7229
7230 var len = queue.length;
7231 while(len) {
7232 currentQueue = queue;
7233 queue = [];
7234 while (++queueIndex < len) {
7235 if (currentQueue) {
7236 currentQueue[queueIndex].run();
7237 }
7238 }
7239 queueIndex = -1;
7240 len = queue.length;
7241 }
7242 currentQueue = null;
7243 draining = false;
7244 runClearTimeout(timeout);
7245}
7246
7247process.nextTick = function (fun) {
7248 var args = new Array(arguments.length - 1);
7249 if (arguments.length > 1) {
7250 for (var i = 1; i < arguments.length; i++) {
7251 args[i - 1] = arguments[i];
7252 }
7253 }
7254 queue.push(new Item(fun, args));
7255 if (queue.length === 1 && !draining) {
7256 runTimeout(drainQueue);
7257 }
7258};
7259
7260// v8 likes predictible objects
7261function Item(fun, array) {
7262 this.fun = fun;
7263 this.array = array;
7264}
7265Item.prototype.run = function () {
7266 this.fun.apply(null, this.array);
7267};
7268process.title = 'browser';
7269process.browser = true;
7270process.env = {};
7271process.argv = [];
7272process.version = ''; // empty string to avoid regexp issues
7273process.versions = {};
7274
7275function noop() {}
7276
7277process.on = noop;
7278process.addListener = noop;
7279process.once = noop;
7280process.off = noop;
7281process.removeListener = noop;
7282process.removeAllListeners = noop;
7283process.emit = noop;
7284process.prependListener = noop;
7285process.prependOnceListener = noop;
7286
7287process.listeners = function (name) { return [] }
7288
7289process.binding = function (name) {
7290 throw new Error('process.binding is not supported');
7291};
7292
7293process.cwd = function () { return '/' };
7294process.chdir = function (dir) {
7295 throw new Error('process.chdir is not supported');
7296};
7297process.umask = function() { return 0; };
7298
7299
7300/***/ }),
7301
7302/***/ "../node_modules/qs/lib/formats.js":
7303/*!*****************************************!*\
7304 !*** ../node_modules/qs/lib/formats.js ***!
7305 \*****************************************/
7306/*! no static exports found */
7307/***/ (function(module, exports, __webpack_require__) {
7308
7309"use strict";
7310
7311
7312var replace = String.prototype.replace;
7313var percentTwenties = /%20/g;
7314
7315var util = __webpack_require__(/*! ./utils */ "../node_modules/qs/lib/utils.js");
7316
7317var Format = {
7318 RFC1738: 'RFC1738',
7319 RFC3986: 'RFC3986'
7320};
7321
7322module.exports = util.assign(
7323 {
7324 'default': Format.RFC3986,
7325 formatters: {
7326 RFC1738: function (value) {
7327 return replace.call(value, percentTwenties, '+');
7328 },
7329 RFC3986: function (value) {
7330 return String(value);
7331 }
7332 }
7333 },
7334 Format
7335);
7336
7337
7338/***/ }),
7339
7340/***/ "../node_modules/qs/lib/index.js":
7341/*!***************************************!*\
7342 !*** ../node_modules/qs/lib/index.js ***!
7343 \***************************************/
7344/*! no static exports found */
7345/***/ (function(module, exports, __webpack_require__) {
7346
7347"use strict";
7348
7349
7350var stringify = __webpack_require__(/*! ./stringify */ "../node_modules/qs/lib/stringify.js");
7351var parse = __webpack_require__(/*! ./parse */ "../node_modules/qs/lib/parse.js");
7352var formats = __webpack_require__(/*! ./formats */ "../node_modules/qs/lib/formats.js");
7353
7354module.exports = {
7355 formats: formats,
7356 parse: parse,
7357 stringify: stringify
7358};
7359
7360
7361/***/ }),
7362
7363/***/ "../node_modules/qs/lib/parse.js":
7364/*!***************************************!*\
7365 !*** ../node_modules/qs/lib/parse.js ***!
7366 \***************************************/
7367/*! no static exports found */
7368/***/ (function(module, exports, __webpack_require__) {
7369
7370"use strict";
7371
7372
7373var utils = __webpack_require__(/*! ./utils */ "../node_modules/qs/lib/utils.js");
7374
7375var has = Object.prototype.hasOwnProperty;
7376var isArray = Array.isArray;
7377
7378var defaults = {
7379 allowDots: false,
7380 allowPrototypes: false,
7381 arrayLimit: 20,
7382 charset: 'utf-8',
7383 charsetSentinel: false,
7384 comma: false,
7385 decoder: utils.decode,
7386 delimiter: '&',
7387 depth: 5,
7388 ignoreQueryPrefix: false,
7389 interpretNumericEntities: false,
7390 parameterLimit: 1000,
7391 parseArrays: true,
7392 plainObjects: false,
7393 strictNullHandling: false
7394};
7395
7396var interpretNumericEntities = function (str) {
7397 return str.replace(/&#(\d+);/g, function ($0, numberStr) {
7398 return String.fromCharCode(parseInt(numberStr, 10));
7399 });
7400};
7401
7402var parseArrayValue = function (val, options) {
7403 if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
7404 return val.split(',');
7405 }
7406
7407 return val;
7408};
7409
7410// This is what browsers will submit when the ✓ character occurs in an
7411// application/x-www-form-urlencoded body and the encoding of the page containing
7412// the form is iso-8859-1, or when the submitted form has an accept-charset
7413// attribute of iso-8859-1. Presumably also with other charsets that do not contain
7414// the ✓ character, such as us-ascii.
7415var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
7416
7417// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
7418var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
7419
7420var parseValues = function parseQueryStringValues(str, options) {
7421 var obj = {};
7422 var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
7423 var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
7424 var parts = cleanStr.split(options.delimiter, limit);
7425 var skipIndex = -1; // Keep track of where the utf8 sentinel was found
7426 var i;
7427
7428 var charset = options.charset;
7429 if (options.charsetSentinel) {
7430 for (i = 0; i < parts.length; ++i) {
7431 if (parts[i].indexOf('utf8=') === 0) {
7432 if (parts[i] === charsetSentinel) {
7433 charset = 'utf-8';
7434 } else if (parts[i] === isoSentinel) {
7435 charset = 'iso-8859-1';
7436 }
7437 skipIndex = i;
7438 i = parts.length; // The eslint settings do not allow break;
7439 }
7440 }
7441 }
7442
7443 for (i = 0; i < parts.length; ++i) {
7444 if (i === skipIndex) {
7445 continue;
7446 }
7447 var part = parts[i];
7448
7449 var bracketEqualsPos = part.indexOf(']=');
7450 var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
7451
7452 var key, val;
7453 if (pos === -1) {
7454 key = options.decoder(part, defaults.decoder, charset, 'key');
7455 val = options.strictNullHandling ? null : '';
7456 } else {
7457 key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
7458 val = utils.maybeMap(
7459 parseArrayValue(part.slice(pos + 1), options),
7460 function (encodedVal) {
7461 return options.decoder(encodedVal, defaults.decoder, charset, 'value');
7462 }
7463 );
7464 }
7465
7466 if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
7467 val = interpretNumericEntities(val);
7468 }
7469
7470 if (part.indexOf('[]=') > -1) {
7471 val = isArray(val) ? [val] : val;
7472 }
7473
7474 if (has.call(obj, key)) {
7475 obj[key] = utils.combine(obj[key], val);
7476 } else {
7477 obj[key] = val;
7478 }
7479 }
7480
7481 return obj;
7482};
7483
7484var parseObject = function (chain, val, options, valuesParsed) {
7485 var leaf = valuesParsed ? val : parseArrayValue(val, options);
7486
7487 for (var i = chain.length - 1; i >= 0; --i) {
7488 var obj;
7489 var root = chain[i];
7490
7491 if (root === '[]' && options.parseArrays) {
7492 obj = [].concat(leaf);
7493 } else {
7494 obj = options.plainObjects ? Object.create(null) : {};
7495 var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
7496 var index = parseInt(cleanRoot, 10);
7497 if (!options.parseArrays && cleanRoot === '') {
7498 obj = { 0: leaf };
7499 } else if (
7500 !isNaN(index)
7501 && root !== cleanRoot
7502 && String(index) === cleanRoot
7503 && index >= 0
7504 && (options.parseArrays && index <= options.arrayLimit)
7505 ) {
7506 obj = [];
7507 obj[index] = leaf;
7508 } else {
7509 obj[cleanRoot] = leaf;
7510 }
7511 }
7512
7513 leaf = obj; // eslint-disable-line no-param-reassign
7514 }
7515
7516 return leaf;
7517};
7518
7519var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
7520 if (!givenKey) {
7521 return;
7522 }
7523
7524 // Transform dot notation to bracket notation
7525 var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
7526
7527 // The regex chunks
7528
7529 var brackets = /(\[[^[\]]*])/;
7530 var child = /(\[[^[\]]*])/g;
7531
7532 // Get the parent
7533
7534 var segment = options.depth > 0 && brackets.exec(key);
7535 var parent = segment ? key.slice(0, segment.index) : key;
7536
7537 // Stash the parent if it exists
7538
7539 var keys = [];
7540 if (parent) {
7541 // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
7542 if (!options.plainObjects && has.call(Object.prototype, parent)) {
7543 if (!options.allowPrototypes) {
7544 return;
7545 }
7546 }
7547
7548 keys.push(parent);
7549 }
7550
7551 // Loop through children appending to the array until we hit depth
7552
7553 var i = 0;
7554 while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
7555 i += 1;
7556 if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
7557 if (!options.allowPrototypes) {
7558 return;
7559 }
7560 }
7561 keys.push(segment[1]);
7562 }
7563
7564 // If there's a remainder, just add whatever is left
7565
7566 if (segment) {
7567 keys.push('[' + key.slice(segment.index) + ']');
7568 }
7569
7570 return parseObject(keys, val, options, valuesParsed);
7571};
7572
7573var normalizeParseOptions = function normalizeParseOptions(opts) {
7574 if (!opts) {
7575 return defaults;
7576 }
7577
7578 if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
7579 throw new TypeError('Decoder has to be a function.');
7580 }
7581
7582 if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
7583 throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
7584 }
7585 var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
7586
7587 return {
7588 allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
7589 allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
7590 arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
7591 charset: charset,
7592 charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
7593 comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
7594 decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
7595 delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
7596 // eslint-disable-next-line no-implicit-coercion, no-extra-parens
7597 depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
7598 ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
7599 interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
7600 parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
7601 parseArrays: opts.parseArrays !== false,
7602 plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
7603 strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
7604 };
7605};
7606
7607module.exports = function (str, opts) {
7608 var options = normalizeParseOptions(opts);
7609
7610 if (str === '' || str === null || typeof str === 'undefined') {
7611 return options.plainObjects ? Object.create(null) : {};
7612 }
7613
7614 var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
7615 var obj = options.plainObjects ? Object.create(null) : {};
7616
7617 // Iterate over the keys and setup the new object
7618
7619 var keys = Object.keys(tempObj);
7620 for (var i = 0; i < keys.length; ++i) {
7621 var key = keys[i];
7622 var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
7623 obj = utils.merge(obj, newObj, options);
7624 }
7625
7626 return utils.compact(obj);
7627};
7628
7629
7630/***/ }),
7631
7632/***/ "../node_modules/qs/lib/stringify.js":
7633/*!*******************************************!*\
7634 !*** ../node_modules/qs/lib/stringify.js ***!
7635 \*******************************************/
7636/*! no static exports found */
7637/***/ (function(module, exports, __webpack_require__) {
7638
7639"use strict";
7640
7641
7642var utils = __webpack_require__(/*! ./utils */ "../node_modules/qs/lib/utils.js");
7643var formats = __webpack_require__(/*! ./formats */ "../node_modules/qs/lib/formats.js");
7644var has = Object.prototype.hasOwnProperty;
7645
7646var arrayPrefixGenerators = {
7647 brackets: function brackets(prefix) {
7648 return prefix + '[]';
7649 },
7650 comma: 'comma',
7651 indices: function indices(prefix, key) {
7652 return prefix + '[' + key + ']';
7653 },
7654 repeat: function repeat(prefix) {
7655 return prefix;
7656 }
7657};
7658
7659var isArray = Array.isArray;
7660var push = Array.prototype.push;
7661var pushToArray = function (arr, valueOrArray) {
7662 push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
7663};
7664
7665var toISO = Date.prototype.toISOString;
7666
7667var defaultFormat = formats['default'];
7668var defaults = {
7669 addQueryPrefix: false,
7670 allowDots: false,
7671 charset: 'utf-8',
7672 charsetSentinel: false,
7673 delimiter: '&',
7674 encode: true,
7675 encoder: utils.encode,
7676 encodeValuesOnly: false,
7677 format: defaultFormat,
7678 formatter: formats.formatters[defaultFormat],
7679 // deprecated
7680 indices: false,
7681 serializeDate: function serializeDate(date) {
7682 return toISO.call(date);
7683 },
7684 skipNulls: false,
7685 strictNullHandling: false
7686};
7687
7688var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
7689 return typeof v === 'string'
7690 || typeof v === 'number'
7691 || typeof v === 'boolean'
7692 || typeof v === 'symbol'
7693 || typeof v === 'bigint';
7694};
7695
7696var stringify = function stringify(
7697 object,
7698 prefix,
7699 generateArrayPrefix,
7700 strictNullHandling,
7701 skipNulls,
7702 encoder,
7703 filter,
7704 sort,
7705 allowDots,
7706 serializeDate,
7707 formatter,
7708 encodeValuesOnly,
7709 charset
7710) {
7711 var obj = object;
7712 if (typeof filter === 'function') {
7713 obj = filter(prefix, obj);
7714 } else if (obj instanceof Date) {
7715 obj = serializeDate(obj);
7716 } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
7717 obj = utils.maybeMap(obj, function (value) {
7718 if (value instanceof Date) {
7719 return serializeDate(value);
7720 }
7721 return value;
7722 }).join(',');
7723 }
7724
7725 if (obj === null) {
7726 if (strictNullHandling) {
7727 return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;
7728 }
7729
7730 obj = '';
7731 }
7732
7733 if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
7734 if (encoder) {
7735 var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');
7736 return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];
7737 }
7738 return [formatter(prefix) + '=' + formatter(String(obj))];
7739 }
7740
7741 var values = [];
7742
7743 if (typeof obj === 'undefined') {
7744 return values;
7745 }
7746
7747 var objKeys;
7748 if (isArray(filter)) {
7749 objKeys = filter;
7750 } else {
7751 var keys = Object.keys(obj);
7752 objKeys = sort ? keys.sort(sort) : keys;
7753 }
7754
7755 for (var i = 0; i < objKeys.length; ++i) {
7756 var key = objKeys[i];
7757 var value = obj[key];
7758
7759 if (skipNulls && value === null) {
7760 continue;
7761 }
7762
7763 var keyPrefix = isArray(obj)
7764 ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
7765 : prefix + (allowDots ? '.' + key : '[' + key + ']');
7766
7767 pushToArray(values, stringify(
7768 value,
7769 keyPrefix,
7770 generateArrayPrefix,
7771 strictNullHandling,
7772 skipNulls,
7773 encoder,
7774 filter,
7775 sort,
7776 allowDots,
7777 serializeDate,
7778 formatter,
7779 encodeValuesOnly,
7780 charset
7781 ));
7782 }
7783
7784 return values;
7785};
7786
7787var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
7788 if (!opts) {
7789 return defaults;
7790 }
7791
7792 if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
7793 throw new TypeError('Encoder has to be a function.');
7794 }
7795
7796 var charset = opts.charset || defaults.charset;
7797 if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
7798 throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
7799 }
7800
7801 var format = formats['default'];
7802 if (typeof opts.format !== 'undefined') {
7803 if (!has.call(formats.formatters, opts.format)) {
7804 throw new TypeError('Unknown format option provided.');
7805 }
7806 format = opts.format;
7807 }
7808 var formatter = formats.formatters[format];
7809
7810 var filter = defaults.filter;
7811 if (typeof opts.filter === 'function' || isArray(opts.filter)) {
7812 filter = opts.filter;
7813 }
7814
7815 return {
7816 addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
7817 allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
7818 charset: charset,
7819 charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
7820 delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
7821 encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
7822 encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
7823 encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
7824 filter: filter,
7825 formatter: formatter,
7826 serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
7827 skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
7828 sort: typeof opts.sort === 'function' ? opts.sort : null,
7829 strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
7830 };
7831};
7832
7833module.exports = function (object, opts) {
7834 var obj = object;
7835 var options = normalizeStringifyOptions(opts);
7836
7837 var objKeys;
7838 var filter;
7839
7840 if (typeof options.filter === 'function') {
7841 filter = options.filter;
7842 obj = filter('', obj);
7843 } else if (isArray(options.filter)) {
7844 filter = options.filter;
7845 objKeys = filter;
7846 }
7847
7848 var keys = [];
7849
7850 if (typeof obj !== 'object' || obj === null) {
7851 return '';
7852 }
7853
7854 var arrayFormat;
7855 if (opts && opts.arrayFormat in arrayPrefixGenerators) {
7856 arrayFormat = opts.arrayFormat;
7857 } else if (opts && 'indices' in opts) {
7858 arrayFormat = opts.indices ? 'indices' : 'repeat';
7859 } else {
7860 arrayFormat = 'indices';
7861 }
7862
7863 var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
7864
7865 if (!objKeys) {
7866 objKeys = Object.keys(obj);
7867 }
7868
7869 if (options.sort) {
7870 objKeys.sort(options.sort);
7871 }
7872
7873 for (var i = 0; i < objKeys.length; ++i) {
7874 var key = objKeys[i];
7875
7876 if (options.skipNulls && obj[key] === null) {
7877 continue;
7878 }
7879 pushToArray(keys, stringify(
7880 obj[key],
7881 key,
7882 generateArrayPrefix,
7883 options.strictNullHandling,
7884 options.skipNulls,
7885 options.encode ? options.encoder : null,
7886 options.filter,
7887 options.sort,
7888 options.allowDots,
7889 options.serializeDate,
7890 options.formatter,
7891 options.encodeValuesOnly,
7892 options.charset
7893 ));
7894 }
7895
7896 var joined = keys.join(options.delimiter);
7897 var prefix = options.addQueryPrefix === true ? '?' : '';
7898
7899 if (options.charsetSentinel) {
7900 if (options.charset === 'iso-8859-1') {
7901 // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
7902 prefix += 'utf8=%26%2310003%3B&';
7903 } else {
7904 // encodeURIComponent('✓')
7905 prefix += 'utf8=%E2%9C%93&';
7906 }
7907 }
7908
7909 return joined.length > 0 ? prefix + joined : '';
7910};
7911
7912
7913/***/ }),
7914
7915/***/ "../node_modules/qs/lib/utils.js":
7916/*!***************************************!*\
7917 !*** ../node_modules/qs/lib/utils.js ***!
7918 \***************************************/
7919/*! no static exports found */
7920/***/ (function(module, exports, __webpack_require__) {
7921
7922"use strict";
7923
7924
7925var has = Object.prototype.hasOwnProperty;
7926var isArray = Array.isArray;
7927
7928var hexTable = (function () {
7929 var array = [];
7930 for (var i = 0; i < 256; ++i) {
7931 array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
7932 }
7933
7934 return array;
7935}());
7936
7937var compactQueue = function compactQueue(queue) {
7938 while (queue.length > 1) {
7939 var item = queue.pop();
7940 var obj = item.obj[item.prop];
7941
7942 if (isArray(obj)) {
7943 var compacted = [];
7944
7945 for (var j = 0; j < obj.length; ++j) {
7946 if (typeof obj[j] !== 'undefined') {
7947 compacted.push(obj[j]);
7948 }
7949 }
7950
7951 item.obj[item.prop] = compacted;
7952 }
7953 }
7954};
7955
7956var arrayToObject = function arrayToObject(source, options) {
7957 var obj = options && options.plainObjects ? Object.create(null) : {};
7958 for (var i = 0; i < source.length; ++i) {
7959 if (typeof source[i] !== 'undefined') {
7960 obj[i] = source[i];
7961 }
7962 }
7963
7964 return obj;
7965};
7966
7967var merge = function merge(target, source, options) {
7968 /* eslint no-param-reassign: 0 */
7969 if (!source) {
7970 return target;
7971 }
7972
7973 if (typeof source !== 'object') {
7974 if (isArray(target)) {
7975 target.push(source);
7976 } else if (target && typeof target === 'object') {
7977 if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
7978 target[source] = true;
7979 }
7980 } else {
7981 return [target, source];
7982 }
7983
7984 return target;
7985 }
7986
7987 if (!target || typeof target !== 'object') {
7988 return [target].concat(source);
7989 }
7990
7991 var mergeTarget = target;
7992 if (isArray(target) && !isArray(source)) {
7993 mergeTarget = arrayToObject(target, options);
7994 }
7995
7996 if (isArray(target) && isArray(source)) {
7997 source.forEach(function (item, i) {
7998 if (has.call(target, i)) {
7999 var targetItem = target[i];
8000 if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
8001 target[i] = merge(targetItem, item, options);
8002 } else {
8003 target.push(item);
8004 }
8005 } else {
8006 target[i] = item;
8007 }
8008 });
8009 return target;
8010 }
8011
8012 return Object.keys(source).reduce(function (acc, key) {
8013 var value = source[key];
8014
8015 if (has.call(acc, key)) {
8016 acc[key] = merge(acc[key], value, options);
8017 } else {
8018 acc[key] = value;
8019 }
8020 return acc;
8021 }, mergeTarget);
8022};
8023
8024var assign = function assignSingleSource(target, source) {
8025 return Object.keys(source).reduce(function (acc, key) {
8026 acc[key] = source[key];
8027 return acc;
8028 }, target);
8029};
8030
8031var decode = function (str, decoder, charset) {
8032 var strWithoutPlus = str.replace(/\+/g, ' ');
8033 if (charset === 'iso-8859-1') {
8034 // unescape never throws, no try...catch needed:
8035 return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
8036 }
8037 // utf-8
8038 try {
8039 return decodeURIComponent(strWithoutPlus);
8040 } catch (e) {
8041 return strWithoutPlus;
8042 }
8043};
8044
8045var encode = function encode(str, defaultEncoder, charset) {
8046 // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
8047 // It has been adapted here for stricter adherence to RFC 3986
8048 if (str.length === 0) {
8049 return str;
8050 }
8051
8052 var string = str;
8053 if (typeof str === 'symbol') {
8054 string = Symbol.prototype.toString.call(str);
8055 } else if (typeof str !== 'string') {
8056 string = String(str);
8057 }
8058
8059 if (charset === 'iso-8859-1') {
8060 return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
8061 return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
8062 });
8063 }
8064
8065 var out = '';
8066 for (var i = 0; i < string.length; ++i) {
8067 var c = string.charCodeAt(i);
8068
8069 if (
8070 c === 0x2D // -
8071 || c === 0x2E // .
8072 || c === 0x5F // _
8073 || c === 0x7E // ~
8074 || (c >= 0x30 && c <= 0x39) // 0-9
8075 || (c >= 0x41 && c <= 0x5A) // a-z
8076 || (c >= 0x61 && c <= 0x7A) // A-Z
8077 ) {
8078 out += string.charAt(i);
8079 continue;
8080 }
8081
8082 if (c < 0x80) {
8083 out = out + hexTable[c];
8084 continue;
8085 }
8086
8087 if (c < 0x800) {
8088 out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
8089 continue;
8090 }
8091
8092 if (c < 0xD800 || c >= 0xE000) {
8093 out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
8094 continue;
8095 }
8096
8097 i += 1;
8098 c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
8099 out += hexTable[0xF0 | (c >> 18)]
8100 + hexTable[0x80 | ((c >> 12) & 0x3F)]
8101 + hexTable[0x80 | ((c >> 6) & 0x3F)]
8102 + hexTable[0x80 | (c & 0x3F)];
8103 }
8104
8105 return out;
8106};
8107
8108var compact = function compact(value) {
8109 var queue = [{ obj: { o: value }, prop: 'o' }];
8110 var refs = [];
8111
8112 for (var i = 0; i < queue.length; ++i) {
8113 var item = queue[i];
8114 var obj = item.obj[item.prop];
8115
8116 var keys = Object.keys(obj);
8117 for (var j = 0; j < keys.length; ++j) {
8118 var key = keys[j];
8119 var val = obj[key];
8120 if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
8121 queue.push({ obj: obj, prop: key });
8122 refs.push(val);
8123 }
8124 }
8125 }
8126
8127 compactQueue(queue);
8128
8129 return value;
8130};
8131
8132var isRegExp = function isRegExp(obj) {
8133 return Object.prototype.toString.call(obj) === '[object RegExp]';
8134};
8135
8136var isBuffer = function isBuffer(obj) {
8137 if (!obj || typeof obj !== 'object') {
8138 return false;
8139 }
8140
8141 return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
8142};
8143
8144var combine = function combine(a, b) {
8145 return [].concat(a, b);
8146};
8147
8148var maybeMap = function maybeMap(val, fn) {
8149 if (isArray(val)) {
8150 var mapped = [];
8151 for (var i = 0; i < val.length; i += 1) {
8152 mapped.push(fn(val[i]));
8153 }
8154 return mapped;
8155 }
8156 return fn(val);
8157};
8158
8159module.exports = {
8160 arrayToObject: arrayToObject,
8161 assign: assign,
8162 combine: combine,
8163 compact: compact,
8164 decode: decode,
8165 encode: encode,
8166 isBuffer: isBuffer,
8167 isRegExp: isRegExp,
8168 maybeMap: maybeMap,
8169 merge: merge
8170};
8171
8172
8173/***/ }),
8174
8175/***/ "../node_modules/webpack/buildin/global.js":
8176/*!*************************************************!*\
8177 !*** ../node_modules/webpack/buildin/global.js ***!
8178 \*************************************************/
8179/*! no static exports found */
8180/***/ (function(module, exports) {
8181
8182var g;
8183
8184// This works in non-strict mode
8185g = (function() {
8186 return this;
8187})();
8188
8189try {
8190 // This works if eval is allowed (see CSP)
8191 g = g || new Function("return this")();
8192} catch (e) {
8193 // This works if the window reference is available
8194 if (typeof window === "object") g = window;
8195}
8196
8197// g can still be undefined, but nothing to do about it...
8198// We return undefined, instead of nothing here, so it's
8199// easier to handle this case. if(!global) { ...}
8200
8201module.exports = g;
8202
8203
8204/***/ }),
8205
8206/***/ "../node_modules/webpack/buildin/module.js":
8207/*!*************************************************!*\
8208 !*** ../node_modules/webpack/buildin/module.js ***!
8209 \*************************************************/
8210/*! no static exports found */
8211/***/ (function(module, exports) {
8212
8213module.exports = function(module) {
8214 if (!module.webpackPolyfill) {
8215 module.deprecate = function() {};
8216 module.paths = [];
8217 // module.parent = undefined by default
8218 if (!module.children) module.children = [];
8219 Object.defineProperty(module, "loaded", {
8220 enumerable: true,
8221 get: function() {
8222 return module.l;
8223 }
8224 });
8225 Object.defineProperty(module, "id", {
8226 enumerable: true,
8227 get: function() {
8228 return module.i;
8229 }
8230 });
8231 module.webpackPolyfill = 1;
8232 }
8233 return module;
8234};
8235
8236
8237/***/ }),
8238
8239/***/ "./common-utils.ts":
8240/*!*************************!*\
8241 !*** ./common-utils.ts ***!
8242 \*************************/
8243/*! exports provided: wrapCollection */
8244/***/ (function(module, __webpack_exports__, __webpack_require__) {
8245
8246"use strict";
8247__webpack_require__.r(__webpack_exports__);
8248/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapCollection", function() { return wrapCollection; });
8249/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
8250/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
8251/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
8252/* eslint-disable @typescript-eslint/ban-ts-ignore */
8253
8254
8255var wrapCollection = function wrapCollection(fn) {
8256 return function (http, data) {
8257 var collectionData = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data)); // @ts-ignore
8258
8259 collectionData.items = collectionData.items.map(function (entity) {
8260 return fn(http, entity);
8261 }); // @ts-ignore
8262
8263 return collectionData;
8264 };
8265};
8266
8267/***/ }),
8268
8269/***/ "./contentful-management.ts":
8270/*!**********************************!*\
8271 !*** ./contentful-management.ts ***!
8272 \**********************************/
8273/*! exports provided: createClient */
8274/***/ (function(module, __webpack_exports__, __webpack_require__) {
8275
8276"use strict";
8277__webpack_require__.r(__webpack_exports__);
8278/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createClient", function() { return createClient; });
8279/* harmony import */ var _create_contentful_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create-contentful-api */ "./create-contentful-api.ts");
8280/* harmony import */ var _create_cma_http_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-cma-http-client */ "./create-cma-http-client.ts");
8281/**
8282 * Contentful Management API SDK. Allows you to create instances of a client
8283 * with access to the Contentful Content Management API.
8284 * @packageDocumentation
8285 */
8286
8287
8288/**
8289 * Create a client instance
8290 * @param params - Client initialization parameters
8291 *
8292 * ```javascript
8293 * const client = contentfulManagement.createClient({
8294 * accessToken: 'myAccessToken'
8295 * })
8296 * ```
8297 */
8298
8299function createClient(params) {
8300 var http = Object(_create_cma_http_client__WEBPACK_IMPORTED_MODULE_1__["createCMAHttpClient"])(params);
8301 var api = Object(_create_contentful_api__WEBPACK_IMPORTED_MODULE_0__["default"])({
8302 http: http
8303 });
8304 return api;
8305}
8306
8307/***/ }),
8308
8309/***/ "./create-cma-http-client.ts":
8310/*!***********************************!*\
8311 !*** ./create-cma-http-client.ts ***!
8312 \***********************************/
8313/*! exports provided: createCMAHttpClient */
8314/***/ (function(module, __webpack_exports__, __webpack_require__) {
8315
8316"use strict";
8317__webpack_require__.r(__webpack_exports__);
8318/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCMAHttpClient", function() { return createCMAHttpClient; });
8319/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "../node_modules/axios/index.js");
8320/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
8321/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
8322/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
8323/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__);
8324function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
8325
8326function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
8327
8328function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8329
8330/**
8331 * @packageDocumentation
8332 * @hidden
8333 */
8334
8335
8336
8337
8338/**
8339 * @private
8340 */
8341function createCMAHttpClient(params) {
8342 var defaultParameters = {
8343 defaultHostname: 'api.contentful.com',
8344 defaultHostnameUpload: 'upload.contentful.com'
8345 };
8346 var userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])( // @ts-expect-error
8347 "contentful-management.js/".concat("5.27.2"), params.application, params.integration, params.feature);
8348 var requiredHeaders = {
8349 'Content-Type': 'application/vnd.contentful.management.v1+json',
8350 'X-Contentful-User-Agent': userAgentHeader
8351 };
8352 params = _objectSpread(_objectSpread({}, defaultParameters), lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(params));
8353
8354 if (!params.accessToken) {
8355 throw new TypeError('Expected parameter accessToken');
8356 }
8357
8358 params.headers = _objectSpread(_objectSpread({}, params.headers), requiredHeaders);
8359 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createHttpClient"])(axios__WEBPACK_IMPORTED_MODULE_0___default.a, params);
8360}
8361
8362/***/ }),
8363
8364/***/ "./create-contentful-api.ts":
8365/*!**********************************!*\
8366 !*** ./create-contentful-api.ts ***!
8367 \**********************************/
8368/*! exports provided: default */
8369/***/ (function(module, __webpack_exports__, __webpack_require__) {
8370
8371"use strict";
8372__webpack_require__.r(__webpack_exports__);
8373/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createClientApi; });
8374/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
8375/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./error-handler */ "./error-handler.ts");
8376/* harmony import */ var _entities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./entities */ "./entities/index.ts");
8377
8378
8379
8380function createClientApi(_ref) {
8381 var http = _ref.http;
8382 var _entities$space = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].space,
8383 wrapSpace = _entities$space.wrapSpace,
8384 wrapSpaceCollection = _entities$space.wrapSpaceCollection;
8385 var wrapUser = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].user.wrapUser;
8386 var _entities$personalAcc = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].personalAccessToken,
8387 wrapPersonalAccessToken = _entities$personalAcc.wrapPersonalAccessToken,
8388 wrapPersonalAccessTokenCollection = _entities$personalAcc.wrapPersonalAccessTokenCollection;
8389 var _entities$organizatio = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].organization,
8390 wrapOrganization = _entities$organizatio.wrapOrganization,
8391 wrapOrganizationCollection = _entities$organizatio.wrapOrganizationCollection;
8392 var wrapUsageCollection = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].usage.wrapUsageCollection;
8393 return {
8394 /**
8395 * Gets all spaces
8396 * @return Promise for a collection of Spaces
8397 * ```javascript
8398 * const contentful = require('contentful-management')
8399 *
8400 * const client = contentful.createClient({
8401 * accessToken: '<content_management_api_key>'
8402 * })
8403 *
8404 * client.getSpaces()
8405 * .then((response) => console.log(response.items))
8406 * .catch(console.error)
8407 * ```
8408 */
8409 getSpaces: function getSpaces() {
8410 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8411 return http.get('', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["createRequestConfig"])({
8412 query: query
8413 })).then(function (response) {
8414 return wrapSpaceCollection(http, response.data);
8415 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8416 },
8417
8418 /**
8419 * Gets a space
8420 * @param id - Space ID
8421 * @return Promise for a Space
8422 * ```javascript
8423 * const contentful = require('contentful-management')
8424 *
8425 * const client = contentful.createClient({
8426 * accessToken: '<content_management_api_key>'
8427 * })
8428 *
8429 * client.getSpace('<space_id>')
8430 * .then((space) => console.log(space))
8431 * .catch(console.error)
8432 * ```
8433 */
8434 getSpace: function getSpace(id) {
8435 return http.get(id).then(function (response) {
8436 return wrapSpace(http, response.data);
8437 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8438 },
8439
8440 /**
8441 * Creates a space
8442 * @param data - Object representation of the Space to be created
8443 * @param organizationId - Organization ID, if the associated token can manage more than one organization.
8444 * @return Promise for the newly created Space
8445 * @example ```javascript
8446 * const contentful = require('contentful-management')
8447 *
8448 * const client = contentful.createClient({
8449 * accessToken: '<content_management_api_key>'
8450 * })
8451 *
8452 * client.createSpace({
8453 * name: 'Name of new space'
8454 * })
8455 * .then((space) => console.log(space))
8456 * .catch(console.error)
8457 * ```
8458 */
8459 createSpace: function createSpace(data, organizationId) {
8460 return http.post('', data, {
8461 headers: organizationId ? {
8462 'X-Contentful-Organization': organizationId
8463 } : {}
8464 }).then(function (response) {
8465 return wrapSpace(http, response.data);
8466 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8467 },
8468
8469 /**
8470 * Gets an organization
8471 * @param id - Organization ID
8472 * @return Promise for a Organization
8473 * @example ```javascript
8474 * const contentful = require('contentful-management')
8475 *
8476 * const client = contentful.createClient({
8477 * accessToken: '<content_management_api_key>'
8478 * })
8479 *
8480 * client.getOrganization('<org_id>')
8481 * .then((org) => console.log(org))
8482 * .catch(console.error)
8483 * ```
8484 */
8485 getOrganization: function getOrganization(id) {
8486 var _http$defaults, _http$defaults$baseUR;
8487
8488 var baseURL = (_http$defaults = http.defaults) === null || _http$defaults === void 0 ? void 0 : (_http$defaults$baseUR = _http$defaults.baseURL) === null || _http$defaults$baseUR === void 0 ? void 0 : _http$defaults$baseUR.replace('/spaces/', '/organizations/');
8489 return http.get('', {
8490 baseURL: baseURL
8491 }).then(function (response) {
8492 var org = response.data.items.find(function (org) {
8493 return org.sys.id === id;
8494 });
8495
8496 if (!org) {
8497 var error = new Error("No organization was found with the ID ".concat(id, " instead got ").concat(JSON.stringify(response))); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
8498 // @ts-ignore
8499
8500 error.status = 404; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
8501 // @ts-ignore
8502
8503 error.statusText = 'Not Found';
8504 return Promise.reject(error);
8505 }
8506
8507 return wrapOrganization(http, org);
8508 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8509 },
8510
8511 /**
8512 * Gets a collection of Organizations
8513 * @return Promise for a collection of Organizations
8514 * @example ```javascript
8515 * const contentful = require('contentful-management')
8516 *
8517 * const client = contentful.createClient({
8518 * accessToken: '<content_management_api_key>'
8519 * })
8520 *
8521 * client.getOrganizations()
8522 * .then(result => console.log(result.items))
8523 * .catch(console.error)
8524 * ```
8525 */
8526 getOrganizations: function getOrganizations() {
8527 var _http$defaults2, _http$defaults2$baseU;
8528
8529 var baseURL = (_http$defaults2 = http.defaults) === null || _http$defaults2 === void 0 ? void 0 : (_http$defaults2$baseU = _http$defaults2.baseURL) === null || _http$defaults2$baseU === void 0 ? void 0 : _http$defaults2$baseU.replace('/spaces/', '/organizations/');
8530 return http.get('', {
8531 baseURL: baseURL
8532 }).then(function (response) {
8533 return wrapOrganizationCollection(http, response.data);
8534 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8535 },
8536
8537 /**
8538 * Gets the authenticated user
8539 * @return Promise for a User
8540 * @example ```javascript
8541 * const contentful = require('contentful-management')
8542 *
8543 * const client = contentful.createClient({
8544 * accessToken: '<content_management_api_key>'
8545 * })
8546 *
8547 * client.getCurrentUser()
8548 * .then(user => console.log(user.firstName))
8549 * .catch(console.error)
8550 * ```
8551 */
8552 getCurrentUser: function getCurrentUser() {
8553 var _http$defaults3, _http$defaults3$baseU;
8554
8555 var baseURL = (_http$defaults3 = http.defaults) === null || _http$defaults3 === void 0 ? void 0 : (_http$defaults3$baseU = _http$defaults3.baseURL) === null || _http$defaults3$baseU === void 0 ? void 0 : _http$defaults3$baseU.replace('/spaces/', '/users/me/');
8556 return http.get('', {
8557 baseURL: baseURL
8558 }).then(function (response) {
8559 return wrapUser(http, response.data);
8560 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8561 },
8562
8563 /**
8564 * Creates a personal access token
8565 * @param data - personal access token config
8566 * @return Promise for a Token
8567 * @example ```javascript
8568 * const contentful = require('contentful-management')
8569 *
8570 * const client = contentful.createClient({
8571 * accessToken: '<content_management_api_key>'
8572 * })
8573 *
8574 * client.createPersonalAccessToken(
8575 * {
8576 * "name": "My Token",
8577 * "scope": [
8578 * "content_management_manage"
8579 * ]
8580 * }
8581 * )
8582 * .then(personalAccessToken => console.log(personalAccessToken.token))
8583 * .catch(console.error)
8584 * ```
8585 */
8586 createPersonalAccessToken: function createPersonalAccessToken(data) {
8587 var _http$defaults4, _http$defaults4$baseU;
8588
8589 var baseURL = (_http$defaults4 = http.defaults) === null || _http$defaults4 === void 0 ? void 0 : (_http$defaults4$baseU = _http$defaults4.baseURL) === null || _http$defaults4$baseU === void 0 ? void 0 : _http$defaults4$baseU.replace('/spaces/', '/users/me/access_tokens');
8590 return http.post('', data, {
8591 baseURL: baseURL
8592 }).then(function (response) {
8593 return wrapPersonalAccessToken(http, response.data);
8594 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8595 },
8596
8597 /**
8598 * Gets a personal access token
8599 * @param data - personal access token config
8600 * @return Promise for a Token
8601 * @example ```javascript
8602 * const contentful = require('contentful-management')
8603 *
8604 * const client = contentful.createClient({
8605 * accessToken: '<content_management_api_key>'
8606 * })
8607 *
8608 * client.getPersonalAccessToken(tokenId)
8609 * .then(token => console.log(token.token))
8610 * .catch(console.error)
8611 * ```
8612 */
8613 getPersonalAccessToken: function getPersonalAccessToken(tokenId) {
8614 var _http$defaults5, _http$defaults5$baseU;
8615
8616 var baseURL = (_http$defaults5 = http.defaults) === null || _http$defaults5 === void 0 ? void 0 : (_http$defaults5$baseU = _http$defaults5.baseURL) === null || _http$defaults5$baseU === void 0 ? void 0 : _http$defaults5$baseU.replace('/spaces/', '/users/me/access_tokens');
8617 return http.get(tokenId, {
8618 baseURL: baseURL
8619 }).then(function (response) {
8620 return wrapPersonalAccessToken(http, response.data);
8621 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8622 },
8623
8624 /**
8625 * Gets all personal access tokens
8626 * @return Promise for a Token
8627 * @example ```javascript
8628 * const contentful = require('contentful-management')
8629 *
8630 * const client = contentful.createClient({
8631 * accessToken: '<content_management_api_key>'
8632 * })
8633 *
8634 * client.getPersonalAccessTokens()
8635 * .then(response => console.log(reponse.items))
8636 * .catch(console.error)
8637 * ```
8638 */
8639 getPersonalAccessTokens: function getPersonalAccessTokens() {
8640 var _http$defaults6, _http$defaults6$baseU;
8641
8642 var baseURL = (_http$defaults6 = http.defaults) === null || _http$defaults6 === void 0 ? void 0 : (_http$defaults6$baseU = _http$defaults6.baseURL) === null || _http$defaults6$baseU === void 0 ? void 0 : _http$defaults6$baseU.replace('/spaces/', '/users/me/access_tokens');
8643 return http.get('', {
8644 baseURL: baseURL
8645 }).then(function (response) {
8646 return wrapPersonalAccessTokenCollection(http, response.data);
8647 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8648 },
8649
8650 /**
8651 * Get organization usage grouped by {@link UsageMetricEnum metric}
8652 *
8653 * @param organizationId - Id of an organization
8654 * @param query - Query parameters
8655 * @return Promise of a collection of usages
8656 * @example ```javascript
8657 *
8658 * const contentful = require('contentful-management')
8659 *
8660 * const client = contentful.createClient({
8661 * accessToken: '<content_management_api_key>'
8662 * })
8663 *
8664 * client.getOrganizationUsage('<organizationId>', {
8665 * 'metric[in]': 'cma,gql',
8666 * 'dateRange.startAt': '2019-10-22',
8667 * 'dateRange.endAt': '2019-11-10'
8668 * }
8669 * })
8670 * .then(result => console.log(result.items))
8671 * .catch(console.error)
8672 * ```
8673 */
8674 getOrganizationUsage: function getOrganizationUsage(organizationId) {
8675 var _http$defaults7, _http$defaults7$baseU;
8676
8677 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8678 var baseURL = (_http$defaults7 = http.defaults) === null || _http$defaults7 === void 0 ? void 0 : (_http$defaults7$baseU = _http$defaults7.baseURL) === null || _http$defaults7$baseU === void 0 ? void 0 : _http$defaults7$baseU.replace('/spaces/', "/organizations/".concat(organizationId, "/organization_periodic_usages"));
8679 return http.get('', {
8680 baseURL: baseURL,
8681 params: query
8682 }).then(function (response) {
8683 return wrapUsageCollection(http, response.data);
8684 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8685 },
8686
8687 /**
8688 * Get organization usage grouped by space and metric
8689 *
8690 * @param organizationId - Id of an organization
8691 * @param query - Query parameters
8692 * @return Promise of a collection of usages
8693 * ```javascript
8694 * const contentful = require('contentful-management')
8695 *
8696 * const client = contentful.createClient({
8697 * accessToken: '<content_management_api_key>'
8698 * })
8699 *
8700 * client.getSpaceUsage('<organizationId>', {
8701 * skip: 0,
8702 * limit: 10,
8703 * 'metric[in]': 'cda,cpa,gql',
8704 * 'dateRange.startAt': '2019-10-22',
8705 * 'dateRange.endAt': '2020-11-30'
8706 * }
8707 * })
8708 * .then(result => console.log(result.items))
8709 * .catch(console.error)
8710 * ```
8711 */
8712 getSpaceUsage: function getSpaceUsage(organizationId) {
8713 var _http$defaults8, _http$defaults8$baseU;
8714
8715 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8716 var baseURL = (_http$defaults8 = http.defaults) === null || _http$defaults8 === void 0 ? void 0 : (_http$defaults8$baseU = _http$defaults8.baseURL) === null || _http$defaults8$baseU === void 0 ? void 0 : _http$defaults8$baseU.replace('/spaces/', "/organizations/".concat(organizationId, "/space_periodic_usages"));
8717 return http.get('', {
8718 baseURL: baseURL,
8719 params: query
8720 }).then(function (response) {
8721 return wrapUsageCollection(http, response.data);
8722 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8723 },
8724
8725 /**
8726 * Make a custom request to the Contentful management API's /spaces endpoint
8727 * @param opts - axios request options (https://github.com/mzabriskie/axios)
8728 * @return Promise for the response data
8729 * ```javascript
8730 * const contentful = require('contentful-management')
8731 *
8732 * const client = contentful.createClient({
8733 * accessToken: '<content_management_api_key>'
8734 * })
8735 *
8736 * client.rawRequest({
8737 * method: 'GET',
8738 * url: '/custom/path'
8739 * })
8740 * .then((responseData) => console.log(responseData))
8741 * .catch(console.error)
8742 * ```
8743 */
8744 rawRequest: function rawRequest(opts) {
8745 return http(opts).then(function (response) {
8746 return response.data;
8747 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
8748 }
8749 };
8750}
8751
8752/***/ }),
8753
8754/***/ "./create-environment-api.ts":
8755/*!***********************************!*\
8756 !*** ./create-environment-api.ts ***!
8757 \***********************************/
8758/*! exports provided: default */
8759/***/ (function(module, __webpack_exports__, __webpack_require__) {
8760
8761"use strict";
8762__webpack_require__.r(__webpack_exports__);
8763/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createEnvironmentApi; });
8764/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
8765/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
8766/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
8767/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./error-handler */ "./error-handler.ts");
8768/* harmony import */ var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./entities */ "./entities/index.ts");
8769function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
8770
8771function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
8772
8773function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8774
8775
8776
8777
8778
8779
8780/**
8781 * Creates API object with methods to access the Environment API
8782 */
8783function createEnvironmentApi(_ref) {
8784 var http = _ref.http,
8785 httpUpload = _ref.httpUpload;
8786 var wrapEnvironment = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environment.wrapEnvironment;
8787 var _entities$contentType = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].contentType,
8788 wrapContentType = _entities$contentType.wrapContentType,
8789 wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;
8790 var _entities$entry = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].entry,
8791 wrapEntry = _entities$entry.wrapEntry,
8792 wrapEntryCollection = _entities$entry.wrapEntryCollection;
8793 var _entities$asset = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].asset,
8794 wrapAsset = _entities$asset.wrapAsset,
8795 wrapAssetCollection = _entities$asset.wrapAssetCollection;
8796 var _entities$locale = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].locale,
8797 wrapLocale = _entities$locale.wrapLocale,
8798 wrapLocaleCollection = _entities$locale.wrapLocaleCollection;
8799 var wrapSnapshotCollection = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].snapshot.wrapSnapshotCollection;
8800 var wrapEditorInterface = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].editorInterface.wrapEditorInterface;
8801 var wrapUpload = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].upload.wrapUpload;
8802 var _entities$uiExtension = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].uiExtension,
8803 wrapUiExtension = _entities$uiExtension.wrapUiExtension,
8804 wrapUiExtensionCollection = _entities$uiExtension.wrapUiExtensionCollection;
8805 var _entities$appInstalla = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].appInstallation,
8806 wrapAppInstallation = _entities$appInstalla.wrapAppInstallation,
8807 wrapAppInstallationCollection = _entities$appInstalla.wrapAppInstallationCollection;
8808
8809 function createAsset(data) {
8810 return http.post('assets', data).then(function (response) {
8811 return wrapAsset(http, response.data);
8812 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
8813 }
8814
8815 function createUpload(data) {
8816 var file = data.file;
8817
8818 if (!file) {
8819 return Promise.reject(new Error('Unable to locate a file to upload.'));
8820 }
8821
8822 return httpUpload.post('uploads', file, {
8823 headers: {
8824 'Content-Type': 'application/octet-stream'
8825 }
8826 }).then(function (uploadResponse) {
8827 return wrapUpload(httpUpload, uploadResponse.data);
8828 })["catch"](_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
8829 }
8830 /**
8831 * @private
8832 * sdk relies heavily on sys metadata
8833 * so we cannot omit the sys property on sdk level
8834 */
8835
8836
8837 function normalizeSelect(query) {
8838 if (query.select && !/sys/i.test(query.select)) {
8839 query.select += ',sys';
8840 }
8841 }
8842
8843 return {
8844 /**
8845 * Deletes the environment
8846 * @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
8847 * @example ```javascript
8848 * const contentful = require('contentful-management')
8849 *
8850 * const client = contentful.createClient({
8851 * accessToken: '<content_management_api_key>'
8852 * })
8853 *
8854 * client.getSpace('<space_id>')
8855 * .then((space) => space.getEnvironment('<environment-id>'))
8856 * .then((environment) => environment.delete())
8857 * .then(() => console.log('Environment deleted.'))
8858 * .catch(console.error)
8859 * ```
8860 */
8861 "delete": function deleteEnvironment() {
8862 return http["delete"]('').then(function () {// noop
8863 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
8864 },
8865
8866 /**
8867 * Updates the environment
8868 * @return Promise for the updated environment.
8869 * @example ```javascript
8870 * const contentful = require('contentful-management')
8871 *
8872 * const client = contentful.createClient({
8873 * accessToken: '<content_management_api_key>'
8874 * })
8875 *
8876 * client.getSpace('<space_id>')
8877 * .then((space) => space.getEnvironment('<environment-id>'))
8878 * .then((environment) => {
8879 * environment.name = 'New name'
8880 * return environment.update()
8881 * })
8882 * .then((environment) => console.log(`Environment ${environment.sys.id} renamed.`)
8883 * .catch(console.error)
8884 * ```
8885 */
8886 update: function updateEnvironment() {
8887 var raw = this.toPlainObject();
8888 var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
8889 delete data.sys;
8890 return http.put('', data, {
8891 headers: {
8892 'X-Contentful-Version': raw.sys.version
8893 }
8894 }).then(function (response) {
8895 return wrapEnvironment(http, response.data);
8896 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
8897 },
8898
8899 /**
8900 * Creates SDK Entry object (locally) from entry data
8901 * @param entryData - Entry Data
8902 * @return Entry
8903 * @example ```javascript
8904 * environment.getEntry('entryId').then(entry => {
8905 *
8906 * // Build a plainObject in order to make it usable for React (saving in state or redux)
8907 * const plainObject = entry.toPlainObject();
8908 *
8909 * // The entry is being updated in some way as plainObject:
8910 * const updatedPlainObject = {
8911 * ...plainObject,
8912 * fields: {
8913 * ...plainObject.fields,
8914 * title: {
8915 * 'en-US': 'updatedTitle'
8916 * }
8917 * }
8918 * };
8919 *
8920 * // Rebuild an sdk object out of the updated plainObject:
8921 * const entryWithMethodsAgain = environment.getEntryFromData(updatedPlainObject);
8922 *
8923 * // Update with help of the sdk method:
8924 * entryWithMethodsAgain.update();
8925 *
8926 * });
8927 * ```
8928 **/
8929 getEntryFromData: function getEntryFromData(entryData) {
8930 return wrapEntry(http, entryData);
8931 },
8932
8933 /**
8934 * Creates SDK Asset object (locally) from entry data
8935 * @param assetData - Asset ID
8936 * @return Asset
8937 * @example ```javascript
8938 * environment.getAsset('asset_id').then(asset => {
8939 *
8940 * // Build a plainObject in order to make it usable for React (saving in state or redux)
8941 * const plainObject = asset.toPlainObject();
8942 *
8943 * // The asset is being updated in some way as plainObject:
8944 * const updatedPlainObject = {
8945 * ...plainObject,
8946 * fields: {
8947 * ...plainObject.fields,
8948 * title: {
8949 * 'en-US': 'updatedTitle'
8950 * }
8951 * }
8952 * };
8953 *
8954 * // Rebuild an sdk object out of the updated plainObject:
8955 * const assetWithMethodsAgain = environment.getAssetFromData(updatedPlainObject);
8956 *
8957 * // Update with help of the sdk method:
8958 * assetWithMethodsAgain.update();
8959 *
8960 * });
8961 * ```
8962 */
8963 getAssetFromData: function getAssetFromData(assetData) {
8964 return wrapAsset(http, assetData);
8965 },
8966
8967 /**
8968 * Gets a Content Type
8969 * @param id - Content Type ID
8970 * @return Promise for a Content Type
8971 * @example ```javascript
8972 * const contentful = require('contentful-management')
8973 *
8974 * const client = contentful.createClient({
8975 * accessToken: '<content_management_api_key>'
8976 * })
8977 *
8978 * client.getSpace('<space_id>')
8979 * .then((space) => space.getEnvironment('<environment-id>'))
8980 * .then((environment) => environment.getContentType('<content_type_id>'))
8981 * .then((contentType) => console.log(contentType))
8982 * .catch(console.error)
8983 * ```
8984 */
8985 getContentType: function getContentType(id) {
8986 return http.get('content_types/' + id).then(function (response) {
8987 return wrapContentType(http, response.data);
8988 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
8989 },
8990
8991 /**
8992 * Gets a collection of Content Types
8993 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
8994 * @return Promise for a collection of Content Types
8995 * @example ```javascript
8996 * const contentful = require('contentful-management')
8997 *
8998 * const client = contentful.createClient({
8999 * accessToken: '<content_management_api_key>'
9000 * })
9001 *
9002 * client.getSpace('<space_id>')
9003 * .then((space) => space.getEnvironment('<environment-id>'))
9004 * .then((environment) => environment.getContentTypes())
9005 * .then((response) => console.log(response.items))
9006 * .catch(console.error)
9007 * ```
9008 */
9009 getContentTypes: function getContentTypes() {
9010 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9011 return http.get('content_types', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9012 query: query
9013 })).then(function (response) {
9014 return wrapContentTypeCollection(http, response.data);
9015 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9016 },
9017
9018 /**
9019 * Creates a Content Type
9020 * @param data - Object representation of the Content Type to be created
9021 * @return Promise for the newly created Content Type
9022 * @example ```javascript
9023 * const contentful = require('contentful-management')
9024 *
9025 * const client = contentful.createClient({
9026 * accessToken: '<content_management_api_key>'
9027 * })
9028 *
9029 * client.getSpace('<space_id>')
9030 * .then((space) => space.getEnvironment('<environment-id>'))
9031 * .then((environment) => environment.createContentType({
9032 * name: 'Blog Post',
9033 * fields: [
9034 * {
9035 * id: 'title',
9036 * name: 'Title',
9037 * required: true,
9038 * localized: false,
9039 * type: 'Text'
9040 * }
9041 * ]
9042 * }))
9043 * .then((contentType) => console.log(contentType))
9044 * .catch(console.error)
9045 * ```
9046 */
9047 createContentType: function createContentType(data) {
9048 return http.post('content_types', data).then(function (response) {
9049 return wrapContentType(http, response.data);
9050 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9051 },
9052
9053 /**
9054 * Creates a Content Type with a custom ID
9055 * @param id - Content Type ID
9056 * @param data - Object representation of the Content Type to be created
9057 * @return Promise for the newly created Content Type
9058 * @example ```javascript
9059 * const contentful = require('contentful-management')
9060 *
9061 * const client = contentful.createClient({
9062 * accessToken: '<content_management_api_key>'
9063 * })
9064 *
9065 * client.getSpace('<space_id>')
9066 * .then((space) => space.getEnvironment('<environment-id>'))
9067 * .then((environment) => environment.createContentTypeWithId('<content-type-id>', {
9068 * name: 'Blog Post',
9069 * fields: [
9070 * {
9071 * id: 'title',
9072 * name: 'Title',
9073 * required: true,
9074 * localized: false,
9075 * type: 'Text'
9076 * }
9077 * ]
9078 * }))
9079 * .then((contentType) => console.log(contentType))
9080 * .catch(console.error)
9081 * ```
9082 */
9083 createContentTypeWithId: function createContentTypeWithId(id, data) {
9084 return http.put('content_types/' + id, data).then(function (response) {
9085 return wrapContentType(http, response.data);
9086 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9087 },
9088
9089 /**
9090 * Gets an EditorInterface for a ContentType
9091 * @param contentTypeId - Content Type ID
9092 * @return Promise for an EditorInterface
9093 * @example ```javascript
9094 * const contentful = require('contentful-management')
9095 *
9096 * const client = contentful.createClient({
9097 * accessToken: '<content_management_api_key>'
9098 * })
9099 *
9100 * client.getSpace('<space_id>')
9101 * .then((space) => space.getEnvironment('<environment-id>'))
9102 * .then((environment) => environment.getEditorInterfaceForContentType('<content_type_id>'))
9103 * .then((EditorInterface) => console.log(EditorInterface))
9104 * .catch(console.error)
9105 * ```
9106 */
9107 getEditorInterfaceForContentType: function getEditorInterfaceForContentType(contentTypeId) {
9108 return http.get('content_types/' + contentTypeId + '/editor_interface').then(function (response) {
9109 return wrapEditorInterface(http, response.data);
9110 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9111 },
9112
9113 /**
9114 * Gets an Entry
9115 * Warning: if you are using the select operator, when saving, any field that was not selected will be removed
9116 * from your entry in the backend
9117 * @param id - Entry ID
9118 * @param query - Object with search parameters. In this method it's only useful for `locale`.
9119 * @return Promise for an Entry
9120 * @example ```javascript
9121 * const contentful = require('contentful-management')
9122 *
9123 * const client = contentful.createClient({
9124 * accessToken: '<content_management_api_key>'
9125 * })
9126 *
9127 * client.getSpace('<space_id>')
9128 * .then((space) => space.getEnvironment('<environment-id>'))
9129 * .then((environment) => environment.getEntry('<entry-id>'))
9130 * .then((entry) => console.log(entry))
9131 * .catch(console.error)
9132 * ```
9133 */
9134 getEntry: function getEntry(id) {
9135 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9136 normalizeSelect(query);
9137 return http.get('entries/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9138 query: query
9139 })).then(function (response) {
9140 return wrapEntry(http, response.data);
9141 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9142 },
9143
9144 /**
9145 * Gets a collection of Entries
9146 * Warning: if you are using the select operator, when saving, any field that was not selected will be removed
9147 * from your entry in the backend
9148 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
9149 * @return Promise for a collection of Entries
9150 * @example ```javascript
9151 * const contentful = require('contentful-management')
9152 *
9153 * const client = contentful.createClient({
9154 * accessToken: '<content_management_api_key>'
9155 * })
9156 *
9157 * client.getSpace('<space_id>')
9158 * .then((space) => space.getEnvironment('<environment-id>'))
9159 * .then((environment) => environment.getEntries({'content_type': 'foo'})) // you can add more queries as 'key': 'value'
9160 * .then((response) => console.log(response.items))
9161 * .catch(console.error)
9162 * ```
9163 */
9164 getEntries: function getEntries() {
9165 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9166 normalizeSelect(query);
9167 return http.get('entries', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9168 query: query
9169 })).then(function (response) {
9170 return wrapEntryCollection(http, response.data);
9171 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9172 },
9173
9174 /**
9175 * Creates a Entry
9176 * @param contentTypeId - The Content Type ID of the newly created Entry
9177 * @param data - Object representation of the Entry to be created
9178 * @return Promise for the newly created Entry
9179 * @example ```javascript
9180 * const contentful = require('contentful-management')
9181 *
9182 * const client = contentful.createClient({
9183 * accessToken: '<content_management_api_key>'
9184 * })
9185 *
9186 * client.getSpace('<space_id>')
9187 * .then((space) => space.getEnvironment('<environment-id>'))
9188 * .then((environment) => environment.createEntry('<content_type_id>', {
9189 * fields: {
9190 * title: {
9191 * 'en-US': 'Entry title'
9192 * }
9193 * }
9194 * }))
9195 * .then((entry) => console.log(entry))
9196 * .catch(console.error)
9197 * ```
9198 */
9199 createEntry: function createEntry(contentTypeId, data) {
9200 return http.post('entries', data, {
9201 headers: {
9202 'X-Contentful-Content-Type': contentTypeId
9203 }
9204 }).then(function (response) {
9205 return wrapEntry(http, response.data);
9206 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9207 },
9208
9209 /**
9210 * Creates a Entry with a custom ID
9211 * @param contentTypeId - The Content Type of the newly created Entry
9212 * @param id - Entry ID
9213 * @param data - Object representation of the Entry to be created
9214 * @return Promise for the newly created Entry
9215 * @example ```javascript
9216 * const contentful = require('contentful-management')
9217 *
9218 * const client = contentful.createClient({
9219 * accessToken: '<content_management_api_key>'
9220 * })
9221 *
9222 * // Create entry
9223 * client.getSpace('<space_id>')
9224 * .then((space) => space.getEnvironment('<environment-id>'))
9225 * .then((environment) => environment.createEntryWithId('<content_type_id>', '<entry_id>', {
9226 * fields: {
9227 * title: {
9228 * 'en-US': 'Entry title'
9229 * }
9230 * }
9231 * }))
9232 * .then((entry) => console.log(entry))
9233 * .catch(console.error)
9234 * ```
9235 */
9236 createEntryWithId: function createEntryWithId(contentTypeId, id, data) {
9237 return http.put('entries/' + id, data, {
9238 headers: {
9239 'X-Contentful-Content-Type': contentTypeId
9240 }
9241 }).then(function (response) {
9242 return wrapEntry(http, response.data);
9243 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9244 },
9245
9246 /**
9247 * Gets an Asset
9248 * Warning: if you are using the select operator, when saving, any field that was not selected will be removed
9249 * from your entry in the backend
9250 * @param id - Asset ID
9251 * @param query - Object with search parameters. In this method it's only useful for `locale`.
9252 * @return Promise for an Asset
9253 * @example ```javascript
9254 * const contentful = require('contentful-management')
9255 *
9256 * const client = contentful.createClient({
9257 * accessToken: '<content_management_api_key>'
9258 * })
9259 *
9260 * client.getSpace('<space_id>')
9261 * .then((space) => space.getEnvironment('<environment-id>'))
9262 * .then((environment) => environment.getAsset('<asset_id>'))
9263 * .then((asset) => console.log(asset))
9264 * .catch(console.error)
9265 * ```
9266 */
9267 getAsset: function getAsset(id) {
9268 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9269 normalizeSelect(query);
9270 return http.get('assets/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9271 query: query
9272 })).then(function (response) {
9273 return wrapAsset(http, response.data);
9274 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9275 },
9276
9277 /**
9278 * Gets a collection of Assets
9279 * Warning: if you are using the select operator, when saving, any field that was not selected will be removed
9280 * from your entry in the backend
9281 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
9282 * @return Promise for a collection of Assets
9283 * @example ```javascript
9284 * const contentful = require('contentful-management')
9285 *
9286 * const client = contentful.createClient({
9287 * accessToken: '<content_management_api_key>'
9288 * })
9289 *
9290 * client.getSpace('<space_id>')
9291 * .then((space) => space.getEnvironment('<environment-id>'))
9292 * .then((environment) => environment.getAssets())
9293 * .then((response) => console.log(response.items))
9294 * .catch(console.error)
9295 * ```
9296 */
9297 getAssets: function getAssets() {
9298 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9299 normalizeSelect(query);
9300 return http.get('assets', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9301 query: query
9302 })).then(function (response) {
9303 return wrapAssetCollection(http, response.data);
9304 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9305 },
9306
9307 /**
9308 * Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
9309 * @param data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
9310 * @return Promise for the newly created Asset
9311 * @example ```javascript
9312 * const client = contentful.createClient({
9313 * accessToken: '<content_management_api_key>'
9314 * })
9315 *
9316 * // Create asset
9317 * client.getSpace('<space_id>')
9318 * .then((space) => space.getEnvironment('<environment-id>'))
9319 * .then((environment) => environment.createAsset({
9320 * fields: {
9321 * title: {
9322 * 'en-US': 'Playsam Streamliner'
9323 * },
9324 * file: {
9325 * 'en-US': {
9326 * contentType: 'image/jpeg',
9327 * fileName: 'example.jpeg',
9328 * upload: 'https://example.com/example.jpg'
9329 * }
9330 * }
9331 * }
9332 * }))
9333 * .then((asset) => asset.processForLocale("en-US")) // OR asset.processForAllLocales()
9334 * .then((asset) => console.log(asset))
9335 * .catch(console.error)
9336 * ```
9337 */
9338 createAsset: createAsset,
9339
9340 /**
9341 * Creates a Asset with a custom ID. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
9342 * @param id - Asset ID
9343 * @param data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
9344 * @return Promise for the newly created Asset
9345 * @example ```javascript
9346 * const client = contentful.createClient({
9347 * accessToken: '<content_management_api_key>'
9348 * })
9349 *
9350 * // Create asset
9351 * client.getSpace('<space_id>')
9352 * .then((space) => space.getEnvironment('<environment-id>'))
9353 * .then((environment) => environment.createAssetWithId('<asset_id>', {
9354 * title: {
9355 * 'en-US': 'Playsam Streamliner'
9356 * },
9357 * file: {
9358 * 'en-US': {
9359 * contentType: 'image/jpeg',
9360 * fileName: 'example.jpeg',
9361 * upload: 'https://example.com/example.jpg'
9362 * }
9363 * }
9364 * }))
9365 * .then((asset) => asset.process())
9366 * .then((asset) => console.log(asset))
9367 * .catch(console.error)
9368 * ```
9369 */
9370 createAssetWithId: function createAssetWithId(id, data) {
9371 return http.put('assets/' + id, data).then(function (response) {
9372 return wrapAsset(http, response.data);
9373 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9374 },
9375
9376 /**
9377 * Creates a Asset based on files. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
9378 * @param data - Object representation of the Asset to be created. Note that the field object should have an uploadFrom property on asset creation, which will be removed and replaced with an url property when processing is finished.
9379 * @param data.fields.file.[LOCALE].file - Can be a string, an ArrayBuffer or a Stream.
9380 * @return Promise for the newly created Asset
9381 * @example ```javascript
9382 * const client = contentful.createClient({
9383 * accessToken: '<content_management_api_key>'
9384 * })
9385 *
9386 * client.getSpace('<space_id>')
9387 * .then((space) => space.getEnvironment('<environment-id>'))
9388 * .then((environment) => environment.createAssetFromFiles({
9389 * fields: {
9390 * file: {
9391 * 'en-US': {
9392 * contentType: 'image/jpeg',
9393 * fileName: 'filename_english.jpg',
9394 * file: createReadStream('path/to/filename_english.jpg')
9395 * },
9396 * 'de-DE': {
9397 * contentType: 'image/svg+xml',
9398 * fileName: 'filename_german.svg',
9399 * file: '<svg><path fill="red" d="M50 50h150v50H50z"/></svg>'
9400 * }
9401 * }
9402 * }
9403 * }))
9404 * .then((asset) => console.log(asset))
9405 * .catch(console.error)
9406 * ```
9407 */
9408 createAssetFromFiles: function createAssetFromFiles(data) {
9409 var file = data.fields.file;
9410 return Promise.all(Object.keys(file).map(function (locale) {
9411 var _file$locale = file[locale],
9412 contentType = _file$locale.contentType,
9413 fileName = _file$locale.fileName;
9414 return createUpload(file[locale]).then(function (upload) {
9415 return _defineProperty({}, locale, {
9416 contentType: contentType,
9417 fileName: fileName,
9418 uploadFrom: {
9419 sys: {
9420 type: 'Link',
9421 linkType: 'Upload',
9422 id: upload.sys.id
9423 }
9424 }
9425 });
9426 });
9427 })).then(function (uploads) {
9428 var file = uploads.reduce(function (fieldsData, upload) {
9429 return _objectSpread(_objectSpread({}, fieldsData), upload);
9430 }, {});
9431
9432 var asset = _objectSpread(_objectSpread({}, data), {}, {
9433 fields: _objectSpread(_objectSpread({}, data.fields), {}, {
9434 file: file
9435 })
9436 });
9437
9438 return createAsset(asset);
9439 })["catch"](_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9440 },
9441
9442 /**
9443 * Gets an Upload
9444 * @param id - Upload ID
9445 * @return Promise for an Upload
9446 * @example ```javascript
9447 * const client = contentful.createClient({
9448 * accessToken: '<content_management_api_key>'
9449 * })
9450 * const uploadStream = createReadStream('path/to/filename_english.jpg')
9451 *
9452 * client.getSpace('<space_id>')
9453 * .then((space) => space.getEnvironment('<environment-id>'))
9454 * .then((environment) => environment.getUpload('<upload-id>')
9455 * .then((upload) => console.log(upload))
9456 * .catch(console.error)
9457 */
9458 getUpload: function getUpload(id) {
9459 return httpUpload.get('uploads/' + id).then(function (response) {
9460 return wrapUpload(http, response.data);
9461 })["catch"](_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9462 },
9463
9464 /**
9465 * Creates a Upload.
9466 * @param data - Object with file information.
9467 * @param data.file - Actual file content. Can be a string, an ArrayBuffer or a Stream.
9468 * @return Upload object containing information about the uploaded file.
9469 * @example ```javascript
9470 * const client = contentful.createClient({
9471 * accessToken: '<content_management_api_key>'
9472 * })
9473 * const uploadStream = createReadStream('path/to/filename_english.jpg')
9474 *
9475 * client.getSpace('<space_id>')
9476 * .then((space) => space.getEnvironment('<environment-id>'))
9477 * .then((environment) => environment.createUpload({file: uploadStream})
9478 * .then((upload) => console.log(upload))
9479 * .catch(console.error)
9480 * ```
9481 */
9482 createUpload: createUpload,
9483
9484 /**
9485 * Gets a Locale
9486 * @param id - Locale ID
9487 * @return Promise for an Locale
9488 * @example ```javascript
9489 * const contentful = require('contentful-management')
9490 *
9491 * const client = contentful.createClient({
9492 * accessToken: '<content_management_api_key>'
9493 * })
9494 *
9495 * client.getSpace('<space_id>')
9496 * .then((space) => space.getEnvironment('<environment-id>'))
9497 * .then((environment) => environment.getLocale('<locale_id>'))
9498 * .then((locale) => console.log(locale))
9499 * .catch(console.error)
9500 * ```
9501 */
9502 getLocale: function getLocale(id) {
9503 return http.get('locales/' + id).then(function (response) {
9504 return wrapLocale(http, response.data);
9505 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9506 },
9507
9508 /**
9509 * Gets a collection of Locales
9510 * @return Promise for a collection of Locales
9511 * @example ```javascript
9512 * const contentful = require('contentful-management')
9513 *
9514 * const client = contentful.createClient({
9515 * accessToken: '<content_management_api_key>'
9516 * })
9517 *
9518 * client.getSpace('<space_id>')
9519 * .then((space) => space.getEnvironment('<environment-id>'))
9520 * .then((environment) => environment.getLocales())
9521 * .then((response) => console.log(response.items))
9522 * .catch(console.error)
9523 * ```
9524 */
9525 getLocales: function getLocales() {
9526 return http.get('locales').then(function (response) {
9527 return wrapLocaleCollection(http, response.data);
9528 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9529 },
9530
9531 /**
9532 * Creates a Locale
9533 * @param data - Object representation of the Locale to be created
9534 * @return Promise for the newly created Locale
9535 * @example ```javascript
9536 * const contentful = require('contentful-management')
9537 *
9538 * const client = contentful.createClient({
9539 * accessToken: '<content_management_api_key>'
9540 * })
9541 *
9542 * // Create locale
9543 * client.getSpace('<space_id>')
9544 * .then((space) => space.getEnvironment('<environment-id>'))
9545 * .then((environment) => environment.createLocale({
9546 * name: 'German (Austria)',
9547 * code: 'de-AT',
9548 * fallbackCode: 'de-DE',
9549 * optional: true
9550 * }))
9551 * .then((locale) => console.log(locale))
9552 * .catch(console.error)
9553 * ```
9554 */
9555 createLocale: function createLocale(data) {
9556 return http.post('locales', data).then(function (response) {
9557 return wrapLocale(http, response.data);
9558 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9559 },
9560
9561 /**
9562 * Gets an UI Extension
9563 * @param id - Extension ID
9564 * @return Promise for an UI Extension
9565 * @example ```javascript
9566 * const contentful = require('contentful-management')
9567 *
9568 * const client = contentful.createClient({
9569 * accessToken: '<content_management_api_key>'
9570 * })
9571 *
9572 * client.getSpace('<space_id>')
9573 * .then((space) => space.getEnvironment('<environment-id>'))
9574 * .then((environment) => environment.getUiExtension('<extension-id>'))
9575 * .then((uiExtension) => console.log(uiExtension))
9576 * .catch(console.error)
9577 * ```
9578 */
9579 getUiExtension: function getUiExtension(id) {
9580 return http.get('extensions/' + id).then(function (response) {
9581 return wrapUiExtension(http, response.data);
9582 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9583 },
9584
9585 /**
9586 * Gets a collection of UI Extension
9587 * @return Promise for a collection of UI Extensions
9588 * @example ```javascript
9589 * const contentful = require('contentful-management')
9590 *
9591 * const client = contentful.createClient({
9592 * accessToken: '<content_management_api_key>'
9593 * })
9594 *
9595 * client.getSpace('<space_id>')
9596 * .then((space) => space.getEnvironment('<environment-id>'))
9597 * .then((environment) => environment.getUiExtensions()
9598 * .then((response) => console.log(response.items))
9599 * .catch(console.error)
9600 * ```
9601 */
9602 getUiExtensions: function getUiExtensions() {
9603 return http.get('extensions').then(function (response) {
9604 return wrapUiExtensionCollection(http, response.data);
9605 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9606 },
9607
9608 /**
9609 * Creates a UI Extension
9610 * @param data - Object representation of the UI Extension to be created
9611 * @return Promise for the newly created UI Extension
9612 * @example ```javascript
9613 * const contentful = require('contentful-management')
9614 *
9615 * const client = contentful.createClient({
9616 * accessToken: '<content_management_api_key>'
9617 * })
9618 *
9619 * client.getSpace('<space_id>')
9620 * .then((space) => space.getEnvironment('<environment-id>'))
9621 * .then((environment) => environment.createUiExtension({
9622 * extension: {
9623 * name: 'My awesome extension',
9624 * src: 'https://example.com/my',
9625 * fieldTypes: [
9626 * {
9627 * type: 'Symbol'
9628 * },
9629 * {
9630 * type: 'Text'
9631 * }
9632 * ],
9633 * sidebar: false
9634 * }
9635 * }))
9636 * .then((uiExtension) => console.log(uiExtension))
9637 * .catch(console.error)
9638 * ```
9639 */
9640 createUiExtension: function createUiExtension(data) {
9641 return http.post('extensions', data).then(function (response) {
9642 return wrapUiExtension(http, response.data);
9643 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9644 },
9645
9646 /**
9647 * Creates a UI Extension with a custom ID
9648 * @param id - Extension ID
9649 * @param data - Object representation of the UI Extension to be created
9650 * @return Promise for the newly created UI Extension
9651 * @example ```javascript
9652 * const contentful = require('contentful-management')
9653 *
9654 * const client = contentful.createClient({
9655 * accessToken: '<content_management_api_key>'
9656 * })
9657 *
9658 * client.getSpace('<space_id>')
9659 * .then((space) => space.getEnvironment('<environment-id>'))
9660 * .then((environment) => environment.createUiExtensionWithId('<extension_id>', {
9661 * extension: {
9662 * name: 'My awesome extension',
9663 * src: 'https://example.com/my',
9664 * fieldTypes: [
9665 * {
9666 * type: 'Symbol'
9667 * },
9668 * {
9669 * type: 'Text'
9670 * }
9671 * ],
9672 * sidebar: false
9673 * }
9674 * }))
9675 * .then((uiExtension) => console.log(uiExtension))
9676 * .catch(console.error)
9677 * ```
9678 */
9679 createUiExtensionWithId: function createUiExtensionWithId(id, data) {
9680 return http.put('extensions/' + id, data).then(function (response) {
9681 return wrapUiExtension(http, response.data);
9682 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9683 },
9684
9685 /**
9686 * Gets an App Installation
9687 * @param appDefinitionId - AppDefinition ID
9688 * @param data - AppInstallation data
9689 * @return Promise for an App Installation
9690 * @example ```javascript
9691 * const contentful = require('contentful-management')
9692 *
9693 * const client = contentful.createClient({
9694 * accessToken: '<content_management_api_key>'
9695 * })
9696 *
9697 * client.getSpace('<space_id>')
9698 * .then((space) => space.getEnvironment('<environment-id>'))
9699 * .then((environment) => environment.createAppInstallation('<app_definition_id>', {
9700 * parameters: {
9701 * someParameter: someValue
9702 * }
9703 * })
9704 * .then((appInstallation) => console.log(appInstallation))
9705 * .catch(console.error)
9706 * ```
9707 */
9708 createAppInstallation: function createAppInstallation(appDefinitionId, data) {
9709 return http.put('app_installations/' + appDefinitionId, data).then(function (response) {
9710 return wrapAppInstallation(http, response.data);
9711 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9712 },
9713
9714 /**
9715 * Gets an App Installation
9716 * @param id - AppDefintion ID
9717 * @return Promise for an App Installation
9718 * @example ```javascript
9719 * const contentful = require('contentful-management')
9720 *
9721 * const client = contentful.createClient({
9722 * accessToken: '<content_management_api_key>'
9723 * })
9724 *
9725 * client.getSpace('<space_id>')
9726 * .then((space) => space.getEnvironment('<environment-id>'))
9727 * .then((environment) => environment.getAppInstallation('<app-definition-id>'))
9728 * .then((appInstallation) => console.log(appInstallation))
9729 * .catch(console.error)
9730 * ```
9731 */
9732 getAppInstallation: function getAppInstallation(id) {
9733 return http.get('app_installations/' + id).then(function (response) {
9734 return wrapAppInstallation(http, response.data);
9735 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9736 },
9737
9738 /**
9739 * Gets a collection of App Installation
9740 * @return Promise for a collection of App Installations
9741 * @example ```javascript
9742 * const contentful = require('contentful-management')
9743 *
9744 * const client = contentful.createClient({
9745 * accessToken: '<content_management_api_key>'
9746 * })
9747 *
9748 * client.getSpace('<space_id>')
9749 * .then((space) => space.getEnvironment('<environment-id>'))
9750 * .then((environment) => environment.getAppInstallations()
9751 * .then((response) => console.log(response.items))
9752 * .catch(console.error)
9753 * ```
9754 */
9755 getAppInstallations: function getAppInstallations() {
9756 return http.get('app_installations').then(function (response) {
9757 return wrapAppInstallationCollection(http, response.data);
9758 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9759 },
9760
9761 /**
9762 * Gets all snapshots of an entry
9763 * @func getEntrySnapshots
9764 * @param entryId - Entry ID
9765 * @param query - query additional query paramaters
9766 * @return Promise for a collection of Entry Snapshots
9767 * @example ```javascript
9768 * const contentful = require('contentful-management')
9769 *
9770 * const client = contentful.createClient({
9771 * accessToken: '<content_management_api_key>'
9772 * })
9773 *
9774 * client.getSpace('<space_id>')
9775 * .then((space) => space.getEnvironment('<environment-id>'))
9776 * .then((environment) => environment.getEntrySnapshots('<entry_id>'))
9777 * .then((snapshots) => console.log(snapshots.items))
9778 * .catch(console.error)
9779 * ```
9780 */
9781 getEntrySnapshots: function getEntrySnapshots(entryId) {
9782 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9783 return http.get("entries/".concat(entryId, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9784 query: query
9785 })).then(function (response) {
9786 return wrapSnapshotCollection(http, response.data);
9787 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9788 },
9789
9790 /**
9791 * Gets all snapshots of a contentType
9792 * @func getContentTypeSnapshots
9793 * @param contentTypeId - Content Type ID
9794 * @param query - query additional query paramaters
9795 * @return Promise for a collection of Content Type Snapshots
9796 * @example ```javascript
9797 * const contentful = require('contentful-management')
9798 *
9799 * const client = contentful.createClient({
9800 * accessToken: '<content_management_api_key>'
9801 * })
9802 *
9803 * client.getSpace('<space_id>')
9804 * .then((space) => space.getEnvironment('<environment-id>'))
9805 * .then((environment) => environment.getContentTypeSnapshots('<contentTypeId>'))
9806 * .then((snapshots) => console.log(snapshots.items))
9807 * .catch(console.error)
9808 * ```
9809 */
9810 getContentTypeSnapshots: function getContentTypeSnapshots(contentTypeId) {
9811 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9812 return http.get("content_types/".concat(contentTypeId, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9813 query: query
9814 })).then(function (response) {
9815 return wrapSnapshotCollection(http, response.data);
9816 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9817 }
9818 };
9819}
9820
9821/***/ }),
9822
9823/***/ "./create-organization-api.ts":
9824/*!************************************!*\
9825 !*** ./create-organization-api.ts ***!
9826 \************************************/
9827/*! exports provided: default */
9828/***/ (function(module, __webpack_exports__, __webpack_require__) {
9829
9830"use strict";
9831__webpack_require__.r(__webpack_exports__);
9832/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createOrganizationApi; });
9833/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/get */ "../node_modules/lodash/get.js");
9834/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_0__);
9835/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
9836/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./error-handler */ "./error-handler.ts");
9837/* harmony import */ var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./entities */ "./entities/index.ts");
9838
9839
9840
9841
9842
9843/**
9844 * Creates API object with methods to access the Organization API
9845 */
9846function createOrganizationApi(_ref) {
9847 var http = _ref.http;
9848 var _entities$appDefiniti = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].appDefinition,
9849 wrapAppDefinition = _entities$appDefiniti.wrapAppDefinition,
9850 wrapAppDefinitionCollection = _entities$appDefiniti.wrapAppDefinitionCollection;
9851 var _entities$user = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].user,
9852 wrapUser = _entities$user.wrapUser,
9853 wrapUserCollection = _entities$user.wrapUserCollection;
9854 var _entities$organizatio = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].organizationMembership,
9855 wrapOrganizationMembership = _entities$organizatio.wrapOrganizationMembership,
9856 wrapOrganizationMembershipCollection = _entities$organizatio.wrapOrganizationMembershipCollection;
9857 var _entities$teamMembers = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamMembership,
9858 wrapTeamMembership = _entities$teamMembers.wrapTeamMembership,
9859 wrapTeamMembershipCollection = _entities$teamMembers.wrapTeamMembershipCollection;
9860 var _entities$teamSpaceMe = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamSpaceMembership,
9861 wrapTeamSpaceMembership = _entities$teamSpaceMe.wrapTeamSpaceMembership,
9862 wrapTeamSpaceMembershipCollection = _entities$teamSpaceMe.wrapTeamSpaceMembershipCollection;
9863 var _entities$team = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].team,
9864 wrapTeam = _entities$team.wrapTeam,
9865 wrapTeamCollection = _entities$team.wrapTeamCollection;
9866 var _entities$spaceMember = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMembership,
9867 wrapSpaceMembership = _entities$spaceMember.wrapSpaceMembership,
9868 wrapSpaceMembershipCollection = _entities$spaceMember.wrapSpaceMembershipCollection;
9869 var wrapOrganizationInvitation = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].organizationInvitation.wrapOrganizationInvitation;
9870 var headers = {
9871 'x-contentful-enable-alpha-feature': 'organization-user-management-api'
9872 };
9873 return {
9874 /**
9875 * Gets a User
9876 * @return Promise for a User
9877 * @example ```javascript
9878 * const contentful = require('contentful-management')
9879 * const client = contentful.createClient({
9880 * accessToken: '<content_management_api_key>'
9881 * })
9882 *
9883 * client.getOrganization('<organization_id>')
9884 * .then((organization) => organization.getUser('id'))
9885 * .then((user) => console.log(user))
9886 * .catch(console.error)
9887 * ```
9888 */
9889 getUser: function getUser(id) {
9890 return http.get('users/' + id).then(function (response) {
9891 return wrapUser(http, response.data);
9892 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9893 },
9894
9895 /**
9896 * Gets a collection of Users in organization
9897 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
9898 * @return Promise a collection of Users in organization
9899 * @example ```javascript
9900 * const contentful = require('contentful-management')
9901 * const client = contentful.createClient({
9902 * accessToken: '<content_management_api_key>'
9903 * })
9904 *
9905 * client.getOrganization('<organization_id>')
9906 * .then((organization) => organization.getUsers())
9907 * .then((user) => console.log(user))
9908 * .catch(console.error)
9909 * ```
9910 */
9911 getUsers: function getUsers() {
9912 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9913 return http.get('users', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9914 query: query
9915 })).then(function (response) {
9916 return wrapUserCollection(http, response.data);
9917 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9918 },
9919
9920 /**
9921 * Gets an Organization Membership
9922 * @param id - Organization Membership ID
9923 * @return Promise for an Organization Membership
9924 * @example ```javascript
9925 * const contentful = require('contentful-management')
9926 * const client = contentful.createClient({
9927 * accessToken: '<content_management_api_key>'
9928 * })
9929 *
9930 * client.getOrganization('organization_id')
9931 * .then((organization) => organization.getOrganizationMembership('organizationMembership_id'))
9932 * .then((organizationMembership) => console.log(organizationMembership))
9933 * .catch(console.error)
9934 * ```
9935 */
9936 getOrganizationMembership: function getOrganizationMembership(id) {
9937 return http.get('organization_memberships/' + id).then(function (response) {
9938 return wrapOrganizationMembership(http, response.data);
9939 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9940 },
9941
9942 /**
9943 * Gets a collection of Organization Memberships
9944 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
9945 * @return Promise for a collection of Organization Memberships
9946 * @example ```javascript
9947 * const contentful = require('contentful-management')
9948 * const client = contentful.createClient({
9949 * accessToken: '<content_management_api_key>'
9950 * })
9951 *
9952 * client.getOrganization('organization_id')
9953 * .then((organization) => organization.getOrganizationMemberships({'limit': 100})) // you can add more queries as 'key': 'value'
9954 * .then((response) => console.log(response.items))
9955 * .catch(console.error)
9956 * ```
9957 */
9958 getOrganizationMemberships: function getOrganizationMemberships() {
9959 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9960 return http.get('organization_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
9961 query: query
9962 })).then(function (response) {
9963 return wrapOrganizationMembershipCollection(http, response.data);
9964 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9965 },
9966
9967 /**
9968 * Creates a Team
9969 * @param Object representation of the Team to be created
9970 * @example ```javascript
9971 * const contentful = require('contentful-management')
9972 * const client = contentful.createClient({
9973 * accessToken: '<content_management_api_key>'
9974 * })
9975 *
9976 * client.getOrganization('<org_id>')
9977 * .then((org) => org.createTeam({
9978 * name: 'new team',
9979 * description: 'new team description'
9980 * }))
9981 * .then((team) => console.log(team))
9982 * .catch(console.error)
9983 * ```
9984 */
9985 createTeam: function createTeam(data) {
9986 return http.post('teams', data).then(function (response) {
9987 return wrapTeam(http, response.data);
9988 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
9989 },
9990
9991 /**
9992 * Gets an Team
9993 * @example ```javascript
9994 * const contentful = require('contentful-management')
9995 * const client = contentful.createClient({
9996 * accessToken: '<content_management_api_key>'
9997 * })
9998 *
9999 * client.getOrganization('orgId')
10000 * .then((organization) => organization.getTeam('teamId'))
10001 * .then((team) => console.log(team))
10002 * .catch(console.error)
10003 * ```
10004 */
10005 getTeam: function getTeam(teamId) {
10006 return http.get('teams/' + teamId).then(function (response) {
10007 return wrapTeam(http, response.data);
10008 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10009 },
10010
10011 /**
10012 * Gets all Teams in an organization
10013 * @example ```javascript
10014 * const contentful = require('contentful-management')
10015 * const client = contentful.createClient({
10016 * accessToken: '<content_management_api_key>'
10017 * })
10018 *
10019 * client.getOrganization('orgId')
10020 * .then((organization) => organization.getTeams())
10021 * .then((teams) => console.log(teams))
10022 * .catch(console.error)
10023 * ```
10024 */
10025 getTeams: function getTeams() {
10026 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10027 return http.get('teams', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10028 query: query
10029 })).then(function (response) {
10030 return wrapTeamCollection(http, response.data);
10031 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10032 },
10033
10034 /**
10035 * Creates a Team membership
10036 * @param data - Object representation of the Team Membership to be created
10037 * @return Promise for the newly created TeamMembership
10038 * @example ```javascript
10039 * const contentful = require('contentful-management')
10040 * const client = contentful.createClient({
10041 * accessToken: '<content_management_api_key>'
10042 * })
10043 *
10044 * client.getOrganization('organizationId')
10045 * .then((org) => org.createTeamMembership('teamId', {
10046 * admin: true,
10047 * organizationMembershipId: 'organizationMembershipId'
10048 * }))
10049 * .then((teamMembership) => console.log(teamMembership))
10050 * .catch(console.error)
10051 * ```
10052 */
10053 createTeamMembership: function createTeamMembership(teamId, data) {
10054 return http.post('teams/' + teamId + '/team_memberships', data).then(function (response) {
10055 return wrapTeamMembership(http, response.data);
10056 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10057 },
10058
10059 /**
10060 * Gets an Team Membership from the team with given teamId
10061 * @return Promise for an Team Membership
10062 * @example ```javascript
10063 * const contentful = require('contentful-management')
10064 * const client = contentful.createClient({
10065 * accessToken: '<content_management_api_key>'
10066 * })
10067 *
10068 * client.getOrganization('organizationId')
10069 * .then((organization) => organization.getTeamMembership('teamId', 'teamMembership_id'))
10070 * .then((teamMembership) => console.log(teamMembership))
10071 * .catch(console.error)
10072 * ```
10073 */
10074 getTeamMembership: function getTeamMembership(teamId, teamMembershipId) {
10075 return http.get('teams/' + teamId + '/team_memberships/' + teamMembershipId).then(function (response) {
10076 return wrapTeamMembership(http, response.data);
10077 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10078 },
10079
10080 /**
10081 * Get all Team Memberships. If teamID is provided in the optional config object, it will return all Team Memberships in that team. By default, returns all team memberships for the organization.
10082 * @return Promise for a Team Membership Collection
10083 * @example ```javascript
10084 * const contentful = require('contentful-management')
10085 * const client = contentful.createClient({
10086 * accessToken: '<content_management_api_key>'
10087 * })
10088 *
10089 * client.getOrganization('organizationId')
10090 * .then((organization) => organization.getTeamMemberships('teamId'))
10091 * .then((teamMemberships) => console.log(teamMemberships))
10092 * .catch(console.error)
10093 * ```
10094 */
10095 getTeamMemberships: function getTeamMemberships() {
10096 var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10097
10098 var query = lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(opts, 'query', {});
10099
10100 if (opts.teamId) {
10101 return http.get('teams/' + opts.teamId + '/team_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10102 query: query
10103 })).then(function (response) {
10104 return wrapTeamMembershipCollection(http, response.data);
10105 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10106 }
10107
10108 return http.get('team_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10109 query: query
10110 })).then(function (response) {
10111 return wrapTeamMembershipCollection(http, response.data);
10112 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10113 },
10114
10115 /**
10116 * Get all Team Space Memberships. If teamID is provided in the optional config object, it will return all Team Space Memberships in that team. By default, returns all team space memberships across all teams in the organization.
10117 * @return Promise for a Team Space Membership Collection
10118 * @example ```javascript
10119 * const contentful = require('contentful-management')
10120 * const client = contentful.createClient({
10121 * accessToken: '<content_management_api_key>'
10122 * })
10123 *
10124 * client.getOrganization('organizationId')
10125 * .then((organization) => organization.getTeamSpaceMemberships('teamId'))
10126 * .then((teamSpaceMemberships) => console.log(teamSpaceMemberships))
10127 * .catch(console.error)
10128 * ```
10129 */
10130 getTeamSpaceMemberships: function getTeamSpaceMemberships() {
10131 var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10132
10133 var query = lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(opts, 'query', {});
10134
10135 if (opts.teamId) {
10136 // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
10137 // @ts-ignore
10138 query['sys.team.sys.id'] = opts.teamId;
10139 }
10140
10141 return http.get('team_space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10142 query: query
10143 })).then(function (response) {
10144 return wrapTeamSpaceMembershipCollection(http, response.data);
10145 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10146 },
10147
10148 /**
10149 * Get a Team Space Membership with given teamSpaceMembershipId
10150 * @return Promise for a Team Space Membership
10151 * @example ```javascript
10152 * const contentful = require('contentful-management')
10153 * const client = contentful.createClient({
10154 * accessToken: '<content_management_api_key>'
10155 * })
10156 *
10157 * client.getOrganization('organizationId')
10158 * .then((organization) => organization.getTeamSpaceMembership('teamSpaceMembershipId'))
10159 * .then((teamSpaceMembership) => console.log(teamSpaceMembership))
10160 * .catch(console.error)]
10161 * ```
10162 */
10163 getTeamSpaceMembership: function getTeamSpaceMembership(teamSpaceMembershipId) {
10164 return http.get('team_space_memberships/' + teamSpaceMembershipId).then(function (response) {
10165 return wrapTeamSpaceMembership(http, response.data);
10166 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10167 },
10168
10169 /**
10170 * Gets an Space Membership in Organization
10171 * @param id - Organiztion Space Membership ID
10172 * @return Promise for a Space Membership in an organization
10173 * @example ```javascript
10174 * const contentful = require('contentful-management')
10175 * const client = contentful.createClient({
10176 * accessToken: '<content_management_api_key>'
10177 * })
10178 *
10179 * client.getOrganization('organization_id')
10180 * .then((organization) => organization.getOrganizationSpaceMembership('organizationSpaceMembership_id'))
10181 * .then((organizationMembership) => console.log(organizationMembership))
10182 * .catch(console.error)
10183 * ```
10184 */
10185 getOrganizationSpaceMembership: function getOrganizationSpaceMembership(id) {
10186 return http.get('space_memberships/' + id).then(function (response) {
10187 return wrapSpaceMembership(http, response.data);
10188 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10189 },
10190
10191 /**
10192 * Gets a collection Space Memberships in organization
10193 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
10194 * @return Promise for a Space Membership collection across all spaces in the organization
10195 * @example ```javascript
10196 * const contentful = require('contentful-management')
10197 * const client = contentful.createClient({
10198 * accessToken: '<content_management_api_key>'
10199 * })
10200 *
10201 * client.getOrganization('organization_id')
10202 * .then((organization) => organization.getOrganizationSpaceMemberships()) // you can add queries like 'limit': 100
10203 * .then((response) => console.log(response.items))
10204 * .catch(console.error)
10205 * ```
10206 */
10207 getOrganizationSpaceMemberships: function getOrganizationSpaceMemberships() {
10208 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10209 return http.get('space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10210 query: query
10211 })).then(function (response) {
10212 return wrapSpaceMembershipCollection(http, response.data);
10213 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10214 },
10215
10216 /**
10217 * Gets an Invitation in Organization
10218 * @return Promise for a OrganizationInvitation in an organization
10219 * @example ```javascript
10220 * const contentful = require('contentful-management')
10221 * const client = contentful.createClient({
10222 * accessToken: '<content_management_api_key>'
10223 * })
10224 *
10225 * client.getOrganization('<org_id>')
10226 * .then((organization) => organization.getOrganizationInvitation('invitation_id'))
10227 * .then((invitation) => console.log(invitation))
10228 * .catch(console.error)
10229 * ```
10230 */
10231 getOrganizationInvitation: function getOrganizationInvitation(invitationId) {
10232 return http.get('invitations/' + invitationId, {
10233 headers: headers
10234 }).then(function (response) {
10235 return wrapOrganizationInvitation(http, response.data);
10236 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10237 },
10238
10239 /**
10240 * Create an Invitation in Organization
10241 * @return Promise for a OrganizationInvitation in an organization
10242 * @example ```javascript
10243 * const contentful = require('contentful-management')
10244 * const client = contentful.createClient({
10245 * accessToken: '<content_management_api_key>'
10246 * })
10247 *
10248 * client.getOrganization('<org_id>')
10249 * .then((organization) => organization.createOrganizationInvitation({
10250 * email: 'user.email@example.com'
10251 * firstName: 'User First Name'
10252 * lastName: 'User Last Name'
10253 * role: 'developer'
10254 * })
10255 * .catch(console.error)
10256 * ```
10257 */
10258 createOrganizationInvitation: function createOrganizationInvitation(data) {
10259 var invitationAlphaHeaders = {
10260 'x-contentful-enable-alpha-feature': 'pending-org-membership'
10261 };
10262 return http.post('invitations', data, {
10263 headers: invitationAlphaHeaders
10264 }).then(function (response) {
10265 return wrapOrganizationInvitation(http, response.data);
10266 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10267 },
10268
10269 /**
10270 * Creates an app definition
10271 * @param Object representation of the App Definition to be created
10272 * @return Promise for the newly created AppDefinition
10273 * @example ```javascript
10274 * const contentful = require('contentful-management')
10275 * const client = contentful.createClient({
10276 * accessToken: '<content_management_api_key>'
10277 * })
10278 *
10279 * client.getOrganization('<org_id>')
10280 * .then((org) => org.createAppDefinition({
10281 * name: 'Example app',
10282 * locations: [{ location: 'app-config' }],
10283 * src: "http://my-app-host.com/my-app"
10284 * }))
10285 * .then((appDefinition) => console.log(appDefinition))
10286 * .catch(console.error)
10287 * ```
10288 */
10289 createAppDefinition: function createAppDefinition(data) {
10290 return http.post('app_definitions', data).then(function (response) {
10291 return wrapAppDefinition(http, response.data);
10292 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10293 },
10294
10295 /**
10296 * Gets all app definitions
10297 * @return Promise for a collection of App Definitions
10298 * @example ```javascript
10299 * const contentful = require('contentful-management')
10300 * const client = contentful.createClient({
10301 * accessToken: '<content_management_api_key>'
10302 * })
10303 *
10304 * client.getOrganization('<org_id>')
10305 * .then((org) => org.getAppDefinitions())
10306 * .then((response) => console.log(response.items))
10307 * .catch(console.error)
10308 * ```
10309 */
10310 getAppDefinitions: function getAppDefinitions() {
10311 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10312 return http.get('app_definitions', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10313 query: query
10314 })).then(function (response) {
10315 return wrapAppDefinitionCollection(http, response.data);
10316 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10317 },
10318
10319 /**
10320 * Gets an app definition
10321 * @return Promise for an App Definition
10322 * @example ```javascript
10323 * const contentful = require('contentful-management')
10324 * const client = contentful.createClient({
10325 * accessToken: '<content_management_api_key>'
10326 * })
10327 *
10328 * client.getOrganization('<org_id>')
10329 * .then((org) => org.getAppDefinition('<app_definition_id>'))
10330 * .then((appDefinition) => console.log(appDefinition))
10331 * .catch(console.error)
10332 * ```
10333 */
10334 getAppDefinition: function getAppDefinition(id) {
10335 return http.get('app_definitions/' + id).then(function (response) {
10336 return wrapAppDefinition(http, response.data);
10337 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10338 }
10339 };
10340}
10341
10342/***/ }),
10343
10344/***/ "./create-space-api.ts":
10345/*!*****************************!*\
10346 !*** ./create-space-api.ts ***!
10347 \*****************************/
10348/*! exports provided: default */
10349/***/ (function(module, __webpack_exports__, __webpack_require__) {
10350
10351"use strict";
10352__webpack_require__.r(__webpack_exports__);
10353/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createSpaceApi; });
10354/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
10355/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
10356/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
10357/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./error-handler */ "./error-handler.ts");
10358/* harmony import */ var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./entities */ "./entities/index.ts");
10359function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
10360
10361function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
10362
10363function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10364
10365/**
10366 * Contentful Space API. Contains methods to access any operations at a space
10367 * level, such as creating and reading entities contained in a space.
10368 */
10369
10370
10371
10372
10373
10374function raiseDeprecationWarning(method) {
10375 console.warn(["Deprecated: Space.".concat(method, "() will be removed in future major versions."), null, "Please migrate your code to use Environment.".concat(method, "():"), "https://contentful.github.io/contentful-management.js/contentful-management/latest/ContentfulEnvironmentAPI.html#.".concat(method), null].join('\n'));
10376}
10377
10378function spaceMembershipDeprecationWarning() {
10379 console.warn('The user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user)');
10380}
10381
10382/**
10383 * Creates API object with methods to access the Space API
10384 * @param {object} params - API initialization params
10385 * @prop {object} http - HTTP client instance
10386 * @prop {object} entities - Object with wrapper methods for each kind of entity
10387 * @return {ContentfulSpaceAPI}
10388 */
10389function createSpaceApi(_ref) {
10390 var http = _ref.http,
10391 httpUpload = _ref.httpUpload;
10392 var wrapSpace = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].space.wrapSpace;
10393 var _entities$environment = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environment,
10394 wrapEnvironment = _entities$environment.wrapEnvironment,
10395 wrapEnvironmentCollection = _entities$environment.wrapEnvironmentCollection;
10396 var _entities$contentType = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].contentType,
10397 wrapContentType = _entities$contentType.wrapContentType,
10398 wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;
10399 var _entities$entry = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].entry,
10400 wrapEntry = _entities$entry.wrapEntry,
10401 wrapEntryCollection = _entities$entry.wrapEntryCollection;
10402 var _entities$asset = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].asset,
10403 wrapAsset = _entities$asset.wrapAsset,
10404 wrapAssetCollection = _entities$asset.wrapAssetCollection;
10405 var _entities$locale = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].locale,
10406 wrapLocale = _entities$locale.wrapLocale,
10407 wrapLocaleCollection = _entities$locale.wrapLocaleCollection;
10408 var _entities$webhook = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].webhook,
10409 wrapWebhook = _entities$webhook.wrapWebhook,
10410 wrapWebhookCollection = _entities$webhook.wrapWebhookCollection;
10411 var _entities$role = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].role,
10412 wrapRole = _entities$role.wrapRole,
10413 wrapRoleCollection = _entities$role.wrapRoleCollection;
10414 var _entities$user = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].user,
10415 wrapUser = _entities$user.wrapUser,
10416 wrapUserCollection = _entities$user.wrapUserCollection;
10417 var _entities$spaceMember = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMember,
10418 wrapSpaceMember = _entities$spaceMember.wrapSpaceMember,
10419 wrapSpaceMemberCollection = _entities$spaceMember.wrapSpaceMemberCollection;
10420 var _entities$spaceMember2 = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMembership,
10421 wrapSpaceMembership = _entities$spaceMember2.wrapSpaceMembership,
10422 wrapSpaceMembershipCollection = _entities$spaceMember2.wrapSpaceMembershipCollection;
10423 var _entities$teamSpaceMe = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamSpaceMembership,
10424 wrapTeamSpaceMembership = _entities$teamSpaceMe.wrapTeamSpaceMembership,
10425 wrapTeamSpaceMembershipCollection = _entities$teamSpaceMe.wrapTeamSpaceMembershipCollection;
10426 var _entities$apiKey = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].apiKey,
10427 wrapApiKey = _entities$apiKey.wrapApiKey,
10428 wrapApiKeyCollection = _entities$apiKey.wrapApiKeyCollection;
10429 var _entities$previewApiK = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].previewApiKey,
10430 wrapPreviewApiKey = _entities$previewApiK.wrapPreviewApiKey,
10431 wrapPreviewApiKeyCollection = _entities$previewApiK.wrapPreviewApiKeyCollection;
10432 var wrapSnapshotCollection = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].snapshot.wrapSnapshotCollection;
10433 var wrapEditorInterface = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].editorInterface.wrapEditorInterface;
10434 var wrapUpload = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].upload.wrapUpload;
10435 var _entities$uiExtension = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].uiExtension,
10436 wrapUiExtension = _entities$uiExtension.wrapUiExtension,
10437 wrapUiExtensionCollection = _entities$uiExtension.wrapUiExtensionCollection;
10438 var _entities$environment2 = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environmentAlias,
10439 wrapEnvironmentAlias = _entities$environment2.wrapEnvironmentAlias,
10440 wrapEnvironmentAliasCollection = _entities$environment2.wrapEnvironmentAliasCollection;
10441
10442 function createAsset(data) {
10443 return http.post('assets', data).then(function (response) {
10444 return wrapAsset(http, response.data);
10445 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10446 }
10447
10448 function createUpload(data) {
10449 raiseDeprecationWarning('createUpload');
10450 var file = data.file;
10451
10452 if (!file) {
10453 return Promise.reject(new Error('Unable to locate a file to upload.'));
10454 }
10455
10456 return httpUpload.post('uploads', file, {
10457 headers: {
10458 'Content-Type': 'application/octet-stream'
10459 }
10460 }).then(function (uploadResponse) {
10461 return wrapUpload(httpUpload, uploadResponse.data);
10462 })["catch"](_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10463 }
10464 /*
10465 * @private
10466 * sdk relies heavily on sys metadata
10467 * so we cannot omit the sys property on sdk level
10468 *
10469 */
10470
10471
10472 function normalizeSelect(query) {
10473 if (query.select && !/sys/i.test(query.select)) {
10474 query.select += ',sys';
10475 }
10476 }
10477
10478 return {
10479 /**
10480 * Deletes the space
10481 * @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
10482 * @example ```javascript
10483 * const contentful = require('contentful-management')
10484 *
10485 * const client = contentful.createClient({
10486 * accessToken: '<content_management_api_key>'
10487 * })
10488 *
10489 * client.getSpace('<space_id>')
10490 * .then((space) => space.delete())
10491 * .then(() => console.log('Space deleted.'))
10492 * .catch(console.error)
10493 * ```
10494 */
10495 "delete": function deleteSpace() {
10496 return http["delete"]('').then(function () {// do nothing
10497 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10498 },
10499
10500 /**
10501 * Updates the space
10502 * @return Promise for the updated space.
10503 * @example ```javascript
10504 * const contentful = require('contentful-management')
10505 *
10506 * const client = contentful.createClient({
10507 * accessToken: '<content_management_api_key>'
10508 * })
10509 *
10510 * client.getSpace('<space_id>')
10511 * .then((space) => {
10512 * space.name = 'New name'
10513 * return space.update()
10514 * })
10515 * .then((space) => console.log(`Space ${space.sys.id} renamed.`)
10516 * .catch(console.error)
10517 * ```
10518 */
10519 update: function updateSpace() {
10520 var raw = this.toPlainObject();
10521 var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
10522 delete data.sys;
10523 return http.put('', data, {
10524 headers: {
10525 'X-Contentful-Version': raw.sys.version
10526 }
10527 }).then(function (response) {
10528 return wrapSpace(http, response.data);
10529 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10530 },
10531
10532 /**
10533 * Gets an environment
10534 * @param id - Environment ID
10535 * @return Promise for an Environment
10536 * @example ```javascript
10537 * const contentful = require('contentful-management')
10538 *
10539 * const client = contentful.createClient({
10540 * accessToken: '<content_management_api_key>'
10541 * })
10542 *
10543 * client.getSpace('<space_id>')
10544 * .then((space) => space.getEnvironment('<environement_id>'))
10545 * .then((environment) => console.log(environment))
10546 * .catch(console.error)
10547 * ```
10548 */
10549 getEnvironment: function getEnvironment(id) {
10550 return http.get('environments/' + id).then(function (response) {
10551 return wrapEnvironment(http, response.data);
10552 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10553 },
10554
10555 /**
10556 * Gets a collection of Environments
10557 * @return Promise for a collection of Environment
10558 * @example ```javascript
10559 * const contentful = require('contentful-management')
10560 *
10561 * const client = contentful.createClient({
10562 * accessToken: '<content_management_api_key>'
10563 * })
10564 *
10565 * client.getSpace('<space_id>')
10566 * .then((space) => space.getEnvironments())
10567 * .then((response) => console.log(response.items))
10568 * .catch(console.error)
10569 * ```
10570 */
10571 getEnvironments: function getEnvironments() {
10572 return http.get('environments').then(function (response) {
10573 return wrapEnvironmentCollection(http, response.data);
10574 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10575 },
10576
10577 /**
10578 * Creates an Environement
10579 * @param data - Object representation of the Environment to be created
10580 * @return Promise for the newly created Environment
10581 * @example ```javascript
10582 * const contentful = require('contentful-management')
10583 *
10584 * const client = contentful.createClient({
10585 * accessToken: '<content_management_api_key>'
10586 * })
10587 *
10588 * client.getSpace('<space_id>')
10589 * .then((space) => space.createEnvironment({ name: 'Staging' }))
10590 * .then((environment) => console.log(environment))
10591 * .catch(console.error)
10592 * ```
10593 */
10594 createEnvironment: function createEnvironment() {
10595 var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10596 return http.post('environments', data).then(function (response) {
10597 return wrapEnvironment(http, response.data);
10598 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10599 },
10600
10601 /**
10602 * Creates an Environment with a custom ID
10603 * @param id - Environment ID
10604 * @param data - Object representation of the Environment to be created
10605 * @param sourceEnvironmentId - ID of the source environment that will be copied to create the new environment. Default is "master"
10606 * @return Promise for the newly created Environment
10607 * @example ```javascript
10608 * const contentful = require('contentful-management')
10609 *
10610 * const client = contentful.createClient({
10611 * accessToken: '<content_management_api_key>'
10612 * })
10613 *
10614 * client.getSpace('<space_id>')
10615 * .then((space) => space.createEnvironmentWithId('<environment-id>', { name: 'Staging'}, 'master'))
10616 * .then((environment) => console.log(environment))
10617 * .catch(console.error)
10618 * ```
10619 */
10620 createEnvironmentWithId: function createEnvironmentWithId(id, data, sourceEnvironmentId) {
10621 return http.put('environments/' + id, data, {
10622 headers: sourceEnvironmentId ? {
10623 'X-Contentful-Source-Environment': sourceEnvironmentId
10624 } : {}
10625 }).then(function (response) {
10626 return wrapEnvironment(http, response.data);
10627 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10628 },
10629
10630 /**
10631 * Gets a Content Type
10632 * @deprecated since version 5.0
10633 * @param id - Content Type ID
10634 * @return Promise for a Content Type
10635 * @example ```javascript
10636 * const contentful = require('contentful-management')
10637 *
10638 * const client = contentful.createClient({
10639 * accessToken: '<content_management_api_key>'
10640 * })
10641 *
10642 * client.getSpace('<space_id>')
10643 * .then((space) => space.getContentType('<content_type_id>'))
10644 * .then((contentType) => console.log(contentType))
10645 * .catch(console.error)
10646 * ```
10647 */
10648 getContentType: function getContentType(id) {
10649 raiseDeprecationWarning('getContentType');
10650 return http.get('content_types/' + id).then(function (response) {
10651 return wrapContentType(http, response.data);
10652 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10653 },
10654
10655 /**
10656 * Gets a collection of Content Types
10657 * @deprecated since version 5.0
10658 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
10659 * @return Promise for a collection of Content Types
10660 * @example ```javascript
10661 * const contentful = require('contentful-management')
10662 *
10663 * const client = contentful.createClient({
10664 * accessToken: '<content_management_api_key>'
10665 * })
10666 *
10667 * client.getSpace('<space_id>')
10668 * .then((space) => space.getContentTypes())
10669 * .then((response) => console.log(response.items))
10670 * .catch(console.error)
10671 * ```
10672 */
10673 getContentTypes: function getContentTypes() {
10674 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10675 raiseDeprecationWarning('getContentTypes');
10676 return http.get('content_types', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10677 query: query
10678 })).then(function (response) {
10679 return wrapContentTypeCollection(http, response.data);
10680 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10681 },
10682
10683 /**
10684 * Creates a Content Type
10685 * @deprecated since version 5.0
10686 * @param data - Object representation of the Content Type to be created
10687 * @return Promise for the newly created Content Type
10688 * @example ```javascript
10689 * const contentful = require('contentful-management')
10690 *
10691 * const client = contentful.createClient({
10692 * accessToken: '<content_management_api_key>'
10693 * })
10694 *
10695 * client.getSpace('<space_id>')
10696 * .then((space) => space.createContentType({
10697 * name: 'Blog Post',
10698 * fields: [
10699 * {
10700 * id: 'title',
10701 * name: 'Title',
10702 * required: true,
10703 * localized: false,
10704 * type: 'Text'
10705 * }
10706 * ]
10707 * }))
10708 * .then((contentType) => console.log(contentType))
10709 * .catch(console.error)
10710 * ```
10711 */
10712 createContentType: function createContentType(data) {
10713 raiseDeprecationWarning('createContentType');
10714 return http.post('content_types', data).then(function (response) {
10715 return wrapContentType(http, response.data);
10716 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10717 },
10718
10719 /**
10720 * Creates a Content Type with a custom ID
10721 * @deprecated since version 5.0
10722 * @param id - Content Type ID
10723 * @param data - Object representation of the Content Type to be created
10724 * @return Promise for the newly created Content Type
10725 * @example ```javascript
10726 * const contentful = require('contentful-management')
10727 *
10728 * const client = contentful.createClient({
10729 * accessToken: '<content_management_api_key>'
10730 * })
10731 *
10732 * client.getSpace('<space_id>')
10733 * .then((space) => space.createContentTypeWithId('<content-type-id>', {
10734 * name: 'Blog Post',
10735 * fields: [
10736 * {
10737 * id: 'title',
10738 * name: 'Title',
10739 * required: true,
10740 * localized: false,
10741 * type: 'Text'
10742 * }
10743 * ]
10744 * }))
10745 * .then((contentType) => console.log(contentType))
10746 * .catch(console.error)
10747 * ```
10748 */
10749 createContentTypeWithId: function createContentTypeWithId(id, data) {
10750 raiseDeprecationWarning('createContentTypeWithId');
10751 return http.put('content_types/' + id, data).then(function (response) {
10752 return wrapContentType(http, response.data);
10753 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10754 },
10755
10756 /**
10757 * Gets an EditorInterface for a ContentType
10758 * @deprecated since version 5.0
10759 * @param contentTypeId - Content Type ID
10760 * @return Promise for an EditorInterface
10761 * @example ```javascript
10762 * const contentful = require('contentful-management')
10763 *
10764 * const client = contentful.createClient({
10765 * accessToken: '<content_management_api_key>'
10766 * })
10767 *
10768 * client.getSpace('<space_id>')
10769 * .then((space) => space.getEditorInterfaceForContentType('<content_type_id>'))
10770 * .then((EditorInterface) => console.log(EditorInterface))
10771 * .catch(console.error)
10772 * ```
10773 */
10774 getEditorInterfaceForContentType: function getEditorInterfaceForContentType(contentTypeId) {
10775 raiseDeprecationWarning('getEditorInterfaceForContentType');
10776 return http.get('content_types/' + contentTypeId + '/editor_interface').then(function (response) {
10777 return wrapEditorInterface(http, response.data);
10778 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10779 },
10780
10781 /**
10782 * Gets an Entry
10783 * Warning: if you are using the select operator, when saving, any field that was not selected will be removed
10784 * from your entry in the backend
10785 * @deprecated since version 5.0
10786 * @param id - Entry ID
10787 * @param query - Object with search parameters. In this method it's only useful for `locale`.
10788 * @return Promise for an Entry
10789 * @example ```javascript
10790 * const contentful = require('contentful-management')
10791 *
10792 * const client = contentful.createClient({
10793 * accessToken: '<content_management_api_key>'
10794 * })
10795 *
10796 * client.getSpace('<space_id>')
10797 * .then((space) => space.getEntry('<entry-id>'))
10798 * .then((entry) => console.log(entry))
10799 * .catch(console.error)
10800 * ```
10801 */
10802 getEntry: function getEntry(id) {
10803 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10804 raiseDeprecationWarning('getEntry');
10805 normalizeSelect(query);
10806 return http.get('entries/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10807 query: query
10808 })).then(function (response) {
10809 return wrapEntry(http, response.data);
10810 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10811 },
10812
10813 /**
10814 * Gets a collection of Entries
10815 * Warning: if you are using the select operator, when saving, any field that was not selected will be removed
10816 * from your entry in the backend
10817 * @deprecated since version 5.0
10818 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
10819 * @return Promise for a collection of Entries
10820 * @example ```javascript
10821 * const contentful = require('contentful-management')
10822 *
10823 * const client = contentful.createClient({
10824 * accessToken: '<content_management_api_key>'
10825 * })
10826 *
10827 * client.getSpace('<space_id>')
10828 * .then((space) => space.getEntries({'content_type': 'foo'})) // you can add more queries as 'key': 'value'
10829 * .then((response) => console.log(response.items))
10830 * .catch(console.error)
10831 * ```
10832 */
10833 getEntries: function getEntries() {
10834 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10835 raiseDeprecationWarning('getEntries');
10836 normalizeSelect(query);
10837 return http.get('entries', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10838 query: query
10839 })).then(function (response) {
10840 return wrapEntryCollection(http, response.data);
10841 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10842 },
10843
10844 /**
10845 * Creates a Entry
10846 * @deprecated since version 5.0
10847 * @param contentTypeId - The Content Type which this Entry is based on
10848 * @param data - Object representation of the Entry to be created
10849 * @return Promise for the newly created Entry
10850 * @example ```javascript
10851 * const contentful = require('contentful-management')
10852 *
10853 * const client = contentful.createClient({
10854 * accessToken: '<content_management_api_key>'
10855 * })
10856 *
10857 * client.getSpace('<space_id>')
10858 * .then((space) => space.createEntry('<content_type_id>', {
10859 * fields: {
10860 * title: {
10861 * 'en-US': 'Entry title'
10862 * }
10863 * }
10864 * }))
10865 * .then((entry) => console.log(entry))
10866 * .catch(console.error)
10867 * ```
10868 */
10869 createEntry: function createEntry(contentTypeId, data) {
10870 raiseDeprecationWarning('createEntry');
10871 return http.post('entries', data, {
10872 headers: {
10873 'X-Contentful-Content-Type': contentTypeId
10874 }
10875 }).then(function (response) {
10876 return wrapEntry(http, response.data);
10877 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10878 },
10879
10880 /**
10881 * Creates a Entry with a custom ID
10882 * @deprecated since version 5.0
10883 * @param contentTypeId - The Content Type which this Entry is based on
10884 * @param id - Entry ID
10885 * @param data - Object representation of the Entry to be created
10886 * @return Promise for the newly created Entry
10887 * @example ```javascript
10888 * const contentful = require('contentful-management')
10889 *
10890 * const client = contentful.createClient({
10891 * accessToken: '<content_management_api_key>'
10892 * })
10893 *
10894 * // Create entry
10895 * client.getSpace('<space_id>')
10896 * .then((space) => space.createEntryWithId('<content_type_id>', '<entry_id>', {
10897 * fields: {
10898 * title: {
10899 * 'en-US': 'Entry title'
10900 * }
10901 * }
10902 * }))
10903 * .then((entry) => console.log(entry))
10904 * .catch(console.error)
10905 * ```
10906 */
10907 createEntryWithId: function createEntryWithId(contentTypeId, id, data) {
10908 raiseDeprecationWarning('createEntryWithId');
10909 return http.put('entries/' + id, data, {
10910 headers: {
10911 'X-Contentful-Content-Type': contentTypeId
10912 }
10913 }).then(function (response) {
10914 return wrapEntry(http, response.data);
10915 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
10916 },
10917
10918 /**
10919 * Creates a Upload.
10920 * @deprecated since version 5.0
10921 * @param data - Object with file information.
10922 * @param data.file - Actual file content. Can be a string, an ArrayBuffer or a Stream.
10923 * @return Upload object containing information about the uploaded file.
10924 * @example ```javascript
10925 * const client = contentful.createClient({
10926 * accessToken: '<content_management_api_key>'
10927 * })
10928 * const uploadStream = createReadStream('path/to/filename_english.jpg')
10929 * client.getSpace('<space_id>')
10930 * .then((space) => space.createUpload({file: uploadStream, 'image/png'})
10931 * .then((upload) => console.log(upload))
10932 * .catch(console.error)
10933 * ```
10934 */
10935 createUpload: createUpload,
10936
10937 /**
10938 * Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
10939 * @deprecated since version 5.0
10940 * @param data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
10941 * @return Promise for the newly created Asset
10942 * @example ```javascript
10943 * const client = contentful.createClient({
10944 * accessToken: '<content_management_api_key>'
10945 * })
10946 *
10947 * // Create asset
10948 * client.getSpace('<space_id>')
10949 * .then((space) => space.createAsset({
10950 * fields: {
10951 * title: {
10952 * 'en-US': 'Playsam Streamliner'
10953 * },
10954 * file: {
10955 * 'en-US': {
10956 * contentType: 'image/jpeg',
10957 * fileName: 'example.jpeg',
10958 * upload: 'https://example.com/example.jpg'
10959 * }
10960 * }
10961 * }
10962 * }))
10963 * .then((asset) => asset.processForLocale("en-US")) // OR asset.processForAllLocales()
10964 * .then((asset) => console.log(asset))
10965 * .catch(console.error)
10966 * ```
10967 */
10968 createAsset: createAsset,
10969
10970 /**
10971 * Gets an Asset
10972 * Warning: if you are using the select operator, when saving, any field that was not selected will be removed
10973 * from your entry in the backend
10974 * @deprecated since version 5.0
10975 * @param id - Asset ID
10976 * @param query - Object with search parameters. In this method it's only useful for `locale`.
10977 * @return Promise for an Asset
10978 * @example ```javascript
10979 * const contentful = require('contentful-management')
10980 *
10981 * const client = contentful.createClient({
10982 * accessToken: '<content_management_api_key>'
10983 * })
10984 *
10985 * client.getSpace('<space_id>')
10986 * .then((space) => space.getAsset('<asset_id>'))
10987 * .then((asset) => console.log(asset))
10988 * .catch(console.error)
10989 * ```
10990 */
10991 getAsset: function getAsset(id) {
10992 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10993 raiseDeprecationWarning('getAsset');
10994 normalizeSelect(query);
10995 return http.get('assets/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
10996 query: query
10997 })).then(function (response) {
10998 return wrapAsset(http, response.data);
10999 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11000 },
11001
11002 /**
11003 * Gets a collection of Assets
11004 * Warning: if you are using the select operator, when saving, any field that was not selected will be removed
11005 * from your entry in the backend
11006 * @deprecated since version 5.0
11007 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
11008 * @return Promise for a collection of Assets
11009 * @example ```javascript
11010 * const contentful = require('contentful-management')
11011 *
11012 * const client = contentful.createClient({
11013 * accessToken: '<content_management_api_key>'
11014 * })
11015 *
11016 * client.getSpace('<space_id>')
11017 * .then((space) => space.getAssets())
11018 * .then((response) => console.log(response.items))
11019 * .catch(console.error)
11020 * ```
11021 */
11022 getAssets: function getAssets() {
11023 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11024 raiseDeprecationWarning('getAssets');
11025 normalizeSelect(query);
11026 return http.get('assets', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
11027 query: query
11028 })).then(function (response) {
11029 return wrapAssetCollection(http, response.data);
11030 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11031 },
11032
11033 /**
11034 * Creates a Asset with a custom ID. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
11035 * @deprecated since version 5.0
11036 * @param id - Asset ID
11037 * @param data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
11038 * @return Promise for the newly created Asset
11039 * @example ```javascript
11040 * const client = contentful.createClient({
11041 * accessToken: '<content_management_api_key>'
11042 * })
11043 *
11044 * // Create asset
11045 * client.getSpace('<space_id>')
11046 * .then((space) => space.createAssetWithId('<asset_id>', {
11047 * title: {
11048 * 'en-US': 'Playsam Streamliner'
11049 * },
11050 * file: {
11051 * 'en-US': {
11052 * contentType: 'image/jpeg',
11053 * fileName: 'example.jpeg',
11054 * upload: 'https://example.com/example.jpg'
11055 * }
11056 * }
11057 * }))
11058 * .then((asset) => asset.process())
11059 * .then((asset) => console.log(asset))
11060 * .catch(console.error)
11061 * ```
11062 */
11063 createAssetWithId: function createAssetWithId(id, data) {
11064 raiseDeprecationWarning('createAssetWithId');
11065 return http.put('assets/' + id, data).then(function (response) {
11066 return wrapAsset(http, response.data);
11067 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11068 },
11069
11070 /**
11071 * Creates a Asset based on files. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
11072 * @deprecated since version 5.0
11073 * @param data - Object representation of the Asset to be created. Note that the field object should have an uploadFrom property on asset creation, which will be removed and replaced with an url property when processing is finished.
11074 * @param data.fields.file.[LOCALE].file - Can be a string, an ArrayBuffer or a Stream.
11075 * @return Promise for the newly created Asset
11076 * @example ```javascript
11077 * const client = contentful.createClient({
11078 * accessToken: '<content_management_api_key>'
11079 * })
11080 * client.getSpace('<space_id>')
11081 * .then((space) => space.createAssetFromFiles({
11082 * fields: {
11083 * file: {
11084 * 'en-US': {
11085 * contentType: 'image/jpeg',
11086 * fileName: 'filename_english.jpg',
11087 * file: createReadStream('path/to/filename_english.jpg')
11088 * },
11089 * 'de-DE': {
11090 * contentType: 'image/svg+xml',
11091 * fileName: 'filename_german.svg',
11092 * file: '<svg><path fill="red" d="M50 50h150v50H50z"/></svg>'
11093 * }
11094 * }
11095 * }
11096 * }))
11097 * .then((asset) => console.log(asset))
11098 * .catch(console.error)
11099 * ```
11100 */
11101 createAssetFromFiles: function createAssetFromFiles(data) {
11102 raiseDeprecationWarning('createAssetFromFiles');
11103 var file = data.fields.file;
11104 return Promise.all(Object.keys(file).map(function (locale) {
11105 var _file$locale = file[locale],
11106 contentType = _file$locale.contentType,
11107 fileName = _file$locale.fileName;
11108 return createUpload(file[locale]).then(function (upload) {
11109 return _defineProperty({}, locale, {
11110 contentType: contentType,
11111 fileName: fileName,
11112 uploadFrom: {
11113 sys: {
11114 type: 'Link',
11115 linkType: 'Upload',
11116 id: upload.sys.id
11117 }
11118 }
11119 });
11120 });
11121 })).then(function (uploads) {
11122 // @ts-expect-error
11123 data.fields.file = uploads.reduce(function (fieldsData, upload) {
11124 return _objectSpread(_objectSpread({}, fieldsData), upload);
11125 }, {});
11126 return createAsset(data);
11127 })["catch"](_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11128 },
11129
11130 /**
11131 * Gets an Upload
11132 * @deprecated since version 5.0
11133 * @param id - Upload ID
11134 * @return Promise for an Upload
11135 * @example ```javascript
11136 * const client = contentful.createClient({
11137 * accessToken: '<content_management_api_key>'
11138 * })
11139 * const uploadStream = createReadStream('path/to/filename_english.jpg')
11140 * client.getSpace('<space_id>')
11141 * .then((space) => space.getUpload('<upload-id>')
11142 * .then((upload) => console.log(upload))
11143 * .catch(console.error)
11144 * ```
11145 */
11146 getUpload: function getUpload(id) {
11147 raiseDeprecationWarning('getUpload');
11148 return httpUpload.get('uploads/' + id).then(function (response) {
11149 return wrapUpload(http, response.data);
11150 })["catch"](_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11151 },
11152
11153 /**
11154 * Gets a Locale
11155 * @deprecated since version 5.0
11156 * @param id - Locale ID
11157 * @return Promise for an Locale
11158 * @example ```javascript
11159 * const contentful = require('contentful-management')
11160 *
11161 * const client = contentful.createClient({
11162 * accessToken: '<content_management_api_key>'
11163 * })
11164 *
11165 * client.getSpace('<space_id>')
11166 * .then((space) => space.getLocale('<locale_id>'))
11167 * .then((locale) => console.log(locale))
11168 * .catch(console.error)
11169 * ```
11170 */
11171 getLocale: function getLocale(id) {
11172 raiseDeprecationWarning('getLocale');
11173 return http.get('locales/' + id).then(function (response) {
11174 return wrapLocale(http, response.data);
11175 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11176 },
11177
11178 /**
11179 * Gets a collection of Locales
11180 * @deprecated since version 5.0
11181 * @return Promise for a collection of Locales
11182 * @example ```javascript
11183 * const contentful = require('contentful-management')
11184 *
11185 * const client = contentful.createClient({
11186 * accessToken: '<content_management_api_key>'
11187 * })
11188 *
11189 * client.getSpace('<space_id>')
11190 * .then((space) => space.getLocales())
11191 * .then((response) => console.log(response.items))
11192 * .catch(console.error)
11193 * ```
11194 */
11195 getLocales: function getLocales() {
11196 raiseDeprecationWarning('getLocales');
11197 return http.get('locales').then(function (response) {
11198 return wrapLocaleCollection(http, response.data);
11199 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11200 },
11201
11202 /**
11203 * Creates a Locale
11204 * @deprecated since version 5.0
11205 * @param data - Object representation of the Locale to be created
11206 * @return Promise for the newly created Locale
11207 * @example ```javascript
11208 * const contentful = require('contentful-management')
11209 *
11210 * const client = contentful.createClient({
11211 * accessToken: '<content_management_api_key>'
11212 * })
11213 *
11214 * // Create locale
11215 * client.getSpace('<space_id>')
11216 * .then((space) => space.createLocale({
11217 * name: 'German (Austria)',
11218 * code: 'de-AT',
11219 * fallbackCode: 'de-DE',
11220 * optional: true
11221 * }))
11222 * .then((locale) => console.log(locale))
11223 * .catch(console.error)
11224 * ```
11225 */
11226 createLocale: function createLocale(data) {
11227 raiseDeprecationWarning('createLocale');
11228 return http.post('locales', data).then(function (response) {
11229 return wrapLocale(http, response.data);
11230 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11231 },
11232
11233 /**
11234 * Gets a Webhook
11235 * @param id - Webhook ID
11236 * @return Promise for a Webhook
11237 * @example ```javascript
11238 * const contentful = require('contentful-management')
11239 *
11240 * const client = contentful.createClient({
11241 * accessToken: '<content_management_api_key>'
11242 * })
11243 *
11244 * client.getSpace('<space_id>')
11245 * .then((space) => space.getWebhook('<webhook_id>'))
11246 * .then((webhook) => console.log(webhook))
11247 * .catch(console.error)
11248 * ```
11249 */
11250 getWebhook: function getWebhook(id) {
11251 return http.get('webhook_definitions/' + id).then(function (response) {
11252 return wrapWebhook(http, response.data);
11253 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11254 },
11255
11256 /**
11257 * Gets a collection of Webhooks
11258 * @return Promise for a collection of Webhooks
11259 * @example ```javascript
11260 * const contentful = require('contentful-management')
11261 *
11262 * const client = contentful.createClient({
11263 * accessToken: '<content_management_api_key>'
11264 * })
11265 *
11266 * client.getSpace('<space_id>')
11267 * .then((space) => space.getWebhooks())
11268 * .then((response) => console.log(response.items))
11269 * .catch(console.error)
11270 * ```
11271 */
11272 getWebhooks: function getWebhooks() {
11273 return http.get('webhook_definitions').then(function (response) {
11274 return wrapWebhookCollection(http, response.data);
11275 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11276 },
11277
11278 /**
11279 * Creates a Webhook
11280 * @param data - Object representation of the Webhook to be created
11281 * @return Promise for the newly created Webhook
11282 * @example ```javascript
11283 * const contentful = require('contentful-management')
11284 *
11285 * client.getSpace('<space_id>')
11286 * .then((space) => space.createWebhook({
11287 * 'name': 'My webhook',
11288 * 'url': 'https://www.example.com/test',
11289 * 'topics': [
11290 * 'Entry.create',
11291 * 'ContentType.create',
11292 * '*.publish',
11293 * 'Asset.*'
11294 * ]
11295 * }))
11296 * .then((webhook) => console.log(webhook))
11297 * .catch(console.error)
11298 * ```
11299 */
11300 createWebhook: function createWebhook(data) {
11301 return http.post('webhook_definitions', data).then(function (response) {
11302 return wrapWebhook(http, response.data);
11303 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11304 },
11305
11306 /**
11307 * Creates a Webhook with a custom ID
11308 * @param id - Webhook ID
11309 * @param data - Object representation of the Webhook to be created
11310 * @return Promise for the newly created Webhook
11311 * @example ```javascript
11312 * const contentful = require('contentful-management')
11313 *
11314 * client.getSpace('<space_id>')
11315 * .then((space) => space.createWebhookWithId('<webhook_id>', {
11316 * 'name': 'My webhook',
11317 * 'url': 'https://www.example.com/test',
11318 * 'topics': [
11319 * 'Entry.create',
11320 * 'ContentType.create',
11321 * '*.publish',
11322 * 'Asset.*'
11323 * ]
11324 * }))
11325 * .then((webhook) => console.log(webhook))
11326 * .catch(console.error)
11327 * ```
11328 */
11329 createWebhookWithId: function createWebhookWithId(id, data) {
11330 return http.put('webhook_definitions/' + id, data).then(function (response) {
11331 return wrapWebhook(http, response.data);
11332 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11333 },
11334
11335 /**
11336 * Gets a Role
11337 * @param id - Role ID
11338 * @return Promise for a Role
11339 * @example ```javascript
11340 * const contentful = require('contentful-management')
11341 *
11342 * const client = contentful.createClient({
11343 * accessToken: '<content_management_api_key>'
11344 * })
11345 *
11346 * client.getSpace('<space_id>')
11347 * .then((space) => space.createRole({
11348 * fields: {
11349 * title: {
11350 * 'en-US': 'Role title'
11351 * }
11352 * }
11353 * }))
11354 * .then((role) => console.log(role))
11355 * .catch(console.error)
11356 * ```
11357 */
11358 getRole: function getRole(id) {
11359 return http.get('roles/' + id).then(function (response) {
11360 return wrapRole(http, response.data);
11361 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11362 },
11363
11364 /**
11365 * Gets a collection of Roles
11366 * @return Promise for a collection of Roles
11367 * @example ```javascript
11368 * const contentful = require('contentful-management')
11369 *
11370 * const client = contentful.createClient({
11371 * accessToken: '<content_management_api_key>'
11372 * })
11373 *
11374 * client.getSpace('<space_id>')
11375 * .then((space) => space.getRoles())
11376 * .then((response) => console.log(response.items))
11377 * .catch(console.error)
11378 * ```
11379 */
11380 getRoles: function getRoles() {
11381 return http.get('roles').then(function (response) {
11382 return wrapRoleCollection(http, response.data);
11383 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11384 },
11385
11386 /**
11387 * Creates a Role
11388 * @param data - Object representation of the Role to be created
11389 * @return Promise for the newly created Role
11390 * @example ```javascript
11391 * const contentful = require('contentful-management')
11392 *
11393 * const client = contentful.createClient({
11394 * accessToken: '<content_management_api_key>'
11395 * })
11396 * client.getSpace('<space_id>')
11397 * .then((space) => space.createRole({
11398 * name: 'My Role',
11399 * description: 'foobar role',
11400 * permissions: {
11401 * ContentDelivery: 'all',
11402 * ContentModel: ['read'],
11403 * Settings: []
11404 * },
11405 * policies: [
11406 * {
11407 * effect: 'allow',
11408 * actions: 'all',
11409 * constraint: {
11410 * and: [
11411 * {
11412 * equals: [
11413 * { doc: 'sys.type' },
11414 * 'Entry'
11415 * ]
11416 * },
11417 * {
11418 * equals: [
11419 * { doc: 'sys.type' },
11420 * 'Asset'
11421 * ]
11422 * }
11423 * ]
11424 * }
11425 * }
11426 * ]
11427 * }))
11428 * .then((role) => console.log(role))
11429 * .catch(console.error)
11430 * ```
11431 */
11432 createRole: function createRole(data) {
11433 return http.post('roles', data).then(function (response) {
11434 return wrapRole(http, response.data);
11435 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11436 },
11437
11438 /**
11439 * Creates a Role with a custom ID
11440 * @param id - Role ID
11441 * @param data - Object representation of the Role to be created
11442 * @return Promise for the newly created Role
11443 * @example ```javascript
11444 * const contentful = require('contentful-management')
11445 *
11446 * const client = contentful.createClient({
11447 * accessToken: '<content_management_api_key>'
11448 * })
11449 * client.getSpace('<space_id>')
11450 * .then((space) => space.createRoleWithId('<role-id>', {
11451 * name: 'My Role',
11452 * description: 'foobar role',
11453 * permissions: {
11454 * ContentDelivery: 'all',
11455 * ContentModel: ['read'],
11456 * Settings: []
11457 * },
11458 * policies: [
11459 * {
11460 * effect: 'allow',
11461 * actions: 'all',
11462 * constraint: {
11463 * and: [
11464 * {
11465 * equals: [
11466 * { doc: 'sys.type' },
11467 * 'Entry'
11468 * ]
11469 * },
11470 * {
11471 * equals: [
11472 * { doc: 'sys.type' },
11473 * 'Asset'
11474 * ]
11475 * }
11476 * ]
11477 * }
11478 * }
11479 * ]
11480 * }))
11481 * .then((role) => console.log(role))
11482 * .catch(console.error)
11483 * ```
11484 */
11485 createRoleWithId: function createRoleWithId(id, data) {
11486 return http.put('roles/' + id, data).then(function (response) {
11487 return wrapRole(http, response.data);
11488 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11489 },
11490
11491 /**
11492 * Gets a User
11493 * @param id - User ID
11494 * @return Promise for a User
11495 * @example ```javascript
11496 * const contentful = require('contentful-management')
11497 *
11498 * client.getSpace('<space_id>')
11499 * .then((space) => space.getSpaceUser('id'))
11500 * .then((user) => console.log(user))
11501 * .catch(console.error)
11502 * ```
11503 */
11504 getSpaceUser: function getSpaceUser(id) {
11505 return http.get('users/' + id).then(function (response) {
11506 return wrapUser(http, response.data);
11507 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11508 },
11509
11510 /**
11511 * Gets a collection of Users in a space
11512 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
11513 * @return Promise a collection of Users in a space
11514 * @example ```javascript
11515 * const contentful = require('contentful-management')
11516 *
11517 * client.getSpace('<space_id>')
11518 * .then((space) => space.getSpaceUsers(query))
11519 * .then((data) => console.log(data))
11520 * .catch(console.error)
11521 * ```
11522 */
11523 getSpaceUsers: function getSpaceUsers() {
11524 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11525 return http.get('users/', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
11526 query: query
11527 })).then(function (response) {
11528 return wrapUserCollection(http, response.data);
11529 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11530 },
11531
11532 /**
11533 * Gets a Space Member
11534 * @param id Get Space Member by user_id
11535 * @return Promise for a Space Member
11536 * @example ```javascript
11537 * const contentful = require('contentful-management')
11538 *
11539 * client.getSpace('<space_id>')
11540 * .then((space) => space.getSpaceMember(id))
11541 * .then((spaceMember) => console.log(spaceMember))
11542 * .catch(console.error)
11543 * ```
11544 */
11545 getSpaceMember: function getSpaceMember(id) {
11546 return http.get('space_members/' + id).then(function (response) {
11547 return wrapSpaceMember(http, response.data);
11548 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11549 },
11550
11551 /**
11552 * Gets a collection of Space Members
11553 * @param query
11554 * @return Promise for a collection of Space Members
11555 * @example ```javascript
11556 * const contentful = require('contentful-management')
11557 *
11558 * client.getSpace('<space_id>')
11559 * .then((space) => space.getSpaceMembers({'limit': 100}))
11560 * .then((spaceMemberCollection) => console.log(spaceMemberCollection))
11561 * .catch(console.error)
11562 * ```
11563 */
11564 getSpaceMembers: function getSpaceMembers() {
11565 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11566 return http.get('space_members', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
11567 query: query
11568 })).then(function (response) {
11569 return wrapSpaceMemberCollection(http, response.data);
11570 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11571 },
11572
11573 /**
11574 * Gets a Space Membership
11575 * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).
11576 * @param id - Space Membership ID
11577 * @return Promise for a Space Membership
11578 * @example ```javascript
11579 * const contentful = require('contentful-management')
11580 *
11581 * client.getSpace('<space_id>')
11582 * .then((space) => space.getSpaceMembership('id'))
11583 * .then((spaceMembership) => console.log(spaceMembership))
11584 * .catch(console.error)
11585 * ```
11586 */
11587 getSpaceMembership: function getSpaceMembership(id) {
11588 spaceMembershipDeprecationWarning();
11589 return http.get('space_memberships/' + id).then(function (response) {
11590 return wrapSpaceMembership(http, response.data);
11591 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11592 },
11593
11594 /**
11595 * Gets a collection of Space Memberships
11596 * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).
11597 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
11598 * @return Promise for a collection of Space Memberships
11599 * @example ```javascript
11600 * const contentful = require('contentful-management')
11601 *
11602 * client.getSpace('<space_id>')
11603 * .then((space) => space.getSpaceMemberships({'limit': 100})) // you can add more queries as 'key': 'value'
11604 * .then((response) => console.log(response.items))
11605 * .catch(console.error)
11606 * ```
11607 */
11608 getSpaceMemberships: function getSpaceMemberships() {
11609 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11610 spaceMembershipDeprecationWarning();
11611 return http.get('space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
11612 query: query
11613 })).then(function (response) {
11614 return wrapSpaceMembershipCollection(http, response.data);
11615 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11616 },
11617
11618 /**
11619 * Creates a Space Membership
11620 * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).
11621 * @param data - Object representation of the Space Membership to be created
11622 * @return Promise for the newly created Space Membership
11623 * @example ```javascript
11624 * const contentful = require('contentful-management')
11625 *
11626 * const client = contentful.createClient({
11627 * accessToken: '<content_management_api_key>'
11628 * })
11629 *
11630 * client.getSpace('<space_id>')
11631 * .then((space) => space.createSpaceMembership({
11632 * admin: false,
11633 * roles: [
11634 * {
11635 * type: 'Link',
11636 * linkType: 'Role',
11637 * id: '<role_id>'
11638 * }
11639 * ],
11640 * email: 'foo@example.com'
11641 * }))
11642 * .then((spaceMembership) => console.log(spaceMembership))
11643 * .catch(console.error)
11644 * ```
11645 */
11646 createSpaceMembership: function createSpaceMembership(data) {
11647 spaceMembershipDeprecationWarning();
11648 return http.post('space_memberships', data).then(function (response) {
11649 return wrapSpaceMembership(http, response.data);
11650 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11651 },
11652
11653 /**
11654 * Creates a Space Membership with a custom ID
11655 * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).
11656 * @param id - Space Membership ID
11657 * @param data - Object representation of the Space Membership to be created
11658 * @return Promise for the newly created Space Membership
11659 * @example ```javascript
11660 * const contentful = require('contentful-management')
11661 *
11662 * const client = contentful.createClient({
11663 * accessToken: '<content_management_api_key>'
11664 * })
11665 *
11666 * client.getSpace('<space_id>')
11667 * .then((space) => space.createSpaceMembershipWithId('<space-membership-id>', {
11668 * admin: false,
11669 * roles: [
11670 * {
11671 * type: 'Link',
11672 * linkType: 'Role',
11673 * id: '<role_id>'
11674 * }
11675 * ],
11676 * email: 'foo@example.com'
11677 * }))
11678 * .then((spaceMembership) => console.log(spaceMembership))
11679 * .catch(console.error)
11680 * ```
11681 */
11682 createSpaceMembershipWithId: function createSpaceMembershipWithId(id, data) {
11683 spaceMembershipDeprecationWarning();
11684 return http.put('space_memberships/' + id, data).then(function (response) {
11685 return wrapSpaceMembership(http, response.data);
11686 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11687 },
11688
11689 /**
11690 * Gets a Team Space Membership
11691 * @param id - Team Space Membership ID
11692 * @return Promise for a Team Space Membership
11693 * @example ```javascript
11694 * const contentful = require('contentful-management')
11695 *
11696 * client.getSpace('<space_id>')
11697 * .then((space) => space.getTeamSpaceMembership('team_space_membership_id'))
11698 * .then((teamSpaceMembership) => console.log(teamSpaceMembership))
11699 * .catch(console.error)
11700 * ```
11701 */
11702 getTeamSpaceMembership: function getTeamSpaceMembership(teamSpaceMembershipId) {
11703 return http.get('team_space_memberships/' + teamSpaceMembershipId).then(function (response) {
11704 return wrapTeamSpaceMembership(http, response.data);
11705 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11706 },
11707
11708 /**
11709 * Gets a collection of Team Space Memberships
11710 * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
11711 * @return Promise for a collection of Team Space Memberships
11712 * @example ```javascript
11713 * const contentful = require('contentful-management')
11714 *
11715 * client.getSpace('<space_id>')
11716 * .then((space) => space.getTeamSpaceMemberships())
11717 * .then((response) => console.log(response.items))
11718 * .catch(console.error)
11719 * ```
11720 */
11721 getTeamSpaceMemberships: function getTeamSpaceMemberships() {
11722 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11723 return http.get('team_space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
11724 query: query
11725 })).then(function (response) {
11726 return wrapTeamSpaceMembershipCollection(http, response.data);
11727 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11728 },
11729
11730 /**
11731 * Creates a Team Space Membership
11732 * @param id - Team ID
11733 * @param data - Object representation of the Team Space Membership to be created
11734 * @return Promise for the newly created Team Space Membership
11735 * @example ```javascript
11736 * const contentful = require('contentful-management')
11737 *
11738 * const client = contentful.createClient({
11739 * accessToken: '<content_management_api_key>'
11740 * })
11741 *
11742 * client.getSpace('<space_id>')
11743 * .then((space) => space.createTeamSpaceMembership('team_id', {
11744 * admin: false,
11745 * roles: [
11746 * {
11747 sys: {
11748 * type: 'Link',
11749 * linkType: 'Role',
11750 * id: '<role_id>'
11751 * }
11752 * }
11753 * ],
11754 * }))
11755 * .then((teamSpaceMembership) => console.log(teamSpaceMembership))
11756 * .catch(console.error)
11757 * ```
11758 */
11759 createTeamSpaceMembership: function createTeamSpaceMembership(teamId, data) {
11760 return http.post('team_space_memberships', data, {
11761 headers: {
11762 'x-contentful-team': teamId
11763 }
11764 }).then(function (response) {
11765 return wrapTeamSpaceMembership(http, response.data);
11766 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11767 },
11768
11769 /**
11770 * Gets a Api Key
11771 * @param id - API Key ID
11772 * @return Promise for a Api Key
11773 * @example ```javascript
11774 * const contentful = require('contentful-management')
11775 *
11776 * const client = contentful.createClient({
11777 * accessToken: '<content_management_api_key>'
11778 * })
11779 *
11780 * client.getSpace('<space_id>')
11781 * .then((space) => space.getApiKey('<apikey-id>'))
11782 * .then((apikey) => console.log(apikey))
11783 * .catch(console.error)
11784 * ```
11785 */
11786 getApiKey: function getApiKey(id) {
11787 return http.get('api_keys/' + id).then(function (response) {
11788 return wrapApiKey(http, response.data);
11789 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11790 },
11791
11792 /**
11793 * Gets a collection of Api Keys
11794 * @return Promise for a collection of Api Keys
11795 * @example ```javascript
11796 * const contentful = require('contentful-management')
11797 *
11798 * const client = contentful.createClient({
11799 * accessToken: '<content_management_api_key>'
11800 * })
11801 *
11802 * client.getSpace('<space_id>')
11803 * .then((space) => space.getApiKeys())
11804 * .then((response) => console.log(response.items))
11805 * .catch(console.error)
11806 * ```
11807 */
11808 getApiKeys: function getApiKeys() {
11809 return http.get('api_keys').then(function (response) {
11810 return wrapApiKeyCollection(http, response.data);
11811 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11812 },
11813
11814 /**
11815 * Gets a collection of preview Api Keys
11816 * @return Promise for a collection of Preview Api Keys
11817 * @example ```javascript
11818 * const contentful = require('contentful-management')
11819 *
11820 * const client = contentful.createClient({
11821 * accessToken: '<content_management_api_key>'
11822 * })
11823 *
11824 * client.getSpace('<space_id>')
11825 * .then((space) => space.getPreviewApiKeys())
11826 * .then((response) => console.log(response.items))
11827 * .catch(console.error)
11828 * ```
11829 */
11830 getPreviewApiKeys: function getPreviewApiKeys() {
11831 return http.get('preview_api_keys').then(function (response) {
11832 return wrapPreviewApiKeyCollection(http, response.data);
11833 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11834 },
11835
11836 /**
11837 * Gets a preview Api Key
11838 * @param id - Preview API Key ID
11839 * @return Promise for a Preview Api Key
11840 * @example ```javascript
11841 * const contentful = require('contentful-management')
11842 *
11843 * const client = contentful.createClient({
11844 * accessToken: '<content_management_api_key>'
11845 * })
11846 *
11847 * client.getSpace('<space_id>')
11848 * .then((space) => space.getPreviewApiKey('<preview-apikey-id>'))
11849 * .then((previewApikey) => console.log(previewApikey))
11850 * .catch(console.error)
11851 * ```
11852 */
11853 getPreviewApiKey: function getPreviewApiKey(id) {
11854 return http.get('preview_api_keys/' + id).then(function (response) {
11855 return wrapPreviewApiKey(http, response.data);
11856 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11857 },
11858
11859 /**
11860 * Creates a Api Key
11861 * @param data - Object representation of the Api Key to be created
11862 * @return Promise for the newly created Api Key
11863 * @example ```javascript
11864 * const contentful = require('contentful-management')
11865 *
11866 * const client = contentful.createClient({
11867 * accessToken: '<content_management_api_key>'
11868 * })
11869 *
11870 * client.getSpace('<space_id>')
11871 * .then((space) => space.createApiKey({
11872 * name: 'API Key name',
11873 * environments:[
11874 * {
11875 * sys: {
11876 * type: 'Link'
11877 * linkType: 'Environment',
11878 * id:'<environment_id>'
11879 * }
11880 * }
11881 * ]
11882 * }
11883 * }))
11884 * .then((apiKey) => console.log(apiKey))
11885 * .catch(console.error)
11886 * ```
11887 */
11888 createApiKey: function createApiKey(data) {
11889 return http.post('api_keys', data).then(function (response) {
11890 return wrapApiKey(http, response.data);
11891 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11892 },
11893
11894 /**
11895 * Creates a Api Key with a custom ID
11896 * @param id - Api Key ID
11897 * @param data - Object representation of the Api Key to be created
11898 * @return Promise for the newly created Api Key
11899 * @example ```javascript
11900 * const contentful = require('contentful-management')
11901 *
11902 * const client = contentful.createClient({
11903 * accessToken: '<content_management_api_key>'
11904 * })
11905 *
11906 * client.getSpace('<space_id>')
11907 * .then((space) => space.createApiKeyWithId('<api-key-id>', {
11908 * name: 'API Key name'
11909 * environments:[
11910 * {
11911 * sys: {
11912 * type: 'Link'
11913 * linkType: 'Environment',
11914 * id:'<environment_id>'
11915 * }
11916 * }
11917 * ]
11918 * }
11919 * }))
11920 * .then((apiKey) => console.log(apiKey))
11921 * .catch(console.error)
11922 * ```
11923 */
11924 createApiKeyWithId: function createApiKeyWithId(id, data) {
11925 return http.put('api_keys/' + id, data).then(function (response) {
11926 return wrapApiKey(http, response.data);
11927 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11928 },
11929
11930 /**
11931 * Gets an UI Extension
11932 * @deprecated since version 5.0
11933 * @param id - UI Extension ID
11934 * @return Promise for an UI Extension
11935 * @example ```javascript
11936 * const contentful = require('contentful-management')
11937 *
11938 * const client = contentful.createClient({
11939 * accessToken: '<content_management_api_key>'
11940 * })
11941 *
11942 * client.getSpace('<space_id>')
11943 * .then((space) => space.getUiExtension('<extension-id>'))
11944 * .then((uiExtension) => console.log(uiExtension))
11945 * .catch(console.error)
11946 * ```
11947 */
11948 getUiExtension: function getUiExtension(id) {
11949 raiseDeprecationWarning('getUiExtension');
11950 return http.get('extensions/' + id).then(function (response) {
11951 return wrapUiExtension(http, response.data);
11952 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11953 },
11954
11955 /**
11956 * Gets a collection of UI Extension
11957 * @deprecated since version 5.0
11958 * @return Promise for a collection of UI Extensions
11959 * @example ```javascript
11960 * const contentful = require('contentful-management')
11961 *
11962 * const client = contentful.createClient({
11963 * accessToken: '<content_management_api_key>'
11964 * })
11965 *
11966 * client.getSpace('<space_id>')
11967 * .then((space) => space.getUiExtensions()
11968 * .then((response) => console.log(response.items))
11969 * .catch(console.error)
11970 * ```
11971 */
11972 getUiExtensions: function getUiExtensions() {
11973 raiseDeprecationWarning('getUiExtensions');
11974 return http.get('extensions').then(function (response) {
11975 return wrapUiExtensionCollection(http, response.data);
11976 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
11977 },
11978
11979 /**
11980 * Creates a UI Extension
11981 * @deprecated since version 5.0
11982 * @param data - Object representation of the UI Extension to be created
11983 * @return Promise for the newly created UI Extension
11984 * @example ```javascript
11985 * const contentful = require('contentful-management')
11986 *
11987 * const client = contentful.createClient({
11988 * accessToken: '<content_management_api_key>'
11989 * })
11990 *
11991 * client.getSpace('<space_id>')
11992 * .then((space) => space.createUiExtension({
11993 * extension: {
11994 * name: 'My awesome extension',
11995 * src: 'https://example.com/my',
11996 * fieldTypes: [
11997 * {
11998 * type: 'Symbol'
11999 * },
12000 * {
12001 * type: 'Text'
12002 * }
12003 * ],
12004 * sidebar: false
12005 * }
12006 * }))
12007 * .then((uiExtension) => console.log(uiExtension))
12008 * .catch(console.error)
12009 * ```
12010 */
12011 createUiExtension: function createUiExtension(data) {
12012 raiseDeprecationWarning('createUiExtension');
12013 return http.post('extensions', data).then(function (response) {
12014 return wrapUiExtension(http, response.data);
12015 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
12016 },
12017
12018 /**
12019 * Creates a UI Extension with a custom ID
12020 * @deprecated since version 5.0
12021 * @param id - UI Extension ID
12022 * @param data - Object representation of the UI Extension to be created
12023 * @return Promise for the newly created UI Extension
12024 * @example ```javascript
12025 * const contentful = require('contentful-management')
12026 *
12027 * const client = contentful.createClient({
12028 * accessToken: '<content_management_api_key>'
12029 * })
12030 *
12031 * client.getSpace('<space_id>')
12032 * .then((space) => space.createUiExtensionWithId('<extension_id>', {
12033 * extension: {
12034 * name: 'My awesome extension',
12035 * src: 'https://example.com/my',
12036 * fieldTypes: [
12037 * {
12038 * type: 'Symbol'
12039 * },
12040 * {
12041 * type: 'Text'
12042 * }
12043 * ],
12044 * sidebar: false
12045 * }
12046 * }))
12047 * .then((uiExtension) => console.log(uiExtension))
12048 * .catch(console.error)
12049 * ```
12050 */
12051 createUiExtensionWithId: function createUiExtensionWithId(id, data) {
12052 raiseDeprecationWarning('createUiExtensionWithId');
12053 return http.put('extensions/' + id, data).then(function (response) {
12054 return wrapUiExtension(http, response.data);
12055 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
12056 },
12057
12058 /**
12059 * Gets all snapshots of an entry
12060 * @deprecated since version 5.0
12061 * @param entryId - Entry ID
12062 * @param query - additional query paramaters
12063 * @return Promise for a collection of Entry Snapshots
12064 * @example ```javascript
12065 * const contentful = require('contentful-management')
12066 *
12067 * const client = contentful.createClient({
12068 * accessToken: '<content_management_api_key>'
12069 * })
12070 *
12071 * client.getSpace('<space_id>')
12072 * .then((space) => space.getEntrySnapshots('<entry_id>'))
12073 * .then((snapshots) => console.log(snapshots.items))
12074 * .catch(console.error)
12075 * ```
12076 */
12077 getEntrySnapshots: function getEntrySnapshots(entryId) {
12078 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12079 raiseDeprecationWarning('getEntrySnapshots');
12080 return http.get("entries/".concat(entryId, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
12081 query: query
12082 })).then(function (response) {
12083 return wrapSnapshotCollection(http, response.data);
12084 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
12085 },
12086
12087 /**
12088 * Gets all snapshots of a contentType
12089 * @deprecated since version 5.0
12090 * @param contentTypeId - Content Type ID
12091 * @param query - additional query paramaters
12092 * @return Promise for a collection of Content Type Snapshots
12093 * @example ```javascript
12094 * const contentful = require('contentful-management')
12095 *
12096 * const client = contentful.createClient({
12097 * accessToken: '<content_management_api_key>'
12098 * })
12099 *
12100 * client.getSpace('<space_id>')
12101 * .then((space) => space.getContentTypeSnapshots('<contentTypeId>'))
12102 * .then((snapshots) => console.log(snapshots.items))
12103 * .catch(console.error)
12104 * ```
12105 */
12106 getContentTypeSnapshots: function getContentTypeSnapshots(contentTypeId) {
12107 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12108 raiseDeprecationWarning('getContentTypeSnapshots');
12109 return http.get("content_types/".concat(contentTypeId, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
12110 query: query
12111 })).then(function (response) {
12112 return wrapSnapshotCollection(http, response.data);
12113 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
12114 },
12115
12116 /**
12117 * Gets an Environment Alias
12118 * @param Environment Alias ID
12119 * @return Promise for an Environment Alias
12120 * @example ```javascript
12121 * const contentful = require('contentful-management')
12122 *
12123 * const client = contentful.createClient({
12124 * accessToken: '<content_management_api_key>'
12125 * })
12126 *
12127 * client.getSpace('<space_id>')
12128 * .then((space) => space.getEnvironmentAlias('<alias-id>'))
12129 * .then((alias) => console.log(alias))
12130 * .catch(console.error)
12131 * ```
12132 */
12133 getEnvironmentAlias: function getEnvironmentAlias(id) {
12134 return http.get('environment_aliases/' + id).then(function (response) {
12135 return wrapEnvironmentAlias(http, response.data);
12136 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
12137 },
12138
12139 /**
12140 * Gets a collection of Environment Aliases
12141 * @return Promise for a collection of Environment Aliases
12142 * @example ```javascript
12143 * const contentful = require('contentful-management')
12144 *
12145 * const client = contentful.createClient({
12146 * accessToken: '<content_management_api_key>'
12147 * })
12148 *
12149 * client.getSpace('<space_id>')
12150 * .then((space) => space.getEnvironmentAliases()
12151 * .then((response) => console.log(response.items))
12152 * .catch(console.error)
12153 * ```
12154 */
12155 getEnvironmentAliases: function getEnvironmentAliases() {
12156 return http.get('environment_aliases').then(function (response) {
12157 return wrapEnvironmentAliasCollection(http, response.data);
12158 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
12159 }
12160 };
12161}
12162
12163/***/ }),
12164
12165/***/ "./enhance-with-methods.ts":
12166/*!*********************************!*\
12167 !*** ./enhance-with-methods.ts ***!
12168 \*********************************/
12169/*! exports provided: default */
12170/***/ (function(module, __webpack_exports__, __webpack_require__) {
12171
12172"use strict";
12173__webpack_require__.r(__webpack_exports__);
12174/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return enhanceWithMethods; });
12175/**
12176 * This method enhances a base object which would normally contain data, with
12177 * methods from another object that might work on manipulating that data.
12178 * All the added methods are set as non enumerable, non configurable, and non
12179 * writable properties. This ensures that if we try to clone or stringify the
12180 * base object, we don't have to worry about these additional methods.
12181 * @private
12182 * @param {object} baseObject - Base object with data
12183 * @param {object} methodsObject - Object with methods as properties. The key
12184 * values used here will be the same that will be defined on the baseObject.
12185 */
12186function enhanceWithMethods(baseObject, methodsObject) {
12187 // @ts-expect-error
12188 return Object.keys(methodsObject).reduce(function (enhancedObject, methodName) {
12189 Object.defineProperty(enhancedObject, methodName, {
12190 enumerable: false,
12191 configurable: true,
12192 writable: false,
12193 value: methodsObject[methodName]
12194 });
12195 return enhancedObject;
12196 }, baseObject);
12197}
12198
12199/***/ }),
12200
12201/***/ "./entities/api-key.ts":
12202/*!*****************************!*\
12203 !*** ./entities/api-key.ts ***!
12204 \*****************************/
12205/*! exports provided: wrapApiKey, wrapApiKeyCollection */
12206/***/ (function(module, __webpack_exports__, __webpack_require__) {
12207
12208"use strict";
12209__webpack_require__.r(__webpack_exports__);
12210/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapApiKey", function() { return wrapApiKey; });
12211/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapApiKeyCollection", function() { return wrapApiKeyCollection; });
12212/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12213/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
12214/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12215/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12216/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
12217/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
12218
12219
12220
12221
12222
12223
12224function createApiKeyApi(http) {
12225 return {
12226 update: function update() {
12227 var self = this;
12228
12229 if ('accessToken' in self) {
12230 delete self.accessToken;
12231 }
12232
12233 if ('preview_api_key' in self) {
12234 delete self.preview_api_key;
12235 }
12236
12237 if ('policies' in self) {
12238 delete self.policies;
12239 }
12240
12241 var update = Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
12242 http: http,
12243 entityPath: 'api_keys',
12244 wrapperMethod: wrapApiKey
12245 });
12246 return update.call(self);
12247 },
12248 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
12249 http: http,
12250 entityPath: 'api_keys'
12251 })
12252 };
12253}
12254/**
12255 * @private
12256 * @param http - HTTP client instance
12257 * @param data - Raw api key data
12258 */
12259
12260
12261function wrapApiKey(http, data) {
12262 var apiKey = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
12263 var apiKeyWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(apiKey, createApiKeyApi(http));
12264 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(apiKeyWithMethods);
12265}
12266/**
12267 * @private
12268 * @param http - HTTP client instance
12269 * @param data - Raw api key collection data
12270 * @return Wrapped api key collection data
12271 */
12272
12273var wrapApiKeyCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapApiKey);
12274
12275/***/ }),
12276
12277/***/ "./entities/app-definition.ts":
12278/*!************************************!*\
12279 !*** ./entities/app-definition.ts ***!
12280 \************************************/
12281/*! exports provided: wrapAppDefinition, wrapAppDefinitionCollection */
12282/***/ (function(module, __webpack_exports__, __webpack_require__) {
12283
12284"use strict";
12285__webpack_require__.r(__webpack_exports__);
12286/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapAppDefinition", function() { return wrapAppDefinition; });
12287/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapAppDefinitionCollection", function() { return wrapAppDefinitionCollection; });
12288/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12289/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
12290/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12291/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12292/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
12293/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
12294
12295
12296
12297
12298
12299var entityPath = 'app_definitions';
12300
12301function createAppDefinitionApi(http) {
12302 return {
12303 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
12304 http: http,
12305 entityPath: entityPath,
12306 wrapperMethod: wrapAppDefinition
12307 }),
12308 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
12309 http: http,
12310 entityPath: entityPath
12311 })
12312 };
12313}
12314/**
12315 * @private
12316 * @param http - HTTP client instance
12317 * @param data - Raw App Definition data
12318 * @return Wrapped App Definition data
12319 */
12320
12321
12322function wrapAppDefinition(http, data) {
12323 var appDefinition = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
12324 var appDefinitionWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(appDefinition, createAppDefinitionApi(http));
12325 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(appDefinitionWithMethods);
12326}
12327/**
12328 * @private
12329 * @param http - HTTP client instance
12330 * @param data - Raw App Definition collection data
12331 * @return Wrapped App Definition collection data
12332 */
12333
12334var wrapAppDefinitionCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapAppDefinition);
12335
12336/***/ }),
12337
12338/***/ "./entities/app-installation.ts":
12339/*!**************************************!*\
12340 !*** ./entities/app-installation.ts ***!
12341 \**************************************/
12342/*! exports provided: wrapAppInstallation, wrapAppInstallationCollection */
12343/***/ (function(module, __webpack_exports__, __webpack_require__) {
12344
12345"use strict";
12346__webpack_require__.r(__webpack_exports__);
12347/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapAppInstallation", function() { return wrapAppInstallation; });
12348/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapAppInstallationCollection", function() { return wrapAppInstallationCollection; });
12349/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12350/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12351/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__);
12352/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
12353/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12354/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
12355/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
12356
12357
12358
12359
12360
12361
12362
12363function createAppInstallationApi(http) {
12364 return {
12365 update: function update() {
12366 var self = this;
12367 var raw = self.toPlainObject();
12368 var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(raw);
12369 delete data.sys;
12370 return http.put("app_installations/".concat(self.sys.appDefinition.sys.id), data).then(function (response) {
12371 return wrapAppInstallation(http, response.data);
12372 }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
12373 },
12374 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
12375 http: http,
12376 entityPath: 'app_installations'
12377 })
12378 };
12379}
12380/**
12381 * @private
12382 * @param http - HTTP client instance
12383 * @param data - Raw App Installation data
12384 * @return Wrapped App installation data
12385 */
12386
12387
12388function wrapAppInstallation(http, data) {
12389 var appInstallation = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(data));
12390 var appInstallationWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_3__["default"])(appInstallation, createAppInstallationApi(http));
12391 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["freezeSys"])(appInstallationWithMethods);
12392}
12393/**
12394 * @private
12395 */
12396
12397var wrapAppInstallationCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapAppInstallation);
12398
12399/***/ }),
12400
12401/***/ "./entities/asset.ts":
12402/*!***************************!*\
12403 !*** ./entities/asset.ts ***!
12404 \***************************/
12405/*! exports provided: wrapAsset, wrapAssetCollection */
12406/***/ (function(module, __webpack_exports__, __webpack_require__) {
12407
12408"use strict";
12409__webpack_require__.r(__webpack_exports__);
12410/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapAsset", function() { return wrapAsset; });
12411/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapAssetCollection", function() { return wrapAssetCollection; });
12412/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12413/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
12414/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12415/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12416/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
12417/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
12418/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
12419
12420
12421
12422
12423
12424
12425var ASSET_PROCESSING_CHECK_WAIT = 3000;
12426var ASSET_PROCESSING_CHECK_RETRIES = 10;
12427
12428function createAssetApi(http) {
12429 function checkIfAssetHasUrl(_ref) {
12430 var resolve = _ref.resolve,
12431 reject = _ref.reject,
12432 id = _ref.id,
12433 locale = _ref.locale,
12434 _ref$processingCheckW = _ref.processingCheckWait,
12435 processingCheckWait = _ref$processingCheckW === void 0 ? ASSET_PROCESSING_CHECK_WAIT : _ref$processingCheckW,
12436 _ref$processingCheckR = _ref.processingCheckRetries,
12437 processingCheckRetries = _ref$processingCheckR === void 0 ? ASSET_PROCESSING_CHECK_RETRIES : _ref$processingCheckR,
12438 _ref$checkCount = _ref.checkCount,
12439 checkCount = _ref$checkCount === void 0 ? 0 : _ref$checkCount;
12440 http.get('assets/' + id).then(function (response) {
12441 return wrapAsset(http, response.data);
12442 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]).then(function (asset) {
12443 if (asset.fields.file[locale].url) {
12444 resolve(asset);
12445 } else if (checkCount === processingCheckRetries) {
12446 var error = new Error();
12447 error.name = 'AssetProcessingTimeout';
12448 error.message = 'Asset is taking longer then expected to process.';
12449 reject(error);
12450 } else {
12451 checkCount++;
12452 setTimeout(function () {
12453 return checkIfAssetHasUrl({
12454 resolve: resolve,
12455 reject: reject,
12456 id: id,
12457 locale: locale,
12458 checkCount: checkCount,
12459 processingCheckWait: processingCheckWait,
12460 processingCheckRetries: processingCheckRetries
12461 });
12462 }, processingCheckWait);
12463 }
12464 });
12465 }
12466
12467 function processForLocale(locale) {
12468 var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
12469 processingCheckWait = _ref2.processingCheckWait,
12470 processingCheckRetries = _ref2.processingCheckRetries;
12471
12472 var assetId = this.sys.id;
12473 return http.put('assets/' + this.sys.id + '/files/' + locale + '/process', null, {
12474 headers: {
12475 'X-Contentful-Version': this.sys.version
12476 }
12477 }).then(function () {
12478 return new Promise(function (resolve, reject) {
12479 return checkIfAssetHasUrl({
12480 resolve: resolve,
12481 reject: reject,
12482 id: assetId,
12483 locale: locale,
12484 processingCheckWait: processingCheckWait,
12485 processingCheckRetries: processingCheckRetries
12486 });
12487 });
12488 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
12489 }
12490
12491 function processForAllLocales() {
12492 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12493 var self = this;
12494 var locales = Object.keys(this.fields.file || {});
12495 var mostUpToDateAssetVersion = undefined; // Let all the locales process
12496 // Since they all resolve at different times,
12497 // we need to pick the last resolved value
12498 // to reflect the most recent state
12499
12500 var allProcessingLocales = locales.map(function (locale) {
12501 return processForLocale.call(self, locale, options).then(function (result) {
12502 // Side effect of always setting the most up to date asset version
12503 // The last one to call this will be the last one that finished
12504 // and thus the most up to date
12505 mostUpToDateAssetVersion = result;
12506 });
12507 });
12508 return Promise.all(allProcessingLocales).then(function () {
12509 return mostUpToDateAssetVersion;
12510 });
12511 }
12512
12513 return {
12514 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUpdateEntity"])({
12515 http: http,
12516 entityPath: 'assets',
12517 wrapperMethod: wrapAsset
12518 }),
12519 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createDeleteEntity"])({
12520 http: http,
12521 entityPath: 'assets'
12522 }),
12523 publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createPublishEntity"])({
12524 http: http,
12525 entityPath: 'assets',
12526 wrapperMethod: wrapAsset
12527 }),
12528 unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUnpublishEntity"])({
12529 http: http,
12530 entityPath: 'assets',
12531 wrapperMethod: wrapAsset
12532 }),
12533 archive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createArchiveEntity"])({
12534 http: http,
12535 entityPath: 'assets',
12536 wrapperMethod: wrapAsset
12537 }),
12538 unarchive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUnarchiveEntity"])({
12539 http: http,
12540 entityPath: 'assets',
12541 wrapperMethod: wrapAsset
12542 }),
12543 processForLocale: processForLocale,
12544 processForAllLocales: processForAllLocales,
12545 isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createPublishedChecker"])(),
12546 isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUpdatedChecker"])(),
12547 isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createDraftChecker"])(),
12548 isArchived: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createArchivedChecker"])()
12549 };
12550}
12551/**
12552 * @private
12553 * @param http - HTTP client instance
12554 * @param data - Raw asset data
12555 * @return Wrapped asset data
12556 */
12557
12558
12559function wrapAsset(http, data) {
12560 var asset = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
12561 var assetWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(asset, createAssetApi(http));
12562 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(assetWithMethods);
12563}
12564/**
12565 * @private
12566 */
12567
12568var wrapAssetCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapAsset);
12569
12570/***/ }),
12571
12572/***/ "./entities/content-type.ts":
12573/*!**********************************!*\
12574 !*** ./entities/content-type.ts ***!
12575 \**********************************/
12576/*! exports provided: wrapContentType, wrapContentTypeCollection */
12577/***/ (function(module, __webpack_exports__, __webpack_require__) {
12578
12579"use strict";
12580__webpack_require__.r(__webpack_exports__);
12581/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapContentType", function() { return wrapContentType; });
12582/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapContentTypeCollection", function() { return wrapContentTypeCollection; });
12583/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12584/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
12585/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12586/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12587/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
12588/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
12589/* harmony import */ var _editor_interface__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editor-interface */ "./entities/editor-interface.ts");
12590/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
12591/* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./snapshot */ "./entities/snapshot.ts");
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601function createContentTypeApi(http) {
12602 return {
12603 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
12604 http: http,
12605 entityPath: 'content_types',
12606 wrapperMethod: wrapContentType
12607 }),
12608 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
12609 http: http,
12610 entityPath: 'content_types'
12611 }),
12612 publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishEntity"])({
12613 http: http,
12614 entityPath: 'content_types',
12615 wrapperMethod: wrapContentType
12616 }),
12617 unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnpublishEntity"])({
12618 http: http,
12619 entityPath: 'content_types',
12620 wrapperMethod: wrapContentType
12621 }),
12622 getEditorInterface: function getEditorInterface() {
12623 return http.get('content_types/' + this.sys.id + '/editor_interface').then(function (response) {
12624 return Object(_editor_interface__WEBPACK_IMPORTED_MODULE_5__["wrapEditorInterface"])(http, response.data);
12625 }, _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
12626 },
12627 getSnapshots: function getSnapshots() {
12628 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12629 return http.get("content_types/".concat(this.sys.id, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
12630 query: query
12631 })).then(function (response) {
12632 return Object(_snapshot__WEBPACK_IMPORTED_MODULE_7__["wrapSnapshotCollection"])(http, response.data);
12633 }, _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
12634 },
12635 getSnapshot: function getSnapshot(snapshotId) {
12636 return http.get("content_types/".concat(this.sys.id, "/snapshots/").concat(snapshotId)).then(function (response) {
12637 return Object(_snapshot__WEBPACK_IMPORTED_MODULE_7__["wrapSnapshot"])(http, response.data);
12638 }, _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
12639 },
12640 isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishedChecker"])(),
12641 isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdatedChecker"])(),
12642 isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDraftChecker"])(),
12643 omitAndDeleteField: function omitAndDeleteField(id) {
12644 return findAndUpdateField(this, id, 'omitted', true).then(function (newContentType) {
12645 return findAndUpdateField(newContentType, id, 'deleted', true);
12646 })["catch"](_error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
12647 }
12648 };
12649}
12650/**
12651 * @private
12652 * @param id - unique ID of the field
12653 * @param key - the attribute on the field to change
12654 * @param value - the value to set the attribute to
12655 */
12656
12657
12658var findAndUpdateField = function findAndUpdateField(contentType, id, key, value) {
12659 var field = contentType.fields.find(function (field) {
12660 return field.id === id;
12661 });
12662
12663 if (!field) {
12664 return Promise.reject(new Error("Tried to omitAndDeleteField on a nonexistent field, ".concat(id, ", on the content type ").concat(contentType.name, ".")));
12665 } // @ts-expect-error
12666
12667
12668 field[key] = value;
12669 return contentType.update();
12670};
12671/**
12672 * @private
12673 * @param http - HTTP client instance
12674 * @param data - Raw content type data
12675 * @return Wrapped content type data
12676 */
12677
12678
12679function wrapContentType(http, data) {
12680 var contentType = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
12681 var contentTypeWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(contentType, createContentTypeApi(http));
12682 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(contentTypeWithMethods);
12683}
12684/**
12685 * @private
12686 */
12687
12688var wrapContentTypeCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapContentType);
12689
12690/***/ }),
12691
12692/***/ "./entities/editor-interface.ts":
12693/*!**************************************!*\
12694 !*** ./entities/editor-interface.ts ***!
12695 \**************************************/
12696/*! exports provided: wrapEditorInterface */
12697/***/ (function(module, __webpack_exports__, __webpack_require__) {
12698
12699"use strict";
12700__webpack_require__.r(__webpack_exports__);
12701/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapEditorInterface", function() { return wrapEditorInterface; });
12702/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12703/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
12704/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12705/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12706/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
12707
12708
12709
12710
12711
12712function createEditorInterfaceApi(http) {
12713 return {
12714 update: function update() {
12715 var self = this;
12716 var raw = self.toPlainObject();
12717 var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
12718 delete data.sys;
12719 return http.put("content_types/".concat(self.sys.contentType.sys.id, "/editor_interface"), data, {
12720 headers: {
12721 'X-Contentful-Version': self.sys.version
12722 }
12723 }).then(function (response) {
12724 return wrapEditorInterface(http, response.data);
12725 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
12726 },
12727 getControlForField: function getControlForField(fieldId) {
12728 var self = this;
12729 var result = self.controls.filter(function (control) {
12730 return control.fieldId === fieldId;
12731 });
12732 return result && result.length > 0 ? result[0] : null;
12733 }
12734 };
12735}
12736/**
12737 * @private
12738 */
12739
12740
12741function wrapEditorInterface(http, data) {
12742 var editorInterface = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
12743 var editorInterfaceWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(editorInterface, createEditorInterfaceApi(http));
12744 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(editorInterfaceWithMethods);
12745}
12746
12747/***/ }),
12748
12749/***/ "./entities/entry.ts":
12750/*!***************************!*\
12751 !*** ./entities/entry.ts ***!
12752 \***************************/
12753/*! exports provided: wrapEntry, wrapEntryCollection */
12754/***/ (function(module, __webpack_exports__, __webpack_require__) {
12755
12756"use strict";
12757__webpack_require__.r(__webpack_exports__);
12758/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapEntry", function() { return wrapEntry; });
12759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapEntryCollection", function() { return wrapEntryCollection; });
12760/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12761/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
12762/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12763/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12764/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
12765/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
12766/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
12767/* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./snapshot */ "./entities/snapshot.ts");
12768
12769
12770
12771
12772
12773
12774
12775
12776function createEntryApi(http) {
12777 return {
12778 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
12779 http: http,
12780 entityPath: 'entries',
12781 wrapperMethod: wrapEntry
12782 }),
12783 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
12784 http: http,
12785 entityPath: 'entries'
12786 }),
12787 publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishEntity"])({
12788 http: http,
12789 entityPath: 'entries',
12790 wrapperMethod: wrapEntry
12791 }),
12792 unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnpublishEntity"])({
12793 http: http,
12794 entityPath: 'entries',
12795 wrapperMethod: wrapEntry
12796 }),
12797 archive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createArchiveEntity"])({
12798 http: http,
12799 entityPath: 'entries',
12800 wrapperMethod: wrapEntry
12801 }),
12802 unarchive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnarchiveEntity"])({
12803 http: http,
12804 entityPath: 'entries',
12805 wrapperMethod: wrapEntry
12806 }),
12807 getSnapshots: function getSnapshots() {
12808 var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
12809 return http.get("entries/".concat(this.sys.id, "/snapshots"), Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
12810 query: query
12811 })).then(function (response) {
12812 return Object(_snapshot__WEBPACK_IMPORTED_MODULE_6__["wrapSnapshotCollection"])(http, response.data);
12813 }, _error_handler__WEBPACK_IMPORTED_MODULE_5__["default"]);
12814 },
12815 getSnapshot: function getSnapshot(snapshotId) {
12816 return http.get("entries/".concat(this.sys.id, "/snapshots/").concat(snapshotId)).then(function (response) {
12817 return Object(_snapshot__WEBPACK_IMPORTED_MODULE_6__["wrapSnapshot"])(http, response.data);
12818 }, _error_handler__WEBPACK_IMPORTED_MODULE_5__["default"]);
12819 },
12820 isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishedChecker"])(),
12821 isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdatedChecker"])(),
12822 isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDraftChecker"])(),
12823 isArchived: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createArchivedChecker"])()
12824 };
12825}
12826/**
12827 * @private
12828 * @param http - HTTP client instance
12829 * @param data - Raw entry data
12830 * @return Wrapped entry data
12831 */
12832
12833
12834function wrapEntry(http, data) {
12835 var entry = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
12836 var entryWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(entry, createEntryApi(http));
12837 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(entryWithMethods);
12838}
12839/**
12840 * Data is also mixed in with link getters if links exist and includes were requested
12841 * @private
12842 */
12843
12844var wrapEntryCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapEntry);
12845
12846/***/ }),
12847
12848/***/ "./entities/environment-alias.ts":
12849/*!***************************************!*\
12850 !*** ./entities/environment-alias.ts ***!
12851 \***************************************/
12852/*! exports provided: wrapEnvironmentAlias, wrapEnvironmentAliasCollection */
12853/***/ (function(module, __webpack_exports__, __webpack_require__) {
12854
12855"use strict";
12856__webpack_require__.r(__webpack_exports__);
12857/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapEnvironmentAlias", function() { return wrapEnvironmentAlias; });
12858/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapEnvironmentAliasCollection", function() { return wrapEnvironmentAliasCollection; });
12859/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12860/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
12861/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12862/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12863/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
12864/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
12865
12866
12867
12868
12869
12870
12871function createEnvironmentAliasApi(http) {
12872 return {
12873 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
12874 http: http,
12875 entityPath: 'environment_aliases',
12876 wrapperMethod: wrapEnvironmentAlias
12877 })
12878 };
12879}
12880/**
12881 * @private
12882 * @param http - HTTP client instance
12883 * @param data - Raw environment alias data
12884 * @return Wrapped environment alias data
12885 */
12886
12887
12888function wrapEnvironmentAlias(http, data) {
12889 var alias = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
12890 var enhancedAlias = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(alias, createEnvironmentAliasApi(http));
12891 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedAlias);
12892}
12893/**
12894 * @private
12895 * @param http - HTTP client instance
12896 * @param data - Raw environment alias collection data
12897 * @return Wrapped environment alias collection data
12898 */
12899
12900var wrapEnvironmentAliasCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapEnvironmentAlias);
12901
12902/***/ }),
12903
12904/***/ "./entities/environment.ts":
12905/*!*********************************!*\
12906 !*** ./entities/environment.ts ***!
12907 \*********************************/
12908/*! exports provided: wrapEnvironment, wrapEnvironmentCollection */
12909/***/ (function(module, __webpack_exports__, __webpack_require__) {
12910
12911"use strict";
12912__webpack_require__.r(__webpack_exports__);
12913/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapEnvironment", function() { return wrapEnvironment; });
12914/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapEnvironmentCollection", function() { return wrapEnvironmentCollection; });
12915/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
12916/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
12917/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
12918/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
12919/* harmony import */ var _create_environment_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../create-environment-api */ "./create-environment-api.ts");
12920/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
12921
12922
12923
12924
12925
12926
12927/**
12928 * This method creates the API for the given environment with all the methods for
12929 * reading and creating other entities. It also passes down a clone of the
12930 * http client with a environment id, so the base path for requests now has the
12931 * environment id already set.
12932 * @private
12933 * @param http - HTTP client instance
12934 * @param data - API response for a Environment
12935 * @return
12936 */
12937function wrapEnvironment(http, data) {
12938 // do not pollute generated typings
12939 var sdkHttp = http;
12940 var environment = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
12941 var _sdkHttp$httpClientPa = sdkHttp.httpClientParams,
12942 hostUpload = _sdkHttp$httpClientPa.hostUpload,
12943 defaultHostnameUpload = _sdkHttp$httpClientPa.defaultHostnameUpload;
12944 var environmentScopedHttpClient = sdkHttp.cloneWithNewParams({
12945 baseURL: http.defaults.baseURL + 'environments/' + environment.sys.id
12946 });
12947 var environmentScopedUploadClient = sdkHttp.cloneWithNewParams({
12948 space: environment.sys.space.sys.id,
12949 host: hostUpload || defaultHostnameUpload
12950 });
12951 var environmentApi = Object(_create_environment_api__WEBPACK_IMPORTED_MODULE_3__["default"])({
12952 http: environmentScopedHttpClient,
12953 httpUpload: environmentScopedUploadClient
12954 });
12955 var enhancedEnvironment = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(environment, environmentApi);
12956 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedEnvironment);
12957}
12958/**
12959 * This method wraps each environment in a collection with the environment API. See wrapEnvironment
12960 * above for more details.
12961 * @private
12962 */
12963
12964var wrapEnvironmentCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapEnvironment);
12965
12966/***/ }),
12967
12968/***/ "./entities/index.ts":
12969/*!***************************!*\
12970 !*** ./entities/index.ts ***!
12971 \***************************/
12972/*! exports provided: default */
12973/***/ (function(module, __webpack_exports__, __webpack_require__) {
12974
12975"use strict";
12976__webpack_require__.r(__webpack_exports__);
12977/* harmony import */ var _app_definition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app-definition */ "./entities/app-definition.ts");
12978/* harmony import */ var _space__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./space */ "./entities/space.ts");
12979/* harmony import */ var _environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./environment */ "./entities/environment.ts");
12980/* harmony import */ var _entry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./entry */ "./entities/entry.ts");
12981/* harmony import */ var _asset__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./asset */ "./entities/asset.ts");
12982/* harmony import */ var _content_type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./content-type */ "./entities/content-type.ts");
12983/* harmony import */ var _editor_interface__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./editor-interface */ "./entities/editor-interface.ts");
12984/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./locale */ "./entities/locale.ts");
12985/* harmony import */ var _webhook__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./webhook */ "./entities/webhook.ts");
12986/* harmony import */ var _space_member__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./space-member */ "./entities/space-member.ts");
12987/* harmony import */ var _space_membership__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./space-membership */ "./entities/space-membership.ts");
12988/* harmony import */ var _team_space_membership__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./team-space-membership */ "./entities/team-space-membership.ts");
12989/* harmony import */ var _organization_membership__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./organization-membership */ "./entities/organization-membership.ts");
12990/* harmony import */ var _organization_invitation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./organization-invitation */ "./entities/organization-invitation.ts");
12991/* harmony import */ var _role__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./role */ "./entities/role.ts");
12992/* harmony import */ var _api_key__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./api-key */ "./entities/api-key.ts");
12993/* harmony import */ var _preview_api_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./preview-api-key */ "./entities/preview-api-key.ts");
12994/* harmony import */ var _upload__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./upload */ "./entities/upload.ts");
12995/* harmony import */ var _organization__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./organization */ "./entities/organization.ts");
12996/* harmony import */ var _ui_extension__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./ui-extension */ "./entities/ui-extension.ts");
12997/* harmony import */ var _app_installation__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./app-installation */ "./entities/app-installation.ts");
12998/* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./snapshot */ "./entities/snapshot.ts");
12999/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./user */ "./entities/user.ts");
13000/* harmony import */ var _personal_access_token__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./personal-access-token */ "./entities/personal-access-token.ts");
13001/* harmony import */ var _usage__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./usage */ "./entities/usage.ts");
13002/* harmony import */ var _environment_alias__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./environment-alias */ "./entities/environment-alias.ts");
13003/* harmony import */ var _team__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./team */ "./entities/team.ts");
13004/* harmony import */ var _team_membership__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./team-membership */ "./entities/team-membership.ts");
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033/* harmony default export */ __webpack_exports__["default"] = ({
13034 appDefinition: _app_definition__WEBPACK_IMPORTED_MODULE_0__,
13035 space: _space__WEBPACK_IMPORTED_MODULE_1__,
13036 environment: _environment__WEBPACK_IMPORTED_MODULE_2__,
13037 entry: _entry__WEBPACK_IMPORTED_MODULE_3__,
13038 asset: _asset__WEBPACK_IMPORTED_MODULE_4__,
13039 contentType: _content_type__WEBPACK_IMPORTED_MODULE_5__,
13040 editorInterface: _editor_interface__WEBPACK_IMPORTED_MODULE_6__,
13041 locale: _locale__WEBPACK_IMPORTED_MODULE_7__,
13042 webhook: _webhook__WEBPACK_IMPORTED_MODULE_8__,
13043 spaceMember: _space_member__WEBPACK_IMPORTED_MODULE_9__,
13044 spaceMembership: _space_membership__WEBPACK_IMPORTED_MODULE_10__,
13045 teamSpaceMembership: _team_space_membership__WEBPACK_IMPORTED_MODULE_11__,
13046 organizationMembership: _organization_membership__WEBPACK_IMPORTED_MODULE_12__,
13047 organizationInvitation: _organization_invitation__WEBPACK_IMPORTED_MODULE_13__,
13048 role: _role__WEBPACK_IMPORTED_MODULE_14__,
13049 apiKey: _api_key__WEBPACK_IMPORTED_MODULE_15__,
13050 previewApiKey: _preview_api_key__WEBPACK_IMPORTED_MODULE_16__,
13051 upload: _upload__WEBPACK_IMPORTED_MODULE_17__,
13052 organization: _organization__WEBPACK_IMPORTED_MODULE_18__,
13053 uiExtension: _ui_extension__WEBPACK_IMPORTED_MODULE_19__,
13054 appInstallation: _app_installation__WEBPACK_IMPORTED_MODULE_20__,
13055 snapshot: _snapshot__WEBPACK_IMPORTED_MODULE_21__,
13056 user: _user__WEBPACK_IMPORTED_MODULE_22__,
13057 personalAccessToken: _personal_access_token__WEBPACK_IMPORTED_MODULE_23__,
13058 usage: _usage__WEBPACK_IMPORTED_MODULE_24__,
13059 environmentAlias: _environment_alias__WEBPACK_IMPORTED_MODULE_25__,
13060 team: _team__WEBPACK_IMPORTED_MODULE_26__,
13061 teamMembership: _team_membership__WEBPACK_IMPORTED_MODULE_27__
13062});
13063
13064/***/ }),
13065
13066/***/ "./entities/locale.ts":
13067/*!****************************!*\
13068 !*** ./entities/locale.ts ***!
13069 \****************************/
13070/*! exports provided: wrapLocale, wrapLocaleCollection */
13071/***/ (function(module, __webpack_exports__, __webpack_require__) {
13072
13073"use strict";
13074__webpack_require__.r(__webpack_exports__);
13075/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapLocale", function() { return wrapLocale; });
13076/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapLocaleCollection", function() { return wrapLocaleCollection; });
13077/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13078/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13079/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13080/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13081/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13082/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
13083
13084
13085
13086
13087
13088
13089function createLocaleApi(http) {
13090 return {
13091 update: function update() {
13092 var self = this;
13093 delete self["default"]; // we should not send this back
13094
13095 return Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
13096 http: http,
13097 entityPath: 'locales',
13098 wrapperMethod: wrapLocale
13099 }).call(self);
13100 },
13101 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
13102 http: http,
13103 entityPath: 'locales'
13104 })
13105 };
13106}
13107/**
13108 * @private
13109 * @param http - HTTP client instance
13110 * @param data - Raw locale data
13111 * @return Wrapped locale data
13112 */
13113
13114
13115function wrapLocale(http, data) {
13116 // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
13117 // @ts-ignore
13118 delete data.internal_code;
13119 var locale = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13120 var localeWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(locale, createLocaleApi(http));
13121 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(localeWithMethods);
13122}
13123/**
13124 * @private
13125 */
13126
13127var wrapLocaleCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapLocale);
13128
13129/***/ }),
13130
13131/***/ "./entities/organization-invitation.ts":
13132/*!*********************************************!*\
13133 !*** ./entities/organization-invitation.ts ***!
13134 \*********************************************/
13135/*! exports provided: wrapOrganizationInvitation */
13136/***/ (function(module, __webpack_exports__, __webpack_require__) {
13137
13138"use strict";
13139__webpack_require__.r(__webpack_exports__);
13140/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapOrganizationInvitation", function() { return wrapOrganizationInvitation; });
13141/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13142/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13143/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13144
13145
13146
13147/**
13148 * @private
13149 * @param http - HTTP client instance
13150 * @param data - Raw invitation data
13151 * @return {OrganizationInvitation} Wrapped Inviation data
13152 */
13153function wrapOrganizationInvitation(http, data) {
13154 var invitation = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13155 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(invitation);
13156}
13157
13158/***/ }),
13159
13160/***/ "./entities/organization-membership.ts":
13161/*!*********************************************!*\
13162 !*** ./entities/organization-membership.ts ***!
13163 \*********************************************/
13164/*! exports provided: wrapOrganizationMembership, wrapOrganizationMembershipCollection */
13165/***/ (function(module, __webpack_exports__, __webpack_require__) {
13166
13167"use strict";
13168__webpack_require__.r(__webpack_exports__);
13169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapOrganizationMembership", function() { return wrapOrganizationMembership; });
13170/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapOrganizationMembershipCollection", function() { return wrapOrganizationMembershipCollection; });
13171/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13172/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13173/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13174/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13175/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
13176/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
13177/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13178
13179
13180
13181
13182
13183
13184
13185function createOrganizationMembershipApi(http) {
13186 return {
13187 update: function update() {
13188 var self = this;
13189 var raw = self.toPlainObject();
13190 var role = raw.role;
13191 return http.put('organization_memberships' + '/' + self.sys.id, {
13192 role: role
13193 }, {
13194 headers: {
13195 'X-Contentful-Version': self.sys.version || 0
13196 }
13197 }).then(function (response) {
13198 return wrapOrganizationMembership(http, response.data);
13199 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
13200 },
13201 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
13202 http: http,
13203 entityPath: 'organization_memberships'
13204 })
13205 };
13206}
13207/**
13208 * @private
13209 * @param {Object} http - HTTP client instance
13210 * @param {Object} data - Raw organization membership data
13211 * @return {OrganizationMembership} Wrapped organization membership data
13212 */
13213
13214
13215function wrapOrganizationMembership(http, data) {
13216 var organizationMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13217 var organizationMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(organizationMembership, createOrganizationMembershipApi(http));
13218 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(organizationMembershipWithMethods);
13219}
13220/**
13221 * @private
13222 */
13223
13224var wrapOrganizationMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapOrganizationMembership);
13225
13226/***/ }),
13227
13228/***/ "./entities/organization.ts":
13229/*!**********************************!*\
13230 !*** ./entities/organization.ts ***!
13231 \**********************************/
13232/*! exports provided: wrapOrganization, wrapOrganizationCollection */
13233/***/ (function(module, __webpack_exports__, __webpack_require__) {
13234
13235"use strict";
13236__webpack_require__.r(__webpack_exports__);
13237/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapOrganization", function() { return wrapOrganization; });
13238/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapOrganizationCollection", function() { return wrapOrganizationCollection; });
13239/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13240/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13241/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13242/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13243/* harmony import */ var _create_organization_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../create-organization-api */ "./create-organization-api.ts");
13244/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13245
13246
13247
13248
13249
13250
13251/**
13252 * This method creates the API for the given organization with all the methods for
13253 * reading and creating other entities. It also passes down a clone of the
13254 * http client with an organization id, so the base path for requests now has the
13255 * organization id already set.
13256 * @private
13257 * @param http - HTTP client instance
13258 * @param data - API response for an Organization
13259 * @return {Organization}
13260 */
13261function wrapOrganization(http, data) {
13262 var org = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13263 var baseURL = (http.defaults.baseURL || '').replace('/spaces/', '/organizations/') + org.sys.id + '/'; // @ts-expect-error
13264
13265 var orgScopedHttpClient = http.cloneWithNewParams({
13266 baseURL: baseURL
13267 });
13268 var orgApi = Object(_create_organization_api__WEBPACK_IMPORTED_MODULE_3__["default"])({
13269 http: orgScopedHttpClient
13270 });
13271 var enhancedOrganization = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(org, orgApi);
13272 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedOrganization);
13273}
13274/**
13275 * This method normalizes each organization in a collection.
13276 * @private
13277 */
13278
13279var wrapOrganizationCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapOrganization);
13280
13281/***/ }),
13282
13283/***/ "./entities/personal-access-token.ts":
13284/*!*******************************************!*\
13285 !*** ./entities/personal-access-token.ts ***!
13286 \*******************************************/
13287/*! exports provided: wrapPersonalAccessToken, wrapPersonalAccessTokenCollection */
13288/***/ (function(module, __webpack_exports__, __webpack_require__) {
13289
13290"use strict";
13291__webpack_require__.r(__webpack_exports__);
13292/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapPersonalAccessToken", function() { return wrapPersonalAccessToken; });
13293/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapPersonalAccessTokenCollection", function() { return wrapPersonalAccessTokenCollection; });
13294/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13295/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13296/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13297/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13298/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
13299/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13300
13301
13302
13303
13304
13305
13306function createPersonalAccessToken(http) {
13307 return {
13308 revoke: function revoke() {
13309 var baseURL = (http.defaults.baseURL || '').replace('/spaces/', '/users/me/access_tokens');
13310 return http.put("".concat(this.sys.id, "/revoked"), null, {
13311 baseURL: baseURL
13312 }).then(function (response) {
13313 return response.data;
13314 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
13315 }
13316 };
13317}
13318/**
13319 * @private
13320 * @param http - HTTP client instance
13321 * @param data - Raw personal access token data
13322 * @return Wrapped personal access token
13323 */
13324
13325
13326function wrapPersonalAccessToken(http, data) {
13327 var personalAccessToken = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13328 var personalAccessTokenWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(personalAccessToken, createPersonalAccessToken(http));
13329 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(personalAccessTokenWithMethods);
13330}
13331/**
13332 * @private
13333 * @param http - HTTP client instance
13334 * @param data - Raw personal access collection data
13335 * @return Wrapped personal access token collection data
13336 */
13337
13338var wrapPersonalAccessTokenCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapPersonalAccessToken);
13339
13340/***/ }),
13341
13342/***/ "./entities/preview-api-key.ts":
13343/*!*************************************!*\
13344 !*** ./entities/preview-api-key.ts ***!
13345 \*************************************/
13346/*! exports provided: wrapPreviewApiKey, wrapPreviewApiKeyCollection */
13347/***/ (function(module, __webpack_exports__, __webpack_require__) {
13348
13349"use strict";
13350__webpack_require__.r(__webpack_exports__);
13351/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapPreviewApiKey", function() { return wrapPreviewApiKey; });
13352/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapPreviewApiKeyCollection", function() { return wrapPreviewApiKeyCollection; });
13353/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13354/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13355/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13356/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13357/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13358
13359
13360
13361
13362
13363function createPreviewApiKeyApi() {
13364 return {};
13365}
13366/**
13367 * @private
13368 * @param http - HTTP client instance
13369 * @param data - Raw api key data
13370 * @return Wrapped preview api key data
13371 */
13372
13373
13374function wrapPreviewApiKey(_http, data) {
13375 var previewApiKey = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13376 var previewApiKeyWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(previewApiKey, createPreviewApiKeyApi());
13377 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(previewApiKeyWithMethods);
13378}
13379/**
13380 * @private
13381 */
13382
13383var wrapPreviewApiKeyCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapPreviewApiKey);
13384
13385/***/ }),
13386
13387/***/ "./entities/role.ts":
13388/*!**************************!*\
13389 !*** ./entities/role.ts ***!
13390 \**************************/
13391/*! exports provided: wrapRole, wrapRoleCollection */
13392/***/ (function(module, __webpack_exports__, __webpack_require__) {
13393
13394"use strict";
13395__webpack_require__.r(__webpack_exports__);
13396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapRole", function() { return wrapRole; });
13397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapRoleCollection", function() { return wrapRoleCollection; });
13398/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13399/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13400/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13401/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13402/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13403/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
13404
13405
13406
13407
13408
13409
13410function createRoleApi(http) {
13411 return {
13412 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
13413 http: http,
13414 entityPath: 'roles',
13415 wrapperMethod: wrapRole
13416 }),
13417 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
13418 http: http,
13419 entityPath: 'roles'
13420 })
13421 };
13422}
13423/**
13424 * @private
13425 * @param http - HTTP client instance
13426 * @param data - Raw role data
13427 * @return Wrapped role data
13428 */
13429
13430
13431function wrapRole(http, data) {
13432 var role = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13433 var roleWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(role, createRoleApi(http));
13434 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(roleWithMethods);
13435}
13436/**
13437 * @private
13438 */
13439
13440var wrapRoleCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapRole);
13441
13442/***/ }),
13443
13444/***/ "./entities/snapshot.ts":
13445/*!******************************!*\
13446 !*** ./entities/snapshot.ts ***!
13447 \******************************/
13448/*! exports provided: wrapSnapshot, wrapSnapshotCollection */
13449/***/ (function(module, __webpack_exports__, __webpack_require__) {
13450
13451"use strict";
13452__webpack_require__.r(__webpack_exports__);
13453/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapSnapshot", function() { return wrapSnapshot; });
13454/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapSnapshotCollection", function() { return wrapSnapshotCollection; });
13455/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13456/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13457/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13458/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13459/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13460
13461
13462
13463
13464
13465function createSnapshotApi() {
13466 return {
13467 /* In case the snapshot object evolve later */
13468 };
13469}
13470/**
13471 * @private
13472 * @param http - HTTP client instance
13473 * @param data - Raw snapshot data
13474 * @return Wrapped snapshot data
13475 */
13476
13477
13478function wrapSnapshot(_http, data) {
13479 var snapshot = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13480 var snapshotWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(snapshot, createSnapshotApi());
13481 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(snapshotWithMethods);
13482}
13483/**
13484 * @private
13485 * @param http - HTTP client instance
13486 * @param data - Raw snapshot collection data
13487 * @return Wrapped snapshot collection data
13488 */
13489
13490var wrapSnapshotCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSnapshot);
13491
13492/***/ }),
13493
13494/***/ "./entities/space-member.ts":
13495/*!**********************************!*\
13496 !*** ./entities/space-member.ts ***!
13497 \**********************************/
13498/*! exports provided: wrapSpaceMember, wrapSpaceMemberCollection */
13499/***/ (function(module, __webpack_exports__, __webpack_require__) {
13500
13501"use strict";
13502__webpack_require__.r(__webpack_exports__);
13503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapSpaceMember", function() { return wrapSpaceMember; });
13504/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapSpaceMemberCollection", function() { return wrapSpaceMemberCollection; });
13505/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13506/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13507/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13508/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13509
13510
13511
13512
13513/**
13514 * @private
13515 * @param http - HTTP client instance
13516 * @param data - Raw space member data
13517 * @return Wrapped space member data
13518 */
13519function wrapSpaceMember(http, data) {
13520 var spaceMember = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13521 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(spaceMember);
13522}
13523/**
13524 * @private
13525 */
13526
13527var wrapSpaceMemberCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["wrapCollection"])(wrapSpaceMember);
13528
13529/***/ }),
13530
13531/***/ "./entities/space-membership.ts":
13532/*!**************************************!*\
13533 !*** ./entities/space-membership.ts ***!
13534 \**************************************/
13535/*! exports provided: wrapSpaceMembership, wrapSpaceMembershipCollection */
13536/***/ (function(module, __webpack_exports__, __webpack_require__) {
13537
13538"use strict";
13539__webpack_require__.r(__webpack_exports__);
13540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapSpaceMembership", function() { return wrapSpaceMembership; });
13541/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapSpaceMembershipCollection", function() { return wrapSpaceMembershipCollection; });
13542/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13543/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13544/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13545/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13546/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13547/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
13548
13549
13550
13551
13552
13553
13554function createSpaceMembershipApi(http) {
13555 return {
13556 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
13557 http: http,
13558 entityPath: 'space_memberships',
13559 wrapperMethod: wrapSpaceMembership
13560 }),
13561 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
13562 http: http,
13563 entityPath: 'space_memberships'
13564 })
13565 };
13566}
13567/**
13568 * @private
13569 * @param http - HTTP client instance
13570 * @param data - Raw space membership data
13571 * @return Wrapped space membership data
13572 */
13573
13574
13575function wrapSpaceMembership(http, data) {
13576 var spaceMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13577 var spaceMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(spaceMembership, createSpaceMembershipApi(http));
13578 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(spaceMembershipWithMethods);
13579}
13580/**
13581 * @private
13582 */
13583
13584var wrapSpaceMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSpaceMembership);
13585
13586/***/ }),
13587
13588/***/ "./entities/space.ts":
13589/*!***************************!*\
13590 !*** ./entities/space.ts ***!
13591 \***************************/
13592/*! exports provided: wrapSpace, wrapSpaceCollection */
13593/***/ (function(module, __webpack_exports__, __webpack_require__) {
13594
13595"use strict";
13596__webpack_require__.r(__webpack_exports__);
13597/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapSpace", function() { return wrapSpace; });
13598/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapSpaceCollection", function() { return wrapSpaceCollection; });
13599/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13600/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13601/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13602/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13603/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13604/* harmony import */ var _create_space_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../create-space-api */ "./create-space-api.ts");
13605
13606
13607
13608
13609
13610
13611/**
13612 * This method creates the API for the given space with all the methods for
13613 * reading and creating other entities. It also passes down a clone of the
13614 * http client with a space id, so the base path for requests now has the
13615 * space id already set.
13616 * @private
13617 * @param http - HTTP client instance
13618 * @param data - API response for a Space
13619 * @return {Space}
13620 */
13621function wrapSpace(http, data) {
13622 var sdkHttp = http;
13623 var space = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13624 var _sdkHttp$httpClientPa = sdkHttp.httpClientParams,
13625 hostUpload = _sdkHttp$httpClientPa.hostUpload,
13626 defaultHostnameUpload = _sdkHttp$httpClientPa.defaultHostnameUpload;
13627 var spaceScopedHttpClient = sdkHttp.cloneWithNewParams({
13628 space: space.sys.id
13629 });
13630 var spaceScopedUploadClient = sdkHttp.cloneWithNewParams({
13631 space: space.sys.id,
13632 host: hostUpload || defaultHostnameUpload
13633 });
13634 var spaceApi = Object(_create_space_api__WEBPACK_IMPORTED_MODULE_4__["default"])({
13635 http: spaceScopedHttpClient,
13636 httpUpload: spaceScopedUploadClient
13637 });
13638 var enhancedSpace = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(space, spaceApi);
13639 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedSpace);
13640}
13641/**
13642 * This method wraps each space in a collection with the space API. See wrapSpace
13643 * above for more details.
13644 * @private
13645 */
13646
13647var wrapSpaceCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSpace);
13648
13649/***/ }),
13650
13651/***/ "./entities/team-membership.ts":
13652/*!*************************************!*\
13653 !*** ./entities/team-membership.ts ***!
13654 \*************************************/
13655/*! exports provided: wrapTeamMembership, wrapTeamMembershipCollection */
13656/***/ (function(module, __webpack_exports__, __webpack_require__) {
13657
13658"use strict";
13659__webpack_require__.r(__webpack_exports__);
13660/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapTeamMembership", function() { return wrapTeamMembership; });
13661/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapTeamMembershipCollection", function() { return wrapTeamMembershipCollection; });
13662/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13663/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13664/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13665/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13666/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
13667/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13668
13669
13670
13671
13672
13673
13674function createTeamMembershipApi(http) {
13675 return {
13676 update: function update() {
13677 var raw = this.toPlainObject();
13678 var teamId = raw.sys.team.sys.id;
13679 return http.put('teams/' + teamId + '/team_memberships/' + this.sys.id, raw, {
13680 headers: {
13681 'X-Contentful-Version': this.sys.version || 0
13682 }
13683 }).then(function (response) {
13684 return wrapTeamMembership(http, response.data);
13685 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
13686 },
13687 "delete": function _delete() {
13688 var raw = this.toPlainObject();
13689 var teamId = raw.sys.team.sys.id;
13690 return http["delete"]('teams/' + teamId + '/team_memberships/' + this.sys.id).then(function () {// do nothing
13691 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
13692 }
13693 };
13694}
13695/**
13696 * @private
13697 * @param http - HTTP client instance
13698 * @param data - Raw team membership data
13699 * @return Wrapped team membership data
13700 */
13701
13702
13703function wrapTeamMembership(http, data) {
13704 var teamMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13705 var teamMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(teamMembership, createTeamMembershipApi(http));
13706 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamMembershipWithMethods);
13707}
13708/**
13709 * @private
13710 */
13711
13712var wrapTeamMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapTeamMembership);
13713
13714/***/ }),
13715
13716/***/ "./entities/team-space-membership.ts":
13717/*!*******************************************!*\
13718 !*** ./entities/team-space-membership.ts ***!
13719 \*******************************************/
13720/*! exports provided: wrapTeamSpaceMembership, wrapTeamSpaceMembershipCollection */
13721/***/ (function(module, __webpack_exports__, __webpack_require__) {
13722
13723"use strict";
13724__webpack_require__.r(__webpack_exports__);
13725/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapTeamSpaceMembership", function() { return wrapTeamSpaceMembership; });
13726/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapTeamSpaceMembershipCollection", function() { return wrapTeamSpaceMembershipCollection; });
13727/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13728/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13729/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13730/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13731/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
13732/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
13733/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13734
13735
13736
13737
13738
13739
13740
13741function createTeamSpaceMembershipApi(http) {
13742 return {
13743 update: function update() {
13744 var raw = this.toPlainObject();
13745 var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
13746 delete data.sys;
13747 return http.put('team_space_memberships/' + this.sys.id, data, {
13748 headers: {
13749 'X-Contentful-Version': this.sys.version || 0,
13750 'x-contentful-team': this.sys.team.sys.id
13751 }
13752 }).then(function (response) {
13753 return wrapTeamSpaceMembership(http, response.data);
13754 }, _error_handler__WEBPACK_IMPORTED_MODULE_4__["default"]);
13755 },
13756 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
13757 http: http,
13758 entityPath: 'team_space_memberships'
13759 })
13760 };
13761}
13762/**
13763 * @private
13764 * @param http - HTTP client instance
13765 * @param data - Raw space membership data
13766 * @return Wrapped team space membership data
13767 */
13768
13769
13770function wrapTeamSpaceMembership(http, data) {
13771 var teamSpaceMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13772 var teamSpaceMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(teamSpaceMembership, createTeamSpaceMembershipApi(http));
13773 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamSpaceMembershipWithMethods);
13774}
13775/**
13776 * @private
13777 */
13778
13779var wrapTeamSpaceMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapTeamSpaceMembership);
13780
13781/***/ }),
13782
13783/***/ "./entities/team.ts":
13784/*!**************************!*\
13785 !*** ./entities/team.ts ***!
13786 \**************************/
13787/*! exports provided: wrapTeam, wrapTeamCollection */
13788/***/ (function(module, __webpack_exports__, __webpack_require__) {
13789
13790"use strict";
13791__webpack_require__.r(__webpack_exports__);
13792/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapTeam", function() { return wrapTeam; });
13793/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapTeamCollection", function() { return wrapTeamCollection; });
13794/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13795/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13796/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13797/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13798/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13799/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
13800
13801
13802
13803
13804
13805var entityPath = 'teams';
13806/**
13807 * @private
13808 */
13809
13810function createTeamApi(http) {
13811 return {
13812 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
13813 http: http,
13814 entityPath: entityPath,
13815 wrapperMethod: wrapTeam
13816 }),
13817 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
13818 http: http,
13819 entityPath: entityPath
13820 })
13821 };
13822}
13823/**
13824 * @private
13825 * @param http - HTTP client instance
13826 * @param data - Raw team data
13827 * @return Wrapped team data
13828 */
13829
13830
13831function wrapTeam(http, data) {
13832 var team = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13833 var teamWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(team, createTeamApi(http));
13834 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamWithMethods);
13835}
13836/**
13837 * @private
13838 */
13839
13840var wrapTeamCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapTeam);
13841
13842/***/ }),
13843
13844/***/ "./entities/ui-extension.ts":
13845/*!**********************************!*\
13846 !*** ./entities/ui-extension.ts ***!
13847 \**********************************/
13848/*! exports provided: wrapUiExtension, wrapUiExtensionCollection */
13849/***/ (function(module, __webpack_exports__, __webpack_require__) {
13850
13851"use strict";
13852__webpack_require__.r(__webpack_exports__);
13853/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapUiExtension", function() { return wrapUiExtension; });
13854/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapUiExtensionCollection", function() { return wrapUiExtensionCollection; });
13855/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13856/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13857/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13858/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13859/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
13860/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13861
13862
13863
13864
13865
13866
13867function createUiExtensionApi(http) {
13868 return {
13869 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
13870 http: http,
13871 entityPath: 'extensions',
13872 wrapperMethod: wrapUiExtension
13873 }),
13874 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
13875 http: http,
13876 entityPath: 'extensions'
13877 })
13878 };
13879}
13880/**
13881 * @private
13882 * @param http - HTTP client instance
13883 * @param data - Raw UI Extension data
13884 * @return Wrapped UI Extension data
13885 */
13886
13887
13888function wrapUiExtension(http, data) {
13889 var uiExtension = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13890 var uiExtensionWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(uiExtension, createUiExtensionApi(http));
13891 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(uiExtensionWithMethods);
13892}
13893/**
13894 * @private
13895 */
13896
13897var wrapUiExtensionCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapUiExtension);
13898
13899/***/ }),
13900
13901/***/ "./entities/upload.ts":
13902/*!****************************!*\
13903 !*** ./entities/upload.ts ***!
13904 \****************************/
13905/*! exports provided: wrapUpload */
13906/***/ (function(module, __webpack_exports__, __webpack_require__) {
13907
13908"use strict";
13909__webpack_require__.r(__webpack_exports__);
13910/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapUpload", function() { return wrapUpload; });
13911/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13912/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13913/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13914/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13915/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
13916
13917
13918
13919
13920
13921function createUploadApi(http) {
13922 return {
13923 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
13924 http: http,
13925 entityPath: 'uploads'
13926 })
13927 };
13928}
13929/**
13930 * @private
13931 * @param {Object} http - HTTP client instance
13932 * @param {Object} data - Raw upload data
13933 * @return {Upload} Wrapped upload data
13934 */
13935
13936
13937function wrapUpload(http, data) {
13938 var upload = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13939 var uploadWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(upload, createUploadApi(http));
13940 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(uploadWithMethods);
13941}
13942
13943/***/ }),
13944
13945/***/ "./entities/usage.ts":
13946/*!***************************!*\
13947 !*** ./entities/usage.ts ***!
13948 \***************************/
13949/*! exports provided: wrapUsage, wrapUsageCollection */
13950/***/ (function(module, __webpack_exports__, __webpack_require__) {
13951
13952"use strict";
13953__webpack_require__.r(__webpack_exports__);
13954/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapUsage", function() { return wrapUsage; });
13955/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapUsageCollection", function() { return wrapUsageCollection; });
13956/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13957/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
13958/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13959/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
13960/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
13961
13962
13963
13964
13965
13966/**
13967 * @private
13968 * @param http - HTTP client instance
13969 * @param data - Raw data
13970 * @return Normalized usage
13971 */
13972function wrapUsage(http, data) {
13973 var usage = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
13974 var usageWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(usage, {});
13975 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(usageWithMethods);
13976}
13977/**
13978 * @private
13979 */
13980
13981var wrapUsageCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapUsage);
13982
13983/***/ }),
13984
13985/***/ "./entities/user.ts":
13986/*!**************************!*\
13987 !*** ./entities/user.ts ***!
13988 \**************************/
13989/*! exports provided: wrapUser, wrapUserCollection */
13990/***/ (function(module, __webpack_exports__, __webpack_require__) {
13991
13992"use strict";
13993__webpack_require__.r(__webpack_exports__);
13994/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapUser", function() { return wrapUser; });
13995/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapUserCollection", function() { return wrapUserCollection; });
13996/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
13997/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
13998/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__);
13999/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
14000/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
14001
14002
14003
14004
14005
14006/**
14007 * @private
14008 * @param http - HTTP client instance
14009 * @param data - Raw data
14010 * @return Normalized user
14011 */
14012function wrapUser(http, data) {
14013 var user = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(data));
14014 var userWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(user, {});
14015 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["freezeSys"])(userWithMethods);
14016}
14017/**
14018 * @private
14019 * @param http - HTTP client instance
14020 * @param data - Raw data collection
14021 * @return Normalized user collection
14022 */
14023
14024var wrapUserCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapUser);
14025
14026/***/ }),
14027
14028/***/ "./entities/webhook.ts":
14029/*!*****************************!*\
14030 !*** ./entities/webhook.ts ***!
14031 \*****************************/
14032/*! exports provided: wrapWebhook, wrapWebhookCollection */
14033/***/ (function(module, __webpack_exports__, __webpack_require__) {
14034
14035"use strict";
14036__webpack_require__.r(__webpack_exports__);
14037/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapWebhook", function() { return wrapWebhook; });
14038/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapWebhookCollection", function() { return wrapWebhookCollection; });
14039/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
14040/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
14041/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
14042/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
14043/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../error-handler */ "./error-handler.ts");
14044/* harmony import */ var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../instance-actions */ "./instance-actions.ts");
14045/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
14046
14047
14048
14049
14050
14051
14052var entityPath = 'webhook_definitions';
14053
14054function createWebhookApi(http) {
14055 return {
14056 update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
14057 http: http,
14058 entityPath: entityPath,
14059 wrapperMethod: wrapWebhook
14060 }),
14061 "delete": Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
14062 http: http,
14063 entityPath: entityPath
14064 }),
14065 getCalls: function getCalls() {
14066 return http.get('webhooks/' + this.sys.id + '/calls').then(function (response) {
14067 return response.data;
14068 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
14069 },
14070 getCall: function getCall(id) {
14071 return http.get('webhooks/' + this.sys.id + '/calls/' + id).then(function (response) {
14072 return response.data;
14073 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
14074 },
14075 getHealth: function getHealth() {
14076 return http.get('webhooks/' + this.sys.id + '/health').then(function (response) {
14077 return response.data;
14078 }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
14079 }
14080 };
14081}
14082/**
14083 * @private
14084 * @param http - HTTP client instance
14085 * @param data - Raw webhook data
14086 * @return Wrapped webhook data
14087 */
14088
14089
14090function wrapWebhook(http, data) {
14091 var webhook = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
14092 var webhookWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(webhook, createWebhookApi(http));
14093 return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(webhookWithMethods);
14094}
14095/**
14096 * @private
14097 */
14098
14099var wrapWebhookCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapWebhook);
14100
14101/***/ }),
14102
14103/***/ "./error-handler.ts":
14104/*!**************************!*\
14105 !*** ./error-handler.ts ***!
14106 \**************************/
14107/*! exports provided: default */
14108/***/ (function(module, __webpack_exports__, __webpack_require__) {
14109
14110"use strict";
14111__webpack_require__.r(__webpack_exports__);
14112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return errorHandler; });
14113/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../node_modules/lodash/isPlainObject.js");
14114/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
14115
14116
14117/**
14118 * Handles errors received from the server. Parses the error into a more useful
14119 * format, places it in an exception and throws it.
14120 * See https://www.contentful.com/developers/docs/references/errors/
14121 * for more details on the data received on the errorResponse.data property
14122 * and the expected error codes.
14123 * @private
14124 */
14125function errorHandler(errorResponse) {
14126 var config = errorResponse.config,
14127 response = errorResponse.response;
14128 var errorName; // Obscure the Management token
14129
14130 if (config.headers && config.headers['Authorization']) {
14131 var token = "...".concat(config.headers['Authorization'].substr(-5));
14132 config.headers['Authorization'] = "Bearer ".concat(token);
14133 }
14134
14135 if (!lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(response) || !lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(config)) {
14136 throw errorResponse;
14137 }
14138
14139 var data = response === null || response === void 0 ? void 0 : response.data;
14140 var errorData = {
14141 status: response === null || response === void 0 ? void 0 : response.status,
14142 statusText: response === null || response === void 0 ? void 0 : response.statusText,
14143 message: '',
14144 details: {}
14145 };
14146
14147 if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(config)) {
14148 errorData.request = {
14149 url: config.url,
14150 headers: config.headers,
14151 method: config.method,
14152 payloadData: config.data
14153 };
14154 }
14155
14156 if (data && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(data)) {
14157 if ('requestId' in data) {
14158 errorData.requestId = data.requestId || 'UNKNOWN';
14159 }
14160
14161 if ('message' in data) {
14162 errorData.message = data.message || '';
14163 }
14164
14165 if ('details' in data) {
14166 errorData.details = data.details || {};
14167 }
14168
14169 if ('sys' in data) {
14170 if ('id' in data.sys) {
14171 errorName = data.sys.id;
14172 }
14173 }
14174 }
14175
14176 var error = new Error();
14177 error.name = errorName && errorName !== 'Unknown' ? errorName : "".concat(response === null || response === void 0 ? void 0 : response.status, " ").concat(response === null || response === void 0 ? void 0 : response.statusText);
14178 error.message = JSON.stringify(errorData, null, ' ');
14179 throw error;
14180}
14181
14182/***/ }),
14183
14184/***/ "./instance-actions.ts":
14185/*!*****************************!*\
14186 !*** ./instance-actions.ts ***!
14187 \*****************************/
14188/*! exports provided: createUpdateEntity, createDeleteEntity, createPublishEntity, createUnpublishEntity, createArchiveEntity, createUnarchiveEntity, createPublishedChecker, createUpdatedChecker, createDraftChecker, createArchivedChecker */
14189/***/ (function(module, __webpack_exports__, __webpack_require__) {
14190
14191"use strict";
14192__webpack_require__.r(__webpack_exports__);
14193/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createUpdateEntity", function() { return createUpdateEntity; });
14194/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDeleteEntity", function() { return createDeleteEntity; });
14195/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPublishEntity", function() { return createPublishEntity; });
14196/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createUnpublishEntity", function() { return createUnpublishEntity; });
14197/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createArchiveEntity", function() { return createArchiveEntity; });
14198/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createUnarchiveEntity", function() { return createUnarchiveEntity; });
14199/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPublishedChecker", function() { return createPublishedChecker; });
14200/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createUpdatedChecker", function() { return createUpdatedChecker; });
14201/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDraftChecker", function() { return createDraftChecker; });
14202/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createArchivedChecker", function() { return createArchivedChecker; });
14203/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/cloneDeep */ "../node_modules/lodash/cloneDeep.js");
14204/* harmony import */ var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
14205/* harmony import */ var _error_handler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./error-handler */ "./error-handler.ts");
14206function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
14207
14208function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
14209
14210function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14211
14212
14213
14214
14215/**
14216 * @private
14217 */
14218function createUpdateEntity(_ref) {
14219 var http = _ref.http,
14220 entityPath = _ref.entityPath,
14221 wrapperMethod = _ref.wrapperMethod,
14222 headers = _ref.headers;
14223 return function () {
14224 var self = this;
14225 var raw = self.toPlainObject();
14226 var data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
14227 delete data.sys;
14228 return http.put(entityPath + '/' + self.sys.id, data, {
14229 headers: _objectSpread({
14230 'X-Contentful-Version': self.sys.version || 0
14231 }, headers)
14232 }).then(function (response) {
14233 return wrapperMethod(http, response.data);
14234 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
14235 };
14236}
14237/**
14238 * @private
14239 */
14240
14241function createDeleteEntity(_ref2) {
14242 var http = _ref2.http,
14243 entityPath = _ref2.entityPath;
14244 return function () {
14245 var self = this;
14246 return http["delete"](entityPath + '/' + self.sys.id).then(function () {// do nothing
14247 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
14248 };
14249}
14250/**
14251 * @private
14252 */
14253
14254function createPublishEntity(_ref3) {
14255 var http = _ref3.http,
14256 entityPath = _ref3.entityPath,
14257 wrapperMethod = _ref3.wrapperMethod;
14258 return function () {
14259 var self = this;
14260 return http.put(entityPath + '/' + self.sys.id + '/published', null, {
14261 headers: {
14262 'X-Contentful-Version': self.sys.version
14263 }
14264 }).then(function (response) {
14265 return wrapperMethod(http, response.data);
14266 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
14267 };
14268}
14269/**
14270 * @private
14271 */
14272
14273function createUnpublishEntity(_ref4) {
14274 var http = _ref4.http,
14275 entityPath = _ref4.entityPath,
14276 wrapperMethod = _ref4.wrapperMethod;
14277 return function () {
14278 var self = this;
14279 return http["delete"](entityPath + '/' + self.sys.id + '/published').then(function (response) {
14280 return wrapperMethod(http, response.data);
14281 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
14282 };
14283}
14284/**
14285 * @private
14286 */
14287
14288function createArchiveEntity(_ref5) {
14289 var http = _ref5.http,
14290 entityPath = _ref5.entityPath,
14291 wrapperMethod = _ref5.wrapperMethod;
14292 return function () {
14293 var self = this;
14294 return http.put(entityPath + '/' + self.sys.id + '/archived').then(function (response) {
14295 return wrapperMethod(http, response.data);
14296 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
14297 };
14298}
14299/**
14300 * @private
14301 */
14302
14303function createUnarchiveEntity(_ref6) {
14304 var http = _ref6.http,
14305 entityPath = _ref6.entityPath,
14306 wrapperMethod = _ref6.wrapperMethod;
14307 return function () {
14308 var self = this;
14309 return http["delete"](entityPath + '/' + self.sys.id + '/archived').then(function (response) {
14310 return wrapperMethod(http, response.data);
14311 }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
14312 };
14313}
14314/**
14315 * @private
14316 */
14317
14318function createPublishedChecker() {
14319 return function () {
14320 var self = this;
14321 return !!self.sys.publishedVersion;
14322 };
14323}
14324/**
14325 * @private
14326 */
14327
14328function createUpdatedChecker() {
14329 return function () {
14330 var self = this; // The act of publishing an entity increases its version by 1, so any entry which has
14331 // 2 versions higher or more than the publishedVersion has unpublished changes.
14332
14333 return !!(self.sys.publishedVersion && self.sys.version > self.sys.publishedVersion + 1);
14334 };
14335}
14336/**
14337 * @private
14338 */
14339
14340function createDraftChecker() {
14341 return function () {
14342 var self = this;
14343 return !self.sys.publishedVersion;
14344 };
14345}
14346/**
14347 * @private
14348 */
14349
14350function createArchivedChecker() {
14351 return function () {
14352 var self = this;
14353 return !!self.sys.archivedVersion;
14354 };
14355}
14356
14357/***/ }),
14358
14359/***/ 0:
14360/*!**********************************************************************************************************!*\
14361 !*** multi core-js/fn/promise core-js/fn/object/assign core-js/fn/array/from ./contentful-management.ts ***!
14362 \**********************************************************************************************************/
14363/*! no static exports found */
14364/***/ (function(module, exports, __webpack_require__) {
14365
14366__webpack_require__(/*! core-js/fn/promise */"../node_modules/core-js/fn/promise.js");
14367__webpack_require__(/*! core-js/fn/object/assign */"../node_modules/core-js/fn/object/assign.js");
14368__webpack_require__(/*! core-js/fn/array/from */"../node_modules/core-js/fn/array/from.js");
14369module.exports = __webpack_require__(/*! ./contentful-management.ts */"./contentful-management.ts");
14370
14371
14372/***/ }),
14373
14374/***/ 1:
14375/*!********************!*\
14376 !*** os (ignored) ***!
14377 \********************/
14378/*! no static exports found */
14379/***/ (function(module, exports) {
14380
14381/* (ignored) */
14382
14383/***/ })
14384
14385/******/ });
14386});
14387//# sourceMappingURL=contentful-management.legacy.js.map
\No newline at end of file