contentful-management 10.0.0 → 10.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,9 +124,9 @@ var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "../node_modules
124
124
  var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "../node_modules/axios/lib/core/buildFullPath.js");
125
125
  var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "../node_modules/axios/lib/helpers/parseHeaders.js");
126
126
  var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "../node_modules/axios/lib/helpers/isURLSameOrigin.js");
127
- var createError = __webpack_require__(/*! ../core/createError */ "../node_modules/axios/lib/core/createError.js");
128
127
  var transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ "../node_modules/axios/lib/defaults/transitional.js");
129
- var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
128
+ var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "../node_modules/axios/lib/core/AxiosError.js");
129
+ var CanceledError = __webpack_require__(/*! ../cancel/CanceledError */ "../node_modules/axios/lib/cancel/CanceledError.js");
130
130
 
131
131
  module.exports = function xhrAdapter(config) {
132
132
  return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -144,10 +144,6 @@ module.exports = function xhrAdapter(config) {
144
144
  }
145
145
  }
146
146
 
147
- if (utils.isFormData(requestData)) {
148
- delete requestHeaders['Content-Type']; // Let the browser set it
149
- }
150
-
151
147
  var request = new XMLHttpRequest();
152
148
 
153
149
  // HTTP basic authentication
@@ -158,6 +154,7 @@ module.exports = function xhrAdapter(config) {
158
154
  }
159
155
 
160
156
  var fullPath = buildFullPath(config.baseURL, config.url);
157
+
161
158
  request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
162
159
 
163
160
  // Set the request timeout in MS
@@ -221,7 +218,7 @@ module.exports = function xhrAdapter(config) {
221
218
  return;
222
219
  }
223
220
 
224
- reject(createError('Request aborted', config, 'ECONNABORTED', request));
221
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
225
222
 
226
223
  // Clean up request
227
224
  request = null;
@@ -231,7 +228,7 @@ module.exports = function xhrAdapter(config) {
231
228
  request.onerror = function handleError() {
232
229
  // Real errors are hidden from us by the browser
233
230
  // onerror should only fire if it's a network error
234
- reject(createError('Network Error', config, null, request));
231
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, request));
235
232
 
236
233
  // Clean up request
237
234
  request = null;
@@ -244,10 +241,10 @@ module.exports = function xhrAdapter(config) {
244
241
  if (config.timeoutErrorMessage) {
245
242
  timeoutErrorMessage = config.timeoutErrorMessage;
246
243
  }
247
- reject(createError(
244
+ reject(new AxiosError(
248
245
  timeoutErrorMessage,
246
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
249
247
  config,
250
- transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
251
248
  request));
252
249
 
253
250
  // Clean up request
@@ -308,7 +305,7 @@ module.exports = function xhrAdapter(config) {
308
305
  if (!request) {
309
306
  return;
310
307
  }
311
- reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);
308
+ reject(!cancel || (cancel && cancel.type) ? new CanceledError() : cancel);
312
309
  request.abort();
313
310
  request = null;
314
311
  };
@@ -323,6 +320,15 @@ module.exports = function xhrAdapter(config) {
323
320
  requestData = null;
324
321
  }
325
322
 
323
+ var tokens = fullPath.split(':', 2);
324
+ var protocol = tokens.length > 1 && tokens[0];
325
+
326
+ if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {
327
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
328
+ return;
329
+ }
330
+
331
+
326
332
  // Send the request
327
333
  request.send(requestData);
328
334
  });
@@ -378,10 +384,17 @@ var axios = createInstance(defaults);
378
384
  axios.Axios = Axios;
379
385
 
380
386
  // Expose Cancel & CancelToken
381
- axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
387
+ axios.CanceledError = __webpack_require__(/*! ./cancel/CanceledError */ "../node_modules/axios/lib/cancel/CanceledError.js");
382
388
  axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "../node_modules/axios/lib/cancel/CancelToken.js");
383
389
  axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
384
390
  axios.VERSION = __webpack_require__(/*! ./env/data */ "../node_modules/axios/lib/env/data.js").version;
391
+ axios.toFormData = __webpack_require__(/*! ./helpers/toFormData */ "../node_modules/axios/lib/helpers/toFormData.js");
392
+
393
+ // Expose AxiosError class
394
+ axios.AxiosError = __webpack_require__(/*! ../lib/core/AxiosError */ "../node_modules/axios/lib/core/AxiosError.js");
395
+
396
+ // alias for CanceledError for backward compatibility
397
+ axios.Cancel = axios.CanceledError;
385
398
 
386
399
  // Expose all/spread
387
400
  axios.all = function all(promises) {
@@ -398,37 +411,6 @@ module.exports = axios;
398
411
  module.exports.default = axios;
399
412
 
400
413
 
401
- /***/ }),
402
-
403
- /***/ "../node_modules/axios/lib/cancel/Cancel.js":
404
- /*!**************************************************!*\
405
- !*** ../node_modules/axios/lib/cancel/Cancel.js ***!
406
- \**************************************************/
407
- /*! no static exports found */
408
- /***/ (function(module, exports, __webpack_require__) {
409
-
410
- "use strict";
411
-
412
-
413
- /**
414
- * A `Cancel` is an object that is thrown when an operation is canceled.
415
- *
416
- * @class
417
- * @param {string=} message The message.
418
- */
419
- function Cancel(message) {
420
- this.message = message;
421
- }
422
-
423
- Cancel.prototype.toString = function toString() {
424
- return 'Cancel' + (this.message ? ': ' + this.message : '');
425
- };
426
-
427
- Cancel.prototype.__CANCEL__ = true;
428
-
429
- module.exports = Cancel;
430
-
431
-
432
414
  /***/ }),
433
415
 
434
416
  /***/ "../node_modules/axios/lib/cancel/CancelToken.js":
@@ -441,7 +423,7 @@ module.exports = Cancel;
441
423
  "use strict";
442
424
 
443
425
 
444
- var Cancel = __webpack_require__(/*! ./Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
426
+ var CanceledError = __webpack_require__(/*! ./CanceledError */ "../node_modules/axios/lib/cancel/CanceledError.js");
445
427
 
446
428
  /**
447
429
  * A `CancelToken` is an object that can be used to request cancellation of an operation.
@@ -497,13 +479,13 @@ function CancelToken(executor) {
497
479
  return;
498
480
  }
499
481
 
500
- token.reason = new Cancel(message);
482
+ token.reason = new CanceledError(message);
501
483
  resolvePromise(token.reason);
502
484
  });
503
485
  }
504
486
 
505
487
  /**
506
- * Throws a `Cancel` if cancellation has been requested.
488
+ * Throws a `CanceledError` if cancellation has been requested.
507
489
  */
508
490
  CancelToken.prototype.throwIfRequested = function throwIfRequested() {
509
491
  if (this.reason) {
@@ -560,6 +542,40 @@ CancelToken.source = function source() {
560
542
  module.exports = CancelToken;
561
543
 
562
544
 
545
+ /***/ }),
546
+
547
+ /***/ "../node_modules/axios/lib/cancel/CanceledError.js":
548
+ /*!*********************************************************!*\
549
+ !*** ../node_modules/axios/lib/cancel/CanceledError.js ***!
550
+ \*********************************************************/
551
+ /*! no static exports found */
552
+ /***/ (function(module, exports, __webpack_require__) {
553
+
554
+ "use strict";
555
+
556
+
557
+ var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "../node_modules/axios/lib/core/AxiosError.js");
558
+ var utils = __webpack_require__(/*! ../utils */ "../node_modules/axios/lib/utils.js");
559
+
560
+ /**
561
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
562
+ *
563
+ * @class
564
+ * @param {string=} message The message.
565
+ */
566
+ function CanceledError(message) {
567
+ // eslint-disable-next-line no-eq-null,eqeqeq
568
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED);
569
+ this.name = 'CanceledError';
570
+ }
571
+
572
+ utils.inherits(CanceledError, AxiosError, {
573
+ __CANCEL__: true
574
+ });
575
+
576
+ module.exports = CanceledError;
577
+
578
+
563
579
  /***/ }),
564
580
 
565
581
  /***/ "../node_modules/axios/lib/cancel/isCancel.js":
@@ -594,6 +610,7 @@ var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "../node_modules/a
594
610
  var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "../node_modules/axios/lib/core/InterceptorManager.js");
595
611
  var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "../node_modules/axios/lib/core/dispatchRequest.js");
596
612
  var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "../node_modules/axios/lib/core/mergeConfig.js");
613
+ var buildFullPath = __webpack_require__(/*! ./buildFullPath */ "../node_modules/axios/lib/core/buildFullPath.js");
597
614
  var validator = __webpack_require__(/*! ../helpers/validator */ "../node_modules/axios/lib/helpers/validator.js");
598
615
 
599
616
  var validators = validator.validators;
@@ -708,7 +725,8 @@ Axios.prototype.request = function request(configOrUrl, config) {
708
725
 
709
726
  Axios.prototype.getUri = function getUri(config) {
710
727
  config = mergeConfig(this.defaults, config);
711
- return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
728
+ var fullPath = buildFullPath(config.baseURL, config.url);
729
+ return buildURL(fullPath, config.params, config.paramsSerializer);
712
730
  };
713
731
 
714
732
  // Provide aliases for supported request methods
@@ -725,18 +743,126 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
725
743
 
726
744
  utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
727
745
  /*eslint func-names:0*/
728
- Axios.prototype[method] = function(url, data, config) {
729
- return this.request(mergeConfig(config || {}, {
730
- method: method,
731
- url: url,
732
- data: data
733
- }));
734
- };
746
+
747
+ function generateHTTPMethod(isForm) {
748
+ return function httpMethod(url, data, config) {
749
+ return this.request(mergeConfig(config || {}, {
750
+ method: method,
751
+ headers: isForm ? {
752
+ 'Content-Type': 'multipart/form-data'
753
+ } : {},
754
+ url: url,
755
+ data: data
756
+ }));
757
+ };
758
+ }
759
+
760
+ Axios.prototype[method] = generateHTTPMethod();
761
+
762
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
735
763
  });
736
764
 
737
765
  module.exports = Axios;
738
766
 
739
767
 
768
+ /***/ }),
769
+
770
+ /***/ "../node_modules/axios/lib/core/AxiosError.js":
771
+ /*!****************************************************!*\
772
+ !*** ../node_modules/axios/lib/core/AxiosError.js ***!
773
+ \****************************************************/
774
+ /*! no static exports found */
775
+ /***/ (function(module, exports, __webpack_require__) {
776
+
777
+ "use strict";
778
+
779
+
780
+ var utils = __webpack_require__(/*! ../utils */ "../node_modules/axios/lib/utils.js");
781
+
782
+ /**
783
+ * Create an Error with the specified message, config, error code, request and response.
784
+ *
785
+ * @param {string} message The error message.
786
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
787
+ * @param {Object} [config] The config.
788
+ * @param {Object} [request] The request.
789
+ * @param {Object} [response] The response.
790
+ * @returns {Error} The created error.
791
+ */
792
+ function AxiosError(message, code, config, request, response) {
793
+ Error.call(this);
794
+ this.message = message;
795
+ this.name = 'AxiosError';
796
+ code && (this.code = code);
797
+ config && (this.config = config);
798
+ request && (this.request = request);
799
+ response && (this.response = response);
800
+ }
801
+
802
+ utils.inherits(AxiosError, Error, {
803
+ toJSON: function toJSON() {
804
+ return {
805
+ // Standard
806
+ message: this.message,
807
+ name: this.name,
808
+ // Microsoft
809
+ description: this.description,
810
+ number: this.number,
811
+ // Mozilla
812
+ fileName: this.fileName,
813
+ lineNumber: this.lineNumber,
814
+ columnNumber: this.columnNumber,
815
+ stack: this.stack,
816
+ // Axios
817
+ config: this.config,
818
+ code: this.code,
819
+ status: this.response && this.response.status ? this.response.status : null
820
+ };
821
+ }
822
+ });
823
+
824
+ var prototype = AxiosError.prototype;
825
+ var descriptors = {};
826
+
827
+ [
828
+ 'ERR_BAD_OPTION_VALUE',
829
+ 'ERR_BAD_OPTION',
830
+ 'ECONNABORTED',
831
+ 'ETIMEDOUT',
832
+ 'ERR_NETWORK',
833
+ 'ERR_FR_TOO_MANY_REDIRECTS',
834
+ 'ERR_DEPRECATED',
835
+ 'ERR_BAD_RESPONSE',
836
+ 'ERR_BAD_REQUEST',
837
+ 'ERR_CANCELED'
838
+ // eslint-disable-next-line func-names
839
+ ].forEach(function(code) {
840
+ descriptors[code] = {value: code};
841
+ });
842
+
843
+ Object.defineProperties(AxiosError, descriptors);
844
+ Object.defineProperty(prototype, 'isAxiosError', {value: true});
845
+
846
+ // eslint-disable-next-line func-names
847
+ AxiosError.from = function(error, code, config, request, response, customProps) {
848
+ var axiosError = Object.create(prototype);
849
+
850
+ utils.toFlatObject(error, axiosError, function filter(obj) {
851
+ return obj !== Error.prototype;
852
+ });
853
+
854
+ AxiosError.call(axiosError, error.message, code, config, request, response);
855
+
856
+ axiosError.name = error.name;
857
+
858
+ customProps && Object.assign(axiosError, customProps);
859
+
860
+ return axiosError;
861
+ };
862
+
863
+ module.exports = AxiosError;
864
+
865
+
740
866
  /***/ }),
741
867
 
742
868
  /***/ "../node_modules/axios/lib/core/InterceptorManager.js":
@@ -835,36 +961,6 @@ module.exports = function buildFullPath(baseURL, requestedURL) {
835
961
  };
836
962
 
837
963
 
838
- /***/ }),
839
-
840
- /***/ "../node_modules/axios/lib/core/createError.js":
841
- /*!*****************************************************!*\
842
- !*** ../node_modules/axios/lib/core/createError.js ***!
843
- \*****************************************************/
844
- /*! no static exports found */
845
- /***/ (function(module, exports, __webpack_require__) {
846
-
847
- "use strict";
848
-
849
-
850
- var enhanceError = __webpack_require__(/*! ./enhanceError */ "../node_modules/axios/lib/core/enhanceError.js");
851
-
852
- /**
853
- * Create an Error with the specified message, config, error code, request and response.
854
- *
855
- * @param {string} message The error message.
856
- * @param {Object} config The config.
857
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
858
- * @param {Object} [request] The request.
859
- * @param {Object} [response] The response.
860
- * @returns {Error} The created error.
861
- */
862
- module.exports = function createError(message, config, code, request, response) {
863
- var error = new Error(message);
864
- return enhanceError(error, config, code, request, response);
865
- };
866
-
867
-
868
964
  /***/ }),
869
965
 
870
966
  /***/ "../node_modules/axios/lib/core/dispatchRequest.js":
@@ -881,10 +977,10 @@ var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/uti
881
977
  var transformData = __webpack_require__(/*! ./transformData */ "../node_modules/axios/lib/core/transformData.js");
882
978
  var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
883
979
  var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults/index.js");
884
- var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
980
+ var CanceledError = __webpack_require__(/*! ../cancel/CanceledError */ "../node_modules/axios/lib/cancel/CanceledError.js");
885
981
 
886
982
  /**
887
- * Throws a `Cancel` if cancellation has been requested.
983
+ * Throws a `CanceledError` if cancellation has been requested.
888
984
  */
889
985
  function throwIfCancellationRequested(config) {
890
986
  if (config.cancelToken) {
@@ -892,7 +988,7 @@ function throwIfCancellationRequested(config) {
892
988
  }
893
989
 
894
990
  if (config.signal && config.signal.aborted) {
895
- throw new Cancel('canceled');
991
+ throw new CanceledError();
896
992
  }
897
993
  }
898
994
 
@@ -964,61 +1060,6 @@ module.exports = function dispatchRequest(config) {
964
1060
  };
965
1061
 
966
1062
 
967
- /***/ }),
968
-
969
- /***/ "../node_modules/axios/lib/core/enhanceError.js":
970
- /*!******************************************************!*\
971
- !*** ../node_modules/axios/lib/core/enhanceError.js ***!
972
- \******************************************************/
973
- /*! no static exports found */
974
- /***/ (function(module, exports, __webpack_require__) {
975
-
976
- "use strict";
977
-
978
-
979
- /**
980
- * Update an Error with the specified config, error code, and response.
981
- *
982
- * @param {Error} error The error to update.
983
- * @param {Object} config The config.
984
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
985
- * @param {Object} [request] The request.
986
- * @param {Object} [response] The response.
987
- * @returns {Error} The error.
988
- */
989
- module.exports = function enhanceError(error, config, code, request, response) {
990
- error.config = config;
991
- if (code) {
992
- error.code = code;
993
- }
994
-
995
- error.request = request;
996
- error.response = response;
997
- error.isAxiosError = true;
998
-
999
- error.toJSON = function toJSON() {
1000
- return {
1001
- // Standard
1002
- message: this.message,
1003
- name: this.name,
1004
- // Microsoft
1005
- description: this.description,
1006
- number: this.number,
1007
- // Mozilla
1008
- fileName: this.fileName,
1009
- lineNumber: this.lineNumber,
1010
- columnNumber: this.columnNumber,
1011
- stack: this.stack,
1012
- // Axios
1013
- config: this.config,
1014
- code: this.code,
1015
- status: this.response && this.response.status ? this.response.status : null
1016
- };
1017
- };
1018
- return error;
1019
- };
1020
-
1021
-
1022
1063
  /***/ }),
1023
1064
 
1024
1065
  /***/ "../node_modules/axios/lib/core/mergeConfig.js":
@@ -1111,6 +1152,7 @@ module.exports = function mergeConfig(config1, config2) {
1111
1152
  'decompress': defaultToConfig2,
1112
1153
  'maxContentLength': defaultToConfig2,
1113
1154
  'maxBodyLength': defaultToConfig2,
1155
+ 'beforeRedirect': defaultToConfig2,
1114
1156
  'transport': defaultToConfig2,
1115
1157
  'httpAgent': defaultToConfig2,
1116
1158
  'httpsAgent': defaultToConfig2,
@@ -1142,7 +1184,7 @@ module.exports = function mergeConfig(config1, config2) {
1142
1184
  "use strict";
1143
1185
 
1144
1186
 
1145
- var createError = __webpack_require__(/*! ./createError */ "../node_modules/axios/lib/core/createError.js");
1187
+ var AxiosError = __webpack_require__(/*! ./AxiosError */ "../node_modules/axios/lib/core/AxiosError.js");
1146
1188
 
1147
1189
  /**
1148
1190
  * Resolve or reject a Promise based on response status.
@@ -1156,10 +1198,10 @@ module.exports = function settle(resolve, reject, response) {
1156
1198
  if (!response.status || !validateStatus || validateStatus(response.status)) {
1157
1199
  resolve(response);
1158
1200
  } else {
1159
- reject(createError(
1201
+ reject(new AxiosError(
1160
1202
  'Request failed with status code ' + response.status,
1203
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
1161
1204
  response.config,
1162
- null,
1163
1205
  response.request,
1164
1206
  response
1165
1207
  ));
@@ -1215,8 +1257,9 @@ module.exports = function transformData(data, headers, fns) {
1215
1257
 
1216
1258
  var utils = __webpack_require__(/*! ../utils */ "../node_modules/axios/lib/utils.js");
1217
1259
  var normalizeHeaderName = __webpack_require__(/*! ../helpers/normalizeHeaderName */ "../node_modules/axios/lib/helpers/normalizeHeaderName.js");
1218
- var enhanceError = __webpack_require__(/*! ../core/enhanceError */ "../node_modules/axios/lib/core/enhanceError.js");
1260
+ var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "../node_modules/axios/lib/core/AxiosError.js");
1219
1261
  var transitionalDefaults = __webpack_require__(/*! ./transitional */ "../node_modules/axios/lib/defaults/transitional.js");
1262
+ var toFormData = __webpack_require__(/*! ../helpers/toFormData */ "../node_modules/axios/lib/helpers/toFormData.js");
1220
1263
 
1221
1264
  var DEFAULT_CONTENT_TYPE = {
1222
1265
  'Content-Type': 'application/x-www-form-urlencoded'
@@ -1281,10 +1324,20 @@ var defaults = {
1281
1324
  setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
1282
1325
  return data.toString();
1283
1326
  }
1284
- if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
1327
+
1328
+ var isObjectPayload = utils.isObject(data);
1329
+ var contentType = headers && headers['Content-Type'];
1330
+
1331
+ var isFileList;
1332
+
1333
+ if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) {
1334
+ var _FormData = this.env && this.env.FormData;
1335
+ return toFormData(isFileList ? {'files[]': data} : data, _FormData && new _FormData());
1336
+ } else if (isObjectPayload || contentType === 'application/json') {
1285
1337
  setContentTypeIfUnset(headers, 'application/json');
1286
1338
  return stringifySafely(data);
1287
1339
  }
1340
+
1288
1341
  return data;
1289
1342
  }],
1290
1343
 
@@ -1300,7 +1353,7 @@ var defaults = {
1300
1353
  } catch (e) {
1301
1354
  if (strictJSONParsing) {
1302
1355
  if (e.name === 'SyntaxError') {
1303
- throw enhanceError(e, this, 'E_JSON_PARSE');
1356
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
1304
1357
  }
1305
1358
  throw e;
1306
1359
  }
@@ -1322,6 +1375,10 @@ var defaults = {
1322
1375
  maxContentLength: -1,
1323
1376
  maxBodyLength: -1,
1324
1377
 
1378
+ env: {
1379
+ FormData: __webpack_require__(/*! ./env/FormData */ "../node_modules/axios/lib/helpers/null.js")
1380
+ },
1381
+
1325
1382
  validateStatus: function validateStatus(status) {
1326
1383
  return status >= 200 && status < 300;
1327
1384
  },
@@ -1374,7 +1431,7 @@ module.exports = {
1374
1431
  /***/ (function(module, exports) {
1375
1432
 
1376
1433
  module.exports = {
1377
- "version": "0.26.1"
1434
+ "version": "0.27.1"
1378
1435
  };
1379
1436
 
1380
1437
  /***/ }),
@@ -1728,6 +1785,19 @@ module.exports = function normalizeHeaderName(headers, normalizedName) {
1728
1785
  };
1729
1786
 
1730
1787
 
1788
+ /***/ }),
1789
+
1790
+ /***/ "../node_modules/axios/lib/helpers/null.js":
1791
+ /*!*************************************************!*\
1792
+ !*** ../node_modules/axios/lib/helpers/null.js ***!
1793
+ \*************************************************/
1794
+ /*! no static exports found */
1795
+ /***/ (function(module, exports) {
1796
+
1797
+ // eslint-disable-next-line strict
1798
+ module.exports = null;
1799
+
1800
+
1731
1801
  /***/ }),
1732
1802
 
1733
1803
  /***/ "../node_modules/axios/lib/helpers/parseHeaders.js":
@@ -1832,6 +1902,91 @@ module.exports = function spread(callback) {
1832
1902
  };
1833
1903
 
1834
1904
 
1905
+ /***/ }),
1906
+
1907
+ /***/ "../node_modules/axios/lib/helpers/toFormData.js":
1908
+ /*!*******************************************************!*\
1909
+ !*** ../node_modules/axios/lib/helpers/toFormData.js ***!
1910
+ \*******************************************************/
1911
+ /*! no static exports found */
1912
+ /***/ (function(module, exports, __webpack_require__) {
1913
+
1914
+ "use strict";
1915
+ /* WEBPACK VAR INJECTION */(function(Buffer) {
1916
+
1917
+ var utils = __webpack_require__(/*! ../utils */ "../node_modules/axios/lib/utils.js");
1918
+
1919
+ /**
1920
+ * Convert a data object to FormData
1921
+ * @param {Object} obj
1922
+ * @param {?Object} [formData]
1923
+ * @returns {Object}
1924
+ **/
1925
+
1926
+ function toFormData(obj, formData) {
1927
+ // eslint-disable-next-line no-param-reassign
1928
+ formData = formData || new FormData();
1929
+
1930
+ var stack = [];
1931
+
1932
+ function convertValue(value) {
1933
+ if (value === null) return '';
1934
+
1935
+ if (utils.isDate(value)) {
1936
+ return value.toISOString();
1937
+ }
1938
+
1939
+ if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
1940
+ return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1941
+ }
1942
+
1943
+ return value;
1944
+ }
1945
+
1946
+ function build(data, parentKey) {
1947
+ if (utils.isPlainObject(data) || utils.isArray(data)) {
1948
+ if (stack.indexOf(data) !== -1) {
1949
+ throw Error('Circular reference detected in ' + parentKey);
1950
+ }
1951
+
1952
+ stack.push(data);
1953
+
1954
+ utils.forEach(data, function each(value, key) {
1955
+ if (utils.isUndefined(value)) return;
1956
+ var fullKey = parentKey ? parentKey + '.' + key : key;
1957
+ var arr;
1958
+
1959
+ if (value && !parentKey && typeof value === 'object') {
1960
+ if (utils.endsWith(key, '{}')) {
1961
+ // eslint-disable-next-line no-param-reassign
1962
+ value = JSON.stringify(value);
1963
+ } else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
1964
+ // eslint-disable-next-line func-names
1965
+ arr.forEach(function(el) {
1966
+ !utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
1967
+ });
1968
+ return;
1969
+ }
1970
+ }
1971
+
1972
+ build(value, fullKey);
1973
+ });
1974
+
1975
+ stack.pop();
1976
+ } else {
1977
+ formData.append(parentKey, convertValue(data));
1978
+ }
1979
+ }
1980
+
1981
+ build(obj);
1982
+
1983
+ return formData;
1984
+ }
1985
+
1986
+ module.exports = toFormData;
1987
+
1988
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node-libs-browser/node_modules/buffer/index.js */ "../node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer))
1989
+
1835
1990
  /***/ }),
1836
1991
 
1837
1992
  /***/ "../node_modules/axios/lib/helpers/validator.js":
@@ -1845,6 +2000,7 @@ module.exports = function spread(callback) {
1845
2000
 
1846
2001
 
1847
2002
  var VERSION = __webpack_require__(/*! ../env/data */ "../node_modules/axios/lib/env/data.js").version;
2003
+ var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "../node_modules/axios/lib/core/AxiosError.js");
1848
2004
 
1849
2005
  var validators = {};
1850
2006
 
@@ -1872,7 +2028,10 @@ validators.transitional = function transitional(validator, version, message) {
1872
2028
  // eslint-disable-next-line func-names
1873
2029
  return function(value, opt, opts) {
1874
2030
  if (validator === false) {
1875
- throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
2031
+ throw new AxiosError(
2032
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
2033
+ AxiosError.ERR_DEPRECATED
2034
+ );
1876
2035
  }
1877
2036
 
1878
2037
  if (version && !deprecatedWarnings[opt]) {
@@ -1899,7 +2058,7 @@ validators.transitional = function transitional(validator, version, message) {
1899
2058
 
1900
2059
  function assertOptions(options, schema, allowUnknown) {
1901
2060
  if (typeof options !== 'object') {
1902
- throw new TypeError('options must be an object');
2061
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
1903
2062
  }
1904
2063
  var keys = Object.keys(options);
1905
2064
  var i = keys.length;
@@ -1910,12 +2069,12 @@ function assertOptions(options, schema, allowUnknown) {
1910
2069
  var value = options[opt];
1911
2070
  var result = value === undefined || validator(value, opt, options);
1912
2071
  if (result !== true) {
1913
- throw new TypeError('option ' + opt + ' must be ' + result);
2072
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
1914
2073
  }
1915
2074
  continue;
1916
2075
  }
1917
2076
  if (allowUnknown !== true) {
1918
- throw Error('Unknown option ' + opt);
2077
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
1919
2078
  }
1920
2079
  }
1921
2080
  }
@@ -1944,6 +2103,22 @@ var bind = __webpack_require__(/*! ./helpers/bind */ "../node_modules/axios/lib/
1944
2103
 
1945
2104
  var toString = Object.prototype.toString;
1946
2105
 
2106
+ // eslint-disable-next-line func-names
2107
+ var kindOf = (function(cache) {
2108
+ // eslint-disable-next-line func-names
2109
+ return function(thing) {
2110
+ var str = toString.call(thing);
2111
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
2112
+ };
2113
+ })(Object.create(null));
2114
+
2115
+ function kindOfTest(type) {
2116
+ type = type.toLowerCase();
2117
+ return function isKindOf(thing) {
2118
+ return kindOf(thing) === type;
2119
+ };
2120
+ }
2121
+
1947
2122
  /**
1948
2123
  * Determine if a value is an Array
1949
2124
  *
@@ -1978,28 +2153,18 @@ function isBuffer(val) {
1978
2153
  /**
1979
2154
  * Determine if a value is an ArrayBuffer
1980
2155
  *
2156
+ * @function
1981
2157
  * @param {Object} val The value to test
1982
2158
  * @returns {boolean} True if value is an ArrayBuffer, otherwise false
1983
2159
  */
1984
- function isArrayBuffer(val) {
1985
- return toString.call(val) === '[object ArrayBuffer]';
1986
- }
2160
+ var isArrayBuffer = kindOfTest('ArrayBuffer');
2161
+
1987
2162
 
1988
2163
  /**
1989
- * Determine if a value is a FormData
2164
+ * Determine if a value is a view on an ArrayBuffer
1990
2165
  *
1991
2166
  * @param {Object} val The value to test
1992
- * @returns {boolean} True if value is an FormData, otherwise false
1993
- */
1994
- function isFormData(val) {
1995
- return toString.call(val) === '[object FormData]';
1996
- }
1997
-
1998
- /**
1999
- * Determine if a value is a view on an ArrayBuffer
2000
- *
2001
- * @param {Object} val The value to test
2002
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
2167
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
2003
2168
  */
2004
2169
  function isArrayBufferView(val) {
2005
2170
  var result;
@@ -2048,7 +2213,7 @@ function isObject(val) {
2048
2213
  * @return {boolean} True if value is a plain Object, otherwise false
2049
2214
  */
2050
2215
  function isPlainObject(val) {
2051
- if (toString.call(val) !== '[object Object]') {
2216
+ if (kindOf(val) !== 'object') {
2052
2217
  return false;
2053
2218
  }
2054
2219
 
@@ -2059,32 +2224,38 @@ function isPlainObject(val) {
2059
2224
  /**
2060
2225
  * Determine if a value is a Date
2061
2226
  *
2227
+ * @function
2062
2228
  * @param {Object} val The value to test
2063
2229
  * @returns {boolean} True if value is a Date, otherwise false
2064
2230
  */
2065
- function isDate(val) {
2066
- return toString.call(val) === '[object Date]';
2067
- }
2231
+ var isDate = kindOfTest('Date');
2068
2232
 
2069
2233
  /**
2070
2234
  * Determine if a value is a File
2071
2235
  *
2236
+ * @function
2072
2237
  * @param {Object} val The value to test
2073
2238
  * @returns {boolean} True if value is a File, otherwise false
2074
2239
  */
2075
- function isFile(val) {
2076
- return toString.call(val) === '[object File]';
2077
- }
2240
+ var isFile = kindOfTest('File');
2078
2241
 
2079
2242
  /**
2080
2243
  * Determine if a value is a Blob
2081
2244
  *
2245
+ * @function
2082
2246
  * @param {Object} val The value to test
2083
2247
  * @returns {boolean} True if value is a Blob, otherwise false
2084
2248
  */
2085
- function isBlob(val) {
2086
- return toString.call(val) === '[object Blob]';
2087
- }
2249
+ var isBlob = kindOfTest('Blob');
2250
+
2251
+ /**
2252
+ * Determine if a value is a FileList
2253
+ *
2254
+ * @function
2255
+ * @param {Object} val The value to test
2256
+ * @returns {boolean} True if value is a File, otherwise false
2257
+ */
2258
+ var isFileList = kindOfTest('FileList');
2088
2259
 
2089
2260
  /**
2090
2261
  * Determine if a value is a Function
@@ -2107,14 +2278,27 @@ function isStream(val) {
2107
2278
  }
2108
2279
 
2109
2280
  /**
2110
- * Determine if a value is a URLSearchParams object
2281
+ * Determine if a value is a FormData
2111
2282
  *
2283
+ * @param {Object} thing The value to test
2284
+ * @returns {boolean} True if value is an FormData, otherwise false
2285
+ */
2286
+ function isFormData(thing) {
2287
+ var pattern = '[object FormData]';
2288
+ return thing && (
2289
+ (typeof FormData === 'function' && thing instanceof FormData) ||
2290
+ toString.call(thing) === pattern ||
2291
+ (isFunction(thing.toString) && thing.toString() === pattern)
2292
+ );
2293
+ }
2294
+
2295
+ /**
2296
+ * Determine if a value is a URLSearchParams object
2297
+ * @function
2112
2298
  * @param {Object} val The value to test
2113
2299
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
2114
2300
  */
2115
- function isURLSearchParams(val) {
2116
- return toString.call(val) === '[object URLSearchParams]';
2117
- }
2301
+ var isURLSearchParams = kindOfTest('URLSearchParams');
2118
2302
 
2119
2303
  /**
2120
2304
  * Trim excess whitespace off the beginning and end of a string
@@ -2261,6 +2445,94 @@ function stripBOM(content) {
2261
2445
  return content;
2262
2446
  }
2263
2447
 
2448
+ /**
2449
+ * Inherit the prototype methods from one constructor into another
2450
+ * @param {function} constructor
2451
+ * @param {function} superConstructor
2452
+ * @param {object} [props]
2453
+ * @param {object} [descriptors]
2454
+ */
2455
+
2456
+ function inherits(constructor, superConstructor, props, descriptors) {
2457
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
2458
+ constructor.prototype.constructor = constructor;
2459
+ props && Object.assign(constructor.prototype, props);
2460
+ }
2461
+
2462
+ /**
2463
+ * Resolve object with deep prototype chain to a flat object
2464
+ * @param {Object} sourceObj source object
2465
+ * @param {Object} [destObj]
2466
+ * @param {Function} [filter]
2467
+ * @returns {Object}
2468
+ */
2469
+
2470
+ function toFlatObject(sourceObj, destObj, filter) {
2471
+ var props;
2472
+ var i;
2473
+ var prop;
2474
+ var merged = {};
2475
+
2476
+ destObj = destObj || {};
2477
+
2478
+ do {
2479
+ props = Object.getOwnPropertyNames(sourceObj);
2480
+ i = props.length;
2481
+ while (i-- > 0) {
2482
+ prop = props[i];
2483
+ if (!merged[prop]) {
2484
+ destObj[prop] = sourceObj[prop];
2485
+ merged[prop] = true;
2486
+ }
2487
+ }
2488
+ sourceObj = Object.getPrototypeOf(sourceObj);
2489
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
2490
+
2491
+ return destObj;
2492
+ }
2493
+
2494
+ /*
2495
+ * determines whether a string ends with the characters of a specified string
2496
+ * @param {String} str
2497
+ * @param {String} searchString
2498
+ * @param {Number} [position= 0]
2499
+ * @returns {boolean}
2500
+ */
2501
+ function endsWith(str, searchString, position) {
2502
+ str = String(str);
2503
+ if (position === undefined || position > str.length) {
2504
+ position = str.length;
2505
+ }
2506
+ position -= searchString.length;
2507
+ var lastIndex = str.indexOf(searchString, position);
2508
+ return lastIndex !== -1 && lastIndex === position;
2509
+ }
2510
+
2511
+
2512
+ /**
2513
+ * Returns new array from array like object
2514
+ * @param {*} [thing]
2515
+ * @returns {Array}
2516
+ */
2517
+ function toArray(thing) {
2518
+ if (!thing) return null;
2519
+ var i = thing.length;
2520
+ if (isUndefined(i)) return null;
2521
+ var arr = new Array(i);
2522
+ while (i-- > 0) {
2523
+ arr[i] = thing[i];
2524
+ }
2525
+ return arr;
2526
+ }
2527
+
2528
+ // eslint-disable-next-line func-names
2529
+ var isTypedArray = (function(TypedArray) {
2530
+ // eslint-disable-next-line func-names
2531
+ return function(thing) {
2532
+ return TypedArray && thing instanceof TypedArray;
2533
+ };
2534
+ })(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
2535
+
2264
2536
  module.exports = {
2265
2537
  isArray: isArray,
2266
2538
  isArrayBuffer: isArrayBuffer,
@@ -2283,10 +2555,180 @@ module.exports = {
2283
2555
  merge: merge,
2284
2556
  extend: extend,
2285
2557
  trim: trim,
2286
- stripBOM: stripBOM
2558
+ stripBOM: stripBOM,
2559
+ inherits: inherits,
2560
+ toFlatObject: toFlatObject,
2561
+ kindOf: kindOf,
2562
+ kindOfTest: kindOfTest,
2563
+ endsWith: endsWith,
2564
+ toArray: toArray,
2565
+ isTypedArray: isTypedArray,
2566
+ isFileList: isFileList
2287
2567
  };
2288
2568
 
2289
2569
 
2570
+ /***/ }),
2571
+
2572
+ /***/ "../node_modules/base64-js/index.js":
2573
+ /*!******************************************!*\
2574
+ !*** ../node_modules/base64-js/index.js ***!
2575
+ \******************************************/
2576
+ /*! no static exports found */
2577
+ /***/ (function(module, exports, __webpack_require__) {
2578
+
2579
+ "use strict";
2580
+
2581
+
2582
+ exports.byteLength = byteLength
2583
+ exports.toByteArray = toByteArray
2584
+ exports.fromByteArray = fromByteArray
2585
+
2586
+ var lookup = []
2587
+ var revLookup = []
2588
+ var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
2589
+
2590
+ var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
2591
+ for (var i = 0, len = code.length; i < len; ++i) {
2592
+ lookup[i] = code[i]
2593
+ revLookup[code.charCodeAt(i)] = i
2594
+ }
2595
+
2596
+ // Support decoding URL-safe base64 strings, as Node.js does.
2597
+ // See: https://en.wikipedia.org/wiki/Base64#URL_applications
2598
+ revLookup['-'.charCodeAt(0)] = 62
2599
+ revLookup['_'.charCodeAt(0)] = 63
2600
+
2601
+ function getLens (b64) {
2602
+ var len = b64.length
2603
+
2604
+ if (len % 4 > 0) {
2605
+ throw new Error('Invalid string. Length must be a multiple of 4')
2606
+ }
2607
+
2608
+ // Trim off extra bytes after placeholder bytes are found
2609
+ // See: https://github.com/beatgammit/base64-js/issues/42
2610
+ var validLen = b64.indexOf('=')
2611
+ if (validLen === -1) validLen = len
2612
+
2613
+ var placeHoldersLen = validLen === len
2614
+ ? 0
2615
+ : 4 - (validLen % 4)
2616
+
2617
+ return [validLen, placeHoldersLen]
2618
+ }
2619
+
2620
+ // base64 is 4/3 + up to two characters of the original data
2621
+ function byteLength (b64) {
2622
+ var lens = getLens(b64)
2623
+ var validLen = lens[0]
2624
+ var placeHoldersLen = lens[1]
2625
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
2626
+ }
2627
+
2628
+ function _byteLength (b64, validLen, placeHoldersLen) {
2629
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
2630
+ }
2631
+
2632
+ function toByteArray (b64) {
2633
+ var tmp
2634
+ var lens = getLens(b64)
2635
+ var validLen = lens[0]
2636
+ var placeHoldersLen = lens[1]
2637
+
2638
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
2639
+
2640
+ var curByte = 0
2641
+
2642
+ // if there are placeholders, only get up to the last complete 4 chars
2643
+ var len = placeHoldersLen > 0
2644
+ ? validLen - 4
2645
+ : validLen
2646
+
2647
+ var i
2648
+ for (i = 0; i < len; i += 4) {
2649
+ tmp =
2650
+ (revLookup[b64.charCodeAt(i)] << 18) |
2651
+ (revLookup[b64.charCodeAt(i + 1)] << 12) |
2652
+ (revLookup[b64.charCodeAt(i + 2)] << 6) |
2653
+ revLookup[b64.charCodeAt(i + 3)]
2654
+ arr[curByte++] = (tmp >> 16) & 0xFF
2655
+ arr[curByte++] = (tmp >> 8) & 0xFF
2656
+ arr[curByte++] = tmp & 0xFF
2657
+ }
2658
+
2659
+ if (placeHoldersLen === 2) {
2660
+ tmp =
2661
+ (revLookup[b64.charCodeAt(i)] << 2) |
2662
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
2663
+ arr[curByte++] = tmp & 0xFF
2664
+ }
2665
+
2666
+ if (placeHoldersLen === 1) {
2667
+ tmp =
2668
+ (revLookup[b64.charCodeAt(i)] << 10) |
2669
+ (revLookup[b64.charCodeAt(i + 1)] << 4) |
2670
+ (revLookup[b64.charCodeAt(i + 2)] >> 2)
2671
+ arr[curByte++] = (tmp >> 8) & 0xFF
2672
+ arr[curByte++] = tmp & 0xFF
2673
+ }
2674
+
2675
+ return arr
2676
+ }
2677
+
2678
+ function tripletToBase64 (num) {
2679
+ return lookup[num >> 18 & 0x3F] +
2680
+ lookup[num >> 12 & 0x3F] +
2681
+ lookup[num >> 6 & 0x3F] +
2682
+ lookup[num & 0x3F]
2683
+ }
2684
+
2685
+ function encodeChunk (uint8, start, end) {
2686
+ var tmp
2687
+ var output = []
2688
+ for (var i = start; i < end; i += 3) {
2689
+ tmp =
2690
+ ((uint8[i] << 16) & 0xFF0000) +
2691
+ ((uint8[i + 1] << 8) & 0xFF00) +
2692
+ (uint8[i + 2] & 0xFF)
2693
+ output.push(tripletToBase64(tmp))
2694
+ }
2695
+ return output.join('')
2696
+ }
2697
+
2698
+ function fromByteArray (uint8) {
2699
+ var tmp
2700
+ var len = uint8.length
2701
+ var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
2702
+ var parts = []
2703
+ var maxChunkLength = 16383 // must be multiple of 3
2704
+
2705
+ // go through the array every three bytes, we'll deal with trailing stuff later
2706
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
2707
+ parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
2708
+ }
2709
+
2710
+ // pad the end with zeros, but make sure to not forget the extra bytes
2711
+ if (extraBytes === 1) {
2712
+ tmp = uint8[len - 1]
2713
+ parts.push(
2714
+ lookup[tmp >> 2] +
2715
+ lookup[(tmp << 4) & 0x3F] +
2716
+ '=='
2717
+ )
2718
+ } else if (extraBytes === 2) {
2719
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
2720
+ parts.push(
2721
+ lookup[tmp >> 10] +
2722
+ lookup[(tmp >> 4) & 0x3F] +
2723
+ lookup[(tmp << 2) & 0x3F] +
2724
+ '='
2725
+ )
2726
+ }
2727
+
2728
+ return parts.join('')
2729
+ }
2730
+
2731
+
2290
2732
  /***/ }),
2291
2733
 
2292
2734
  /***/ "../node_modules/call-bind/callBound.js":
@@ -4130,6 +4572,118 @@ var bind = __webpack_require__(/*! function-bind */ "../node_modules/function-bi
4130
4572
  module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
4131
4573
 
4132
4574
 
4575
+ /***/ }),
4576
+
4577
+ /***/ "../node_modules/ieee754/index.js":
4578
+ /*!****************************************!*\
4579
+ !*** ../node_modules/ieee754/index.js ***!
4580
+ \****************************************/
4581
+ /*! no static exports found */
4582
+ /***/ (function(module, exports) {
4583
+
4584
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
4585
+ exports.read = function (buffer, offset, isLE, mLen, nBytes) {
4586
+ var e, m
4587
+ var eLen = (nBytes * 8) - mLen - 1
4588
+ var eMax = (1 << eLen) - 1
4589
+ var eBias = eMax >> 1
4590
+ var nBits = -7
4591
+ var i = isLE ? (nBytes - 1) : 0
4592
+ var d = isLE ? -1 : 1
4593
+ var s = buffer[offset + i]
4594
+
4595
+ i += d
4596
+
4597
+ e = s & ((1 << (-nBits)) - 1)
4598
+ s >>= (-nBits)
4599
+ nBits += eLen
4600
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
4601
+
4602
+ m = e & ((1 << (-nBits)) - 1)
4603
+ e >>= (-nBits)
4604
+ nBits += mLen
4605
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
4606
+
4607
+ if (e === 0) {
4608
+ e = 1 - eBias
4609
+ } else if (e === eMax) {
4610
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
4611
+ } else {
4612
+ m = m + Math.pow(2, mLen)
4613
+ e = e - eBias
4614
+ }
4615
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
4616
+ }
4617
+
4618
+ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
4619
+ var e, m, c
4620
+ var eLen = (nBytes * 8) - mLen - 1
4621
+ var eMax = (1 << eLen) - 1
4622
+ var eBias = eMax >> 1
4623
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
4624
+ var i = isLE ? 0 : (nBytes - 1)
4625
+ var d = isLE ? 1 : -1
4626
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
4627
+
4628
+ value = Math.abs(value)
4629
+
4630
+ if (isNaN(value) || value === Infinity) {
4631
+ m = isNaN(value) ? 1 : 0
4632
+ e = eMax
4633
+ } else {
4634
+ e = Math.floor(Math.log(value) / Math.LN2)
4635
+ if (value * (c = Math.pow(2, -e)) < 1) {
4636
+ e--
4637
+ c *= 2
4638
+ }
4639
+ if (e + eBias >= 1) {
4640
+ value += rt / c
4641
+ } else {
4642
+ value += rt * Math.pow(2, 1 - eBias)
4643
+ }
4644
+ if (value * c >= 2) {
4645
+ e++
4646
+ c /= 2
4647
+ }
4648
+
4649
+ if (e + eBias >= eMax) {
4650
+ m = 0
4651
+ e = eMax
4652
+ } else if (e + eBias >= 1) {
4653
+ m = ((value * c) - 1) * Math.pow(2, mLen)
4654
+ e = e + eBias
4655
+ } else {
4656
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
4657
+ e = 0
4658
+ }
4659
+ }
4660
+
4661
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
4662
+
4663
+ e = (e << mLen) | m
4664
+ eLen += mLen
4665
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
4666
+
4667
+ buffer[offset + i - d] |= s * 128
4668
+ }
4669
+
4670
+
4671
+ /***/ }),
4672
+
4673
+ /***/ "../node_modules/isarray/index.js":
4674
+ /*!****************************************!*\
4675
+ !*** ../node_modules/isarray/index.js ***!
4676
+ \****************************************/
4677
+ /*! no static exports found */
4678
+ /***/ (function(module, exports) {
4679
+
4680
+ var toString = {}.toString;
4681
+
4682
+ module.exports = Array.isArray || function (arr) {
4683
+ return toString.call(arr) == '[object Array]';
4684
+ };
4685
+
4686
+
4133
4687
  /***/ }),
4134
4688
 
4135
4689
  /***/ "../node_modules/lodash.isplainobject/index.js":
@@ -4167,224 +4721,2026 @@ function isHostObject(value) {
4167
4721
  result = !!(value + '');
4168
4722
  } catch (e) {}
4169
4723
  }
4170
- return result;
4724
+ return result;
4725
+ }
4726
+
4727
+ /**
4728
+ * Creates a unary function that invokes `func` with its argument transformed.
4729
+ *
4730
+ * @private
4731
+ * @param {Function} func The function to wrap.
4732
+ * @param {Function} transform The argument transform.
4733
+ * @returns {Function} Returns the new function.
4734
+ */
4735
+ function overArg(func, transform) {
4736
+ return function(arg) {
4737
+ return func(transform(arg));
4738
+ };
4739
+ }
4740
+
4741
+ /** Used for built-in method references. */
4742
+ var funcProto = Function.prototype,
4743
+ objectProto = Object.prototype;
4744
+
4745
+ /** Used to resolve the decompiled source of functions. */
4746
+ var funcToString = funcProto.toString;
4747
+
4748
+ /** Used to check objects for own properties. */
4749
+ var hasOwnProperty = objectProto.hasOwnProperty;
4750
+
4751
+ /** Used to infer the `Object` constructor. */
4752
+ var objectCtorString = funcToString.call(Object);
4753
+
4754
+ /**
4755
+ * Used to resolve the
4756
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4757
+ * of values.
4758
+ */
4759
+ var objectToString = objectProto.toString;
4760
+
4761
+ /** Built-in value references. */
4762
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
4763
+
4764
+ /**
4765
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
4766
+ * and has a `typeof` result of "object".
4767
+ *
4768
+ * @static
4769
+ * @memberOf _
4770
+ * @since 4.0.0
4771
+ * @category Lang
4772
+ * @param {*} value The value to check.
4773
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4774
+ * @example
4775
+ *
4776
+ * _.isObjectLike({});
4777
+ * // => true
4778
+ *
4779
+ * _.isObjectLike([1, 2, 3]);
4780
+ * // => true
4781
+ *
4782
+ * _.isObjectLike(_.noop);
4783
+ * // => false
4784
+ *
4785
+ * _.isObjectLike(null);
4786
+ * // => false
4787
+ */
4788
+ function isObjectLike(value) {
4789
+ return !!value && typeof value == 'object';
4790
+ }
4791
+
4792
+ /**
4793
+ * Checks if `value` is a plain object, that is, an object created by the
4794
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
4795
+ *
4796
+ * @static
4797
+ * @memberOf _
4798
+ * @since 0.8.0
4799
+ * @category Lang
4800
+ * @param {*} value The value to check.
4801
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
4802
+ * @example
4803
+ *
4804
+ * function Foo() {
4805
+ * this.a = 1;
4806
+ * }
4807
+ *
4808
+ * _.isPlainObject(new Foo);
4809
+ * // => false
4810
+ *
4811
+ * _.isPlainObject([1, 2, 3]);
4812
+ * // => false
4813
+ *
4814
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
4815
+ * // => true
4816
+ *
4817
+ * _.isPlainObject(Object.create(null));
4818
+ * // => true
4819
+ */
4820
+ function isPlainObject(value) {
4821
+ if (!isObjectLike(value) ||
4822
+ objectToString.call(value) != objectTag || isHostObject(value)) {
4823
+ return false;
4824
+ }
4825
+ var proto = getPrototype(value);
4826
+ if (proto === null) {
4827
+ return true;
4828
+ }
4829
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
4830
+ return (typeof Ctor == 'function' &&
4831
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
4832
+ }
4833
+
4834
+ module.exports = isPlainObject;
4835
+
4836
+
4837
+ /***/ }),
4838
+
4839
+ /***/ "../node_modules/lodash.isstring/index.js":
4840
+ /*!************************************************!*\
4841
+ !*** ../node_modules/lodash.isstring/index.js ***!
4842
+ \************************************************/
4843
+ /*! no static exports found */
4844
+ /***/ (function(module, exports) {
4845
+
4846
+ /**
4847
+ * lodash 4.0.1 (Custom Build) <https://lodash.com/>
4848
+ * Build: `lodash modularize exports="npm" -o ./`
4849
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
4850
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
4851
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4852
+ * Available under MIT license <https://lodash.com/license>
4853
+ */
4854
+
4855
+ /** `Object#toString` result references. */
4856
+ var stringTag = '[object String]';
4857
+
4858
+ /** Used for built-in method references. */
4859
+ var objectProto = Object.prototype;
4860
+
4861
+ /**
4862
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
4863
+ * of values.
4864
+ */
4865
+ var objectToString = objectProto.toString;
4866
+
4867
+ /**
4868
+ * Checks if `value` is classified as an `Array` object.
4869
+ *
4870
+ * @static
4871
+ * @memberOf _
4872
+ * @type Function
4873
+ * @category Lang
4874
+ * @param {*} value The value to check.
4875
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
4876
+ * @example
4877
+ *
4878
+ * _.isArray([1, 2, 3]);
4879
+ * // => true
4880
+ *
4881
+ * _.isArray(document.body.children);
4882
+ * // => false
4883
+ *
4884
+ * _.isArray('abc');
4885
+ * // => false
4886
+ *
4887
+ * _.isArray(_.noop);
4888
+ * // => false
4889
+ */
4890
+ var isArray = Array.isArray;
4891
+
4892
+ /**
4893
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
4894
+ * and has a `typeof` result of "object".
4895
+ *
4896
+ * @static
4897
+ * @memberOf _
4898
+ * @category Lang
4899
+ * @param {*} value The value to check.
4900
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4901
+ * @example
4902
+ *
4903
+ * _.isObjectLike({});
4904
+ * // => true
4905
+ *
4906
+ * _.isObjectLike([1, 2, 3]);
4907
+ * // => true
4908
+ *
4909
+ * _.isObjectLike(_.noop);
4910
+ * // => false
4911
+ *
4912
+ * _.isObjectLike(null);
4913
+ * // => false
4914
+ */
4915
+ function isObjectLike(value) {
4916
+ return !!value && typeof value == 'object';
4917
+ }
4918
+
4919
+ /**
4920
+ * Checks if `value` is classified as a `String` primitive or object.
4921
+ *
4922
+ * @static
4923
+ * @memberOf _
4924
+ * @category Lang
4925
+ * @param {*} value The value to check.
4926
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
4927
+ * @example
4928
+ *
4929
+ * _.isString('abc');
4930
+ * // => true
4931
+ *
4932
+ * _.isString(1);
4933
+ * // => false
4934
+ */
4935
+ function isString(value) {
4936
+ return typeof value == 'string' ||
4937
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
4938
+ }
4939
+
4940
+ module.exports = isString;
4941
+
4942
+
4943
+ /***/ }),
4944
+
4945
+ /***/ "../node_modules/node-libs-browser/node_modules/buffer/index.js":
4946
+ /*!**********************************************************************!*\
4947
+ !*** ../node_modules/node-libs-browser/node_modules/buffer/index.js ***!
4948
+ \**********************************************************************/
4949
+ /*! no static exports found */
4950
+ /***/ (function(module, exports, __webpack_require__) {
4951
+
4952
+ "use strict";
4953
+ /* WEBPACK VAR INJECTION */(function(global) {/*!
4954
+ * The buffer module from node.js, for the browser.
4955
+ *
4956
+ * @author Feross Aboukhadijeh <http://feross.org>
4957
+ * @license MIT
4958
+ */
4959
+ /* eslint-disable no-proto */
4960
+
4961
+
4962
+
4963
+ var base64 = __webpack_require__(/*! base64-js */ "../node_modules/base64-js/index.js")
4964
+ var ieee754 = __webpack_require__(/*! ieee754 */ "../node_modules/ieee754/index.js")
4965
+ var isArray = __webpack_require__(/*! isarray */ "../node_modules/isarray/index.js")
4966
+
4967
+ exports.Buffer = Buffer
4968
+ exports.SlowBuffer = SlowBuffer
4969
+ exports.INSPECT_MAX_BYTES = 50
4970
+
4971
+ /**
4972
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
4973
+ * === true Use Uint8Array implementation (fastest)
4974
+ * === false Use Object implementation (most compatible, even IE6)
4975
+ *
4976
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
4977
+ * Opera 11.6+, iOS 4.2+.
4978
+ *
4979
+ * Due to various browser bugs, sometimes the Object implementation will be used even
4980
+ * when the browser supports typed arrays.
4981
+ *
4982
+ * Note:
4983
+ *
4984
+ * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
4985
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
4986
+ *
4987
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
4988
+ *
4989
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
4990
+ * incorrect length in some situations.
4991
+
4992
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
4993
+ * get the Object implementation, which is slower but behaves correctly.
4994
+ */
4995
+ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
4996
+ ? global.TYPED_ARRAY_SUPPORT
4997
+ : typedArraySupport()
4998
+
4999
+ /*
5000
+ * Export kMaxLength after typed array support is determined.
5001
+ */
5002
+ exports.kMaxLength = kMaxLength()
5003
+
5004
+ function typedArraySupport () {
5005
+ try {
5006
+ var arr = new Uint8Array(1)
5007
+ arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
5008
+ return arr.foo() === 42 && // typed array instances can be augmented
5009
+ typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
5010
+ arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
5011
+ } catch (e) {
5012
+ return false
5013
+ }
5014
+ }
5015
+
5016
+ function kMaxLength () {
5017
+ return Buffer.TYPED_ARRAY_SUPPORT
5018
+ ? 0x7fffffff
5019
+ : 0x3fffffff
5020
+ }
5021
+
5022
+ function createBuffer (that, length) {
5023
+ if (kMaxLength() < length) {
5024
+ throw new RangeError('Invalid typed array length')
5025
+ }
5026
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
5027
+ // Return an augmented `Uint8Array` instance, for best performance
5028
+ that = new Uint8Array(length)
5029
+ that.__proto__ = Buffer.prototype
5030
+ } else {
5031
+ // Fallback: Return an object instance of the Buffer class
5032
+ if (that === null) {
5033
+ that = new Buffer(length)
5034
+ }
5035
+ that.length = length
5036
+ }
5037
+
5038
+ return that
5039
+ }
5040
+
5041
+ /**
5042
+ * The Buffer constructor returns instances of `Uint8Array` that have their
5043
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
5044
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
5045
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
5046
+ * returns a single octet.
5047
+ *
5048
+ * The `Uint8Array` prototype remains unmodified.
5049
+ */
5050
+
5051
+ function Buffer (arg, encodingOrOffset, length) {
5052
+ if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
5053
+ return new Buffer(arg, encodingOrOffset, length)
5054
+ }
5055
+
5056
+ // Common case.
5057
+ if (typeof arg === 'number') {
5058
+ if (typeof encodingOrOffset === 'string') {
5059
+ throw new Error(
5060
+ 'If encoding is specified then the first argument must be a string'
5061
+ )
5062
+ }
5063
+ return allocUnsafe(this, arg)
5064
+ }
5065
+ return from(this, arg, encodingOrOffset, length)
5066
+ }
5067
+
5068
+ Buffer.poolSize = 8192 // not used by this implementation
5069
+
5070
+ // TODO: Legacy, not needed anymore. Remove in next major version.
5071
+ Buffer._augment = function (arr) {
5072
+ arr.__proto__ = Buffer.prototype
5073
+ return arr
5074
+ }
5075
+
5076
+ function from (that, value, encodingOrOffset, length) {
5077
+ if (typeof value === 'number') {
5078
+ throw new TypeError('"value" argument must not be a number')
5079
+ }
5080
+
5081
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
5082
+ return fromArrayBuffer(that, value, encodingOrOffset, length)
5083
+ }
5084
+
5085
+ if (typeof value === 'string') {
5086
+ return fromString(that, value, encodingOrOffset)
5087
+ }
5088
+
5089
+ return fromObject(that, value)
5090
+ }
5091
+
5092
+ /**
5093
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
5094
+ * if value is a number.
5095
+ * Buffer.from(str[, encoding])
5096
+ * Buffer.from(array)
5097
+ * Buffer.from(buffer)
5098
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
5099
+ **/
5100
+ Buffer.from = function (value, encodingOrOffset, length) {
5101
+ return from(null, value, encodingOrOffset, length)
5102
+ }
5103
+
5104
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
5105
+ Buffer.prototype.__proto__ = Uint8Array.prototype
5106
+ Buffer.__proto__ = Uint8Array
5107
+ if (typeof Symbol !== 'undefined' && Symbol.species &&
5108
+ Buffer[Symbol.species] === Buffer) {
5109
+ // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
5110
+ Object.defineProperty(Buffer, Symbol.species, {
5111
+ value: null,
5112
+ configurable: true
5113
+ })
5114
+ }
5115
+ }
5116
+
5117
+ function assertSize (size) {
5118
+ if (typeof size !== 'number') {
5119
+ throw new TypeError('"size" argument must be a number')
5120
+ } else if (size < 0) {
5121
+ throw new RangeError('"size" argument must not be negative')
5122
+ }
5123
+ }
5124
+
5125
+ function alloc (that, size, fill, encoding) {
5126
+ assertSize(size)
5127
+ if (size <= 0) {
5128
+ return createBuffer(that, size)
5129
+ }
5130
+ if (fill !== undefined) {
5131
+ // Only pay attention to encoding if it's a string. This
5132
+ // prevents accidentally sending in a number that would
5133
+ // be interpretted as a start offset.
5134
+ return typeof encoding === 'string'
5135
+ ? createBuffer(that, size).fill(fill, encoding)
5136
+ : createBuffer(that, size).fill(fill)
5137
+ }
5138
+ return createBuffer(that, size)
5139
+ }
5140
+
5141
+ /**
5142
+ * Creates a new filled Buffer instance.
5143
+ * alloc(size[, fill[, encoding]])
5144
+ **/
5145
+ Buffer.alloc = function (size, fill, encoding) {
5146
+ return alloc(null, size, fill, encoding)
5147
+ }
5148
+
5149
+ function allocUnsafe (that, size) {
5150
+ assertSize(size)
5151
+ that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
5152
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
5153
+ for (var i = 0; i < size; ++i) {
5154
+ that[i] = 0
5155
+ }
5156
+ }
5157
+ return that
5158
+ }
5159
+
5160
+ /**
5161
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
5162
+ * */
5163
+ Buffer.allocUnsafe = function (size) {
5164
+ return allocUnsafe(null, size)
5165
+ }
5166
+ /**
5167
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
5168
+ */
5169
+ Buffer.allocUnsafeSlow = function (size) {
5170
+ return allocUnsafe(null, size)
5171
+ }
5172
+
5173
+ function fromString (that, string, encoding) {
5174
+ if (typeof encoding !== 'string' || encoding === '') {
5175
+ encoding = 'utf8'
5176
+ }
5177
+
5178
+ if (!Buffer.isEncoding(encoding)) {
5179
+ throw new TypeError('"encoding" must be a valid string encoding')
5180
+ }
5181
+
5182
+ var length = byteLength(string, encoding) | 0
5183
+ that = createBuffer(that, length)
5184
+
5185
+ var actual = that.write(string, encoding)
5186
+
5187
+ if (actual !== length) {
5188
+ // Writing a hex string, for example, that contains invalid characters will
5189
+ // cause everything after the first invalid character to be ignored. (e.g.
5190
+ // 'abxxcd' will be treated as 'ab')
5191
+ that = that.slice(0, actual)
5192
+ }
5193
+
5194
+ return that
5195
+ }
5196
+
5197
+ function fromArrayLike (that, array) {
5198
+ var length = array.length < 0 ? 0 : checked(array.length) | 0
5199
+ that = createBuffer(that, length)
5200
+ for (var i = 0; i < length; i += 1) {
5201
+ that[i] = array[i] & 255
5202
+ }
5203
+ return that
5204
+ }
5205
+
5206
+ function fromArrayBuffer (that, array, byteOffset, length) {
5207
+ array.byteLength // this throws if `array` is not a valid ArrayBuffer
5208
+
5209
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
5210
+ throw new RangeError('\'offset\' is out of bounds')
5211
+ }
5212
+
5213
+ if (array.byteLength < byteOffset + (length || 0)) {
5214
+ throw new RangeError('\'length\' is out of bounds')
5215
+ }
5216
+
5217
+ if (byteOffset === undefined && length === undefined) {
5218
+ array = new Uint8Array(array)
5219
+ } else if (length === undefined) {
5220
+ array = new Uint8Array(array, byteOffset)
5221
+ } else {
5222
+ array = new Uint8Array(array, byteOffset, length)
5223
+ }
5224
+
5225
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
5226
+ // Return an augmented `Uint8Array` instance, for best performance
5227
+ that = array
5228
+ that.__proto__ = Buffer.prototype
5229
+ } else {
5230
+ // Fallback: Return an object instance of the Buffer class
5231
+ that = fromArrayLike(that, array)
5232
+ }
5233
+ return that
5234
+ }
5235
+
5236
+ function fromObject (that, obj) {
5237
+ if (Buffer.isBuffer(obj)) {
5238
+ var len = checked(obj.length) | 0
5239
+ that = createBuffer(that, len)
5240
+
5241
+ if (that.length === 0) {
5242
+ return that
5243
+ }
5244
+
5245
+ obj.copy(that, 0, 0, len)
5246
+ return that
5247
+ }
5248
+
5249
+ if (obj) {
5250
+ if ((typeof ArrayBuffer !== 'undefined' &&
5251
+ obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
5252
+ if (typeof obj.length !== 'number' || isnan(obj.length)) {
5253
+ return createBuffer(that, 0)
5254
+ }
5255
+ return fromArrayLike(that, obj)
5256
+ }
5257
+
5258
+ if (obj.type === 'Buffer' && isArray(obj.data)) {
5259
+ return fromArrayLike(that, obj.data)
5260
+ }
5261
+ }
5262
+
5263
+ throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
5264
+ }
5265
+
5266
+ function checked (length) {
5267
+ // Note: cannot use `length < kMaxLength()` here because that fails when
5268
+ // length is NaN (which is otherwise coerced to zero.)
5269
+ if (length >= kMaxLength()) {
5270
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
5271
+ 'size: 0x' + kMaxLength().toString(16) + ' bytes')
5272
+ }
5273
+ return length | 0
5274
+ }
5275
+
5276
+ function SlowBuffer (length) {
5277
+ if (+length != length) { // eslint-disable-line eqeqeq
5278
+ length = 0
5279
+ }
5280
+ return Buffer.alloc(+length)
5281
+ }
5282
+
5283
+ Buffer.isBuffer = function isBuffer (b) {
5284
+ return !!(b != null && b._isBuffer)
5285
+ }
5286
+
5287
+ Buffer.compare = function compare (a, b) {
5288
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
5289
+ throw new TypeError('Arguments must be Buffers')
5290
+ }
5291
+
5292
+ if (a === b) return 0
5293
+
5294
+ var x = a.length
5295
+ var y = b.length
5296
+
5297
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
5298
+ if (a[i] !== b[i]) {
5299
+ x = a[i]
5300
+ y = b[i]
5301
+ break
5302
+ }
5303
+ }
5304
+
5305
+ if (x < y) return -1
5306
+ if (y < x) return 1
5307
+ return 0
5308
+ }
5309
+
5310
+ Buffer.isEncoding = function isEncoding (encoding) {
5311
+ switch (String(encoding).toLowerCase()) {
5312
+ case 'hex':
5313
+ case 'utf8':
5314
+ case 'utf-8':
5315
+ case 'ascii':
5316
+ case 'latin1':
5317
+ case 'binary':
5318
+ case 'base64':
5319
+ case 'ucs2':
5320
+ case 'ucs-2':
5321
+ case 'utf16le':
5322
+ case 'utf-16le':
5323
+ return true
5324
+ default:
5325
+ return false
5326
+ }
5327
+ }
5328
+
5329
+ Buffer.concat = function concat (list, length) {
5330
+ if (!isArray(list)) {
5331
+ throw new TypeError('"list" argument must be an Array of Buffers')
5332
+ }
5333
+
5334
+ if (list.length === 0) {
5335
+ return Buffer.alloc(0)
5336
+ }
5337
+
5338
+ var i
5339
+ if (length === undefined) {
5340
+ length = 0
5341
+ for (i = 0; i < list.length; ++i) {
5342
+ length += list[i].length
5343
+ }
5344
+ }
5345
+
5346
+ var buffer = Buffer.allocUnsafe(length)
5347
+ var pos = 0
5348
+ for (i = 0; i < list.length; ++i) {
5349
+ var buf = list[i]
5350
+ if (!Buffer.isBuffer(buf)) {
5351
+ throw new TypeError('"list" argument must be an Array of Buffers')
5352
+ }
5353
+ buf.copy(buffer, pos)
5354
+ pos += buf.length
5355
+ }
5356
+ return buffer
5357
+ }
5358
+
5359
+ function byteLength (string, encoding) {
5360
+ if (Buffer.isBuffer(string)) {
5361
+ return string.length
5362
+ }
5363
+ if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
5364
+ (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
5365
+ return string.byteLength
5366
+ }
5367
+ if (typeof string !== 'string') {
5368
+ string = '' + string
5369
+ }
5370
+
5371
+ var len = string.length
5372
+ if (len === 0) return 0
5373
+
5374
+ // Use a for loop to avoid recursion
5375
+ var loweredCase = false
5376
+ for (;;) {
5377
+ switch (encoding) {
5378
+ case 'ascii':
5379
+ case 'latin1':
5380
+ case 'binary':
5381
+ return len
5382
+ case 'utf8':
5383
+ case 'utf-8':
5384
+ case undefined:
5385
+ return utf8ToBytes(string).length
5386
+ case 'ucs2':
5387
+ case 'ucs-2':
5388
+ case 'utf16le':
5389
+ case 'utf-16le':
5390
+ return len * 2
5391
+ case 'hex':
5392
+ return len >>> 1
5393
+ case 'base64':
5394
+ return base64ToBytes(string).length
5395
+ default:
5396
+ if (loweredCase) return utf8ToBytes(string).length // assume utf8
5397
+ encoding = ('' + encoding).toLowerCase()
5398
+ loweredCase = true
5399
+ }
5400
+ }
5401
+ }
5402
+ Buffer.byteLength = byteLength
5403
+
5404
+ function slowToString (encoding, start, end) {
5405
+ var loweredCase = false
5406
+
5407
+ // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
5408
+ // property of a typed array.
5409
+
5410
+ // This behaves neither like String nor Uint8Array in that we set start/end
5411
+ // to their upper/lower bounds if the value passed is out of range.
5412
+ // undefined is handled specially as per ECMA-262 6th Edition,
5413
+ // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
5414
+ if (start === undefined || start < 0) {
5415
+ start = 0
5416
+ }
5417
+ // Return early if start > this.length. Done here to prevent potential uint32
5418
+ // coercion fail below.
5419
+ if (start > this.length) {
5420
+ return ''
5421
+ }
5422
+
5423
+ if (end === undefined || end > this.length) {
5424
+ end = this.length
5425
+ }
5426
+
5427
+ if (end <= 0) {
5428
+ return ''
5429
+ }
5430
+
5431
+ // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
5432
+ end >>>= 0
5433
+ start >>>= 0
5434
+
5435
+ if (end <= start) {
5436
+ return ''
5437
+ }
5438
+
5439
+ if (!encoding) encoding = 'utf8'
5440
+
5441
+ while (true) {
5442
+ switch (encoding) {
5443
+ case 'hex':
5444
+ return hexSlice(this, start, end)
5445
+
5446
+ case 'utf8':
5447
+ case 'utf-8':
5448
+ return utf8Slice(this, start, end)
5449
+
5450
+ case 'ascii':
5451
+ return asciiSlice(this, start, end)
5452
+
5453
+ case 'latin1':
5454
+ case 'binary':
5455
+ return latin1Slice(this, start, end)
5456
+
5457
+ case 'base64':
5458
+ return base64Slice(this, start, end)
5459
+
5460
+ case 'ucs2':
5461
+ case 'ucs-2':
5462
+ case 'utf16le':
5463
+ case 'utf-16le':
5464
+ return utf16leSlice(this, start, end)
5465
+
5466
+ default:
5467
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
5468
+ encoding = (encoding + '').toLowerCase()
5469
+ loweredCase = true
5470
+ }
5471
+ }
5472
+ }
5473
+
5474
+ // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
5475
+ // Buffer instances.
5476
+ Buffer.prototype._isBuffer = true
5477
+
5478
+ function swap (b, n, m) {
5479
+ var i = b[n]
5480
+ b[n] = b[m]
5481
+ b[m] = i
5482
+ }
5483
+
5484
+ Buffer.prototype.swap16 = function swap16 () {
5485
+ var len = this.length
5486
+ if (len % 2 !== 0) {
5487
+ throw new RangeError('Buffer size must be a multiple of 16-bits')
5488
+ }
5489
+ for (var i = 0; i < len; i += 2) {
5490
+ swap(this, i, i + 1)
5491
+ }
5492
+ return this
5493
+ }
5494
+
5495
+ Buffer.prototype.swap32 = function swap32 () {
5496
+ var len = this.length
5497
+ if (len % 4 !== 0) {
5498
+ throw new RangeError('Buffer size must be a multiple of 32-bits')
5499
+ }
5500
+ for (var i = 0; i < len; i += 4) {
5501
+ swap(this, i, i + 3)
5502
+ swap(this, i + 1, i + 2)
5503
+ }
5504
+ return this
5505
+ }
5506
+
5507
+ Buffer.prototype.swap64 = function swap64 () {
5508
+ var len = this.length
5509
+ if (len % 8 !== 0) {
5510
+ throw new RangeError('Buffer size must be a multiple of 64-bits')
5511
+ }
5512
+ for (var i = 0; i < len; i += 8) {
5513
+ swap(this, i, i + 7)
5514
+ swap(this, i + 1, i + 6)
5515
+ swap(this, i + 2, i + 5)
5516
+ swap(this, i + 3, i + 4)
5517
+ }
5518
+ return this
5519
+ }
5520
+
5521
+ Buffer.prototype.toString = function toString () {
5522
+ var length = this.length | 0
5523
+ if (length === 0) return ''
5524
+ if (arguments.length === 0) return utf8Slice(this, 0, length)
5525
+ return slowToString.apply(this, arguments)
5526
+ }
5527
+
5528
+ Buffer.prototype.equals = function equals (b) {
5529
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
5530
+ if (this === b) return true
5531
+ return Buffer.compare(this, b) === 0
5532
+ }
5533
+
5534
+ Buffer.prototype.inspect = function inspect () {
5535
+ var str = ''
5536
+ var max = exports.INSPECT_MAX_BYTES
5537
+ if (this.length > 0) {
5538
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
5539
+ if (this.length > max) str += ' ... '
5540
+ }
5541
+ return '<Buffer ' + str + '>'
5542
+ }
5543
+
5544
+ Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
5545
+ if (!Buffer.isBuffer(target)) {
5546
+ throw new TypeError('Argument must be a Buffer')
5547
+ }
5548
+
5549
+ if (start === undefined) {
5550
+ start = 0
5551
+ }
5552
+ if (end === undefined) {
5553
+ end = target ? target.length : 0
5554
+ }
5555
+ if (thisStart === undefined) {
5556
+ thisStart = 0
5557
+ }
5558
+ if (thisEnd === undefined) {
5559
+ thisEnd = this.length
5560
+ }
5561
+
5562
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
5563
+ throw new RangeError('out of range index')
5564
+ }
5565
+
5566
+ if (thisStart >= thisEnd && start >= end) {
5567
+ return 0
5568
+ }
5569
+ if (thisStart >= thisEnd) {
5570
+ return -1
5571
+ }
5572
+ if (start >= end) {
5573
+ return 1
5574
+ }
5575
+
5576
+ start >>>= 0
5577
+ end >>>= 0
5578
+ thisStart >>>= 0
5579
+ thisEnd >>>= 0
5580
+
5581
+ if (this === target) return 0
5582
+
5583
+ var x = thisEnd - thisStart
5584
+ var y = end - start
5585
+ var len = Math.min(x, y)
5586
+
5587
+ var thisCopy = this.slice(thisStart, thisEnd)
5588
+ var targetCopy = target.slice(start, end)
5589
+
5590
+ for (var i = 0; i < len; ++i) {
5591
+ if (thisCopy[i] !== targetCopy[i]) {
5592
+ x = thisCopy[i]
5593
+ y = targetCopy[i]
5594
+ break
5595
+ }
5596
+ }
5597
+
5598
+ if (x < y) return -1
5599
+ if (y < x) return 1
5600
+ return 0
5601
+ }
5602
+
5603
+ // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
5604
+ // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
5605
+ //
5606
+ // Arguments:
5607
+ // - buffer - a Buffer to search
5608
+ // - val - a string, Buffer, or number
5609
+ // - byteOffset - an index into `buffer`; will be clamped to an int32
5610
+ // - encoding - an optional encoding, relevant is val is a string
5611
+ // - dir - true for indexOf, false for lastIndexOf
5612
+ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
5613
+ // Empty buffer means no match
5614
+ if (buffer.length === 0) return -1
5615
+
5616
+ // Normalize byteOffset
5617
+ if (typeof byteOffset === 'string') {
5618
+ encoding = byteOffset
5619
+ byteOffset = 0
5620
+ } else if (byteOffset > 0x7fffffff) {
5621
+ byteOffset = 0x7fffffff
5622
+ } else if (byteOffset < -0x80000000) {
5623
+ byteOffset = -0x80000000
5624
+ }
5625
+ byteOffset = +byteOffset // Coerce to Number.
5626
+ if (isNaN(byteOffset)) {
5627
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
5628
+ byteOffset = dir ? 0 : (buffer.length - 1)
5629
+ }
5630
+
5631
+ // Normalize byteOffset: negative offsets start from the end of the buffer
5632
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset
5633
+ if (byteOffset >= buffer.length) {
5634
+ if (dir) return -1
5635
+ else byteOffset = buffer.length - 1
5636
+ } else if (byteOffset < 0) {
5637
+ if (dir) byteOffset = 0
5638
+ else return -1
5639
+ }
5640
+
5641
+ // Normalize val
5642
+ if (typeof val === 'string') {
5643
+ val = Buffer.from(val, encoding)
5644
+ }
5645
+
5646
+ // Finally, search either indexOf (if dir is true) or lastIndexOf
5647
+ if (Buffer.isBuffer(val)) {
5648
+ // Special case: looking for empty string/buffer always fails
5649
+ if (val.length === 0) {
5650
+ return -1
5651
+ }
5652
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
5653
+ } else if (typeof val === 'number') {
5654
+ val = val & 0xFF // Search for a byte value [0-255]
5655
+ if (Buffer.TYPED_ARRAY_SUPPORT &&
5656
+ typeof Uint8Array.prototype.indexOf === 'function') {
5657
+ if (dir) {
5658
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
5659
+ } else {
5660
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
5661
+ }
5662
+ }
5663
+ return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
5664
+ }
5665
+
5666
+ throw new TypeError('val must be string, number or Buffer')
5667
+ }
5668
+
5669
+ function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
5670
+ var indexSize = 1
5671
+ var arrLength = arr.length
5672
+ var valLength = val.length
5673
+
5674
+ if (encoding !== undefined) {
5675
+ encoding = String(encoding).toLowerCase()
5676
+ if (encoding === 'ucs2' || encoding === 'ucs-2' ||
5677
+ encoding === 'utf16le' || encoding === 'utf-16le') {
5678
+ if (arr.length < 2 || val.length < 2) {
5679
+ return -1
5680
+ }
5681
+ indexSize = 2
5682
+ arrLength /= 2
5683
+ valLength /= 2
5684
+ byteOffset /= 2
5685
+ }
5686
+ }
5687
+
5688
+ function read (buf, i) {
5689
+ if (indexSize === 1) {
5690
+ return buf[i]
5691
+ } else {
5692
+ return buf.readUInt16BE(i * indexSize)
5693
+ }
5694
+ }
5695
+
5696
+ var i
5697
+ if (dir) {
5698
+ var foundIndex = -1
5699
+ for (i = byteOffset; i < arrLength; i++) {
5700
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
5701
+ if (foundIndex === -1) foundIndex = i
5702
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
5703
+ } else {
5704
+ if (foundIndex !== -1) i -= i - foundIndex
5705
+ foundIndex = -1
5706
+ }
5707
+ }
5708
+ } else {
5709
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
5710
+ for (i = byteOffset; i >= 0; i--) {
5711
+ var found = true
5712
+ for (var j = 0; j < valLength; j++) {
5713
+ if (read(arr, i + j) !== read(val, j)) {
5714
+ found = false
5715
+ break
5716
+ }
5717
+ }
5718
+ if (found) return i
5719
+ }
5720
+ }
5721
+
5722
+ return -1
5723
+ }
5724
+
5725
+ Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
5726
+ return this.indexOf(val, byteOffset, encoding) !== -1
5727
+ }
5728
+
5729
+ Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
5730
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
5731
+ }
5732
+
5733
+ Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
5734
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
5735
+ }
5736
+
5737
+ function hexWrite (buf, string, offset, length) {
5738
+ offset = Number(offset) || 0
5739
+ var remaining = buf.length - offset
5740
+ if (!length) {
5741
+ length = remaining
5742
+ } else {
5743
+ length = Number(length)
5744
+ if (length > remaining) {
5745
+ length = remaining
5746
+ }
5747
+ }
5748
+
5749
+ // must be an even number of digits
5750
+ var strLen = string.length
5751
+ if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
5752
+
5753
+ if (length > strLen / 2) {
5754
+ length = strLen / 2
5755
+ }
5756
+ for (var i = 0; i < length; ++i) {
5757
+ var parsed = parseInt(string.substr(i * 2, 2), 16)
5758
+ if (isNaN(parsed)) return i
5759
+ buf[offset + i] = parsed
5760
+ }
5761
+ return i
5762
+ }
5763
+
5764
+ function utf8Write (buf, string, offset, length) {
5765
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
5766
+ }
5767
+
5768
+ function asciiWrite (buf, string, offset, length) {
5769
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
5770
+ }
5771
+
5772
+ function latin1Write (buf, string, offset, length) {
5773
+ return asciiWrite(buf, string, offset, length)
5774
+ }
5775
+
5776
+ function base64Write (buf, string, offset, length) {
5777
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
5778
+ }
5779
+
5780
+ function ucs2Write (buf, string, offset, length) {
5781
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
5782
+ }
5783
+
5784
+ Buffer.prototype.write = function write (string, offset, length, encoding) {
5785
+ // Buffer#write(string)
5786
+ if (offset === undefined) {
5787
+ encoding = 'utf8'
5788
+ length = this.length
5789
+ offset = 0
5790
+ // Buffer#write(string, encoding)
5791
+ } else if (length === undefined && typeof offset === 'string') {
5792
+ encoding = offset
5793
+ length = this.length
5794
+ offset = 0
5795
+ // Buffer#write(string, offset[, length][, encoding])
5796
+ } else if (isFinite(offset)) {
5797
+ offset = offset | 0
5798
+ if (isFinite(length)) {
5799
+ length = length | 0
5800
+ if (encoding === undefined) encoding = 'utf8'
5801
+ } else {
5802
+ encoding = length
5803
+ length = undefined
5804
+ }
5805
+ // legacy write(string, encoding, offset, length) - remove in v0.13
5806
+ } else {
5807
+ throw new Error(
5808
+ 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
5809
+ )
5810
+ }
5811
+
5812
+ var remaining = this.length - offset
5813
+ if (length === undefined || length > remaining) length = remaining
5814
+
5815
+ if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
5816
+ throw new RangeError('Attempt to write outside buffer bounds')
5817
+ }
5818
+
5819
+ if (!encoding) encoding = 'utf8'
5820
+
5821
+ var loweredCase = false
5822
+ for (;;) {
5823
+ switch (encoding) {
5824
+ case 'hex':
5825
+ return hexWrite(this, string, offset, length)
5826
+
5827
+ case 'utf8':
5828
+ case 'utf-8':
5829
+ return utf8Write(this, string, offset, length)
5830
+
5831
+ case 'ascii':
5832
+ return asciiWrite(this, string, offset, length)
5833
+
5834
+ case 'latin1':
5835
+ case 'binary':
5836
+ return latin1Write(this, string, offset, length)
5837
+
5838
+ case 'base64':
5839
+ // Warning: maxLength not taken into account in base64Write
5840
+ return base64Write(this, string, offset, length)
5841
+
5842
+ case 'ucs2':
5843
+ case 'ucs-2':
5844
+ case 'utf16le':
5845
+ case 'utf-16le':
5846
+ return ucs2Write(this, string, offset, length)
5847
+
5848
+ default:
5849
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
5850
+ encoding = ('' + encoding).toLowerCase()
5851
+ loweredCase = true
5852
+ }
5853
+ }
5854
+ }
5855
+
5856
+ Buffer.prototype.toJSON = function toJSON () {
5857
+ return {
5858
+ type: 'Buffer',
5859
+ data: Array.prototype.slice.call(this._arr || this, 0)
5860
+ }
5861
+ }
5862
+
5863
+ function base64Slice (buf, start, end) {
5864
+ if (start === 0 && end === buf.length) {
5865
+ return base64.fromByteArray(buf)
5866
+ } else {
5867
+ return base64.fromByteArray(buf.slice(start, end))
5868
+ }
5869
+ }
5870
+
5871
+ function utf8Slice (buf, start, end) {
5872
+ end = Math.min(buf.length, end)
5873
+ var res = []
5874
+
5875
+ var i = start
5876
+ while (i < end) {
5877
+ var firstByte = buf[i]
5878
+ var codePoint = null
5879
+ var bytesPerSequence = (firstByte > 0xEF) ? 4
5880
+ : (firstByte > 0xDF) ? 3
5881
+ : (firstByte > 0xBF) ? 2
5882
+ : 1
5883
+
5884
+ if (i + bytesPerSequence <= end) {
5885
+ var secondByte, thirdByte, fourthByte, tempCodePoint
5886
+
5887
+ switch (bytesPerSequence) {
5888
+ case 1:
5889
+ if (firstByte < 0x80) {
5890
+ codePoint = firstByte
5891
+ }
5892
+ break
5893
+ case 2:
5894
+ secondByte = buf[i + 1]
5895
+ if ((secondByte & 0xC0) === 0x80) {
5896
+ tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
5897
+ if (tempCodePoint > 0x7F) {
5898
+ codePoint = tempCodePoint
5899
+ }
5900
+ }
5901
+ break
5902
+ case 3:
5903
+ secondByte = buf[i + 1]
5904
+ thirdByte = buf[i + 2]
5905
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
5906
+ tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
5907
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
5908
+ codePoint = tempCodePoint
5909
+ }
5910
+ }
5911
+ break
5912
+ case 4:
5913
+ secondByte = buf[i + 1]
5914
+ thirdByte = buf[i + 2]
5915
+ fourthByte = buf[i + 3]
5916
+ if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
5917
+ tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
5918
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
5919
+ codePoint = tempCodePoint
5920
+ }
5921
+ }
5922
+ }
5923
+ }
5924
+
5925
+ if (codePoint === null) {
5926
+ // we did not generate a valid codePoint so insert a
5927
+ // replacement char (U+FFFD) and advance only 1 byte
5928
+ codePoint = 0xFFFD
5929
+ bytesPerSequence = 1
5930
+ } else if (codePoint > 0xFFFF) {
5931
+ // encode to utf16 (surrogate pair dance)
5932
+ codePoint -= 0x10000
5933
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800)
5934
+ codePoint = 0xDC00 | codePoint & 0x3FF
5935
+ }
5936
+
5937
+ res.push(codePoint)
5938
+ i += bytesPerSequence
5939
+ }
5940
+
5941
+ return decodeCodePointsArray(res)
5942
+ }
5943
+
5944
+ // Based on http://stackoverflow.com/a/22747272/680742, the browser with
5945
+ // the lowest limit is Chrome, with 0x10000 args.
5946
+ // We go 1 magnitude less, for safety
5947
+ var MAX_ARGUMENTS_LENGTH = 0x1000
5948
+
5949
+ function decodeCodePointsArray (codePoints) {
5950
+ var len = codePoints.length
5951
+ if (len <= MAX_ARGUMENTS_LENGTH) {
5952
+ return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
5953
+ }
5954
+
5955
+ // Decode in chunks to avoid "call stack size exceeded".
5956
+ var res = ''
5957
+ var i = 0
5958
+ while (i < len) {
5959
+ res += String.fromCharCode.apply(
5960
+ String,
5961
+ codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
5962
+ )
5963
+ }
5964
+ return res
5965
+ }
5966
+
5967
+ function asciiSlice (buf, start, end) {
5968
+ var ret = ''
5969
+ end = Math.min(buf.length, end)
5970
+
5971
+ for (var i = start; i < end; ++i) {
5972
+ ret += String.fromCharCode(buf[i] & 0x7F)
5973
+ }
5974
+ return ret
5975
+ }
5976
+
5977
+ function latin1Slice (buf, start, end) {
5978
+ var ret = ''
5979
+ end = Math.min(buf.length, end)
5980
+
5981
+ for (var i = start; i < end; ++i) {
5982
+ ret += String.fromCharCode(buf[i])
5983
+ }
5984
+ return ret
5985
+ }
5986
+
5987
+ function hexSlice (buf, start, end) {
5988
+ var len = buf.length
5989
+
5990
+ if (!start || start < 0) start = 0
5991
+ if (!end || end < 0 || end > len) end = len
5992
+
5993
+ var out = ''
5994
+ for (var i = start; i < end; ++i) {
5995
+ out += toHex(buf[i])
5996
+ }
5997
+ return out
5998
+ }
5999
+
6000
+ function utf16leSlice (buf, start, end) {
6001
+ var bytes = buf.slice(start, end)
6002
+ var res = ''
6003
+ for (var i = 0; i < bytes.length; i += 2) {
6004
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
6005
+ }
6006
+ return res
6007
+ }
6008
+
6009
+ Buffer.prototype.slice = function slice (start, end) {
6010
+ var len = this.length
6011
+ start = ~~start
6012
+ end = end === undefined ? len : ~~end
6013
+
6014
+ if (start < 0) {
6015
+ start += len
6016
+ if (start < 0) start = 0
6017
+ } else if (start > len) {
6018
+ start = len
6019
+ }
6020
+
6021
+ if (end < 0) {
6022
+ end += len
6023
+ if (end < 0) end = 0
6024
+ } else if (end > len) {
6025
+ end = len
6026
+ }
6027
+
6028
+ if (end < start) end = start
6029
+
6030
+ var newBuf
6031
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6032
+ newBuf = this.subarray(start, end)
6033
+ newBuf.__proto__ = Buffer.prototype
6034
+ } else {
6035
+ var sliceLen = end - start
6036
+ newBuf = new Buffer(sliceLen, undefined)
6037
+ for (var i = 0; i < sliceLen; ++i) {
6038
+ newBuf[i] = this[i + start]
6039
+ }
6040
+ }
6041
+
6042
+ return newBuf
6043
+ }
6044
+
6045
+ /*
6046
+ * Need to make sure that buffer isn't trying to write out of bounds.
6047
+ */
6048
+ function checkOffset (offset, ext, length) {
6049
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
6050
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
6051
+ }
6052
+
6053
+ Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
6054
+ offset = offset | 0
6055
+ byteLength = byteLength | 0
6056
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
6057
+
6058
+ var val = this[offset]
6059
+ var mul = 1
6060
+ var i = 0
6061
+ while (++i < byteLength && (mul *= 0x100)) {
6062
+ val += this[offset + i] * mul
6063
+ }
6064
+
6065
+ return val
6066
+ }
6067
+
6068
+ Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
6069
+ offset = offset | 0
6070
+ byteLength = byteLength | 0
6071
+ if (!noAssert) {
6072
+ checkOffset(offset, byteLength, this.length)
6073
+ }
6074
+
6075
+ var val = this[offset + --byteLength]
6076
+ var mul = 1
6077
+ while (byteLength > 0 && (mul *= 0x100)) {
6078
+ val += this[offset + --byteLength] * mul
6079
+ }
6080
+
6081
+ return val
6082
+ }
6083
+
6084
+ Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
6085
+ if (!noAssert) checkOffset(offset, 1, this.length)
6086
+ return this[offset]
6087
+ }
6088
+
6089
+ Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
6090
+ if (!noAssert) checkOffset(offset, 2, this.length)
6091
+ return this[offset] | (this[offset + 1] << 8)
6092
+ }
6093
+
6094
+ Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
6095
+ if (!noAssert) checkOffset(offset, 2, this.length)
6096
+ return (this[offset] << 8) | this[offset + 1]
6097
+ }
6098
+
6099
+ Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
6100
+ if (!noAssert) checkOffset(offset, 4, this.length)
6101
+
6102
+ return ((this[offset]) |
6103
+ (this[offset + 1] << 8) |
6104
+ (this[offset + 2] << 16)) +
6105
+ (this[offset + 3] * 0x1000000)
6106
+ }
6107
+
6108
+ Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
6109
+ if (!noAssert) checkOffset(offset, 4, this.length)
6110
+
6111
+ return (this[offset] * 0x1000000) +
6112
+ ((this[offset + 1] << 16) |
6113
+ (this[offset + 2] << 8) |
6114
+ this[offset + 3])
6115
+ }
6116
+
6117
+ Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
6118
+ offset = offset | 0
6119
+ byteLength = byteLength | 0
6120
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
6121
+
6122
+ var val = this[offset]
6123
+ var mul = 1
6124
+ var i = 0
6125
+ while (++i < byteLength && (mul *= 0x100)) {
6126
+ val += this[offset + i] * mul
6127
+ }
6128
+ mul *= 0x80
6129
+
6130
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
6131
+
6132
+ return val
6133
+ }
6134
+
6135
+ Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
6136
+ offset = offset | 0
6137
+ byteLength = byteLength | 0
6138
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
6139
+
6140
+ var i = byteLength
6141
+ var mul = 1
6142
+ var val = this[offset + --i]
6143
+ while (i > 0 && (mul *= 0x100)) {
6144
+ val += this[offset + --i] * mul
6145
+ }
6146
+ mul *= 0x80
6147
+
6148
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
6149
+
6150
+ return val
6151
+ }
6152
+
6153
+ Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
6154
+ if (!noAssert) checkOffset(offset, 1, this.length)
6155
+ if (!(this[offset] & 0x80)) return (this[offset])
6156
+ return ((0xff - this[offset] + 1) * -1)
6157
+ }
6158
+
6159
+ Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
6160
+ if (!noAssert) checkOffset(offset, 2, this.length)
6161
+ var val = this[offset] | (this[offset + 1] << 8)
6162
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
6163
+ }
6164
+
6165
+ Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
6166
+ if (!noAssert) checkOffset(offset, 2, this.length)
6167
+ var val = this[offset + 1] | (this[offset] << 8)
6168
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
6169
+ }
6170
+
6171
+ Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
6172
+ if (!noAssert) checkOffset(offset, 4, this.length)
6173
+
6174
+ return (this[offset]) |
6175
+ (this[offset + 1] << 8) |
6176
+ (this[offset + 2] << 16) |
6177
+ (this[offset + 3] << 24)
6178
+ }
6179
+
6180
+ Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
6181
+ if (!noAssert) checkOffset(offset, 4, this.length)
6182
+
6183
+ return (this[offset] << 24) |
6184
+ (this[offset + 1] << 16) |
6185
+ (this[offset + 2] << 8) |
6186
+ (this[offset + 3])
6187
+ }
6188
+
6189
+ Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
6190
+ if (!noAssert) checkOffset(offset, 4, this.length)
6191
+ return ieee754.read(this, offset, true, 23, 4)
6192
+ }
6193
+
6194
+ Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
6195
+ if (!noAssert) checkOffset(offset, 4, this.length)
6196
+ return ieee754.read(this, offset, false, 23, 4)
6197
+ }
6198
+
6199
+ Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
6200
+ if (!noAssert) checkOffset(offset, 8, this.length)
6201
+ return ieee754.read(this, offset, true, 52, 8)
6202
+ }
6203
+
6204
+ Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
6205
+ if (!noAssert) checkOffset(offset, 8, this.length)
6206
+ return ieee754.read(this, offset, false, 52, 8)
6207
+ }
6208
+
6209
+ function checkInt (buf, value, offset, ext, max, min) {
6210
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
6211
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
6212
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
6213
+ }
6214
+
6215
+ Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
6216
+ value = +value
6217
+ offset = offset | 0
6218
+ byteLength = byteLength | 0
6219
+ if (!noAssert) {
6220
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
6221
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
6222
+ }
6223
+
6224
+ var mul = 1
6225
+ var i = 0
6226
+ this[offset] = value & 0xFF
6227
+ while (++i < byteLength && (mul *= 0x100)) {
6228
+ this[offset + i] = (value / mul) & 0xFF
6229
+ }
6230
+
6231
+ return offset + byteLength
6232
+ }
6233
+
6234
+ Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
6235
+ value = +value
6236
+ offset = offset | 0
6237
+ byteLength = byteLength | 0
6238
+ if (!noAssert) {
6239
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1
6240
+ checkInt(this, value, offset, byteLength, maxBytes, 0)
6241
+ }
6242
+
6243
+ var i = byteLength - 1
6244
+ var mul = 1
6245
+ this[offset + i] = value & 0xFF
6246
+ while (--i >= 0 && (mul *= 0x100)) {
6247
+ this[offset + i] = (value / mul) & 0xFF
6248
+ }
6249
+
6250
+ return offset + byteLength
6251
+ }
6252
+
6253
+ Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
6254
+ value = +value
6255
+ offset = offset | 0
6256
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
6257
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
6258
+ this[offset] = (value & 0xff)
6259
+ return offset + 1
6260
+ }
6261
+
6262
+ function objectWriteUInt16 (buf, value, offset, littleEndian) {
6263
+ if (value < 0) value = 0xffff + value + 1
6264
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
6265
+ buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
6266
+ (littleEndian ? i : 1 - i) * 8
6267
+ }
6268
+ }
6269
+
6270
+ Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
6271
+ value = +value
6272
+ offset = offset | 0
6273
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
6274
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6275
+ this[offset] = (value & 0xff)
6276
+ this[offset + 1] = (value >>> 8)
6277
+ } else {
6278
+ objectWriteUInt16(this, value, offset, true)
6279
+ }
6280
+ return offset + 2
6281
+ }
6282
+
6283
+ Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
6284
+ value = +value
6285
+ offset = offset | 0
6286
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
6287
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6288
+ this[offset] = (value >>> 8)
6289
+ this[offset + 1] = (value & 0xff)
6290
+ } else {
6291
+ objectWriteUInt16(this, value, offset, false)
6292
+ }
6293
+ return offset + 2
6294
+ }
6295
+
6296
+ function objectWriteUInt32 (buf, value, offset, littleEndian) {
6297
+ if (value < 0) value = 0xffffffff + value + 1
6298
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
6299
+ buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
6300
+ }
6301
+ }
6302
+
6303
+ Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
6304
+ value = +value
6305
+ offset = offset | 0
6306
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
6307
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6308
+ this[offset + 3] = (value >>> 24)
6309
+ this[offset + 2] = (value >>> 16)
6310
+ this[offset + 1] = (value >>> 8)
6311
+ this[offset] = (value & 0xff)
6312
+ } else {
6313
+ objectWriteUInt32(this, value, offset, true)
6314
+ }
6315
+ return offset + 4
6316
+ }
6317
+
6318
+ Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
6319
+ value = +value
6320
+ offset = offset | 0
6321
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
6322
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6323
+ this[offset] = (value >>> 24)
6324
+ this[offset + 1] = (value >>> 16)
6325
+ this[offset + 2] = (value >>> 8)
6326
+ this[offset + 3] = (value & 0xff)
6327
+ } else {
6328
+ objectWriteUInt32(this, value, offset, false)
6329
+ }
6330
+ return offset + 4
6331
+ }
6332
+
6333
+ Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
6334
+ value = +value
6335
+ offset = offset | 0
6336
+ if (!noAssert) {
6337
+ var limit = Math.pow(2, 8 * byteLength - 1)
6338
+
6339
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
6340
+ }
6341
+
6342
+ var i = 0
6343
+ var mul = 1
6344
+ var sub = 0
6345
+ this[offset] = value & 0xFF
6346
+ while (++i < byteLength && (mul *= 0x100)) {
6347
+ if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
6348
+ sub = 1
6349
+ }
6350
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
6351
+ }
6352
+
6353
+ return offset + byteLength
6354
+ }
6355
+
6356
+ Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
6357
+ value = +value
6358
+ offset = offset | 0
6359
+ if (!noAssert) {
6360
+ var limit = Math.pow(2, 8 * byteLength - 1)
6361
+
6362
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
6363
+ }
6364
+
6365
+ var i = byteLength - 1
6366
+ var mul = 1
6367
+ var sub = 0
6368
+ this[offset + i] = value & 0xFF
6369
+ while (--i >= 0 && (mul *= 0x100)) {
6370
+ if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
6371
+ sub = 1
6372
+ }
6373
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
6374
+ }
6375
+
6376
+ return offset + byteLength
6377
+ }
6378
+
6379
+ Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
6380
+ value = +value
6381
+ offset = offset | 0
6382
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
6383
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
6384
+ if (value < 0) value = 0xff + value + 1
6385
+ this[offset] = (value & 0xff)
6386
+ return offset + 1
6387
+ }
6388
+
6389
+ Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
6390
+ value = +value
6391
+ offset = offset | 0
6392
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
6393
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6394
+ this[offset] = (value & 0xff)
6395
+ this[offset + 1] = (value >>> 8)
6396
+ } else {
6397
+ objectWriteUInt16(this, value, offset, true)
6398
+ }
6399
+ return offset + 2
6400
+ }
6401
+
6402
+ Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
6403
+ value = +value
6404
+ offset = offset | 0
6405
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
6406
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6407
+ this[offset] = (value >>> 8)
6408
+ this[offset + 1] = (value & 0xff)
6409
+ } else {
6410
+ objectWriteUInt16(this, value, offset, false)
6411
+ }
6412
+ return offset + 2
6413
+ }
6414
+
6415
+ Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
6416
+ value = +value
6417
+ offset = offset | 0
6418
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
6419
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6420
+ this[offset] = (value & 0xff)
6421
+ this[offset + 1] = (value >>> 8)
6422
+ this[offset + 2] = (value >>> 16)
6423
+ this[offset + 3] = (value >>> 24)
6424
+ } else {
6425
+ objectWriteUInt32(this, value, offset, true)
6426
+ }
6427
+ return offset + 4
6428
+ }
6429
+
6430
+ Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
6431
+ value = +value
6432
+ offset = offset | 0
6433
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
6434
+ if (value < 0) value = 0xffffffff + value + 1
6435
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
6436
+ this[offset] = (value >>> 24)
6437
+ this[offset + 1] = (value >>> 16)
6438
+ this[offset + 2] = (value >>> 8)
6439
+ this[offset + 3] = (value & 0xff)
6440
+ } else {
6441
+ objectWriteUInt32(this, value, offset, false)
6442
+ }
6443
+ return offset + 4
6444
+ }
6445
+
6446
+ function checkIEEE754 (buf, value, offset, ext, max, min) {
6447
+ if (offset + ext > buf.length) throw new RangeError('Index out of range')
6448
+ if (offset < 0) throw new RangeError('Index out of range')
6449
+ }
6450
+
6451
+ function writeFloat (buf, value, offset, littleEndian, noAssert) {
6452
+ if (!noAssert) {
6453
+ checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
6454
+ }
6455
+ ieee754.write(buf, value, offset, littleEndian, 23, 4)
6456
+ return offset + 4
4171
6457
  }
4172
6458
 
4173
- /**
4174
- * Creates a unary function that invokes `func` with its argument transformed.
4175
- *
4176
- * @private
4177
- * @param {Function} func The function to wrap.
4178
- * @param {Function} transform The argument transform.
4179
- * @returns {Function} Returns the new function.
4180
- */
4181
- function overArg(func, transform) {
4182
- return function(arg) {
4183
- return func(transform(arg));
4184
- };
6459
+ Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
6460
+ return writeFloat(this, value, offset, true, noAssert)
4185
6461
  }
4186
6462
 
4187
- /** Used for built-in method references. */
4188
- var funcProto = Function.prototype,
4189
- objectProto = Object.prototype;
6463
+ Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
6464
+ return writeFloat(this, value, offset, false, noAssert)
6465
+ }
4190
6466
 
4191
- /** Used to resolve the decompiled source of functions. */
4192
- var funcToString = funcProto.toString;
6467
+ function writeDouble (buf, value, offset, littleEndian, noAssert) {
6468
+ if (!noAssert) {
6469
+ checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
6470
+ }
6471
+ ieee754.write(buf, value, offset, littleEndian, 52, 8)
6472
+ return offset + 8
6473
+ }
4193
6474
 
4194
- /** Used to check objects for own properties. */
4195
- var hasOwnProperty = objectProto.hasOwnProperty;
6475
+ Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
6476
+ return writeDouble(this, value, offset, true, noAssert)
6477
+ }
4196
6478
 
4197
- /** Used to infer the `Object` constructor. */
4198
- var objectCtorString = funcToString.call(Object);
6479
+ Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
6480
+ return writeDouble(this, value, offset, false, noAssert)
6481
+ }
4199
6482
 
4200
- /**
4201
- * Used to resolve the
4202
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4203
- * of values.
4204
- */
4205
- var objectToString = objectProto.toString;
6483
+ // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
6484
+ Buffer.prototype.copy = function copy (target, targetStart, start, end) {
6485
+ if (!start) start = 0
6486
+ if (!end && end !== 0) end = this.length
6487
+ if (targetStart >= target.length) targetStart = target.length
6488
+ if (!targetStart) targetStart = 0
6489
+ if (end > 0 && end < start) end = start
6490
+
6491
+ // Copy 0 bytes; we're done
6492
+ if (end === start) return 0
6493
+ if (target.length === 0 || this.length === 0) return 0
6494
+
6495
+ // Fatal error conditions
6496
+ if (targetStart < 0) {
6497
+ throw new RangeError('targetStart out of bounds')
6498
+ }
6499
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
6500
+ if (end < 0) throw new RangeError('sourceEnd out of bounds')
4206
6501
 
4207
- /** Built-in value references. */
4208
- var getPrototype = overArg(Object.getPrototypeOf, Object);
6502
+ // Are we oob?
6503
+ if (end > this.length) end = this.length
6504
+ if (target.length - targetStart < end - start) {
6505
+ end = target.length - targetStart + start
6506
+ }
4209
6507
 
4210
- /**
4211
- * Checks if `value` is object-like. A value is object-like if it's not `null`
4212
- * and has a `typeof` result of "object".
4213
- *
4214
- * @static
4215
- * @memberOf _
4216
- * @since 4.0.0
4217
- * @category Lang
4218
- * @param {*} value The value to check.
4219
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4220
- * @example
4221
- *
4222
- * _.isObjectLike({});
4223
- * // => true
4224
- *
4225
- * _.isObjectLike([1, 2, 3]);
4226
- * // => true
4227
- *
4228
- * _.isObjectLike(_.noop);
4229
- * // => false
4230
- *
4231
- * _.isObjectLike(null);
4232
- * // => false
4233
- */
4234
- function isObjectLike(value) {
4235
- return !!value && typeof value == 'object';
6508
+ var len = end - start
6509
+ var i
6510
+
6511
+ if (this === target && start < targetStart && targetStart < end) {
6512
+ // descending copy from end
6513
+ for (i = len - 1; i >= 0; --i) {
6514
+ target[i + targetStart] = this[i + start]
6515
+ }
6516
+ } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
6517
+ // ascending copy from start
6518
+ for (i = 0; i < len; ++i) {
6519
+ target[i + targetStart] = this[i + start]
6520
+ }
6521
+ } else {
6522
+ Uint8Array.prototype.set.call(
6523
+ target,
6524
+ this.subarray(start, start + len),
6525
+ targetStart
6526
+ )
6527
+ }
6528
+
6529
+ return len
4236
6530
  }
4237
6531
 
4238
- /**
4239
- * Checks if `value` is a plain object, that is, an object created by the
4240
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
4241
- *
4242
- * @static
4243
- * @memberOf _
4244
- * @since 0.8.0
4245
- * @category Lang
4246
- * @param {*} value The value to check.
4247
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
4248
- * @example
4249
- *
4250
- * function Foo() {
4251
- * this.a = 1;
4252
- * }
4253
- *
4254
- * _.isPlainObject(new Foo);
4255
- * // => false
4256
- *
4257
- * _.isPlainObject([1, 2, 3]);
4258
- * // => false
4259
- *
4260
- * _.isPlainObject({ 'x': 0, 'y': 0 });
4261
- * // => true
4262
- *
4263
- * _.isPlainObject(Object.create(null));
4264
- * // => true
4265
- */
4266
- function isPlainObject(value) {
4267
- if (!isObjectLike(value) ||
4268
- objectToString.call(value) != objectTag || isHostObject(value)) {
4269
- return false;
6532
+ // Usage:
6533
+ // buffer.fill(number[, offset[, end]])
6534
+ // buffer.fill(buffer[, offset[, end]])
6535
+ // buffer.fill(string[, offset[, end]][, encoding])
6536
+ Buffer.prototype.fill = function fill (val, start, end, encoding) {
6537
+ // Handle string cases:
6538
+ if (typeof val === 'string') {
6539
+ if (typeof start === 'string') {
6540
+ encoding = start
6541
+ start = 0
6542
+ end = this.length
6543
+ } else if (typeof end === 'string') {
6544
+ encoding = end
6545
+ end = this.length
6546
+ }
6547
+ if (val.length === 1) {
6548
+ var code = val.charCodeAt(0)
6549
+ if (code < 256) {
6550
+ val = code
6551
+ }
6552
+ }
6553
+ if (encoding !== undefined && typeof encoding !== 'string') {
6554
+ throw new TypeError('encoding must be a string')
6555
+ }
6556
+ if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
6557
+ throw new TypeError('Unknown encoding: ' + encoding)
6558
+ }
6559
+ } else if (typeof val === 'number') {
6560
+ val = val & 255
4270
6561
  }
4271
- var proto = getPrototype(value);
4272
- if (proto === null) {
4273
- return true;
6562
+
6563
+ // Invalid ranges are not set to a default, so can range check early.
6564
+ if (start < 0 || this.length < start || this.length < end) {
6565
+ throw new RangeError('Out of range index')
4274
6566
  }
4275
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
4276
- return (typeof Ctor == 'function' &&
4277
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
6567
+
6568
+ if (end <= start) {
6569
+ return this
6570
+ }
6571
+
6572
+ start = start >>> 0
6573
+ end = end === undefined ? this.length : end >>> 0
6574
+
6575
+ if (!val) val = 0
6576
+
6577
+ var i
6578
+ if (typeof val === 'number') {
6579
+ for (i = start; i < end; ++i) {
6580
+ this[i] = val
6581
+ }
6582
+ } else {
6583
+ var bytes = Buffer.isBuffer(val)
6584
+ ? val
6585
+ : utf8ToBytes(new Buffer(val, encoding).toString())
6586
+ var len = bytes.length
6587
+ for (i = 0; i < end - start; ++i) {
6588
+ this[i + start] = bytes[i % len]
6589
+ }
6590
+ }
6591
+
6592
+ return this
4278
6593
  }
4279
6594
 
4280
- module.exports = isPlainObject;
6595
+ // HELPER FUNCTIONS
6596
+ // ================
4281
6597
 
6598
+ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
4282
6599
 
4283
- /***/ }),
6600
+ function base64clean (str) {
6601
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
6602
+ str = stringtrim(str).replace(INVALID_BASE64_RE, '')
6603
+ // Node converts strings with length < 2 to ''
6604
+ if (str.length < 2) return ''
6605
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
6606
+ while (str.length % 4 !== 0) {
6607
+ str = str + '='
6608
+ }
6609
+ return str
6610
+ }
4284
6611
 
4285
- /***/ "../node_modules/lodash.isstring/index.js":
4286
- /*!************************************************!*\
4287
- !*** ../node_modules/lodash.isstring/index.js ***!
4288
- \************************************************/
4289
- /*! no static exports found */
4290
- /***/ (function(module, exports) {
6612
+ function stringtrim (str) {
6613
+ if (str.trim) return str.trim()
6614
+ return str.replace(/^\s+|\s+$/g, '')
6615
+ }
4291
6616
 
4292
- /**
4293
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
4294
- * Build: `lodash modularize exports="npm" -o ./`
4295
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
4296
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
4297
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4298
- * Available under MIT license <https://lodash.com/license>
4299
- */
6617
+ function toHex (n) {
6618
+ if (n < 16) return '0' + n.toString(16)
6619
+ return n.toString(16)
6620
+ }
4300
6621
 
4301
- /** `Object#toString` result references. */
4302
- var stringTag = '[object String]';
6622
+ function utf8ToBytes (string, units) {
6623
+ units = units || Infinity
6624
+ var codePoint
6625
+ var length = string.length
6626
+ var leadSurrogate = null
6627
+ var bytes = []
6628
+
6629
+ for (var i = 0; i < length; ++i) {
6630
+ codePoint = string.charCodeAt(i)
6631
+
6632
+ // is surrogate component
6633
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
6634
+ // last char was a lead
6635
+ if (!leadSurrogate) {
6636
+ // no lead yet
6637
+ if (codePoint > 0xDBFF) {
6638
+ // unexpected trail
6639
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
6640
+ continue
6641
+ } else if (i + 1 === length) {
6642
+ // unpaired lead
6643
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
6644
+ continue
6645
+ }
4303
6646
 
4304
- /** Used for built-in method references. */
4305
- var objectProto = Object.prototype;
6647
+ // valid lead
6648
+ leadSurrogate = codePoint
4306
6649
 
4307
- /**
4308
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
4309
- * of values.
4310
- */
4311
- var objectToString = objectProto.toString;
6650
+ continue
6651
+ }
4312
6652
 
4313
- /**
4314
- * Checks if `value` is classified as an `Array` object.
4315
- *
4316
- * @static
4317
- * @memberOf _
4318
- * @type Function
4319
- * @category Lang
4320
- * @param {*} value The value to check.
4321
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
4322
- * @example
4323
- *
4324
- * _.isArray([1, 2, 3]);
4325
- * // => true
4326
- *
4327
- * _.isArray(document.body.children);
4328
- * // => false
4329
- *
4330
- * _.isArray('abc');
4331
- * // => false
4332
- *
4333
- * _.isArray(_.noop);
4334
- * // => false
4335
- */
4336
- var isArray = Array.isArray;
6653
+ // 2 leads in a row
6654
+ if (codePoint < 0xDC00) {
6655
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
6656
+ leadSurrogate = codePoint
6657
+ continue
6658
+ }
4337
6659
 
4338
- /**
4339
- * Checks if `value` is object-like. A value is object-like if it's not `null`
4340
- * and has a `typeof` result of "object".
4341
- *
4342
- * @static
4343
- * @memberOf _
4344
- * @category Lang
4345
- * @param {*} value The value to check.
4346
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4347
- * @example
4348
- *
4349
- * _.isObjectLike({});
4350
- * // => true
4351
- *
4352
- * _.isObjectLike([1, 2, 3]);
4353
- * // => true
4354
- *
4355
- * _.isObjectLike(_.noop);
4356
- * // => false
4357
- *
4358
- * _.isObjectLike(null);
4359
- * // => false
4360
- */
4361
- function isObjectLike(value) {
4362
- return !!value && typeof value == 'object';
6660
+ // valid surrogate pair
6661
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
6662
+ } else if (leadSurrogate) {
6663
+ // valid bmp char, but last char was a lead
6664
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
6665
+ }
6666
+
6667
+ leadSurrogate = null
6668
+
6669
+ // encode utf8
6670
+ if (codePoint < 0x80) {
6671
+ if ((units -= 1) < 0) break
6672
+ bytes.push(codePoint)
6673
+ } else if (codePoint < 0x800) {
6674
+ if ((units -= 2) < 0) break
6675
+ bytes.push(
6676
+ codePoint >> 0x6 | 0xC0,
6677
+ codePoint & 0x3F | 0x80
6678
+ )
6679
+ } else if (codePoint < 0x10000) {
6680
+ if ((units -= 3) < 0) break
6681
+ bytes.push(
6682
+ codePoint >> 0xC | 0xE0,
6683
+ codePoint >> 0x6 & 0x3F | 0x80,
6684
+ codePoint & 0x3F | 0x80
6685
+ )
6686
+ } else if (codePoint < 0x110000) {
6687
+ if ((units -= 4) < 0) break
6688
+ bytes.push(
6689
+ codePoint >> 0x12 | 0xF0,
6690
+ codePoint >> 0xC & 0x3F | 0x80,
6691
+ codePoint >> 0x6 & 0x3F | 0x80,
6692
+ codePoint & 0x3F | 0x80
6693
+ )
6694
+ } else {
6695
+ throw new Error('Invalid code point')
6696
+ }
6697
+ }
6698
+
6699
+ return bytes
4363
6700
  }
4364
6701
 
4365
- /**
4366
- * Checks if `value` is classified as a `String` primitive or object.
4367
- *
4368
- * @static
4369
- * @memberOf _
4370
- * @category Lang
4371
- * @param {*} value The value to check.
4372
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
4373
- * @example
4374
- *
4375
- * _.isString('abc');
4376
- * // => true
4377
- *
4378
- * _.isString(1);
4379
- * // => false
4380
- */
4381
- function isString(value) {
4382
- return typeof value == 'string' ||
4383
- (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
6702
+ function asciiToBytes (str) {
6703
+ var byteArray = []
6704
+ for (var i = 0; i < str.length; ++i) {
6705
+ // Node's code seems to be doing this and not & 0x7F..
6706
+ byteArray.push(str.charCodeAt(i) & 0xFF)
6707
+ }
6708
+ return byteArray
4384
6709
  }
4385
6710
 
4386
- module.exports = isString;
6711
+ function utf16leToBytes (str, units) {
6712
+ var c, hi, lo
6713
+ var byteArray = []
6714
+ for (var i = 0; i < str.length; ++i) {
6715
+ if ((units -= 2) < 0) break
6716
+
6717
+ c = str.charCodeAt(i)
6718
+ hi = c >> 8
6719
+ lo = c % 256
6720
+ byteArray.push(lo)
6721
+ byteArray.push(hi)
6722
+ }
6723
+
6724
+ return byteArray
6725
+ }
6726
+
6727
+ function base64ToBytes (str) {
6728
+ return base64.toByteArray(base64clean(str))
6729
+ }
6730
+
6731
+ function blitBuffer (src, dst, offset, length) {
6732
+ for (var i = 0; i < length; ++i) {
6733
+ if ((i + offset >= dst.length) || (i >= src.length)) break
6734
+ dst[i + offset] = src[i]
6735
+ }
6736
+ return i
6737
+ }
4387
6738
 
6739
+ function isnan (val) {
6740
+ return val !== val // eslint-disable-line no-self-compare
6741
+ }
6742
+
6743
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
4388
6744
 
4389
6745
  /***/ }),
4390
6746
 
@@ -8192,24 +10548,38 @@ function http(http, url, config) {
8192
10548
  /*!***************************************************!*\
8193
10549
  !*** ./adapters/REST/endpoints/release-action.ts ***!
8194
10550
  \***************************************************/
8195
- /*! exports provided: get, queryForRelease */
10551
+ /*! exports provided: get, getMany, queryForRelease */
8196
10552
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
8197
10553
 
8198
10554
  "use strict";
8199
10555
  __webpack_require__.r(__webpack_exports__);
8200
10556
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
10557
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMany", function() { return getMany; });
8201
10558
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryForRelease", function() { return queryForRelease; });
8202
10559
  /* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
10560
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10561
+
10562
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10563
+
10564
+ function _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; }
10565
+
8203
10566
  /* eslint-disable @typescript-eslint/no-explicit-any */
8204
10567
 
8205
10568
  var get = function get(http, params) {
8206
10569
  return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/actions/").concat(params.actionId));
8207
10570
  };
8208
- var queryForRelease = function queryForRelease(http, params) {
8209
- return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/actions"), {
10571
+ var getMany = function getMany(http, params) {
10572
+ return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/release_actions"), {
8210
10573
  params: params.query
8211
10574
  });
8212
10575
  };
10576
+ var queryForRelease = function queryForRelease(http, params) {
10577
+ return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/release_actions"), {
10578
+ params: _objectSpread({
10579
+ 'sys.release.sys.id[in]': params.releaseId
10580
+ }, params.query)
10581
+ });
10582
+ };
8213
10583
 
8214
10584
  /***/ }),
8215
10585
 
@@ -10181,7 +12551,7 @@ function createClient(params) {
10181
12551
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10182
12552
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
10183
12553
  var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
10184
- "".concat(sdkMain, "/").concat("10.0.0"), params.application, params.integration, params.feature);
12554
+ "".concat(sdkMain, "/").concat("10.1.2"), params.application, params.integration, params.feature);
10185
12555
  var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
10186
12556
  // https://github.com/microsoft/TypeScript/issues/26591
10187
12557
  // @ts-expect-error
@@ -13634,22 +16004,20 @@ function createEnvironmentApi(makeRequest) {
13634
16004
  *
13635
16005
  * client.getSpace('<space_id>')
13636
16006
  * .then((space) => space.getEnvironment('<environment-id>'))
13637
- * .then((environment) => environment.getReleaseActions({ releaseId: '<release_id>', query: { 'sys.id[in]': '<id_1>,<id_2>' } }))
16007
+ * .then((environment) => environment.getReleaseActions({ query: { 'sys.id[in]': '<id_1>,<id_2>', 'sys.release.sys.id[in]': '<id1>,<id2>' } }))
13638
16008
  * .then((releaseActions) => console.log(releaseActions))
13639
16009
  * .catch(console.error)
13640
16010
  * ```
13641
16011
  */
13642
16012
  getReleaseActions: function getReleaseActions(_ref9) {
13643
- var releaseId = _ref9.releaseId,
13644
- query = _ref9.query;
16013
+ var query = _ref9.query;
13645
16014
  var raw = this.toPlainObject();
13646
16015
  return makeRequest({
13647
16016
  entityType: 'ReleaseAction',
13648
- action: 'queryForRelease',
16017
+ action: 'getMany',
13649
16018
  params: {
13650
16019
  spaceId: raw.sys.space.sys.id,
13651
16020
  environmentId: raw.sys.id,
13652
- releaseId: releaseId,
13653
16021
  query: query
13654
16022
  }
13655
16023
  }).then(function (data) {
@@ -20612,6 +22980,7 @@ var createPlainClient = function createPlainClient(makeRequest, defaults, alphaF
20612
22980
  },
20613
22981
  releaseAction: {
20614
22982
  get: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'ReleaseAction', 'get'),
22983
+ getMany: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'ReleaseAction', 'getMany'),
20615
22984
  queryForRelease: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'ReleaseAction', 'queryForRelease')
20616
22985
  },
20617
22986
  role: {