oro-sdk 3.1.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/helpers/patient-registration.d.ts +17 -1
- package/dist/oro-sdk.cjs.development.js +1151 -610
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +1150 -611
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/helpers/patient-registration.ts +92 -0
package/dist/oro-sdk.esm.js
CHANGED
@@ -5,612 +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
|
9
|
-
|
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
|
+
}
|
64
|
+
|
65
|
+
if (info.done) {
|
66
|
+
resolve(value);
|
67
|
+
} else {
|
68
|
+
Promise.resolve(value).then(_next, _throw);
|
69
|
+
}
|
70
|
+
}
|
10
71
|
|
11
|
-
|
12
|
-
|
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
|
+
});
|
13
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
|
+
}
|
14
103
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
104
|
+
return target;
|
105
|
+
};
|
106
|
+
|
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
|
-
|
295
|
+
Object.defineProperty(obj, key, {
|
25
296
|
value: value,
|
26
|
-
enumerable:
|
27
|
-
configurable:
|
28
|
-
writable:
|
29
|
-
})
|
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
|
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
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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
|
-
}
|
53
|
-
|
54
|
-
for (context.method = method, context.arg = arg;;) {
|
55
|
-
var delegate = context.delegate;
|
56
|
-
|
57
|
-
if (delegate) {
|
58
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
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 || []);
|
59
317
|
|
60
|
-
|
61
|
-
|
62
|
-
|
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
|
-
}
|
318
|
+
// The ._invoke method unifies the implementations of the .next,
|
319
|
+
// .throw, and .return methods.
|
320
|
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
80
321
|
|
81
|
-
|
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
|
-
|
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
|
121
|
-
define(prototype, method, function
|
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
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
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
|
-
|
462
|
+
function enqueue(method, arg) {
|
151
463
|
function callInvokeWithMethodAndArg() {
|
152
|
-
return new PromiseImpl(function
|
464
|
+
return new PromiseImpl(function(resolve, reject) {
|
153
465
|
invoke(method, arg, resolve, reject);
|
154
466
|
});
|
155
467
|
}
|
156
468
|
|
157
|
-
return previousPromise =
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
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
|
-
|
174
|
-
|
175
|
-
|
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);
|
184
|
-
}
|
185
|
-
|
186
|
-
function resetTryEntry(entry) {
|
187
|
-
var record = entry.completion || {};
|
188
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
490
|
+
// Define the unified helper method that is used to implement .next,
|
491
|
+
// .throw, and .return (see defineIteratorMethods).
|
492
|
+
this._invoke = enqueue;
|
189
493
|
}
|
190
494
|
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
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
|
198
|
-
|
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
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
522
|
+
return function invoke(method, arg) {
|
523
|
+
if (state === GenStateExecuting) {
|
524
|
+
throw new Error("Generator is already running");
|
525
|
+
}
|
207
526
|
|
208
|
-
|
209
|
-
|
527
|
+
if (state === GenStateCompleted) {
|
528
|
+
if (method === "throw") {
|
529
|
+
throw arg;
|
530
|
+
}
|
210
531
|
|
211
|
-
|
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
|
-
|
216
|
-
|
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
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
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
|
-
|
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
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
555
|
+
} else if (context.method === "throw") {
|
556
|
+
if (state === GenStateSuspendedStart) {
|
557
|
+
state = GenStateCompleted;
|
558
|
+
throw context.arg;
|
559
|
+
}
|
258
560
|
|
259
|
-
|
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
|
-
|
277
|
-
|
278
|
-
|
563
|
+
} else if (context.method === "return") {
|
564
|
+
context.abrupt("return", context.arg);
|
565
|
+
}
|
279
566
|
|
280
|
-
|
281
|
-
var entry = this.tryEntries[i],
|
282
|
-
record = entry.completion;
|
283
|
-
if ("root" === entry.tryLoc) return handle("end");
|
567
|
+
state = GenStateExecuting;
|
284
568
|
|
285
|
-
|
286
|
-
|
287
|
-
|
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 (
|
290
|
-
|
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
|
}
|
580
|
+
|
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;
|
298
592
|
}
|
299
593
|
}
|
300
|
-
}
|
301
|
-
|
302
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
303
|
-
var entry = this.tryEntries[i];
|
594
|
+
};
|
595
|
+
}
|
304
596
|
|
305
|
-
|
306
|
-
|
307
|
-
|
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;
|
621
|
+
}
|
308
622
|
}
|
309
|
-
}
|
310
623
|
|
311
|
-
|
312
|
-
|
313
|
-
|
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;
|
624
|
+
context.method = "throw";
|
625
|
+
context.arg = new TypeError(
|
626
|
+
"The iterator does not provide a 'throw' method");
|
323
627
|
}
|
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
628
|
|
332
|
-
|
333
|
-
|
334
|
-
resetTryEntry(entry);
|
335
|
-
}
|
629
|
+
return ContinueSentinel;
|
630
|
+
}
|
336
631
|
|
337
|
-
|
338
|
-
}
|
339
|
-
}
|
632
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
340
633
|
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
resultName: resultName,
|
347
|
-
nextLoc: nextLoc
|
348
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
634
|
+
if (record.type === "throw") {
|
635
|
+
context.method = "throw";
|
636
|
+
context.arg = record.arg;
|
637
|
+
context.delegate = null;
|
638
|
+
return ContinueSentinel;
|
349
639
|
}
|
350
|
-
}, exports;
|
351
|
-
}
|
352
640
|
|
353
|
-
|
354
|
-
_wrapRegExp = function (re, groups) {
|
355
|
-
return new BabelRegExp(re, void 0, groups);
|
356
|
-
};
|
641
|
+
var info = record.arg;
|
357
642
|
|
358
|
-
|
359
|
-
|
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
|
+
}
|
360
649
|
|
361
|
-
|
362
|
-
|
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
|
+
}
|
363
668
|
|
364
|
-
|
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;
|
365
678
|
}
|
366
679
|
|
367
|
-
|
368
|
-
|
680
|
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
681
|
+
// unified ._invoke helper method.
|
682
|
+
defineIteratorMethods(Gp);
|
369
683
|
|
370
|
-
|
371
|
-
return groups[name] = result[g[name]], groups;
|
372
|
-
}, Object.create(null));
|
373
|
-
}
|
684
|
+
define(Gp, toStringTagSymbol, "Generator");
|
374
685
|
|
375
|
-
return
|
376
|
-
|
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
|
+
});
|
377
694
|
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
var groups = _groups.get(this);
|
695
|
+
define(Gp, "toString", function() {
|
696
|
+
return "[object Generator]";
|
697
|
+
});
|
382
698
|
|
383
|
-
|
384
|
-
|
385
|
-
}));
|
386
|
-
}
|
699
|
+
function pushTryEntry(locs) {
|
700
|
+
var entry = { tryLoc: locs[0] };
|
387
701
|
|
388
|
-
if (
|
389
|
-
|
702
|
+
if (1 in locs) {
|
703
|
+
entry.catchLoc = locs[1];
|
704
|
+
}
|
390
705
|
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
});
|
706
|
+
if (2 in locs) {
|
707
|
+
entry.finallyLoc = locs[2];
|
708
|
+
entry.afterLoc = locs[3];
|
395
709
|
}
|
396
710
|
|
397
|
-
|
398
|
-
}
|
399
|
-
}
|
711
|
+
this.tryEntries.push(entry);
|
712
|
+
}
|
400
713
|
|
401
|
-
function
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
reject(error);
|
407
|
-
return;
|
714
|
+
function resetTryEntry(entry) {
|
715
|
+
var record = entry.completion || {};
|
716
|
+
record.type = "normal";
|
717
|
+
delete record.arg;
|
718
|
+
entry.completion = record;
|
408
719
|
}
|
409
720
|
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
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);
|
414
728
|
}
|
415
|
-
}
|
416
729
|
|
417
|
-
function
|
418
|
-
|
419
|
-
var
|
420
|
-
|
421
|
-
|
422
|
-
|
730
|
+
exports.keys = function(object) {
|
731
|
+
var keys = [];
|
732
|
+
for (var key in object) {
|
733
|
+
keys.push(key);
|
734
|
+
}
|
735
|
+
keys.reverse();
|
423
736
|
|
424
|
-
|
425
|
-
|
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
|
+
}
|
426
747
|
}
|
427
748
|
|
428
|
-
|
429
|
-
|
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
|
+
};
|
755
|
+
};
|
756
|
+
|
757
|
+
function values(iterable) {
|
758
|
+
if (iterable) {
|
759
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
760
|
+
if (iteratorMethod) {
|
761
|
+
return iteratorMethod.call(iterable);
|
430
762
|
}
|
431
763
|
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
}
|
764
|
+
if (typeof iterable.next === "function") {
|
765
|
+
return iterable;
|
766
|
+
}
|
436
767
|
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
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
|
+
}
|
441
777
|
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
778
|
+
next.value = undefined$1;
|
779
|
+
next.done = true;
|
780
|
+
|
781
|
+
return next;
|
782
|
+
};
|
783
|
+
|
784
|
+
return next.next = next;
|
446
785
|
}
|
447
786
|
}
|
448
787
|
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
788
|
+
// Return an iterator with no values.
|
789
|
+
return { next: doneResult };
|
790
|
+
}
|
791
|
+
exports.values = values;
|
453
792
|
|
454
|
-
function
|
455
|
-
|
456
|
-
throw new TypeError("Super expression must either be null or a function");
|
793
|
+
function doneResult() {
|
794
|
+
return { value: undefined$1, done: true };
|
457
795
|
}
|
458
796
|
|
459
|
-
|
460
|
-
constructor:
|
461
|
-
value: subClass,
|
462
|
-
writable: true,
|
463
|
-
configurable: true
|
464
|
-
}
|
465
|
-
});
|
466
|
-
Object.defineProperty(subClass, "prototype", {
|
467
|
-
writable: false
|
468
|
-
});
|
469
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
470
|
-
}
|
797
|
+
Context.prototype = {
|
798
|
+
constructor: Context,
|
471
799
|
|
472
|
-
function
|
473
|
-
|
474
|
-
|
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
|
+
},
|
475
825
|
|
476
|
-
|
477
|
-
|
826
|
+
stop: function() {
|
827
|
+
this.done = true;
|
478
828
|
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
}
|
829
|
+
var rootEntry = this.tryEntries[0];
|
830
|
+
var rootRecord = rootEntry.completion;
|
831
|
+
if (rootRecord.type === "throw") {
|
832
|
+
throw rootRecord.arg;
|
833
|
+
}
|
485
834
|
|
486
|
-
|
487
|
-
|
488
|
-
o.__proto__ = p;
|
489
|
-
return o;
|
490
|
-
};
|
491
|
-
return _setPrototypeOf(o, p);
|
492
|
-
}
|
835
|
+
return this.rval;
|
836
|
+
},
|
493
837
|
|
494
|
-
function
|
495
|
-
|
496
|
-
|
497
|
-
|
838
|
+
dispatchException: function(exception) {
|
839
|
+
if (this.done) {
|
840
|
+
throw exception;
|
841
|
+
}
|
498
842
|
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
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
|
+
}
|
506
855
|
|
507
|
-
|
508
|
-
|
509
|
-
_construct = Reflect.construct.bind();
|
510
|
-
} else {
|
511
|
-
_construct = function _construct(Parent, args, Class) {
|
512
|
-
var a = [null];
|
513
|
-
a.push.apply(a, args);
|
514
|
-
var Constructor = Function.bind.apply(Parent, a);
|
515
|
-
var instance = new Constructor();
|
516
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
517
|
-
return instance;
|
518
|
-
};
|
519
|
-
}
|
856
|
+
return !! caught;
|
857
|
+
}
|
520
858
|
|
521
|
-
|
522
|
-
|
859
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
860
|
+
var entry = this.tryEntries[i];
|
861
|
+
var record = entry.completion;
|
523
862
|
|
524
|
-
|
525
|
-
|
526
|
-
|
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
|
+
}
|
527
869
|
|
528
|
-
|
529
|
-
|
870
|
+
if (entry.tryLoc <= this.prev) {
|
871
|
+
var hasCatch = hasOwn.call(entry, "catchLoc");
|
872
|
+
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
530
873
|
|
531
|
-
|
532
|
-
|
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
|
+
}
|
533
880
|
|
534
|
-
|
535
|
-
|
536
|
-
|
881
|
+
} else if (hasCatch) {
|
882
|
+
if (this.prev < entry.catchLoc) {
|
883
|
+
return handle(entry.catchLoc, true);
|
884
|
+
}
|
537
885
|
|
538
|
-
|
539
|
-
|
886
|
+
} else if (hasFinally) {
|
887
|
+
if (this.prev < entry.finallyLoc) {
|
888
|
+
return handle(entry.finallyLoc);
|
889
|
+
}
|
540
890
|
|
541
|
-
|
542
|
-
|
891
|
+
} else {
|
892
|
+
throw new Error("try statement without catch or finally");
|
893
|
+
}
|
894
|
+
}
|
895
|
+
}
|
896
|
+
},
|
543
897
|
|
544
|
-
function
|
545
|
-
|
546
|
-
|
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
|
+
}
|
547
908
|
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
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;
|
554
917
|
}
|
555
|
-
});
|
556
|
-
return _setPrototypeOf(Wrapper, Class);
|
557
|
-
};
|
558
918
|
|
559
|
-
|
560
|
-
|
919
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
920
|
+
record.type = type;
|
921
|
+
record.arg = arg;
|
561
922
|
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
923
|
+
if (finallyEntry) {
|
924
|
+
this.method = "next";
|
925
|
+
this.next = finallyEntry.finallyLoc;
|
926
|
+
return ContinueSentinel;
|
927
|
+
}
|
567
928
|
|
568
|
-
|
569
|
-
|
570
|
-
if (excluded.indexOf(key) >= 0) continue;
|
571
|
-
target[key] = source[key];
|
572
|
-
}
|
929
|
+
return this.complete(record);
|
930
|
+
},
|
573
931
|
|
574
|
-
|
575
|
-
|
932
|
+
complete: function(record, afterLoc) {
|
933
|
+
if (record.type === "throw") {
|
934
|
+
throw record.arg;
|
935
|
+
}
|
576
936
|
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
}
|
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
|
+
}
|
585
947
|
|
586
|
-
|
587
|
-
|
948
|
+
return ContinueSentinel;
|
949
|
+
},
|
588
950
|
|
589
|
-
|
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
|
+
},
|
590
961
|
|
591
|
-
|
592
|
-
|
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
|
+
}
|
593
974
|
|
594
|
-
|
595
|
-
|
596
|
-
|
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
|
+
},
|
597
979
|
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
done: true
|
604
|
-
};
|
605
|
-
return {
|
606
|
-
done: false,
|
607
|
-
value: o[i++]
|
980
|
+
delegateYield: function(iterable, resultName, nextLoc) {
|
981
|
+
this.delegate = {
|
982
|
+
iterator: values(iterable),
|
983
|
+
resultName: resultName,
|
984
|
+
nextLoc: nextLoc
|
608
985
|
};
|
609
|
-
};
|
610
|
-
}
|
611
986
|
|
612
|
-
|
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
|
+
}
|
613
1029
|
}
|
1030
|
+
});
|
614
1031
|
|
615
1032
|
var _personalMetaToPrefix;
|
616
1033
|
var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[MetadataCategory.Personal] = 'you', _personalMetaToPrefix[MetadataCategory.ChildPersonal] = 'child', _personalMetaToPrefix[MetadataCategory.OtherPersonal] = 'other', _personalMetaToPrefix);
|
@@ -831,9 +1248,9 @@ function filterTriggeredAnsweredWithKind(_x, _x2) {
|
|
831
1248
|
*/
|
832
1249
|
|
833
1250
|
function _filterTriggeredAnsweredWithKind() {
|
834
|
-
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/
|
1251
|
+
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(workflowData, kind) {
|
835
1252
|
var flattenedAnswers, triggeredQuestionsWithKind, samePageAnswers, res;
|
836
|
-
return
|
1253
|
+
return runtime_1.wrap(function _callee$(_context) {
|
837
1254
|
while (1) {
|
838
1255
|
switch (_context.prev = _context.next) {
|
839
1256
|
case 0:
|
@@ -877,9 +1294,9 @@ function getWorkflowDataByCategory(_x3, _x4) {
|
|
877
1294
|
}
|
878
1295
|
|
879
1296
|
function _getWorkflowDataByCategory() {
|
880
|
-
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/
|
1297
|
+
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(workflowData, category) {
|
881
1298
|
var flattenedAnswers, triggeredQuestions, fields;
|
882
|
-
return
|
1299
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
883
1300
|
while (1) {
|
884
1301
|
switch (_context2.prev = _context2.next) {
|
885
1302
|
case 0:
|
@@ -950,8 +1367,8 @@ function getImagesFromIndexDb(_x5) {
|
|
950
1367
|
*/
|
951
1368
|
|
952
1369
|
function _getImagesFromIndexDb() {
|
953
|
-
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/
|
954
|
-
return
|
1370
|
+
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(answer) {
|
1371
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
955
1372
|
while (1) {
|
956
1373
|
switch (_context3.prev = _context3.next) {
|
957
1374
|
case 0:
|
@@ -980,9 +1397,9 @@ function populateWorkflowField(_x6, _x7) {
|
|
980
1397
|
}
|
981
1398
|
|
982
1399
|
function _populateWorkflowField() {
|
983
|
-
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/
|
1400
|
+
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(question, answerValue) {
|
984
1401
|
var answer, displayedAnswer;
|
985
|
-
return
|
1402
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
986
1403
|
while (1) {
|
987
1404
|
switch (_context4.prev = _context4.next) {
|
988
1405
|
case 0:
|
@@ -1160,10 +1577,10 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
1160
1577
|
*/
|
1161
1578
|
|
1162
1579
|
function _registerPatient() {
|
1163
|
-
_registerPatient = _asyncToGenerator( /*#__PURE__*/
|
1580
|
+
_registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA) {
|
1164
1581
|
var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, _ret;
|
1165
1582
|
|
1166
|
-
return
|
1583
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
1167
1584
|
while (1) {
|
1168
1585
|
switch (_context4.prev = _context4.next) {
|
1169
1586
|
case 0:
|
@@ -1181,11 +1598,11 @@ function _registerPatient() {
|
|
1181
1598
|
}
|
1182
1599
|
|
1183
1600
|
_context4.prev = 7;
|
1184
|
-
return _context4.delegateYield( /*#__PURE__*/
|
1601
|
+
return _context4.delegateYield( /*#__PURE__*/runtime_1.mark(function _callee3() {
|
1185
1602
|
var _consultIndex, _identity, _identity2;
|
1186
1603
|
|
1187
1604
|
var practitioners, grantPromises, consultIndex, consultIndexPromises;
|
1188
|
-
return
|
1605
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
1189
1606
|
while (1) {
|
1190
1607
|
switch (_context3.prev = _context3.next) {
|
1191
1608
|
case 0:
|
@@ -1256,6 +1673,7 @@ function _registerPatient() {
|
|
1256
1673
|
return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
|
1257
1674
|
console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
|
1258
1675
|
|
1676
|
+
// if we cannot grant to the admin, then the registration will fail
|
1259
1677
|
errorsThrown.push(err);
|
1260
1678
|
});
|
1261
1679
|
|
@@ -1264,14 +1682,15 @@ function _registerPatient() {
|
|
1264
1682
|
grantPromises = practitioners.filter(function (practitioner) {
|
1265
1683
|
return practitioner.uuid !== practitionerAdmin;
|
1266
1684
|
}).map( /*#__PURE__*/function () {
|
1267
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
1268
|
-
return
|
1685
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(practitioner) {
|
1686
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1269
1687
|
while (1) {
|
1270
1688
|
switch (_context.prev = _context.next) {
|
1271
1689
|
case 0:
|
1272
1690
|
return _context.abrupt("return", oroClient.grantLockbox(practitioner.uuid, lockboxUuid)["catch"](function (err) {
|
1273
1691
|
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
|
1274
1692
|
|
1693
|
+
// Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
|
1275
1694
|
if (retry <= 1) return;
|
1276
1695
|
errorsThrown.push(err);
|
1277
1696
|
}));
|
@@ -1284,7 +1703,7 @@ function _registerPatient() {
|
|
1284
1703
|
}, _callee);
|
1285
1704
|
}));
|
1286
1705
|
|
1287
|
-
return function (
|
1706
|
+
return function (_x28) {
|
1288
1707
|
return _ref.apply(this, arguments);
|
1289
1708
|
};
|
1290
1709
|
}());
|
@@ -1297,14 +1716,15 @@ function _registerPatient() {
|
|
1297
1716
|
}], _consultIndex); // the index will identify in which lockbox a consultation resides
|
1298
1717
|
|
1299
1718
|
consultIndexPromises = practitioners.map( /*#__PURE__*/function () {
|
1300
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
1301
|
-
return
|
1719
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practitioner) {
|
1720
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
1302
1721
|
while (1) {
|
1303
1722
|
switch (_context2.prev = _context2.next) {
|
1304
1723
|
case 0:
|
1305
1724
|
return _context2.abrupt("return", oroClient.vaultIndexAdd(consultIndex, practitioner.uuid)["catch"](function (err) {
|
1306
1725
|
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
|
1307
1726
|
|
1727
|
+
// Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
|
1308
1728
|
if (retry <= 1) return;else errorsThrown.push(err);
|
1309
1729
|
}));
|
1310
1730
|
|
@@ -1316,7 +1736,7 @@ function _registerPatient() {
|
|
1316
1736
|
}, _callee2);
|
1317
1737
|
}));
|
1318
1738
|
|
1319
|
-
return function (
|
1739
|
+
return function (_x29) {
|
1320
1740
|
return _ref2.apply(this, arguments);
|
1321
1741
|
};
|
1322
1742
|
}());
|
@@ -1324,6 +1744,7 @@ function _registerPatient() {
|
|
1324
1744
|
return storeImageAliases(consult.uuid, lockboxUuid, workflow, oroClient)["catch"](function (err) {
|
1325
1745
|
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
|
1326
1746
|
|
1747
|
+
// Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
|
1327
1748
|
if (retry <= 1) return;else errorsThrown.push(err);
|
1328
1749
|
});
|
1329
1750
|
|
@@ -1344,6 +1765,7 @@ function _registerPatient() {
|
|
1344
1765
|
return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
|
1345
1766
|
console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
|
1346
1767
|
|
1768
|
+
/// it's acceptable to continue registration (return old identity)
|
1347
1769
|
if (retry <= 1) return;
|
1348
1770
|
errorsThrown.push(err);
|
1349
1771
|
return identity;
|
@@ -1368,6 +1790,7 @@ function _registerPatient() {
|
|
1368
1790
|
return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
|
1369
1791
|
console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
|
1370
1792
|
|
1793
|
+
/// it's acceptable to continue registration (return old identity)
|
1371
1794
|
if (retry <= 1) return;
|
1372
1795
|
errorsThrown.push(err);
|
1373
1796
|
return identity;
|
@@ -1381,23 +1804,33 @@ function _registerPatient() {
|
|
1381
1804
|
return Promise.all([].concat(grantPromises, consultIndexPromises));
|
1382
1805
|
|
1383
1806
|
case 43:
|
1807
|
+
_context3.next = 45;
|
1808
|
+
return buildConsultSearchIndex(consult.uuid, workflow, oroClient)["catch"](function (err) {
|
1809
|
+
console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
|
1810
|
+
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
|
1811
|
+
|
1812
|
+
// this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
|
1813
|
+
errorsThrown.push(err);
|
1814
|
+
});
|
1815
|
+
|
1816
|
+
case 45:
|
1384
1817
|
if (!(errorsThrown.length > 0)) {
|
1385
|
-
_context3.next =
|
1818
|
+
_context3.next = 47;
|
1386
1819
|
break;
|
1387
1820
|
}
|
1388
1821
|
|
1389
1822
|
throw errorsThrown;
|
1390
1823
|
|
1391
|
-
case
|
1392
|
-
_context3.next =
|
1824
|
+
case 47:
|
1825
|
+
_context3.next = 49;
|
1393
1826
|
return oroClient.consultClient.updateConsultByUUID(consult.uuid, {
|
1394
1827
|
statusMedical: MedicalStatus.New
|
1395
1828
|
});
|
1396
1829
|
|
1397
|
-
case
|
1830
|
+
case 49:
|
1398
1831
|
return _context3.abrupt("return", "break");
|
1399
1832
|
|
1400
|
-
case
|
1833
|
+
case 50:
|
1401
1834
|
case "end":
|
1402
1835
|
return _context3.stop();
|
1403
1836
|
}
|
@@ -1473,9 +1906,9 @@ function getOrCreatePatientConsultationUuid(_x7, _x8) {
|
|
1473
1906
|
|
1474
1907
|
|
1475
1908
|
function _getOrCreatePatientConsultationUuid() {
|
1476
|
-
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/
|
1909
|
+
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(consult, oroClient) {
|
1477
1910
|
var payment;
|
1478
|
-
return
|
1911
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
1479
1912
|
while (1) {
|
1480
1913
|
switch (_context5.prev = _context5.next) {
|
1481
1914
|
case 0:
|
@@ -1530,9 +1963,9 @@ function getOrCreatePatientLockbox(_x9) {
|
|
1530
1963
|
|
1531
1964
|
|
1532
1965
|
function _getOrCreatePatientLockbox() {
|
1533
|
-
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/
|
1966
|
+
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(oroClient) {
|
1534
1967
|
var grants;
|
1535
|
-
return
|
1968
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
1536
1969
|
while (1) {
|
1537
1970
|
switch (_context6.prev = _context6.next) {
|
1538
1971
|
case 0:
|
@@ -1575,8 +2008,8 @@ function storePatientData(_x10, _x11, _x12, _x13, _x14) {
|
|
1575
2008
|
}
|
1576
2009
|
|
1577
2010
|
function _storePatientData() {
|
1578
|
-
_storePatientData = _asyncToGenerator( /*#__PURE__*/
|
1579
|
-
return
|
2011
|
+
_storePatientData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
|
2012
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
1580
2013
|
while (1) {
|
1581
2014
|
switch (_context7.prev = _context7.next) {
|
1582
2015
|
case 0:
|
@@ -1633,9 +2066,9 @@ function storeImageAliases(_x15, _x16, _x17, _x18) {
|
|
1633
2066
|
|
1634
2067
|
|
1635
2068
|
function _storeImageAliases() {
|
1636
|
-
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/
|
2069
|
+
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
|
1637
2070
|
var images, nonNullImages, promises;
|
1638
|
-
return
|
2071
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
1639
2072
|
while (1) {
|
1640
2073
|
switch (_context8.prev = _context8.next) {
|
1641
2074
|
case 0:
|
@@ -1681,10 +2114,14 @@ function _storeImageAliases() {
|
|
1681
2114
|
function extractAndStorePersonalWorkflowData(_x19, _x20, _x21, _x22, _x23) {
|
1682
2115
|
return _extractAndStorePersonalWorkflowData.apply(this, arguments);
|
1683
2116
|
}
|
2117
|
+
/**
|
2118
|
+
* Given workflow data, it populates it with Personal, ChildPersonal, and OtherPersonal workflow data
|
2119
|
+
* @param workflow
|
2120
|
+
*/
|
1684
2121
|
|
1685
2122
|
function _extractAndStorePersonalWorkflowData() {
|
1686
|
-
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/
|
1687
|
-
return
|
2123
|
+
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
|
2124
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
1688
2125
|
while (1) {
|
1689
2126
|
switch (_context9.prev = _context9.next) {
|
1690
2127
|
case 0:
|
@@ -1707,6 +2144,108 @@ function _extractAndStorePersonalWorkflowData() {
|
|
1707
2144
|
return _extractAndStorePersonalWorkflowData.apply(this, arguments);
|
1708
2145
|
}
|
1709
2146
|
|
2147
|
+
function extractPersonalInfoFromWorkflowData(_x24) {
|
2148
|
+
return _extractPersonalInfoFromWorkflowData.apply(this, arguments);
|
2149
|
+
}
|
2150
|
+
/**
|
2151
|
+
* Creates the search index for the first and last name of the given consultation
|
2152
|
+
* @param consultUuid the uuid of the consult to be search indexed
|
2153
|
+
* @param workflow the workflow data
|
2154
|
+
* @param oroClient
|
2155
|
+
*/
|
2156
|
+
|
2157
|
+
function _extractPersonalInfoFromWorkflowData() {
|
2158
|
+
_extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(workflow) {
|
2159
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
2160
|
+
while (1) {
|
2161
|
+
switch (_context10.prev = _context10.next) {
|
2162
|
+
case 0:
|
2163
|
+
return _context10.abrupt("return", Promise.all([getWorkflowDataByCategory(workflow, MetadataCategory.Personal), getWorkflowDataByCategory(workflow, MetadataCategory.ChildPersonal), getWorkflowDataByCategory(workflow, MetadataCategory.OtherPersonal)]).then(function (_ref3) {
|
2164
|
+
var personalInfoPopulatedWfData = _ref3[0],
|
2165
|
+
childPersonalInfoPopulatedWfData = _ref3[1],
|
2166
|
+
otherPersonalInfoPopulatedWfData = _ref3[2];
|
2167
|
+
return {
|
2168
|
+
personalInfoPopulatedWfData: personalInfoPopulatedWfData,
|
2169
|
+
childPersonalInfoPopulatedWfData: childPersonalInfoPopulatedWfData,
|
2170
|
+
otherPersonalInfoPopulatedWfData: otherPersonalInfoPopulatedWfData
|
2171
|
+
};
|
2172
|
+
}));
|
2173
|
+
|
2174
|
+
case 1:
|
2175
|
+
case "end":
|
2176
|
+
return _context10.stop();
|
2177
|
+
}
|
2178
|
+
}
|
2179
|
+
}, _callee10);
|
2180
|
+
}));
|
2181
|
+
return _extractPersonalInfoFromWorkflowData.apply(this, arguments);
|
2182
|
+
}
|
2183
|
+
|
2184
|
+
function buildConsultSearchIndex(_x25, _x26, _x27) {
|
2185
|
+
return _buildConsultSearchIndex.apply(this, arguments);
|
2186
|
+
}
|
2187
|
+
|
2188
|
+
function _buildConsultSearchIndex() {
|
2189
|
+
_buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consultUuid, workflow, oroClient) {
|
2190
|
+
var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
|
2191
|
+
|
2192
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
2193
|
+
while (1) {
|
2194
|
+
switch (_context11.prev = _context11.next) {
|
2195
|
+
case 0:
|
2196
|
+
terms = [];
|
2197
|
+
_context11.next = 3;
|
2198
|
+
return extractPersonalInfoFromWorkflowData(workflow);
|
2199
|
+
|
2200
|
+
case 3:
|
2201
|
+
_yield$extractPersona = _context11.sent;
|
2202
|
+
personalInfoPopulatedWfData = _yield$extractPersona.personalInfoPopulatedWfData;
|
2203
|
+
childPersonalInfoPopulatedWfData = _yield$extractPersona.childPersonalInfoPopulatedWfData;
|
2204
|
+
otherPersonalInfoPopulatedWfData = _yield$extractPersona.otherPersonalInfoPopulatedWfData;
|
2205
|
+
personalInfo = identificationToPersonalInformations(toActualObject(personalInfoPopulatedWfData), MetadataCategory.Personal);
|
2206
|
+
childPersonalInfo = identificationToPersonalInformations(toActualObject(childPersonalInfoPopulatedWfData), MetadataCategory.ChildPersonal);
|
2207
|
+
otherPersonalInfo = identificationToPersonalInformations(toActualObject(otherPersonalInfoPopulatedWfData), MetadataCategory.OtherPersonal);
|
2208
|
+
terms.push({
|
2209
|
+
kind: 'first-name',
|
2210
|
+
value: personalInfo.firstname
|
2211
|
+
}, {
|
2212
|
+
kind: 'last-name',
|
2213
|
+
value: personalInfo.name
|
2214
|
+
});
|
2215
|
+
|
2216
|
+
if (childPersonalInfo.firstname && childPersonalInfo.name) {
|
2217
|
+
terms.push({
|
2218
|
+
kind: 'first-name',
|
2219
|
+
value: childPersonalInfo.firstname
|
2220
|
+
}, {
|
2221
|
+
kind: 'last-name',
|
2222
|
+
value: childPersonalInfo.name
|
2223
|
+
});
|
2224
|
+
}
|
2225
|
+
|
2226
|
+
if (otherPersonalInfo.firstname && otherPersonalInfo.name) {
|
2227
|
+
terms.push({
|
2228
|
+
kind: 'first-name',
|
2229
|
+
value: otherPersonalInfo.firstname
|
2230
|
+
}, {
|
2231
|
+
kind: 'last-name',
|
2232
|
+
value: otherPersonalInfo.name
|
2233
|
+
});
|
2234
|
+
}
|
2235
|
+
|
2236
|
+
_context11.next = 15;
|
2237
|
+
return oroClient.searchClient.index(consultUuid, terms);
|
2238
|
+
|
2239
|
+
case 15:
|
2240
|
+
case "end":
|
2241
|
+
return _context11.stop();
|
2242
|
+
}
|
2243
|
+
}
|
2244
|
+
}, _callee11);
|
2245
|
+
}));
|
2246
|
+
return _buildConsultSearchIndex.apply(this, arguments);
|
2247
|
+
}
|
2248
|
+
|
1710
2249
|
/**
|
1711
2250
|
* Decrypts and returns the encrypted grants
|
1712
2251
|
* If something went wrong during decryption, that grant will be removed from the list
|
@@ -1776,10 +2315,10 @@ function filterGrantsWithLockboxMetadata(_x, _x2, _x3, _x4) {
|
|
1776
2315
|
*/
|
1777
2316
|
|
1778
2317
|
function _filterGrantsWithLockboxMetadata() {
|
1779
|
-
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/
|
2318
|
+
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(oroClient, filter, vaultIndex, forceRefresh) {
|
1780
2319
|
var _vaultIndex$IndexKey$, indexConsults;
|
1781
2320
|
|
1782
|
-
return
|
2321
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1783
2322
|
while (1) {
|
1784
2323
|
switch (_context.prev = _context.next) {
|
1785
2324
|
case 0:
|
@@ -1829,12 +2368,12 @@ function buildLegacyVaultIndex(_x5) {
|
|
1829
2368
|
}
|
1830
2369
|
|
1831
2370
|
function _buildLegacyVaultIndex() {
|
1832
|
-
_buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/
|
2371
|
+
_buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(oroClient) {
|
1833
2372
|
var _vaultIndex;
|
1834
2373
|
|
1835
2374
|
var grants, consultGrants, _loop, _iterator, _step, vaultIndex;
|
1836
2375
|
|
1837
|
-
return
|
2376
|
+
return runtime_1.wrap(function _callee2$(_context3) {
|
1838
2377
|
while (1) {
|
1839
2378
|
switch (_context3.prev = _context3.next) {
|
1840
2379
|
case 0:
|
@@ -1844,9 +2383,9 @@ function _buildLegacyVaultIndex() {
|
|
1844
2383
|
case 2:
|
1845
2384
|
grants = _context3.sent;
|
1846
2385
|
consultGrants = [];
|
1847
|
-
_loop = /*#__PURE__*/
|
2386
|
+
_loop = /*#__PURE__*/runtime_1.mark(function _loop() {
|
1848
2387
|
var grant, consults;
|
1849
|
-
return
|
2388
|
+
return runtime_1.wrap(function _loop$(_context2) {
|
1850
2389
|
while (1) {
|
1851
2390
|
switch (_context2.prev = _context2.next) {
|
1852
2391
|
case 0:
|
@@ -1930,8 +2469,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
1930
2469
|
_proto.cleanIndex =
|
1931
2470
|
/*#__PURE__*/
|
1932
2471
|
function () {
|
1933
|
-
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1934
|
-
return
|
2472
|
+
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
2473
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1935
2474
|
while (1) {
|
1936
2475
|
switch (_context.prev = _context.next) {
|
1937
2476
|
case 0:
|
@@ -1969,9 +2508,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
1969
2508
|
_proto.signUp =
|
1970
2509
|
/*#__PURE__*/
|
1971
2510
|
function () {
|
1972
|
-
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2511
|
+
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
|
1973
2512
|
var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
|
1974
|
-
return
|
2513
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
1975
2514
|
while (1) {
|
1976
2515
|
switch (_context2.prev = _context2.next) {
|
1977
2516
|
case 0:
|
@@ -2030,9 +2569,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2030
2569
|
_proto.confirmEmail =
|
2031
2570
|
/*#__PURE__*/
|
2032
2571
|
function () {
|
2033
|
-
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2572
|
+
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(accessToken) {
|
2034
2573
|
var claims;
|
2035
|
-
return
|
2574
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
2036
2575
|
while (1) {
|
2037
2576
|
switch (_context3.prev = _context3.next) {
|
2038
2577
|
case 0:
|
@@ -2077,9 +2616,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2077
2616
|
_proto.signIn =
|
2078
2617
|
/*#__PURE__*/
|
2079
2618
|
function () {
|
2080
|
-
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2619
|
+
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(practiceUuid, email, password, otp) {
|
2081
2620
|
var hashedPassword, tokenRequest, userUuid;
|
2082
|
-
return
|
2621
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
2083
2622
|
while (1) {
|
2084
2623
|
switch (_context4.prev = _context4.next) {
|
2085
2624
|
case 0:
|
@@ -2132,9 +2671,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2132
2671
|
_proto.resumeSession =
|
2133
2672
|
/*#__PURE__*/
|
2134
2673
|
function () {
|
2135
|
-
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2674
|
+
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
|
2136
2675
|
var id, recoveryPayload, recoveryKey, symmetricDecryptor, privateKey;
|
2137
|
-
return
|
2676
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
2138
2677
|
while (1) {
|
2139
2678
|
switch (_context5.prev = _context5.next) {
|
2140
2679
|
case 0:
|
@@ -2235,8 +2774,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2235
2774
|
_proto.signOut =
|
2236
2775
|
/*#__PURE__*/
|
2237
2776
|
function () {
|
2238
|
-
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2239
|
-
return
|
2777
|
+
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
|
2778
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
2240
2779
|
while (1) {
|
2241
2780
|
switch (_context6.prev = _context6.next) {
|
2242
2781
|
case 0:
|
@@ -2285,8 +2824,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2285
2824
|
_proto.registerPatient =
|
2286
2825
|
/*#__PURE__*/
|
2287
2826
|
function () {
|
2288
|
-
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2289
|
-
return
|
2827
|
+
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA) {
|
2828
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
2290
2829
|
while (1) {
|
2291
2830
|
switch (_context7.prev = _context7.next) {
|
2292
2831
|
case 0:
|
@@ -2329,8 +2868,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2329
2868
|
_proto.buildVaultIndex =
|
2330
2869
|
/*#__PURE__*/
|
2331
2870
|
function () {
|
2332
|
-
var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2333
|
-
return
|
2871
|
+
var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(forceRefresh) {
|
2872
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
2334
2873
|
while (1) {
|
2335
2874
|
switch (_context8.prev = _context8.next) {
|
2336
2875
|
case 0:
|
@@ -2378,12 +2917,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
2378
2917
|
_proto.forceUpdateIndexEntries =
|
2379
2918
|
/*#__PURE__*/
|
2380
2919
|
function () {
|
2381
|
-
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2920
|
+
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10() {
|
2382
2921
|
var _this = this,
|
2383
2922
|
_this$vaultIndexAdd;
|
2384
2923
|
|
2385
2924
|
var grants, indexConsultLockbox;
|
2386
|
-
return
|
2925
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
2387
2926
|
while (1) {
|
2388
2927
|
switch (_context10.prev = _context10.next) {
|
2389
2928
|
case 0:
|
@@ -2394,8 +2933,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2394
2933
|
grants = _context10.sent;
|
2395
2934
|
_context10.next = 5;
|
2396
2935
|
return Promise.all(grants.map( /*#__PURE__*/function () {
|
2397
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
2398
|
-
return
|
2936
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(grant) {
|
2937
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
2399
2938
|
while (1) {
|
2400
2939
|
switch (_context9.prev = _context9.next) {
|
2401
2940
|
case 0:
|
@@ -2471,12 +3010,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
2471
3010
|
_proto.vaultIndexAdd =
|
2472
3011
|
/*#__PURE__*/
|
2473
3012
|
function () {
|
2474
|
-
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3013
|
+
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entries, indexOwnerUuid) {
|
2475
3014
|
var _this2 = this;
|
2476
3015
|
|
2477
3016
|
var rsaPub, base64IndexOwnerPubKey, encryptedIndex, _i, _Object$keys, keyString, key;
|
2478
3017
|
|
2479
|
-
return
|
3018
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
2480
3019
|
while (1) {
|
2481
3020
|
switch (_context11.prev = _context11.next) {
|
2482
3021
|
case 0:
|
@@ -2598,11 +3137,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
2598
3137
|
_proto.indexSnapshotAdd =
|
2599
3138
|
/*#__PURE__*/
|
2600
3139
|
function () {
|
2601
|
-
var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3140
|
+
var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(index) {
|
2602
3141
|
var _index$IndexKey$Consu, _cleanedIndex;
|
2603
3142
|
|
2604
3143
|
var rsaPub, cleanedIndex, encryptedIndexEntry, encryptedIndex;
|
2605
|
-
return
|
3144
|
+
return runtime_1.wrap(function _callee12$(_context12) {
|
2606
3145
|
while (1) {
|
2607
3146
|
switch (_context12.prev = _context12.next) {
|
2608
3147
|
case 0:
|
@@ -2660,9 +3199,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2660
3199
|
_proto.grantLockbox =
|
2661
3200
|
/*#__PURE__*/
|
2662
3201
|
function () {
|
2663
|
-
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3202
|
+
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
|
2664
3203
|
var secret, base64GranteePublicKey, granteePublicKey, granteeEncryptedSecret, request;
|
2665
|
-
return
|
3204
|
+
return runtime_1.wrap(function _callee13$(_context13) {
|
2666
3205
|
while (1) {
|
2667
3206
|
switch (_context13.prev = _context13.next) {
|
2668
3207
|
case 0:
|
@@ -2722,9 +3261,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2722
3261
|
_proto.createMessageData =
|
2723
3262
|
/*#__PURE__*/
|
2724
3263
|
function () {
|
2725
|
-
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3264
|
+
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
2726
3265
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
2727
|
-
return
|
3266
|
+
return runtime_1.wrap(function _callee14$(_context14) {
|
2728
3267
|
while (1) {
|
2729
3268
|
switch (_context14.prev = _context14.next) {
|
2730
3269
|
case 0:
|
@@ -2794,9 +3333,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2794
3333
|
_proto.createMessageAttachmentData =
|
2795
3334
|
/*#__PURE__*/
|
2796
3335
|
function () {
|
2797
|
-
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3336
|
+
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee15(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
2798
3337
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
2799
|
-
return
|
3338
|
+
return runtime_1.wrap(function _callee15$(_context15) {
|
2800
3339
|
while (1) {
|
2801
3340
|
switch (_context15.prev = _context15.next) {
|
2802
3341
|
case 0:
|
@@ -2881,8 +3420,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2881
3420
|
_proto.createConsultationAttachmentData =
|
2882
3421
|
/*#__PURE__*/
|
2883
3422
|
function () {
|
2884
|
-
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2885
|
-
return
|
3423
|
+
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
|
3424
|
+
return runtime_1.wrap(function _callee16$(_context16) {
|
2886
3425
|
while (1) {
|
2887
3426
|
switch (_context16.prev = _context16.next) {
|
2888
3427
|
case 0:
|
@@ -2953,9 +3492,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2953
3492
|
_proto.createJsonData =
|
2954
3493
|
/*#__PURE__*/
|
2955
3494
|
function () {
|
2956
|
-
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3495
|
+
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
|
2957
3496
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
2958
|
-
return
|
3497
|
+
return runtime_1.wrap(function _callee17$(_context17) {
|
2959
3498
|
while (1) {
|
2960
3499
|
switch (_context17.prev = _context17.next) {
|
2961
3500
|
case 0:
|
@@ -3009,9 +3548,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3009
3548
|
_proto.getOrInsertJsonData =
|
3010
3549
|
/*#__PURE__*/
|
3011
3550
|
function () {
|
3012
|
-
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3551
|
+
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
|
3013
3552
|
var manifest;
|
3014
|
-
return
|
3553
|
+
return runtime_1.wrap(function _callee18$(_context18) {
|
3015
3554
|
while (1) {
|
3016
3555
|
switch (_context18.prev = _context18.next) {
|
3017
3556
|
case 0:
|
@@ -3074,9 +3613,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3074
3613
|
_proto.createBytesData =
|
3075
3614
|
/*#__PURE__*/
|
3076
3615
|
function () {
|
3077
|
-
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3616
|
+
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
|
3078
3617
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
3079
|
-
return
|
3618
|
+
return runtime_1.wrap(function _callee19$(_context19) {
|
3080
3619
|
while (1) {
|
3081
3620
|
switch (_context19.prev = _context19.next) {
|
3082
3621
|
case 0:
|
@@ -3132,10 +3671,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
3132
3671
|
_proto.getJsonData =
|
3133
3672
|
/*#__PURE__*/
|
3134
3673
|
function () {
|
3135
|
-
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3674
|
+
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
3136
3675
|
var _yield$Promise$all, encryptedPayload, symmetricDecryptor;
|
3137
3676
|
|
3138
|
-
return
|
3677
|
+
return runtime_1.wrap(function _callee20$(_context20) {
|
3139
3678
|
while (1) {
|
3140
3679
|
switch (_context20.prev = _context20.next) {
|
3141
3680
|
case 0:
|
@@ -3182,10 +3721,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
3182
3721
|
_proto.getBytesData =
|
3183
3722
|
/*#__PURE__*/
|
3184
3723
|
function () {
|
3185
|
-
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3724
|
+
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
3186
3725
|
var _yield$Promise$all2, encryptedPayload, symmetricDecryptor;
|
3187
3726
|
|
3188
|
-
return
|
3727
|
+
return runtime_1.wrap(function _callee21$(_context21) {
|
3189
3728
|
while (1) {
|
3190
3729
|
switch (_context21.prev = _context21.next) {
|
3191
3730
|
case 0:
|
@@ -3235,9 +3774,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3235
3774
|
_proto.getGrants =
|
3236
3775
|
/*#__PURE__*/
|
3237
3776
|
function () {
|
3238
|
-
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3777
|
+
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(filter, forceRefresh) {
|
3239
3778
|
var filterString, grantsByConsultLockbox, decryptedConsults, encryptedGrants, decryptedGrants;
|
3240
|
-
return
|
3779
|
+
return runtime_1.wrap(function _callee22$(_context22) {
|
3241
3780
|
while (1) {
|
3242
3781
|
switch (_context22.prev = _context22.next) {
|
3243
3782
|
case 0:
|
@@ -3355,9 +3894,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3355
3894
|
_proto.getCachedSecretCryptor =
|
3356
3895
|
/*#__PURE__*/
|
3357
3896
|
function () {
|
3358
|
-
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3897
|
+
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(lockboxUuid, lockboxOwnerUuid) {
|
3359
3898
|
var index, encryptedSecret, secret, cryptor;
|
3360
|
-
return
|
3899
|
+
return runtime_1.wrap(function _callee23$(_context23) {
|
3361
3900
|
while (1) {
|
3362
3901
|
switch (_context23.prev = _context23.next) {
|
3363
3902
|
case 0:
|
@@ -3422,8 +3961,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3422
3961
|
_proto.getPersonalInformationsFromConsultId =
|
3423
3962
|
/*#__PURE__*/
|
3424
3963
|
function () {
|
3425
|
-
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3426
|
-
return
|
3964
|
+
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(consultationId, category, forceRefresh) {
|
3965
|
+
return runtime_1.wrap(function _callee24$(_context24) {
|
3427
3966
|
while (1) {
|
3428
3967
|
switch (_context24.prev = _context24.next) {
|
3429
3968
|
case 0:
|
@@ -3460,8 +3999,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3460
3999
|
_proto.getMedicalDataFromConsultId =
|
3461
4000
|
/*#__PURE__*/
|
3462
4001
|
function () {
|
3463
|
-
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3464
|
-
return
|
4002
|
+
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(consultationId, forceRefresh) {
|
4003
|
+
return runtime_1.wrap(function _callee25$(_context25) {
|
3465
4004
|
while (1) {
|
3466
4005
|
switch (_context25.prev = _context25.next) {
|
3467
4006
|
case 0:
|
@@ -3487,12 +4026,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
3487
4026
|
}();
|
3488
4027
|
|
3489
4028
|
_proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
|
3490
|
-
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4029
|
+
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(consultationId, category, forceRefresh) {
|
3491
4030
|
var _this3 = this;
|
3492
4031
|
|
3493
4032
|
var grants, workflowData, _loop, _iterator, _step;
|
3494
4033
|
|
3495
|
-
return
|
4034
|
+
return runtime_1.wrap(function _callee27$(_context28) {
|
3496
4035
|
while (1) {
|
3497
4036
|
switch (_context28.prev = _context28.next) {
|
3498
4037
|
case 0:
|
@@ -3508,9 +4047,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3508
4047
|
case 3:
|
3509
4048
|
grants = _context28.sent;
|
3510
4049
|
workflowData = [];
|
3511
|
-
_loop = /*#__PURE__*/
|
4050
|
+
_loop = /*#__PURE__*/runtime_1.mark(function _loop() {
|
3512
4051
|
var grant, manifest, data;
|
3513
|
-
return
|
4052
|
+
return runtime_1.wrap(function _loop$(_context27) {
|
3514
4053
|
while (1) {
|
3515
4054
|
switch (_context27.prev = _context27.next) {
|
3516
4055
|
case 0:
|
@@ -3544,8 +4083,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3544
4083
|
case 8:
|
3545
4084
|
_context27.next = 10;
|
3546
4085
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
3547
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
3548
|
-
return
|
4086
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(entry) {
|
4087
|
+
return runtime_1.wrap(function _callee26$(_context26) {
|
3549
4088
|
while (1) {
|
3550
4089
|
switch (_context26.prev = _context26.next) {
|
3551
4090
|
case 0:
|
@@ -3629,9 +4168,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3629
4168
|
_proto.getPersonalInformations =
|
3630
4169
|
/*#__PURE__*/
|
3631
4170
|
function () {
|
3632
|
-
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4171
|
+
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(userId) {
|
3633
4172
|
var grant, lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
3634
|
-
return
|
4173
|
+
return runtime_1.wrap(function _callee28$(_context29) {
|
3635
4174
|
while (1) {
|
3636
4175
|
switch (_context29.prev = _context29.next) {
|
3637
4176
|
case 0:
|
@@ -3717,9 +4256,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3717
4256
|
_proto.getGrantFromConsultId =
|
3718
4257
|
/*#__PURE__*/
|
3719
4258
|
function () {
|
3720
|
-
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4259
|
+
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(consultationId) {
|
3721
4260
|
var grants;
|
3722
|
-
return
|
4261
|
+
return runtime_1.wrap(function _callee29$(_context30) {
|
3723
4262
|
while (1) {
|
3724
4263
|
switch (_context30.prev = _context30.next) {
|
3725
4264
|
case 0:
|
@@ -3765,9 +4304,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3765
4304
|
_proto.getIdentityFromConsultId =
|
3766
4305
|
/*#__PURE__*/
|
3767
4306
|
function () {
|
3768
|
-
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4307
|
+
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(consultationId) {
|
3769
4308
|
var grant;
|
3770
|
-
return
|
4309
|
+
return runtime_1.wrap(function _callee30$(_context31) {
|
3771
4310
|
while (1) {
|
3772
4311
|
switch (_context31.prev = _context31.next) {
|
3773
4312
|
case 0:
|
@@ -3820,11 +4359,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
3820
4359
|
_proto.getLockboxManifest =
|
3821
4360
|
/*#__PURE__*/
|
3822
4361
|
function () {
|
3823
|
-
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4362
|
+
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
|
3824
4363
|
var _this4 = this;
|
3825
4364
|
|
3826
4365
|
var manifestKey;
|
3827
|
-
return
|
4366
|
+
return runtime_1.wrap(function _callee32$(_context33) {
|
3828
4367
|
while (1) {
|
3829
4368
|
switch (_context33.prev = _context33.next) {
|
3830
4369
|
case 0:
|
@@ -3849,9 +4388,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3849
4388
|
case 4:
|
3850
4389
|
return _context33.abrupt("return", this.vaultClient.lockboxManifestGet(lockboxUuid, filter, lockboxOwnerUuid).then(function (manifest) {
|
3851
4390
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
3852
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
4391
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(entry) {
|
3853
4392
|
var privateMeta;
|
3854
|
-
return
|
4393
|
+
return runtime_1.wrap(function _callee31$(_context32) {
|
3855
4394
|
while (1) {
|
3856
4395
|
switch (_context32.prev = _context32.next) {
|
3857
4396
|
case 0:
|
@@ -3912,11 +4451,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
3912
4451
|
_proto.createPersonalInformations =
|
3913
4452
|
/*#__PURE__*/
|
3914
4453
|
function () {
|
3915
|
-
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4454
|
+
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(identity, data, dataUuid) {
|
3916
4455
|
var _yield$this$getGrants;
|
3917
4456
|
|
3918
4457
|
var lockboxUuid;
|
3919
|
-
return
|
4458
|
+
return runtime_1.wrap(function _callee33$(_context34) {
|
3920
4459
|
while (1) {
|
3921
4460
|
switch (_context34.prev = _context34.next) {
|
3922
4461
|
case 0:
|
@@ -3982,11 +4521,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
3982
4521
|
_proto.createUserPreference =
|
3983
4522
|
/*#__PURE__*/
|
3984
4523
|
function () {
|
3985
|
-
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4524
|
+
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(identity, preference, dataUuid) {
|
3986
4525
|
var _yield$this$getGrants2;
|
3987
4526
|
|
3988
4527
|
var lockboxUuid;
|
3989
|
-
return
|
4528
|
+
return runtime_1.wrap(function _callee34$(_context35) {
|
3990
4529
|
while (1) {
|
3991
4530
|
switch (_context35.prev = _context35.next) {
|
3992
4531
|
case 0:
|
@@ -4050,9 +4589,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4050
4589
|
_proto.getDataFromGrant =
|
4051
4590
|
/*#__PURE__*/
|
4052
4591
|
function () {
|
4053
|
-
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4592
|
+
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(grant, filter) {
|
4054
4593
|
var lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
4055
|
-
return
|
4594
|
+
return runtime_1.wrap(function _callee35$(_context36) {
|
4056
4595
|
while (1) {
|
4057
4596
|
switch (_context36.prev = _context36.next) {
|
4058
4597
|
case 0:
|
@@ -4118,9 +4657,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4118
4657
|
_proto.getUserPreferenceFromConsultId =
|
4119
4658
|
/*#__PURE__*/
|
4120
4659
|
function () {
|
4121
|
-
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4660
|
+
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(consultationId) {
|
4122
4661
|
var grant;
|
4123
|
-
return
|
4662
|
+
return runtime_1.wrap(function _callee36$(_context37) {
|
4124
4663
|
while (1) {
|
4125
4664
|
switch (_context37.prev = _context37.next) {
|
4126
4665
|
case 0:
|
@@ -4167,9 +4706,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4167
4706
|
_proto.getUserPreference =
|
4168
4707
|
/*#__PURE__*/
|
4169
4708
|
function () {
|
4170
|
-
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4709
|
+
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(identity) {
|
4171
4710
|
var grant;
|
4172
|
-
return
|
4711
|
+
return runtime_1.wrap(function _callee37$(_context38) {
|
4173
4712
|
while (1) {
|
4174
4713
|
switch (_context38.prev = _context38.next) {
|
4175
4714
|
case 0:
|
@@ -4218,9 +4757,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4218
4757
|
_proto.getRecoveryDataFromConsultId =
|
4219
4758
|
/*#__PURE__*/
|
4220
4759
|
function () {
|
4221
|
-
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4760
|
+
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(consultationId) {
|
4222
4761
|
var grant;
|
4223
|
-
return
|
4762
|
+
return runtime_1.wrap(function _callee38$(_context39) {
|
4224
4763
|
while (1) {
|
4225
4764
|
switch (_context39.prev = _context39.next) {
|
4226
4765
|
case 0:
|
@@ -4267,9 +4806,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4267
4806
|
_proto.getRecoveryData =
|
4268
4807
|
/*#__PURE__*/
|
4269
4808
|
function () {
|
4270
|
-
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4809
|
+
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(identity) {
|
4271
4810
|
var grant;
|
4272
|
-
return
|
4811
|
+
return runtime_1.wrap(function _callee39$(_context40) {
|
4273
4812
|
while (1) {
|
4274
4813
|
switch (_context40.prev = _context40.next) {
|
4275
4814
|
case 0:
|
@@ -4323,10 +4862,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4323
4862
|
_proto.getAssignedConsultations =
|
4324
4863
|
/*#__PURE__*/
|
4325
4864
|
function () {
|
4326
|
-
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4865
|
+
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(practiceUuid, forceRefresh) {
|
4327
4866
|
var _this5 = this;
|
4328
4867
|
|
4329
|
-
return
|
4868
|
+
return runtime_1.wrap(function _callee41$(_context42) {
|
4330
4869
|
while (1) {
|
4331
4870
|
switch (_context42.prev = _context42.next) {
|
4332
4871
|
case 0:
|
@@ -4345,8 +4884,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4345
4884
|
documentType: DocumentType.PopulatedWorkflowData
|
4346
4885
|
}, true, undefined, forceRefresh).then(function (manifest) {
|
4347
4886
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4348
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/
|
4349
|
-
return
|
4887
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(entry) {
|
4888
|
+
return runtime_1.wrap(function _callee40$(_context41) {
|
4350
4889
|
while (1) {
|
4351
4890
|
switch (_context41.prev = _context41.next) {
|
4352
4891
|
case 0:
|
@@ -4400,11 +4939,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
4400
4939
|
_proto.getPastConsultationsFromConsultId =
|
4401
4940
|
/*#__PURE__*/
|
4402
4941
|
function () {
|
4403
|
-
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4942
|
+
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(consultationId, practiceUuid) {
|
4404
4943
|
var _this6 = this;
|
4405
4944
|
|
4406
4945
|
var grant, consultationsInLockbox;
|
4407
|
-
return
|
4946
|
+
return runtime_1.wrap(function _callee43$(_context44) {
|
4408
4947
|
while (1) {
|
4409
4948
|
switch (_context44.prev = _context44.next) {
|
4410
4949
|
case 0:
|
@@ -4443,8 +4982,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4443
4982
|
case 10:
|
4444
4983
|
_context44.next = 12;
|
4445
4984
|
return Promise.all(consultationsInLockbox.map( /*#__PURE__*/function () {
|
4446
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/
|
4447
|
-
return
|
4985
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(consultId) {
|
4986
|
+
return runtime_1.wrap(function _callee42$(_context43) {
|
4448
4987
|
while (1) {
|
4449
4988
|
switch (_context43.prev = _context43.next) {
|
4450
4989
|
case 0:
|
@@ -4495,10 +5034,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4495
5034
|
_proto.getPatientConsultationData =
|
4496
5035
|
/*#__PURE__*/
|
4497
5036
|
function () {
|
4498
|
-
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5037
|
+
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(consultationId, forceRefresh) {
|
4499
5038
|
var _this7 = this;
|
4500
5039
|
|
4501
|
-
return
|
5040
|
+
return runtime_1.wrap(function _callee44$(_context45) {
|
4502
5041
|
while (1) {
|
4503
5042
|
switch (_context45.prev = _context45.next) {
|
4504
5043
|
case 0:
|
@@ -4552,8 +5091,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4552
5091
|
_proto.getPatientPrescriptionsList =
|
4553
5092
|
/*#__PURE__*/
|
4554
5093
|
function () {
|
4555
|
-
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4556
|
-
return
|
5094
|
+
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(consultationId) {
|
5095
|
+
return runtime_1.wrap(function _callee45$(_context46) {
|
4557
5096
|
while (1) {
|
4558
5097
|
switch (_context46.prev = _context46.next) {
|
4559
5098
|
case 0:
|
@@ -4586,8 +5125,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4586
5125
|
_proto.getPatientResultsList =
|
4587
5126
|
/*#__PURE__*/
|
4588
5127
|
function () {
|
4589
|
-
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4590
|
-
return
|
5128
|
+
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(consultationId) {
|
5129
|
+
return runtime_1.wrap(function _callee46$(_context47) {
|
4591
5130
|
while (1) {
|
4592
5131
|
switch (_context47.prev = _context47.next) {
|
4593
5132
|
case 0:
|
@@ -4620,8 +5159,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4620
5159
|
_proto.getPatientTreatmentPlans =
|
4621
5160
|
/*#__PURE__*/
|
4622
5161
|
function () {
|
4623
|
-
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4624
|
-
return
|
5162
|
+
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(consultationId) {
|
5163
|
+
return runtime_1.wrap(function _callee47$(_context48) {
|
4625
5164
|
while (1) {
|
4626
5165
|
switch (_context48.prev = _context48.next) {
|
4627
5166
|
case 0:
|
@@ -4655,8 +5194,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4655
5194
|
_proto.getPatientTreatmentPlanByUuid =
|
4656
5195
|
/*#__PURE__*/
|
4657
5196
|
function () {
|
4658
|
-
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4659
|
-
return
|
5197
|
+
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(consultationId, treatmentPlanId) {
|
5198
|
+
return runtime_1.wrap(function _callee48$(_context49) {
|
4660
5199
|
while (1) {
|
4661
5200
|
switch (_context49.prev = _context49.next) {
|
4662
5201
|
case 0:
|
@@ -4694,10 +5233,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4694
5233
|
_proto.getPatientDocumentsList =
|
4695
5234
|
/*#__PURE__*/
|
4696
5235
|
function () {
|
4697
|
-
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5236
|
+
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(filters, expandPrivateMetadata, consultationId) {
|
4698
5237
|
var _this8 = this;
|
4699
5238
|
|
4700
|
-
return
|
5239
|
+
return runtime_1.wrap(function _callee50$(_context51) {
|
4701
5240
|
while (1) {
|
4702
5241
|
switch (_context51.prev = _context51.next) {
|
4703
5242
|
case 0:
|
@@ -4713,8 +5252,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4713
5252
|
consultationId: consultationId
|
4714
5253
|
}), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
|
4715
5254
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4716
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/
|
4717
|
-
return
|
5255
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(entry) {
|
5256
|
+
return runtime_1.wrap(function _callee49$(_context50) {
|
4718
5257
|
while (1) {
|
4719
5258
|
switch (_context50.prev = _context50.next) {
|
4720
5259
|
case 0:
|
@@ -4772,9 +5311,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4772
5311
|
_proto.recoverPrivateKeyFromSecurityQuestions =
|
4773
5312
|
/*#__PURE__*/
|
4774
5313
|
function () {
|
4775
|
-
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5314
|
+
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
4776
5315
|
var shards, answeredShards, privateKey;
|
4777
|
-
return
|
5316
|
+
return runtime_1.wrap(function _callee51$(_context52) {
|
4778
5317
|
while (1) {
|
4779
5318
|
switch (_context52.prev = _context52.next) {
|
4780
5319
|
case 0:
|
@@ -4828,9 +5367,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4828
5367
|
_proto.recoverPrivateKeyFromPassword =
|
4829
5368
|
/*#__PURE__*/
|
4830
5369
|
function () {
|
4831
|
-
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5370
|
+
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(id, password) {
|
4832
5371
|
var identity, recoveryPayload, symmetricDecryptor, privateKey, symetricEncryptor;
|
4833
|
-
return
|
5372
|
+
return runtime_1.wrap(function _callee52$(_context53) {
|
4834
5373
|
while (1) {
|
4835
5374
|
switch (_context53.prev = _context53.next) {
|
4836
5375
|
case 0:
|
@@ -4876,9 +5415,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4876
5415
|
_proto.recoverPrivateKeyFromMasterKey =
|
4877
5416
|
/*#__PURE__*/
|
4878
5417
|
function () {
|
4879
|
-
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5418
|
+
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(id, masterKey) {
|
4880
5419
|
var recoveryPayload, symmetricDecryptor, privateKey;
|
4881
|
-
return
|
5420
|
+
return runtime_1.wrap(function _callee53$(_context54) {
|
4882
5421
|
while (1) {
|
4883
5422
|
switch (_context54.prev = _context54.next) {
|
4884
5423
|
case 0:
|
@@ -4918,9 +5457,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4918
5457
|
_proto.updateSecurityQuestions =
|
4919
5458
|
/*#__PURE__*/
|
4920
5459
|
function () {
|
4921
|
-
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5460
|
+
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
4922
5461
|
var securityQuestionPayload, updateRequest;
|
4923
|
-
return
|
5462
|
+
return runtime_1.wrap(function _callee54$(_context55) {
|
4924
5463
|
while (1) {
|
4925
5464
|
switch (_context55.prev = _context55.next) {
|
4926
5465
|
case 0:
|
@@ -4972,9 +5511,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4972
5511
|
_proto.updatePassword =
|
4973
5512
|
/*#__PURE__*/
|
4974
5513
|
function () {
|
4975
|
-
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5514
|
+
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(id, newPassword, oldPassword) {
|
4976
5515
|
var symmetricEncryptor, passwordPayload, updateRequest;
|
4977
|
-
return
|
5516
|
+
return runtime_1.wrap(function _callee55$(_context56) {
|
4978
5517
|
while (1) {
|
4979
5518
|
switch (_context56.prev = _context56.next) {
|
4980
5519
|
case 0:
|
@@ -5034,9 +5573,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
5034
5573
|
_proto.updateMasterKey =
|
5035
5574
|
/*#__PURE__*/
|
5036
5575
|
function () {
|
5037
|
-
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5576
|
+
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee56(id, masterKey, lockboxUuid) {
|
5038
5577
|
var symmetricEncryptor, masterKeyPayload, updateRequest, updatedIdentity;
|
5039
|
-
return
|
5578
|
+
return runtime_1.wrap(function _callee56$(_context57) {
|
5040
5579
|
while (1) {
|
5041
5580
|
switch (_context57.prev = _context57.next) {
|
5042
5581
|
case 0:
|
@@ -5178,5 +5717,5 @@ var init = function init(toolbox, tellerBaseURL, vaultBaseURL, guardBaseURL, sea
|
|
5178
5717
|
};
|
5179
5718
|
|
5180
5719
|
export default init;
|
5181
|
-
export { AssociatedLockboxNotFound, CliniaService, IncompleteAuthentication, MissingGrant, MissingLockbox, MissingLockboxOwner, OroClient, WorkflowAnswersMissingError, decryptConsultLockboxGrants, decryptGrants, extractAndStorePersonalWorkflowData, extractISOLocalityForConsult, fillWorkflowFromPopulatedWorkflow, filterTriggeredAnsweredWithKind, flattenSelectedAnswers, getImagesFromIndexDb, getInitialisedSelectedAnswers, getWorkflowDataByCategory, identificationToPersonalInformations, isTriggered, registerPatient, sessionStorePrivateKeyName, toActualObject, updatePersonalIntoPopulatedWorkflowData, wasmPath };
|
5720
|
+
export { AssociatedLockboxNotFound, CliniaService, IncompleteAuthentication, MissingGrant, MissingLockbox, MissingLockboxOwner, OroClient, WorkflowAnswersMissingError, buildConsultSearchIndex, decryptConsultLockboxGrants, decryptGrants, extractAndStorePersonalWorkflowData, extractISOLocalityForConsult, extractPersonalInfoFromWorkflowData, fillWorkflowFromPopulatedWorkflow, filterTriggeredAnsweredWithKind, flattenSelectedAnswers, getImagesFromIndexDb, getInitialisedSelectedAnswers, getWorkflowDataByCategory, identificationToPersonalInformations, isTriggered, registerPatient, sessionStorePrivateKeyName, toActualObject, updatePersonalIntoPopulatedWorkflowData, wasmPath };
|
5182
5721
|
//# sourceMappingURL=oro-sdk.esm.js.map
|