oro-sdk 5.0.2 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,614 +5,1029 @@ import * as oroToolbox from 'oro-toolbox';
5
5
  export { oroToolbox as OroToolboxNamespace };
6
6
  import { getMany } from 'idb-keyval';
7
7
 
8
- function _regeneratorRuntime() {
9
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
8
+ function _wrapRegExp() {
9
+ _wrapRegExp = function (re, groups) {
10
+ return new BabelRegExp(re, void 0, groups);
11
+ };
12
+
13
+ var _super = RegExp.prototype,
14
+ _groups = new WeakMap();
15
+
16
+ function BabelRegExp(re, flags, groups) {
17
+ var _this = new RegExp(re, flags);
18
+
19
+ return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);
20
+ }
21
+
22
+ function buildGroups(result, re) {
23
+ var g = _groups.get(re);
24
+
25
+ return Object.keys(g).reduce(function (groups, name) {
26
+ return groups[name] = result[g[name]], groups;
27
+ }, Object.create(null));
28
+ }
29
+
30
+ return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
31
+ var result = _super.exec.call(this, str);
32
+
33
+ return result && (result.groups = buildGroups(result, this)), result;
34
+ }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
35
+ if ("string" == typeof substitution) {
36
+ var groups = _groups.get(this);
37
+
38
+ return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
39
+ return "$" + groups[name];
40
+ }));
41
+ }
42
+
43
+ if ("function" == typeof substitution) {
44
+ var _this = this;
45
+
46
+ return _super[Symbol.replace].call(this, str, function () {
47
+ var args = arguments;
48
+ return "object" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);
49
+ });
50
+ }
51
+
52
+ return _super[Symbol.replace].call(this, str, substitution);
53
+ }, _wrapRegExp.apply(this, arguments);
54
+ }
55
+
56
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
57
+ try {
58
+ var info = gen[key](arg);
59
+ var value = info.value;
60
+ } catch (error) {
61
+ reject(error);
62
+ return;
63
+ }
10
64
 
11
- _regeneratorRuntime = function () {
12
- return exports;
65
+ if (info.done) {
66
+ resolve(value);
67
+ } else {
68
+ Promise.resolve(value).then(_next, _throw);
69
+ }
70
+ }
71
+
72
+ function _asyncToGenerator(fn) {
73
+ return function () {
74
+ var self = this,
75
+ args = arguments;
76
+ return new Promise(function (resolve, reject) {
77
+ var gen = fn.apply(self, args);
78
+
79
+ function _next(value) {
80
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
81
+ }
82
+
83
+ function _throw(err) {
84
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
85
+ }
86
+
87
+ _next(undefined);
88
+ });
89
+ };
90
+ }
91
+
92
+ function _extends() {
93
+ _extends = Object.assign || function (target) {
94
+ for (var i = 1; i < arguments.length; i++) {
95
+ var source = arguments[i];
96
+
97
+ for (var key in source) {
98
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
99
+ target[key] = source[key];
100
+ }
101
+ }
102
+ }
103
+
104
+ return target;
13
105
  };
14
106
 
15
- var exports = {},
16
- Op = Object.prototype,
17
- hasOwn = Op.hasOwnProperty,
18
- $Symbol = "function" == typeof Symbol ? Symbol : {},
19
- iteratorSymbol = $Symbol.iterator || "@@iterator",
20
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
21
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
107
+ return _extends.apply(this, arguments);
108
+ }
109
+
110
+ function _inherits(subClass, superClass) {
111
+ if (typeof superClass !== "function" && superClass !== null) {
112
+ throw new TypeError("Super expression must either be null or a function");
113
+ }
114
+
115
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
116
+ constructor: {
117
+ value: subClass,
118
+ writable: true,
119
+ configurable: true
120
+ }
121
+ });
122
+ Object.defineProperty(subClass, "prototype", {
123
+ writable: false
124
+ });
125
+ if (superClass) _setPrototypeOf(subClass, superClass);
126
+ }
127
+
128
+ function _inheritsLoose(subClass, superClass) {
129
+ subClass.prototype = Object.create(superClass.prototype);
130
+ subClass.prototype.constructor = subClass;
131
+
132
+ _setPrototypeOf(subClass, superClass);
133
+ }
134
+
135
+ function _getPrototypeOf(o) {
136
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
137
+ return o.__proto__ || Object.getPrototypeOf(o);
138
+ };
139
+ return _getPrototypeOf(o);
140
+ }
141
+
142
+ function _setPrototypeOf(o, p) {
143
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
144
+ o.__proto__ = p;
145
+ return o;
146
+ };
147
+
148
+ return _setPrototypeOf(o, p);
149
+ }
150
+
151
+ function _isNativeReflectConstruct() {
152
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
153
+ if (Reflect.construct.sham) return false;
154
+ if (typeof Proxy === "function") return true;
155
+
156
+ try {
157
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
158
+ return true;
159
+ } catch (e) {
160
+ return false;
161
+ }
162
+ }
163
+
164
+ function _construct(Parent, args, Class) {
165
+ if (_isNativeReflectConstruct()) {
166
+ _construct = Reflect.construct;
167
+ } else {
168
+ _construct = function _construct(Parent, args, Class) {
169
+ var a = [null];
170
+ a.push.apply(a, args);
171
+ var Constructor = Function.bind.apply(Parent, a);
172
+ var instance = new Constructor();
173
+ if (Class) _setPrototypeOf(instance, Class.prototype);
174
+ return instance;
175
+ };
176
+ }
177
+
178
+ return _construct.apply(null, arguments);
179
+ }
180
+
181
+ function _isNativeFunction(fn) {
182
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
183
+ }
184
+
185
+ function _wrapNativeSuper(Class) {
186
+ var _cache = typeof Map === "function" ? new Map() : undefined;
187
+
188
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
189
+ if (Class === null || !_isNativeFunction(Class)) return Class;
190
+
191
+ if (typeof Class !== "function") {
192
+ throw new TypeError("Super expression must either be null or a function");
193
+ }
194
+
195
+ if (typeof _cache !== "undefined") {
196
+ if (_cache.has(Class)) return _cache.get(Class);
197
+
198
+ _cache.set(Class, Wrapper);
199
+ }
200
+
201
+ function Wrapper() {
202
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
203
+ }
204
+
205
+ Wrapper.prototype = Object.create(Class.prototype, {
206
+ constructor: {
207
+ value: Wrapper,
208
+ enumerable: false,
209
+ writable: true,
210
+ configurable: true
211
+ }
212
+ });
213
+ return _setPrototypeOf(Wrapper, Class);
214
+ };
215
+
216
+ return _wrapNativeSuper(Class);
217
+ }
218
+
219
+ function _objectWithoutPropertiesLoose(source, excluded) {
220
+ if (source == null) return {};
221
+ var target = {};
222
+ var sourceKeys = Object.keys(source);
223
+ var key, i;
224
+
225
+ for (i = 0; i < sourceKeys.length; i++) {
226
+ key = sourceKeys[i];
227
+ if (excluded.indexOf(key) >= 0) continue;
228
+ target[key] = source[key];
229
+ }
230
+
231
+ return target;
232
+ }
233
+
234
+ function _unsupportedIterableToArray(o, minLen) {
235
+ if (!o) return;
236
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
237
+ var n = Object.prototype.toString.call(o).slice(8, -1);
238
+ if (n === "Object" && o.constructor) n = o.constructor.name;
239
+ if (n === "Map" || n === "Set") return Array.from(o);
240
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
241
+ }
242
+
243
+ function _arrayLikeToArray(arr, len) {
244
+ if (len == null || len > arr.length) len = arr.length;
245
+
246
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
247
+
248
+ return arr2;
249
+ }
250
+
251
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
252
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
253
+ if (it) return (it = it.call(o)).next.bind(it);
254
+
255
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
256
+ if (it) o = it;
257
+ var i = 0;
258
+ return function () {
259
+ if (i >= o.length) return {
260
+ done: true
261
+ };
262
+ return {
263
+ done: false,
264
+ value: o[i++]
265
+ };
266
+ };
267
+ }
268
+
269
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
270
+ }
271
+
272
+ function createCommonjsModule(fn, module) {
273
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
274
+ }
275
+
276
+ var runtime_1 = createCommonjsModule(function (module) {
277
+ /**
278
+ * Copyright (c) 2014-present, Facebook, Inc.
279
+ *
280
+ * This source code is licensed under the MIT license found in the
281
+ * LICENSE file in the root directory of this source tree.
282
+ */
283
+
284
+ var runtime = (function (exports) {
285
+
286
+ var Op = Object.prototype;
287
+ var hasOwn = Op.hasOwnProperty;
288
+ var undefined$1; // More compressible than void 0.
289
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
290
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
291
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
292
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
22
293
 
23
294
  function define(obj, key, value) {
24
- return Object.defineProperty(obj, key, {
295
+ Object.defineProperty(obj, key, {
25
296
  value: value,
26
- enumerable: !0,
27
- configurable: !0,
28
- writable: !0
29
- }), obj[key];
297
+ enumerable: true,
298
+ configurable: true,
299
+ writable: true
300
+ });
301
+ return obj[key];
30
302
  }
31
-
32
303
  try {
304
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
33
305
  define({}, "");
34
306
  } catch (err) {
35
- define = function (obj, key, value) {
307
+ define = function(obj, key, value) {
36
308
  return obj[key] = value;
37
309
  };
38
310
  }
39
311
 
40
312
  function wrap(innerFn, outerFn, self, tryLocsList) {
41
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
42
- generator = Object.create(protoGenerator.prototype),
43
- context = new Context(tryLocsList || []);
44
- return generator._invoke = function (innerFn, self, context) {
45
- var state = "suspendedStart";
46
- return function (method, arg) {
47
- if ("executing" === state) throw new Error("Generator is already running");
48
-
49
- if ("completed" === state) {
50
- if ("throw" === method) throw arg;
51
- return doneResult();
52
- }
313
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
314
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
315
+ var generator = Object.create(protoGenerator.prototype);
316
+ var context = new Context(tryLocsList || []);
53
317
 
54
- for (context.method = method, context.arg = arg;;) {
55
- var delegate = context.delegate;
318
+ // The ._invoke method unifies the implementations of the .next,
319
+ // .throw, and .return methods.
320
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
56
321
 
57
- if (delegate) {
58
- var delegateResult = maybeInvokeDelegate(delegate, context);
59
-
60
- if (delegateResult) {
61
- if (delegateResult === ContinueSentinel) continue;
62
- return delegateResult;
63
- }
64
- }
65
-
66
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
67
- if ("suspendedStart" === state) throw state = "completed", context.arg;
68
- context.dispatchException(context.arg);
69
- } else "return" === context.method && context.abrupt("return", context.arg);
70
- state = "executing";
71
- var record = tryCatch(innerFn, self, context);
72
-
73
- if ("normal" === record.type) {
74
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
75
- return {
76
- value: record.arg,
77
- done: context.done
78
- };
79
- }
80
-
81
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
82
- }
83
- };
84
- }(innerFn, self, context), generator;
322
+ return generator;
85
323
  }
324
+ exports.wrap = wrap;
86
325
 
326
+ // Try/catch helper to minimize deoptimizations. Returns a completion
327
+ // record like context.tryEntries[i].completion. This interface could
328
+ // have been (and was previously) designed to take a closure to be
329
+ // invoked without arguments, but in all the cases we care about we
330
+ // already have an existing method we want to call, so there's no need
331
+ // to create a new function object. We can even get away with assuming
332
+ // the method takes exactly one argument, since that happens to be true
333
+ // in every case, so we don't have to touch the arguments object. The
334
+ // only additional allocation required is the completion record, which
335
+ // has a stable shape and so hopefully should be cheap to allocate.
87
336
  function tryCatch(fn, obj, arg) {
88
337
  try {
89
- return {
90
- type: "normal",
91
- arg: fn.call(obj, arg)
92
- };
338
+ return { type: "normal", arg: fn.call(obj, arg) };
93
339
  } catch (err) {
94
- return {
95
- type: "throw",
96
- arg: err
97
- };
340
+ return { type: "throw", arg: err };
98
341
  }
99
342
  }
100
343
 
101
- exports.wrap = wrap;
344
+ var GenStateSuspendedStart = "suspendedStart";
345
+ var GenStateSuspendedYield = "suspendedYield";
346
+ var GenStateExecuting = "executing";
347
+ var GenStateCompleted = "completed";
348
+
349
+ // Returning this object from the innerFn has the same effect as
350
+ // breaking out of the dispatch switch statement.
102
351
  var ContinueSentinel = {};
103
352
 
353
+ // Dummy constructor functions that we use as the .constructor and
354
+ // .constructor.prototype properties for functions that return Generator
355
+ // objects. For full spec compliance, you may wish to configure your
356
+ // minifier not to mangle the names of these two functions.
104
357
  function Generator() {}
105
-
106
358
  function GeneratorFunction() {}
107
-
108
359
  function GeneratorFunctionPrototype() {}
109
360
 
361
+ // This is a polyfill for %IteratorPrototype% for environments that
362
+ // don't natively support it.
110
363
  var IteratorPrototype = {};
111
364
  define(IteratorPrototype, iteratorSymbol, function () {
112
365
  return this;
113
366
  });
114
- var getProto = Object.getPrototypeOf,
115
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
116
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
117
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
118
367
 
368
+ var getProto = Object.getPrototypeOf;
369
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
370
+ if (NativeIteratorPrototype &&
371
+ NativeIteratorPrototype !== Op &&
372
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
373
+ // This environment has a native %IteratorPrototype%; use it instead
374
+ // of the polyfill.
375
+ IteratorPrototype = NativeIteratorPrototype;
376
+ }
377
+
378
+ var Gp = GeneratorFunctionPrototype.prototype =
379
+ Generator.prototype = Object.create(IteratorPrototype);
380
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
381
+ define(Gp, "constructor", GeneratorFunctionPrototype);
382
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
383
+ GeneratorFunction.displayName = define(
384
+ GeneratorFunctionPrototype,
385
+ toStringTagSymbol,
386
+ "GeneratorFunction"
387
+ );
388
+
389
+ // Helper for defining the .next, .throw, and .return methods of the
390
+ // Iterator interface in terms of a single ._invoke method.
119
391
  function defineIteratorMethods(prototype) {
120
- ["next", "throw", "return"].forEach(function (method) {
121
- define(prototype, method, function (arg) {
392
+ ["next", "throw", "return"].forEach(function(method) {
393
+ define(prototype, method, function(arg) {
122
394
  return this._invoke(method, arg);
123
395
  });
124
396
  });
125
397
  }
126
398
 
399
+ exports.isGeneratorFunction = function(genFun) {
400
+ var ctor = typeof genFun === "function" && genFun.constructor;
401
+ return ctor
402
+ ? ctor === GeneratorFunction ||
403
+ // For the native GeneratorFunction constructor, the best we can
404
+ // do is to check its .name property.
405
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
406
+ : false;
407
+ };
408
+
409
+ exports.mark = function(genFun) {
410
+ if (Object.setPrototypeOf) {
411
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
412
+ } else {
413
+ genFun.__proto__ = GeneratorFunctionPrototype;
414
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
415
+ }
416
+ genFun.prototype = Object.create(Gp);
417
+ return genFun;
418
+ };
419
+
420
+ // Within the body of any async function, `await x` is transformed to
421
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
422
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
423
+ // meant to be awaited.
424
+ exports.awrap = function(arg) {
425
+ return { __await: arg };
426
+ };
427
+
127
428
  function AsyncIterator(generator, PromiseImpl) {
128
429
  function invoke(method, arg, resolve, reject) {
129
430
  var record = tryCatch(generator[method], generator, arg);
431
+ if (record.type === "throw") {
432
+ reject(record.arg);
433
+ } else {
434
+ var result = record.arg;
435
+ var value = result.value;
436
+ if (value &&
437
+ typeof value === "object" &&
438
+ hasOwn.call(value, "__await")) {
439
+ return PromiseImpl.resolve(value.__await).then(function(value) {
440
+ invoke("next", value, resolve, reject);
441
+ }, function(err) {
442
+ invoke("throw", err, resolve, reject);
443
+ });
444
+ }
130
445
 
131
- if ("throw" !== record.type) {
132
- var result = record.arg,
133
- value = result.value;
134
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
135
- invoke("next", value, resolve, reject);
136
- }, function (err) {
137
- invoke("throw", err, resolve, reject);
138
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
139
- result.value = unwrapped, resolve(result);
140
- }, function (error) {
446
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
447
+ // When a yielded Promise is resolved, its final value becomes
448
+ // the .value of the Promise<{value,done}> result for the
449
+ // current iteration.
450
+ result.value = unwrapped;
451
+ resolve(result);
452
+ }, function(error) {
453
+ // If a rejected Promise was yielded, throw the rejection back
454
+ // into the async generator function so it can be handled there.
141
455
  return invoke("throw", error, resolve, reject);
142
456
  });
143
457
  }
144
-
145
- reject(record.arg);
146
458
  }
147
459
 
148
460
  var previousPromise;
149
461
 
150
- this._invoke = function (method, arg) {
462
+ function enqueue(method, arg) {
151
463
  function callInvokeWithMethodAndArg() {
152
- return new PromiseImpl(function (resolve, reject) {
464
+ return new PromiseImpl(function(resolve, reject) {
153
465
  invoke(method, arg, resolve, reject);
154
466
  });
155
467
  }
156
468
 
157
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
158
- };
159
- }
160
-
161
- function maybeInvokeDelegate(delegate, context) {
162
- var method = delegate.iterator[context.method];
163
-
164
- if (undefined === method) {
165
- if (context.delegate = null, "throw" === context.method) {
166
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
167
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
168
- }
169
-
170
- return ContinueSentinel;
469
+ return previousPromise =
470
+ // If enqueue has been called before, then we want to wait until
471
+ // all previous Promises have been resolved before calling invoke,
472
+ // so that results are always delivered in the correct order. If
473
+ // enqueue has not been called before, then it is important to
474
+ // call invoke immediately, without waiting on a callback to fire,
475
+ // so that the async generator function has the opportunity to do
476
+ // any necessary setup in a predictable way. This predictability
477
+ // is why the Promise constructor synchronously invokes its
478
+ // executor callback, and why async functions synchronously
479
+ // execute code before the first await. Since we implement simple
480
+ // async functions in terms of async generators, it is especially
481
+ // important to get this right, even though it requires care.
482
+ previousPromise ? previousPromise.then(
483
+ callInvokeWithMethodAndArg,
484
+ // Avoid propagating failures to Promises returned by later
485
+ // invocations of the iterator.
486
+ callInvokeWithMethodAndArg
487
+ ) : callInvokeWithMethodAndArg();
171
488
  }
172
489
 
173
- var record = tryCatch(method, delegate.iterator, context.arg);
174
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
175
- var info = record.arg;
176
- 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);
177
- }
178
-
179
- function pushTryEntry(locs) {
180
- var entry = {
181
- tryLoc: locs[0]
182
- };
183
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
490
+ // Define the unified helper method that is used to implement .next,
491
+ // .throw, and .return (see defineIteratorMethods).
492
+ this._invoke = enqueue;
184
493
  }
185
494
 
186
- function resetTryEntry(entry) {
187
- var record = entry.completion || {};
188
- record.type = "normal", delete record.arg, entry.completion = record;
189
- }
190
-
191
- function Context(tryLocsList) {
192
- this.tryEntries = [{
193
- tryLoc: "root"
194
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
195
- }
495
+ defineIteratorMethods(AsyncIterator.prototype);
496
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
497
+ return this;
498
+ });
499
+ exports.AsyncIterator = AsyncIterator;
500
+
501
+ // Note that simple async functions are implemented on top of
502
+ // AsyncIterator objects; they just return a Promise for the value of
503
+ // the final result produced by the iterator.
504
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
505
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
506
+
507
+ var iter = new AsyncIterator(
508
+ wrap(innerFn, outerFn, self, tryLocsList),
509
+ PromiseImpl
510
+ );
511
+
512
+ return exports.isGeneratorFunction(outerFn)
513
+ ? iter // If outerFn is a generator, return the full iterator.
514
+ : iter.next().then(function(result) {
515
+ return result.done ? result.value : iter.next();
516
+ });
517
+ };
196
518
 
197
- function values(iterable) {
198
- if (iterable) {
199
- var iteratorMethod = iterable[iteratorSymbol];
200
- if (iteratorMethod) return iteratorMethod.call(iterable);
201
- if ("function" == typeof iterable.next) return iterable;
519
+ function makeInvokeMethod(innerFn, self, context) {
520
+ var state = GenStateSuspendedStart;
202
521
 
203
- if (!isNaN(iterable.length)) {
204
- var i = -1,
205
- next = function next() {
206
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
522
+ return function invoke(method, arg) {
523
+ if (state === GenStateExecuting) {
524
+ throw new Error("Generator is already running");
525
+ }
207
526
 
208
- return next.value = undefined, next.done = !0, next;
209
- };
527
+ if (state === GenStateCompleted) {
528
+ if (method === "throw") {
529
+ throw arg;
530
+ }
210
531
 
211
- return next.next = next;
532
+ // Be forgiving, per 25.3.3.3.3 of the spec:
533
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
534
+ return doneResult();
212
535
  }
213
- }
214
536
 
215
- return {
216
- next: doneResult
217
- };
218
- }
219
-
220
- function doneResult() {
221
- return {
222
- value: undefined,
223
- done: !0
224
- };
225
- }
537
+ context.method = method;
538
+ context.arg = arg;
226
539
 
227
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
228
- var ctor = "function" == typeof genFun && genFun.constructor;
229
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
230
- }, exports.mark = function (genFun) {
231
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
232
- }, exports.awrap = function (arg) {
233
- return {
234
- __await: arg
235
- };
236
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
237
- return this;
238
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
239
- void 0 === PromiseImpl && (PromiseImpl = Promise);
240
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
241
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
242
- return result.done ? result.value : iter.next();
243
- });
244
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
245
- return this;
246
- }), define(Gp, "toString", function () {
247
- return "[object Generator]";
248
- }), exports.keys = function (object) {
249
- var keys = [];
540
+ while (true) {
541
+ var delegate = context.delegate;
542
+ if (delegate) {
543
+ var delegateResult = maybeInvokeDelegate(delegate, context);
544
+ if (delegateResult) {
545
+ if (delegateResult === ContinueSentinel) continue;
546
+ return delegateResult;
547
+ }
548
+ }
250
549
 
251
- for (var key in object) keys.push(key);
550
+ if (context.method === "next") {
551
+ // Setting context._sent for legacy support of Babel's
552
+ // function.sent implementation.
553
+ context.sent = context._sent = context.arg;
252
554
 
253
- return keys.reverse(), function next() {
254
- for (; keys.length;) {
255
- var key = keys.pop();
256
- if (key in object) return next.value = key, next.done = !1, next;
257
- }
555
+ } else if (context.method === "throw") {
556
+ if (state === GenStateSuspendedStart) {
557
+ state = GenStateCompleted;
558
+ throw context.arg;
559
+ }
258
560
 
259
- return next.done = !0, next;
260
- };
261
- }, exports.values = values, Context.prototype = {
262
- constructor: Context,
263
- reset: function (skipTempReset) {
264
- 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);
265
- },
266
- stop: function () {
267
- this.done = !0;
268
- var rootRecord = this.tryEntries[0].completion;
269
- if ("throw" === rootRecord.type) throw rootRecord.arg;
270
- return this.rval;
271
- },
272
- dispatchException: function (exception) {
273
- if (this.done) throw exception;
274
- var context = this;
561
+ context.dispatchException(context.arg);
275
562
 
276
- function handle(loc, caught) {
277
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
278
- }
563
+ } else if (context.method === "return") {
564
+ context.abrupt("return", context.arg);
565
+ }
279
566
 
280
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
281
- var entry = this.tryEntries[i],
282
- record = entry.completion;
283
- if ("root" === entry.tryLoc) return handle("end");
567
+ state = GenStateExecuting;
284
568
 
285
- if (entry.tryLoc <= this.prev) {
286
- var hasCatch = hasOwn.call(entry, "catchLoc"),
287
- hasFinally = hasOwn.call(entry, "finallyLoc");
569
+ var record = tryCatch(innerFn, self, context);
570
+ if (record.type === "normal") {
571
+ // If an exception is thrown from innerFn, we leave state ===
572
+ // GenStateExecuting and loop back for another invocation.
573
+ state = context.done
574
+ ? GenStateCompleted
575
+ : GenStateSuspendedYield;
288
576
 
289
- if (hasCatch && hasFinally) {
290
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
291
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
292
- } else if (hasCatch) {
293
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
294
- } else {
295
- if (!hasFinally) throw new Error("try statement without catch or finally");
296
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
577
+ if (record.arg === ContinueSentinel) {
578
+ continue;
297
579
  }
298
- }
299
- }
300
- },
301
- abrupt: function (type, arg) {
302
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
303
- var entry = this.tryEntries[i];
304
580
 
305
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
306
- var finallyEntry = entry;
307
- break;
581
+ return {
582
+ value: record.arg,
583
+ done: context.done
584
+ };
585
+
586
+ } else if (record.type === "throw") {
587
+ state = GenStateCompleted;
588
+ // Dispatch the exception by looping back around to the
589
+ // context.dispatchException(context.arg) call above.
590
+ context.method = "throw";
591
+ context.arg = record.arg;
308
592
  }
309
593
  }
594
+ };
595
+ }
310
596
 
311
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
312
- var record = finallyEntry ? finallyEntry.completion : {};
313
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
314
- },
315
- complete: function (record, afterLoc) {
316
- if ("throw" === record.type) throw record.arg;
317
- 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;
318
- },
319
- finish: function (finallyLoc) {
320
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
321
- var entry = this.tryEntries[i];
322
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
323
- }
324
- },
325
- catch: function (tryLoc) {
326
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
327
- var entry = this.tryEntries[i];
328
-
329
- if (entry.tryLoc === tryLoc) {
330
- var record = entry.completion;
331
-
332
- if ("throw" === record.type) {
333
- var thrown = record.arg;
334
- resetTryEntry(entry);
597
+ // Call delegate.iterator[context.method](context.arg) and handle the
598
+ // result, either by returning a { value, done } result from the
599
+ // delegate iterator, or by modifying context.method and context.arg,
600
+ // setting context.delegate to null, and returning the ContinueSentinel.
601
+ function maybeInvokeDelegate(delegate, context) {
602
+ var method = delegate.iterator[context.method];
603
+ if (method === undefined$1) {
604
+ // A .throw or .return when the delegate iterator has no .throw
605
+ // method always terminates the yield* loop.
606
+ context.delegate = null;
607
+
608
+ if (context.method === "throw") {
609
+ // Note: ["return"] must be used for ES3 parsing compatibility.
610
+ if (delegate.iterator["return"]) {
611
+ // If the delegate iterator has a return method, give it a
612
+ // chance to clean up.
613
+ context.method = "return";
614
+ context.arg = undefined$1;
615
+ maybeInvokeDelegate(delegate, context);
616
+
617
+ if (context.method === "throw") {
618
+ // If maybeInvokeDelegate(context) changed context.method from
619
+ // "return" to "throw", let that override the TypeError below.
620
+ return ContinueSentinel;
335
621
  }
336
-
337
- return thrown;
338
622
  }
623
+
624
+ context.method = "throw";
625
+ context.arg = new TypeError(
626
+ "The iterator does not provide a 'throw' method");
339
627
  }
340
628
 
341
- throw new Error("illegal catch attempt");
342
- },
343
- delegateYield: function (iterable, resultName, nextLoc) {
344
- return this.delegate = {
345
- iterator: values(iterable),
346
- resultName: resultName,
347
- nextLoc: nextLoc
348
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
629
+ return ContinueSentinel;
349
630
  }
350
- }, exports;
351
- }
352
631
 
353
- function _wrapRegExp() {
354
- _wrapRegExp = function (re, groups) {
355
- return new BabelRegExp(re, void 0, groups);
356
- };
632
+ var record = tryCatch(method, delegate.iterator, context.arg);
357
633
 
358
- var _super = RegExp.prototype,
359
- _groups = new WeakMap();
634
+ if (record.type === "throw") {
635
+ context.method = "throw";
636
+ context.arg = record.arg;
637
+ context.delegate = null;
638
+ return ContinueSentinel;
639
+ }
360
640
 
361
- function BabelRegExp(re, flags, groups) {
362
- var _this = new RegExp(re, flags);
641
+ var info = record.arg;
363
642
 
364
- return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);
365
- }
643
+ if (! info) {
644
+ context.method = "throw";
645
+ context.arg = new TypeError("iterator result is not an object");
646
+ context.delegate = null;
647
+ return ContinueSentinel;
648
+ }
366
649
 
367
- function buildGroups(result, re) {
368
- var g = _groups.get(re);
650
+ if (info.done) {
651
+ // Assign the result of the finished delegate to the temporary
652
+ // variable specified by delegate.resultName (see delegateYield).
653
+ context[delegate.resultName] = info.value;
654
+
655
+ // Resume execution at the desired location (see delegateYield).
656
+ context.next = delegate.nextLoc;
657
+
658
+ // If context.method was "throw" but the delegate handled the
659
+ // exception, let the outer generator proceed normally. If
660
+ // context.method was "next", forget context.arg since it has been
661
+ // "consumed" by the delegate iterator. If context.method was
662
+ // "return", allow the original .return call to continue in the
663
+ // outer generator.
664
+ if (context.method !== "return") {
665
+ context.method = "next";
666
+ context.arg = undefined$1;
667
+ }
369
668
 
370
- return Object.keys(g).reduce(function (groups, name) {
371
- return groups[name] = result[g[name]], groups;
372
- }, Object.create(null));
669
+ } else {
670
+ // Re-yield the result returned by the delegate method.
671
+ return info;
672
+ }
673
+
674
+ // The delegate iterator is finished, so forget it and continue with
675
+ // the outer generator.
676
+ context.delegate = null;
677
+ return ContinueSentinel;
373
678
  }
374
679
 
375
- return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
376
- var result = _super.exec.call(this, str);
680
+ // Define Generator.prototype.{next,throw,return} in terms of the
681
+ // unified ._invoke helper method.
682
+ defineIteratorMethods(Gp);
377
683
 
378
- return result && (result.groups = buildGroups(result, this)), result;
379
- }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
380
- if ("string" == typeof substitution) {
381
- var groups = _groups.get(this);
684
+ define(Gp, toStringTagSymbol, "Generator");
382
685
 
383
- return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
384
- return "$" + groups[name];
385
- }));
386
- }
686
+ // A Generator should always return itself as the iterator object when the
687
+ // @@iterator function is called on it. Some browsers' implementations of the
688
+ // iterator prototype chain incorrectly implement this, causing the Generator
689
+ // object to not be returned from this call. This ensures that doesn't happen.
690
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
691
+ define(Gp, iteratorSymbol, function() {
692
+ return this;
693
+ });
387
694
 
388
- if ("function" == typeof substitution) {
389
- var _this = this;
695
+ define(Gp, "toString", function() {
696
+ return "[object Generator]";
697
+ });
390
698
 
391
- return _super[Symbol.replace].call(this, str, function () {
392
- var args = arguments;
393
- return "object" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);
394
- });
699
+ function pushTryEntry(locs) {
700
+ var entry = { tryLoc: locs[0] };
701
+
702
+ if (1 in locs) {
703
+ entry.catchLoc = locs[1];
395
704
  }
396
705
 
397
- return _super[Symbol.replace].call(this, str, substitution);
398
- }, _wrapRegExp.apply(this, arguments);
399
- }
706
+ if (2 in locs) {
707
+ entry.finallyLoc = locs[2];
708
+ entry.afterLoc = locs[3];
709
+ }
400
710
 
401
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
402
- try {
403
- var info = gen[key](arg);
404
- var value = info.value;
405
- } catch (error) {
406
- reject(error);
407
- return;
711
+ this.tryEntries.push(entry);
408
712
  }
409
713
 
410
- if (info.done) {
411
- resolve(value);
412
- } else {
413
- Promise.resolve(value).then(_next, _throw);
714
+ function resetTryEntry(entry) {
715
+ var record = entry.completion || {};
716
+ record.type = "normal";
717
+ delete record.arg;
718
+ entry.completion = record;
414
719
  }
415
- }
416
720
 
417
- function _asyncToGenerator(fn) {
418
- return function () {
419
- var self = this,
420
- args = arguments;
421
- return new Promise(function (resolve, reject) {
422
- var gen = fn.apply(self, args);
721
+ function Context(tryLocsList) {
722
+ // The root entry object (effectively a try statement without a catch
723
+ // or a finally block) gives us a place to store values thrown from
724
+ // locations where there is no enclosing try statement.
725
+ this.tryEntries = [{ tryLoc: "root" }];
726
+ tryLocsList.forEach(pushTryEntry, this);
727
+ this.reset(true);
728
+ }
423
729
 
424
- function _next(value) {
425
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
426
- }
730
+ exports.keys = function(object) {
731
+ var keys = [];
732
+ for (var key in object) {
733
+ keys.push(key);
734
+ }
735
+ keys.reverse();
427
736
 
428
- function _throw(err) {
429
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
737
+ // Rather than returning an object with a next method, we keep
738
+ // things simple and return the next function itself.
739
+ return function next() {
740
+ while (keys.length) {
741
+ var key = keys.pop();
742
+ if (key in object) {
743
+ next.value = key;
744
+ next.done = false;
745
+ return next;
746
+ }
430
747
  }
431
748
 
432
- _next(undefined);
433
- });
749
+ // To avoid creating an additional object, we just hang the .value
750
+ // and .done properties off the next function object itself. This
751
+ // also ensures that the minifier will not anonymize the function.
752
+ next.done = true;
753
+ return next;
754
+ };
434
755
  };
435
- }
436
756
 
437
- function _extends() {
438
- _extends = Object.assign || function (target) {
439
- for (var i = 1; i < arguments.length; i++) {
440
- var source = arguments[i];
757
+ function values(iterable) {
758
+ if (iterable) {
759
+ var iteratorMethod = iterable[iteratorSymbol];
760
+ if (iteratorMethod) {
761
+ return iteratorMethod.call(iterable);
762
+ }
441
763
 
442
- for (var key in source) {
443
- if (Object.prototype.hasOwnProperty.call(source, key)) {
444
- target[key] = source[key];
445
- }
764
+ if (typeof iterable.next === "function") {
765
+ return iterable;
446
766
  }
447
- }
448
767
 
449
- return target;
450
- };
768
+ if (!isNaN(iterable.length)) {
769
+ var i = -1, next = function next() {
770
+ while (++i < iterable.length) {
771
+ if (hasOwn.call(iterable, i)) {
772
+ next.value = iterable[i];
773
+ next.done = false;
774
+ return next;
775
+ }
776
+ }
777
+
778
+ next.value = undefined$1;
779
+ next.done = true;
451
780
 
452
- return _extends.apply(this, arguments);
453
- }
781
+ return next;
782
+ };
454
783
 
455
- function _inherits(subClass, superClass) {
456
- if (typeof superClass !== "function" && superClass !== null) {
457
- throw new TypeError("Super expression must either be null or a function");
784
+ return next.next = next;
785
+ }
786
+ }
787
+
788
+ // Return an iterator with no values.
789
+ return { next: doneResult };
458
790
  }
791
+ exports.values = values;
459
792
 
460
- subClass.prototype = Object.create(superClass && superClass.prototype, {
461
- constructor: {
462
- value: subClass,
463
- writable: true,
464
- configurable: true
465
- }
466
- });
467
- Object.defineProperty(subClass, "prototype", {
468
- writable: false
469
- });
470
- if (superClass) _setPrototypeOf(subClass, superClass);
471
- }
793
+ function doneResult() {
794
+ return { value: undefined$1, done: true };
795
+ }
472
796
 
473
- function _inheritsLoose(subClass, superClass) {
474
- subClass.prototype = Object.create(superClass.prototype);
475
- subClass.prototype.constructor = subClass;
797
+ Context.prototype = {
798
+ constructor: Context,
476
799
 
477
- _setPrototypeOf(subClass, superClass);
478
- }
800
+ reset: function(skipTempReset) {
801
+ this.prev = 0;
802
+ this.next = 0;
803
+ // Resetting context._sent for legacy support of Babel's
804
+ // function.sent implementation.
805
+ this.sent = this._sent = undefined$1;
806
+ this.done = false;
807
+ this.delegate = null;
808
+
809
+ this.method = "next";
810
+ this.arg = undefined$1;
811
+
812
+ this.tryEntries.forEach(resetTryEntry);
813
+
814
+ if (!skipTempReset) {
815
+ for (var name in this) {
816
+ // Not sure about the optimal order of these conditions:
817
+ if (name.charAt(0) === "t" &&
818
+ hasOwn.call(this, name) &&
819
+ !isNaN(+name.slice(1))) {
820
+ this[name] = undefined$1;
821
+ }
822
+ }
823
+ }
824
+ },
479
825
 
480
- function _getPrototypeOf(o) {
481
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
482
- return o.__proto__ || Object.getPrototypeOf(o);
483
- };
484
- return _getPrototypeOf(o);
485
- }
826
+ stop: function() {
827
+ this.done = true;
486
828
 
487
- function _setPrototypeOf(o, p) {
488
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
489
- o.__proto__ = p;
490
- return o;
491
- };
829
+ var rootEntry = this.tryEntries[0];
830
+ var rootRecord = rootEntry.completion;
831
+ if (rootRecord.type === "throw") {
832
+ throw rootRecord.arg;
833
+ }
492
834
 
493
- return _setPrototypeOf(o, p);
494
- }
835
+ return this.rval;
836
+ },
495
837
 
496
- function _isNativeReflectConstruct() {
497
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
498
- if (Reflect.construct.sham) return false;
499
- if (typeof Proxy === "function") return true;
838
+ dispatchException: function(exception) {
839
+ if (this.done) {
840
+ throw exception;
841
+ }
500
842
 
501
- try {
502
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
503
- return true;
504
- } catch (e) {
505
- return false;
506
- }
507
- }
843
+ var context = this;
844
+ function handle(loc, caught) {
845
+ record.type = "throw";
846
+ record.arg = exception;
847
+ context.next = loc;
848
+
849
+ if (caught) {
850
+ // If the dispatched exception was caught by a catch block,
851
+ // then let that catch block handle the exception normally.
852
+ context.method = "next";
853
+ context.arg = undefined$1;
854
+ }
508
855
 
509
- function _construct(Parent, args, Class) {
510
- if (_isNativeReflectConstruct()) {
511
- _construct = Reflect.construct;
512
- } else {
513
- _construct = function _construct(Parent, args, Class) {
514
- var a = [null];
515
- a.push.apply(a, args);
516
- var Constructor = Function.bind.apply(Parent, a);
517
- var instance = new Constructor();
518
- if (Class) _setPrototypeOf(instance, Class.prototype);
519
- return instance;
520
- };
521
- }
856
+ return !! caught;
857
+ }
522
858
 
523
- return _construct.apply(null, arguments);
524
- }
859
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
860
+ var entry = this.tryEntries[i];
861
+ var record = entry.completion;
525
862
 
526
- function _isNativeFunction(fn) {
527
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
528
- }
863
+ if (entry.tryLoc === "root") {
864
+ // Exception thrown outside of any try block that could handle
865
+ // it, so set the completion value of the entire function to
866
+ // throw the exception.
867
+ return handle("end");
868
+ }
529
869
 
530
- function _wrapNativeSuper(Class) {
531
- var _cache = typeof Map === "function" ? new Map() : undefined;
870
+ if (entry.tryLoc <= this.prev) {
871
+ var hasCatch = hasOwn.call(entry, "catchLoc");
872
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
532
873
 
533
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
534
- if (Class === null || !_isNativeFunction(Class)) return Class;
874
+ if (hasCatch && hasFinally) {
875
+ if (this.prev < entry.catchLoc) {
876
+ return handle(entry.catchLoc, true);
877
+ } else if (this.prev < entry.finallyLoc) {
878
+ return handle(entry.finallyLoc);
879
+ }
535
880
 
536
- if (typeof Class !== "function") {
537
- throw new TypeError("Super expression must either be null or a function");
538
- }
881
+ } else if (hasCatch) {
882
+ if (this.prev < entry.catchLoc) {
883
+ return handle(entry.catchLoc, true);
884
+ }
539
885
 
540
- if (typeof _cache !== "undefined") {
541
- if (_cache.has(Class)) return _cache.get(Class);
886
+ } else if (hasFinally) {
887
+ if (this.prev < entry.finallyLoc) {
888
+ return handle(entry.finallyLoc);
889
+ }
542
890
 
543
- _cache.set(Class, Wrapper);
544
- }
891
+ } else {
892
+ throw new Error("try statement without catch or finally");
893
+ }
894
+ }
895
+ }
896
+ },
545
897
 
546
- function Wrapper() {
547
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
548
- }
898
+ abrupt: function(type, arg) {
899
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
900
+ var entry = this.tryEntries[i];
901
+ if (entry.tryLoc <= this.prev &&
902
+ hasOwn.call(entry, "finallyLoc") &&
903
+ this.prev < entry.finallyLoc) {
904
+ var finallyEntry = entry;
905
+ break;
906
+ }
907
+ }
549
908
 
550
- Wrapper.prototype = Object.create(Class.prototype, {
551
- constructor: {
552
- value: Wrapper,
553
- enumerable: false,
554
- writable: true,
555
- configurable: true
909
+ if (finallyEntry &&
910
+ (type === "break" ||
911
+ type === "continue") &&
912
+ finallyEntry.tryLoc <= arg &&
913
+ arg <= finallyEntry.finallyLoc) {
914
+ // Ignore the finally entry if control is not jumping to a
915
+ // location outside the try/catch block.
916
+ finallyEntry = null;
556
917
  }
557
- });
558
- return _setPrototypeOf(Wrapper, Class);
559
- };
560
918
 
561
- return _wrapNativeSuper(Class);
562
- }
919
+ var record = finallyEntry ? finallyEntry.completion : {};
920
+ record.type = type;
921
+ record.arg = arg;
563
922
 
564
- function _objectWithoutPropertiesLoose(source, excluded) {
565
- if (source == null) return {};
566
- var target = {};
567
- var sourceKeys = Object.keys(source);
568
- var key, i;
923
+ if (finallyEntry) {
924
+ this.method = "next";
925
+ this.next = finallyEntry.finallyLoc;
926
+ return ContinueSentinel;
927
+ }
569
928
 
570
- for (i = 0; i < sourceKeys.length; i++) {
571
- key = sourceKeys[i];
572
- if (excluded.indexOf(key) >= 0) continue;
573
- target[key] = source[key];
574
- }
929
+ return this.complete(record);
930
+ },
575
931
 
576
- return target;
577
- }
932
+ complete: function(record, afterLoc) {
933
+ if (record.type === "throw") {
934
+ throw record.arg;
935
+ }
578
936
 
579
- function _unsupportedIterableToArray(o, minLen) {
580
- if (!o) return;
581
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
582
- var n = Object.prototype.toString.call(o).slice(8, -1);
583
- if (n === "Object" && o.constructor) n = o.constructor.name;
584
- if (n === "Map" || n === "Set") return Array.from(o);
585
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
586
- }
937
+ if (record.type === "break" ||
938
+ record.type === "continue") {
939
+ this.next = record.arg;
940
+ } else if (record.type === "return") {
941
+ this.rval = this.arg = record.arg;
942
+ this.method = "return";
943
+ this.next = "end";
944
+ } else if (record.type === "normal" && afterLoc) {
945
+ this.next = afterLoc;
946
+ }
587
947
 
588
- function _arrayLikeToArray(arr, len) {
589
- if (len == null || len > arr.length) len = arr.length;
948
+ return ContinueSentinel;
949
+ },
590
950
 
591
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
951
+ finish: function(finallyLoc) {
952
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
953
+ var entry = this.tryEntries[i];
954
+ if (entry.finallyLoc === finallyLoc) {
955
+ this.complete(entry.completion, entry.afterLoc);
956
+ resetTryEntry(entry);
957
+ return ContinueSentinel;
958
+ }
959
+ }
960
+ },
592
961
 
593
- return arr2;
594
- }
962
+ "catch": function(tryLoc) {
963
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
964
+ var entry = this.tryEntries[i];
965
+ if (entry.tryLoc === tryLoc) {
966
+ var record = entry.completion;
967
+ if (record.type === "throw") {
968
+ var thrown = record.arg;
969
+ resetTryEntry(entry);
970
+ }
971
+ return thrown;
972
+ }
973
+ }
595
974
 
596
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
597
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
598
- if (it) return (it = it.call(o)).next.bind(it);
975
+ // The context.catch method must only be called with a location
976
+ // argument that corresponds to a known catch block.
977
+ throw new Error("illegal catch attempt");
978
+ },
599
979
 
600
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
601
- if (it) o = it;
602
- var i = 0;
603
- return function () {
604
- if (i >= o.length) return {
605
- done: true
606
- };
607
- return {
608
- done: false,
609
- value: o[i++]
980
+ delegateYield: function(iterable, resultName, nextLoc) {
981
+ this.delegate = {
982
+ iterator: values(iterable),
983
+ resultName: resultName,
984
+ nextLoc: nextLoc
610
985
  };
611
- };
612
- }
613
986
 
614
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
987
+ if (this.method === "next") {
988
+ // Deliberately forget the last sent value so that we don't
989
+ // accidentally pass it on to the delegate.
990
+ this.arg = undefined$1;
991
+ }
992
+
993
+ return ContinueSentinel;
994
+ }
995
+ };
996
+
997
+ // Regardless of whether this script is executing as a CommonJS module
998
+ // or not, return the runtime object so that we can declare the variable
999
+ // regeneratorRuntime in the outer scope, which allows this module to be
1000
+ // injected easily by `bin/regenerator --include-runtime script.js`.
1001
+ return exports;
1002
+
1003
+ }(
1004
+ // If this script is executing as a CommonJS module, use module.exports
1005
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
1006
+ // object. Either way, the resulting object will be used to initialize
1007
+ // the regeneratorRuntime variable at the top of this file.
1008
+ module.exports
1009
+ ));
1010
+
1011
+ try {
1012
+ regeneratorRuntime = runtime;
1013
+ } catch (accidentalStrictMode) {
1014
+ // This module should not be running in strict mode, so the above
1015
+ // assignment should always work unless something is misconfigured. Just
1016
+ // in case runtime.js accidentally runs in strict mode, in modern engines
1017
+ // we can explicitly access globalThis. In older engines we can escape
1018
+ // strict mode using a global Function call. This could conceivably fail
1019
+ // if a Content Security Policy forbids using Function, but in that case
1020
+ // the proper solution is to fix the accidental strict mode problem. If
1021
+ // you've misconfigured your bundler to force strict mode and applied a
1022
+ // CSP to forbid Function, and you're not willing to fix either of those
1023
+ // problems, please detail your unique predicament in a GitHub issue.
1024
+ if (typeof globalThis === "object") {
1025
+ globalThis.regeneratorRuntime = runtime;
1026
+ } else {
1027
+ Function("r", "regeneratorRuntime = r")(runtime);
1028
+ }
615
1029
  }
1030
+ });
616
1031
 
617
1032
  var _personalMetaToPrefix;
618
1033
  var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[MetadataCategory.Personal] = 'you', _personalMetaToPrefix[MetadataCategory.ChildPersonal] = 'child', _personalMetaToPrefix[MetadataCategory.OtherPersonal] = 'other', _personalMetaToPrefix);
@@ -842,9 +1257,9 @@ function filterTriggeredAnsweredWithKind(_x, _x2) {
842
1257
  */
843
1258
 
844
1259
  function _filterTriggeredAnsweredWithKind() {
845
- _filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workflowData, kind) {
1260
+ _filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(workflowData, kind) {
846
1261
  var flattenedAnswers, triggeredQuestionsWithKind, samePageAnswers, res;
847
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1262
+ return runtime_1.wrap(function _callee$(_context) {
848
1263
  while (1) {
849
1264
  switch (_context.prev = _context.next) {
850
1265
  case 0:
@@ -888,9 +1303,9 @@ function getWorkflowDataByCategory(_x3, _x4) {
888
1303
  }
889
1304
 
890
1305
  function _getWorkflowDataByCategory() {
891
- _getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(workflowData, category) {
1306
+ _getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(workflowData, category) {
892
1307
  var flattenedAnswers, triggeredQuestions, fields;
893
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1308
+ return runtime_1.wrap(function _callee2$(_context2) {
894
1309
  while (1) {
895
1310
  switch (_context2.prev = _context2.next) {
896
1311
  case 0:
@@ -961,8 +1376,8 @@ function getImagesFromIndexDb(_x5) {
961
1376
  */
962
1377
 
963
1378
  function _getImagesFromIndexDb() {
964
- _getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(answer) {
965
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1379
+ _getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(answer) {
1380
+ return runtime_1.wrap(function _callee3$(_context3) {
966
1381
  while (1) {
967
1382
  switch (_context3.prev = _context3.next) {
968
1383
  case 0:
@@ -1038,9 +1453,9 @@ function populateWorkflowField(_x6, _x7) {
1038
1453
 
1039
1454
 
1040
1455
  function _populateWorkflowField() {
1041
- _populateWorkflowField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(question, answerValue) {
1456
+ _populateWorkflowField = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(question, answerValue) {
1042
1457
  var answer, displayedAnswer;
1043
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1458
+ return runtime_1.wrap(function _callee4$(_context4) {
1044
1459
  while (1) {
1045
1460
  switch (_context4.prev = _context4.next) {
1046
1461
  case 0:
@@ -1233,10 +1648,10 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8) {
1233
1648
  */
1234
1649
 
1235
1650
  function _registerPatient() {
1236
- _registerPatient = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch, onProgress) {
1651
+ _registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch, onProgress) {
1237
1652
  var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, stepsTotalNum, currentStep, _ret;
1238
1653
 
1239
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1654
+ return runtime_1.wrap(function _callee4$(_context4) {
1240
1655
  while (1) {
1241
1656
  switch (_context4.prev = _context4.next) {
1242
1657
  case 0:
@@ -1259,11 +1674,11 @@ function _registerPatient() {
1259
1674
  }
1260
1675
 
1261
1676
  _context4.prev = 9;
1262
- return _context4.delegateYield( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1677
+ return _context4.delegateYield( /*#__PURE__*/runtime_1.mark(function _callee3() {
1263
1678
  var _consultIndex, _identity, _identity2;
1264
1679
 
1265
1680
  var practitioners, grantPromises, consultIndex, consultIndexPromises;
1266
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1681
+ return runtime_1.wrap(function _callee3$(_context3) {
1267
1682
  while (1) {
1268
1683
  switch (_context3.prev = _context3.next) {
1269
1684
  case 0:
@@ -1342,6 +1757,7 @@ function _registerPatient() {
1342
1757
  return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
1343
1758
  console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
1344
1759
 
1760
+ // if we cannot grant to the admin, then the registration will fail
1345
1761
  errorsThrown.push(err);
1346
1762
  });
1347
1763
 
@@ -1351,14 +1767,15 @@ function _registerPatient() {
1351
1767
  grantPromises = practitioners.filter(function (practitioner) {
1352
1768
  return practitioner.uuid !== practitionerAdmin;
1353
1769
  }).map( /*#__PURE__*/function () {
1354
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(practitioner) {
1355
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1770
+ var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(practitioner) {
1771
+ return runtime_1.wrap(function _callee$(_context) {
1356
1772
  while (1) {
1357
1773
  switch (_context.prev = _context.next) {
1358
1774
  case 0:
1359
1775
  return _context.abrupt("return", oroClient.grantLockbox(practitioner.uuid, lockboxUuid)["catch"](function (err) {
1360
1776
  console.error("Error while granting lockbox to practitioner", err); // Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
1361
1777
 
1778
+ // Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
1362
1779
  if (retry <= 1) return;
1363
1780
  errorsThrown.push(err);
1364
1781
  }));
@@ -1384,14 +1801,15 @@ function _registerPatient() {
1384
1801
  }], _consultIndex); // the index will identify in which lockbox a consultation resides
1385
1802
 
1386
1803
  consultIndexPromises = practitioners.map( /*#__PURE__*/function () {
1387
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(practitioner) {
1388
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1804
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practitioner) {
1805
+ return runtime_1.wrap(function _callee2$(_context2) {
1389
1806
  while (1) {
1390
1807
  switch (_context2.prev = _context2.next) {
1391
1808
  case 0:
1392
1809
  return _context2.abrupt("return", oroClient.vaultIndexAdd(consultIndex, practitioner.uuid)["catch"](function (err) {
1393
1810
  console.error("[SDK: registration] Error while adding to the practitioner's index " + practitioner.uuid, err); // Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
1394
1811
 
1812
+ // Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
1395
1813
  if (retry <= 1) return;else errorsThrown.push(err);
1396
1814
  }));
1397
1815
 
@@ -1415,6 +1833,7 @@ function _registerPatient() {
1415
1833
  } : undefined)["catch"](function (err) {
1416
1834
  console.error('[SDK: registration] Some errors happened during image upload', err); // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
1417
1835
 
1836
+ // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
1418
1837
  if (retry <= 1) return;else errorsThrown.push(err);
1419
1838
  });
1420
1839
 
@@ -1439,6 +1858,7 @@ function _registerPatient() {
1439
1858
  return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
1440
1859
  console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
1441
1860
 
1861
+ /// it's acceptable to continue registration (return old identity)
1442
1862
  if (retry <= 1) return;
1443
1863
  errorsThrown.push(err);
1444
1864
  return identity;
@@ -1465,6 +1885,7 @@ function _registerPatient() {
1465
1885
  return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
1466
1886
  console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
1467
1887
 
1888
+ /// it's acceptable to continue registration (return old identity)
1468
1889
  if (retry <= 1) return;
1469
1890
  errorsThrown.push(err);
1470
1891
  return identity;
@@ -1490,6 +1911,7 @@ function _registerPatient() {
1490
1911
  console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
1491
1912
  if (retry <= 1) return; // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1492
1913
 
1914
+ // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1493
1915
  errorsThrown.push(err);
1494
1916
  });
1495
1917
 
@@ -1588,9 +2010,9 @@ function getOrCreatePatientConsultationUuid(_x9, _x10) {
1588
2010
 
1589
2011
 
1590
2012
  function _getOrCreatePatientConsultationUuid() {
1591
- _getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(consult, oroClient) {
2013
+ _getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(consult, oroClient) {
1592
2014
  var payment;
1593
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
2015
+ return runtime_1.wrap(function _callee5$(_context5) {
1594
2016
  while (1) {
1595
2017
  switch (_context5.prev = _context5.next) {
1596
2018
  case 0:
@@ -1645,9 +2067,9 @@ function getOrCreatePatientLockbox(_x11) {
1645
2067
 
1646
2068
 
1647
2069
  function _getOrCreatePatientLockbox() {
1648
- _getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(oroClient) {
2070
+ _getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(oroClient) {
1649
2071
  var grants, lockboxResponse, tokens;
1650
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2072
+ return runtime_1.wrap(function _callee6$(_context6) {
1651
2073
  while (1) {
1652
2074
  switch (_context6.prev = _context6.next) {
1653
2075
  case 0:
@@ -1707,8 +2129,8 @@ function storePatientData(_x12, _x13, _x14, _x15, _x16) {
1707
2129
  }
1708
2130
 
1709
2131
  function _storePatientData() {
1710
- _storePatientData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
1711
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2132
+ _storePatientData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
2133
+ return runtime_1.wrap(function _callee7$(_context7) {
1712
2134
  while (1) {
1713
2135
  switch (_context7.prev = _context7.next) {
1714
2136
  case 0:
@@ -1724,7 +2146,8 @@ function _storePatientData() {
1724
2146
  consultationId: consultationId
1725
2147
  }, {
1726
2148
  consultationId: consultationId
1727
- });
2149
+ }, false, true // the only data that needs to include an email notification
2150
+ );
1728
2151
  }), getWorkflowDataByCategory(workflow, MetadataCategory.Medical).then(function (data) {
1729
2152
  return oroClient.getOrInsertJsonData(lockboxUuid, data, {
1730
2153
  category: MetadataCategory.Medical,
@@ -1765,9 +2188,9 @@ function storeImageAliases(_x17, _x18, _x19, _x20, _x21) {
1765
2188
 
1766
2189
 
1767
2190
  function _storeImageAliases() {
1768
- _storeImageAliases = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient, progress) {
2191
+ _storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient, progress) {
1769
2192
  var images, nonNullImages, storedImagesNum, totalImagesNum, promises;
1770
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2193
+ return runtime_1.wrap(function _callee8$(_context8) {
1771
2194
  while (1) {
1772
2195
  switch (_context8.prev = _context8.next) {
1773
2196
  case 0:
@@ -1834,8 +2257,8 @@ function extractAndStorePersonalWorkflowData(_x22, _x23, _x24, _x25, _x26) {
1834
2257
  */
1835
2258
 
1836
2259
  function _extractAndStorePersonalWorkflowData() {
1837
- _extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
1838
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2260
+ _extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
2261
+ return runtime_1.wrap(function _callee9$(_context9) {
1839
2262
  while (1) {
1840
2263
  switch (_context9.prev = _context9.next) {
1841
2264
  case 0:
@@ -1869,8 +2292,8 @@ function extractPersonalInfoFromWorkflowData(_x27) {
1869
2292
  */
1870
2293
 
1871
2294
  function _extractPersonalInfoFromWorkflowData() {
1872
- _extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(workflow) {
1873
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
2295
+ _extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(workflow) {
2296
+ return runtime_1.wrap(function _callee10$(_context10) {
1874
2297
  while (1) {
1875
2298
  switch (_context10.prev = _context10.next) {
1876
2299
  case 0:
@@ -1900,10 +2323,10 @@ function buildConsultSearchIndex(_x28, _x29, _x30) {
1900
2323
  }
1901
2324
 
1902
2325
  function _buildConsultSearchIndex() {
1903
- _buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(consult, workflow, oroClient) {
2326
+ _buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consult, workflow, oroClient) {
1904
2327
  var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
1905
2328
 
1906
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
2329
+ return runtime_1.wrap(function _callee11$(_context11) {
1907
2330
  while (1) {
1908
2331
  switch (_context11.prev = _context11.next) {
1909
2332
  case 0:
@@ -2024,10 +2447,10 @@ function filterGrantsWithLockboxMetadata(_x, _x2) {
2024
2447
  }
2025
2448
 
2026
2449
  function _filterGrantsWithLockboxMetadata() {
2027
- _filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(oroClient, filter) {
2450
+ _filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(oroClient, filter) {
2028
2451
  var grants, filteredGrants, _iterator, _step, grant, consultationIdExistsInMetadata;
2029
2452
 
2030
- return _regeneratorRuntime().wrap(function _callee$(_context) {
2453
+ return runtime_1.wrap(function _callee$(_context) {
2031
2454
  while (1) {
2032
2455
  switch (_context.prev = _context.next) {
2033
2456
  case 0:
@@ -2100,8 +2523,8 @@ var OroClient = /*#__PURE__*/function () {
2100
2523
  _proto.cleanIndex =
2101
2524
  /*#__PURE__*/
2102
2525
  function () {
2103
- var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2104
- return _regeneratorRuntime().wrap(function _callee$(_context) {
2526
+ var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
2527
+ return runtime_1.wrap(function _callee$(_context) {
2105
2528
  while (1) {
2106
2529
  switch (_context.prev = _context.next) {
2107
2530
  case 0:
@@ -2138,9 +2561,9 @@ var OroClient = /*#__PURE__*/function () {
2138
2561
  _proto.signUp =
2139
2562
  /*#__PURE__*/
2140
2563
  function () {
2141
- var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
2564
+ var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
2142
2565
  var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
2143
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2566
+ return runtime_1.wrap(function _callee2$(_context2) {
2144
2567
  while (1) {
2145
2568
  switch (_context2.prev = _context2.next) {
2146
2569
  case 0:
@@ -2199,9 +2622,9 @@ var OroClient = /*#__PURE__*/function () {
2199
2622
  _proto.confirmEmail =
2200
2623
  /*#__PURE__*/
2201
2624
  function () {
2202
- var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(accessToken) {
2625
+ var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(accessToken) {
2203
2626
  var claims;
2204
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
2627
+ return runtime_1.wrap(function _callee3$(_context3) {
2205
2628
  while (1) {
2206
2629
  switch (_context3.prev = _context3.next) {
2207
2630
  case 0:
@@ -2246,9 +2669,9 @@ var OroClient = /*#__PURE__*/function () {
2246
2669
  _proto.signIn =
2247
2670
  /*#__PURE__*/
2248
2671
  function () {
2249
- var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(practiceUuid, email, password, otp) {
2672
+ var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(practiceUuid, email, password, otp) {
2250
2673
  var hashedPassword, tokenRequest, userUuid;
2251
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
2674
+ return runtime_1.wrap(function _callee4$(_context4) {
2252
2675
  while (1) {
2253
2676
  switch (_context4.prev = _context4.next) {
2254
2677
  case 0:
@@ -2301,9 +2724,9 @@ var OroClient = /*#__PURE__*/function () {
2301
2724
  _proto.resumeSession =
2302
2725
  /*#__PURE__*/
2303
2726
  function () {
2304
- var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
2727
+ var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
2305
2728
  var id, recoveryPayload, recoveryKey, symmetricDecryptor, privateKey;
2306
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
2729
+ return runtime_1.wrap(function _callee5$(_context5) {
2307
2730
  while (1) {
2308
2731
  switch (_context5.prev = _context5.next) {
2309
2732
  case 0:
@@ -2404,8 +2827,8 @@ var OroClient = /*#__PURE__*/function () {
2404
2827
  _proto.signOut =
2405
2828
  /*#__PURE__*/
2406
2829
  function () {
2407
- var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
2408
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2830
+ var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
2831
+ return runtime_1.wrap(function _callee6$(_context6) {
2409
2832
  while (1) {
2410
2833
  switch (_context6.prev = _context6.next) {
2411
2834
  case 0:
@@ -2456,8 +2879,8 @@ var OroClient = /*#__PURE__*/function () {
2456
2879
  _proto.registerPatient =
2457
2880
  /*#__PURE__*/
2458
2881
  function () {
2459
- var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch, onProgress) {
2460
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2882
+ var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch, onProgress) {
2883
+ return runtime_1.wrap(function _callee7$(_context7) {
2461
2884
  while (1) {
2462
2885
  switch (_context7.prev = _context7.next) {
2463
2886
  case 0:
@@ -2498,12 +2921,12 @@ var OroClient = /*#__PURE__*/function () {
2498
2921
  _proto.forceUpdateIndexEntries =
2499
2922
  /*#__PURE__*/
2500
2923
  function () {
2501
- var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
2924
+ var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9() {
2502
2925
  var _this = this,
2503
2926
  _this$vaultIndexAdd;
2504
2927
 
2505
2928
  var grants, indexConsultLockbox;
2506
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2929
+ return runtime_1.wrap(function _callee9$(_context9) {
2507
2930
  while (1) {
2508
2931
  switch (_context9.prev = _context9.next) {
2509
2932
  case 0:
@@ -2514,8 +2937,8 @@ var OroClient = /*#__PURE__*/function () {
2514
2937
  grants = _context9.sent;
2515
2938
  _context9.next = 5;
2516
2939
  return Promise.all(grants.map( /*#__PURE__*/function () {
2517
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(grant) {
2518
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2940
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(grant) {
2941
+ return runtime_1.wrap(function _callee8$(_context8) {
2519
2942
  while (1) {
2520
2943
  switch (_context8.prev = _context8.next) {
2521
2944
  case 0:
@@ -2591,10 +3014,10 @@ var OroClient = /*#__PURE__*/function () {
2591
3014
  _proto.vaultIndexAdd =
2592
3015
  /*#__PURE__*/
2593
3016
  function () {
2594
- var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(entries, indexOwnerUuid) {
3017
+ var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(entries, indexOwnerUuid) {
2595
3018
  var rsaPub, base64IndexOwnerPubKey, encryptedIndex, _i, _Object$keys, keyString, key;
2596
3019
 
2597
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
3020
+ return runtime_1.wrap(function _callee10$(_context10) {
2598
3021
  while (1) {
2599
3022
  switch (_context10.prev = _context10.next) {
2600
3023
  case 0:
@@ -2692,9 +3115,9 @@ var OroClient = /*#__PURE__*/function () {
2692
3115
  _proto.grantLockbox =
2693
3116
  /*#__PURE__*/
2694
3117
  function () {
2695
- var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
3118
+ var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
2696
3119
  var secret, base64GranteePublicKey, granteePublicKey, granteeEncryptedSecret, request;
2697
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
3120
+ return runtime_1.wrap(function _callee11$(_context11) {
2698
3121
  while (1) {
2699
3122
  switch (_context11.prev = _context11.next) {
2700
3123
  case 0:
@@ -2754,9 +3177,9 @@ var OroClient = /*#__PURE__*/function () {
2754
3177
  _proto.createMessageData =
2755
3178
  /*#__PURE__*/
2756
3179
  function () {
2757
- var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
3180
+ var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
2758
3181
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
2759
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
3182
+ return runtime_1.wrap(function _callee12$(_context12) {
2760
3183
  while (1) {
2761
3184
  switch (_context12.prev = _context12.next) {
2762
3185
  case 0:
@@ -2826,9 +3249,9 @@ var OroClient = /*#__PURE__*/function () {
2826
3249
  _proto.createMessageAttachmentData =
2827
3250
  /*#__PURE__*/
2828
3251
  function () {
2829
- var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
3252
+ var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
2830
3253
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
2831
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
3254
+ return runtime_1.wrap(function _callee13$(_context13) {
2832
3255
  while (1) {
2833
3256
  switch (_context13.prev = _context13.next) {
2834
3257
  case 0:
@@ -2906,6 +3329,7 @@ var OroClient = /*#__PURE__*/function () {
2906
3329
  * @param category the category for the attachment data
2907
3330
  * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2908
3331
  * @param previousDataUuid if it's a revision of existing file, specify the previous data uuid
3332
+ * @param withNotification if the insertion of data requires notification
2909
3333
  * @returns the data uuid
2910
3334
  */
2911
3335
  ;
@@ -2913,26 +3337,30 @@ var OroClient = /*#__PURE__*/function () {
2913
3337
  _proto.createConsultationAttachmentData =
2914
3338
  /*#__PURE__*/
2915
3339
  function () {
2916
- var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
2917
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
3340
+ var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid, withNotification) {
3341
+ return runtime_1.wrap(function _callee14$(_context14) {
2918
3342
  while (1) {
2919
3343
  switch (_context14.prev = _context14.next) {
2920
3344
  case 0:
3345
+ if (withNotification === void 0) {
3346
+ withNotification = false;
3347
+ }
3348
+
2921
3349
  if (this.rsa) {
2922
- _context14.next = 2;
3350
+ _context14.next = 3;
2923
3351
  break;
2924
3352
  }
2925
3353
 
2926
3354
  throw IncompleteAuthentication;
2927
3355
 
2928
- case 2:
3356
+ case 3:
2929
3357
  _context14.t0 = this;
2930
3358
  _context14.t1 = lockboxUuid;
2931
3359
  _context14.t2 = Uint8Array;
2932
- _context14.next = 7;
3360
+ _context14.next = 8;
2933
3361
  return data.arrayBuffer();
2934
3362
 
2935
- case 7:
3363
+ case 8:
2936
3364
  _context14.t3 = _context14.sent;
2937
3365
  _context14.t4 = new _context14.t2(_context14.t3);
2938
3366
  _context14.t5 = {
@@ -2941,10 +3369,10 @@ var OroClient = /*#__PURE__*/function () {
2941
3369
  documentType: documentType,
2942
3370
  contentType: data.type
2943
3371
  };
2944
- _context14.next = 12;
3372
+ _context14.next = 13;
2945
3373
  return this.guardClient.whoAmI();
2946
3374
 
2947
- case 12:
3375
+ case 13:
2948
3376
  _context14.t6 = _context14.sent.sub;
2949
3377
  _context14.t7 = data.name;
2950
3378
  _context14.t8 = {
@@ -2953,9 +3381,10 @@ var OroClient = /*#__PURE__*/function () {
2953
3381
  };
2954
3382
  _context14.t9 = lockboxOwnerUuid;
2955
3383
  _context14.t10 = previousDataUuid;
2956
- return _context14.abrupt("return", _context14.t0.createBytesData.call(_context14.t0, _context14.t1, _context14.t4, _context14.t5, _context14.t8, _context14.t9, _context14.t10));
3384
+ _context14.t11 = withNotification;
3385
+ return _context14.abrupt("return", _context14.t0.createBytesData.call(_context14.t0, _context14.t1, _context14.t4, _context14.t5, _context14.t8, _context14.t9, _context14.t10, _context14.t11));
2957
3386
 
2958
- case 18:
3387
+ case 20:
2959
3388
  case "end":
2960
3389
  return _context14.stop();
2961
3390
  }
@@ -2963,7 +3392,7 @@ var OroClient = /*#__PURE__*/function () {
2963
3392
  }, _callee14, this);
2964
3393
  }));
2965
3394
 
2966
- function createConsultationAttachmentData(_x35, _x36, _x37, _x38, _x39, _x40) {
3395
+ function createConsultationAttachmentData(_x35, _x36, _x37, _x38, _x39, _x40, _x41) {
2967
3396
  return _createConsultationAttachmentData.apply(this, arguments);
2968
3397
  }
2969
3398
 
@@ -2978,6 +3407,7 @@ var OroClient = /*#__PURE__*/function () {
2978
3407
  * @param privateMeta the metadata that will be secured in the vault
2979
3408
  * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
2980
3409
  * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
3410
+ * @param withNotification if the insertion of data requires notification
2981
3411
  * @returns the data uuid
2982
3412
  */
2983
3413
  ;
@@ -2985,24 +3415,28 @@ var OroClient = /*#__PURE__*/function () {
2985
3415
  _proto.createJsonData =
2986
3416
  /*#__PURE__*/
2987
3417
  function () {
2988
- var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3418
+ var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee15(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, withNotification) {
2989
3419
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
2990
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
3420
+ return runtime_1.wrap(function _callee15$(_context15) {
2991
3421
  while (1) {
2992
3422
  switch (_context15.prev = _context15.next) {
2993
3423
  case 0:
3424
+ if (withNotification === void 0) {
3425
+ withNotification = false;
3426
+ }
3427
+
2994
3428
  if (this.rsa) {
2995
- _context15.next = 2;
3429
+ _context15.next = 3;
2996
3430
  break;
2997
3431
  }
2998
3432
 
2999
3433
  throw IncompleteAuthentication;
3000
3434
 
3001
- case 2:
3002
- _context15.next = 4;
3435
+ case 3:
3436
+ _context15.next = 5;
3003
3437
  return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
3004
3438
 
3005
- case 4:
3439
+ case 5:
3006
3440
  symmetricEncryptor = _context15.sent;
3007
3441
  encryptedData = symmetricEncryptor.jsonEncryptToBase64Payload(data);
3008
3442
  encryptedPrivateMeta = symmetricEncryptor.jsonEncryptToBase64Payload(privateMeta);
@@ -3011,9 +3445,18 @@ var OroClient = /*#__PURE__*/function () {
3011
3445
  publicMetadata: meta,
3012
3446
  privateMetadata: encryptedPrivateMeta
3013
3447
  };
3448
+
3449
+ if (!withNotification) {
3450
+ _context15.next = 13;
3451
+ break;
3452
+ }
3453
+
3014
3454
  return _context15.abrupt("return", this.tellerClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
3015
3455
 
3016
- case 9:
3456
+ case 13:
3457
+ return _context15.abrupt("return", this.vaultClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
3458
+
3459
+ case 14:
3017
3460
  case "end":
3018
3461
  return _context15.stop();
3019
3462
  }
@@ -3021,7 +3464,7 @@ var OroClient = /*#__PURE__*/function () {
3021
3464
  }, _callee15, this);
3022
3465
  }));
3023
3466
 
3024
- function createJsonData(_x41, _x42, _x43, _x44, _x45, _x46) {
3467
+ function createJsonData(_x42, _x43, _x44, _x45, _x46, _x47, _x48) {
3025
3468
  return _createJsonData.apply(this, arguments);
3026
3469
  }
3027
3470
 
@@ -3034,6 +3477,7 @@ var OroClient = /*#__PURE__*/function () {
3034
3477
  * @param publicMetadata the public Metadata
3035
3478
  * @param privateMetadata the private Metadata
3036
3479
  * @param forceReplace set true when the insertion of data requires to replace the data when it exists already
3480
+ * @param withNotification if the insertion of data requires notification
3037
3481
  * @returns the data uuid
3038
3482
  */
3039
3483
  ;
@@ -3041,9 +3485,9 @@ var OroClient = /*#__PURE__*/function () {
3041
3485
  _proto.getOrInsertJsonData =
3042
3486
  /*#__PURE__*/
3043
3487
  function () {
3044
- var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
3488
+ var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace, withNotification) {
3045
3489
  var manifest;
3046
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
3490
+ return runtime_1.wrap(function _callee16$(_context16) {
3047
3491
  while (1) {
3048
3492
  switch (_context16.prev = _context16.next) {
3049
3493
  case 0:
@@ -3051,32 +3495,36 @@ var OroClient = /*#__PURE__*/function () {
3051
3495
  forceReplace = false;
3052
3496
  }
3053
3497
 
3054
- _context16.next = 3;
3498
+ if (withNotification === void 0) {
3499
+ withNotification = false;
3500
+ }
3501
+
3502
+ _context16.next = 4;
3055
3503
  return this.vaultClient.lockboxManifestGet(lockboxUuid, publicMetadata);
3056
3504
 
3057
- case 3:
3505
+ case 4:
3058
3506
  manifest = _context16.sent;
3059
3507
 
3060
3508
  if (!(!forceReplace && manifest.length > 0)) {
3061
- _context16.next = 9;
3509
+ _context16.next = 10;
3062
3510
  break;
3063
3511
  }
3064
3512
 
3065
3513
  console.log("The data for " + JSON.stringify(publicMetadata) + " already exist");
3066
3514
  return _context16.abrupt("return", manifest[0].dataUuid);
3067
3515
 
3068
- case 9:
3069
- _context16.next = 11;
3070
- return this.createJsonData(lockboxUuid, data, publicMetadata, privateMetadata, undefined, forceReplace && manifest.length > 0 ? manifest[0].dataUuid : undefined // if forceReplace and data already exist, then replace data. Otherwise insert it
3071
- )["catch"](function (err) {
3516
+ case 10:
3517
+ _context16.next = 12;
3518
+ return this.createJsonData(lockboxUuid, data, publicMetadata, privateMetadata, undefined, forceReplace && manifest.length > 0 ? manifest[0].dataUuid : undefined, // if forceReplace and data already exist, then replace data. Otherwise insert it
3519
+ withNotification)["catch"](function (err) {
3072
3520
  console.error("Error while upserting data " + JSON.stringify(publicMetadata) + " data", err);
3073
3521
  throw err;
3074
3522
  });
3075
3523
 
3076
- case 11:
3524
+ case 12:
3077
3525
  return _context16.abrupt("return", _context16.sent.dataUuid);
3078
3526
 
3079
- case 12:
3527
+ case 13:
3080
3528
  case "end":
3081
3529
  return _context16.stop();
3082
3530
  }
@@ -3084,7 +3532,7 @@ var OroClient = /*#__PURE__*/function () {
3084
3532
  }, _callee16, this);
3085
3533
  }));
3086
3534
 
3087
- function getOrInsertJsonData(_x47, _x48, _x49, _x50, _x51) {
3535
+ function getOrInsertJsonData(_x49, _x50, _x51, _x52, _x53, _x54) {
3088
3536
  return _getOrInsertJsonData.apply(this, arguments);
3089
3537
  }
3090
3538
 
@@ -3099,6 +3547,7 @@ var OroClient = /*#__PURE__*/function () {
3099
3547
  * @param privateMeta the metadata that will be secured in the vault
3100
3548
  * @param lockboxOwnerUuid the lockbox owner (ignored if lockbox is owned by self)
3101
3549
  * @param previousDataUuid if it's a revision of existing data, specify the previous data uuid
3550
+ * @param withNotification if the insertion of data requires notification
3102
3551
  * @returns the data uuid
3103
3552
  */
3104
3553
  ;
@@ -3106,24 +3555,28 @@ var OroClient = /*#__PURE__*/function () {
3106
3555
  _proto.createBytesData =
3107
3556
  /*#__PURE__*/
3108
3557
  function () {
3109
- var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3558
+ var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid, withNotification) {
3110
3559
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
3111
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
3560
+ return runtime_1.wrap(function _callee17$(_context17) {
3112
3561
  while (1) {
3113
3562
  switch (_context17.prev = _context17.next) {
3114
3563
  case 0:
3564
+ if (withNotification === void 0) {
3565
+ withNotification = false;
3566
+ }
3567
+
3115
3568
  if (this.rsa) {
3116
- _context17.next = 2;
3569
+ _context17.next = 3;
3117
3570
  break;
3118
3571
  }
3119
3572
 
3120
3573
  throw IncompleteAuthentication;
3121
3574
 
3122
- case 2:
3123
- _context17.next = 4;
3575
+ case 3:
3576
+ _context17.next = 5;
3124
3577
  return this.getCachedSecretCryptor(lockboxUuid, lockboxOwnerUuid);
3125
3578
 
3126
- case 4:
3579
+ case 5:
3127
3580
  symmetricEncryptor = _context17.sent;
3128
3581
  encryptedData = symmetricEncryptor.bytesEncryptToBase64Payload(data);
3129
3582
  encryptedPrivateMeta = symmetricEncryptor.jsonEncryptToBase64Payload(privateMeta);
@@ -3132,9 +3585,18 @@ var OroClient = /*#__PURE__*/function () {
3132
3585
  publicMetadata: meta,
3133
3586
  privateMetadata: encryptedPrivateMeta
3134
3587
  };
3588
+
3589
+ if (!withNotification) {
3590
+ _context17.next = 13;
3591
+ break;
3592
+ }
3593
+
3135
3594
  return _context17.abrupt("return", this.tellerClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
3136
3595
 
3137
- case 9:
3596
+ case 13:
3597
+ return _context17.abrupt("return", this.vaultClient.lockboxDataStore(lockboxUuid, request, lockboxOwnerUuid, previousDataUuid));
3598
+
3599
+ case 14:
3138
3600
  case "end":
3139
3601
  return _context17.stop();
3140
3602
  }
@@ -3142,7 +3604,7 @@ var OroClient = /*#__PURE__*/function () {
3142
3604
  }, _callee17, this);
3143
3605
  }));
3144
3606
 
3145
- function createBytesData(_x52, _x53, _x54, _x55, _x56, _x57) {
3607
+ function createBytesData(_x55, _x56, _x57, _x58, _x59, _x60, _x61) {
3146
3608
  return _createBytesData.apply(this, arguments);
3147
3609
  }
3148
3610
 
@@ -3164,10 +3626,10 @@ var OroClient = /*#__PURE__*/function () {
3164
3626
  _proto.getJsonData =
3165
3627
  /*#__PURE__*/
3166
3628
  function () {
3167
- var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3629
+ var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3168
3630
  var _yield$Promise$all, encryptedPayload, symmetricDecryptor;
3169
3631
 
3170
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
3632
+ return runtime_1.wrap(function _callee18$(_context18) {
3171
3633
  while (1) {
3172
3634
  switch (_context18.prev = _context18.next) {
3173
3635
  case 0:
@@ -3196,7 +3658,7 @@ var OroClient = /*#__PURE__*/function () {
3196
3658
  }, _callee18, this);
3197
3659
  }));
3198
3660
 
3199
- function getJsonData(_x58, _x59, _x60) {
3661
+ function getJsonData(_x62, _x63, _x64) {
3200
3662
  return _getJsonData.apply(this, arguments);
3201
3663
  }
3202
3664
 
@@ -3214,10 +3676,10 @@ var OroClient = /*#__PURE__*/function () {
3214
3676
  _proto.getBytesData =
3215
3677
  /*#__PURE__*/
3216
3678
  function () {
3217
- var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3679
+ var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3218
3680
  var _yield$Promise$all2, encryptedPayload, symmetricDecryptor;
3219
3681
 
3220
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
3682
+ return runtime_1.wrap(function _callee19$(_context19) {
3221
3683
  while (1) {
3222
3684
  switch (_context19.prev = _context19.next) {
3223
3685
  case 0:
@@ -3246,7 +3708,7 @@ var OroClient = /*#__PURE__*/function () {
3246
3708
  }, _callee19, this);
3247
3709
  }));
3248
3710
 
3249
- function getBytesData(_x61, _x62, _x63) {
3711
+ function getBytesData(_x65, _x66, _x67) {
3250
3712
  return _getBytesData.apply(this, arguments);
3251
3713
  }
3252
3714
 
@@ -3267,9 +3729,9 @@ var OroClient = /*#__PURE__*/function () {
3267
3729
  _proto.getGrants =
3268
3730
  /*#__PURE__*/
3269
3731
  function () {
3270
- var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(filter) {
3732
+ var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(filter) {
3271
3733
  var filterString, currentAccountRole, encryptedGrants, decryptedGrants, grantsByConsultLockbox, decryptedConsults;
3272
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
3734
+ return runtime_1.wrap(function _callee20$(_context20) {
3273
3735
  while (1) {
3274
3736
  switch (_context20.prev = _context20.next) {
3275
3737
  case 0:
@@ -3384,7 +3846,7 @@ var OroClient = /*#__PURE__*/function () {
3384
3846
  }, _callee20, this);
3385
3847
  }));
3386
3848
 
3387
- function getGrants(_x64) {
3849
+ function getGrants(_x68) {
3388
3850
  return _getGrants.apply(this, arguments);
3389
3851
  }
3390
3852
 
@@ -3400,8 +3862,8 @@ var OroClient = /*#__PURE__*/function () {
3400
3862
  _proto.getAccountRole =
3401
3863
  /*#__PURE__*/
3402
3864
  function () {
3403
- var _getAccountRole = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
3404
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
3865
+ var _getAccountRole = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21() {
3866
+ return runtime_1.wrap(function _callee21$(_context21) {
3405
3867
  while (1) {
3406
3868
  switch (_context21.prev = _context21.next) {
3407
3869
  case 0:
@@ -3437,9 +3899,9 @@ var OroClient = /*#__PURE__*/function () {
3437
3899
  _proto.getCachedSecretCryptor =
3438
3900
  /*#__PURE__*/
3439
3901
  function () {
3440
- var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(lockboxUuid, lockboxOwnerUuid) {
3902
+ var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(lockboxUuid, lockboxOwnerUuid) {
3441
3903
  var index, encryptedSecret, secret, cryptor;
3442
- return _regeneratorRuntime().wrap(function _callee22$(_context22) {
3904
+ return runtime_1.wrap(function _callee22$(_context22) {
3443
3905
  while (1) {
3444
3906
  switch (_context22.prev = _context22.next) {
3445
3907
  case 0:
@@ -3484,7 +3946,7 @@ var OroClient = /*#__PURE__*/function () {
3484
3946
  }, _callee22, this);
3485
3947
  }));
3486
3948
 
3487
- function getCachedSecretCryptor(_x65, _x66) {
3949
+ function getCachedSecretCryptor(_x69, _x70) {
3488
3950
  return _getCachedSecretCryptor.apply(this, arguments);
3489
3951
  }
3490
3952
 
@@ -3504,8 +3966,8 @@ var OroClient = /*#__PURE__*/function () {
3504
3966
  _proto.getPersonalInformationsFromConsultId =
3505
3967
  /*#__PURE__*/
3506
3968
  function () {
3507
- var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(consultationId, category, forceRefresh) {
3508
- return _regeneratorRuntime().wrap(function _callee23$(_context23) {
3969
+ var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(consultationId, category, forceRefresh) {
3970
+ return runtime_1.wrap(function _callee23$(_context23) {
3509
3971
  while (1) {
3510
3972
  switch (_context23.prev = _context23.next) {
3511
3973
  case 0:
@@ -3523,7 +3985,7 @@ var OroClient = /*#__PURE__*/function () {
3523
3985
  }, _callee23, this);
3524
3986
  }));
3525
3987
 
3526
- function getPersonalInformationsFromConsultId(_x67, _x68, _x69) {
3988
+ function getPersonalInformationsFromConsultId(_x71, _x72, _x73) {
3527
3989
  return _getPersonalInformationsFromConsultId.apply(this, arguments);
3528
3990
  }
3529
3991
 
@@ -3542,8 +4004,8 @@ var OroClient = /*#__PURE__*/function () {
3542
4004
  _proto.getMedicalDataFromConsultId =
3543
4005
  /*#__PURE__*/
3544
4006
  function () {
3545
- var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(consultationId, forceRefresh) {
3546
- return _regeneratorRuntime().wrap(function _callee24$(_context24) {
4007
+ var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(consultationId, forceRefresh) {
4008
+ return runtime_1.wrap(function _callee24$(_context24) {
3547
4009
  while (1) {
3548
4010
  switch (_context24.prev = _context24.next) {
3549
4011
  case 0:
@@ -3561,7 +4023,7 @@ var OroClient = /*#__PURE__*/function () {
3561
4023
  }, _callee24, this);
3562
4024
  }));
3563
4025
 
3564
- function getMedicalDataFromConsultId(_x70, _x71) {
4026
+ function getMedicalDataFromConsultId(_x74, _x75) {
3565
4027
  return _getMedicalDataFromConsultId.apply(this, arguments);
3566
4028
  }
3567
4029
 
@@ -3569,12 +4031,12 @@ var OroClient = /*#__PURE__*/function () {
3569
4031
  }();
3570
4032
 
3571
4033
  _proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
3572
- var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(consultationId, category, forceRefresh) {
4034
+ var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(consultationId, category, forceRefresh) {
3573
4035
  var _this2 = this;
3574
4036
 
3575
4037
  var grants, workflowData, _loop, _iterator, _step;
3576
4038
 
3577
- return _regeneratorRuntime().wrap(function _callee26$(_context27) {
4039
+ return runtime_1.wrap(function _callee26$(_context27) {
3578
4040
  while (1) {
3579
4041
  switch (_context27.prev = _context27.next) {
3580
4042
  case 0:
@@ -3590,9 +4052,9 @@ var OroClient = /*#__PURE__*/function () {
3590
4052
  case 3:
3591
4053
  grants = _context27.sent;
3592
4054
  workflowData = [];
3593
- _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
4055
+ _loop = /*#__PURE__*/runtime_1.mark(function _loop() {
3594
4056
  var grant, manifest, data;
3595
- return _regeneratorRuntime().wrap(function _loop$(_context26) {
4057
+ return runtime_1.wrap(function _loop$(_context26) {
3596
4058
  while (1) {
3597
4059
  switch (_context26.prev = _context26.next) {
3598
4060
  case 0:
@@ -3626,8 +4088,8 @@ var OroClient = /*#__PURE__*/function () {
3626
4088
  case 8:
3627
4089
  _context26.next = 10;
3628
4090
  return Promise.all(manifest.map( /*#__PURE__*/function () {
3629
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(entry) {
3630
- return _regeneratorRuntime().wrap(function _callee25$(_context25) {
4091
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(entry) {
4092
+ return runtime_1.wrap(function _callee25$(_context25) {
3631
4093
  while (1) {
3632
4094
  switch (_context25.prev = _context25.next) {
3633
4095
  case 0:
@@ -3654,7 +4116,7 @@ var OroClient = /*#__PURE__*/function () {
3654
4116
  }, _callee25);
3655
4117
  }));
3656
4118
 
3657
- return function (_x75) {
4119
+ return function (_x79) {
3658
4120
  return _ref3.apply(this, arguments);
3659
4121
  };
3660
4122
  }()));
@@ -3695,7 +4157,7 @@ var OroClient = /*#__PURE__*/function () {
3695
4157
  }, _callee26, this);
3696
4158
  }));
3697
4159
 
3698
- function getMetaCategoryFromConsultId(_x72, _x73, _x74) {
4160
+ function getMetaCategoryFromConsultId(_x76, _x77, _x78) {
3699
4161
  return _getMetaCategoryFromConsultId.apply(this, arguments);
3700
4162
  }
3701
4163
 
@@ -3711,9 +4173,9 @@ var OroClient = /*#__PURE__*/function () {
3711
4173
  _proto.getPersonalInformations =
3712
4174
  /*#__PURE__*/
3713
4175
  function () {
3714
- var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(userId) {
4176
+ var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(userId) {
3715
4177
  var grant, lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
3716
- return _regeneratorRuntime().wrap(function _callee27$(_context28) {
4178
+ return runtime_1.wrap(function _callee27$(_context28) {
3717
4179
  while (1) {
3718
4180
  switch (_context28.prev = _context28.next) {
3719
4181
  case 0:
@@ -3782,7 +4244,7 @@ var OroClient = /*#__PURE__*/function () {
3782
4244
  }, _callee27, this);
3783
4245
  }));
3784
4246
 
3785
- function getPersonalInformations(_x76) {
4247
+ function getPersonalInformations(_x80) {
3786
4248
  return _getPersonalInformations.apply(this, arguments);
3787
4249
  }
3788
4250
 
@@ -3799,9 +4261,9 @@ var OroClient = /*#__PURE__*/function () {
3799
4261
  _proto.getGrantFromConsultId =
3800
4262
  /*#__PURE__*/
3801
4263
  function () {
3802
- var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(consultationId) {
4264
+ var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(consultationId) {
3803
4265
  var grants;
3804
- return _regeneratorRuntime().wrap(function _callee28$(_context29) {
4266
+ return runtime_1.wrap(function _callee28$(_context29) {
3805
4267
  while (1) {
3806
4268
  switch (_context29.prev = _context29.next) {
3807
4269
  case 0:
@@ -3831,7 +4293,7 @@ var OroClient = /*#__PURE__*/function () {
3831
4293
  }, _callee28, this);
3832
4294
  }));
3833
4295
 
3834
- function getGrantFromConsultId(_x77) {
4296
+ function getGrantFromConsultId(_x81) {
3835
4297
  return _getGrantFromConsultId.apply(this, arguments);
3836
4298
  }
3837
4299
 
@@ -3847,9 +4309,9 @@ var OroClient = /*#__PURE__*/function () {
3847
4309
  _proto.getIdentityFromConsultId =
3848
4310
  /*#__PURE__*/
3849
4311
  function () {
3850
- var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(consultationId) {
4312
+ var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(consultationId) {
3851
4313
  var grant;
3852
- return _regeneratorRuntime().wrap(function _callee29$(_context30) {
4314
+ return runtime_1.wrap(function _callee29$(_context30) {
3853
4315
  while (1) {
3854
4316
  switch (_context30.prev = _context30.next) {
3855
4317
  case 0:
@@ -3881,7 +4343,7 @@ var OroClient = /*#__PURE__*/function () {
3881
4343
  }, _callee29, this);
3882
4344
  }));
3883
4345
 
3884
- function getIdentityFromConsultId(_x78) {
4346
+ function getIdentityFromConsultId(_x82) {
3885
4347
  return _getIdentityFromConsultId.apply(this, arguments);
3886
4348
  }
3887
4349
 
@@ -3902,11 +4364,11 @@ var OroClient = /*#__PURE__*/function () {
3902
4364
  _proto.getLockboxManifest =
3903
4365
  /*#__PURE__*/
3904
4366
  function () {
3905
- var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
4367
+ var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
3906
4368
  var _this3 = this;
3907
4369
 
3908
4370
  var manifestKey;
3909
- return _regeneratorRuntime().wrap(function _callee31$(_context32) {
4371
+ return runtime_1.wrap(function _callee31$(_context32) {
3910
4372
  while (1) {
3911
4373
  switch (_context32.prev = _context32.next) {
3912
4374
  case 0:
@@ -3931,9 +4393,9 @@ var OroClient = /*#__PURE__*/function () {
3931
4393
  case 4:
3932
4394
  return _context32.abrupt("return", this.vaultClient.lockboxManifestGet(lockboxUuid, filter, lockboxOwnerUuid).then(function (manifest) {
3933
4395
  return Promise.all(manifest.map( /*#__PURE__*/function () {
3934
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(entry) {
4396
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(entry) {
3935
4397
  var privateMeta;
3936
- return _regeneratorRuntime().wrap(function _callee30$(_context31) {
4398
+ return runtime_1.wrap(function _callee30$(_context31) {
3937
4399
  while (1) {
3938
4400
  switch (_context31.prev = _context31.next) {
3939
4401
  case 0:
@@ -3960,7 +4422,7 @@ var OroClient = /*#__PURE__*/function () {
3960
4422
  }, _callee30);
3961
4423
  }));
3962
4424
 
3963
- return function (_x84) {
4425
+ return function (_x88) {
3964
4426
  return _ref4.apply(this, arguments);
3965
4427
  };
3966
4428
  }())).then(function (manifest) {
@@ -3976,7 +4438,7 @@ var OroClient = /*#__PURE__*/function () {
3976
4438
  }, _callee31, this);
3977
4439
  }));
3978
4440
 
3979
- function getLockboxManifest(_x79, _x80, _x81, _x82, _x83) {
4441
+ function getLockboxManifest(_x83, _x84, _x85, _x86, _x87) {
3980
4442
  return _getLockboxManifest.apply(this, arguments);
3981
4443
  }
3982
4444
 
@@ -3994,11 +4456,11 @@ var OroClient = /*#__PURE__*/function () {
3994
4456
  _proto.createPersonalInformations =
3995
4457
  /*#__PURE__*/
3996
4458
  function () {
3997
- var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(identity, data, dataUuid) {
4459
+ var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(identity, data, dataUuid) {
3998
4460
  var _yield$this$getGrants;
3999
4461
 
4000
4462
  var lockboxUuid;
4001
- return _regeneratorRuntime().wrap(function _callee32$(_context33) {
4463
+ return runtime_1.wrap(function _callee32$(_context33) {
4002
4464
  while (1) {
4003
4465
  switch (_context33.prev = _context33.next) {
4004
4466
  case 0:
@@ -4046,7 +4508,7 @@ var OroClient = /*#__PURE__*/function () {
4046
4508
  }, _callee32, this);
4047
4509
  }));
4048
4510
 
4049
- function createPersonalInformations(_x85, _x86, _x87) {
4511
+ function createPersonalInformations(_x89, _x90, _x91) {
4050
4512
  return _createPersonalInformations.apply(this, arguments);
4051
4513
  }
4052
4514
 
@@ -4064,11 +4526,11 @@ var OroClient = /*#__PURE__*/function () {
4064
4526
  _proto.createUserPreference =
4065
4527
  /*#__PURE__*/
4066
4528
  function () {
4067
- var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(identity, preference, dataUuid) {
4529
+ var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(identity, preference, dataUuid) {
4068
4530
  var _yield$this$getGrants2;
4069
4531
 
4070
4532
  var lockboxUuid;
4071
- return _regeneratorRuntime().wrap(function _callee33$(_context34) {
4533
+ return runtime_1.wrap(function _callee33$(_context34) {
4072
4534
  while (1) {
4073
4535
  switch (_context34.prev = _context34.next) {
4074
4536
  case 0:
@@ -4116,7 +4578,7 @@ var OroClient = /*#__PURE__*/function () {
4116
4578
  }, _callee33, this);
4117
4579
  }));
4118
4580
 
4119
- function createUserPreference(_x88, _x89, _x90) {
4581
+ function createUserPreference(_x92, _x93, _x94) {
4120
4582
  return _createUserPreference.apply(this, arguments);
4121
4583
  }
4122
4584
 
@@ -4132,9 +4594,9 @@ var OroClient = /*#__PURE__*/function () {
4132
4594
  _proto.getDataFromGrant =
4133
4595
  /*#__PURE__*/
4134
4596
  function () {
4135
- var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(grant, filter) {
4597
+ var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(grant, filter) {
4136
4598
  var lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
4137
- return _regeneratorRuntime().wrap(function _callee34$(_context35) {
4599
+ return runtime_1.wrap(function _callee34$(_context35) {
4138
4600
  while (1) {
4139
4601
  switch (_context35.prev = _context35.next) {
4140
4602
  case 0:
@@ -4184,7 +4646,7 @@ var OroClient = /*#__PURE__*/function () {
4184
4646
  }, _callee34, this);
4185
4647
  }));
4186
4648
 
4187
- function getDataFromGrant(_x91, _x92) {
4649
+ function getDataFromGrant(_x95, _x96) {
4188
4650
  return _getDataFromGrant.apply(this, arguments);
4189
4651
  }
4190
4652
 
@@ -4200,9 +4662,9 @@ var OroClient = /*#__PURE__*/function () {
4200
4662
  _proto.getUserPreferenceFromConsultId =
4201
4663
  /*#__PURE__*/
4202
4664
  function () {
4203
- var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(consultationId) {
4665
+ var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(consultationId) {
4204
4666
  var grant;
4205
- return _regeneratorRuntime().wrap(function _callee35$(_context36) {
4667
+ return runtime_1.wrap(function _callee35$(_context36) {
4206
4668
  while (1) {
4207
4669
  switch (_context36.prev = _context36.next) {
4208
4670
  case 0:
@@ -4233,7 +4695,7 @@ var OroClient = /*#__PURE__*/function () {
4233
4695
  }, _callee35, this);
4234
4696
  }));
4235
4697
 
4236
- function getUserPreferenceFromConsultId(_x93) {
4698
+ function getUserPreferenceFromConsultId(_x97) {
4237
4699
  return _getUserPreferenceFromConsultId.apply(this, arguments);
4238
4700
  }
4239
4701
 
@@ -4249,9 +4711,9 @@ var OroClient = /*#__PURE__*/function () {
4249
4711
  _proto.getUserPreference =
4250
4712
  /*#__PURE__*/
4251
4713
  function () {
4252
- var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(identity) {
4714
+ var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(identity) {
4253
4715
  var grant;
4254
- return _regeneratorRuntime().wrap(function _callee36$(_context37) {
4716
+ return runtime_1.wrap(function _callee36$(_context37) {
4255
4717
  while (1) {
4256
4718
  switch (_context37.prev = _context37.next) {
4257
4719
  case 0:
@@ -4284,7 +4746,7 @@ var OroClient = /*#__PURE__*/function () {
4284
4746
  }, _callee36, this);
4285
4747
  }));
4286
4748
 
4287
- function getUserPreference(_x94) {
4749
+ function getUserPreference(_x98) {
4288
4750
  return _getUserPreference.apply(this, arguments);
4289
4751
  }
4290
4752
 
@@ -4300,9 +4762,9 @@ var OroClient = /*#__PURE__*/function () {
4300
4762
  _proto.getRecoveryDataFromConsultId =
4301
4763
  /*#__PURE__*/
4302
4764
  function () {
4303
- var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(consultationId) {
4765
+ var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(consultationId) {
4304
4766
  var grant;
4305
- return _regeneratorRuntime().wrap(function _callee37$(_context38) {
4767
+ return runtime_1.wrap(function _callee37$(_context38) {
4306
4768
  while (1) {
4307
4769
  switch (_context38.prev = _context38.next) {
4308
4770
  case 0:
@@ -4333,7 +4795,7 @@ var OroClient = /*#__PURE__*/function () {
4333
4795
  }, _callee37, this);
4334
4796
  }));
4335
4797
 
4336
- function getRecoveryDataFromConsultId(_x95) {
4798
+ function getRecoveryDataFromConsultId(_x99) {
4337
4799
  return _getRecoveryDataFromConsultId.apply(this, arguments);
4338
4800
  }
4339
4801
 
@@ -4349,9 +4811,9 @@ var OroClient = /*#__PURE__*/function () {
4349
4811
  _proto.getRecoveryData =
4350
4812
  /*#__PURE__*/
4351
4813
  function () {
4352
- var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(identity) {
4814
+ var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(identity) {
4353
4815
  var grant;
4354
- return _regeneratorRuntime().wrap(function _callee38$(_context39) {
4816
+ return runtime_1.wrap(function _callee38$(_context39) {
4355
4817
  while (1) {
4356
4818
  switch (_context39.prev = _context39.next) {
4357
4819
  case 0:
@@ -4384,7 +4846,7 @@ var OroClient = /*#__PURE__*/function () {
4384
4846
  }, _callee38, this);
4385
4847
  }));
4386
4848
 
4387
- function getRecoveryData(_x96) {
4849
+ function getRecoveryData(_x100) {
4388
4850
  return _getRecoveryData.apply(this, arguments);
4389
4851
  }
4390
4852
 
@@ -4405,10 +4867,10 @@ var OroClient = /*#__PURE__*/function () {
4405
4867
  _proto.getAssignedConsultations =
4406
4868
  /*#__PURE__*/
4407
4869
  function () {
4408
- var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(practiceUuid) {
4870
+ var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(practiceUuid) {
4409
4871
  var _this4 = this;
4410
4872
 
4411
- return _regeneratorRuntime().wrap(function _callee40$(_context41) {
4873
+ return runtime_1.wrap(function _callee40$(_context41) {
4412
4874
  while (1) {
4413
4875
  switch (_context41.prev = _context41.next) {
4414
4876
  case 0:
@@ -4423,8 +4885,8 @@ var OroClient = /*#__PURE__*/function () {
4423
4885
  documentType: DocumentType.PopulatedWorkflowData
4424
4886
  }, true, undefined).then(function (manifest) {
4425
4887
  return Promise.all(manifest.map( /*#__PURE__*/function () {
4426
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(entry) {
4427
- return _regeneratorRuntime().wrap(function _callee39$(_context40) {
4888
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(entry) {
4889
+ return runtime_1.wrap(function _callee39$(_context40) {
4428
4890
  while (1) {
4429
4891
  switch (_context40.prev = _context40.next) {
4430
4892
  case 0:
@@ -4442,7 +4904,7 @@ var OroClient = /*#__PURE__*/function () {
4442
4904
  }, _callee39);
4443
4905
  }));
4444
4906
 
4445
- return function (_x98) {
4907
+ return function (_x102) {
4446
4908
  return _ref5.apply(this, arguments);
4447
4909
  };
4448
4910
  }())).then(function (promise) {
@@ -4462,7 +4924,7 @@ var OroClient = /*#__PURE__*/function () {
4462
4924
  }, _callee40, this);
4463
4925
  }));
4464
4926
 
4465
- function getAssignedConsultations(_x97) {
4927
+ function getAssignedConsultations(_x101) {
4466
4928
  return _getAssignedConsultations.apply(this, arguments);
4467
4929
  }
4468
4930
 
@@ -4478,11 +4940,11 @@ var OroClient = /*#__PURE__*/function () {
4478
4940
  _proto.getPastConsultationsFromConsultId =
4479
4941
  /*#__PURE__*/
4480
4942
  function () {
4481
- var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(consultationId, practiceUuid) {
4943
+ var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(consultationId, practiceUuid) {
4482
4944
  var _this5 = this;
4483
4945
 
4484
4946
  var grant, consultationsInLockbox;
4485
- return _regeneratorRuntime().wrap(function _callee42$(_context43) {
4947
+ return runtime_1.wrap(function _callee42$(_context43) {
4486
4948
  while (1) {
4487
4949
  switch (_context43.prev = _context43.next) {
4488
4950
  case 0:
@@ -4521,8 +4983,8 @@ var OroClient = /*#__PURE__*/function () {
4521
4983
  case 10:
4522
4984
  _context43.next = 12;
4523
4985
  return Promise.all(consultationsInLockbox.map( /*#__PURE__*/function () {
4524
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(consultId) {
4525
- return _regeneratorRuntime().wrap(function _callee41$(_context42) {
4986
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(consultId) {
4987
+ return runtime_1.wrap(function _callee41$(_context42) {
4526
4988
  while (1) {
4527
4989
  switch (_context42.prev = _context42.next) {
4528
4990
  case 0:
@@ -4540,7 +5002,7 @@ var OroClient = /*#__PURE__*/function () {
4540
5002
  }, _callee41);
4541
5003
  }));
4542
5004
 
4543
- return function (_x101) {
5005
+ return function (_x105) {
4544
5006
  return _ref6.apply(this, arguments);
4545
5007
  };
4546
5008
  }()));
@@ -4556,7 +5018,7 @@ var OroClient = /*#__PURE__*/function () {
4556
5018
  }, _callee42, this);
4557
5019
  }));
4558
5020
 
4559
- function getPastConsultationsFromConsultId(_x99, _x100) {
5021
+ function getPastConsultationsFromConsultId(_x103, _x104) {
4560
5022
  return _getPastConsultationsFromConsultId.apply(this, arguments);
4561
5023
  }
4562
5024
 
@@ -4573,10 +5035,10 @@ var OroClient = /*#__PURE__*/function () {
4573
5035
  _proto.getPatientConsultationData =
4574
5036
  /*#__PURE__*/
4575
5037
  function () {
4576
- var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(consultationId, forceRefresh) {
5038
+ var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(consultationId, forceRefresh) {
4577
5039
  var _this6 = this;
4578
5040
 
4579
- return _regeneratorRuntime().wrap(function _callee43$(_context44) {
5041
+ return runtime_1.wrap(function _callee43$(_context44) {
4580
5042
  while (1) {
4581
5043
  switch (_context44.prev = _context44.next) {
4582
5044
  case 0:
@@ -4614,7 +5076,7 @@ var OroClient = /*#__PURE__*/function () {
4614
5076
  }, _callee43, this);
4615
5077
  }));
4616
5078
 
4617
- function getPatientConsultationData(_x102, _x103) {
5079
+ function getPatientConsultationData(_x106, _x107) {
4618
5080
  return _getPatientConsultationData.apply(this, arguments);
4619
5081
  }
4620
5082
 
@@ -4630,8 +5092,8 @@ var OroClient = /*#__PURE__*/function () {
4630
5092
  _proto.getPatientPrescriptionsList =
4631
5093
  /*#__PURE__*/
4632
5094
  function () {
4633
- var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(consultationId) {
4634
- return _regeneratorRuntime().wrap(function _callee44$(_context45) {
5095
+ var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(consultationId) {
5096
+ return runtime_1.wrap(function _callee44$(_context45) {
4635
5097
  while (1) {
4636
5098
  switch (_context45.prev = _context45.next) {
4637
5099
  case 0:
@@ -4648,7 +5110,7 @@ var OroClient = /*#__PURE__*/function () {
4648
5110
  }, _callee44, this);
4649
5111
  }));
4650
5112
 
4651
- function getPatientPrescriptionsList(_x104) {
5113
+ function getPatientPrescriptionsList(_x108) {
4652
5114
  return _getPatientPrescriptionsList.apply(this, arguments);
4653
5115
  }
4654
5116
 
@@ -4664,8 +5126,8 @@ var OroClient = /*#__PURE__*/function () {
4664
5126
  _proto.getPatientResultsList =
4665
5127
  /*#__PURE__*/
4666
5128
  function () {
4667
- var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(consultationId) {
4668
- return _regeneratorRuntime().wrap(function _callee45$(_context46) {
5129
+ var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(consultationId) {
5130
+ return runtime_1.wrap(function _callee45$(_context46) {
4669
5131
  while (1) {
4670
5132
  switch (_context46.prev = _context46.next) {
4671
5133
  case 0:
@@ -4682,7 +5144,7 @@ var OroClient = /*#__PURE__*/function () {
4682
5144
  }, _callee45, this);
4683
5145
  }));
4684
5146
 
4685
- function getPatientResultsList(_x105) {
5147
+ function getPatientResultsList(_x109) {
4686
5148
  return _getPatientResultsList.apply(this, arguments);
4687
5149
  }
4688
5150
 
@@ -4698,8 +5160,8 @@ var OroClient = /*#__PURE__*/function () {
4698
5160
  _proto.getPatientTreatmentPlans =
4699
5161
  /*#__PURE__*/
4700
5162
  function () {
4701
- var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(consultationId) {
4702
- return _regeneratorRuntime().wrap(function _callee46$(_context47) {
5163
+ var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(consultationId) {
5164
+ return runtime_1.wrap(function _callee46$(_context47) {
4703
5165
  while (1) {
4704
5166
  switch (_context47.prev = _context47.next) {
4705
5167
  case 0:
@@ -4716,7 +5178,7 @@ var OroClient = /*#__PURE__*/function () {
4716
5178
  }, _callee46, this);
4717
5179
  }));
4718
5180
 
4719
- function getPatientTreatmentPlans(_x106) {
5181
+ function getPatientTreatmentPlans(_x110) {
4720
5182
  return _getPatientTreatmentPlans.apply(this, arguments);
4721
5183
  }
4722
5184
 
@@ -4733,8 +5195,8 @@ var OroClient = /*#__PURE__*/function () {
4733
5195
  _proto.getPatientTreatmentPlanByUuid =
4734
5196
  /*#__PURE__*/
4735
5197
  function () {
4736
- var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(consultationId, treatmentPlanId) {
4737
- return _regeneratorRuntime().wrap(function _callee47$(_context48) {
5198
+ var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(consultationId, treatmentPlanId) {
5199
+ return runtime_1.wrap(function _callee47$(_context48) {
4738
5200
  while (1) {
4739
5201
  switch (_context48.prev = _context48.next) {
4740
5202
  case 0:
@@ -4752,7 +5214,7 @@ var OroClient = /*#__PURE__*/function () {
4752
5214
  }, _callee47, this);
4753
5215
  }));
4754
5216
 
4755
- function getPatientTreatmentPlanByUuid(_x107, _x108) {
5217
+ function getPatientTreatmentPlanByUuid(_x111, _x112) {
4756
5218
  return _getPatientTreatmentPlanByUuid.apply(this, arguments);
4757
5219
  }
4758
5220
 
@@ -4772,10 +5234,10 @@ var OroClient = /*#__PURE__*/function () {
4772
5234
  _proto.getPatientDocumentsList =
4773
5235
  /*#__PURE__*/
4774
5236
  function () {
4775
- var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(filters, expandPrivateMetadata, consultationId) {
5237
+ var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(filters, expandPrivateMetadata, consultationId) {
4776
5238
  var _this7 = this;
4777
5239
 
4778
- return _regeneratorRuntime().wrap(function _callee49$(_context50) {
5240
+ return runtime_1.wrap(function _callee49$(_context50) {
4779
5241
  while (1) {
4780
5242
  switch (_context50.prev = _context50.next) {
4781
5243
  case 0:
@@ -4791,8 +5253,8 @@ var OroClient = /*#__PURE__*/function () {
4791
5253
  consultationId: consultationId
4792
5254
  }), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
4793
5255
  return Promise.all(manifest.map( /*#__PURE__*/function () {
4794
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(entry) {
4795
- return _regeneratorRuntime().wrap(function _callee48$(_context49) {
5256
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(entry) {
5257
+ return runtime_1.wrap(function _callee48$(_context49) {
4796
5258
  while (1) {
4797
5259
  switch (_context49.prev = _context49.next) {
4798
5260
  case 0:
@@ -4809,7 +5271,7 @@ var OroClient = /*#__PURE__*/function () {
4809
5271
  }, _callee48);
4810
5272
  }));
4811
5273
 
4812
- return function (_x112) {
5274
+ return function (_x116) {
4813
5275
  return _ref7.apply(this, arguments);
4814
5276
  };
4815
5277
  }()));
@@ -4827,7 +5289,7 @@ var OroClient = /*#__PURE__*/function () {
4827
5289
  }, _callee49, this);
4828
5290
  }));
4829
5291
 
4830
- function getPatientDocumentsList(_x109, _x110, _x111) {
5292
+ function getPatientDocumentsList(_x113, _x114, _x115) {
4831
5293
  return _getPatientDocumentsList.apply(this, arguments);
4832
5294
  }
4833
5295
 
@@ -4850,9 +5312,9 @@ var OroClient = /*#__PURE__*/function () {
4850
5312
  _proto.recoverPrivateKeyFromSecurityQuestions =
4851
5313
  /*#__PURE__*/
4852
5314
  function () {
4853
- var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5315
+ var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
4854
5316
  var shards, answeredShards, privateKey;
4855
- return _regeneratorRuntime().wrap(function _callee50$(_context51) {
5317
+ return runtime_1.wrap(function _callee50$(_context51) {
4856
5318
  while (1) {
4857
5319
  switch (_context51.prev = _context51.next) {
4858
5320
  case 0:
@@ -4889,7 +5351,7 @@ var OroClient = /*#__PURE__*/function () {
4889
5351
  }, _callee50, this);
4890
5352
  }));
4891
5353
 
4892
- function recoverPrivateKeyFromSecurityQuestions(_x113, _x114, _x115, _x116) {
5354
+ function recoverPrivateKeyFromSecurityQuestions(_x117, _x118, _x119, _x120) {
4893
5355
  return _recoverPrivateKeyFromSecurityQuestions.apply(this, arguments);
4894
5356
  }
4895
5357
 
@@ -4906,9 +5368,9 @@ var OroClient = /*#__PURE__*/function () {
4906
5368
  _proto.recoverPrivateKeyFromPassword =
4907
5369
  /*#__PURE__*/
4908
5370
  function () {
4909
- var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(id, password) {
5371
+ var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(id, password) {
4910
5372
  var identity, recoveryPayload, symmetricDecryptor, privateKey, symetricEncryptor;
4911
- return _regeneratorRuntime().wrap(function _callee51$(_context52) {
5373
+ return runtime_1.wrap(function _callee51$(_context52) {
4912
5374
  while (1) {
4913
5375
  switch (_context52.prev = _context52.next) {
4914
5376
  case 0:
@@ -4937,7 +5399,7 @@ var OroClient = /*#__PURE__*/function () {
4937
5399
  }, _callee51, this);
4938
5400
  }));
4939
5401
 
4940
- function recoverPrivateKeyFromPassword(_x117, _x118) {
5402
+ function recoverPrivateKeyFromPassword(_x121, _x122) {
4941
5403
  return _recoverPrivateKeyFromPassword.apply(this, arguments);
4942
5404
  }
4943
5405
 
@@ -4954,9 +5416,9 @@ var OroClient = /*#__PURE__*/function () {
4954
5416
  _proto.recoverPrivateKeyFromMasterKey =
4955
5417
  /*#__PURE__*/
4956
5418
  function () {
4957
- var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(id, masterKey) {
5419
+ var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(id, masterKey) {
4958
5420
  var recoveryPayload, symmetricDecryptor, privateKey;
4959
- return _regeneratorRuntime().wrap(function _callee52$(_context53) {
5421
+ return runtime_1.wrap(function _callee52$(_context53) {
4960
5422
  while (1) {
4961
5423
  switch (_context53.prev = _context53.next) {
4962
5424
  case 0:
@@ -4977,7 +5439,7 @@ var OroClient = /*#__PURE__*/function () {
4977
5439
  }, _callee52, this);
4978
5440
  }));
4979
5441
 
4980
- function recoverPrivateKeyFromMasterKey(_x119, _x120) {
5442
+ function recoverPrivateKeyFromMasterKey(_x123, _x124) {
4981
5443
  return _recoverPrivateKeyFromMasterKey.apply(this, arguments);
4982
5444
  }
4983
5445
 
@@ -4996,9 +5458,9 @@ var OroClient = /*#__PURE__*/function () {
4996
5458
  _proto.updateSecurityQuestions =
4997
5459
  /*#__PURE__*/
4998
5460
  function () {
4999
- var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5461
+ var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5000
5462
  var securityQuestionPayload, updateRequest;
5001
- return _regeneratorRuntime().wrap(function _callee53$(_context54) {
5463
+ return runtime_1.wrap(function _callee53$(_context54) {
5002
5464
  while (1) {
5003
5465
  switch (_context54.prev = _context54.next) {
5004
5466
  case 0:
@@ -5028,7 +5490,7 @@ var OroClient = /*#__PURE__*/function () {
5028
5490
  }, _callee53, this);
5029
5491
  }));
5030
5492
 
5031
- function updateSecurityQuestions(_x121, _x122, _x123, _x124) {
5493
+ function updateSecurityQuestions(_x125, _x126, _x127, _x128) {
5032
5494
  return _updateSecurityQuestions.apply(this, arguments);
5033
5495
  }
5034
5496
 
@@ -5050,9 +5512,9 @@ var OroClient = /*#__PURE__*/function () {
5050
5512
  _proto.updatePassword =
5051
5513
  /*#__PURE__*/
5052
5514
  function () {
5053
- var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54(id, newPassword, oldPassword) {
5515
+ var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(id, newPassword, oldPassword) {
5054
5516
  var symmetricEncryptor, passwordPayload, updateRequest;
5055
- return _regeneratorRuntime().wrap(function _callee54$(_context55) {
5517
+ return runtime_1.wrap(function _callee54$(_context55) {
5056
5518
  while (1) {
5057
5519
  switch (_context55.prev = _context55.next) {
5058
5520
  case 0:
@@ -5093,7 +5555,7 @@ var OroClient = /*#__PURE__*/function () {
5093
5555
  }, _callee54, this);
5094
5556
  }));
5095
5557
 
5096
- function updatePassword(_x125, _x126, _x127) {
5558
+ function updatePassword(_x129, _x130, _x131) {
5097
5559
  return _updatePassword.apply(this, arguments);
5098
5560
  }
5099
5561
 
@@ -5112,9 +5574,9 @@ var OroClient = /*#__PURE__*/function () {
5112
5574
  _proto.updateMasterKey =
5113
5575
  /*#__PURE__*/
5114
5576
  function () {
5115
- var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55(id, masterKey, lockboxUuid) {
5577
+ var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(id, masterKey, lockboxUuid) {
5116
5578
  var symmetricEncryptor, masterKeyPayload, updateRequest, updatedIdentity;
5117
- return _regeneratorRuntime().wrap(function _callee55$(_context56) {
5579
+ return runtime_1.wrap(function _callee55$(_context56) {
5118
5580
  while (1) {
5119
5581
  switch (_context56.prev = _context56.next) {
5120
5582
  case 0:
@@ -5155,7 +5617,7 @@ var OroClient = /*#__PURE__*/function () {
5155
5617
  }, _callee55, this);
5156
5618
  }));
5157
5619
 
5158
- function updateMasterKey(_x128, _x129, _x130) {
5620
+ function updateMasterKey(_x132, _x133, _x134) {
5159
5621
  return _updateMasterKey.apply(this, arguments);
5160
5622
  }
5161
5623