@bigbinary/neeto-media-recorder 2.6.19 → 2.7.1

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.
package/core.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import axios from 'axios';
2
- import { isPresent, existsBy, isNotEmpty, isNot, noop } from '@bigbinary/neeto-cist';
3
- import { RETRYABLE_ERRORS, MIME_TYPE as MIME_TYPE$1, UPLOAD_EVENT, UPLOAD_STATUS, SCREEN_RECORDER_STATUS, START_RECORDING_SOUND, RECORDING_LIMIT_REACHED_WARNING_SOUND, SCREEN_RECORDER_ERROR, SCREEN_RECORDER_EVENT, RECORDING_TIME_LIMIT_FREE_PLAN, ONE_SECOND, HALF_A_SECOND_IN_MILLISECONDS, ONE_SECOND_IN_MILLISECONDS, TWO_HUNDRED_MILLISECONDS, ONE_MINUTE_IN_MILLISECONDS, STOP_RECORDING_DUE_TO_LIMIT_REACHED_SOUND, IS_EXTENSION } from '@bigbinary/neeto-media-recorder/constants';
2
+ import { isNotEmpty, existsBy, isNot, noop } from '@bigbinary/neeto-cist';
3
+ import { MIME_TYPE as MIME_TYPE$1, UPLOAD_EVENT, UPLOAD_STATUS, SCREEN_RECORDER_STATUS, START_RECORDING_SOUND, RECORDING_LIMIT_REACHED_WARNING_SOUND, RECORDING_TIME_LIMIT_FREE_PLAN, SCREEN_RECORDER_ERROR, SCREEN_RECORDER_EVENT, ONE_SECOND, HALF_A_SECOND_IN_MILLISECONDS, ONE_SECOND_IN_MILLISECONDS, TWO_HUNDRED_MILLISECONDS, ONE_MINUTE_IN_MILLISECONDS, STOP_RECORDING_DUE_TO_LIMIT_REACHED_SOUND, IS_EXTENSION } from '@bigbinary/neeto-media-recorder/constants';
4
4
  import { useMultipartS3UploadStatus as useMultipartS3UploadStatus$1, getMultipartS3Uploader as getMultipartS3Uploader$1 } from '@bigbinary/neeto-media-recorder/core';
5
5
  import { isNotNil, min, isNil, identity, isEmpty, pick, equals, not } from 'ramda';
6
6
  import platform from 'platform';
@@ -8,166 +8,141 @@ import withImmutableActions from '@bigbinary/neeto-commons-frontend/react-utils/
8
8
  import { create as create$3 } from 'zustand';
9
9
  import { useSyncExternalStore } from 'react';
10
10
 
11
- function _arrayLikeToArray(arr, len) {
12
- if (len == null || len > arr.length) len = arr.length;
13
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
14
- return arr2;
11
+ function _arrayLikeToArray(r, a) {
12
+ (null == a || a > r.length) && (a = r.length);
13
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
14
+ return n;
15
15
  }
16
16
 
17
- function _arrayWithoutHoles(arr) {
18
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
17
+ function _arrayWithoutHoles(r) {
18
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
19
19
  }
20
20
 
21
- function _iterableToArray(iter) {
22
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
21
+ function _iterableToArray(r) {
22
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
23
23
  }
24
24
 
25
- function _unsupportedIterableToArray(o, minLen) {
26
- if (!o) return;
27
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
28
- var n = Object.prototype.toString.call(o).slice(8, -1);
29
- if (n === "Object" && o.constructor) n = o.constructor.name;
30
- if (n === "Map" || n === "Set") return Array.from(o);
31
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
25
+ function _unsupportedIterableToArray(r, a) {
26
+ if (r) {
27
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
28
+ var t = {}.toString.call(r).slice(8, -1);
29
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
30
+ }
32
31
  }
33
32
 
34
33
  function _nonIterableSpread() {
35
34
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
36
35
  }
37
36
 
38
- function _toConsumableArray(arr) {
39
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
37
+ function _toConsumableArray(r) {
38
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
40
39
  }
41
40
 
42
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
41
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
43
42
  try {
44
- var info = gen[key](arg);
45
- var value = info.value;
46
- } catch (error) {
47
- reject(error);
48
- return;
49
- }
50
- if (info.done) {
51
- resolve(value);
52
- } else {
53
- Promise.resolve(value).then(_next, _throw);
43
+ var i = n[a](c),
44
+ u = i.value;
45
+ } catch (n) {
46
+ return void e(n);
54
47
  }
48
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
55
49
  }
56
- function _asyncToGenerator(fn) {
50
+ function _asyncToGenerator(n) {
57
51
  return function () {
58
- var self = this,
59
- args = arguments;
60
- return new Promise(function (resolve, reject) {
61
- var gen = fn.apply(self, args);
62
- function _next(value) {
63
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
52
+ var t = this,
53
+ e = arguments;
54
+ return new Promise(function (r, o) {
55
+ var a = n.apply(t, e);
56
+ function _next(n) {
57
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
64
58
  }
65
- function _throw(err) {
66
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
59
+ function _throw(n) {
60
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
67
61
  }
68
- _next(undefined);
62
+ _next(void 0);
69
63
  });
70
64
  };
71
65
  }
72
66
 
73
- function _classCallCheck(instance, Constructor) {
74
- if (!(instance instanceof Constructor)) {
75
- throw new TypeError("Cannot call a class as a function");
76
- }
67
+ function _classCallCheck(a, n) {
68
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
77
69
  }
78
70
 
79
- function _typeof$1(obj) {
71
+ function _typeof$1(o) {
80
72
  "@babel/helpers - typeof";
81
73
 
82
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
83
- return typeof obj;
84
- } : function (obj) {
85
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
86
- }, _typeof$1(obj);
74
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
75
+ return typeof o;
76
+ } : function (o) {
77
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
78
+ }, _typeof$1(o);
87
79
  }
88
80
 
89
- function _toPrimitive(input, hint) {
90
- if (_typeof$1(input) !== "object" || input === null) return input;
91
- var prim = input[Symbol.toPrimitive];
92
- if (prim !== undefined) {
93
- var res = prim.call(input, hint);
94
- if (_typeof$1(res) !== "object") return res;
81
+ function toPrimitive(t, r) {
82
+ if ("object" != _typeof$1(t) || !t) return t;
83
+ var e = t[Symbol.toPrimitive];
84
+ if (void 0 !== e) {
85
+ var i = e.call(t, r || "default");
86
+ if ("object" != _typeof$1(i)) return i;
95
87
  throw new TypeError("@@toPrimitive must return a primitive value.");
96
88
  }
97
- return (String )(input);
89
+ return ("string" === r ? String : Number)(t);
98
90
  }
99
91
 
100
- function _toPropertyKey(arg) {
101
- var key = _toPrimitive(arg, "string");
102
- return _typeof$1(key) === "symbol" ? key : String(key);
92
+ function toPropertyKey(t) {
93
+ var i = toPrimitive(t, "string");
94
+ return "symbol" == _typeof$1(i) ? i : i + "";
103
95
  }
104
96
 
105
- function _defineProperties(target, props) {
106
- for (var i = 0; i < props.length; i++) {
107
- var descriptor = props[i];
108
- descriptor.enumerable = descriptor.enumerable || false;
109
- descriptor.configurable = true;
110
- if ("value" in descriptor) descriptor.writable = true;
111
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
97
+ function _defineProperties(e, r) {
98
+ for (var t = 0; t < r.length; t++) {
99
+ var o = r[t];
100
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
112
101
  }
113
102
  }
114
- function _createClass(Constructor, protoProps, staticProps) {
115
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
116
- Object.defineProperty(Constructor, "prototype", {
117
- writable: false
118
- });
119
- return Constructor;
103
+ function _createClass(e, r, t) {
104
+ return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
105
+ writable: !1
106
+ }), e;
120
107
  }
121
108
 
122
- function _defineProperty(obj, key, value) {
123
- key = _toPropertyKey(key);
124
- if (key in obj) {
125
- Object.defineProperty(obj, key, {
126
- value: value,
127
- enumerable: true,
128
- configurable: true,
129
- writable: true
130
- });
131
- } else {
132
- obj[key] = value;
133
- }
134
- return obj;
109
+ function _defineProperty(e, r, t) {
110
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
111
+ value: t,
112
+ enumerable: !0,
113
+ configurable: !0,
114
+ writable: !0
115
+ }) : e[r] = t, e;
135
116
  }
136
117
 
137
- function _classApplyDescriptorSet(receiver, descriptor, value) {
138
- if (descriptor.set) {
139
- descriptor.set.call(receiver, value);
140
- } else {
141
- if (!descriptor.writable) {
142
- throw new TypeError("attempted to set read only private field");
143
- }
144
- descriptor.value = value;
118
+ function _classApplyDescriptorSet(e, t, l) {
119
+ if (t.set) t.set.call(e, l);else {
120
+ if (!t.writable) throw new TypeError("attempted to set read only private field");
121
+ t.value = l;
145
122
  }
146
123
  }
147
124
 
148
- function _classExtractFieldDescriptor(receiver, privateMap, action) {
149
- if (!privateMap.has(receiver)) {
150
- throw new TypeError("attempted to " + action + " private field on non-instance");
151
- }
152
- return privateMap.get(receiver);
125
+ function _assertClassBrand(e, t, n) {
126
+ if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
127
+ throw new TypeError("Private element is not present on this object");
153
128
  }
154
129
 
155
- function _classPrivateFieldSet(receiver, privateMap, value) {
156
- var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set");
157
- _classApplyDescriptorSet(receiver, descriptor, value);
158
- return value;
130
+ function _classPrivateFieldGet2(s, a) {
131
+ return s.get(_assertClassBrand(s, a));
159
132
  }
160
133
 
161
- function _classApplyDescriptorGet(receiver, descriptor) {
162
- if (descriptor.get) {
163
- return descriptor.get.call(receiver);
164
- }
165
- return descriptor.value;
134
+ function _classPrivateFieldSet(e, t, r) {
135
+ var s = _classPrivateFieldGet2(t, e);
136
+ return _classApplyDescriptorSet(e, s, r), r;
166
137
  }
167
138
 
168
- function _classPrivateFieldGet(receiver, privateMap) {
169
- var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get");
170
- return _classApplyDescriptorGet(receiver, descriptor);
139
+ function _classApplyDescriptorGet(e, t) {
140
+ return t.get ? t.get.call(e) : t.value;
141
+ }
142
+
143
+ function _classPrivateFieldGet(e, t) {
144
+ var r = _classPrivateFieldGet2(t, e);
145
+ return _classApplyDescriptorGet(e, r);
171
146
  }
172
147
 
173
148
  function getDefaultExportFromCjs (x) {
@@ -179,14 +154,14 @@ var regeneratorRuntime$1 = {exports: {}};
179
154
  var _typeof = {exports: {}};
180
155
 
181
156
  (function (module) {
182
- function _typeof(obj) {
157
+ function _typeof(o) {
183
158
  "@babel/helpers - typeof";
184
159
 
185
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
186
- return typeof obj;
187
- } : function (obj) {
188
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
189
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
160
+ return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
161
+ return typeof o;
162
+ } : function (o) {
163
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
164
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
190
165
  }
191
166
  module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
192
167
  } (_typeof));
@@ -197,304 +172,304 @@ var _typeofExports = _typeof.exports;
197
172
  var _typeof = _typeofExports["default"];
198
173
  function _regeneratorRuntime() {
199
174
  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
200
- return exports;
175
+ return e;
201
176
  }, module.exports.__esModule = true, module.exports["default"] = module.exports;
202
- var exports = {},
203
- Op = Object.prototype,
204
- hasOwn = Op.hasOwnProperty,
205
- defineProperty = Object.defineProperty || function (obj, key, desc) {
206
- obj[key] = desc.value;
177
+ var t,
178
+ e = {},
179
+ r = Object.prototype,
180
+ n = r.hasOwnProperty,
181
+ o = Object.defineProperty || function (t, e, r) {
182
+ t[e] = r.value;
207
183
  },
208
- $Symbol = "function" == typeof Symbol ? Symbol : {},
209
- iteratorSymbol = $Symbol.iterator || "@@iterator",
210
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
211
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
212
- function define(obj, key, value) {
213
- return Object.defineProperty(obj, key, {
214
- value: value,
184
+ i = "function" == typeof Symbol ? Symbol : {},
185
+ a = i.iterator || "@@iterator",
186
+ c = i.asyncIterator || "@@asyncIterator",
187
+ u = i.toStringTag || "@@toStringTag";
188
+ function define(t, e, r) {
189
+ return Object.defineProperty(t, e, {
190
+ value: r,
215
191
  enumerable: !0,
216
192
  configurable: !0,
217
193
  writable: !0
218
- }), obj[key];
194
+ }), t[e];
219
195
  }
220
196
  try {
221
197
  define({}, "");
222
- } catch (err) {
223
- define = function define(obj, key, value) {
224
- return obj[key] = value;
198
+ } catch (t) {
199
+ define = function define(t, e, r) {
200
+ return t[e] = r;
225
201
  };
226
202
  }
227
- function wrap(innerFn, outerFn, self, tryLocsList) {
228
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
229
- generator = Object.create(protoGenerator.prototype),
230
- context = new Context(tryLocsList || []);
231
- return defineProperty(generator, "_invoke", {
232
- value: makeInvokeMethod(innerFn, self, context)
233
- }), generator;
203
+ function wrap(t, e, r, n) {
204
+ var i = e && e.prototype instanceof Generator ? e : Generator,
205
+ a = Object.create(i.prototype),
206
+ c = new Context(n || []);
207
+ return o(a, "_invoke", {
208
+ value: makeInvokeMethod(t, r, c)
209
+ }), a;
234
210
  }
235
- function tryCatch(fn, obj, arg) {
211
+ function tryCatch(t, e, r) {
236
212
  try {
237
213
  return {
238
214
  type: "normal",
239
- arg: fn.call(obj, arg)
215
+ arg: t.call(e, r)
240
216
  };
241
- } catch (err) {
217
+ } catch (t) {
242
218
  return {
243
219
  type: "throw",
244
- arg: err
220
+ arg: t
245
221
  };
246
222
  }
247
223
  }
248
- exports.wrap = wrap;
249
- var ContinueSentinel = {};
224
+ e.wrap = wrap;
225
+ var h = "suspendedStart",
226
+ l = "suspendedYield",
227
+ f = "executing",
228
+ s = "completed",
229
+ y = {};
250
230
  function Generator() {}
251
231
  function GeneratorFunction() {}
252
232
  function GeneratorFunctionPrototype() {}
253
- var IteratorPrototype = {};
254
- define(IteratorPrototype, iteratorSymbol, function () {
233
+ var p = {};
234
+ define(p, a, function () {
255
235
  return this;
256
236
  });
257
- var getProto = Object.getPrototypeOf,
258
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
259
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
260
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
261
- function defineIteratorMethods(prototype) {
262
- ["next", "throw", "return"].forEach(function (method) {
263
- define(prototype, method, function (arg) {
264
- return this._invoke(method, arg);
237
+ var d = Object.getPrototypeOf,
238
+ v = d && d(d(values([])));
239
+ v && v !== r && n.call(v, a) && (p = v);
240
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
241
+ function defineIteratorMethods(t) {
242
+ ["next", "throw", "return"].forEach(function (e) {
243
+ define(t, e, function (t) {
244
+ return this._invoke(e, t);
265
245
  });
266
246
  });
267
247
  }
268
- function AsyncIterator(generator, PromiseImpl) {
269
- function invoke(method, arg, resolve, reject) {
270
- var record = tryCatch(generator[method], generator, arg);
271
- if ("throw" !== record.type) {
272
- var result = record.arg,
273
- value = result.value;
274
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
275
- invoke("next", value, resolve, reject);
276
- }, function (err) {
277
- invoke("throw", err, resolve, reject);
278
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
279
- result.value = unwrapped, resolve(result);
280
- }, function (error) {
281
- return invoke("throw", error, resolve, reject);
248
+ function AsyncIterator(t, e) {
249
+ function invoke(r, o, i, a) {
250
+ var c = tryCatch(t[r], t, o);
251
+ if ("throw" !== c.type) {
252
+ var u = c.arg,
253
+ h = u.value;
254
+ return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
255
+ invoke("next", t, i, a);
256
+ }, function (t) {
257
+ invoke("throw", t, i, a);
258
+ }) : e.resolve(h).then(function (t) {
259
+ u.value = t, i(u);
260
+ }, function (t) {
261
+ return invoke("throw", t, i, a);
282
262
  });
283
263
  }
284
- reject(record.arg);
264
+ a(c.arg);
285
265
  }
286
- var previousPromise;
287
- defineProperty(this, "_invoke", {
288
- value: function value(method, arg) {
266
+ var r;
267
+ o(this, "_invoke", {
268
+ value: function value(t, n) {
289
269
  function callInvokeWithMethodAndArg() {
290
- return new PromiseImpl(function (resolve, reject) {
291
- invoke(method, arg, resolve, reject);
270
+ return new e(function (e, r) {
271
+ invoke(t, n, e, r);
292
272
  });
293
273
  }
294
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
274
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
295
275
  }
296
276
  });
297
277
  }
298
- function makeInvokeMethod(innerFn, self, context) {
299
- var state = "suspendedStart";
300
- return function (method, arg) {
301
- if ("executing" === state) throw new Error("Generator is already running");
302
- if ("completed" === state) {
303
- if ("throw" === method) throw arg;
304
- return doneResult();
278
+ function makeInvokeMethod(e, r, n) {
279
+ var o = h;
280
+ return function (i, a) {
281
+ if (o === f) throw Error("Generator is already running");
282
+ if (o === s) {
283
+ if ("throw" === i) throw a;
284
+ return {
285
+ value: t,
286
+ done: !0
287
+ };
305
288
  }
306
- for (context.method = method, context.arg = arg;;) {
307
- var delegate = context.delegate;
308
- if (delegate) {
309
- var delegateResult = maybeInvokeDelegate(delegate, context);
310
- if (delegateResult) {
311
- if (delegateResult === ContinueSentinel) continue;
312
- return delegateResult;
289
+ for (n.method = i, n.arg = a;;) {
290
+ var c = n.delegate;
291
+ if (c) {
292
+ var u = maybeInvokeDelegate(c, n);
293
+ if (u) {
294
+ if (u === y) continue;
295
+ return u;
313
296
  }
314
297
  }
315
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
316
- if ("suspendedStart" === state) throw state = "completed", context.arg;
317
- context.dispatchException(context.arg);
318
- } else "return" === context.method && context.abrupt("return", context.arg);
319
- state = "executing";
320
- var record = tryCatch(innerFn, self, context);
321
- if ("normal" === record.type) {
322
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
298
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
299
+ if (o === h) throw o = s, n.arg;
300
+ n.dispatchException(n.arg);
301
+ } else "return" === n.method && n.abrupt("return", n.arg);
302
+ o = f;
303
+ var p = tryCatch(e, r, n);
304
+ if ("normal" === p.type) {
305
+ if (o = n.done ? s : l, p.arg === y) continue;
323
306
  return {
324
- value: record.arg,
325
- done: context.done
307
+ value: p.arg,
308
+ done: n.done
326
309
  };
327
310
  }
328
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
311
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
329
312
  }
330
313
  };
331
314
  }
332
- function maybeInvokeDelegate(delegate, context) {
333
- var methodName = context.method,
334
- method = delegate.iterator[methodName];
335
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
336
- var record = tryCatch(method, delegate.iterator, context.arg);
337
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
338
- var info = record.arg;
339
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
315
+ function maybeInvokeDelegate(e, r) {
316
+ var n = r.method,
317
+ o = e.iterator[n];
318
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
319
+ var i = tryCatch(o, e.iterator, r.arg);
320
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
321
+ var a = i.arg;
322
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
340
323
  }
341
- function pushTryEntry(locs) {
342
- var entry = {
343
- tryLoc: locs[0]
324
+ function pushTryEntry(t) {
325
+ var e = {
326
+ tryLoc: t[0]
344
327
  };
345
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
328
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
346
329
  }
347
- function resetTryEntry(entry) {
348
- var record = entry.completion || {};
349
- record.type = "normal", delete record.arg, entry.completion = record;
330
+ function resetTryEntry(t) {
331
+ var e = t.completion || {};
332
+ e.type = "normal", delete e.arg, t.completion = e;
350
333
  }
351
- function Context(tryLocsList) {
334
+ function Context(t) {
352
335
  this.tryEntries = [{
353
336
  tryLoc: "root"
354
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
337
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
355
338
  }
356
- function values(iterable) {
357
- if (iterable) {
358
- var iteratorMethod = iterable[iteratorSymbol];
359
- if (iteratorMethod) return iteratorMethod.call(iterable);
360
- if ("function" == typeof iterable.next) return iterable;
361
- if (!isNaN(iterable.length)) {
362
- var i = -1,
363
- next = function next() {
364
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
365
- return next.value = undefined, next.done = !0, next;
339
+ function values(e) {
340
+ if (e || "" === e) {
341
+ var r = e[a];
342
+ if (r) return r.call(e);
343
+ if ("function" == typeof e.next) return e;
344
+ if (!isNaN(e.length)) {
345
+ var o = -1,
346
+ i = function next() {
347
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
348
+ return next.value = t, next.done = !0, next;
366
349
  };
367
- return next.next = next;
350
+ return i.next = i;
368
351
  }
369
352
  }
370
- return {
371
- next: doneResult
372
- };
353
+ throw new TypeError(_typeof(e) + " is not iterable");
373
354
  }
374
- function doneResult() {
375
- return {
376
- value: undefined,
377
- done: !0
378
- };
379
- }
380
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
355
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
381
356
  value: GeneratorFunctionPrototype,
382
357
  configurable: !0
383
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
358
+ }), o(GeneratorFunctionPrototype, "constructor", {
384
359
  value: GeneratorFunction,
385
360
  configurable: !0
386
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
387
- var ctor = "function" == typeof genFun && genFun.constructor;
388
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
389
- }, exports.mark = function (genFun) {
390
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
391
- }, exports.awrap = function (arg) {
361
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
362
+ var e = "function" == typeof t && t.constructor;
363
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
364
+ }, e.mark = function (t) {
365
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
366
+ }, e.awrap = function (t) {
392
367
  return {
393
- __await: arg
368
+ __await: t
394
369
  };
395
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
370
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
396
371
  return this;
397
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
398
- void 0 === PromiseImpl && (PromiseImpl = Promise);
399
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
400
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
401
- return result.done ? result.value : iter.next();
372
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
373
+ void 0 === i && (i = Promise);
374
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
375
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
376
+ return t.done ? t.value : a.next();
402
377
  });
403
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
378
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
404
379
  return this;
405
- }), define(Gp, "toString", function () {
380
+ }), define(g, "toString", function () {
406
381
  return "[object Generator]";
407
- }), exports.keys = function (val) {
408
- var object = Object(val),
409
- keys = [];
410
- for (var key in object) keys.push(key);
411
- return keys.reverse(), function next() {
412
- for (; keys.length;) {
413
- var key = keys.pop();
414
- if (key in object) return next.value = key, next.done = !1, next;
382
+ }), e.keys = function (t) {
383
+ var e = Object(t),
384
+ r = [];
385
+ for (var n in e) r.push(n);
386
+ return r.reverse(), function next() {
387
+ for (; r.length;) {
388
+ var t = r.pop();
389
+ if (t in e) return next.value = t, next.done = !1, next;
415
390
  }
416
391
  return next.done = !0, next;
417
392
  };
418
- }, exports.values = values, Context.prototype = {
393
+ }, e.values = values, Context.prototype = {
419
394
  constructor: Context,
420
- reset: function reset(skipTempReset) {
421
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
395
+ reset: function reset(e) {
396
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
422
397
  },
423
398
  stop: function stop() {
424
399
  this.done = !0;
425
- var rootRecord = this.tryEntries[0].completion;
426
- if ("throw" === rootRecord.type) throw rootRecord.arg;
400
+ var t = this.tryEntries[0].completion;
401
+ if ("throw" === t.type) throw t.arg;
427
402
  return this.rval;
428
403
  },
429
- dispatchException: function dispatchException(exception) {
430
- if (this.done) throw exception;
431
- var context = this;
432
- function handle(loc, caught) {
433
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
404
+ dispatchException: function dispatchException(e) {
405
+ if (this.done) throw e;
406
+ var r = this;
407
+ function handle(n, o) {
408
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
434
409
  }
435
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
436
- var entry = this.tryEntries[i],
437
- record = entry.completion;
438
- if ("root" === entry.tryLoc) return handle("end");
439
- if (entry.tryLoc <= this.prev) {
440
- var hasCatch = hasOwn.call(entry, "catchLoc"),
441
- hasFinally = hasOwn.call(entry, "finallyLoc");
442
- if (hasCatch && hasFinally) {
443
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
444
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
445
- } else if (hasCatch) {
446
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
410
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
411
+ var i = this.tryEntries[o],
412
+ a = i.completion;
413
+ if ("root" === i.tryLoc) return handle("end");
414
+ if (i.tryLoc <= this.prev) {
415
+ var c = n.call(i, "catchLoc"),
416
+ u = n.call(i, "finallyLoc");
417
+ if (c && u) {
418
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
419
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
420
+ } else if (c) {
421
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
447
422
  } else {
448
- if (!hasFinally) throw new Error("try statement without catch or finally");
449
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
423
+ if (!u) throw Error("try statement without catch or finally");
424
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
450
425
  }
451
426
  }
452
427
  }
453
428
  },
454
- abrupt: function abrupt(type, arg) {
455
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
456
- var entry = this.tryEntries[i];
457
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
458
- var finallyEntry = entry;
429
+ abrupt: function abrupt(t, e) {
430
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
431
+ var o = this.tryEntries[r];
432
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
433
+ var i = o;
459
434
  break;
460
435
  }
461
436
  }
462
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
463
- var record = finallyEntry ? finallyEntry.completion : {};
464
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
437
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
438
+ var a = i ? i.completion : {};
439
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
465
440
  },
466
- complete: function complete(record, afterLoc) {
467
- if ("throw" === record.type) throw record.arg;
468
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
441
+ complete: function complete(t, e) {
442
+ if ("throw" === t.type) throw t.arg;
443
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
469
444
  },
470
- finish: function finish(finallyLoc) {
471
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
472
- var entry = this.tryEntries[i];
473
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
445
+ finish: function finish(t) {
446
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
447
+ var r = this.tryEntries[e];
448
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
474
449
  }
475
450
  },
476
- "catch": function _catch(tryLoc) {
477
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
478
- var entry = this.tryEntries[i];
479
- if (entry.tryLoc === tryLoc) {
480
- var record = entry.completion;
481
- if ("throw" === record.type) {
482
- var thrown = record.arg;
483
- resetTryEntry(entry);
451
+ "catch": function _catch(t) {
452
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
453
+ var r = this.tryEntries[e];
454
+ if (r.tryLoc === t) {
455
+ var n = r.completion;
456
+ if ("throw" === n.type) {
457
+ var o = n.arg;
458
+ resetTryEntry(r);
484
459
  }
485
- return thrown;
460
+ return o;
486
461
  }
487
462
  }
488
- throw new Error("illegal catch attempt");
463
+ throw Error("illegal catch attempt");
489
464
  },
490
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
465
+ delegateYield: function delegateYield(e, r, n) {
491
466
  return this.delegate = {
492
- iterator: values(iterable),
493
- resultName: resultName,
494
- nextLoc: nextLoc
495
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
467
+ iterator: values(e),
468
+ resultName: r,
469
+ nextLoc: n
470
+ }, "next" === this.method && (this.arg = t), y;
496
471
  }
497
- }, exports;
472
+ }, e;
498
473
  }
499
474
  module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
500
475
  } (regeneratorRuntime$1));
@@ -572,111 +547,88 @@ function v4(options, buf, offset) {
572
547
  return unsafeStringify(rnds);
573
548
  }
574
549
 
575
- function _setPrototypeOf(o, p) {
576
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
577
- o.__proto__ = p;
578
- return o;
579
- };
580
- return _setPrototypeOf(o, p);
550
+ function _setPrototypeOf(t, e) {
551
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
552
+ return t.__proto__ = e, t;
553
+ }, _setPrototypeOf(t, e);
581
554
  }
582
555
 
583
- function _inherits(subClass, superClass) {
584
- if (typeof superClass !== "function" && superClass !== null) {
585
- throw new TypeError("Super expression must either be null or a function");
586
- }
587
- subClass.prototype = Object.create(superClass && superClass.prototype, {
556
+ function _inherits(t, e) {
557
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
558
+ t.prototype = Object.create(e && e.prototype, {
588
559
  constructor: {
589
- value: subClass,
590
- writable: true,
591
- configurable: true
560
+ value: t,
561
+ writable: !0,
562
+ configurable: !0
592
563
  }
593
- });
594
- Object.defineProperty(subClass, "prototype", {
595
- writable: false
596
- });
597
- if (superClass) _setPrototypeOf(subClass, superClass);
564
+ }), Object.defineProperty(t, "prototype", {
565
+ writable: !1
566
+ }), e && _setPrototypeOf(t, e);
598
567
  }
599
568
 
600
- function _assertThisInitialized(self) {
601
- if (self === void 0) {
602
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
603
- }
604
- return self;
569
+ function _assertThisInitialized(e) {
570
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
571
+ return e;
605
572
  }
606
573
 
607
- function _possibleConstructorReturn(self, call) {
608
- if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
609
- return call;
610
- } else if (call !== void 0) {
611
- throw new TypeError("Derived constructors may only return object or undefined");
612
- }
613
- return _assertThisInitialized(self);
574
+ function _possibleConstructorReturn(t, e) {
575
+ if (e && ("object" == _typeof$1(e) || "function" == typeof e)) return e;
576
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
577
+ return _assertThisInitialized(t);
614
578
  }
615
579
 
616
- function _getPrototypeOf(o) {
617
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
618
- return o.__proto__ || Object.getPrototypeOf(o);
619
- };
620
- return _getPrototypeOf(o);
580
+ function _getPrototypeOf(t) {
581
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
582
+ return t.__proto__ || Object.getPrototypeOf(t);
583
+ }, _getPrototypeOf(t);
621
584
  }
622
585
 
623
- function _isNativeFunction(fn) {
624
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
586
+ function _isNativeFunction(t) {
587
+ try {
588
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
589
+ } catch (n) {
590
+ return "function" == typeof t;
591
+ }
625
592
  }
626
593
 
627
594
  function _isNativeReflectConstruct$1() {
628
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
629
- if (Reflect.construct.sham) return false;
630
- if (typeof Proxy === "function") return true;
631
595
  try {
632
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
633
- return true;
634
- } catch (e) {
635
- return false;
636
- }
596
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
597
+ } catch (t) {}
598
+ return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() {
599
+ return !!t;
600
+ })();
637
601
  }
638
602
 
639
- function _construct(Parent, args, Class) {
640
- if (_isNativeReflectConstruct$1()) {
641
- _construct = Reflect.construct.bind();
642
- } else {
643
- _construct = function _construct(Parent, args, Class) {
644
- var a = [null];
645
- a.push.apply(a, args);
646
- var Constructor = Function.bind.apply(Parent, a);
647
- var instance = new Constructor();
648
- if (Class) _setPrototypeOf(instance, Class.prototype);
649
- return instance;
650
- };
651
- }
652
- return _construct.apply(null, arguments);
603
+ function _construct(t, e, r) {
604
+ if (_isNativeReflectConstruct$1()) return Reflect.construct.apply(null, arguments);
605
+ var o = [null];
606
+ o.push.apply(o, e);
607
+ var p = new (t.bind.apply(t, o))();
608
+ return r && _setPrototypeOf(p, r.prototype), p;
653
609
  }
654
610
 
655
- function _wrapNativeSuper(Class) {
656
- var _cache = typeof Map === "function" ? new Map() : undefined;
657
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
658
- if (Class === null || !_isNativeFunction(Class)) return Class;
659
- if (typeof Class !== "function") {
660
- throw new TypeError("Super expression must either be null or a function");
661
- }
662
- if (typeof _cache !== "undefined") {
663
- if (_cache.has(Class)) return _cache.get(Class);
664
- _cache.set(Class, Wrapper);
611
+ function _wrapNativeSuper(t) {
612
+ var r = "function" == typeof Map ? new Map() : void 0;
613
+ return _wrapNativeSuper = function _wrapNativeSuper(t) {
614
+ if (null === t || !_isNativeFunction(t)) return t;
615
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
616
+ if (void 0 !== r) {
617
+ if (r.has(t)) return r.get(t);
618
+ r.set(t, Wrapper);
665
619
  }
666
620
  function Wrapper() {
667
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
621
+ return _construct(t, arguments, _getPrototypeOf(this).constructor);
668
622
  }
669
- Wrapper.prototype = Object.create(Class.prototype, {
623
+ return Wrapper.prototype = Object.create(t.prototype, {
670
624
  constructor: {
671
625
  value: Wrapper,
672
- enumerable: false,
673
- writable: true,
674
- configurable: true
626
+ enumerable: !1,
627
+ writable: !0,
628
+ configurable: !0
675
629
  }
676
- });
677
- return _setPrototypeOf(Wrapper, Class);
678
- };
679
- return _wrapNativeSuper(Class);
630
+ }), _setPrototypeOf(Wrapper, t);
631
+ }, _wrapNativeSuper(t);
680
632
  }
681
633
 
682
634
  var TOTAL_RETRIES = 15;
@@ -687,11 +639,6 @@ var DEFAULT_RETRY_CONFIG = {
687
639
  retryDelay: INITIAL_RETRY_DELAY,
688
640
  retryableStatuses: []
689
641
  };
690
-
691
- // No need to localize this since it will only be used in the code
692
- // eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized
693
- var NETWORK_ERROR = "Network Error";
694
- var TIMEOUT_ERROR = "ECONNABORTED";
695
642
  var HAS_CHROME_NAMESPACE = (typeof chrome === "undefined" ? "undefined" : _typeof$1(chrome)) === "object";
696
643
  HAS_CHROME_NAMESPACE && isNotNil(chrome.extension);
697
644
  platform.name === "Safari";
@@ -707,8 +654,8 @@ var sleep = function sleep(delay) {
707
654
  });
708
655
  };
709
656
 
710
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
711
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
657
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
658
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
712
659
  var RetryError = /*#__PURE__*/function (_Error) {
713
660
  _inherits(RetryError, _Error);
714
661
  var _super = _createSuper(RetryError);
@@ -723,12 +670,11 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
723
670
  _ref$retries = _ref.retries,
724
671
  retries = _ref$retries === void 0 ? TOTAL_RETRIES : _ref$retries,
725
672
  _ref$retryDelay = _ref.retryDelay,
726
- retryDelay = _ref$retryDelay === void 0 ? INITIAL_RETRY_DELAY : _ref$retryDelay,
727
- retryableStatuses = _ref.retryableStatuses;
673
+ retryDelay = _ref$retryDelay === void 0 ? INITIAL_RETRY_DELAY : _ref$retryDelay;
728
674
  return /*#__PURE__*/function () {
729
675
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(apiConnectorArgs) {
730
676
  var _config$signal;
731
- var _apiConnectorArgs$con, config, remainingAttempts, shouldCancelRetries, _error$config, _error$response, isRetryableStatus, isRetryableError;
677
+ var _apiConnectorArgs$con, config, remainingAttempts, shouldCancelRetries, _error$config, _error$response, _error$response2;
732
678
  return _regeneratorRuntime.wrap(function _callee$(_context) {
733
679
  while (1) switch (_context.prev = _context.next) {
734
680
  case 0:
@@ -740,7 +686,7 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
740
686
  });
741
687
  case 4:
742
688
  if (!(remainingAttempts-- && !shouldCancelRetries)) {
743
- _context.next = 26;
689
+ _context.next = 24;
744
690
  break;
745
691
  }
746
692
  _context.prev = 5;
@@ -751,28 +697,26 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
751
697
  case 11:
752
698
  _context.prev = 11;
753
699
  _context.t0 = _context["catch"](5);
754
- logger.error("buildRetryableApi -> Failed to connect, remainingAttempts:", _context.t0 === null || _context.t0 === void 0 ? void 0 : (_error$config = _context.t0.config) === null || _error$config === void 0 ? void 0 : _error$config.url, remainingAttempts);
755
- isRetryableStatus = isPresent(retryableStatuses) && retryableStatuses.includes((_error$response = _context.t0.response) === null || _error$response === void 0 ? void 0 : _error$response.status);
756
- isRetryableError = isRetryableStatus || _context.t0.message === NETWORK_ERROR || _context.t0.code === TIMEOUT_ERROR;
757
- if (!(isRetryableError && remainingAttempts > 0)) {
758
- _context.next = 23;
700
+ logger.error("buildRetryableApi -> Failed to connect, remainingAttempts:", _context.t0 === null || _context.t0 === void 0 ? void 0 : (_error$config = _context.t0.config) === null || _error$config === void 0 ? void 0 : _error$config.url, (_error$response = _context.t0.response) === null || _error$response === void 0 ? void 0 : _error$response.status, remainingAttempts);
701
+ if (!(((_error$response2 = _context.t0.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.status) !== 401 && remainingAttempts > 0)) {
702
+ _context.next = 21;
759
703
  break;
760
704
  }
761
- logger.info("buildRetryableApi -> Failed to connect, retry in:", retryDelay);
762
- _context.next = 20;
705
+ logger.info("buildRetryableApi -> Failed to connect -> retry in:", retryDelay);
706
+ _context.next = 18;
763
707
  return sleep(retryDelay);
764
- case 20:
708
+ case 18:
765
709
  retryDelay = min(retryDelay * 2, MAX_RETRY_DELAY);
766
- _context.next = 24;
710
+ _context.next = 22;
767
711
  break;
768
- case 23:
712
+ case 21:
769
713
  throw _context.t0;
770
- case 24:
714
+ case 22:
771
715
  _context.next = 4;
772
716
  break;
773
- case 26:
717
+ case 24:
774
718
  throw new RetryError("Request cancelled or request retries exhausted");
775
- case 27:
719
+ case 25:
776
720
  case "end":
777
721
  return _context.stop();
778
722
  }
@@ -906,9 +850,7 @@ var presignedUpload = function presignedUpload(_ref) {
906
850
  config = _ref.config;
907
851
  return s3AxiosInstance.put(presignedUrl, blob, config);
908
852
  };
909
- var retryablePresignedUpload = buildRetryableApi(presignedUpload, {
910
- retryableStatuses: RETRYABLE_ERRORS
911
- });
853
+ var retryablePresignedUpload = buildRetryableApi(presignedUpload);
912
854
  var s3Api = {
913
855
  presignedUpload: retryablePresignedUpload
914
856
  };
@@ -968,10 +910,10 @@ var calculateUploadProgress = function calculateUploadProgress(uploadProgress) {
968
910
  return Math.round(uploaded * 100 / total);
969
911
  };
970
912
 
971
- function ownKeys$2(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; }
972
- function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
973
- function _classPrivateFieldInitSpec$1(obj, privateMap, value) { _checkPrivateRedeclaration$1(obj, privateMap); privateMap.set(obj, value); }
974
- function _checkPrivateRedeclaration$1(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
913
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
914
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
915
+ function _classPrivateFieldInitSpec$1(e, t, a) { _checkPrivateRedeclaration$1(e, t), t.set(e, a); }
916
+ function _checkPrivateRedeclaration$1(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
975
917
  var _recordingId = /*#__PURE__*/new WeakMap();
976
918
  var _uploadId = /*#__PURE__*/new WeakMap();
977
919
  var _unUploadedChunks = /*#__PURE__*/new WeakMap();
@@ -1457,32 +1399,32 @@ var getMultipartS3Uploader = function getMultipartS3Uploader() {
1457
1399
  return multipartS3Uploader;
1458
1400
  };
1459
1401
 
1460
- function _arrayWithHoles(arr) {
1461
- if (Array.isArray(arr)) return arr;
1402
+ function _arrayWithHoles(r) {
1403
+ if (Array.isArray(r)) return r;
1462
1404
  }
1463
1405
 
1464
- function _iterableToArrayLimit(arr, i) {
1465
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1466
- if (null != _i) {
1467
- var _s,
1468
- _e,
1469
- _x,
1470
- _r,
1471
- _arr = [],
1472
- _n = !0,
1473
- _d = !1;
1406
+ function _iterableToArrayLimit(r, l) {
1407
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1408
+ if (null != t) {
1409
+ var e,
1410
+ n,
1411
+ i,
1412
+ u,
1413
+ a = [],
1414
+ f = !0,
1415
+ o = !1;
1474
1416
  try {
1475
- if (_x = (_i = _i.call(arr)).next, 0 === i) ; else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1476
- } catch (err) {
1477
- _d = !0, _e = err;
1417
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
1418
+ } catch (r) {
1419
+ o = !0, n = r;
1478
1420
  } finally {
1479
1421
  try {
1480
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1422
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
1481
1423
  } finally {
1482
- if (_d) throw _e;
1424
+ if (o) throw n;
1483
1425
  }
1484
1426
  }
1485
- return _arr;
1427
+ return a;
1486
1428
  }
1487
1429
  }
1488
1430
 
@@ -1490,8 +1432,8 @@ function _nonIterableRest() {
1490
1432
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1491
1433
  }
1492
1434
 
1493
- function _slicedToArray(arr, i) {
1494
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1435
+ function _slicedToArray(r, e) {
1436
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
1495
1437
  }
1496
1438
 
1497
1439
  // https://www.w3.org/TR/screen-capture/#displaycapturesurfacetype
@@ -1501,8 +1443,8 @@ var DISPLAY_SURFACE = {
1501
1443
  browser: "browser"
1502
1444
  };
1503
1445
 
1504
- function ownKeys$1(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; }
1505
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1446
+ function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1447
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1506
1448
  var initialState = {
1507
1449
  status: SCREEN_RECORDER_STATUS.idle,
1508
1450
  error: "",
@@ -1520,10 +1462,10 @@ var prepareStore = function prepareStore() {
1520
1462
  }));
1521
1463
  };
1522
1464
 
1523
- 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; }
1524
- 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; }
1525
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
1526
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1465
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1466
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1467
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
1468
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
1527
1469
  var _audio = /*#__PURE__*/new WeakMap();
1528
1470
  var _video = /*#__PURE__*/new WeakMap();
1529
1471
  var _videoStream = /*#__PURE__*/new WeakMap();