oro-sdk-apis 5.13.7 → 5.14.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/oro-sdk-apis.cjs.development.js +1854 -900
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +1894 -905
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/diagnosis.d.ts +1 -0
- package/package.json +2 -2
- package/src/services/diagnosis.ts +5 -1
    
        package/dist/oro-sdk-apis.esm.js
    CHANGED
    
    | @@ -8,119 +8,433 @@ import axios from 'axios'; | |
| 8 8 | 
             
             * @param value the string to hash
         | 
| 9 9 | 
             
             * @returns a base64 string representation of a hashed value
         | 
| 10 10 | 
             
             */
         | 
| 11 | 
            +
             | 
| 11 12 | 
             
            function hashToBase64String(value) {
         | 
| 12 13 | 
             
              return Buffer.from(sha256().update(value).digest('hex'), 'hex').toString('base64');
         | 
| 13 14 | 
             
            }
         | 
| 14 15 |  | 
| 15 | 
            -
            function  | 
| 16 | 
            -
               | 
| 17 | 
            -
                 | 
| 16 | 
            +
            function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
         | 
| 17 | 
            +
              try {
         | 
| 18 | 
            +
                var info = gen[key](arg);
         | 
| 19 | 
            +
                var value = info.value;
         | 
| 20 | 
            +
              } catch (error) {
         | 
| 21 | 
            +
                reject(error);
         | 
| 22 | 
            +
                return;
         | 
| 23 | 
            +
              }
         | 
| 24 | 
            +
             | 
| 25 | 
            +
              if (info.done) {
         | 
| 26 | 
            +
                resolve(value);
         | 
| 27 | 
            +
              } else {
         | 
| 28 | 
            +
                Promise.resolve(value).then(_next, _throw);
         | 
| 29 | 
            +
              }
         | 
| 30 | 
            +
            }
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            function _asyncToGenerator(fn) {
         | 
| 33 | 
            +
              return function () {
         | 
| 34 | 
            +
                var self = this,
         | 
| 35 | 
            +
                    args = arguments;
         | 
| 36 | 
            +
                return new Promise(function (resolve, reject) {
         | 
| 37 | 
            +
                  var gen = fn.apply(self, args);
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                  function _next(value) {
         | 
| 40 | 
            +
                    asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
         | 
| 41 | 
            +
                  }
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                  function _throw(err) {
         | 
| 44 | 
            +
                    asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
         | 
| 45 | 
            +
                  }
         | 
| 46 | 
            +
             | 
| 47 | 
            +
                  _next(undefined);
         | 
| 48 | 
            +
                });
         | 
| 18 49 | 
             
              };
         | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 50 | 
            +
            }
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            function _extends() {
         | 
| 53 | 
            +
              _extends = Object.assign || function (target) {
         | 
| 54 | 
            +
                for (var i = 1; i < arguments.length; i++) {
         | 
| 55 | 
            +
                  var source = arguments[i];
         | 
| 56 | 
            +
             | 
| 57 | 
            +
                  for (var key in source) {
         | 
| 58 | 
            +
                    if (Object.prototype.hasOwnProperty.call(source, key)) {
         | 
| 59 | 
            +
                      target[key] = source[key];
         | 
| 60 | 
            +
                    }
         | 
| 61 | 
            +
                  }
         | 
| 62 | 
            +
                }
         | 
| 63 | 
            +
             | 
| 64 | 
            +
                return target;
         | 
| 65 | 
            +
              };
         | 
| 66 | 
            +
             | 
| 67 | 
            +
              return _extends.apply(this, arguments);
         | 
| 68 | 
            +
            }
         | 
| 69 | 
            +
             | 
| 70 | 
            +
            function _inheritsLoose(subClass, superClass) {
         | 
| 71 | 
            +
              subClass.prototype = Object.create(superClass.prototype);
         | 
| 72 | 
            +
              subClass.prototype.constructor = subClass;
         | 
| 73 | 
            +
             | 
| 74 | 
            +
              _setPrototypeOf(subClass, superClass);
         | 
| 75 | 
            +
            }
         | 
| 76 | 
            +
             | 
| 77 | 
            +
            function _getPrototypeOf(o) {
         | 
| 78 | 
            +
              _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
         | 
| 79 | 
            +
                return o.__proto__ || Object.getPrototypeOf(o);
         | 
| 80 | 
            +
              };
         | 
| 81 | 
            +
              return _getPrototypeOf(o);
         | 
| 82 | 
            +
            }
         | 
| 83 | 
            +
             | 
| 84 | 
            +
            function _setPrototypeOf(o, p) {
         | 
| 85 | 
            +
              _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
         | 
| 86 | 
            +
                o.__proto__ = p;
         | 
| 87 | 
            +
                return o;
         | 
| 88 | 
            +
              };
         | 
| 89 | 
            +
             | 
| 90 | 
            +
              return _setPrototypeOf(o, p);
         | 
| 91 | 
            +
            }
         | 
| 92 | 
            +
             | 
| 93 | 
            +
            function _isNativeReflectConstruct() {
         | 
| 94 | 
            +
              if (typeof Reflect === "undefined" || !Reflect.construct) return false;
         | 
| 95 | 
            +
              if (Reflect.construct.sham) return false;
         | 
| 96 | 
            +
              if (typeof Proxy === "function") return true;
         | 
| 97 | 
            +
             | 
| 98 | 
            +
              try {
         | 
| 99 | 
            +
                Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
         | 
| 100 | 
            +
                return true;
         | 
| 101 | 
            +
              } catch (e) {
         | 
| 102 | 
            +
                return false;
         | 
| 103 | 
            +
              }
         | 
| 104 | 
            +
            }
         | 
| 105 | 
            +
             | 
| 106 | 
            +
            function _construct(Parent, args, Class) {
         | 
| 107 | 
            +
              if (_isNativeReflectConstruct()) {
         | 
| 108 | 
            +
                _construct = Reflect.construct;
         | 
| 109 | 
            +
              } else {
         | 
| 110 | 
            +
                _construct = function _construct(Parent, args, Class) {
         | 
| 111 | 
            +
                  var a = [null];
         | 
| 112 | 
            +
                  a.push.apply(a, args);
         | 
| 113 | 
            +
                  var Constructor = Function.bind.apply(Parent, a);
         | 
| 114 | 
            +
                  var instance = new Constructor();
         | 
| 115 | 
            +
                  if (Class) _setPrototypeOf(instance, Class.prototype);
         | 
| 116 | 
            +
                  return instance;
         | 
| 117 | 
            +
                };
         | 
| 118 | 
            +
              }
         | 
| 119 | 
            +
             | 
| 120 | 
            +
              return _construct.apply(null, arguments);
         | 
| 121 | 
            +
            }
         | 
| 122 | 
            +
             | 
| 123 | 
            +
            function _isNativeFunction(fn) {
         | 
| 124 | 
            +
              return Function.toString.call(fn).indexOf("[native code]") !== -1;
         | 
| 125 | 
            +
            }
         | 
| 126 | 
            +
             | 
| 127 | 
            +
            function _wrapNativeSuper(Class) {
         | 
| 128 | 
            +
              var _cache = typeof Map === "function" ? new Map() : undefined;
         | 
| 129 | 
            +
             | 
| 130 | 
            +
              _wrapNativeSuper = function _wrapNativeSuper(Class) {
         | 
| 131 | 
            +
                if (Class === null || !_isNativeFunction(Class)) return Class;
         | 
| 132 | 
            +
             | 
| 133 | 
            +
                if (typeof Class !== "function") {
         | 
| 134 | 
            +
                  throw new TypeError("Super expression must either be null or a function");
         | 
| 135 | 
            +
                }
         | 
| 136 | 
            +
             | 
| 137 | 
            +
                if (typeof _cache !== "undefined") {
         | 
| 138 | 
            +
                  if (_cache.has(Class)) return _cache.get(Class);
         | 
| 139 | 
            +
             | 
| 140 | 
            +
                  _cache.set(Class, Wrapper);
         | 
| 141 | 
            +
                }
         | 
| 142 | 
            +
             | 
| 143 | 
            +
                function Wrapper() {
         | 
| 144 | 
            +
                  return _construct(Class, arguments, _getPrototypeOf(this).constructor);
         | 
| 145 | 
            +
                }
         | 
| 146 | 
            +
             | 
| 147 | 
            +
                Wrapper.prototype = Object.create(Class.prototype, {
         | 
| 148 | 
            +
                  constructor: {
         | 
| 149 | 
            +
                    value: Wrapper,
         | 
| 150 | 
            +
                    enumerable: false,
         | 
| 151 | 
            +
                    writable: true,
         | 
| 152 | 
            +
                    configurable: true
         | 
| 153 | 
            +
                  }
         | 
| 154 | 
            +
                });
         | 
| 155 | 
            +
                return _setPrototypeOf(Wrapper, Class);
         | 
| 156 | 
            +
              };
         | 
| 157 | 
            +
             | 
| 158 | 
            +
              return _wrapNativeSuper(Class);
         | 
| 159 | 
            +
            }
         | 
| 160 | 
            +
             | 
| 161 | 
            +
            function _assertThisInitialized(self) {
         | 
| 162 | 
            +
              if (self === void 0) {
         | 
| 163 | 
            +
                throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
         | 
| 164 | 
            +
              }
         | 
| 165 | 
            +
             | 
| 166 | 
            +
              return self;
         | 
| 167 | 
            +
            }
         | 
| 168 | 
            +
             | 
| 169 | 
            +
            function createCommonjsModule(fn, module) {
         | 
| 170 | 
            +
            	return module = { exports: {} }, fn(module, module.exports), module.exports;
         | 
| 171 | 
            +
            }
         | 
| 172 | 
            +
             | 
| 173 | 
            +
            var runtime_1 = createCommonjsModule(function (module) {
         | 
| 174 | 
            +
            /**
         | 
| 175 | 
            +
             * Copyright (c) 2014-present, Facebook, Inc.
         | 
| 176 | 
            +
             *
         | 
| 177 | 
            +
             * This source code is licensed under the MIT license found in the
         | 
| 178 | 
            +
             * LICENSE file in the root directory of this source tree.
         | 
| 179 | 
            +
             */
         | 
| 180 | 
            +
             | 
| 181 | 
            +
            var runtime = (function (exports) {
         | 
| 182 | 
            +
             | 
| 183 | 
            +
              var Op = Object.prototype;
         | 
| 184 | 
            +
              var hasOwn = Op.hasOwnProperty;
         | 
| 185 | 
            +
              var undefined$1; // More compressible than void 0.
         | 
| 186 | 
            +
              var $Symbol = typeof Symbol === "function" ? Symbol : {};
         | 
| 187 | 
            +
              var iteratorSymbol = $Symbol.iterator || "@@iterator";
         | 
| 188 | 
            +
              var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
         | 
| 189 | 
            +
              var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
         | 
| 190 | 
            +
             | 
| 29 191 | 
             
              function define(obj, key, value) {
         | 
| 30 | 
            -
                 | 
| 192 | 
            +
                Object.defineProperty(obj, key, {
         | 
| 31 193 | 
             
                  value: value,
         | 
| 32 | 
            -
                  enumerable:  | 
| 33 | 
            -
                  configurable:  | 
| 34 | 
            -
                  writable:  | 
| 35 | 
            -
                }) | 
| 194 | 
            +
                  enumerable: true,
         | 
| 195 | 
            +
                  configurable: true,
         | 
| 196 | 
            +
                  writable: true
         | 
| 197 | 
            +
                });
         | 
| 198 | 
            +
                return obj[key];
         | 
| 36 199 | 
             
              }
         | 
| 37 200 | 
             
              try {
         | 
| 201 | 
            +
                // IE 8 has a broken Object.defineProperty that only works on DOM objects.
         | 
| 38 202 | 
             
                define({}, "");
         | 
| 39 203 | 
             
              } catch (err) {
         | 
| 40 | 
            -
                define = function | 
| 204 | 
            +
                define = function(obj, key, value) {
         | 
| 41 205 | 
             
                  return obj[key] = value;
         | 
| 42 206 | 
             
                };
         | 
| 43 207 | 
             
              }
         | 
| 208 | 
            +
             | 
| 44 209 | 
             
              function wrap(innerFn, outerFn, self, tryLocsList) {
         | 
| 45 | 
            -
                 | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
                 | 
| 49 | 
            -
             | 
| 50 | 
            -
                 | 
| 210 | 
            +
                // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
         | 
| 211 | 
            +
                var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
         | 
| 212 | 
            +
                var generator = Object.create(protoGenerator.prototype);
         | 
| 213 | 
            +
                var context = new Context(tryLocsList || []);
         | 
| 214 | 
            +
             | 
| 215 | 
            +
                // The ._invoke method unifies the implementations of the .next,
         | 
| 216 | 
            +
                // .throw, and .return methods.
         | 
| 217 | 
            +
                generator._invoke = makeInvokeMethod(innerFn, self, context);
         | 
| 218 | 
            +
             | 
| 219 | 
            +
                return generator;
         | 
| 51 220 | 
             
              }
         | 
| 221 | 
            +
              exports.wrap = wrap;
         | 
| 222 | 
            +
             | 
| 223 | 
            +
              // Try/catch helper to minimize deoptimizations. Returns a completion
         | 
| 224 | 
            +
              // record like context.tryEntries[i].completion. This interface could
         | 
| 225 | 
            +
              // have been (and was previously) designed to take a closure to be
         | 
| 226 | 
            +
              // invoked without arguments, but in all the cases we care about we
         | 
| 227 | 
            +
              // already have an existing method we want to call, so there's no need
         | 
| 228 | 
            +
              // to create a new function object. We can even get away with assuming
         | 
| 229 | 
            +
              // the method takes exactly one argument, since that happens to be true
         | 
| 230 | 
            +
              // in every case, so we don't have to touch the arguments object. The
         | 
| 231 | 
            +
              // only additional allocation required is the completion record, which
         | 
| 232 | 
            +
              // has a stable shape and so hopefully should be cheap to allocate.
         | 
| 52 233 | 
             
              function tryCatch(fn, obj, arg) {
         | 
| 53 234 | 
             
                try {
         | 
| 54 | 
            -
                  return {
         | 
| 55 | 
            -
                    type: "normal",
         | 
| 56 | 
            -
                    arg: fn.call(obj, arg)
         | 
| 57 | 
            -
                  };
         | 
| 235 | 
            +
                  return { type: "normal", arg: fn.call(obj, arg) };
         | 
| 58 236 | 
             
                } catch (err) {
         | 
| 59 | 
            -
                  return {
         | 
| 60 | 
            -
                    type: "throw",
         | 
| 61 | 
            -
                    arg: err
         | 
| 62 | 
            -
                  };
         | 
| 237 | 
            +
                  return { type: "throw", arg: err };
         | 
| 63 238 | 
             
                }
         | 
| 64 239 | 
             
              }
         | 
| 65 | 
            -
             | 
| 240 | 
            +
             | 
| 241 | 
            +
              var GenStateSuspendedStart = "suspendedStart";
         | 
| 242 | 
            +
              var GenStateSuspendedYield = "suspendedYield";
         | 
| 243 | 
            +
              var GenStateExecuting = "executing";
         | 
| 244 | 
            +
              var GenStateCompleted = "completed";
         | 
| 245 | 
            +
             | 
| 246 | 
            +
              // Returning this object from the innerFn has the same effect as
         | 
| 247 | 
            +
              // breaking out of the dispatch switch statement.
         | 
| 66 248 | 
             
              var ContinueSentinel = {};
         | 
| 249 | 
            +
             | 
| 250 | 
            +
              // Dummy constructor functions that we use as the .constructor and
         | 
| 251 | 
            +
              // .constructor.prototype properties for functions that return Generator
         | 
| 252 | 
            +
              // objects. For full spec compliance, you may wish to configure your
         | 
| 253 | 
            +
              // minifier not to mangle the names of these two functions.
         | 
| 67 254 | 
             
              function Generator() {}
         | 
| 68 255 | 
             
              function GeneratorFunction() {}
         | 
| 69 256 | 
             
              function GeneratorFunctionPrototype() {}
         | 
| 257 | 
            +
             | 
| 258 | 
            +
              // This is a polyfill for %IteratorPrototype% for environments that
         | 
| 259 | 
            +
              // don't natively support it.
         | 
| 70 260 | 
             
              var IteratorPrototype = {};
         | 
| 71 261 | 
             
              define(IteratorPrototype, iteratorSymbol, function () {
         | 
| 72 262 | 
             
                return this;
         | 
| 73 263 | 
             
              });
         | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
               | 
| 77 | 
            -
               | 
| 264 | 
            +
             | 
| 265 | 
            +
              var getProto = Object.getPrototypeOf;
         | 
| 266 | 
            +
              var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
         | 
| 267 | 
            +
              if (NativeIteratorPrototype &&
         | 
| 268 | 
            +
                  NativeIteratorPrototype !== Op &&
         | 
| 269 | 
            +
                  hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
         | 
| 270 | 
            +
                // This environment has a native %IteratorPrototype%; use it instead
         | 
| 271 | 
            +
                // of the polyfill.
         | 
| 272 | 
            +
                IteratorPrototype = NativeIteratorPrototype;
         | 
| 273 | 
            +
              }
         | 
| 274 | 
            +
             | 
| 275 | 
            +
              var Gp = GeneratorFunctionPrototype.prototype =
         | 
| 276 | 
            +
                Generator.prototype = Object.create(IteratorPrototype);
         | 
| 277 | 
            +
              GeneratorFunction.prototype = GeneratorFunctionPrototype;
         | 
| 278 | 
            +
              define(Gp, "constructor", GeneratorFunctionPrototype);
         | 
| 279 | 
            +
              define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
         | 
| 280 | 
            +
              GeneratorFunction.displayName = define(
         | 
| 281 | 
            +
                GeneratorFunctionPrototype,
         | 
| 282 | 
            +
                toStringTagSymbol,
         | 
| 283 | 
            +
                "GeneratorFunction"
         | 
| 284 | 
            +
              );
         | 
| 285 | 
            +
             | 
| 286 | 
            +
              // Helper for defining the .next, .throw, and .return methods of the
         | 
| 287 | 
            +
              // Iterator interface in terms of a single ._invoke method.
         | 
| 78 288 | 
             
              function defineIteratorMethods(prototype) {
         | 
| 79 | 
            -
                ["next", "throw", "return"].forEach(function | 
| 80 | 
            -
                  define(prototype, method, function | 
| 289 | 
            +
                ["next", "throw", "return"].forEach(function(method) {
         | 
| 290 | 
            +
                  define(prototype, method, function(arg) {
         | 
| 81 291 | 
             
                    return this._invoke(method, arg);
         | 
| 82 292 | 
             
                  });
         | 
| 83 293 | 
             
                });
         | 
| 84 294 | 
             
              }
         | 
| 295 | 
            +
             | 
| 296 | 
            +
              exports.isGeneratorFunction = function(genFun) {
         | 
| 297 | 
            +
                var ctor = typeof genFun === "function" && genFun.constructor;
         | 
| 298 | 
            +
                return ctor
         | 
| 299 | 
            +
                  ? ctor === GeneratorFunction ||
         | 
| 300 | 
            +
                    // For the native GeneratorFunction constructor, the best we can
         | 
| 301 | 
            +
                    // do is to check its .name property.
         | 
| 302 | 
            +
                    (ctor.displayName || ctor.name) === "GeneratorFunction"
         | 
| 303 | 
            +
                  : false;
         | 
| 304 | 
            +
              };
         | 
| 305 | 
            +
             | 
| 306 | 
            +
              exports.mark = function(genFun) {
         | 
| 307 | 
            +
                if (Object.setPrototypeOf) {
         | 
| 308 | 
            +
                  Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
         | 
| 309 | 
            +
                } else {
         | 
| 310 | 
            +
                  genFun.__proto__ = GeneratorFunctionPrototype;
         | 
| 311 | 
            +
                  define(genFun, toStringTagSymbol, "GeneratorFunction");
         | 
| 312 | 
            +
                }
         | 
| 313 | 
            +
                genFun.prototype = Object.create(Gp);
         | 
| 314 | 
            +
                return genFun;
         | 
| 315 | 
            +
              };
         | 
| 316 | 
            +
             | 
| 317 | 
            +
              // Within the body of any async function, `await x` is transformed to
         | 
| 318 | 
            +
              // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
         | 
| 319 | 
            +
              // `hasOwn.call(value, "__await")` to determine if the yielded value is
         | 
| 320 | 
            +
              // meant to be awaited.
         | 
| 321 | 
            +
              exports.awrap = function(arg) {
         | 
| 322 | 
            +
                return { __await: arg };
         | 
| 323 | 
            +
              };
         | 
| 324 | 
            +
             | 
| 85 325 | 
             
              function AsyncIterator(generator, PromiseImpl) {
         | 
| 86 326 | 
             
                function invoke(method, arg, resolve, reject) {
         | 
| 87 327 | 
             
                  var record = tryCatch(generator[method], generator, arg);
         | 
| 88 | 
            -
                  if ("throw" | 
| 89 | 
            -
                     | 
| 90 | 
            -
             | 
| 91 | 
            -
                     | 
| 92 | 
            -
             | 
| 93 | 
            -
                     | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
                       | 
| 97 | 
            -
             | 
| 328 | 
            +
                  if (record.type === "throw") {
         | 
| 329 | 
            +
                    reject(record.arg);
         | 
| 330 | 
            +
                  } else {
         | 
| 331 | 
            +
                    var result = record.arg;
         | 
| 332 | 
            +
                    var value = result.value;
         | 
| 333 | 
            +
                    if (value &&
         | 
| 334 | 
            +
                        typeof value === "object" &&
         | 
| 335 | 
            +
                        hasOwn.call(value, "__await")) {
         | 
| 336 | 
            +
                      return PromiseImpl.resolve(value.__await).then(function(value) {
         | 
| 337 | 
            +
                        invoke("next", value, resolve, reject);
         | 
| 338 | 
            +
                      }, function(err) {
         | 
| 339 | 
            +
                        invoke("throw", err, resolve, reject);
         | 
| 340 | 
            +
                      });
         | 
| 341 | 
            +
                    }
         | 
| 342 | 
            +
             | 
| 343 | 
            +
                    return PromiseImpl.resolve(value).then(function(unwrapped) {
         | 
| 344 | 
            +
                      // When a yielded Promise is resolved, its final value becomes
         | 
| 345 | 
            +
                      // the .value of the Promise<{value,done}> result for the
         | 
| 346 | 
            +
                      // current iteration.
         | 
| 347 | 
            +
                      result.value = unwrapped;
         | 
| 348 | 
            +
                      resolve(result);
         | 
| 349 | 
            +
                    }, function(error) {
         | 
| 350 | 
            +
                      // If a rejected Promise was yielded, throw the rejection back
         | 
| 351 | 
            +
                      // into the async generator function so it can be handled there.
         | 
| 98 352 | 
             
                      return invoke("throw", error, resolve, reject);
         | 
| 99 353 | 
             
                    });
         | 
| 100 354 | 
             
                  }
         | 
| 101 | 
            -
                  reject(record.arg);
         | 
| 102 355 | 
             
                }
         | 
| 356 | 
            +
             | 
| 103 357 | 
             
                var previousPromise;
         | 
| 104 | 
            -
             | 
| 105 | 
            -
             | 
| 106 | 
            -
             | 
| 107 | 
            -
             | 
| 108 | 
            -
             | 
| 109 | 
            -
             | 
| 110 | 
            -
                    }
         | 
| 111 | 
            -
                    return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
         | 
| 358 | 
            +
             | 
| 359 | 
            +
                function enqueue(method, arg) {
         | 
| 360 | 
            +
                  function callInvokeWithMethodAndArg() {
         | 
| 361 | 
            +
                    return new PromiseImpl(function(resolve, reject) {
         | 
| 362 | 
            +
                      invoke(method, arg, resolve, reject);
         | 
| 363 | 
            +
                    });
         | 
| 112 364 | 
             
                  }
         | 
| 113 | 
            -
             | 
| 365 | 
            +
             | 
| 366 | 
            +
                  return previousPromise =
         | 
| 367 | 
            +
                    // If enqueue has been called before, then we want to wait until
         | 
| 368 | 
            +
                    // all previous Promises have been resolved before calling invoke,
         | 
| 369 | 
            +
                    // so that results are always delivered in the correct order. If
         | 
| 370 | 
            +
                    // enqueue has not been called before, then it is important to
         | 
| 371 | 
            +
                    // call invoke immediately, without waiting on a callback to fire,
         | 
| 372 | 
            +
                    // so that the async generator function has the opportunity to do
         | 
| 373 | 
            +
                    // any necessary setup in a predictable way. This predictability
         | 
| 374 | 
            +
                    // is why the Promise constructor synchronously invokes its
         | 
| 375 | 
            +
                    // executor callback, and why async functions synchronously
         | 
| 376 | 
            +
                    // execute code before the first await. Since we implement simple
         | 
| 377 | 
            +
                    // async functions in terms of async generators, it is especially
         | 
| 378 | 
            +
                    // important to get this right, even though it requires care.
         | 
| 379 | 
            +
                    previousPromise ? previousPromise.then(
         | 
| 380 | 
            +
                      callInvokeWithMethodAndArg,
         | 
| 381 | 
            +
                      // Avoid propagating failures to Promises returned by later
         | 
| 382 | 
            +
                      // invocations of the iterator.
         | 
| 383 | 
            +
                      callInvokeWithMethodAndArg
         | 
| 384 | 
            +
                    ) : callInvokeWithMethodAndArg();
         | 
| 385 | 
            +
                }
         | 
| 386 | 
            +
             | 
| 387 | 
            +
                // Define the unified helper method that is used to implement .next,
         | 
| 388 | 
            +
                // .throw, and .return (see defineIteratorMethods).
         | 
| 389 | 
            +
                this._invoke = enqueue;
         | 
| 114 390 | 
             
              }
         | 
| 391 | 
            +
             | 
| 392 | 
            +
              defineIteratorMethods(AsyncIterator.prototype);
         | 
| 393 | 
            +
              define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
         | 
| 394 | 
            +
                return this;
         | 
| 395 | 
            +
              });
         | 
| 396 | 
            +
              exports.AsyncIterator = AsyncIterator;
         | 
| 397 | 
            +
             | 
| 398 | 
            +
              // Note that simple async functions are implemented on top of
         | 
| 399 | 
            +
              // AsyncIterator objects; they just return a Promise for the value of
         | 
| 400 | 
            +
              // the final result produced by the iterator.
         | 
| 401 | 
            +
              exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
         | 
| 402 | 
            +
                if (PromiseImpl === void 0) PromiseImpl = Promise;
         | 
| 403 | 
            +
             | 
| 404 | 
            +
                var iter = new AsyncIterator(
         | 
| 405 | 
            +
                  wrap(innerFn, outerFn, self, tryLocsList),
         | 
| 406 | 
            +
                  PromiseImpl
         | 
| 407 | 
            +
                );
         | 
| 408 | 
            +
             | 
| 409 | 
            +
                return exports.isGeneratorFunction(outerFn)
         | 
| 410 | 
            +
                  ? iter // If outerFn is a generator, return the full iterator.
         | 
| 411 | 
            +
                  : iter.next().then(function(result) {
         | 
| 412 | 
            +
                      return result.done ? result.value : iter.next();
         | 
| 413 | 
            +
                    });
         | 
| 414 | 
            +
              };
         | 
| 415 | 
            +
             | 
| 115 416 | 
             
              function makeInvokeMethod(innerFn, self, context) {
         | 
| 116 | 
            -
                var state =  | 
| 117 | 
            -
             | 
| 118 | 
            -
             | 
| 119 | 
            -
                  if ( | 
| 120 | 
            -
                     | 
| 417 | 
            +
                var state = GenStateSuspendedStart;
         | 
| 418 | 
            +
             | 
| 419 | 
            +
                return function invoke(method, arg) {
         | 
| 420 | 
            +
                  if (state === GenStateExecuting) {
         | 
| 421 | 
            +
                    throw new Error("Generator is already running");
         | 
| 422 | 
            +
                  }
         | 
| 423 | 
            +
             | 
| 424 | 
            +
                  if (state === GenStateCompleted) {
         | 
| 425 | 
            +
                    if (method === "throw") {
         | 
| 426 | 
            +
                      throw arg;
         | 
| 427 | 
            +
                    }
         | 
| 428 | 
            +
             | 
| 429 | 
            +
                    // Be forgiving, per 25.3.3.3.3 of the spec:
         | 
| 430 | 
            +
                    // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
         | 
| 121 431 | 
             
                    return doneResult();
         | 
| 122 432 | 
             
                  }
         | 
| 123 | 
            -
             | 
| 433 | 
            +
             | 
| 434 | 
            +
                  context.method = method;
         | 
| 435 | 
            +
                  context.arg = arg;
         | 
| 436 | 
            +
             | 
| 437 | 
            +
                  while (true) {
         | 
| 124 438 | 
             
                    var delegate = context.delegate;
         | 
| 125 439 | 
             
                    if (delegate) {
         | 
| 126 440 | 
             
                      var delegateResult = maybeInvokeDelegate(delegate, context);
         | 
| @@ -129,407 +443,605 @@ function _regeneratorRuntime() { | |
| 129 443 | 
             
                        return delegateResult;
         | 
| 130 444 | 
             
                      }
         | 
| 131 445 | 
             
                    }
         | 
| 132 | 
            -
             | 
| 133 | 
            -
             | 
| 446 | 
            +
             | 
| 447 | 
            +
                    if (context.method === "next") {
         | 
| 448 | 
            +
                      // Setting context._sent for legacy support of Babel's
         | 
| 449 | 
            +
                      // function.sent implementation.
         | 
| 450 | 
            +
                      context.sent = context._sent = context.arg;
         | 
| 451 | 
            +
             | 
| 452 | 
            +
                    } else if (context.method === "throw") {
         | 
| 453 | 
            +
                      if (state === GenStateSuspendedStart) {
         | 
| 454 | 
            +
                        state = GenStateCompleted;
         | 
| 455 | 
            +
                        throw context.arg;
         | 
| 456 | 
            +
                      }
         | 
| 457 | 
            +
             | 
| 134 458 | 
             
                      context.dispatchException(context.arg);
         | 
| 135 | 
            -
             | 
| 136 | 
            -
                     | 
| 459 | 
            +
             | 
| 460 | 
            +
                    } else if (context.method === "return") {
         | 
| 461 | 
            +
                      context.abrupt("return", context.arg);
         | 
| 462 | 
            +
                    }
         | 
| 463 | 
            +
             | 
| 464 | 
            +
                    state = GenStateExecuting;
         | 
| 465 | 
            +
             | 
| 137 466 | 
             
                    var record = tryCatch(innerFn, self, context);
         | 
| 138 | 
            -
                    if ("normal" | 
| 139 | 
            -
                       | 
| 467 | 
            +
                    if (record.type === "normal") {
         | 
| 468 | 
            +
                      // If an exception is thrown from innerFn, we leave state ===
         | 
| 469 | 
            +
                      // GenStateExecuting and loop back for another invocation.
         | 
| 470 | 
            +
                      state = context.done
         | 
| 471 | 
            +
                        ? GenStateCompleted
         | 
| 472 | 
            +
                        : GenStateSuspendedYield;
         | 
| 473 | 
            +
             | 
| 474 | 
            +
                      if (record.arg === ContinueSentinel) {
         | 
| 475 | 
            +
                        continue;
         | 
| 476 | 
            +
                      }
         | 
| 477 | 
            +
             | 
| 140 478 | 
             
                      return {
         | 
| 141 479 | 
             
                        value: record.arg,
         | 
| 142 480 | 
             
                        done: context.done
         | 
| 143 481 | 
             
                      };
         | 
| 482 | 
            +
             | 
| 483 | 
            +
                    } else if (record.type === "throw") {
         | 
| 484 | 
            +
                      state = GenStateCompleted;
         | 
| 485 | 
            +
                      // Dispatch the exception by looping back around to the
         | 
| 486 | 
            +
                      // context.dispatchException(context.arg) call above.
         | 
| 487 | 
            +
                      context.method = "throw";
         | 
| 488 | 
            +
                      context.arg = record.arg;
         | 
| 144 489 | 
             
                    }
         | 
| 145 | 
            -
                    "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
         | 
| 146 490 | 
             
                  }
         | 
| 147 491 | 
             
                };
         | 
| 148 492 | 
             
              }
         | 
| 493 | 
            +
             | 
| 494 | 
            +
              // Call delegate.iterator[context.method](context.arg) and handle the
         | 
| 495 | 
            +
              // result, either by returning a { value, done } result from the
         | 
| 496 | 
            +
              // delegate iterator, or by modifying context.method and context.arg,
         | 
| 497 | 
            +
              // setting context.delegate to null, and returning the ContinueSentinel.
         | 
| 149 498 | 
             
              function maybeInvokeDelegate(delegate, context) {
         | 
| 150 | 
            -
                var  | 
| 151 | 
            -
             | 
| 152 | 
            -
             | 
| 499 | 
            +
                var method = delegate.iterator[context.method];
         | 
| 500 | 
            +
                if (method === undefined$1) {
         | 
| 501 | 
            +
                  // A .throw or .return when the delegate iterator has no .throw
         | 
| 502 | 
            +
                  // method always terminates the yield* loop.
         | 
| 503 | 
            +
                  context.delegate = null;
         | 
| 504 | 
            +
             | 
| 505 | 
            +
                  if (context.method === "throw") {
         | 
| 506 | 
            +
                    // Note: ["return"] must be used for ES3 parsing compatibility.
         | 
| 507 | 
            +
                    if (delegate.iterator["return"]) {
         | 
| 508 | 
            +
                      // If the delegate iterator has a return method, give it a
         | 
| 509 | 
            +
                      // chance to clean up.
         | 
| 510 | 
            +
                      context.method = "return";
         | 
| 511 | 
            +
                      context.arg = undefined$1;
         | 
| 512 | 
            +
                      maybeInvokeDelegate(delegate, context);
         | 
| 513 | 
            +
             | 
| 514 | 
            +
                      if (context.method === "throw") {
         | 
| 515 | 
            +
                        // If maybeInvokeDelegate(context) changed context.method from
         | 
| 516 | 
            +
                        // "return" to "throw", let that override the TypeError below.
         | 
| 517 | 
            +
                        return ContinueSentinel;
         | 
| 518 | 
            +
                      }
         | 
| 519 | 
            +
                    }
         | 
| 520 | 
            +
             | 
| 521 | 
            +
                    context.method = "throw";
         | 
| 522 | 
            +
                    context.arg = new TypeError(
         | 
| 523 | 
            +
                      "The iterator does not provide a 'throw' method");
         | 
| 524 | 
            +
                  }
         | 
| 525 | 
            +
             | 
| 526 | 
            +
                  return ContinueSentinel;
         | 
| 527 | 
            +
                }
         | 
| 528 | 
            +
             | 
| 153 529 | 
             
                var record = tryCatch(method, delegate.iterator, context.arg);
         | 
| 154 | 
            -
             | 
| 530 | 
            +
             | 
| 531 | 
            +
                if (record.type === "throw") {
         | 
| 532 | 
            +
                  context.method = "throw";
         | 
| 533 | 
            +
                  context.arg = record.arg;
         | 
| 534 | 
            +
                  context.delegate = null;
         | 
| 535 | 
            +
                  return ContinueSentinel;
         | 
| 536 | 
            +
                }
         | 
| 537 | 
            +
             | 
| 155 538 | 
             
                var info = record.arg;
         | 
| 156 | 
            -
             | 
| 539 | 
            +
             | 
| 540 | 
            +
                if (! info) {
         | 
| 541 | 
            +
                  context.method = "throw";
         | 
| 542 | 
            +
                  context.arg = new TypeError("iterator result is not an object");
         | 
| 543 | 
            +
                  context.delegate = null;
         | 
| 544 | 
            +
                  return ContinueSentinel;
         | 
| 545 | 
            +
                }
         | 
| 546 | 
            +
             | 
| 547 | 
            +
                if (info.done) {
         | 
| 548 | 
            +
                  // Assign the result of the finished delegate to the temporary
         | 
| 549 | 
            +
                  // variable specified by delegate.resultName (see delegateYield).
         | 
| 550 | 
            +
                  context[delegate.resultName] = info.value;
         | 
| 551 | 
            +
             | 
| 552 | 
            +
                  // Resume execution at the desired location (see delegateYield).
         | 
| 553 | 
            +
                  context.next = delegate.nextLoc;
         | 
| 554 | 
            +
             | 
| 555 | 
            +
                  // If context.method was "throw" but the delegate handled the
         | 
| 556 | 
            +
                  // exception, let the outer generator proceed normally. If
         | 
| 557 | 
            +
                  // context.method was "next", forget context.arg since it has been
         | 
| 558 | 
            +
                  // "consumed" by the delegate iterator. If context.method was
         | 
| 559 | 
            +
                  // "return", allow the original .return call to continue in the
         | 
| 560 | 
            +
                  // outer generator.
         | 
| 561 | 
            +
                  if (context.method !== "return") {
         | 
| 562 | 
            +
                    context.method = "next";
         | 
| 563 | 
            +
                    context.arg = undefined$1;
         | 
| 564 | 
            +
                  }
         | 
| 565 | 
            +
             | 
| 566 | 
            +
                } else {
         | 
| 567 | 
            +
                  // Re-yield the result returned by the delegate method.
         | 
| 568 | 
            +
                  return info;
         | 
| 569 | 
            +
                }
         | 
| 570 | 
            +
             | 
| 571 | 
            +
                // The delegate iterator is finished, so forget it and continue with
         | 
| 572 | 
            +
                // the outer generator.
         | 
| 573 | 
            +
                context.delegate = null;
         | 
| 574 | 
            +
                return ContinueSentinel;
         | 
| 157 575 | 
             
              }
         | 
| 576 | 
            +
             | 
| 577 | 
            +
              // Define Generator.prototype.{next,throw,return} in terms of the
         | 
| 578 | 
            +
              // unified ._invoke helper method.
         | 
| 579 | 
            +
              defineIteratorMethods(Gp);
         | 
| 580 | 
            +
             | 
| 581 | 
            +
              define(Gp, toStringTagSymbol, "Generator");
         | 
| 582 | 
            +
             | 
| 583 | 
            +
              // A Generator should always return itself as the iterator object when the
         | 
| 584 | 
            +
              // @@iterator function is called on it. Some browsers' implementations of the
         | 
| 585 | 
            +
              // iterator prototype chain incorrectly implement this, causing the Generator
         | 
| 586 | 
            +
              // object to not be returned from this call. This ensures that doesn't happen.
         | 
| 587 | 
            +
              // See https://github.com/facebook/regenerator/issues/274 for more details.
         | 
| 588 | 
            +
              define(Gp, iteratorSymbol, function() {
         | 
| 589 | 
            +
                return this;
         | 
| 590 | 
            +
              });
         | 
| 591 | 
            +
             | 
| 592 | 
            +
              define(Gp, "toString", function() {
         | 
| 593 | 
            +
                return "[object Generator]";
         | 
| 594 | 
            +
              });
         | 
| 595 | 
            +
             | 
| 158 596 | 
             
              function pushTryEntry(locs) {
         | 
| 159 | 
            -
                var entry = {
         | 
| 160 | 
            -
             | 
| 161 | 
            -
                 | 
| 162 | 
            -
             | 
| 597 | 
            +
                var entry = { tryLoc: locs[0] };
         | 
| 598 | 
            +
             | 
| 599 | 
            +
                if (1 in locs) {
         | 
| 600 | 
            +
                  entry.catchLoc = locs[1];
         | 
| 601 | 
            +
                }
         | 
| 602 | 
            +
             | 
| 603 | 
            +
                if (2 in locs) {
         | 
| 604 | 
            +
                  entry.finallyLoc = locs[2];
         | 
| 605 | 
            +
                  entry.afterLoc = locs[3];
         | 
| 606 | 
            +
                }
         | 
| 607 | 
            +
             | 
| 608 | 
            +
                this.tryEntries.push(entry);
         | 
| 163 609 | 
             
              }
         | 
| 610 | 
            +
             | 
| 164 611 | 
             
              function resetTryEntry(entry) {
         | 
| 165 612 | 
             
                var record = entry.completion || {};
         | 
| 166 | 
            -
                record.type = "normal" | 
| 613 | 
            +
                record.type = "normal";
         | 
| 614 | 
            +
                delete record.arg;
         | 
| 615 | 
            +
                entry.completion = record;
         | 
| 167 616 | 
             
              }
         | 
| 617 | 
            +
             | 
| 168 618 | 
             
              function Context(tryLocsList) {
         | 
| 169 | 
            -
                 | 
| 170 | 
            -
             | 
| 171 | 
            -
                 | 
| 619 | 
            +
                // The root entry object (effectively a try statement without a catch
         | 
| 620 | 
            +
                // or a finally block) gives us a place to store values thrown from
         | 
| 621 | 
            +
                // locations where there is no enclosing try statement.
         | 
| 622 | 
            +
                this.tryEntries = [{ tryLoc: "root" }];
         | 
| 623 | 
            +
                tryLocsList.forEach(pushTryEntry, this);
         | 
| 624 | 
            +
                this.reset(true);
         | 
| 172 625 | 
             
              }
         | 
| 626 | 
            +
             | 
| 627 | 
            +
              exports.keys = function(object) {
         | 
| 628 | 
            +
                var keys = [];
         | 
| 629 | 
            +
                for (var key in object) {
         | 
| 630 | 
            +
                  keys.push(key);
         | 
| 631 | 
            +
                }
         | 
| 632 | 
            +
                keys.reverse();
         | 
| 633 | 
            +
             | 
| 634 | 
            +
                // Rather than returning an object with a next method, we keep
         | 
| 635 | 
            +
                // things simple and return the next function itself.
         | 
| 636 | 
            +
                return function next() {
         | 
| 637 | 
            +
                  while (keys.length) {
         | 
| 638 | 
            +
                    var key = keys.pop();
         | 
| 639 | 
            +
                    if (key in object) {
         | 
| 640 | 
            +
                      next.value = key;
         | 
| 641 | 
            +
                      next.done = false;
         | 
| 642 | 
            +
                      return next;
         | 
| 643 | 
            +
                    }
         | 
| 644 | 
            +
                  }
         | 
| 645 | 
            +
             | 
| 646 | 
            +
                  // To avoid creating an additional object, we just hang the .value
         | 
| 647 | 
            +
                  // and .done properties off the next function object itself. This
         | 
| 648 | 
            +
                  // also ensures that the minifier will not anonymize the function.
         | 
| 649 | 
            +
                  next.done = true;
         | 
| 650 | 
            +
                  return next;
         | 
| 651 | 
            +
                };
         | 
| 652 | 
            +
              };
         | 
| 653 | 
            +
             | 
| 173 654 | 
             
              function values(iterable) {
         | 
| 174 655 | 
             
                if (iterable) {
         | 
| 175 656 | 
             
                  var iteratorMethod = iterable[iteratorSymbol];
         | 
| 176 | 
            -
                  if (iteratorMethod)  | 
| 177 | 
            -
             | 
| 657 | 
            +
                  if (iteratorMethod) {
         | 
| 658 | 
            +
                    return iteratorMethod.call(iterable);
         | 
| 659 | 
            +
                  }
         | 
| 660 | 
            +
             | 
| 661 | 
            +
                  if (typeof iterable.next === "function") {
         | 
| 662 | 
            +
                    return iterable;
         | 
| 663 | 
            +
                  }
         | 
| 664 | 
            +
             | 
| 178 665 | 
             
                  if (!isNaN(iterable.length)) {
         | 
| 179 | 
            -
                    var i = -1,
         | 
| 180 | 
            -
                       | 
| 181 | 
            -
                         | 
| 182 | 
            -
             | 
| 183 | 
            -
             | 
| 666 | 
            +
                    var i = -1, next = function next() {
         | 
| 667 | 
            +
                      while (++i < iterable.length) {
         | 
| 668 | 
            +
                        if (hasOwn.call(iterable, i)) {
         | 
| 669 | 
            +
                          next.value = iterable[i];
         | 
| 670 | 
            +
                          next.done = false;
         | 
| 671 | 
            +
                          return next;
         | 
| 672 | 
            +
                        }
         | 
| 673 | 
            +
                      }
         | 
| 674 | 
            +
             | 
| 675 | 
            +
                      next.value = undefined$1;
         | 
| 676 | 
            +
                      next.done = true;
         | 
| 677 | 
            +
             | 
| 678 | 
            +
                      return next;
         | 
| 679 | 
            +
                    };
         | 
| 680 | 
            +
             | 
| 184 681 | 
             
                    return next.next = next;
         | 
| 185 682 | 
             
                  }
         | 
| 186 683 | 
             
                }
         | 
| 187 | 
            -
             | 
| 188 | 
            -
             | 
| 189 | 
            -
                };
         | 
| 684 | 
            +
             | 
| 685 | 
            +
                // Return an iterator with no values.
         | 
| 686 | 
            +
                return { next: doneResult };
         | 
| 190 687 | 
             
              }
         | 
| 688 | 
            +
              exports.values = values;
         | 
| 689 | 
            +
             | 
| 191 690 | 
             
              function doneResult() {
         | 
| 192 | 
            -
                return {
         | 
| 193 | 
            -
                  value: undefined,
         | 
| 194 | 
            -
                  done: !0
         | 
| 195 | 
            -
                };
         | 
| 691 | 
            +
                return { value: undefined$1, done: true };
         | 
| 196 692 | 
             
              }
         | 
| 197 | 
            -
             | 
| 198 | 
            -
             | 
| 199 | 
            -
                configurable: !0
         | 
| 200 | 
            -
              }), defineProperty(GeneratorFunctionPrototype, "constructor", {
         | 
| 201 | 
            -
                value: GeneratorFunction,
         | 
| 202 | 
            -
                configurable: !0
         | 
| 203 | 
            -
              }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
         | 
| 204 | 
            -
                var ctor = "function" == typeof genFun && genFun.constructor;
         | 
| 205 | 
            -
                return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
         | 
| 206 | 
            -
              }, exports.mark = function (genFun) {
         | 
| 207 | 
            -
                return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
         | 
| 208 | 
            -
              }, exports.awrap = function (arg) {
         | 
| 209 | 
            -
                return {
         | 
| 210 | 
            -
                  __await: arg
         | 
| 211 | 
            -
                };
         | 
| 212 | 
            -
              }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
         | 
| 213 | 
            -
                return this;
         | 
| 214 | 
            -
              }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
         | 
| 215 | 
            -
                void 0 === PromiseImpl && (PromiseImpl = Promise);
         | 
| 216 | 
            -
                var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
         | 
| 217 | 
            -
                return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
         | 
| 218 | 
            -
                  return result.done ? result.value : iter.next();
         | 
| 219 | 
            -
                });
         | 
| 220 | 
            -
              }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
         | 
| 221 | 
            -
                return this;
         | 
| 222 | 
            -
              }), define(Gp, "toString", function () {
         | 
| 223 | 
            -
                return "[object Generator]";
         | 
| 224 | 
            -
              }), exports.keys = function (val) {
         | 
| 225 | 
            -
                var object = Object(val),
         | 
| 226 | 
            -
                  keys = [];
         | 
| 227 | 
            -
                for (var key in object) keys.push(key);
         | 
| 228 | 
            -
                return keys.reverse(), function next() {
         | 
| 229 | 
            -
                  for (; keys.length;) {
         | 
| 230 | 
            -
                    var key = keys.pop();
         | 
| 231 | 
            -
                    if (key in object) return next.value = key, next.done = !1, next;
         | 
| 232 | 
            -
                  }
         | 
| 233 | 
            -
                  return next.done = !0, next;
         | 
| 234 | 
            -
                };
         | 
| 235 | 
            -
              }, exports.values = values, Context.prototype = {
         | 
| 693 | 
            +
             | 
| 694 | 
            +
              Context.prototype = {
         | 
| 236 695 | 
             
                constructor: Context,
         | 
| 237 | 
            -
             | 
| 238 | 
            -
             | 
| 696 | 
            +
             | 
| 697 | 
            +
                reset: function(skipTempReset) {
         | 
| 698 | 
            +
                  this.prev = 0;
         | 
| 699 | 
            +
                  this.next = 0;
         | 
| 700 | 
            +
                  // Resetting context._sent for legacy support of Babel's
         | 
| 701 | 
            +
                  // function.sent implementation.
         | 
| 702 | 
            +
                  this.sent = this._sent = undefined$1;
         | 
| 703 | 
            +
                  this.done = false;
         | 
| 704 | 
            +
                  this.delegate = null;
         | 
| 705 | 
            +
             | 
| 706 | 
            +
                  this.method = "next";
         | 
| 707 | 
            +
                  this.arg = undefined$1;
         | 
| 708 | 
            +
             | 
| 709 | 
            +
                  this.tryEntries.forEach(resetTryEntry);
         | 
| 710 | 
            +
             | 
| 711 | 
            +
                  if (!skipTempReset) {
         | 
| 712 | 
            +
                    for (var name in this) {
         | 
| 713 | 
            +
                      // Not sure about the optimal order of these conditions:
         | 
| 714 | 
            +
                      if (name.charAt(0) === "t" &&
         | 
| 715 | 
            +
                          hasOwn.call(this, name) &&
         | 
| 716 | 
            +
                          !isNaN(+name.slice(1))) {
         | 
| 717 | 
            +
                        this[name] = undefined$1;
         | 
| 718 | 
            +
                      }
         | 
| 719 | 
            +
                    }
         | 
| 720 | 
            +
                  }
         | 
| 239 721 | 
             
                },
         | 
| 240 | 
            -
             | 
| 241 | 
            -
             | 
| 242 | 
            -
                   | 
| 243 | 
            -
             | 
| 722 | 
            +
             | 
| 723 | 
            +
                stop: function() {
         | 
| 724 | 
            +
                  this.done = true;
         | 
| 725 | 
            +
             | 
| 726 | 
            +
                  var rootEntry = this.tryEntries[0];
         | 
| 727 | 
            +
                  var rootRecord = rootEntry.completion;
         | 
| 728 | 
            +
                  if (rootRecord.type === "throw") {
         | 
| 729 | 
            +
                    throw rootRecord.arg;
         | 
| 730 | 
            +
                  }
         | 
| 731 | 
            +
             | 
| 244 732 | 
             
                  return this.rval;
         | 
| 245 733 | 
             
                },
         | 
| 246 | 
            -
             | 
| 247 | 
            -
             | 
| 734 | 
            +
             | 
| 735 | 
            +
                dispatchException: function(exception) {
         | 
| 736 | 
            +
                  if (this.done) {
         | 
| 737 | 
            +
                    throw exception;
         | 
| 738 | 
            +
                  }
         | 
| 739 | 
            +
             | 
| 248 740 | 
             
                  var context = this;
         | 
| 249 741 | 
             
                  function handle(loc, caught) {
         | 
| 250 | 
            -
                     | 
| 742 | 
            +
                    record.type = "throw";
         | 
| 743 | 
            +
                    record.arg = exception;
         | 
| 744 | 
            +
                    context.next = loc;
         | 
| 745 | 
            +
             | 
| 746 | 
            +
                    if (caught) {
         | 
| 747 | 
            +
                      // If the dispatched exception was caught by a catch block,
         | 
| 748 | 
            +
                      // then let that catch block handle the exception normally.
         | 
| 749 | 
            +
                      context.method = "next";
         | 
| 750 | 
            +
                      context.arg = undefined$1;
         | 
| 751 | 
            +
                    }
         | 
| 752 | 
            +
             | 
| 753 | 
            +
                    return !! caught;
         | 
| 251 754 | 
             
                  }
         | 
| 755 | 
            +
             | 
| 252 756 | 
             
                  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
         | 
| 253 | 
            -
                    var entry = this.tryEntries[i] | 
| 254 | 
            -
             | 
| 255 | 
            -
             | 
| 757 | 
            +
                    var entry = this.tryEntries[i];
         | 
| 758 | 
            +
                    var record = entry.completion;
         | 
| 759 | 
            +
             | 
| 760 | 
            +
                    if (entry.tryLoc === "root") {
         | 
| 761 | 
            +
                      // Exception thrown outside of any try block that could handle
         | 
| 762 | 
            +
                      // it, so set the completion value of the entire function to
         | 
| 763 | 
            +
                      // throw the exception.
         | 
| 764 | 
            +
                      return handle("end");
         | 
| 765 | 
            +
                    }
         | 
| 766 | 
            +
             | 
| 256 767 | 
             
                    if (entry.tryLoc <= this.prev) {
         | 
| 257 | 
            -
                      var hasCatch = hasOwn.call(entry, "catchLoc") | 
| 258 | 
            -
             | 
| 768 | 
            +
                      var hasCatch = hasOwn.call(entry, "catchLoc");
         | 
| 769 | 
            +
                      var hasFinally = hasOwn.call(entry, "finallyLoc");
         | 
| 770 | 
            +
             | 
| 259 771 | 
             
                      if (hasCatch && hasFinally) {
         | 
| 260 | 
            -
                        if (this.prev < entry.catchLoc)  | 
| 261 | 
            -
             | 
| 772 | 
            +
                        if (this.prev < entry.catchLoc) {
         | 
| 773 | 
            +
                          return handle(entry.catchLoc, true);
         | 
| 774 | 
            +
                        } else if (this.prev < entry.finallyLoc) {
         | 
| 775 | 
            +
                          return handle(entry.finallyLoc);
         | 
| 776 | 
            +
                        }
         | 
| 777 | 
            +
             | 
| 262 778 | 
             
                      } else if (hasCatch) {
         | 
| 263 | 
            -
                        if (this.prev < entry.catchLoc)  | 
| 779 | 
            +
                        if (this.prev < entry.catchLoc) {
         | 
| 780 | 
            +
                          return handle(entry.catchLoc, true);
         | 
| 781 | 
            +
                        }
         | 
| 782 | 
            +
             | 
| 783 | 
            +
                      } else if (hasFinally) {
         | 
| 784 | 
            +
                        if (this.prev < entry.finallyLoc) {
         | 
| 785 | 
            +
                          return handle(entry.finallyLoc);
         | 
| 786 | 
            +
                        }
         | 
| 787 | 
            +
             | 
| 264 788 | 
             
                      } else {
         | 
| 265 | 
            -
                         | 
| 266 | 
            -
                        if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
         | 
| 789 | 
            +
                        throw new Error("try statement without catch or finally");
         | 
| 267 790 | 
             
                      }
         | 
| 268 791 | 
             
                    }
         | 
| 269 792 | 
             
                  }
         | 
| 270 793 | 
             
                },
         | 
| 271 | 
            -
             | 
| 794 | 
            +
             | 
| 795 | 
            +
                abrupt: function(type, arg) {
         | 
| 272 796 | 
             
                  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
         | 
| 273 797 | 
             
                    var entry = this.tryEntries[i];
         | 
| 274 | 
            -
                    if (entry.tryLoc <= this.prev && | 
| 798 | 
            +
                    if (entry.tryLoc <= this.prev &&
         | 
| 799 | 
            +
                        hasOwn.call(entry, "finallyLoc") &&
         | 
| 800 | 
            +
                        this.prev < entry.finallyLoc) {
         | 
| 275 801 | 
             
                      var finallyEntry = entry;
         | 
| 276 802 | 
             
                      break;
         | 
| 277 803 | 
             
                    }
         | 
| 278 804 | 
             
                  }
         | 
| 279 | 
            -
             | 
| 805 | 
            +
             | 
| 806 | 
            +
                  if (finallyEntry &&
         | 
| 807 | 
            +
                      (type === "break" ||
         | 
| 808 | 
            +
                       type === "continue") &&
         | 
| 809 | 
            +
                      finallyEntry.tryLoc <= arg &&
         | 
| 810 | 
            +
                      arg <= finallyEntry.finallyLoc) {
         | 
| 811 | 
            +
                    // Ignore the finally entry if control is not jumping to a
         | 
| 812 | 
            +
                    // location outside the try/catch block.
         | 
| 813 | 
            +
                    finallyEntry = null;
         | 
| 814 | 
            +
                  }
         | 
| 815 | 
            +
             | 
| 280 816 | 
             
                  var record = finallyEntry ? finallyEntry.completion : {};
         | 
| 281 | 
            -
                   | 
| 817 | 
            +
                  record.type = type;
         | 
| 818 | 
            +
                  record.arg = arg;
         | 
| 819 | 
            +
             | 
| 820 | 
            +
                  if (finallyEntry) {
         | 
| 821 | 
            +
                    this.method = "next";
         | 
| 822 | 
            +
                    this.next = finallyEntry.finallyLoc;
         | 
| 823 | 
            +
                    return ContinueSentinel;
         | 
| 824 | 
            +
                  }
         | 
| 825 | 
            +
             | 
| 826 | 
            +
                  return this.complete(record);
         | 
| 282 827 | 
             
                },
         | 
| 283 | 
            -
             | 
| 284 | 
            -
             | 
| 285 | 
            -
                   | 
| 828 | 
            +
             | 
| 829 | 
            +
                complete: function(record, afterLoc) {
         | 
| 830 | 
            +
                  if (record.type === "throw") {
         | 
| 831 | 
            +
                    throw record.arg;
         | 
| 832 | 
            +
                  }
         | 
| 833 | 
            +
             | 
| 834 | 
            +
                  if (record.type === "break" ||
         | 
| 835 | 
            +
                      record.type === "continue") {
         | 
| 836 | 
            +
                    this.next = record.arg;
         | 
| 837 | 
            +
                  } else if (record.type === "return") {
         | 
| 838 | 
            +
                    this.rval = this.arg = record.arg;
         | 
| 839 | 
            +
                    this.method = "return";
         | 
| 840 | 
            +
                    this.next = "end";
         | 
| 841 | 
            +
                  } else if (record.type === "normal" && afterLoc) {
         | 
| 842 | 
            +
                    this.next = afterLoc;
         | 
| 843 | 
            +
                  }
         | 
| 844 | 
            +
             | 
| 845 | 
            +
                  return ContinueSentinel;
         | 
| 286 846 | 
             
                },
         | 
| 287 | 
            -
             | 
| 847 | 
            +
             | 
| 848 | 
            +
                finish: function(finallyLoc) {
         | 
| 288 849 | 
             
                  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
         | 
| 289 850 | 
             
                    var entry = this.tryEntries[i];
         | 
| 290 | 
            -
                    if (entry.finallyLoc === finallyLoc)  | 
| 851 | 
            +
                    if (entry.finallyLoc === finallyLoc) {
         | 
| 852 | 
            +
                      this.complete(entry.completion, entry.afterLoc);
         | 
| 853 | 
            +
                      resetTryEntry(entry);
         | 
| 854 | 
            +
                      return ContinueSentinel;
         | 
| 855 | 
            +
                    }
         | 
| 291 856 | 
             
                  }
         | 
| 292 857 | 
             
                },
         | 
| 293 | 
            -
             | 
| 858 | 
            +
             | 
| 859 | 
            +
                "catch": function(tryLoc) {
         | 
| 294 860 | 
             
                  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
         | 
| 295 861 | 
             
                    var entry = this.tryEntries[i];
         | 
| 296 862 | 
             
                    if (entry.tryLoc === tryLoc) {
         | 
| 297 863 | 
             
                      var record = entry.completion;
         | 
| 298 | 
            -
                      if ("throw" | 
| 864 | 
            +
                      if (record.type === "throw") {
         | 
| 299 865 | 
             
                        var thrown = record.arg;
         | 
| 300 866 | 
             
                        resetTryEntry(entry);
         | 
| 301 867 | 
             
                      }
         | 
| 302 868 | 
             
                      return thrown;
         | 
| 303 869 | 
             
                    }
         | 
| 304 870 | 
             
                  }
         | 
| 305 | 
            -
             | 
| 306 | 
            -
             | 
| 307 | 
            -
             | 
| 308 | 
            -
                   | 
| 309 | 
            -
             | 
| 310 | 
            -
             | 
| 311 | 
            -
             | 
| 312 | 
            -
                   | 
| 313 | 
            -
             | 
| 314 | 
            -
             | 
| 315 | 
            -
             | 
| 316 | 
            -
             | 
| 317 | 
            -
             | 
| 318 | 
            -
             | 
| 319 | 
            -
             | 
| 320 | 
            -
             | 
| 321 | 
            -
             | 
| 322 | 
            -
                return;
         | 
| 323 | 
            -
              }
         | 
| 324 | 
            -
              if (info.done) {
         | 
| 325 | 
            -
                resolve(value);
         | 
| 326 | 
            -
              } else {
         | 
| 327 | 
            -
                Promise.resolve(value).then(_next, _throw);
         | 
| 328 | 
            -
              }
         | 
| 329 | 
            -
            }
         | 
| 330 | 
            -
            function _asyncToGenerator(fn) {
         | 
| 331 | 
            -
              return function () {
         | 
| 332 | 
            -
                var self = this,
         | 
| 333 | 
            -
                  args = arguments;
         | 
| 334 | 
            -
                return new Promise(function (resolve, reject) {
         | 
| 335 | 
            -
                  var gen = fn.apply(self, args);
         | 
| 336 | 
            -
                  function _next(value) {
         | 
| 337 | 
            -
                    asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
         | 
| 338 | 
            -
                  }
         | 
| 339 | 
            -
                  function _throw(err) {
         | 
| 340 | 
            -
                    asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
         | 
| 341 | 
            -
                  }
         | 
| 342 | 
            -
                  _next(undefined);
         | 
| 343 | 
            -
                });
         | 
| 344 | 
            -
              };
         | 
| 345 | 
            -
            }
         | 
| 346 | 
            -
            function _extends() {
         | 
| 347 | 
            -
              _extends = Object.assign ? Object.assign.bind() : function (target) {
         | 
| 348 | 
            -
                for (var i = 1; i < arguments.length; i++) {
         | 
| 349 | 
            -
                  var source = arguments[i];
         | 
| 350 | 
            -
                  for (var key in source) {
         | 
| 351 | 
            -
                    if (Object.prototype.hasOwnProperty.call(source, key)) {
         | 
| 352 | 
            -
                      target[key] = source[key];
         | 
| 353 | 
            -
                    }
         | 
| 871 | 
            +
             | 
| 872 | 
            +
                  // The context.catch method must only be called with a location
         | 
| 873 | 
            +
                  // argument that corresponds to a known catch block.
         | 
| 874 | 
            +
                  throw new Error("illegal catch attempt");
         | 
| 875 | 
            +
                },
         | 
| 876 | 
            +
             | 
| 877 | 
            +
                delegateYield: function(iterable, resultName, nextLoc) {
         | 
| 878 | 
            +
                  this.delegate = {
         | 
| 879 | 
            +
                    iterator: values(iterable),
         | 
| 880 | 
            +
                    resultName: resultName,
         | 
| 881 | 
            +
                    nextLoc: nextLoc
         | 
| 882 | 
            +
                  };
         | 
| 883 | 
            +
             | 
| 884 | 
            +
                  if (this.method === "next") {
         | 
| 885 | 
            +
                    // Deliberately forget the last sent value so that we don't
         | 
| 886 | 
            +
                    // accidentally pass it on to the delegate.
         | 
| 887 | 
            +
                    this.arg = undefined$1;
         | 
| 354 888 | 
             
                  }
         | 
| 889 | 
            +
             | 
| 890 | 
            +
                  return ContinueSentinel;
         | 
| 355 891 | 
             
                }
         | 
| 356 | 
            -
                return target;
         | 
| 357 | 
            -
              };
         | 
| 358 | 
            -
              return _extends.apply(this, arguments);
         | 
| 359 | 
            -
            }
         | 
| 360 | 
            -
            function _inheritsLoose(subClass, superClass) {
         | 
| 361 | 
            -
              subClass.prototype = Object.create(superClass.prototype);
         | 
| 362 | 
            -
              subClass.prototype.constructor = subClass;
         | 
| 363 | 
            -
              _setPrototypeOf(subClass, superClass);
         | 
| 364 | 
            -
            }
         | 
| 365 | 
            -
            function _getPrototypeOf(o) {
         | 
| 366 | 
            -
              _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
         | 
| 367 | 
            -
                return o.__proto__ || Object.getPrototypeOf(o);
         | 
| 368 | 
            -
              };
         | 
| 369 | 
            -
              return _getPrototypeOf(o);
         | 
| 370 | 
            -
            }
         | 
| 371 | 
            -
            function _setPrototypeOf(o, p) {
         | 
| 372 | 
            -
              _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
         | 
| 373 | 
            -
                o.__proto__ = p;
         | 
| 374 | 
            -
                return o;
         | 
| 375 892 | 
             
              };
         | 
| 376 | 
            -
             | 
| 377 | 
            -
             | 
| 378 | 
            -
             | 
| 379 | 
            -
               | 
| 380 | 
            -
               | 
| 381 | 
            -
               | 
| 382 | 
            -
             | 
| 383 | 
            -
             | 
| 384 | 
            -
             | 
| 385 | 
            -
               | 
| 386 | 
            -
             | 
| 387 | 
            -
               | 
| 388 | 
            -
             | 
| 389 | 
            -
             | 
| 390 | 
            -
             | 
| 391 | 
            -
             | 
| 893 | 
            +
             | 
| 894 | 
            +
              // Regardless of whether this script is executing as a CommonJS module
         | 
| 895 | 
            +
              // or not, return the runtime object so that we can declare the variable
         | 
| 896 | 
            +
              // regeneratorRuntime in the outer scope, which allows this module to be
         | 
| 897 | 
            +
              // injected easily by `bin/regenerator --include-runtime script.js`.
         | 
| 898 | 
            +
              return exports;
         | 
| 899 | 
            +
             | 
| 900 | 
            +
            }(
         | 
| 901 | 
            +
              // If this script is executing as a CommonJS module, use module.exports
         | 
| 902 | 
            +
              // as the regeneratorRuntime namespace. Otherwise create a new empty
         | 
| 903 | 
            +
              // object. Either way, the resulting object will be used to initialize
         | 
| 904 | 
            +
              // the regeneratorRuntime variable at the top of this file.
         | 
| 905 | 
            +
               module.exports 
         | 
| 906 | 
            +
            ));
         | 
| 907 | 
            +
             | 
| 908 | 
            +
            try {
         | 
| 909 | 
            +
              regeneratorRuntime = runtime;
         | 
| 910 | 
            +
            } catch (accidentalStrictMode) {
         | 
| 911 | 
            +
              // This module should not be running in strict mode, so the above
         | 
| 912 | 
            +
              // assignment should always work unless something is misconfigured. Just
         | 
| 913 | 
            +
              // in case runtime.js accidentally runs in strict mode, in modern engines
         | 
| 914 | 
            +
              // we can explicitly access globalThis. In older engines we can escape
         | 
| 915 | 
            +
              // strict mode using a global Function call. This could conceivably fail
         | 
| 916 | 
            +
              // if a Content Security Policy forbids using Function, but in that case
         | 
| 917 | 
            +
              // the proper solution is to fix the accidental strict mode problem. If
         | 
| 918 | 
            +
              // you've misconfigured your bundler to force strict mode and applied a
         | 
| 919 | 
            +
              // CSP to forbid Function, and you're not willing to fix either of those
         | 
| 920 | 
            +
              // problems, please detail your unique predicament in a GitHub issue.
         | 
| 921 | 
            +
              if (typeof globalThis === "object") {
         | 
| 922 | 
            +
                globalThis.regeneratorRuntime = runtime;
         | 
| 392 923 | 
             
              } else {
         | 
| 393 | 
            -
                 | 
| 394 | 
            -
                  var a = [null];
         | 
| 395 | 
            -
                  a.push.apply(a, args);
         | 
| 396 | 
            -
                  var Constructor = Function.bind.apply(Parent, a);
         | 
| 397 | 
            -
                  var instance = new Constructor();
         | 
| 398 | 
            -
                  if (Class) _setPrototypeOf(instance, Class.prototype);
         | 
| 399 | 
            -
                  return instance;
         | 
| 400 | 
            -
                };
         | 
| 401 | 
            -
              }
         | 
| 402 | 
            -
              return _construct.apply(null, arguments);
         | 
| 403 | 
            -
            }
         | 
| 404 | 
            -
            function _isNativeFunction(fn) {
         | 
| 405 | 
            -
              return Function.toString.call(fn).indexOf("[native code]") !== -1;
         | 
| 406 | 
            -
            }
         | 
| 407 | 
            -
            function _wrapNativeSuper(Class) {
         | 
| 408 | 
            -
              var _cache = typeof Map === "function" ? new Map() : undefined;
         | 
| 409 | 
            -
              _wrapNativeSuper = function _wrapNativeSuper(Class) {
         | 
| 410 | 
            -
                if (Class === null || !_isNativeFunction(Class)) return Class;
         | 
| 411 | 
            -
                if (typeof Class !== "function") {
         | 
| 412 | 
            -
                  throw new TypeError("Super expression must either be null or a function");
         | 
| 413 | 
            -
                }
         | 
| 414 | 
            -
                if (typeof _cache !== "undefined") {
         | 
| 415 | 
            -
                  if (_cache.has(Class)) return _cache.get(Class);
         | 
| 416 | 
            -
                  _cache.set(Class, Wrapper);
         | 
| 417 | 
            -
                }
         | 
| 418 | 
            -
                function Wrapper() {
         | 
| 419 | 
            -
                  return _construct(Class, arguments, _getPrototypeOf(this).constructor);
         | 
| 420 | 
            -
                }
         | 
| 421 | 
            -
                Wrapper.prototype = Object.create(Class.prototype, {
         | 
| 422 | 
            -
                  constructor: {
         | 
| 423 | 
            -
                    value: Wrapper,
         | 
| 424 | 
            -
                    enumerable: false,
         | 
| 425 | 
            -
                    writable: true,
         | 
| 426 | 
            -
                    configurable: true
         | 
| 427 | 
            -
                  }
         | 
| 428 | 
            -
                });
         | 
| 429 | 
            -
                return _setPrototypeOf(Wrapper, Class);
         | 
| 430 | 
            -
              };
         | 
| 431 | 
            -
              return _wrapNativeSuper(Class);
         | 
| 432 | 
            -
            }
         | 
| 433 | 
            -
            function _assertThisInitialized(self) {
         | 
| 434 | 
            -
              if (self === void 0) {
         | 
| 435 | 
            -
                throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
         | 
| 924 | 
            +
                Function("r", "regeneratorRuntime = r")(runtime);
         | 
| 436 925 | 
             
              }
         | 
| 437 | 
            -
              return self;
         | 
| 438 926 | 
             
            }
         | 
| 927 | 
            +
            });
         | 
| 439 928 |  | 
| 440 929 | 
             
            var AxiosService = /*#__PURE__*/function () {
         | 
| 441 930 | 
             
              function AxiosService(config) {
         | 
| 442 931 | 
             
                if (!config) config = {};
         | 
| 443 932 | 
             
                this.axios = axios.create(config);
         | 
| 444 933 | 
             
              }
         | 
| 934 | 
            +
             | 
| 445 935 | 
             
              var _proto = AxiosService.prototype;
         | 
| 936 | 
            +
             | 
| 446 937 | 
             
              _proto.apiRequest = /*#__PURE__*/function () {
         | 
| 447 | 
            -
                var _apiRequest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 448 | 
            -
                  return  | 
| 449 | 
            -
                    while (1)  | 
| 450 | 
            -
                       | 
| 451 | 
            -
                         | 
| 452 | 
            -
             | 
| 453 | 
            -
             | 
| 454 | 
            -
                           | 
| 455 | 
            -
             | 
| 456 | 
            -
             | 
| 457 | 
            -
                           | 
| 458 | 
            -
             | 
| 459 | 
            -
             | 
| 460 | 
            -
             | 
| 461 | 
            -
                         | 
| 938 | 
            +
                var _apiRequest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(config, url, data) {
         | 
| 939 | 
            +
                  return runtime_1.wrap(function _callee$(_context) {
         | 
| 940 | 
            +
                    while (1) {
         | 
| 941 | 
            +
                      switch (_context.prev = _context.next) {
         | 
| 942 | 
            +
                        case 0:
         | 
| 943 | 
            +
                          if (!config.headers) config.headers = {};
         | 
| 944 | 
            +
                          config.headers['Content-Type'] = 'application/json';
         | 
| 945 | 
            +
                          return _context.abrupt("return", this.axios(_extends({}, config, {
         | 
| 946 | 
            +
                            url: url,
         | 
| 947 | 
            +
                            data: data
         | 
| 948 | 
            +
                          })).then(function (res) {
         | 
| 949 | 
            +
                            return res.data;
         | 
| 950 | 
            +
                          }));
         | 
| 951 | 
            +
             | 
| 952 | 
            +
                        case 3:
         | 
| 953 | 
            +
                        case "end":
         | 
| 954 | 
            +
                          return _context.stop();
         | 
| 955 | 
            +
                      }
         | 
| 462 956 | 
             
                    }
         | 
| 463 957 | 
             
                  }, _callee, this);
         | 
| 464 958 | 
             
                }));
         | 
| 959 | 
            +
             | 
| 465 960 | 
             
                function apiRequest(_x, _x2, _x3) {
         | 
| 466 961 | 
             
                  return _apiRequest.apply(this, arguments);
         | 
| 467 962 | 
             
                }
         | 
| 963 | 
            +
             | 
| 468 964 | 
             
                return apiRequest;
         | 
| 469 965 | 
             
              }();
         | 
| 966 | 
            +
             | 
| 470 967 | 
             
              _proto.apiRequestHeader = /*#__PURE__*/function () {
         | 
| 471 | 
            -
                var _apiRequestHeader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 472 | 
            -
                  return  | 
| 473 | 
            -
                    while (1)  | 
| 474 | 
            -
                       | 
| 475 | 
            -
                         | 
| 476 | 
            -
             | 
| 477 | 
            -
             | 
| 478 | 
            -
                           | 
| 479 | 
            -
             | 
| 480 | 
            -
             | 
| 481 | 
            -
                           | 
| 482 | 
            -
                             | 
| 483 | 
            -
             | 
| 484 | 
            -
             | 
| 485 | 
            -
             | 
| 486 | 
            -
             | 
| 487 | 
            -
             | 
| 488 | 
            -
             | 
| 489 | 
            -
             | 
| 968 | 
            +
                var _apiRequestHeader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(config, url, headerToRetrieve, data) {
         | 
| 969 | 
            +
                  return runtime_1.wrap(function _callee2$(_context2) {
         | 
| 970 | 
            +
                    while (1) {
         | 
| 971 | 
            +
                      switch (_context2.prev = _context2.next) {
         | 
| 972 | 
            +
                        case 0:
         | 
| 973 | 
            +
                          if (!config.headers) config.headers = {};
         | 
| 974 | 
            +
                          config.headers['Content-Type'] = 'application/json';
         | 
| 975 | 
            +
                          return _context2.abrupt("return", this.axios(_extends({}, config, {
         | 
| 976 | 
            +
                            url: url,
         | 
| 977 | 
            +
                            data: data
         | 
| 978 | 
            +
                          })).then(function (res) {
         | 
| 979 | 
            +
                            if (headerToRetrieve) {
         | 
| 980 | 
            +
                              var _res$headers$headerTo;
         | 
| 981 | 
            +
             | 
| 982 | 
            +
                              return (_res$headers$headerTo = res.headers[headerToRetrieve]) != null ? _res$headers$headerTo : res.headers[headerToRetrieve.toLowerCase()];
         | 
| 983 | 
            +
                            }
         | 
| 984 | 
            +
             | 
| 985 | 
            +
                            return res.headers;
         | 
| 986 | 
            +
                          }));
         | 
| 987 | 
            +
             | 
| 988 | 
            +
                        case 3:
         | 
| 989 | 
            +
                        case "end":
         | 
| 990 | 
            +
                          return _context2.stop();
         | 
| 991 | 
            +
                      }
         | 
| 490 992 | 
             
                    }
         | 
| 491 993 | 
             
                  }, _callee2, this);
         | 
| 492 994 | 
             
                }));
         | 
| 995 | 
            +
             | 
| 493 996 | 
             
                function apiRequestHeader(_x4, _x5, _x6, _x7) {
         | 
| 494 997 | 
             
                  return _apiRequestHeader.apply(this, arguments);
         | 
| 495 998 | 
             
                }
         | 
| 999 | 
            +
             | 
| 496 1000 | 
             
                return apiRequestHeader;
         | 
| 497 1001 | 
             
              }();
         | 
| 1002 | 
            +
             | 
| 498 1003 | 
             
              _proto.get = function get(url, config) {
         | 
| 499 1004 | 
             
                return this.apiRequest(_extends({}, config, {
         | 
| 500 1005 | 
             
                  method: 'get'
         | 
| 501 1006 | 
             
                }), url);
         | 
| 502 1007 | 
             
              };
         | 
| 1008 | 
            +
             | 
| 503 1009 | 
             
              _proto.deleteRequest = function deleteRequest(url, config) {
         | 
| 504 1010 | 
             
                return this.apiRequest(_extends({}, config, {
         | 
| 505 1011 | 
             
                  method: 'delete'
         | 
| 506 1012 | 
             
                }), url);
         | 
| 507 1013 | 
             
              };
         | 
| 1014 | 
            +
             | 
| 508 1015 | 
             
              _proto.post = function post(url, data, config) {
         | 
| 509 1016 | 
             
                return this.apiRequest(_extends({}, config, {
         | 
| 510 1017 | 
             
                  method: 'post'
         | 
| 511 1018 | 
             
                }), url, data);
         | 
| 512 1019 | 
             
              };
         | 
| 1020 | 
            +
             | 
| 513 1021 | 
             
              _proto.put = function put(url, data, config) {
         | 
| 514 1022 | 
             
                return this.apiRequest(_extends({}, config, {
         | 
| 515 1023 | 
             
                  method: 'put'
         | 
| 516 1024 | 
             
                }), url, data);
         | 
| 517 1025 | 
             
              };
         | 
| 1026 | 
            +
             | 
| 518 1027 | 
             
              _proto.patch = function patch(url, data, config) {
         | 
| 519 1028 | 
             
                return this.apiRequest(_extends({}, config, {
         | 
| 520 1029 | 
             
                  method: 'patch'
         | 
| 521 1030 | 
             
                }), url, data);
         | 
| 522 1031 | 
             
              };
         | 
| 1032 | 
            +
             | 
| 523 1033 | 
             
              _proto.head = function head(url, config, headerToRetrieve, data) {
         | 
| 524 1034 | 
             
                return this.apiRequestHeader(_extends({}, config, {
         | 
| 525 1035 | 
             
                  method: 'head'
         | 
| 526 1036 | 
             
                }), url, headerToRetrieve, data);
         | 
| 527 1037 | 
             
              };
         | 
| 1038 | 
            +
             | 
| 528 1039 | 
             
              return AxiosService;
         | 
| 529 1040 | 
             
            }();
         | 
| 530 1041 |  | 
| 531 1042 | 
             
            var APIService = /*#__PURE__*/function (_AxiosService) {
         | 
| 532 1043 | 
             
              _inheritsLoose(APIService, _AxiosService);
         | 
| 1044 | 
            +
             | 
| 533 1045 | 
             
              /**
         | 
| 534 1046 | 
             
               * The API Service lets you use an axios API and handles oro backend services authentification via JWT tokens
         | 
| 535 1047 | 
             
               * @param useLocalStorage if set to true, tokens will be stored in localStorage
         | 
| @@ -538,11 +1050,14 @@ var APIService = /*#__PURE__*/function (_AxiosService) { | |
| 538 1050 | 
             
               */
         | 
| 539 1051 | 
             
              function APIService(useLocalStorage, config, tokenRefreshFailureCallback) {
         | 
| 540 1052 | 
             
                var _this;
         | 
| 1053 | 
            +
             | 
| 541 1054 | 
             
                _this = _AxiosService.call(this, config) || this;
         | 
| 542 1055 | 
             
                _this.useLocalStorage = useLocalStorage;
         | 
| 543 1056 | 
             
                _this.tokenRefreshFailureCallback = tokenRefreshFailureCallback;
         | 
| 544 1057 | 
             
                _this.tokens = {};
         | 
| 1058 | 
            +
             | 
| 545 1059 | 
             
                var self = _assertThisInitialized(_this);
         | 
| 1060 | 
            +
             | 
| 546 1061 | 
             
                _this.axios.interceptors.request.use(function (config) {
         | 
| 547 1062 | 
             
                  var token = config.useRefreshToken ? self.getTokens().refreshToken : self.getTokens().accessToken;
         | 
| 548 1063 | 
             
                  config.headers = _extends({}, config.headers, {
         | 
| @@ -552,42 +1067,51 @@ var APIService = /*#__PURE__*/function (_AxiosService) { | |
| 552 1067 | 
             
                }, function (error) {
         | 
| 553 1068 | 
             
                  Promise.reject(error);
         | 
| 554 1069 | 
             
                });
         | 
| 1070 | 
            +
             | 
| 555 1071 | 
             
                createAuthRefreshInterceptor(_this.axios, /*#__PURE__*/function () {
         | 
| 556 | 
            -
                  var _ref = _asyncToGenerator( /*#__PURE__*/ | 
| 1072 | 
            +
                  var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(failedRequest) {
         | 
| 557 1073 | 
             
                    var tokenResp;
         | 
| 558 | 
            -
                    return  | 
| 559 | 
            -
                      while (1)  | 
| 560 | 
            -
                         | 
| 561 | 
            -
                           | 
| 562 | 
            -
                             | 
| 563 | 
            -
             | 
| 564 | 
            -
             | 
| 565 | 
            -
             | 
| 566 | 
            -
             | 
| 567 | 
            -
             | 
| 568 | 
            -
             | 
| 569 | 
            -
             | 
| 570 | 
            -
             | 
| 571 | 
            -
             | 
| 572 | 
            -
                             | 
| 573 | 
            -
             | 
| 574 | 
            -
             | 
| 575 | 
            -
             | 
| 576 | 
            -
             | 
| 577 | 
            -
             | 
| 578 | 
            -
             | 
| 579 | 
            -
             | 
| 580 | 
            -
                           | 
| 581 | 
            -
             | 
| 582 | 
            -
             | 
| 583 | 
            -
             | 
| 584 | 
            -
             | 
| 585 | 
            -
             | 
| 586 | 
            -
             | 
| 587 | 
            -
                           | 
| 1074 | 
            +
                    return runtime_1.wrap(function _callee$(_context) {
         | 
| 1075 | 
            +
                      while (1) {
         | 
| 1076 | 
            +
                        switch (_context.prev = _context.next) {
         | 
| 1077 | 
            +
                          case 0:
         | 
| 1078 | 
            +
                            if (!self.authRefreshFn) {
         | 
| 1079 | 
            +
                              _context.next = 15;
         | 
| 1080 | 
            +
                              break;
         | 
| 1081 | 
            +
                            }
         | 
| 1082 | 
            +
             | 
| 1083 | 
            +
                            _context.prev = 1;
         | 
| 1084 | 
            +
                            _context.next = 4;
         | 
| 1085 | 
            +
                            return self.authRefreshFn(self.getTokens().refreshToken);
         | 
| 1086 | 
            +
             | 
| 1087 | 
            +
                          case 4:
         | 
| 1088 | 
            +
                            tokenResp = _context.sent;
         | 
| 1089 | 
            +
                            self.setTokens({
         | 
| 1090 | 
            +
                              accessToken: tokenResp.accessToken,
         | 
| 1091 | 
            +
                              refreshToken: tokenResp.refreshToken
         | 
| 1092 | 
            +
                            });
         | 
| 1093 | 
            +
                            failedRequest.response.config.headers['Authorization'] = "Bearer " + self.getTokens().accessToken;
         | 
| 1094 | 
            +
                            return _context.abrupt("return", Promise.resolve());
         | 
| 1095 | 
            +
             | 
| 1096 | 
            +
                          case 10:
         | 
| 1097 | 
            +
                            _context.prev = 10;
         | 
| 1098 | 
            +
                            _context.t0 = _context["catch"](1);
         | 
| 1099 | 
            +
                            console.error('an error occured while refreshing tokens (notifying callback)', _context.t0);
         | 
| 1100 | 
            +
                            if (self.tokenRefreshFailureCallback) self.tokenRefreshFailureCallback(failedRequest);
         | 
| 1101 | 
            +
                            return _context.abrupt("return", Promise.resolve());
         | 
| 1102 | 
            +
             | 
| 1103 | 
            +
                          case 15:
         | 
| 1104 | 
            +
                            console.error('The request could not refresh the token (authRefreshFn was not set)', failedRequest);
         | 
| 1105 | 
            +
                            return _context.abrupt("return", Promise.resolve());
         | 
| 1106 | 
            +
             | 
| 1107 | 
            +
                          case 17:
         | 
| 1108 | 
            +
                          case "end":
         | 
| 1109 | 
            +
                            return _context.stop();
         | 
| 1110 | 
            +
                        }
         | 
| 588 1111 | 
             
                      }
         | 
| 589 1112 | 
             
                    }, _callee, null, [[1, 10]]);
         | 
| 590 1113 | 
             
                  }));
         | 
| 1114 | 
            +
             | 
| 591 1115 | 
             
                  return function (_x) {
         | 
| 592 1116 | 
             
                    return _ref.apply(this, arguments);
         | 
| 593 1117 | 
             
                  };
         | 
| @@ -596,34 +1120,43 @@ var APIService = /*#__PURE__*/function (_AxiosService) { | |
| 596 1120 | 
             
                });
         | 
| 597 1121 | 
             
                return _this;
         | 
| 598 1122 | 
             
              }
         | 
| 1123 | 
            +
             | 
| 599 1124 | 
             
              var _proto = APIService.prototype;
         | 
| 1125 | 
            +
             | 
| 600 1126 | 
             
              _proto.setAuthRefreshFn = function setAuthRefreshFn(fn) {
         | 
| 601 1127 | 
             
                this.authRefreshFn = fn;
         | 
| 602 1128 | 
             
              };
         | 
| 1129 | 
            +
             | 
| 603 1130 | 
             
              _proto.setTokens = function setTokens(tokens) {
         | 
| 604 1131 | 
             
                if (this.useLocalStorage) {
         | 
| 605 1132 | 
             
                  localStorage.setItem('tokens', JSON.stringify(tokens));
         | 
| 606 1133 | 
             
                }
         | 
| 1134 | 
            +
             | 
| 607 1135 | 
             
                this.tokens = tokens;
         | 
| 608 1136 | 
             
              };
         | 
| 1137 | 
            +
             | 
| 609 1138 | 
             
              _proto.getTokens = function getTokens() {
         | 
| 610 1139 | 
             
                if (this.useLocalStorage) {
         | 
| 611 1140 | 
             
                  var tokens = {};
         | 
| 612 1141 | 
             
                  var item = localStorage.getItem('tokens');
         | 
| 1142 | 
            +
             | 
| 613 1143 | 
             
                  if (item) {
         | 
| 614 1144 | 
             
                    tokens = JSON.parse(item);
         | 
| 615 1145 | 
             
                  }
         | 
| 1146 | 
            +
             | 
| 616 1147 | 
             
                  return tokens;
         | 
| 617 1148 | 
             
                } else {
         | 
| 618 1149 | 
             
                  return this.tokens;
         | 
| 619 1150 | 
             
                }
         | 
| 620 1151 | 
             
              };
         | 
| 1152 | 
            +
             | 
| 621 1153 | 
             
              return APIService;
         | 
| 622 1154 | 
             
            }(AxiosService);
         | 
| 623 1155 |  | 
| 624 1156 | 
             
            /**
         | 
| 625 1157 | 
             
             * This service enables you to handle one authentication token per practice
         | 
| 626 1158 | 
             
             */
         | 
| 1159 | 
            +
             | 
| 627 1160 | 
             
            var ApisPracticeManager = /*#__PURE__*/function () {
         | 
| 628 1161 | 
             
              /**
         | 
| 629 1162 | 
             
               * The constructor
         | 
| @@ -636,6 +1169,7 @@ var ApisPracticeManager = /*#__PURE__*/function () { | |
| 636 1169 | 
             
                if (useLocalStorage === void 0) {
         | 
| 637 1170 | 
             
                  useLocalStorage = false;
         | 
| 638 1171 | 
             
                }
         | 
| 1172 | 
            +
             | 
| 639 1173 | 
             
                this.serviceCollReq = serviceCollReq;
         | 
| 640 1174 | 
             
                this.getAuthTokenCbk = getAuthTokenCbk;
         | 
| 641 1175 | 
             
                this.useLocalStorage = useLocalStorage;
         | 
| @@ -646,73 +1180,98 @@ var ApisPracticeManager = /*#__PURE__*/function () { | |
| 646 1180 | 
             
               * @param practiceUuid the uuid of the practice
         | 
| 647 1181 | 
             
               * @returns a promise holding a `ServiceCollection`
         | 
| 648 1182 | 
             
               */
         | 
| 1183 | 
            +
             | 
| 1184 | 
            +
             | 
| 649 1185 | 
             
              var _proto = ApisPracticeManager.prototype;
         | 
| 1186 | 
            +
             | 
| 650 1187 | 
             
              _proto.get =
         | 
| 651 1188 | 
             
              /*#__PURE__*/
         | 
| 652 1189 | 
             
              function () {
         | 
| 653 | 
            -
                var _get = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 1190 | 
            +
                var _get = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practiceUuid) {
         | 
| 654 1191 | 
             
                  var _this = this;
         | 
| 1192 | 
            +
             | 
| 655 1193 | 
             
                  var cacheKey, practiceInstance, newPracticeInstance, authTokenFunc;
         | 
| 656 | 
            -
                  return  | 
| 657 | 
            -
                    while (1)  | 
| 658 | 
            -
                       | 
| 659 | 
            -
                         | 
| 660 | 
            -
             | 
| 661 | 
            -
             | 
| 662 | 
            -
             | 
| 663 | 
            -
                           | 
| 664 | 
            -
             | 
| 665 | 
            -
             | 
| 666 | 
            -
             | 
| 667 | 
            -
             | 
| 668 | 
            -
             | 
| 669 | 
            -
             | 
| 670 | 
            -
             | 
| 671 | 
            -
             | 
| 672 | 
            -
             | 
| 673 | 
            -
             | 
| 674 | 
            -
             | 
| 675 | 
            -
             | 
| 1194 | 
            +
                  return runtime_1.wrap(function _callee2$(_context2) {
         | 
| 1195 | 
            +
                    while (1) {
         | 
| 1196 | 
            +
                      switch (_context2.prev = _context2.next) {
         | 
| 1197 | 
            +
                        case 0:
         | 
| 1198 | 
            +
                          cacheKey = practiceUuid != null ? practiceUuid : 'none';
         | 
| 1199 | 
            +
                          practiceInstance = this.practiceInstances.get(cacheKey);
         | 
| 1200 | 
            +
             | 
| 1201 | 
            +
                          if (!practiceInstance) {
         | 
| 1202 | 
            +
                            _context2.next = 4;
         | 
| 1203 | 
            +
                            break;
         | 
| 1204 | 
            +
                          }
         | 
| 1205 | 
            +
             | 
| 1206 | 
            +
                          return _context2.abrupt("return", practiceInstance);
         | 
| 1207 | 
            +
             | 
| 1208 | 
            +
                        case 4:
         | 
| 1209 | 
            +
                          newPracticeInstance = init(this.serviceCollReq, undefined, this.useLocalStorage); // Create one auth token callback per practice since the practice uuid needs to change
         | 
| 1210 | 
            +
             | 
| 1211 | 
            +
                          authTokenFunc = /*#__PURE__*/function () {
         | 
| 1212 | 
            +
                            var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
         | 
| 1213 | 
            +
                              return runtime_1.wrap(function _callee$(_context) {
         | 
| 1214 | 
            +
                                while (1) {
         | 
| 1215 | 
            +
                                  switch (_context.prev = _context.next) {
         | 
| 1216 | 
            +
                                    case 0:
         | 
| 1217 | 
            +
                                      if (!newPracticeInstance.guardService) {
         | 
| 1218 | 
            +
                                        _context.next = 7;
         | 
| 1219 | 
            +
                                        break;
         | 
| 1220 | 
            +
                                      }
         | 
| 1221 | 
            +
             | 
| 1222 | 
            +
                                      console.log("\x1B[36m[Auth] Refresh auth called (practiceUuid: " + practiceUuid + ")\x1B[36m");
         | 
| 1223 | 
            +
                                      _context.next = 4;
         | 
| 1224 | 
            +
                                      return _this.getAuthTokenCbk(newPracticeInstance.guardService, practiceUuid);
         | 
| 1225 | 
            +
             | 
| 1226 | 
            +
                                    case 4:
         | 
| 1227 | 
            +
                                      return _context.abrupt("return", _context.sent);
         | 
| 1228 | 
            +
             | 
| 1229 | 
            +
                                    case 7:
         | 
| 1230 | 
            +
                                      throw Error('[Auth] Unable to refresh token guard service is undefined');
         | 
| 1231 | 
            +
             | 
| 1232 | 
            +
                                    case 8:
         | 
| 1233 | 
            +
                                    case "end":
         | 
| 1234 | 
            +
                                      return _context.stop();
         | 
| 676 1235 | 
             
                                  }
         | 
| 677 | 
            -
             | 
| 678 | 
            -
             | 
| 679 | 
            -
             | 
| 680 | 
            -
             | 
| 681 | 
            -
             | 
| 682 | 
            -
             | 
| 683 | 
            -
             | 
| 684 | 
            -
             | 
| 685 | 
            -
             | 
| 686 | 
            -
             | 
| 687 | 
            -
             | 
| 688 | 
            -
             | 
| 689 | 
            -
             | 
| 690 | 
            -
             | 
| 691 | 
            -
             | 
| 692 | 
            -
                           | 
| 693 | 
            -
             | 
| 694 | 
            -
             | 
| 695 | 
            -
             | 
| 696 | 
            -
             | 
| 697 | 
            -
                         | 
| 698 | 
            -
             | 
| 699 | 
            -
             | 
| 700 | 
            -
                        return _context2.abrupt("return", newPracticeInstance);
         | 
| 701 | 
            -
                      case 11:
         | 
| 702 | 
            -
                      case "end":
         | 
| 703 | 
            -
                        return _context2.stop();
         | 
| 1236 | 
            +
                                }
         | 
| 1237 | 
            +
                              }, _callee);
         | 
| 1238 | 
            +
                            }));
         | 
| 1239 | 
            +
             | 
| 1240 | 
            +
                            return function authTokenFunc() {
         | 
| 1241 | 
            +
                              return _ref.apply(this, arguments);
         | 
| 1242 | 
            +
                            };
         | 
| 1243 | 
            +
                          }(); // Initialize the M2M token
         | 
| 1244 | 
            +
             | 
| 1245 | 
            +
             | 
| 1246 | 
            +
                          _context2.next = 8;
         | 
| 1247 | 
            +
                          return authTokenFunc();
         | 
| 1248 | 
            +
             | 
| 1249 | 
            +
                        case 8:
         | 
| 1250 | 
            +
                          // Set the refresh tokens callback
         | 
| 1251 | 
            +
                          newPracticeInstance.apiService.setAuthRefreshFn(authTokenFunc);
         | 
| 1252 | 
            +
                          this.practiceInstances.set(cacheKey, newPracticeInstance);
         | 
| 1253 | 
            +
                          return _context2.abrupt("return", newPracticeInstance);
         | 
| 1254 | 
            +
             | 
| 1255 | 
            +
                        case 11:
         | 
| 1256 | 
            +
                        case "end":
         | 
| 1257 | 
            +
                          return _context2.stop();
         | 
| 1258 | 
            +
                      }
         | 
| 704 1259 | 
             
                    }
         | 
| 705 1260 | 
             
                  }, _callee2, this);
         | 
| 706 1261 | 
             
                }));
         | 
| 1262 | 
            +
             | 
| 707 1263 | 
             
                function get(_x) {
         | 
| 708 1264 | 
             
                  return _get.apply(this, arguments);
         | 
| 709 1265 | 
             
                }
         | 
| 1266 | 
            +
             | 
| 710 1267 | 
             
                return get;
         | 
| 711 1268 | 
             
              }();
         | 
| 1269 | 
            +
             | 
| 712 1270 | 
             
              return ApisPracticeManager;
         | 
| 713 1271 | 
             
            }();
         | 
| 714 1272 |  | 
| 715 1273 | 
             
            var AssistantType;
         | 
| 1274 | 
            +
             | 
| 716 1275 | 
             
            (function (AssistantType) {
         | 
| 717 1276 | 
             
              AssistantType["MedicalSecretary"] = "MedicalSecretary";
         | 
| 718 1277 | 
             
              AssistantType["Nurse"] = "Nurse";
         | 
| @@ -720,7 +1279,9 @@ var AssistantType; | |
| 720 1279 | 
             
              AssistantType["Administrative"] = "Administrative";
         | 
| 721 1280 | 
             
              AssistantType["Other"] = "Other";
         | 
| 722 1281 | 
             
            })(AssistantType || (AssistantType = {}));
         | 
| 1282 | 
            +
             | 
| 723 1283 | 
             
            var TransmissionKind;
         | 
| 1284 | 
            +
             | 
| 724 1285 | 
             
            (function (TransmissionKind) {
         | 
| 725 1286 | 
             
              TransmissionKind["Fax"] = "Fax";
         | 
| 726 1287 | 
             
              TransmissionKind["Email"] = "Email";
         | 
| @@ -730,7 +1291,9 @@ var TransmissionKind; | |
| 730 1291 | 
             
              TransmissionKind["API"] = "API";
         | 
| 731 1292 | 
             
              TransmissionKind["Other"] = "Other";
         | 
| 732 1293 | 
             
            })(TransmissionKind || (TransmissionKind = {}));
         | 
| 1294 | 
            +
             | 
| 733 1295 | 
             
            var TransmissionStatus;
         | 
| 1296 | 
            +
             | 
| 734 1297 | 
             
            (function (TransmissionStatus) {
         | 
| 735 1298 | 
             
              TransmissionStatus["Preparing"] = "Preparing";
         | 
| 736 1299 | 
             
              TransmissionStatus["Sending"] = "Sending";
         | 
| @@ -743,12 +1306,16 @@ var TransmissionStatus; | |
| 743 1306 | 
             
              TransmissionStatus["ReceiverNotAnswering"] = "ReceiverNotAnswering";
         | 
| 744 1307 | 
             
              TransmissionStatus["ReceiverIncompatible"] = "ReceiverIncompatible";
         | 
| 745 1308 | 
             
            })(TransmissionStatus || (TransmissionStatus = {}));
         | 
| 1309 | 
            +
             | 
| 746 1310 | 
             
            var ConsultType;
         | 
| 1311 | 
            +
             | 
| 747 1312 | 
             
            (function (ConsultType) {
         | 
| 748 1313 | 
             
              ConsultType["Onboard"] = "Onboard";
         | 
| 749 1314 | 
             
              ConsultType["Refill"] = "Refill";
         | 
| 750 1315 | 
             
            })(ConsultType || (ConsultType = {}));
         | 
| 1316 | 
            +
             | 
| 751 1317 | 
             
            var FeeStatus;
         | 
| 1318 | 
            +
             | 
| 752 1319 | 
             
            (function (FeeStatus) {
         | 
| 753 1320 | 
             
              FeeStatus["NoFee"] = "NoFee";
         | 
| 754 1321 | 
             
              FeeStatus["Pending"] = "Pending";
         | 
| @@ -757,7 +1324,9 @@ var FeeStatus; | |
| 757 1324 | 
             
              FeeStatus["Cancelled"] = "Cancelled";
         | 
| 758 1325 | 
             
              FeeStatus["Contested"] = "Contested";
         | 
| 759 1326 | 
             
            })(FeeStatus || (FeeStatus = {}));
         | 
| 1327 | 
            +
             | 
| 760 1328 | 
             
            var MedicalStatus;
         | 
| 1329 | 
            +
             | 
| 761 1330 | 
             
            (function (MedicalStatus) {
         | 
| 762 1331 | 
             
              MedicalStatus["Creating"] = "Creating";
         | 
| 763 1332 | 
             
              MedicalStatus["Assigning"] = "Assigning";
         | 
| @@ -770,7 +1339,9 @@ var MedicalStatus; | |
| 770 1339 | 
             
              MedicalStatus["Archived"] = "Archived";
         | 
| 771 1340 | 
             
              MedicalStatus["Failed"] = "Failed";
         | 
| 772 1341 | 
             
            })(MedicalStatus || (MedicalStatus = {}));
         | 
| 1342 | 
            +
             | 
| 773 1343 | 
             
            var TaskStatus;
         | 
| 1344 | 
            +
             | 
| 774 1345 | 
             
            (function (TaskStatus) {
         | 
| 775 1346 | 
             
              TaskStatus["None"] = "None";
         | 
| 776 1347 | 
             
              TaskStatus["ToDo"] = "ToDo";
         | 
| @@ -778,7 +1349,9 @@ var TaskStatus; | |
| 778 1349 | 
             
              TaskStatus["Blocked"] = "Blocked";
         | 
| 779 1350 | 
             
              TaskStatus["Done"] = "Done";
         | 
| 780 1351 | 
             
            })(TaskStatus || (TaskStatus = {}));
         | 
| 1352 | 
            +
             | 
| 781 1353 | 
             
            var ClosedReasonType;
         | 
| 1354 | 
            +
             | 
| 782 1355 | 
             
            (function (ClosedReasonType) {
         | 
| 783 1356 | 
             
              /**
         | 
| 784 1357 | 
             
               * A completed consultation
         | 
| @@ -787,28 +1360,35 @@ var ClosedReasonType; | |
| 787 1360 | 
             
              /**
         | 
| 788 1361 | 
             
               * The conclusion was that what the patient submitted was not a disease
         | 
| 789 1362 | 
             
               */
         | 
| 1363 | 
            +
             | 
| 790 1364 | 
             
              ClosedReasonType["NotADisease"] = "NotADisease";
         | 
| 791 1365 | 
             
              /**
         | 
| 792 1366 | 
             
               * The consultation was not appropriate for virtual
         | 
| 793 1367 | 
             
               */
         | 
| 1368 | 
            +
             | 
| 794 1369 | 
             
              ClosedReasonType["NotAppropriateForVirtual"] = "NotAppropriateForVirtual";
         | 
| 795 1370 | 
             
              /**
         | 
| 796 1371 | 
             
               * Any other reason why the consultation was closed
         | 
| 797 1372 | 
             
               */
         | 
| 1373 | 
            +
             | 
| 798 1374 | 
             
              ClosedReasonType["Other"] = "Other";
         | 
| 799 1375 | 
             
              /**
         | 
| 800 1376 | 
             
               * A consultation that is required to be done in person
         | 
| 801 1377 | 
             
               */
         | 
| 1378 | 
            +
             | 
| 802 1379 | 
             
              ClosedReasonType["RequiresInPerson"] = "RequiresInPerson";
         | 
| 803 1380 | 
             
            })(ClosedReasonType || (ClosedReasonType = {}));
         | 
| 804 1381 |  | 
| 805 1382 | 
             
            var VisibilityType;
         | 
| 1383 | 
            +
             | 
| 806 1384 | 
             
            (function (VisibilityType) {
         | 
| 807 1385 | 
             
              VisibilityType["Generic"] = "Generic";
         | 
| 808 1386 | 
             
              VisibilityType["Private"] = "Private";
         | 
| 809 1387 | 
             
              VisibilityType["Instance"] = "Instance";
         | 
| 810 1388 | 
             
            })(VisibilityType || (VisibilityType = {}));
         | 
| 1389 | 
            +
             | 
| 811 1390 | 
             
            var DrugType;
         | 
| 1391 | 
            +
             | 
| 812 1392 | 
             
            (function (DrugType) {
         | 
| 813 1393 | 
             
              DrugType["Generic"] = "Generic";
         | 
| 814 1394 | 
             
              DrugType["Instance"] = "Instance";
         | 
| @@ -817,12 +1397,17 @@ var DrugType; | |
| 817 1397 | 
             
             * Status of the prescription
         | 
| 818 1398 | 
             
             * Right now, it only serves a soft delete flag
         | 
| 819 1399 | 
             
             */
         | 
| 1400 | 
            +
             | 
| 1401 | 
            +
             | 
| 820 1402 | 
             
            var PrescriptionStatus;
         | 
| 1403 | 
            +
             | 
| 821 1404 | 
             
            (function (PrescriptionStatus) {
         | 
| 822 1405 | 
             
              PrescriptionStatus["Existing"] = "Existing";
         | 
| 823 1406 | 
             
              PrescriptionStatus["Deleted"] = "Deleted";
         | 
| 824 1407 | 
             
            })(PrescriptionStatus || (PrescriptionStatus = {}));
         | 
| 1408 | 
            +
             | 
| 825 1409 | 
             
            var PlanStatus;
         | 
| 1410 | 
            +
             | 
| 826 1411 | 
             
            (function (PlanStatus) {
         | 
| 827 1412 | 
             
              PlanStatus["Pending"] = "Pending";
         | 
| 828 1413 | 
             
              PlanStatus["Accepted"] = "Accepted";
         | 
| @@ -832,69 +1417,88 @@ var PlanStatus; | |
| 832 1417 |  | 
| 833 1418 | 
             
            var AuthenticationFailed = /*#__PURE__*/function (_Error) {
         | 
| 834 1419 | 
             
              _inheritsLoose(AuthenticationFailed, _Error);
         | 
| 1420 | 
            +
             | 
| 835 1421 | 
             
              function AuthenticationFailed() {
         | 
| 836 1422 | 
             
                return _Error.apply(this, arguments) || this;
         | 
| 837 1423 | 
             
              }
         | 
| 1424 | 
            +
             | 
| 838 1425 | 
             
              return AuthenticationFailed;
         | 
| 839 1426 | 
             
            }( /*#__PURE__*/_wrapNativeSuper(Error));
         | 
| 840 1427 | 
             
            var AuthenticationBadRequest = /*#__PURE__*/function (_Error2) {
         | 
| 841 1428 | 
             
              _inheritsLoose(AuthenticationBadRequest, _Error2);
         | 
| 1429 | 
            +
             | 
| 842 1430 | 
             
              function AuthenticationBadRequest() {
         | 
| 843 1431 | 
             
                return _Error2.apply(this, arguments) || this;
         | 
| 844 1432 | 
             
              }
         | 
| 1433 | 
            +
             | 
| 845 1434 | 
             
              return AuthenticationBadRequest;
         | 
| 846 1435 | 
             
            }( /*#__PURE__*/_wrapNativeSuper(Error));
         | 
| 847 1436 | 
             
            var AuthenticationServerError = /*#__PURE__*/function (_Error3) {
         | 
| 848 1437 | 
             
              _inheritsLoose(AuthenticationServerError, _Error3);
         | 
| 1438 | 
            +
             | 
| 849 1439 | 
             
              function AuthenticationServerError() {
         | 
| 850 1440 | 
             
                return _Error3.apply(this, arguments) || this;
         | 
| 851 1441 | 
             
              }
         | 
| 1442 | 
            +
             | 
| 852 1443 | 
             
              return AuthenticationServerError;
         | 
| 853 1444 | 
             
            }( /*#__PURE__*/_wrapNativeSuper(Error));
         | 
| 854 1445 | 
             
            var AuthenticationUnconfirmedEmail = /*#__PURE__*/function (_Error4) {
         | 
| 855 1446 | 
             
              _inheritsLoose(AuthenticationUnconfirmedEmail, _Error4);
         | 
| 1447 | 
            +
             | 
| 856 1448 | 
             
              function AuthenticationUnconfirmedEmail() {
         | 
| 857 1449 | 
             
                return _Error4.apply(this, arguments) || this;
         | 
| 858 1450 | 
             
              }
         | 
| 1451 | 
            +
             | 
| 859 1452 | 
             
              return AuthenticationUnconfirmedEmail;
         | 
| 860 1453 | 
             
            }( /*#__PURE__*/_wrapNativeSuper(Error));
         | 
| 861 1454 | 
             
            var IdentityCreationFailed = /*#__PURE__*/function (_Error5) {
         | 
| 862 1455 | 
             
              _inheritsLoose(IdentityCreationFailed, _Error5);
         | 
| 1456 | 
            +
             | 
| 863 1457 | 
             
              function IdentityCreationFailed() {
         | 
| 864 1458 | 
             
                return _Error5.apply(this, arguments) || this;
         | 
| 865 1459 | 
             
              }
         | 
| 1460 | 
            +
             | 
| 866 1461 | 
             
              return IdentityCreationFailed;
         | 
| 867 1462 | 
             
            }( /*#__PURE__*/_wrapNativeSuper(Error));
         | 
| 868 1463 | 
             
            var IdentityCreationBadRequest = /*#__PURE__*/function (_Error6) {
         | 
| 869 1464 | 
             
              _inheritsLoose(IdentityCreationBadRequest, _Error6);
         | 
| 1465 | 
            +
             | 
| 870 1466 | 
             
              function IdentityCreationBadRequest() {
         | 
| 871 1467 | 
             
                return _Error6.apply(this, arguments) || this;
         | 
| 872 1468 | 
             
              }
         | 
| 1469 | 
            +
             | 
| 873 1470 | 
             
              return IdentityCreationBadRequest;
         | 
| 874 1471 | 
             
            }( /*#__PURE__*/_wrapNativeSuper(Error));
         | 
| 875 1472 | 
             
            var IdentityCreationConflict = /*#__PURE__*/function (_Error7) {
         | 
| 876 1473 | 
             
              _inheritsLoose(IdentityCreationConflict, _Error7);
         | 
| 1474 | 
            +
             | 
| 877 1475 | 
             
              function IdentityCreationConflict() {
         | 
| 878 1476 | 
             
                return _Error7.apply(this, arguments) || this;
         | 
| 879 1477 | 
             
              }
         | 
| 1478 | 
            +
             | 
| 880 1479 | 
             
              return IdentityCreationConflict;
         | 
| 881 1480 | 
             
            }( /*#__PURE__*/_wrapNativeSuper(Error));
         | 
| 882 1481 | 
             
            var VaultDataMissing = /*#__PURE__*/function (_Error8) {
         | 
| 883 1482 | 
             
              _inheritsLoose(VaultDataMissing, _Error8);
         | 
| 1483 | 
            +
             | 
| 884 1484 | 
             
              function VaultDataMissing() {
         | 
| 885 1485 | 
             
                return _Error8.apply(this, arguments) || this;
         | 
| 886 1486 | 
             
              }
         | 
| 1487 | 
            +
             | 
| 887 1488 | 
             
              return VaultDataMissing;
         | 
| 888 1489 | 
             
            }( /*#__PURE__*/_wrapNativeSuper(Error));
         | 
| 889 1490 |  | 
| 890 1491 | 
             
            var WorkflowType;
         | 
| 1492 | 
            +
             | 
| 891 1493 | 
             
            (function (WorkflowType) {
         | 
| 892 1494 | 
             
              WorkflowType["Onboard"] = "Onboard";
         | 
| 893 1495 | 
             
              WorkflowType["Followup"] = "Followup";
         | 
| 894 1496 | 
             
              WorkflowType["Renew"] = "Renew";
         | 
| 895 1497 | 
             
              WorkflowType["DataRetrieve"] = "DataRetrieve";
         | 
| 896 1498 | 
             
            })(WorkflowType || (WorkflowType = {}));
         | 
| 1499 | 
            +
             | 
| 897 1500 | 
             
            var RateDimension;
         | 
| 1501 | 
            +
             | 
| 898 1502 | 
             
            (function (RateDimension) {
         | 
| 899 1503 | 
             
              RateDimension["RatioOnTotal"] = "RatioOnTotal";
         | 
| 900 1504 | 
             
              RateDimension["FixedOnTotal"] = "FixedOnTotal";
         | 
| @@ -905,14 +1509,18 @@ var RateDimension; | |
| 905 1509 | 
             
              RateDimension["RatioOnItem"] = "RatioOnItem";
         | 
| 906 1510 | 
             
              RateDimension["FixedOnItem"] = "FixedOnItem";
         | 
| 907 1511 | 
             
            })(RateDimension || (RateDimension = {}));
         | 
| 1512 | 
            +
             | 
| 908 1513 | 
             
            var PlanType;
         | 
| 1514 | 
            +
             | 
| 909 1515 | 
             
            (function (PlanType) {
         | 
| 910 1516 | 
             
              PlanType["Onboard"] = "Onboard";
         | 
| 911 1517 | 
             
              PlanType["Followup"] = "Followup";
         | 
| 912 1518 | 
             
              PlanType["Renew"] = "Renew";
         | 
| 913 1519 | 
             
              PlanType["DataRetrieve"] = "DataRetrieve";
         | 
| 914 1520 | 
             
            })(PlanType || (PlanType = {}));
         | 
| 1521 | 
            +
             | 
| 915 1522 | 
             
            var PaymentStatus;
         | 
| 1523 | 
            +
             | 
| 916 1524 | 
             
            (function (PaymentStatus) {
         | 
| 917 1525 | 
             
              PaymentStatus["Pending"] = "Pending";
         | 
| 918 1526 | 
             
              PaymentStatus["Success"] = "Success";
         | 
| @@ -920,7 +1528,9 @@ var PaymentStatus; | |
| 920 1528 | 
             
              PaymentStatus["Canceled"] = "Canceled";
         | 
| 921 1529 | 
             
              PaymentStatus["SuccessAndDelivered"] = "SuccessAndDelivered";
         | 
| 922 1530 | 
             
            })(PaymentStatus || (PaymentStatus = {}));
         | 
| 1531 | 
            +
             | 
| 923 1532 | 
             
            var PractitionerStatus;
         | 
| 1533 | 
            +
             | 
| 924 1534 | 
             
            (function (PractitionerStatus) {
         | 
| 925 1535 | 
             
              PractitionerStatus["Practicing"] = "Practicing";
         | 
| 926 1536 | 
             
              PractitionerStatus["Retired"] = "Retired";
         | 
| @@ -930,13 +1540,17 @@ var PractitionerStatus; | |
| 930 1540 | 
             
              PractitionerStatus["InConflict"] = "InConflict";
         | 
| 931 1541 | 
             
              PractitionerStatus["Delicensed"] = "Delicensed";
         | 
| 932 1542 | 
             
            })(PractitionerStatus || (PractitionerStatus = {}));
         | 
| 1543 | 
            +
             | 
| 933 1544 | 
             
            var AssignmentStatus;
         | 
| 1545 | 
            +
             | 
| 934 1546 | 
             
            (function (AssignmentStatus) {
         | 
| 935 1547 | 
             
              AssignmentStatus["Assigned"] = "Assigned";
         | 
| 936 1548 | 
             
              AssignmentStatus["Reassigned"] = "Reassigned";
         | 
| 937 1549 | 
             
              AssignmentStatus["Cancelled"] = "Cancelled";
         | 
| 938 1550 | 
             
            })(AssignmentStatus || (AssignmentStatus = {}));
         | 
| 1551 | 
            +
             | 
| 939 1552 | 
             
            var PractitionnerRoleType;
         | 
| 1553 | 
            +
             | 
| 940 1554 | 
             
            (function (PractitionnerRoleType) {
         | 
| 941 1555 | 
             
              PractitionnerRoleType["Doctor"] = "Doctor";
         | 
| 942 1556 | 
             
              PractitionnerRoleType["MedicalAssistant"] = "MedicalAssistant";
         | 
| @@ -948,13 +1562,17 @@ var PractitionnerRoleType; | |
| 948 1562 | 
             
              PractitionnerRoleType["ManualDispatcher"] = "ManualDispatcher";
         | 
| 949 1563 | 
             
              PractitionnerRoleType["Other"] = "Other";
         | 
| 950 1564 | 
             
            })(PractitionnerRoleType || (PractitionnerRoleType = {}));
         | 
| 1565 | 
            +
             | 
| 951 1566 | 
             
            var OtherRoleType;
         | 
| 1567 | 
            +
             | 
| 952 1568 | 
             
            (function (OtherRoleType) {
         | 
| 953 1569 | 
             
              OtherRoleType["Patient"] = "Patient";
         | 
| 954 1570 | 
             
              OtherRoleType["User"] = "User";
         | 
| 955 1571 | 
             
              OtherRoleType["System"] = "System";
         | 
| 956 1572 | 
             
            })(OtherRoleType || (OtherRoleType = {}));
         | 
| 1573 | 
            +
             | 
| 957 1574 | 
             
            var LicenseStatus;
         | 
| 1575 | 
            +
             | 
| 958 1576 | 
             
            (function (LicenseStatus) {
         | 
| 959 1577 | 
             
              LicenseStatus["Valid"] = "Valid";
         | 
| 960 1578 | 
             
              LicenseStatus["Invalid"] = "Invalid";
         | 
| @@ -962,7 +1580,9 @@ var LicenseStatus; | |
| 962 1580 | 
             
              LicenseStatus["NA"] = "NA";
         | 
| 963 1581 | 
             
              LicenseStatus["Removed"] = "Removed";
         | 
| 964 1582 | 
             
            })(LicenseStatus || (LicenseStatus = {}));
         | 
| 1583 | 
            +
             | 
| 965 1584 | 
             
            var PeriodType;
         | 
| 1585 | 
            +
             | 
| 966 1586 | 
             
            (function (PeriodType) {
         | 
| 967 1587 | 
             
              PeriodType["PerYear"] = "PerYear";
         | 
| 968 1588 | 
             
              PeriodType["PerQuarter"] = "PerQuarter";
         | 
| @@ -972,7 +1592,9 @@ var PeriodType; | |
| 972 1592 | 
             
              PeriodType["PerDay"] = "PerDay";
         | 
| 973 1593 | 
             
              PeriodType["PerHour"] = "PerHour";
         | 
| 974 1594 | 
             
            })(PeriodType || (PeriodType = {}));
         | 
| 1595 | 
            +
             | 
| 975 1596 | 
             
            var SyncStatus;
         | 
| 1597 | 
            +
             | 
| 976 1598 | 
             
            (function (SyncStatus) {
         | 
| 977 1599 | 
             
              SyncStatus["Requested"] = "Requested";
         | 
| 978 1600 | 
             
              SyncStatus["Started"] = "Started";
         | 
| @@ -980,7 +1602,9 @@ var SyncStatus; | |
| 980 1602 | 
             
              SyncStatus["Failed"] = "Failed";
         | 
| 981 1603 | 
             
              SyncStatus["Cancelled"] = "Cancelled";
         | 
| 982 1604 | 
             
            })(SyncStatus || (SyncStatus = {}));
         | 
| 1605 | 
            +
             | 
| 983 1606 | 
             
            var PracticeEmailKind;
         | 
| 1607 | 
            +
             | 
| 984 1608 | 
             
            (function (PracticeEmailKind) {
         | 
| 985 1609 | 
             
              PracticeEmailKind["SignedUp"] = "SignedUp";
         | 
| 986 1610 | 
             
              PracticeEmailKind["Onboarded"] = "Onboarded";
         | 
| @@ -1010,7 +1634,10 @@ var PracticeEmailKind; | |
| 1010 1634 | 
             
             * To be extra explicit, if you want to show a functionnality only in one practice, you will have to add a practice configs in all other practice to hide it (yes it is cumbersome).
         | 
| 1011 1635 | 
             
             *
         | 
| 1012 1636 | 
             
             */
         | 
| 1637 | 
            +
             | 
| 1638 | 
            +
             | 
| 1013 1639 | 
             
            var PracticeConfigKind;
         | 
| 1640 | 
            +
             | 
| 1014 1641 | 
             
            (function (PracticeConfigKind) {
         | 
| 1015 1642 | 
             
              PracticeConfigKind["PatientConsultCard"] = "PatientConsultCard";
         | 
| 1016 1643 | 
             
              PracticeConfigKind["PracticeCloseConsultationTypes"] = "PracticeCloseConsultationTypes";
         | 
| @@ -1032,7 +1659,9 @@ var PracticeConfigKind; | |
| 1032 1659 | 
             
              PracticeConfigKind["PracticeDiagnosisAndTreatment"] = "PracticeDiagnosisAndTreatment";
         | 
| 1033 1660 | 
             
              PracticeConfigKind["PracticeInfoLetterDiscount"] = "PracticeInfoLetterDiscount";
         | 
| 1034 1661 | 
             
            })(PracticeConfigKind || (PracticeConfigKind = {}));
         | 
| 1662 | 
            +
             | 
| 1035 1663 | 
             
            var StripePriceType;
         | 
| 1664 | 
            +
             | 
| 1036 1665 | 
             
            (function (StripePriceType) {
         | 
| 1037 1666 | 
             
              StripePriceType["Default"] = "Default";
         | 
| 1038 1667 | 
             
              StripePriceType["Discount"] = "Discount";
         | 
| @@ -1040,19 +1669,25 @@ var StripePriceType; | |
| 1040 1669 | 
             
            /**
         | 
| 1041 1670 | 
             
             * All the PaymentIntentRequestMetadata Kind available
         | 
| 1042 1671 | 
             
             */
         | 
| 1672 | 
            +
             | 
| 1673 | 
            +
             | 
| 1043 1674 | 
             
            var PaymentIntentRequestMetadataKind;
         | 
| 1675 | 
            +
             | 
| 1044 1676 | 
             
            (function (PaymentIntentRequestMetadataKind) {
         | 
| 1045 1677 | 
             
              PaymentIntentRequestMetadataKind["ConsultRequestMetadata"] = "ConsultRequestMetadata";
         | 
| 1046 1678 | 
             
              PaymentIntentRequestMetadataKind["RefillTreatmentRequestMetadata"] = "RefillTreatmentRequestMetadata";
         | 
| 1047 1679 | 
             
            })(PaymentIntentRequestMetadataKind || (PaymentIntentRequestMetadataKind = {}));
         | 
| 1048 1680 |  | 
| 1049 1681 | 
             
            var IndexKey;
         | 
| 1682 | 
            +
             | 
| 1050 1683 | 
             
            (function (IndexKey) {
         | 
| 1051 1684 | 
             
              IndexKey["Consultation"] = "Consultation";
         | 
| 1052 1685 | 
             
              IndexKey["IndexSnapshot"] = "IndexSnapshot";
         | 
| 1053 1686 | 
             
              IndexKey["ConsultationLockbox"] = "ConsultationLockbox";
         | 
| 1054 1687 | 
             
            })(IndexKey || (IndexKey = {}));
         | 
| 1688 | 
            +
             | 
| 1055 1689 | 
             
            var DocumentType;
         | 
| 1690 | 
            +
             | 
| 1056 1691 | 
             
            (function (DocumentType) {
         | 
| 1057 1692 | 
             
              DocumentType["Message"] = "Message";
         | 
| 1058 1693 | 
             
              DocumentType["Note"] = "Note";
         | 
| @@ -1071,6 +1706,7 @@ var DocumentType; | |
| 1071 1706 | 
             
            })(DocumentType || (DocumentType = {}));
         | 
| 1072 1707 |  | 
| 1073 1708 | 
             
            var InputApplyFunctions;
         | 
| 1709 | 
            +
             | 
| 1074 1710 | 
             
            (function (InputApplyFunctions) {
         | 
| 1075 1711 | 
             
              InputApplyFunctions["AllUpperCase"] = "AllUpperCase";
         | 
| 1076 1712 | 
             
              InputApplyFunctions["AllLowerCase"] = "AllLowerCase";
         | 
| @@ -1078,7 +1714,9 @@ var InputApplyFunctions; | |
| 1078 1714 | 
             
              InputApplyFunctions["AllAlphanumeric"] = "AllAlphanumeric";
         | 
| 1079 1715 | 
             
              InputApplyFunctions["NoSpaces"] = "NoSpaces";
         | 
| 1080 1716 | 
             
            })(InputApplyFunctions || (InputApplyFunctions = {}));
         | 
| 1717 | 
            +
             | 
| 1081 1718 | 
             
            var MetadataCategory;
         | 
| 1719 | 
            +
             | 
| 1082 1720 | 
             
            (function (MetadataCategory) {
         | 
| 1083 1721 | 
             
              MetadataCategory["ChildPersonal"] = "ChildPersonal";
         | 
| 1084 1722 | 
             
              MetadataCategory["Consultation"] = "Consultation";
         | 
| @@ -1095,6 +1733,7 @@ var MetadataCategory; | |
| 1095 1733 | 
             
            })(MetadataCategory || (MetadataCategory = {}));
         | 
| 1096 1734 |  | 
| 1097 1735 | 
             
            var IndexKind;
         | 
| 1736 | 
            +
             | 
| 1098 1737 | 
             
            (function (IndexKind) {
         | 
| 1099 1738 | 
             
              IndexKind[IndexKind["consultUuid"] = 0] = "consultUuid";
         | 
| 1100 1739 | 
             
              IndexKind[IndexKind["consultShortid"] = 1] = "consultShortid";
         | 
| @@ -1109,7 +1748,9 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1109 1748 | 
             
                this.api = api;
         | 
| 1110 1749 | 
             
                this.baseURL = baseURL;
         | 
| 1111 1750 | 
             
              }
         | 
| 1751 | 
            +
             | 
| 1112 1752 | 
             
              var _proto = ConsultService.prototype;
         | 
| 1753 | 
            +
             | 
| 1113 1754 | 
             
              _proto.consultCreate = function consultCreate(c) {
         | 
| 1114 1755 | 
             
                return this.api.post(this.baseURL + "/v1/consults", c);
         | 
| 1115 1756 | 
             
              }
         | 
| @@ -1129,7 +1770,9 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1129 1770 | 
             
               * @param filterIsoLocality the of isoLocality to filter with
         | 
| 1130 1771 | 
             
               * @param filterAssignee array of practitioner uuids with which you want to filter the consultations
         | 
| 1131 1772 | 
             
               * @returns a number of consult
         | 
| 1132 | 
            -
                | 
| 1773 | 
            +
               */
         | 
| 1774 | 
            +
              ;
         | 
| 1775 | 
            +
             | 
| 1133 1776 | 
             
              _proto.countConsults = function countConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee, typesConsult, uuidParent) {
         | 
| 1134 1777 | 
             
                return this.api.head(this.baseURL + "/v1/consults", {
         | 
| 1135 1778 | 
             
                  params: {
         | 
| @@ -1153,9 +1796,11 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1153 1796 | 
             
                  if (!resContentRange || typeof resContentRange !== 'string' && typeof resContentRange !== 'number') {
         | 
| 1154 1797 | 
             
                    return 0;
         | 
| 1155 1798 | 
             
                  }
         | 
| 1799 | 
            +
             | 
| 1156 1800 | 
             
                  if (typeof resContentRange === 'number') {
         | 
| 1157 1801 | 
             
                    return resContentRange;
         | 
| 1158 1802 | 
             
                  }
         | 
| 1803 | 
            +
             | 
| 1159 1804 | 
             
                  return parseInt(resContentRange);
         | 
| 1160 1805 | 
             
                });
         | 
| 1161 1806 | 
             
              }
         | 
| @@ -1174,7 +1819,9 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1174 1819 | 
             
               * @param filterCurrentPractitioner the uuid of the current assistant assigned to filter with
         | 
| 1175 1820 | 
             
               * @param filterIsoLocality the of isoLocality to filter with
         | 
| 1176 1821 | 
             
               * @returns a list of consult
         | 
| 1177 | 
            -
                | 
| 1822 | 
            +
               */
         | 
| 1823 | 
            +
              ;
         | 
| 1824 | 
            +
             | 
| 1178 1825 | 
             
              _proto.getConsults = function getConsults(uuidPractice, uuidRequester, statusesMedical, statusesExclude, shortId, columnToSortTo, orderToSortTo, perPage, indexPage, filterAssignedDoctor, filterCurrentPractitioner, filterIsoLocality, filterAssignee, uuidParent, typesConsult) {
         | 
| 1179 1826 | 
             
                return this.api.get(this.baseURL + "/v1/consults", {
         | 
| 1180 1827 | 
             
                  params: {
         | 
| @@ -1196,6 +1843,7 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1196 1843 | 
             
                  }
         | 
| 1197 1844 | 
             
                });
         | 
| 1198 1845 | 
             
              };
         | 
| 1846 | 
            +
             | 
| 1199 1847 | 
             
              _proto.getConsultByUUID = function getConsultByUUID(uuidConsult, uuidPractice) {
         | 
| 1200 1848 | 
             
                return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult, {
         | 
| 1201 1849 | 
             
                  params: {
         | 
| @@ -1203,6 +1851,7 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1203 1851 | 
             
                  }
         | 
| 1204 1852 | 
             
                });
         | 
| 1205 1853 | 
             
              };
         | 
| 1854 | 
            +
             | 
| 1206 1855 | 
             
              _proto.getConsultByPracticePaymentID = function getConsultByPracticePaymentID(idPracticePayment, uuidPractice) {
         | 
| 1207 1856 | 
             
                return this.api.get(this.baseURL + "/v1/consults/payment-" + idPracticePayment, {
         | 
| 1208 1857 | 
             
                  params: {
         | 
| @@ -1210,6 +1859,7 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1210 1859 | 
             
                  }
         | 
| 1211 1860 | 
             
                });
         | 
| 1212 1861 | 
             
              };
         | 
| 1862 | 
            +
             | 
| 1213 1863 | 
             
              _proto.updateConsultByUUID = function updateConsultByUUID(uuidConsult, consult, uuidPractice, uuidRequester) {
         | 
| 1214 1864 | 
             
                return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, consult, {
         | 
| 1215 1865 | 
             
                  params: {
         | 
| @@ -1218,6 +1868,7 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1218 1868 | 
             
                  }
         | 
| 1219 1869 | 
             
                });
         | 
| 1220 1870 | 
             
              };
         | 
| 1871 | 
            +
             | 
| 1221 1872 | 
             
              _proto.getConsultFaxStatuses = function getConsultFaxStatuses(uuidConsult) {
         | 
| 1222 1873 | 
             
                return this.api.get(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", {
         | 
| 1223 1874 | 
             
                  params: {
         | 
| @@ -1225,52 +1876,64 @@ var ConsultService = /*#__PURE__*/function () { | |
| 1225 1876 | 
             
                  }
         | 
| 1226 1877 | 
             
                });
         | 
| 1227 1878 | 
             
              };
         | 
| 1228 | 
            -
             | 
| 1229 | 
            -
              // numTry ?: number,
         | 
| 1879 | 
            +
             | 
| 1880 | 
            +
              _proto.postConsultTransmission = function postConsultTransmission(uuidConsult, nameDriver, addressOrPhoneToSendTo, file, nameReceiver, txtTransmissionTitle, txtTransmissionNotes // numTry ?: number,
         | 
| 1230 1881 | 
             
              // delay ?: number,
         | 
| 1231 1882 | 
             
              ) {
         | 
| 1232 1883 | 
             
                if (nameDriver === void 0) {
         | 
| 1233 1884 | 
             
                  nameDriver = 'Documo';
         | 
| 1234 1885 | 
             
                }
         | 
| 1886 | 
            +
             | 
| 1235 1887 | 
             
                var data = new FormData();
         | 
| 1236 1888 | 
             
                data.append('nameDriverReceiver', nameDriver);
         | 
| 1889 | 
            +
             | 
| 1237 1890 | 
             
                if (addressOrPhoneToSendTo) {
         | 
| 1238 1891 | 
             
                  data.append('addressReceiver', addressOrPhoneToSendTo);
         | 
| 1239 1892 | 
             
                }
         | 
| 1893 | 
            +
             | 
| 1240 1894 | 
             
                if (file) {
         | 
| 1241 1895 | 
             
                  data.append('file', file);
         | 
| 1242 1896 | 
             
                }
         | 
| 1897 | 
            +
             | 
| 1243 1898 | 
             
                if (nameReceiver) {
         | 
| 1244 1899 | 
             
                  data.append('nameReceiver', nameReceiver);
         | 
| 1245 1900 | 
             
                }
         | 
| 1901 | 
            +
             | 
| 1246 1902 | 
             
                if (txtTransmissionTitle) {
         | 
| 1247 1903 | 
             
                  data.append('txtTransmissionTitle', txtTransmissionTitle);
         | 
| 1248 1904 | 
             
                }
         | 
| 1905 | 
            +
             | 
| 1249 1906 | 
             
                if (txtTransmissionNotes) {
         | 
| 1250 1907 | 
             
                  data.append('txtTransmissionNotes', txtTransmissionNotes);
         | 
| 1251 1908 | 
             
                }
         | 
| 1909 | 
            +
             | 
| 1252 1910 | 
             
                return this.api.post(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions", data, {
         | 
| 1253 1911 | 
             
                  headers: {
         | 
| 1254 1912 | 
             
                    'Content-Type': 'multipart/form-data;'
         | 
| 1255 1913 | 
             
                  }
         | 
| 1256 1914 | 
             
                });
         | 
| 1257 1915 | 
             
              };
         | 
| 1916 | 
            +
             | 
| 1258 1917 | 
             
              _proto.postConsultFax = function postConsultFax(uuidConsult, addressReceiver, file) {
         | 
| 1259 1918 | 
             
                return this.postConsultTransmission(uuidConsult, 'Documo', addressReceiver, file);
         | 
| 1260 1919 | 
             
              };
         | 
| 1920 | 
            +
             | 
| 1261 1921 | 
             
              _proto.postConsultEmail = function postConsultEmail(uuidConsult, file) {
         | 
| 1262 1922 | 
             
                return this.postConsultTransmission(uuidConsult, 'Pharmacierge', undefined, file);
         | 
| 1263 1923 | 
             
              };
         | 
| 1924 | 
            +
             | 
| 1264 1925 | 
             
              _proto.retryConsultFax = function retryConsultFax(uuidConsult, transmissionId) {
         | 
| 1265 1926 | 
             
                return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
         | 
| 1266 1927 | 
             
                  status: TransmissionStatus.Retrying
         | 
| 1267 1928 | 
             
                });
         | 
| 1268 1929 | 
             
              };
         | 
| 1930 | 
            +
             | 
| 1269 1931 | 
             
              _proto.updateConsultTransmissionStatus = function updateConsultTransmissionStatus(transmissionId, uuidConsult, newStatus) {
         | 
| 1270 1932 | 
             
                return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult + "/transmissions/" + transmissionId, {
         | 
| 1271 1933 | 
             
                  status: newStatus
         | 
| 1272 1934 | 
             
                });
         | 
| 1273 1935 | 
             
              };
         | 
| 1936 | 
            +
             | 
| 1274 1937 | 
             
              return ConsultService;
         | 
| 1275 1938 | 
             
            }();
         | 
| 1276 1939 |  | 
| @@ -1279,7 +1942,9 @@ var DiagnosisService = /*#__PURE__*/function () { | |
| 1279 1942 | 
             
                this.api = api;
         | 
| 1280 1943 | 
             
                this.baseURL = baseURL;
         | 
| 1281 1944 | 
             
              }
         | 
| 1945 | 
            +
             | 
| 1282 1946 | 
             
              var _proto = DiagnosisService.prototype;
         | 
| 1947 | 
            +
             | 
| 1283 1948 | 
             
              _proto.getDiagnoses = function getDiagnoses() {
         | 
| 1284 1949 | 
             
                return this.api.get(this.baseURL + "/v1/diagnoses");
         | 
| 1285 1950 | 
             
              }
         | 
| @@ -1287,16 +1952,25 @@ var DiagnosisService = /*#__PURE__*/function () { | |
| 1287 1952 | 
             
               * Get a diagnosis by uuid that belongs to your practice
         | 
| 1288 1953 | 
             
               * @param uuidDiagnosis the uuid of the diagnosis
         | 
| 1289 1954 | 
             
               * @returns a diagnosis
         | 
| 1290 | 
            -
                | 
| 1955 | 
            +
               */
         | 
| 1956 | 
            +
              ;
         | 
| 1957 | 
            +
             | 
| 1291 1958 | 
             
              _proto.getDiagnosisByUuid = function getDiagnosisByUuid(uuidDiagnosis) {
         | 
| 1292 1959 | 
             
                return this.api.get(this.baseURL + "/v1/diagnoses/" + uuidDiagnosis);
         | 
| 1293 1960 | 
             
              };
         | 
| 1961 | 
            +
             | 
| 1294 1962 | 
             
              _proto.createDiagnosis = function createDiagnosis(diagnosis) {
         | 
| 1295 1963 | 
             
                return this.api.post(this.baseURL + "/v1/diagnoses", diagnosis);
         | 
| 1296 1964 | 
             
              };
         | 
| 1965 | 
            +
             | 
| 1297 1966 | 
             
              _proto.updateDiagnosis = function updateDiagnosis(uuid, diagnosis) {
         | 
| 1298 1967 | 
             
                return this.api.put(this.baseURL + "/v1/diagnoses/" + uuid, diagnosis);
         | 
| 1299 1968 | 
             
              };
         | 
| 1969 | 
            +
             | 
| 1970 | 
            +
              _proto.getTreatmentByUuid = function getTreatmentByUuid(uuidDiagnosis, uuidTreatment) {
         | 
| 1971 | 
            +
                return this.api.get(this.baseURL + "/v1/diagnoses/" + uuidDiagnosis + "/treatments/" + uuidTreatment);
         | 
| 1972 | 
            +
              };
         | 
| 1973 | 
            +
             | 
| 1300 1974 | 
             
              _proto.getTreatmentsFromDiagnosisUuid = function getTreatmentsFromDiagnosisUuid(diagnosisUuid) {
         | 
| 1301 1975 | 
             
                return this.api.get(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments");
         | 
| 1302 1976 | 
             
              }
         | 
| @@ -1304,7 +1978,9 @@ var DiagnosisService = /*#__PURE__*/function () { | |
| 1304 1978 | 
             
               * This function returns treatment plans associated to a consult
         | 
| 1305 1979 | 
             
               * @param uuidConsult the consult uuid to fetch
         | 
| 1306 1980 | 
             
               * @returns an array of TreatmentPlan
         | 
| 1307 | 
            -
                | 
| 1981 | 
            +
               */
         | 
| 1982 | 
            +
              ;
         | 
| 1983 | 
            +
             | 
| 1308 1984 | 
             
              _proto.getTreatmentPlansFromConsultUuid = function getTreatmentPlansFromConsultUuid(uuidConsult) {
         | 
| 1309 1985 | 
             
                return this.api.get(this.baseURL + "/v1/treatment-plans/", {
         | 
| 1310 1986 | 
             
                  params: {
         | 
| @@ -1316,7 +1992,9 @@ var DiagnosisService = /*#__PURE__*/function () { | |
| 1316 1992 | 
             
               * creates a new treatment for the specified diagnosis
         | 
| 1317 1993 | 
             
               * @param diagnosisUuid uuid of the diagnosis that the treatment is linked to
         | 
| 1318 1994 | 
             
               * @param treatmentRequest the treatment to be inserted
         | 
| 1319 | 
            -
                | 
| 1995 | 
            +
               */
         | 
| 1996 | 
            +
              ;
         | 
| 1997 | 
            +
             | 
| 1320 1998 | 
             
              _proto.createTreatment = function createTreatment(diagnosisUuid, treatmentRequest) {
         | 
| 1321 1999 | 
             
                return this.api.post(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments", treatmentRequest);
         | 
| 1322 2000 | 
             
              }
         | 
| @@ -1324,7 +2002,9 @@ var DiagnosisService = /*#__PURE__*/function () { | |
| 1324 2002 | 
             
               * This function returns populated treatment plans associated to a consult
         | 
| 1325 2003 | 
             
               * @param uuidConsult the consult uuid to fetch
         | 
| 1326 2004 | 
             
               * @returns a TreatmentPlans object
         | 
| 1327 | 
            -
                | 
| 2005 | 
            +
               */
         | 
| 2006 | 
            +
              ;
         | 
| 2007 | 
            +
             | 
| 1328 2008 | 
             
              _proto.getTreatmentPlansPopulatedFromConsultUuid = function getTreatmentPlansPopulatedFromConsultUuid(uuidConsult) {
         | 
| 1329 2009 | 
             
                return this.api.get(this.baseURL + "/v1/treatment-plans/", {
         | 
| 1330 2010 | 
             
                  params: {
         | 
| @@ -1333,9 +2013,11 @@ var DiagnosisService = /*#__PURE__*/function () { | |
| 1333 2013 | 
             
                  }
         | 
| 1334 2014 | 
             
                });
         | 
| 1335 2015 | 
             
              };
         | 
| 2016 | 
            +
             | 
| 1336 2017 | 
             
              _proto.postPlans = function postPlans(plans) {
         | 
| 1337 2018 | 
             
                return this.api.post(this.baseURL + "/v1/treatment-plans", plans);
         | 
| 1338 2019 | 
             
              };
         | 
| 2020 | 
            +
             | 
| 1339 2021 | 
             
              _proto.updateTreatmentPlan = function updateTreatmentPlan(uuidPlan, uuidConsult, diagnosisRequest, plan, refill) {
         | 
| 1340 2022 | 
             
                return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan, {
         | 
| 1341 2023 | 
             
                  uuidConsult: uuidConsult,
         | 
| @@ -1344,12 +2026,15 @@ var DiagnosisService = /*#__PURE__*/function () { | |
| 1344 2026 | 
             
                  refill: refill
         | 
| 1345 2027 | 
             
                });
         | 
| 1346 2028 | 
             
              };
         | 
| 2029 | 
            +
             | 
| 1347 2030 | 
             
              _proto.setAssociatedConsultsToTreatment = function setAssociatedConsultsToTreatment(diagnosisUuid, treatmentUuid, arrAssociatedConsults) {
         | 
| 1348 2031 | 
             
                return this.api.post(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments/" + treatmentUuid + "/associated-consults", arrAssociatedConsults);
         | 
| 1349 2032 | 
             
              };
         | 
| 2033 | 
            +
             | 
| 1350 2034 | 
             
              _proto.updateAssociatedConsultsToTreatment = function updateAssociatedConsultsToTreatment(diagnosisUuid, treatmentUuid, arrAssociatedConsults) {
         | 
| 1351 2035 | 
             
                return this.api.put(this.baseURL + "/v1/diagnoses/" + diagnosisUuid + "/treatments/" + treatmentUuid + "/associated-consults", arrAssociatedConsults);
         | 
| 1352 2036 | 
             
              };
         | 
| 2037 | 
            +
             | 
| 1353 2038 | 
             
              _proto.acceptTreatmentPlan = function acceptTreatmentPlan(uuidPlan, uuidConsult) {
         | 
| 1354 2039 | 
             
                return this.api.put(this.baseURL + "/v1/treatment-plans/" + uuidPlan + "/accept", {
         | 
| 1355 2040 | 
             
                  uuidConsult: uuidConsult
         | 
| @@ -1358,37 +2043,49 @@ var DiagnosisService = /*#__PURE__*/function () { | |
| 1358 2043 | 
             
              /**
         | 
| 1359 2044 | 
             
               * retrieves all the drugs of the specified practice
         | 
| 1360 2045 | 
             
               * @param uuidPractice
         | 
| 1361 | 
            -
                | 
| 2046 | 
            +
               */
         | 
| 2047 | 
            +
              ;
         | 
| 2048 | 
            +
             | 
| 1362 2049 | 
             
              _proto.getAllDrugs =
         | 
| 1363 2050 | 
             
              /*#__PURE__*/
         | 
| 1364 2051 | 
             
              function () {
         | 
| 1365 | 
            -
                var _getAllDrugs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2052 | 
            +
                var _getAllDrugs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(uuidPractice) {
         | 
| 1366 2053 | 
             
                  var res;
         | 
| 1367 | 
            -
                  return  | 
| 1368 | 
            -
                    while (1)  | 
| 1369 | 
            -
                       | 
| 1370 | 
            -
                         | 
| 1371 | 
            -
             | 
| 1372 | 
            -
             | 
| 1373 | 
            -
             | 
| 1374 | 
            -
                         | 
| 1375 | 
            -
                           | 
| 1376 | 
            -
             | 
| 1377 | 
            -
             | 
| 1378 | 
            -
             | 
| 1379 | 
            -
             | 
| 1380 | 
            -
             | 
| 1381 | 
            -
             | 
| 1382 | 
            -
             | 
| 1383 | 
            -
             | 
| 2054 | 
            +
                  return runtime_1.wrap(function _callee$(_context) {
         | 
| 2055 | 
            +
                    while (1) {
         | 
| 2056 | 
            +
                      switch (_context.prev = _context.next) {
         | 
| 2057 | 
            +
                        case 0:
         | 
| 2058 | 
            +
                          _context.next = 2;
         | 
| 2059 | 
            +
                          return this.api.get(this.baseURL + "/v1/drugs/practice/" + uuidPractice);
         | 
| 2060 | 
            +
             | 
| 2061 | 
            +
                        case 2:
         | 
| 2062 | 
            +
                          res = _context.sent;
         | 
| 2063 | 
            +
             | 
| 2064 | 
            +
                          if (!(res && res.foundDrugs)) {
         | 
| 2065 | 
            +
                            _context.next = 5;
         | 
| 2066 | 
            +
                            break;
         | 
| 2067 | 
            +
                          }
         | 
| 2068 | 
            +
             | 
| 2069 | 
            +
                          return _context.abrupt("return", res.foundDrugs);
         | 
| 2070 | 
            +
             | 
| 2071 | 
            +
                        case 5:
         | 
| 2072 | 
            +
                          return _context.abrupt("return", undefined);
         | 
| 2073 | 
            +
             | 
| 2074 | 
            +
                        case 6:
         | 
| 2075 | 
            +
                        case "end":
         | 
| 2076 | 
            +
                          return _context.stop();
         | 
| 2077 | 
            +
                      }
         | 
| 1384 2078 | 
             
                    }
         | 
| 1385 2079 | 
             
                  }, _callee, this);
         | 
| 1386 2080 | 
             
                }));
         | 
| 2081 | 
            +
             | 
| 1387 2082 | 
             
                function getAllDrugs(_x) {
         | 
| 1388 2083 | 
             
                  return _getAllDrugs.apply(this, arguments);
         | 
| 1389 2084 | 
             
                }
         | 
| 2085 | 
            +
             | 
| 1390 2086 | 
             
                return getAllDrugs;
         | 
| 1391 2087 | 
             
              }();
         | 
| 2088 | 
            +
             | 
| 1392 2089 | 
             
              return DiagnosisService;
         | 
| 1393 2090 | 
             
            }();
         | 
| 1394 2091 |  | 
| @@ -1397,6 +2094,7 @@ var GuardService = /*#__PURE__*/function () { | |
| 1397 2094 | 
             
                this.api = api;
         | 
| 1398 2095 | 
             
                this.baseURL = baseURL;
         | 
| 1399 2096 | 
             
                this.api.setAuthRefreshFn(this.authRefresh.bind(this)); // This is the default behavior for User JWT tokens. If you want other kind of refresh you shall overwrite this call
         | 
| 2097 | 
            +
             | 
| 1400 2098 | 
             
                this.identityCache = {};
         | 
| 1401 2099 | 
             
                this.whoAmICache = {};
         | 
| 1402 2100 | 
             
              }
         | 
| @@ -1411,7 +2109,10 @@ var GuardService = /*#__PURE__*/function () { | |
| 1411 2109 | 
             
               * ```
         | 
| 1412 2110 | 
             
               * @param tokens
         | 
| 1413 2111 | 
             
               */
         | 
| 2112 | 
            +
             | 
| 2113 | 
            +
             | 
| 1414 2114 | 
             
              var _proto = GuardService.prototype;
         | 
| 2115 | 
            +
             | 
| 1415 2116 | 
             
              _proto.setTokens = function setTokens(tokens) {
         | 
| 1416 2117 | 
             
                this.api.setTokens(_extends({}, this.api.getTokens(), tokens));
         | 
| 1417 2118 | 
             
              }
         | 
| @@ -1420,59 +2121,76 @@ var GuardService = /*#__PURE__*/function () { | |
| 1420 2121 | 
             
               *
         | 
| 1421 2122 | 
             
               * @param req The credentials required to get an access token
         | 
| 1422 2123 | 
             
               * @returns AuthTokenResponse
         | 
| 1423 | 
            -
                | 
| 2124 | 
            +
               */
         | 
| 2125 | 
            +
              ;
         | 
| 2126 | 
            +
             | 
| 1424 2127 | 
             
              _proto.m2mToken =
         | 
| 1425 2128 | 
             
              /*#__PURE__*/
         | 
| 1426 2129 | 
             
              function () {
         | 
| 1427 | 
            -
                var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2130 | 
            +
                var _m2mToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(req) {
         | 
| 1428 2131 | 
             
                  var resp, config, _e$response, code;
         | 
| 1429 | 
            -
             | 
| 1430 | 
            -
             | 
| 1431 | 
            -
             | 
| 1432 | 
            -
             | 
| 1433 | 
            -
                         | 
| 1434 | 
            -
                           | 
| 1435 | 
            -
             | 
| 1436 | 
            -
             | 
| 1437 | 
            -
             | 
| 1438 | 
            -
             | 
| 1439 | 
            -
             | 
| 1440 | 
            -
             | 
| 1441 | 
            -
             | 
| 1442 | 
            -
             | 
| 1443 | 
            -
             | 
| 1444 | 
            -
             | 
| 1445 | 
            -
             | 
| 1446 | 
            -
             | 
| 1447 | 
            -
                        _context.t0 = _context["catch"](0);
         | 
| 1448 | 
            -
                        console.error('Error while posting m2m token:', _context.t0);
         | 
| 1449 | 
            -
                        if (!_context.t0.isAxiosError) {
         | 
| 1450 | 
            -
                          _context.next = 19;
         | 
| 2132 | 
            +
             | 
| 2133 | 
            +
                  return runtime_1.wrap(function _callee$(_context) {
         | 
| 2134 | 
            +
                    while (1) {
         | 
| 2135 | 
            +
                      switch (_context.prev = _context.next) {
         | 
| 2136 | 
            +
                        case 0:
         | 
| 2137 | 
            +
                          _context.prev = 0;
         | 
| 2138 | 
            +
                          config = {
         | 
| 2139 | 
            +
                            skipAuthRefresh: true
         | 
| 2140 | 
            +
                          };
         | 
| 2141 | 
            +
                          _context.next = 4;
         | 
| 2142 | 
            +
                          return this.api.post(this.baseURL + "/v1/m2m/token", req, config);
         | 
| 2143 | 
            +
             | 
| 2144 | 
            +
                        case 4:
         | 
| 2145 | 
            +
                          resp = _context.sent;
         | 
| 2146 | 
            +
                          this.api.setTokens({
         | 
| 2147 | 
            +
                            accessToken: resp.accessToken
         | 
| 2148 | 
            +
                          });
         | 
| 2149 | 
            +
                          _context.next = 20;
         | 
| 1451 2150 | 
             
                          break;
         | 
| 1452 | 
            -
             | 
| 1453 | 
            -
                         | 
| 1454 | 
            -
             | 
| 1455 | 
            -
             | 
| 1456 | 
            -
             | 
| 1457 | 
            -
             | 
| 1458 | 
            -
             | 
| 1459 | 
            -
             | 
| 1460 | 
            -
             | 
| 1461 | 
            -
             | 
| 1462 | 
            -
             | 
| 1463 | 
            -
             | 
| 1464 | 
            -
             | 
| 1465 | 
            -
             | 
| 1466 | 
            -
             | 
| 1467 | 
            -
             | 
| 1468 | 
            -
             | 
| 1469 | 
            -
             | 
| 2151 | 
            +
             | 
| 2152 | 
            +
                        case 8:
         | 
| 2153 | 
            +
                          _context.prev = 8;
         | 
| 2154 | 
            +
                          _context.t0 = _context["catch"](0);
         | 
| 2155 | 
            +
                          console.error('Error while posting m2m token:', _context.t0);
         | 
| 2156 | 
            +
             | 
| 2157 | 
            +
                          if (!_context.t0.isAxiosError) {
         | 
| 2158 | 
            +
                            _context.next = 19;
         | 
| 2159 | 
            +
                            break;
         | 
| 2160 | 
            +
                          }
         | 
| 2161 | 
            +
             | 
| 2162 | 
            +
                          code = (_e$response = _context.t0.response) == null ? void 0 : _e$response.status;
         | 
| 2163 | 
            +
                          _context.t1 = code;
         | 
| 2164 | 
            +
                          _context.next = _context.t1 === 400 ? 16 : _context.t1 === 500 ? 17 : _context.t1 === 401 ? 18 : 18;
         | 
| 2165 | 
            +
                          break;
         | 
| 2166 | 
            +
             | 
| 2167 | 
            +
                        case 16:
         | 
| 2168 | 
            +
                          throw new AuthenticationBadRequest();
         | 
| 2169 | 
            +
             | 
| 2170 | 
            +
                        case 17:
         | 
| 2171 | 
            +
                          throw new AuthenticationServerError();
         | 
| 2172 | 
            +
             | 
| 2173 | 
            +
                        case 18:
         | 
| 2174 | 
            +
                          throw new AuthenticationFailed();
         | 
| 2175 | 
            +
             | 
| 2176 | 
            +
                        case 19:
         | 
| 2177 | 
            +
                          throw new AuthenticationFailed();
         | 
| 2178 | 
            +
             | 
| 2179 | 
            +
                        case 20:
         | 
| 2180 | 
            +
                          return _context.abrupt("return", resp);
         | 
| 2181 | 
            +
             | 
| 2182 | 
            +
                        case 21:
         | 
| 2183 | 
            +
                        case "end":
         | 
| 2184 | 
            +
                          return _context.stop();
         | 
| 2185 | 
            +
                      }
         | 
| 1470 2186 | 
             
                    }
         | 
| 1471 2187 | 
             
                  }, _callee, this, [[0, 8]]);
         | 
| 1472 2188 | 
             
                }));
         | 
| 2189 | 
            +
             | 
| 1473 2190 | 
             
                function m2mToken(_x) {
         | 
| 1474 2191 | 
             
                  return _m2mToken.apply(this, arguments);
         | 
| 1475 2192 | 
             
                }
         | 
| 2193 | 
            +
             | 
| 1476 2194 | 
             
                return m2mToken;
         | 
| 1477 2195 | 
             
              }()
         | 
| 1478 2196 | 
             
              /**
         | 
| @@ -1483,61 +2201,78 @@ var GuardService = /*#__PURE__*/function () { | |
| 1483 2201 | 
             
               * @returns AuthTokenResponse
         | 
| 1484 2202 | 
             
               */
         | 
| 1485 2203 | 
             
              ;
         | 
| 2204 | 
            +
             | 
| 1486 2205 | 
             
              _proto.authToken =
         | 
| 1487 2206 | 
             
              /*#__PURE__*/
         | 
| 1488 2207 | 
             
              function () {
         | 
| 1489 | 
            -
                var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2208 | 
            +
                var _authToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(req) {
         | 
| 1490 2209 | 
             
                  var resp, config, _e$response2, code;
         | 
| 1491 | 
            -
             | 
| 1492 | 
            -
             | 
| 1493 | 
            -
             | 
| 1494 | 
            -
             | 
| 1495 | 
            -
                         | 
| 1496 | 
            -
                           | 
| 1497 | 
            -
             | 
| 1498 | 
            -
             | 
| 1499 | 
            -
             | 
| 1500 | 
            -
             | 
| 1501 | 
            -
             | 
| 1502 | 
            -
             | 
| 1503 | 
            -
             | 
| 1504 | 
            -
                           | 
| 1505 | 
            -
             | 
| 1506 | 
            -
             | 
| 1507 | 
            -
             | 
| 1508 | 
            -
             | 
| 1509 | 
            -
             | 
| 1510 | 
            -
                        _context2.t0 = _context2["catch"](0);
         | 
| 1511 | 
            -
                        console.error('Error while posting auth token:', _context2.t0);
         | 
| 1512 | 
            -
                        if (!_context2.t0.isAxiosError) {
         | 
| 1513 | 
            -
                          _context2.next = 20;
         | 
| 2210 | 
            +
             | 
| 2211 | 
            +
                  return runtime_1.wrap(function _callee2$(_context2) {
         | 
| 2212 | 
            +
                    while (1) {
         | 
| 2213 | 
            +
                      switch (_context2.prev = _context2.next) {
         | 
| 2214 | 
            +
                        case 0:
         | 
| 2215 | 
            +
                          _context2.prev = 0;
         | 
| 2216 | 
            +
                          config = {
         | 
| 2217 | 
            +
                            skipAuthRefresh: true
         | 
| 2218 | 
            +
                          };
         | 
| 2219 | 
            +
                          _context2.next = 4;
         | 
| 2220 | 
            +
                          return this.api.post(this.baseURL + "/v1/auth/token", req, config);
         | 
| 2221 | 
            +
             | 
| 2222 | 
            +
                        case 4:
         | 
| 2223 | 
            +
                          resp = _context2.sent;
         | 
| 2224 | 
            +
                          this.api.setTokens({
         | 
| 2225 | 
            +
                            accessToken: resp.accessToken,
         | 
| 2226 | 
            +
                            refreshToken: resp.refreshToken
         | 
| 2227 | 
            +
                          });
         | 
| 2228 | 
            +
                          _context2.next = 21;
         | 
| 1514 2229 | 
             
                          break;
         | 
| 1515 | 
            -
             | 
| 1516 | 
            -
                         | 
| 1517 | 
            -
             | 
| 1518 | 
            -
             | 
| 1519 | 
            -
             | 
| 1520 | 
            -
             | 
| 1521 | 
            -
             | 
| 1522 | 
            -
             | 
| 1523 | 
            -
             | 
| 1524 | 
            -
             | 
| 1525 | 
            -
             | 
| 1526 | 
            -
             | 
| 1527 | 
            -
             | 
| 1528 | 
            -
             | 
| 1529 | 
            -
             | 
| 1530 | 
            -
             | 
| 1531 | 
            -
                         | 
| 1532 | 
            -
             | 
| 1533 | 
            -
             | 
| 1534 | 
            -
                         | 
| 2230 | 
            +
             | 
| 2231 | 
            +
                        case 8:
         | 
| 2232 | 
            +
                          _context2.prev = 8;
         | 
| 2233 | 
            +
                          _context2.t0 = _context2["catch"](0);
         | 
| 2234 | 
            +
                          console.error('Error while posting auth token:', _context2.t0);
         | 
| 2235 | 
            +
             | 
| 2236 | 
            +
                          if (!_context2.t0.isAxiosError) {
         | 
| 2237 | 
            +
                            _context2.next = 20;
         | 
| 2238 | 
            +
                            break;
         | 
| 2239 | 
            +
                          }
         | 
| 2240 | 
            +
             | 
| 2241 | 
            +
                          code = (_e$response2 = _context2.t0.response) == null ? void 0 : _e$response2.status;
         | 
| 2242 | 
            +
                          _context2.t1 = code;
         | 
| 2243 | 
            +
                          _context2.next = _context2.t1 === 400 ? 16 : _context2.t1 === 424 ? 17 : _context2.t1 === 500 ? 18 : _context2.t1 === 401 ? 19 : 19;
         | 
| 2244 | 
            +
                          break;
         | 
| 2245 | 
            +
             | 
| 2246 | 
            +
                        case 16:
         | 
| 2247 | 
            +
                          throw new AuthenticationBadRequest();
         | 
| 2248 | 
            +
             | 
| 2249 | 
            +
                        case 17:
         | 
| 2250 | 
            +
                          throw new AuthenticationUnconfirmedEmail();
         | 
| 2251 | 
            +
             | 
| 2252 | 
            +
                        case 18:
         | 
| 2253 | 
            +
                          throw new AuthenticationServerError();
         | 
| 2254 | 
            +
             | 
| 2255 | 
            +
                        case 19:
         | 
| 2256 | 
            +
                          throw new AuthenticationFailed();
         | 
| 2257 | 
            +
             | 
| 2258 | 
            +
                        case 20:
         | 
| 2259 | 
            +
                          throw new AuthenticationFailed();
         | 
| 2260 | 
            +
             | 
| 2261 | 
            +
                        case 21:
         | 
| 2262 | 
            +
                          return _context2.abrupt("return", resp);
         | 
| 2263 | 
            +
             | 
| 2264 | 
            +
                        case 22:
         | 
| 2265 | 
            +
                        case "end":
         | 
| 2266 | 
            +
                          return _context2.stop();
         | 
| 2267 | 
            +
                      }
         | 
| 1535 2268 | 
             
                    }
         | 
| 1536 2269 | 
             
                  }, _callee2, this, [[0, 8]]);
         | 
| 1537 2270 | 
             
                }));
         | 
| 2271 | 
            +
             | 
| 1538 2272 | 
             
                function authToken(_x2) {
         | 
| 1539 2273 | 
             
                  return _authToken.apply(this, arguments);
         | 
| 1540 2274 | 
             
                }
         | 
| 2275 | 
            +
             | 
| 1541 2276 | 
             
                return authToken;
         | 
| 1542 2277 | 
             
              }()
         | 
| 1543 2278 | 
             
              /**
         | 
| @@ -1546,28 +2281,34 @@ var GuardService = /*#__PURE__*/function () { | |
| 1546 2281 | 
             
               * @returns AuthTokenResponse
         | 
| 1547 2282 | 
             
               */
         | 
| 1548 2283 | 
             
              ;
         | 
| 2284 | 
            +
             | 
| 1549 2285 | 
             
              _proto.authRefresh =
         | 
| 1550 2286 | 
             
              /*#__PURE__*/
         | 
| 1551 2287 | 
             
              function () {
         | 
| 1552 | 
            -
                var _authRefresh = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2288 | 
            +
                var _authRefresh = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(refreshToken) {
         | 
| 1553 2289 | 
             
                  var config;
         | 
| 1554 | 
            -
                  return  | 
| 1555 | 
            -
                    while (1)  | 
| 1556 | 
            -
                       | 
| 1557 | 
            -
                         | 
| 1558 | 
            -
                           | 
| 1559 | 
            -
             | 
| 1560 | 
            -
             | 
| 1561 | 
            -
             | 
| 1562 | 
            -
             | 
| 1563 | 
            -
             | 
| 1564 | 
            -
                         | 
| 2290 | 
            +
                  return runtime_1.wrap(function _callee3$(_context3) {
         | 
| 2291 | 
            +
                    while (1) {
         | 
| 2292 | 
            +
                      switch (_context3.prev = _context3.next) {
         | 
| 2293 | 
            +
                        case 0:
         | 
| 2294 | 
            +
                          config = {
         | 
| 2295 | 
            +
                            skipAuthRefresh: true,
         | 
| 2296 | 
            +
                            useRefreshToken: true
         | 
| 2297 | 
            +
                          };
         | 
| 2298 | 
            +
                          return _context3.abrupt("return", this.api.put(this.baseURL + "/v1/auth/token", null, config));
         | 
| 2299 | 
            +
             | 
| 2300 | 
            +
                        case 2:
         | 
| 2301 | 
            +
                        case "end":
         | 
| 2302 | 
            +
                          return _context3.stop();
         | 
| 2303 | 
            +
                      }
         | 
| 1565 2304 | 
             
                    }
         | 
| 1566 2305 | 
             
                  }, _callee3, this);
         | 
| 1567 2306 | 
             
                }));
         | 
| 2307 | 
            +
             | 
| 1568 2308 | 
             
                function authRefresh(_x3) {
         | 
| 1569 2309 | 
             
                  return _authRefresh.apply(this, arguments);
         | 
| 1570 2310 | 
             
                }
         | 
| 2311 | 
            +
             | 
| 1571 2312 | 
             
                return authRefresh;
         | 
| 1572 2313 | 
             
              }()
         | 
| 1573 2314 | 
             
              /**
         | 
| @@ -1576,23 +2317,29 @@ var GuardService = /*#__PURE__*/function () { | |
| 1576 2317 | 
             
               * @returns void
         | 
| 1577 2318 | 
             
               */
         | 
| 1578 2319 | 
             
              ;
         | 
| 2320 | 
            +
             | 
| 1579 2321 | 
             
              _proto.authLogout =
         | 
| 1580 2322 | 
             
              /*#__PURE__*/
         | 
| 1581 2323 | 
             
              function () {
         | 
| 1582 | 
            -
                var _authLogout = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 1583 | 
            -
                  return  | 
| 1584 | 
            -
                    while (1)  | 
| 1585 | 
            -
                       | 
| 1586 | 
            -
                         | 
| 1587 | 
            -
             | 
| 1588 | 
            -
             | 
| 1589 | 
            -
                         | 
| 2324 | 
            +
                var _authLogout = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4() {
         | 
| 2325 | 
            +
                  return runtime_1.wrap(function _callee4$(_context4) {
         | 
| 2326 | 
            +
                    while (1) {
         | 
| 2327 | 
            +
                      switch (_context4.prev = _context4.next) {
         | 
| 2328 | 
            +
                        case 0:
         | 
| 2329 | 
            +
                          return _context4.abrupt("return", this.api.get(this.baseURL + "/v1/auth/logout"));
         | 
| 2330 | 
            +
             | 
| 2331 | 
            +
                        case 1:
         | 
| 2332 | 
            +
                        case "end":
         | 
| 2333 | 
            +
                          return _context4.stop();
         | 
| 2334 | 
            +
                      }
         | 
| 1590 2335 | 
             
                    }
         | 
| 1591 2336 | 
             
                  }, _callee4, this);
         | 
| 1592 2337 | 
             
                }));
         | 
| 2338 | 
            +
             | 
| 1593 2339 | 
             
                function authLogout() {
         | 
| 1594 2340 | 
             
                  return _authLogout.apply(this, arguments);
         | 
| 1595 2341 | 
             
                }
         | 
| 2342 | 
            +
             | 
| 1596 2343 | 
             
                return authLogout;
         | 
| 1597 2344 | 
             
              }()
         | 
| 1598 2345 | 
             
              /**
         | 
| @@ -1602,23 +2349,29 @@ var GuardService = /*#__PURE__*/function () { | |
| 1602 2349 | 
             
               * @returns void
         | 
| 1603 2350 | 
             
               */
         | 
| 1604 2351 | 
             
              ;
         | 
| 2352 | 
            +
             | 
| 1605 2353 | 
             
              _proto.authRecover =
         | 
| 1606 2354 | 
             
              /*#__PURE__*/
         | 
| 1607 2355 | 
             
              function () {
         | 
| 1608 | 
            -
                var _authRecover = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 1609 | 
            -
                  return  | 
| 1610 | 
            -
                    while (1)  | 
| 1611 | 
            -
                       | 
| 1612 | 
            -
                         | 
| 1613 | 
            -
             | 
| 1614 | 
            -
             | 
| 1615 | 
            -
                         | 
| 2356 | 
            +
                var _authRecover = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(req) {
         | 
| 2357 | 
            +
                  return runtime_1.wrap(function _callee5$(_context5) {
         | 
| 2358 | 
            +
                    while (1) {
         | 
| 2359 | 
            +
                      switch (_context5.prev = _context5.next) {
         | 
| 2360 | 
            +
                        case 0:
         | 
| 2361 | 
            +
                          return _context5.abrupt("return", this.api.post(this.baseURL + "/v1/auth/recover", req));
         | 
| 2362 | 
            +
             | 
| 2363 | 
            +
                        case 1:
         | 
| 2364 | 
            +
                        case "end":
         | 
| 2365 | 
            +
                          return _context5.stop();
         | 
| 2366 | 
            +
                      }
         | 
| 1616 2367 | 
             
                    }
         | 
| 1617 2368 | 
             
                  }, _callee5, this);
         | 
| 1618 2369 | 
             
                }));
         | 
| 2370 | 
            +
             | 
| 1619 2371 | 
             
                function authRecover(_x4) {
         | 
| 1620 2372 | 
             
                  return _authRecover.apply(this, arguments);
         | 
| 1621 2373 | 
             
                }
         | 
| 2374 | 
            +
             | 
| 1622 2375 | 
             
                return authRecover;
         | 
| 1623 2376 | 
             
              }()
         | 
| 1624 2377 | 
             
              /**
         | 
| @@ -1629,54 +2382,70 @@ var GuardService = /*#__PURE__*/function () { | |
| 1629 2382 | 
             
               * @returns IdentityResponse
         | 
| 1630 2383 | 
             
               */
         | 
| 1631 2384 | 
             
              ;
         | 
| 2385 | 
            +
             | 
| 1632 2386 | 
             
              _proto.identityCreate =
         | 
| 1633 2387 | 
             
              /*#__PURE__*/
         | 
| 1634 2388 | 
             
              function () {
         | 
| 1635 | 
            -
                var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2389 | 
            +
                var _identityCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(req) {
         | 
| 1636 2390 | 
             
                  var resp, _e$response3, code;
         | 
| 1637 | 
            -
             | 
| 1638 | 
            -
             | 
| 1639 | 
            -
             | 
| 1640 | 
            -
             | 
| 1641 | 
            -
                         | 
| 1642 | 
            -
             | 
| 1643 | 
            -
             | 
| 1644 | 
            -
             | 
| 1645 | 
            -
             | 
| 1646 | 
            -
             | 
| 1647 | 
            -
             | 
| 1648 | 
            -
             | 
| 1649 | 
            -
             | 
| 1650 | 
            -
             | 
| 1651 | 
            -
             | 
| 1652 | 
            -
                        _context6.t0 = _context6["catch"](0);
         | 
| 1653 | 
            -
                        if (!_context6.t0.isAxiosError) {
         | 
| 1654 | 
            -
                          _context6.next = 17;
         | 
| 2391 | 
            +
             | 
| 2392 | 
            +
                  return runtime_1.wrap(function _callee6$(_context6) {
         | 
| 2393 | 
            +
                    while (1) {
         | 
| 2394 | 
            +
                      switch (_context6.prev = _context6.next) {
         | 
| 2395 | 
            +
                        case 0:
         | 
| 2396 | 
            +
                          _context6.prev = 0;
         | 
| 2397 | 
            +
                          _context6.next = 3;
         | 
| 2398 | 
            +
                          return this.api.post(this.baseURL + "/v1/identities", req);
         | 
| 2399 | 
            +
             | 
| 2400 | 
            +
                        case 3:
         | 
| 2401 | 
            +
                          resp = _context6.sent;
         | 
| 2402 | 
            +
                          this.api.setTokens({
         | 
| 2403 | 
            +
                            refreshToken: resp.refreshToken
         | 
| 2404 | 
            +
                          });
         | 
| 2405 | 
            +
                          _context6.next = 18;
         | 
| 1655 2406 | 
             
                          break;
         | 
| 1656 | 
            -
             | 
| 1657 | 
            -
                         | 
| 1658 | 
            -
             | 
| 1659 | 
            -
             | 
| 1660 | 
            -
             | 
| 1661 | 
            -
             | 
| 1662 | 
            -
             | 
| 1663 | 
            -
             | 
| 1664 | 
            -
             | 
| 1665 | 
            -
             | 
| 1666 | 
            -
             | 
| 1667 | 
            -
             | 
| 1668 | 
            -
             | 
| 1669 | 
            -
             | 
| 1670 | 
            -
             | 
| 1671 | 
            -
             | 
| 1672 | 
            -
             | 
| 1673 | 
            -
             | 
| 2407 | 
            +
             | 
| 2408 | 
            +
                        case 7:
         | 
| 2409 | 
            +
                          _context6.prev = 7;
         | 
| 2410 | 
            +
                          _context6.t0 = _context6["catch"](0);
         | 
| 2411 | 
            +
             | 
| 2412 | 
            +
                          if (!_context6.t0.isAxiosError) {
         | 
| 2413 | 
            +
                            _context6.next = 17;
         | 
| 2414 | 
            +
                            break;
         | 
| 2415 | 
            +
                          }
         | 
| 2416 | 
            +
             | 
| 2417 | 
            +
                          code = (_e$response3 = _context6.t0.response) == null ? void 0 : _e$response3.status;
         | 
| 2418 | 
            +
                          _context6.t1 = code;
         | 
| 2419 | 
            +
                          _context6.next = _context6.t1 === 400 ? 14 : _context6.t1 === 409 ? 15 : _context6.t1 === 500 ? 16 : 16;
         | 
| 2420 | 
            +
                          break;
         | 
| 2421 | 
            +
             | 
| 2422 | 
            +
                        case 14:
         | 
| 2423 | 
            +
                          throw new IdentityCreationBadRequest();
         | 
| 2424 | 
            +
             | 
| 2425 | 
            +
                        case 15:
         | 
| 2426 | 
            +
                          throw new IdentityCreationConflict();
         | 
| 2427 | 
            +
             | 
| 2428 | 
            +
                        case 16:
         | 
| 2429 | 
            +
                          throw new IdentityCreationFailed();
         | 
| 2430 | 
            +
             | 
| 2431 | 
            +
                        case 17:
         | 
| 2432 | 
            +
                          throw new IdentityCreationFailed();
         | 
| 2433 | 
            +
             | 
| 2434 | 
            +
                        case 18:
         | 
| 2435 | 
            +
                          return _context6.abrupt("return", resp);
         | 
| 2436 | 
            +
             | 
| 2437 | 
            +
                        case 19:
         | 
| 2438 | 
            +
                        case "end":
         | 
| 2439 | 
            +
                          return _context6.stop();
         | 
| 2440 | 
            +
                      }
         | 
| 1674 2441 | 
             
                    }
         | 
| 1675 2442 | 
             
                  }, _callee6, this, [[0, 7]]);
         | 
| 1676 2443 | 
             
                }));
         | 
| 2444 | 
            +
             | 
| 1677 2445 | 
             
                function identityCreate(_x5) {
         | 
| 1678 2446 | 
             
                  return _identityCreate.apply(this, arguments);
         | 
| 1679 2447 | 
             
                }
         | 
| 2448 | 
            +
             | 
| 1680 2449 | 
             
                return identityCreate;
         | 
| 1681 2450 | 
             
              }()
         | 
| 1682 2451 | 
             
              /**
         | 
| @@ -1688,46 +2457,61 @@ var GuardService = /*#__PURE__*/function () { | |
| 1688 2457 | 
             
               * @returns IdentityResponse
         | 
| 1689 2458 | 
             
               */
         | 
| 1690 2459 | 
             
              ;
         | 
| 2460 | 
            +
             | 
| 1691 2461 | 
             
              _proto.identityGet =
         | 
| 1692 2462 | 
             
              /*#__PURE__*/
         | 
| 1693 2463 | 
             
              function () {
         | 
| 1694 | 
            -
                var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2464 | 
            +
                var _identityGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(identityID, skipCache) {
         | 
| 1695 2465 | 
             
                  var _tokens$accessToken, _tokens$refreshToken;
         | 
| 2466 | 
            +
             | 
| 1696 2467 | 
             
                  var tokens, cacheKey, identity;
         | 
| 1697 | 
            -
                  return  | 
| 1698 | 
            -
                    while (1)  | 
| 1699 | 
            -
                       | 
| 1700 | 
            -
                         | 
| 1701 | 
            -
                          skipCache  | 
| 1702 | 
            -
             | 
| 1703 | 
            -
             | 
| 1704 | 
            -
             | 
| 1705 | 
            -
             | 
| 1706 | 
            -
                           | 
| 1707 | 
            -
             | 
| 1708 | 
            -
             | 
| 1709 | 
            -
             | 
| 1710 | 
            -
             | 
| 1711 | 
            -
             | 
| 1712 | 
            -
             | 
| 1713 | 
            -
             | 
| 1714 | 
            -
                           | 
| 1715 | 
            -
             | 
| 1716 | 
            -
                         | 
| 1717 | 
            -
             | 
| 1718 | 
            -
             | 
| 1719 | 
            -
             | 
| 1720 | 
            -
             | 
| 1721 | 
            -
             | 
| 1722 | 
            -
             | 
| 1723 | 
            -
             | 
| 1724 | 
            -
             | 
| 2468 | 
            +
                  return runtime_1.wrap(function _callee7$(_context7) {
         | 
| 2469 | 
            +
                    while (1) {
         | 
| 2470 | 
            +
                      switch (_context7.prev = _context7.next) {
         | 
| 2471 | 
            +
                        case 0:
         | 
| 2472 | 
            +
                          if (skipCache === void 0) {
         | 
| 2473 | 
            +
                            skipCache = false;
         | 
| 2474 | 
            +
                          }
         | 
| 2475 | 
            +
             | 
| 2476 | 
            +
                          tokens = this.api.getTokens();
         | 
| 2477 | 
            +
                          cacheKey = ((_tokens$accessToken = tokens.accessToken) != null ? _tokens$accessToken : '') + ((_tokens$refreshToken = tokens.refreshToken) != null ? _tokens$refreshToken : '') + identityID;
         | 
| 2478 | 
            +
             | 
| 2479 | 
            +
                          if (!(skipCache || !tokens.accessToken || !this.identityCache[cacheKey])) {
         | 
| 2480 | 
            +
                            _context7.next = 10;
         | 
| 2481 | 
            +
                            break;
         | 
| 2482 | 
            +
                          }
         | 
| 2483 | 
            +
             | 
| 2484 | 
            +
                          _context7.next = 6;
         | 
| 2485 | 
            +
                          return this.api.get(this.baseURL + "/v1/identities/" + identityID);
         | 
| 2486 | 
            +
             | 
| 2487 | 
            +
                        case 6:
         | 
| 2488 | 
            +
                          identity = _context7.sent;
         | 
| 2489 | 
            +
             | 
| 2490 | 
            +
                          if (!skipCache) {
         | 
| 2491 | 
            +
                            _context7.next = 9;
         | 
| 2492 | 
            +
                            break;
         | 
| 2493 | 
            +
                          }
         | 
| 2494 | 
            +
             | 
| 2495 | 
            +
                          return _context7.abrupt("return", identity);
         | 
| 2496 | 
            +
             | 
| 2497 | 
            +
                        case 9:
         | 
| 2498 | 
            +
                          this.identityCache[cacheKey] = identity;
         | 
| 2499 | 
            +
             | 
| 2500 | 
            +
                        case 10:
         | 
| 2501 | 
            +
                          return _context7.abrupt("return", this.identityCache[cacheKey]);
         | 
| 2502 | 
            +
             | 
| 2503 | 
            +
                        case 11:
         | 
| 2504 | 
            +
                        case "end":
         | 
| 2505 | 
            +
                          return _context7.stop();
         | 
| 2506 | 
            +
                      }
         | 
| 1725 2507 | 
             
                    }
         | 
| 1726 2508 | 
             
                  }, _callee7, this);
         | 
| 1727 2509 | 
             
                }));
         | 
| 2510 | 
            +
             | 
| 1728 2511 | 
             
                function identityGet(_x6, _x7) {
         | 
| 1729 2512 | 
             
                  return _identityGet.apply(this, arguments);
         | 
| 1730 2513 | 
             
                }
         | 
| 2514 | 
            +
             | 
| 1731 2515 | 
             
                return identityGet;
         | 
| 1732 2516 | 
             
              }()
         | 
| 1733 2517 | 
             
              /**
         | 
| @@ -1737,38 +2521,50 @@ var GuardService = /*#__PURE__*/function () { | |
| 1737 2521 | 
             
               * @returns WhoAmIResponse
         | 
| 1738 2522 | 
             
               */
         | 
| 1739 2523 | 
             
              ;
         | 
| 2524 | 
            +
             | 
| 1740 2525 | 
             
              _proto.whoAmI =
         | 
| 1741 2526 | 
             
              /*#__PURE__*/
         | 
| 1742 2527 | 
             
              function () {
         | 
| 1743 | 
            -
                var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2528 | 
            +
                var _whoAmI = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(refreshCache) {
         | 
| 1744 2529 | 
             
                  var _this$api$getTokens$a;
         | 
| 2530 | 
            +
             | 
| 1745 2531 | 
             
                  var cacheKey;
         | 
| 1746 | 
            -
                  return  | 
| 1747 | 
            -
                    while (1)  | 
| 1748 | 
            -
                       | 
| 1749 | 
            -
                         | 
| 1750 | 
            -
                          refreshCache  | 
| 1751 | 
            -
             | 
| 1752 | 
            -
             | 
| 1753 | 
            -
             | 
| 1754 | 
            -
                           | 
| 1755 | 
            -
             | 
| 1756 | 
            -
             | 
| 1757 | 
            -
             | 
| 1758 | 
            -
             | 
| 1759 | 
            -
             | 
| 1760 | 
            -
             | 
| 1761 | 
            -
             | 
| 1762 | 
            -
             | 
| 1763 | 
            -
             | 
| 1764 | 
            -
             | 
| 1765 | 
            -
             | 
| 2532 | 
            +
                  return runtime_1.wrap(function _callee8$(_context8) {
         | 
| 2533 | 
            +
                    while (1) {
         | 
| 2534 | 
            +
                      switch (_context8.prev = _context8.next) {
         | 
| 2535 | 
            +
                        case 0:
         | 
| 2536 | 
            +
                          if (refreshCache === void 0) {
         | 
| 2537 | 
            +
                            refreshCache = false;
         | 
| 2538 | 
            +
                          }
         | 
| 2539 | 
            +
             | 
| 2540 | 
            +
                          cacheKey = (_this$api$getTokens$a = this.api.getTokens().accessToken) != null ? _this$api$getTokens$a : '';
         | 
| 2541 | 
            +
             | 
| 2542 | 
            +
                          if (!(!this.whoAmICache[cacheKey] || refreshCache)) {
         | 
| 2543 | 
            +
                            _context8.next = 6;
         | 
| 2544 | 
            +
                            break;
         | 
| 2545 | 
            +
                          }
         | 
| 2546 | 
            +
             | 
| 2547 | 
            +
                          _context8.next = 5;
         | 
| 2548 | 
            +
                          return this.api.get(this.baseURL + "/v1/auth/whoami");
         | 
| 2549 | 
            +
             | 
| 2550 | 
            +
                        case 5:
         | 
| 2551 | 
            +
                          this.whoAmICache[cacheKey] = _context8.sent;
         | 
| 2552 | 
            +
             | 
| 2553 | 
            +
                        case 6:
         | 
| 2554 | 
            +
                          return _context8.abrupt("return", this.whoAmICache[cacheKey]);
         | 
| 2555 | 
            +
             | 
| 2556 | 
            +
                        case 7:
         | 
| 2557 | 
            +
                        case "end":
         | 
| 2558 | 
            +
                          return _context8.stop();
         | 
| 2559 | 
            +
                      }
         | 
| 1766 2560 | 
             
                    }
         | 
| 1767 2561 | 
             
                  }, _callee8, this);
         | 
| 1768 2562 | 
             
                }));
         | 
| 2563 | 
            +
             | 
| 1769 2564 | 
             
                function whoAmI(_x8) {
         | 
| 1770 2565 | 
             
                  return _whoAmI.apply(this, arguments);
         | 
| 1771 2566 | 
             
                }
         | 
| 2567 | 
            +
             | 
| 1772 2568 | 
             
                return whoAmI;
         | 
| 1773 2569 | 
             
              }()
         | 
| 1774 2570 | 
             
              /**
         | 
| @@ -1779,23 +2575,29 @@ var GuardService = /*#__PURE__*/function () { | |
| 1779 2575 | 
             
               * @returns IdentityResponse
         | 
| 1780 2576 | 
             
               */
         | 
| 1781 2577 | 
             
              ;
         | 
| 2578 | 
            +
             | 
| 1782 2579 | 
             
              _proto.identityUpdate =
         | 
| 1783 2580 | 
             
              /*#__PURE__*/
         | 
| 1784 2581 | 
             
              function () {
         | 
| 1785 | 
            -
                var _identityUpdate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 1786 | 
            -
                  return  | 
| 1787 | 
            -
                    while (1)  | 
| 1788 | 
            -
                       | 
| 1789 | 
            -
                         | 
| 1790 | 
            -
             | 
| 1791 | 
            -
             | 
| 1792 | 
            -
                         | 
| 2582 | 
            +
                var _identityUpdate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(identityID, req) {
         | 
| 2583 | 
            +
                  return runtime_1.wrap(function _callee9$(_context9) {
         | 
| 2584 | 
            +
                    while (1) {
         | 
| 2585 | 
            +
                      switch (_context9.prev = _context9.next) {
         | 
| 2586 | 
            +
                        case 0:
         | 
| 2587 | 
            +
                          return _context9.abrupt("return", this.api.put(this.baseURL + "/v1/identities/" + identityID, req));
         | 
| 2588 | 
            +
             | 
| 2589 | 
            +
                        case 1:
         | 
| 2590 | 
            +
                        case "end":
         | 
| 2591 | 
            +
                          return _context9.stop();
         | 
| 2592 | 
            +
                      }
         | 
| 1793 2593 | 
             
                    }
         | 
| 1794 2594 | 
             
                  }, _callee9, this);
         | 
| 1795 2595 | 
             
                }));
         | 
| 2596 | 
            +
             | 
| 1796 2597 | 
             
                function identityUpdate(_x9, _x10) {
         | 
| 1797 2598 | 
             
                  return _identityUpdate.apply(this, arguments);
         | 
| 1798 2599 | 
             
                }
         | 
| 2600 | 
            +
             | 
| 1799 2601 | 
             
                return identityUpdate;
         | 
| 1800 2602 | 
             
              }()
         | 
| 1801 2603 | 
             
              /**
         | 
| @@ -1807,31 +2609,37 @@ var GuardService = /*#__PURE__*/function () { | |
| 1807 2609 | 
             
               * @returns QRCodeResponse
         | 
| 1808 2610 | 
             
               */
         | 
| 1809 2611 | 
             
              ;
         | 
| 2612 | 
            +
             | 
| 1810 2613 | 
             
              _proto.identityMFAQRCode =
         | 
| 1811 2614 | 
             
              /*#__PURE__*/
         | 
| 1812 2615 | 
             
              function () {
         | 
| 1813 | 
            -
                var _identityMFAQRCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2616 | 
            +
                var _identityMFAQRCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(identityID, password) {
         | 
| 1814 2617 | 
             
                  var req;
         | 
| 1815 | 
            -
                  return  | 
| 1816 | 
            -
                    while (1)  | 
| 1817 | 
            -
                       | 
| 1818 | 
            -
                         | 
| 1819 | 
            -
                           | 
| 1820 | 
            -
             | 
| 1821 | 
            -
             | 
| 1822 | 
            -
                           | 
| 1823 | 
            -
                             | 
| 1824 | 
            -
             | 
| 1825 | 
            -
             | 
| 1826 | 
            -
             | 
| 1827 | 
            -
             | 
| 1828 | 
            -
                         | 
| 2618 | 
            +
                  return runtime_1.wrap(function _callee10$(_context10) {
         | 
| 2619 | 
            +
                    while (1) {
         | 
| 2620 | 
            +
                      switch (_context10.prev = _context10.next) {
         | 
| 2621 | 
            +
                        case 0:
         | 
| 2622 | 
            +
                          req = {
         | 
| 2623 | 
            +
                            password: password
         | 
| 2624 | 
            +
                          };
         | 
| 2625 | 
            +
                          return _context10.abrupt("return", this.api.post(this.baseURL + "/v1/identities/" + identityID + "/mfa", req, {
         | 
| 2626 | 
            +
                            headers: {
         | 
| 2627 | 
            +
                              Accept: 'application/json'
         | 
| 2628 | 
            +
                            }
         | 
| 2629 | 
            +
                          }));
         | 
| 2630 | 
            +
             | 
| 2631 | 
            +
                        case 2:
         | 
| 2632 | 
            +
                        case "end":
         | 
| 2633 | 
            +
                          return _context10.stop();
         | 
| 2634 | 
            +
                      }
         | 
| 1829 2635 | 
             
                    }
         | 
| 1830 2636 | 
             
                  }, _callee10, this);
         | 
| 1831 2637 | 
             
                }));
         | 
| 2638 | 
            +
             | 
| 1832 2639 | 
             
                function identityMFAQRCode(_x11, _x12) {
         | 
| 1833 2640 | 
             
                  return _identityMFAQRCode.apply(this, arguments);
         | 
| 1834 2641 | 
             
                }
         | 
| 2642 | 
            +
             | 
| 1835 2643 | 
             
                return identityMFAQRCode;
         | 
| 1836 2644 | 
             
              }()
         | 
| 1837 2645 | 
             
              /**
         | 
| @@ -1841,23 +2649,29 @@ var GuardService = /*#__PURE__*/function () { | |
| 1841 2649 | 
             
               * @return void
         | 
| 1842 2650 | 
             
               */
         | 
| 1843 2651 | 
             
              ;
         | 
| 2652 | 
            +
             | 
| 1844 2653 | 
             
              _proto.identitySendConfirmEmail =
         | 
| 1845 2654 | 
             
              /*#__PURE__*/
         | 
| 1846 2655 | 
             
              function () {
         | 
| 1847 | 
            -
                var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 1848 | 
            -
                  return  | 
| 1849 | 
            -
                    while (1)  | 
| 1850 | 
            -
                       | 
| 1851 | 
            -
                         | 
| 1852 | 
            -
             | 
| 1853 | 
            -
             | 
| 1854 | 
            -
                         | 
| 2656 | 
            +
                var _identitySendConfirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(req) {
         | 
| 2657 | 
            +
                  return runtime_1.wrap(function _callee11$(_context11) {
         | 
| 2658 | 
            +
                    while (1) {
         | 
| 2659 | 
            +
                      switch (_context11.prev = _context11.next) {
         | 
| 2660 | 
            +
                        case 0:
         | 
| 2661 | 
            +
                          return _context11.abrupt("return", this.api.post(this.baseURL + "/v1/identity/confirm", req));
         | 
| 2662 | 
            +
             | 
| 2663 | 
            +
                        case 1:
         | 
| 2664 | 
            +
                        case "end":
         | 
| 2665 | 
            +
                          return _context11.stop();
         | 
| 2666 | 
            +
                      }
         | 
| 1855 2667 | 
             
                    }
         | 
| 1856 2668 | 
             
                  }, _callee11, this);
         | 
| 1857 2669 | 
             
                }));
         | 
| 2670 | 
            +
             | 
| 1858 2671 | 
             
                function identitySendConfirmEmail(_x13) {
         | 
| 1859 2672 | 
             
                  return _identitySendConfirmEmail.apply(this, arguments);
         | 
| 1860 2673 | 
             
                }
         | 
| 2674 | 
            +
             | 
| 1861 2675 | 
             
                return identitySendConfirmEmail;
         | 
| 1862 2676 | 
             
              }()
         | 
| 1863 2677 | 
             
              /**
         | 
| @@ -1867,23 +2681,29 @@ var GuardService = /*#__PURE__*/function () { | |
| 1867 2681 | 
             
               * @returns IdentityResponse
         | 
| 1868 2682 | 
             
               */
         | 
| 1869 2683 | 
             
              ;
         | 
| 2684 | 
            +
             | 
| 1870 2685 | 
             
              _proto.identityGetByCustomerEmail =
         | 
| 1871 2686 | 
             
              /*#__PURE__*/
         | 
| 1872 2687 | 
             
              function () {
         | 
| 1873 | 
            -
                var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 1874 | 
            -
                  return  | 
| 1875 | 
            -
                    while (1)  | 
| 1876 | 
            -
                       | 
| 1877 | 
            -
                         | 
| 1878 | 
            -
             | 
| 1879 | 
            -
             | 
| 1880 | 
            -
                         | 
| 2688 | 
            +
                var _identityGetByCustomerEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(email) {
         | 
| 2689 | 
            +
                  return runtime_1.wrap(function _callee12$(_context12) {
         | 
| 2690 | 
            +
                    while (1) {
         | 
| 2691 | 
            +
                      switch (_context12.prev = _context12.next) {
         | 
| 2692 | 
            +
                        case 0:
         | 
| 2693 | 
            +
                          return _context12.abrupt("return", this.identityGetByHash(email.substring(email.indexOf('+') + 1, email.indexOf('@'))));
         | 
| 2694 | 
            +
             | 
| 2695 | 
            +
                        case 1:
         | 
| 2696 | 
            +
                        case "end":
         | 
| 2697 | 
            +
                          return _context12.stop();
         | 
| 2698 | 
            +
                      }
         | 
| 1881 2699 | 
             
                    }
         | 
| 1882 2700 | 
             
                  }, _callee12, this);
         | 
| 1883 2701 | 
             
                }));
         | 
| 2702 | 
            +
             | 
| 1884 2703 | 
             
                function identityGetByCustomerEmail(_x14) {
         | 
| 1885 2704 | 
             
                  return _identityGetByCustomerEmail.apply(this, arguments);
         | 
| 1886 2705 | 
             
                }
         | 
| 2706 | 
            +
             | 
| 1887 2707 | 
             
                return identityGetByCustomerEmail;
         | 
| 1888 2708 | 
             
              }()
         | 
| 1889 2709 | 
             
              /**
         | 
| @@ -1893,25 +2713,32 @@ var GuardService = /*#__PURE__*/function () { | |
| 1893 2713 | 
             
               * @returns IdentityResponse
         | 
| 1894 2714 | 
             
               */
         | 
| 1895 2715 | 
             
              ;
         | 
| 2716 | 
            +
             | 
| 1896 2717 | 
             
              _proto.identityGetByHash =
         | 
| 1897 2718 | 
             
              /*#__PURE__*/
         | 
| 1898 2719 | 
             
              function () {
         | 
| 1899 | 
            -
                var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 1900 | 
            -
                  return  | 
| 1901 | 
            -
                    while (1)  | 
| 1902 | 
            -
                       | 
| 1903 | 
            -
                         | 
| 1904 | 
            -
             | 
| 1905 | 
            -
             | 
| 1906 | 
            -
                         | 
| 2720 | 
            +
                var _identityGetByHash = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(b64Hash) {
         | 
| 2721 | 
            +
                  return runtime_1.wrap(function _callee13$(_context13) {
         | 
| 2722 | 
            +
                    while (1) {
         | 
| 2723 | 
            +
                      switch (_context13.prev = _context13.next) {
         | 
| 2724 | 
            +
                        case 0:
         | 
| 2725 | 
            +
                          return _context13.abrupt("return", this.identityGet(b64Hash.replace(/\+/g, '-').replace(/\//g, '_')));
         | 
| 2726 | 
            +
             | 
| 2727 | 
            +
                        case 1:
         | 
| 2728 | 
            +
                        case "end":
         | 
| 2729 | 
            +
                          return _context13.stop();
         | 
| 2730 | 
            +
                      }
         | 
| 1907 2731 | 
             
                    }
         | 
| 1908 2732 | 
             
                  }, _callee13, this);
         | 
| 1909 2733 | 
             
                }));
         | 
| 2734 | 
            +
             | 
| 1910 2735 | 
             
                function identityGetByHash(_x15) {
         | 
| 1911 2736 | 
             
                  return _identityGetByHash.apply(this, arguments);
         | 
| 1912 2737 | 
             
                }
         | 
| 2738 | 
            +
             | 
| 1913 2739 | 
             
                return identityGetByHash;
         | 
| 1914 2740 | 
             
              }();
         | 
| 2741 | 
            +
             | 
| 1915 2742 | 
             
              return GuardService;
         | 
| 1916 2743 | 
             
            }();
         | 
| 1917 2744 |  | 
| @@ -1925,7 +2752,10 @@ var SearchService = /*#__PURE__*/function () { | |
| 1925 2752 | 
             
               * @param consultUUID
         | 
| 1926 2753 | 
             
               * @param terms the search terms to be indexed
         | 
| 1927 2754 | 
             
               */
         | 
| 2755 | 
            +
             | 
| 2756 | 
            +
             | 
| 1928 2757 | 
             
              var _proto = SearchService.prototype;
         | 
| 2758 | 
            +
             | 
| 1929 2759 | 
             
              _proto.index = function index(consultUUID, terms) {
         | 
| 1930 2760 | 
             
                return this.api.post(this.baseURL + "/v1/index", {
         | 
| 1931 2761 | 
             
                  consultUUID: consultUUID,
         | 
| @@ -1935,12 +2765,15 @@ var SearchService = /*#__PURE__*/function () { | |
| 1935 2765 | 
             
              /**
         | 
| 1936 2766 | 
             
               * Searches for the consultations corresponding to the search terms entered in the query
         | 
| 1937 2767 | 
             
               * @param terms array of search terms
         | 
| 1938 | 
            -
                | 
| 2768 | 
            +
               */
         | 
| 2769 | 
            +
              ;
         | 
| 2770 | 
            +
             | 
| 1939 2771 | 
             
              _proto.search = function search(terms) {
         | 
| 1940 2772 | 
             
                return this.api.post(this.baseURL + "/v1/search", {
         | 
| 1941 2773 | 
             
                  terms: terms
         | 
| 1942 2774 | 
             
                });
         | 
| 1943 2775 | 
             
              };
         | 
| 2776 | 
            +
             | 
| 1944 2777 | 
             
              return SearchService;
         | 
| 1945 2778 | 
             
            }();
         | 
| 1946 2779 |  | 
| @@ -1954,7 +2787,10 @@ var PracticeService = /*#__PURE__*/function () { | |
| 1954 2787 | 
             
               * an M2M with the scope `practice.practices.get`
         | 
| 1955 2788 | 
             
               * @returns an array of practices
         | 
| 1956 2789 | 
             
               */
         | 
| 2790 | 
            +
             | 
| 2791 | 
            +
             | 
| 1957 2792 | 
             
              var _proto = PracticeService.prototype;
         | 
| 2793 | 
            +
             | 
| 1958 2794 | 
             
              _proto.practiceGetAll = function practiceGetAll() {
         | 
| 1959 2795 | 
             
                return this.api.get(this.baseURL + "/v1/practices");
         | 
| 1960 2796 | 
             
              }
         | 
| @@ -1965,7 +2801,9 @@ var PracticeService = /*#__PURE__*/function () { | |
| 1965 2801 | 
             
               * @param hydratePracticeConfigs (optional) if set true it the Practice field configs will be set
         | 
| 1966 2802 | 
             
               * @param accounts (optional) if set true it the Practice field accounts will be set
         | 
| 1967 2803 | 
             
               * @returns the found practice or undefined
         | 
| 1968 | 
            -
                | 
| 2804 | 
            +
               */
         | 
| 2805 | 
            +
              ;
         | 
| 2806 | 
            +
             | 
| 1969 2807 | 
             
              _proto.practiceGetFromURL = function practiceGetFromURL(practiceURL, params) {
         | 
| 1970 2808 | 
             
                return this.api.get(this.baseURL + "/v1/practices", {
         | 
| 1971 2809 | 
             
                  params: _extends({
         | 
| @@ -1973,6 +2811,7 @@ var PracticeService = /*#__PURE__*/function () { | |
| 1973 2811 | 
             
                  }, params)
         | 
| 1974 2812 | 
             
                });
         | 
| 1975 2813 | 
             
              };
         | 
| 2814 | 
            +
             | 
| 1976 2815 | 
             
              _proto.practiceGetFromUuid = function practiceGetFromUuid(practiceUuid, locale, withAccounts) {
         | 
| 1977 2816 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid, {
         | 
| 1978 2817 | 
             
                  params: {
         | 
| @@ -1980,13 +2819,15 @@ var PracticeService = /*#__PURE__*/function () { | |
| 1980 2819 | 
             
                    accounts: withAccounts
         | 
| 1981 2820 | 
             
                  }
         | 
| 1982 2821 | 
             
                });
         | 
| 1983 | 
            -
              }
         | 
| 1984 | 
            -
             | 
| 2822 | 
            +
              } /// Practice Configs
         | 
| 2823 | 
            +
             | 
| 1985 2824 | 
             
              /**
         | 
| 1986 2825 | 
             
               * This function retrieves all configs of a specific practice
         | 
| 1987 2826 | 
             
               * @param practiceUuid uuid of the practice
         | 
| 1988 2827 | 
             
               * @returns the practice configs
         | 
| 1989 | 
            -
                | 
| 2828 | 
            +
               */
         | 
| 2829 | 
            +
              ;
         | 
| 2830 | 
            +
             | 
| 1990 2831 | 
             
              _proto.practiceConfigGetFromPracticeUuid = function practiceConfigGetFromPracticeUuid(practiceUuid) {
         | 
| 1991 2832 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs");
         | 
| 1992 2833 | 
             
              }
         | 
| @@ -1995,7 +2836,9 @@ var PracticeService = /*#__PURE__*/function () { | |
| 1995 2836 | 
             
               * @param practiceUuid uuid of the practice
         | 
| 1996 2837 | 
             
               * @param kind of the config
         | 
| 1997 2838 | 
             
               * @returns the practice config
         | 
| 1998 | 
            -
                | 
| 2839 | 
            +
               */
         | 
| 2840 | 
            +
              ;
         | 
| 2841 | 
            +
             | 
| 1999 2842 | 
             
              _proto.practiceConfigGetByKindForPracticeUuid = function practiceConfigGetByKindForPracticeUuid(practiceUuid, kind) {
         | 
| 2000 2843 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/configs/" + kind);
         | 
| 2001 2844 | 
             
              }
         | 
| @@ -2004,7 +2847,9 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2004 2847 | 
             
               * @param practiceUuid uuid of the practice
         | 
| 2005 2848 | 
             
               * @param config the config to add to the practice
         | 
| 2006 2849 | 
             
               * @returns the created practice config
         | 
| 2007 | 
            -
                | 
| 2850 | 
            +
               */
         | 
| 2851 | 
            +
              ;
         | 
| 2852 | 
            +
             | 
| 2008 2853 | 
             
              _proto.practiceConfigCreateForPracticeUuid = function practiceConfigCreateForPracticeUuid(practiceUuid, config) {
         | 
| 2009 2854 | 
             
                return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/configs", config);
         | 
| 2010 2855 | 
             
              }
         | 
| @@ -2013,15 +2858,18 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2013 2858 | 
             
               * @param practiceUuid uuid of the practice
         | 
| 2014 2859 | 
             
               * @param config the config to update
         | 
| 2015 2860 | 
             
               * @returns the practice config
         | 
| 2016 | 
            -
                | 
| 2861 | 
            +
               */
         | 
| 2862 | 
            +
              ;
         | 
| 2863 | 
            +
             | 
| 2017 2864 | 
             
              _proto.practiceConfigUpdate = function practiceConfigUpdate(config) {
         | 
| 2018 2865 | 
             
                return this.api.put(this.baseURL + "/v1/practices/" + config.uuidPractice + "/configs/" + config.kind, config);
         | 
| 2019 | 
            -
              }
         | 
| 2020 | 
            -
              /// Accounts
         | 
| 2866 | 
            +
              } /// Accounts
         | 
| 2021 2867 | 
             
              ;
         | 
| 2868 | 
            +
             | 
| 2022 2869 | 
             
              _proto.practiceGetAccounts = function practiceGetAccounts(practiceUuid) {
         | 
| 2023 2870 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts");
         | 
| 2024 2871 | 
             
              };
         | 
| 2872 | 
            +
             | 
| 2025 2873 | 
             
              _proto.practiceGetAccount = function practiceGetAccount(practiceUuid, accountUuid) {
         | 
| 2026 2874 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/accounts/" + accountUuid);
         | 
| 2027 2875 | 
             
              }
         | 
| @@ -2030,7 +2878,9 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2030 2878 | 
             
               * @param practiceUuid the uuid of the practice
         | 
| 2031 2879 | 
             
               * @param kind (optional) the kind of WorkflowType to filter in
         | 
| 2032 2880 | 
             
               * @returns a list of PracticeWorkflow
         | 
| 2033 | 
            -
                | 
| 2881 | 
            +
               */
         | 
| 2882 | 
            +
              ;
         | 
| 2883 | 
            +
             | 
| 2034 2884 | 
             
              _proto.practiceGetWorkflows = function practiceGetWorkflows(practiceUuid, kind) {
         | 
| 2035 2885 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows", {
         | 
| 2036 2886 | 
             
                  params: {
         | 
| @@ -2038,11 +2888,12 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2038 2888 | 
             
                  }
         | 
| 2039 2889 | 
             
                });
         | 
| 2040 2890 | 
             
              };
         | 
| 2891 | 
            +
             | 
| 2041 2892 | 
             
              _proto.practiceGetWorkflow = function practiceGetWorkflow(practiceUuid, workflowType) {
         | 
| 2042 2893 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/workflows/" + workflowType);
         | 
| 2043 | 
            -
              }
         | 
| 2044 | 
            -
              /// Plans
         | 
| 2894 | 
            +
              } /// Plans
         | 
| 2045 2895 | 
             
              ;
         | 
| 2896 | 
            +
             | 
| 2046 2897 | 
             
              _proto.practiceGetPlans = function practiceGetPlans(practiceUuid, planType) {
         | 
| 2047 2898 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans", {
         | 
| 2048 2899 | 
             
                  params: {
         | 
| @@ -2050,14 +2901,16 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2050 2901 | 
             
                  }
         | 
| 2051 2902 | 
             
                });
         | 
| 2052 2903 | 
             
              };
         | 
| 2904 | 
            +
             | 
| 2053 2905 | 
             
              _proto.practiceGetPlan = function practiceGetPlan(practiceUuid, planId) {
         | 
| 2054 2906 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId);
         | 
| 2055 2907 | 
             
              };
         | 
| 2908 | 
            +
             | 
| 2056 2909 | 
             
              _proto.practiceGetPlanPrices = function practiceGetPlanPrices(practiceUuid, planId) {
         | 
| 2057 2910 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/plans/" + planId + "/prices");
         | 
| 2058 | 
            -
              }
         | 
| 2059 | 
            -
              // Payments
         | 
| 2911 | 
            +
              } // Payments
         | 
| 2060 2912 | 
             
              ;
         | 
| 2913 | 
            +
             | 
| 2061 2914 | 
             
              _proto.practiceGetPayments = function practiceGetPayments(practiceUuid, statusPayment, withConsultUUIDNULL, perPage, indexPage) {
         | 
| 2062 2915 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments", {
         | 
| 2063 2916 | 
             
                  params: {
         | 
| @@ -2068,14 +2921,16 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2068 2921 | 
             
                  }
         | 
| 2069 2922 | 
             
                });
         | 
| 2070 2923 | 
             
              };
         | 
| 2924 | 
            +
             | 
| 2071 2925 | 
             
              _proto.practiceGetPayment = function practiceGetPayment(practiceUuid, idStripeInvoiceOrPaymentIntent) {
         | 
| 2072 2926 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + idStripeInvoiceOrPaymentIntent);
         | 
| 2073 2927 | 
             
              };
         | 
| 2928 | 
            +
             | 
| 2074 2929 | 
             
              _proto.practiceGetPaymentForStripePaymentIntentWithID = function practiceGetPaymentForStripePaymentIntentWithID(practiceUuid, stripePaymentIntentId) {
         | 
| 2075 2930 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/" + stripePaymentIntentId);
         | 
| 2076 | 
            -
              }
         | 
| 2077 | 
            -
              // Payments Intent
         | 
| 2931 | 
            +
              } // Payments Intent
         | 
| 2078 2932 | 
             
              ;
         | 
| 2933 | 
            +
             | 
| 2079 2934 | 
             
              _proto.practiceGetPaymentsIntents = function practiceGetPaymentsIntents(practiceUuid, planType) {
         | 
| 2080 2935 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents", {
         | 
| 2081 2936 | 
             
                  params: {
         | 
| @@ -2087,7 +2942,9 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2087 2942 | 
             
               * This function return the user hased email to be use for creating payment intent
         | 
| 2088 2943 | 
             
               * @param email the email to hash
         | 
| 2089 2944 | 
             
               * @returns a hashed email
         | 
| 2090 | 
            -
                | 
| 2945 | 
            +
               */
         | 
| 2946 | 
            +
              ;
         | 
| 2947 | 
            +
             | 
| 2091 2948 | 
             
              _proto.getPaymentIntentHashedEmail = function getPaymentIntentHashedEmail(email) {
         | 
| 2092 2949 | 
             
                return hashToBase64String(email.toLowerCase());
         | 
| 2093 2950 | 
             
              }
         | 
| @@ -2101,7 +2958,9 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2101 2958 | 
             
               * @param promotionCode (optional) promotion code to apply
         | 
| 2102 2959 | 
             
               * @param requestMetadata (optional) the request metadata to use. If defined, when payment service call our hooks in practice, it will use it to do required action (create a consult, refill a consult, etc.).
         | 
| 2103 2960 | 
             
               * @returns
         | 
| 2104 | 
            -
                | 
| 2961 | 
            +
               */
         | 
| 2962 | 
            +
              ;
         | 
| 2963 | 
            +
             | 
| 2105 2964 | 
             
              _proto.practiceCreatePaymentsIntent = function practiceCreatePaymentsIntent(practiceUuid, planId, userEmail, isoLocality, url_subdomain, requestMetadata) {
         | 
| 2106 2965 | 
             
                return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/", {
         | 
| 2107 2966 | 
             
                  idPlan: planId,
         | 
| @@ -2114,6 +2973,7 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2114 2973 | 
             
                  }
         | 
| 2115 2974 | 
             
                });
         | 
| 2116 2975 | 
             
              };
         | 
| 2976 | 
            +
             | 
| 2117 2977 | 
             
              _proto.practiceGetPaymentsIntent = function practiceGetPaymentsIntent(practiceUuid, paymentIntentId) {
         | 
| 2118 2978 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + paymentIntentId);
         | 
| 2119 2979 | 
             
              }
         | 
| @@ -2126,7 +2986,9 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2126 2986 | 
             
               * @param promotionCode (optional) promotional code to apply
         | 
| 2127 2987 | 
             
               * @param finalize (optional) if true will finalize the PracticePaymentIntent and related Stripe.Invoice. Once, finalized you cannot modify the PracticePaymentIntent anymore.
         | 
| 2128 2988 | 
             
               * @returns the updated PracticePaymentIntent
         | 
| 2129 | 
            -
                | 
| 2989 | 
            +
               */
         | 
| 2990 | 
            +
              ;
         | 
| 2991 | 
            +
             | 
| 2130 2992 | 
             
              _proto.practiceUpdatePaymentsIntent = function practiceUpdatePaymentsIntent(practiceUuid, idPraticePaymentIntent, practicePaymentIntent, userEmail, promotionCode, finalize) {
         | 
| 2131 2993 | 
             
                return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/intents/" + idPraticePaymentIntent, _extends({}, practicePaymentIntent, {
         | 
| 2132 2994 | 
             
                  hashUserEmail: userEmail ? this.getPaymentIntentHashedEmail(userEmail) : undefined
         | 
| @@ -2141,103 +3003,125 @@ var PracticeService = /*#__PURE__*/function () { | |
| 2141 3003 | 
             
               * Invoice
         | 
| 2142 3004 | 
             
               * @param practiceUuid UUID of the practice to get the invoice from
         | 
| 2143 3005 | 
             
               * @param invoiceId ID of the invoice in stripe
         | 
| 2144 | 
            -
                | 
| 3006 | 
            +
               */
         | 
| 3007 | 
            +
              ;
         | 
| 3008 | 
            +
             | 
| 2145 3009 | 
             
              _proto.getInvoice = function getInvoice(practiceUuid, invoiceId) {
         | 
| 2146 3010 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/payments/invoices/" + invoiceId);
         | 
| 2147 | 
            -
              }
         | 
| 2148 | 
            -
              // Practitioner
         | 
| 3011 | 
            +
              } // Practitioner
         | 
| 2149 3012 | 
             
              ;
         | 
| 3013 | 
            +
             | 
| 2150 3014 | 
             
              _proto.practiceGetPractitioners = function practiceGetPractitioners(practiceUuid) {
         | 
| 2151 3015 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners");
         | 
| 2152 3016 | 
             
              };
         | 
| 3017 | 
            +
             | 
| 2153 3018 | 
             
              _proto.practiceUpdatePractitioner = function practiceUpdatePractitioner(practiceUuid, practitionerUuid, requestBody) {
         | 
| 2154 3019 | 
             
                return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid, requestBody);
         | 
| 2155 3020 | 
             
              };
         | 
| 3021 | 
            +
             | 
| 2156 3022 | 
             
              _proto.practiceGetPractitioner = function practiceGetPractitioner(practiceUuid, practitionerUuid) {
         | 
| 2157 3023 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid);
         | 
| 2158 | 
            -
              }
         | 
| 2159 | 
            -
              // Practitioner Licenses
         | 
| 3024 | 
            +
              } // Practitioner Licenses
         | 
| 2160 3025 | 
             
              ;
         | 
| 3026 | 
            +
             | 
| 2161 3027 | 
             
              _proto.practiceGetPractitionerLicenses = function practiceGetPractitionerLicenses(practiceUuid, practitionerUuid) {
         | 
| 2162 3028 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses");
         | 
| 2163 3029 | 
             
              };
         | 
| 3030 | 
            +
             | 
| 2164 3031 | 
             
              _proto.practiceCreatePractitionerLicense = function practiceCreatePractitionerLicense(practiceUuid, practitionerUuid, requestBody) {
         | 
| 2165 3032 | 
             
                return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses", requestBody);
         | 
| 2166 3033 | 
             
              };
         | 
| 3034 | 
            +
             | 
| 2167 3035 | 
             
              _proto.practiceUpdatePractitionerLicense = function practiceUpdatePractitionerLicense(practiceUuid, practitionerUuid, licenseId, requestBody) {
         | 
| 2168 3036 | 
             
                return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId, requestBody);
         | 
| 2169 3037 | 
             
              };
         | 
| 3038 | 
            +
             | 
| 2170 3039 | 
             
              _proto.practiceGetPractitionerLicense = function practiceGetPractitionerLicense(practiceUuid, practitionerUuid, licenseId) {
         | 
| 2171 3040 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/licenses/" + licenseId);
         | 
| 2172 | 
            -
              }
         | 
| 2173 | 
            -
              // Practitioner Preferences
         | 
| 3041 | 
            +
              } // Practitioner Preferences
         | 
| 2174 3042 | 
             
              ;
         | 
| 3043 | 
            +
             | 
| 2175 3044 | 
             
              _proto.practiceGetPractitionerPreferences = function practiceGetPractitionerPreferences(practiceUuid, practitionerUuid) {
         | 
| 2176 3045 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences");
         | 
| 2177 3046 | 
             
              };
         | 
| 3047 | 
            +
             | 
| 2178 3048 | 
             
              _proto.practiceCreatePractitionerPreference = function practiceCreatePractitionerPreference(practiceUuid, practitionerUuid, requestBody) {
         | 
| 2179 3049 | 
             
                return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences", requestBody);
         | 
| 2180 3050 | 
             
              };
         | 
| 3051 | 
            +
             | 
| 2181 3052 | 
             
              _proto.practiceUpdatePractitionerPreference = function practiceUpdatePractitionerPreference(practiceUuid, practitionerUuid, preferenceId, requestBody) {
         | 
| 2182 3053 | 
             
                return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId, requestBody);
         | 
| 2183 3054 | 
             
              };
         | 
| 3055 | 
            +
             | 
| 2184 3056 | 
             
              _proto.practiceGetPractitionerPreference = function practiceGetPractitionerPreference(practiceUuid, practitionerUuid, preferenceId) {
         | 
| 2185 3057 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/preferences/" + preferenceId);
         | 
| 2186 | 
            -
              }
         | 
| 2187 | 
            -
              // Practitioner Roles
         | 
| 3058 | 
            +
              } // Practitioner Roles
         | 
| 2188 3059 | 
             
              ;
         | 
| 3060 | 
            +
             | 
| 2189 3061 | 
             
              _proto.practiceGetPractitionerRoles = function practiceGetPractitionerRoles(practiceUuid, practitionerUuid) {
         | 
| 2190 3062 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
         | 
| 2191 3063 | 
             
              };
         | 
| 3064 | 
            +
             | 
| 2192 3065 | 
             
              _proto.practiceCreatePractitionerRole = function practiceCreatePractitionerRole(practiceUuid, practitionerUuid, requestBody) {
         | 
| 2193 3066 | 
             
                return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles", requestBody);
         | 
| 2194 3067 | 
             
              };
         | 
| 3068 | 
            +
             | 
| 2195 3069 | 
             
              _proto.practiceDeletePractitionerRoles = function practiceDeletePractitionerRoles(practiceUuid, practitionerUuid) {
         | 
| 2196 3070 | 
             
                return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles");
         | 
| 2197 3071 | 
             
              };
         | 
| 3072 | 
            +
             | 
| 2198 3073 | 
             
              _proto.practiceUpdatePractitionerRole = function practiceUpdatePractitionerRole(practiceUuid, practitionerUuid, roleId, requestBody) {
         | 
| 2199 3074 | 
             
                return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId, requestBody);
         | 
| 2200 3075 | 
             
              };
         | 
| 3076 | 
            +
             | 
| 2201 3077 | 
             
              _proto.practiceGetPractitionerRole = function practiceGetPractitionerRole(practiceUuid, practitionerUuid, roleId) {
         | 
| 2202 3078 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
         | 
| 2203 3079 | 
             
              };
         | 
| 3080 | 
            +
             | 
| 2204 3081 | 
             
              _proto.practiceDeletePractitionerRole = function practiceDeletePractitionerRole(practiceUuid, practitionerUuid, roleId) {
         | 
| 2205 3082 | 
             
                return this.api.deleteRequest(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/roles/" + roleId);
         | 
| 2206 | 
            -
              }
         | 
| 2207 | 
            -
             | 
| 3083 | 
            +
              } // Practitioner signature
         | 
| 3084 | 
            +
             | 
| 2208 3085 | 
             
              /**
         | 
| 2209 3086 | 
             
               * This function returns the practitioner's signature as a Blob
         | 
| 2210 3087 | 
             
               * @param practiceUuid the practice uuid of the practitioner
         | 
| 2211 3088 | 
             
               * @param practitionerUuid the practitioner uuid
         | 
| 2212 3089 | 
             
               * @returns a blob representing the signature
         | 
| 2213 | 
            -
                | 
| 3090 | 
            +
               */
         | 
| 3091 | 
            +
              ;
         | 
| 3092 | 
            +
             | 
| 2214 3093 | 
             
              _proto.practiceGetPractitionerSignature = function practiceGetPractitionerSignature(practiceUuid, practitionerUuid) {
         | 
| 2215 3094 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/practitioners/" + practitionerUuid + "/signature", {
         | 
| 2216 3095 | 
             
                  responseType: 'blob'
         | 
| 2217 3096 | 
             
                });
         | 
| 2218 | 
            -
              }
         | 
| 2219 | 
            -
              // Assignments
         | 
| 3097 | 
            +
              } // Assignments
         | 
| 2220 3098 | 
             
              ;
         | 
| 3099 | 
            +
             | 
| 2221 3100 | 
             
              _proto.practiceGetAssignments = function practiceGetAssignments(practiceUuid) {
         | 
| 2222 3101 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments");
         | 
| 2223 3102 | 
             
              };
         | 
| 3103 | 
            +
             | 
| 2224 3104 | 
             
              _proto.practiceCreateAssignment = function practiceCreateAssignment(practiceUuid, requestBody) {
         | 
| 2225 3105 | 
             
                return this.api.post(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments", requestBody);
         | 
| 2226 3106 | 
             
              };
         | 
| 3107 | 
            +
             | 
| 2227 3108 | 
             
              _proto.practiceUpdateAssignment = function practiceUpdateAssignment(practiceUuid, assignmentId, requestBody) {
         | 
| 2228 3109 | 
             
                return this.api.put(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId, requestBody);
         | 
| 2229 3110 | 
             
              };
         | 
| 3111 | 
            +
             | 
| 2230 3112 | 
             
              _proto.practiceGetAssignment = function practiceGetAssignment(practiceUuid, assignmentId) {
         | 
| 2231 3113 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/assignments/" + assignmentId);
         | 
| 2232 | 
            -
              }
         | 
| 2233 | 
            -
              // Quotas
         | 
| 3114 | 
            +
              } // Quotas
         | 
| 2234 3115 | 
             
              ;
         | 
| 3116 | 
            +
             | 
| 2235 3117 | 
             
              _proto.practiceGetQuotas = function practiceGetQuotas(practiceUuid) {
         | 
| 2236 3118 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas");
         | 
| 2237 3119 | 
             
              };
         | 
| 3120 | 
            +
             | 
| 2238 3121 | 
             
              _proto.practiceGetQuota = function practiceGetQuota(practiceUuid, quotaId) {
         | 
| 2239 3122 | 
             
                return this.api.get(this.baseURL + "/v1/practices/" + practiceUuid + "/quotas/" + quotaId);
         | 
| 2240 3123 | 
             
              };
         | 
| 3124 | 
            +
             | 
| 2241 3125 | 
             
              return PracticeService;
         | 
| 2242 3126 | 
             
            }();
         | 
| 2243 3127 |  | 
| @@ -2246,35 +3130,44 @@ var TellerService = /*#__PURE__*/function () { | |
| 2246 3130 | 
             
                this.api = api;
         | 
| 2247 3131 | 
             
                this.baseURL = baseURL;
         | 
| 2248 3132 | 
             
              }
         | 
| 3133 | 
            +
             | 
| 2249 3134 | 
             
              var _proto = TellerService.prototype;
         | 
| 3135 | 
            +
             | 
| 2250 3136 | 
             
              _proto.lockboxDataStore = /*#__PURE__*/function () {
         | 
| 2251 | 
            -
                var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2252 | 
            -
                  return  | 
| 2253 | 
            -
                    while (1)  | 
| 2254 | 
            -
                       | 
| 2255 | 
            -
                         | 
| 2256 | 
            -
                          options  | 
| 2257 | 
            -
                             | 
| 2258 | 
            -
             | 
| 2259 | 
            -
             | 
| 2260 | 
            -
                        return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data", req, {
         | 
| 2261 | 
            -
                          params: {
         | 
| 2262 | 
            -
                            lockbox_owner_uuid: lockboxOwnerUuid,
         | 
| 2263 | 
            -
                            data_uuid: previousDataUuid,
         | 
| 2264 | 
            -
                            update_medical_status: options.updateMedicalStatus
         | 
| 3137 | 
            +
                var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid, options) {
         | 
| 3138 | 
            +
                  return runtime_1.wrap(function _callee$(_context) {
         | 
| 3139 | 
            +
                    while (1) {
         | 
| 3140 | 
            +
                      switch (_context.prev = _context.next) {
         | 
| 3141 | 
            +
                        case 0:
         | 
| 3142 | 
            +
                          if (options === void 0) {
         | 
| 3143 | 
            +
                            options = {
         | 
| 3144 | 
            +
                              updateMedicalStatus: true
         | 
| 3145 | 
            +
                            };
         | 
| 2265 3146 | 
             
                          }
         | 
| 2266 | 
            -
             | 
| 2267 | 
            -
             | 
| 2268 | 
            -
             | 
| 2269 | 
            -
             | 
| 3147 | 
            +
             | 
| 3148 | 
            +
                          return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data", req, {
         | 
| 3149 | 
            +
                            params: {
         | 
| 3150 | 
            +
                              lockbox_owner_uuid: lockboxOwnerUuid,
         | 
| 3151 | 
            +
                              data_uuid: previousDataUuid,
         | 
| 3152 | 
            +
                              update_medical_status: options.updateMedicalStatus
         | 
| 3153 | 
            +
                            }
         | 
| 3154 | 
            +
                          }));
         | 
| 3155 | 
            +
             | 
| 3156 | 
            +
                        case 2:
         | 
| 3157 | 
            +
                        case "end":
         | 
| 3158 | 
            +
                          return _context.stop();
         | 
| 3159 | 
            +
                      }
         | 
| 2270 3160 | 
             
                    }
         | 
| 2271 3161 | 
             
                  }, _callee, this);
         | 
| 2272 3162 | 
             
                }));
         | 
| 3163 | 
            +
             | 
| 2273 3164 | 
             
                function lockboxDataStore(_x, _x2, _x3, _x4, _x5) {
         | 
| 2274 3165 | 
             
                  return _lockboxDataStore.apply(this, arguments);
         | 
| 2275 3166 | 
             
                }
         | 
| 3167 | 
            +
             | 
| 2276 3168 | 
             
                return lockboxDataStore;
         | 
| 2277 3169 | 
             
              }();
         | 
| 3170 | 
            +
             | 
| 2278 3171 | 
             
              _proto.updateConsultByUUID = function updateConsultByUUID(patientUuid, uuidConsult, statusMedical, closedReasonType, closedReasonDescription, neverExpires) {
         | 
| 2279 3172 | 
             
                return this.api.put(this.baseURL + "/v1/consults/" + uuidConsult, {
         | 
| 2280 3173 | 
             
                  patientUuid: patientUuid,
         | 
| @@ -2292,7 +3185,9 @@ var TellerService = /*#__PURE__*/function () { | |
| 2292 3185 | 
             
               * @param consultationShortId  the consultation short id
         | 
| 2293 3186 | 
             
               * @param fax the address where to send the fax
         | 
| 2294 3187 | 
             
               * @returns void
         | 
| 2295 | 
            -
                | 
| 3188 | 
            +
               */
         | 
| 3189 | 
            +
              ;
         | 
| 3190 | 
            +
             | 
| 2296 3191 | 
             
              _proto.notifyFaxFailed = function notifyFaxFailed(practiceUuid, consultationUuid, consultationShortId, fax) {
         | 
| 2297 3192 | 
             
                return this.api.post(this.baseURL + "/v1/fax-failed", {
         | 
| 2298 3193 | 
             
                  consultationUuid: consultationUuid,
         | 
| @@ -2309,7 +3204,9 @@ var TellerService = /*#__PURE__*/function () { | |
| 2309 3204 | 
             
               * @todo - Make service only exposed route
         | 
| 2310 3205 | 
             
               * @param uuidConsult the uuid of the consult to reassign
         | 
| 2311 3206 | 
             
               * @param newPractitionerUuid the uuid of the practitioner that will get reassigned
         | 
| 2312 | 
            -
                | 
| 3207 | 
            +
               */
         | 
| 3208 | 
            +
              ;
         | 
| 3209 | 
            +
             | 
| 2313 3210 | 
             
              _proto.reassignmentEmail = function reassignmentEmail(uuidConsult, newPractitionerUuid) {
         | 
| 2314 3211 | 
             
                return this.api.post(this.baseURL + "/v1/consult/" + uuidConsult + "/reassignment-email", {
         | 
| 2315 3212 | 
             
                  newPractitionerUuid: newPractitionerUuid
         | 
| @@ -2321,7 +3218,9 @@ var TellerService = /*#__PURE__*/function () { | |
| 2321 3218 | 
             
               * @param consult
         | 
| 2322 3219 | 
             
               * @param patientUuid
         | 
| 2323 3220 | 
             
               * @returns void
         | 
| 2324 | 
            -
                | 
| 3221 | 
            +
               */
         | 
| 3222 | 
            +
              ;
         | 
| 3223 | 
            +
             | 
| 2325 3224 | 
             
              _proto.sendOnlineFaxSuccessfulEmail = function sendOnlineFaxSuccessfulEmail(consult, patientUuid) {
         | 
| 2326 3225 | 
             
                return this.api.post(this.baseURL + "/v1/online-fax-notify", {
         | 
| 2327 3226 | 
             
                  consult: consult,
         | 
| @@ -2332,10 +3231,13 @@ var TellerService = /*#__PURE__*/function () { | |
| 2332 3231 | 
             
               * This function will send an email to patient to allow them to resume the consult.
         | 
| 2333 3232 | 
             
               * @param req the body of the resume consult request
         | 
| 2334 3233 | 
             
               * @returns void
         | 
| 2335 | 
            -
                | 
| 3234 | 
            +
               */
         | 
| 3235 | 
            +
              ;
         | 
| 3236 | 
            +
             | 
| 2336 3237 | 
             
              _proto.sendResumeConsultEmail = function sendResumeConsultEmail(req) {
         | 
| 2337 3238 | 
             
                return this.api.post(this.baseURL + "/v1/resume-consult-email", req);
         | 
| 2338 3239 | 
             
              };
         | 
| 3240 | 
            +
             | 
| 2339 3241 | 
             
              return TellerService;
         | 
| 2340 3242 | 
             
            }();
         | 
| 2341 3243 |  | 
| @@ -2344,85 +3246,110 @@ var VaultService = /*#__PURE__*/function () { | |
| 2344 3246 | 
             
                this.api = api;
         | 
| 2345 3247 | 
             
                this.baseURL = baseURL;
         | 
| 2346 3248 | 
             
              }
         | 
| 3249 | 
            +
             | 
| 2347 3250 | 
             
              var _proto = VaultService.prototype;
         | 
| 3251 | 
            +
             | 
| 2348 3252 | 
             
              _proto.lockboxCreate = /*#__PURE__*/function () {
         | 
| 2349 | 
            -
                var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2350 | 
            -
                  return  | 
| 2351 | 
            -
                    while (1)  | 
| 2352 | 
            -
                       | 
| 2353 | 
            -
                         | 
| 2354 | 
            -
             | 
| 2355 | 
            -
             | 
| 2356 | 
            -
                         | 
| 3253 | 
            +
                var _lockboxCreate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(lockboxMetadata) {
         | 
| 3254 | 
            +
                  return runtime_1.wrap(function _callee$(_context) {
         | 
| 3255 | 
            +
                    while (1) {
         | 
| 3256 | 
            +
                      switch (_context.prev = _context.next) {
         | 
| 3257 | 
            +
                        case 0:
         | 
| 3258 | 
            +
                          return _context.abrupt("return", this.api.post(this.baseURL + "/v1/lockbox", lockboxMetadata));
         | 
| 3259 | 
            +
             | 
| 3260 | 
            +
                        case 1:
         | 
| 3261 | 
            +
                        case "end":
         | 
| 3262 | 
            +
                          return _context.stop();
         | 
| 3263 | 
            +
                      }
         | 
| 2357 3264 | 
             
                    }
         | 
| 2358 3265 | 
             
                  }, _callee, this);
         | 
| 2359 3266 | 
             
                }));
         | 
| 3267 | 
            +
             | 
| 2360 3268 | 
             
                function lockboxCreate(_x) {
         | 
| 2361 3269 | 
             
                  return _lockboxCreate.apply(this, arguments);
         | 
| 2362 3270 | 
             
                }
         | 
| 3271 | 
            +
             | 
| 2363 3272 | 
             
                return lockboxCreate;
         | 
| 2364 3273 | 
             
              }();
         | 
| 3274 | 
            +
             | 
| 2365 3275 | 
             
              _proto.lockboxMetadataAdd = /*#__PURE__*/function () {
         | 
| 2366 | 
            -
                var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2367 | 
            -
                  return  | 
| 2368 | 
            -
                    while (1)  | 
| 2369 | 
            -
                       | 
| 2370 | 
            -
                         | 
| 2371 | 
            -
                           | 
| 2372 | 
            -
                             | 
| 2373 | 
            -
             | 
| 2374 | 
            -
             | 
| 2375 | 
            -
             | 
| 2376 | 
            -
             | 
| 2377 | 
            -
                         | 
| 3276 | 
            +
                var _lockboxMetadataAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(lockboxUuid, lockboxMetadata, lockboxOwnerUuid) {
         | 
| 3277 | 
            +
                  return runtime_1.wrap(function _callee2$(_context2) {
         | 
| 3278 | 
            +
                    while (1) {
         | 
| 3279 | 
            +
                      switch (_context2.prev = _context2.next) {
         | 
| 3280 | 
            +
                        case 0:
         | 
| 3281 | 
            +
                          return _context2.abrupt("return", this.api.put(this.baseURL + "/v1/lockbox/" + lockboxUuid, lockboxMetadata, {
         | 
| 3282 | 
            +
                            params: {
         | 
| 3283 | 
            +
                              lockbox_owner_uuid: lockboxOwnerUuid
         | 
| 3284 | 
            +
                            }
         | 
| 3285 | 
            +
                          }));
         | 
| 3286 | 
            +
             | 
| 3287 | 
            +
                        case 1:
         | 
| 3288 | 
            +
                        case "end":
         | 
| 3289 | 
            +
                          return _context2.stop();
         | 
| 3290 | 
            +
                      }
         | 
| 2378 3291 | 
             
                    }
         | 
| 2379 3292 | 
             
                  }, _callee2, this);
         | 
| 2380 3293 | 
             
                }));
         | 
| 3294 | 
            +
             | 
| 2381 3295 | 
             
                function lockboxMetadataAdd(_x2, _x3, _x4) {
         | 
| 2382 3296 | 
             
                  return _lockboxMetadataAdd.apply(this, arguments);
         | 
| 2383 3297 | 
             
                }
         | 
| 3298 | 
            +
             | 
| 2384 3299 | 
             
                return lockboxMetadataAdd;
         | 
| 2385 3300 | 
             
              }();
         | 
| 3301 | 
            +
             | 
| 2386 3302 | 
             
              _proto.lockboxSecretGet = /*#__PURE__*/function () {
         | 
| 2387 | 
            -
                var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2388 | 
            -
                  return  | 
| 2389 | 
            -
                    while (1)  | 
| 2390 | 
            -
                       | 
| 2391 | 
            -
                         | 
| 2392 | 
            -
                           | 
| 2393 | 
            -
                             | 
| 2394 | 
            -
             | 
| 2395 | 
            -
             | 
| 2396 | 
            -
             | 
| 2397 | 
            -
             | 
| 2398 | 
            -
                         | 
| 3303 | 
            +
                var _lockboxSecretGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(lockboxUuid, lockboxOwnerUuid) {
         | 
| 3304 | 
            +
                  return runtime_1.wrap(function _callee3$(_context3) {
         | 
| 3305 | 
            +
                    while (1) {
         | 
| 3306 | 
            +
                      switch (_context3.prev = _context3.next) {
         | 
| 3307 | 
            +
                        case 0:
         | 
| 3308 | 
            +
                          return _context3.abrupt("return", this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/secret", {
         | 
| 3309 | 
            +
                            params: {
         | 
| 3310 | 
            +
                              lockbox_owner_uuid: lockboxOwnerUuid
         | 
| 3311 | 
            +
                            }
         | 
| 3312 | 
            +
                          }));
         | 
| 3313 | 
            +
             | 
| 3314 | 
            +
                        case 1:
         | 
| 3315 | 
            +
                        case "end":
         | 
| 3316 | 
            +
                          return _context3.stop();
         | 
| 3317 | 
            +
                      }
         | 
| 2399 3318 | 
             
                    }
         | 
| 2400 3319 | 
             
                  }, _callee3, this);
         | 
| 2401 3320 | 
             
                }));
         | 
| 3321 | 
            +
             | 
| 2402 3322 | 
             
                function lockboxSecretGet(_x5, _x6) {
         | 
| 2403 3323 | 
             
                  return _lockboxSecretGet.apply(this, arguments);
         | 
| 2404 3324 | 
             
                }
         | 
| 3325 | 
            +
             | 
| 2405 3326 | 
             
                return lockboxSecretGet;
         | 
| 2406 3327 | 
             
              }();
         | 
| 3328 | 
            +
             | 
| 2407 3329 | 
             
              _proto.lockboxGrant = /*#__PURE__*/function () {
         | 
| 2408 | 
            -
                var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2409 | 
            -
                  return  | 
| 2410 | 
            -
                    while (1)  | 
| 2411 | 
            -
                       | 
| 2412 | 
            -
                         | 
| 2413 | 
            -
                           | 
| 2414 | 
            -
                             | 
| 2415 | 
            -
             | 
| 2416 | 
            -
             | 
| 2417 | 
            -
             | 
| 2418 | 
            -
             | 
| 2419 | 
            -
                         | 
| 3330 | 
            +
                var _lockboxGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(lockboxUuid, req, lockboxOwnerUuid) {
         | 
| 3331 | 
            +
                  return runtime_1.wrap(function _callee4$(_context4) {
         | 
| 3332 | 
            +
                    while (1) {
         | 
| 3333 | 
            +
                      switch (_context4.prev = _context4.next) {
         | 
| 3334 | 
            +
                        case 0:
         | 
| 3335 | 
            +
                          return _context4.abrupt("return", this.api.post(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/grant", req, {
         | 
| 3336 | 
            +
                            params: {
         | 
| 3337 | 
            +
                              lockbox_owner_uuid: lockboxOwnerUuid
         | 
| 3338 | 
            +
                            }
         | 
| 3339 | 
            +
                          }));
         | 
| 3340 | 
            +
             | 
| 3341 | 
            +
                        case 1:
         | 
| 3342 | 
            +
                        case "end":
         | 
| 3343 | 
            +
                          return _context4.stop();
         | 
| 3344 | 
            +
                      }
         | 
| 2420 3345 | 
             
                    }
         | 
| 2421 3346 | 
             
                  }, _callee4, this);
         | 
| 2422 3347 | 
             
                }));
         | 
| 3348 | 
            +
             | 
| 2423 3349 | 
             
                function lockboxGrant(_x7, _x8, _x9) {
         | 
| 2424 3350 | 
             
                  return _lockboxGrant.apply(this, arguments);
         | 
| 2425 3351 | 
             
                }
         | 
| 3352 | 
            +
             | 
| 2426 3353 | 
             
                return lockboxGrant;
         | 
| 2427 3354 | 
             
              }()
         | 
| 2428 3355 | 
             
              /**
         | 
| @@ -2431,23 +3358,29 @@ var VaultService = /*#__PURE__*/function () { | |
| 2431 3358 | 
             
               * @returns decrypted lockboxes granted to user
         | 
| 2432 3359 | 
             
               */
         | 
| 2433 3360 | 
             
              ;
         | 
| 3361 | 
            +
             | 
| 2434 3362 | 
             
              _proto.grantsGet =
         | 
| 2435 3363 | 
             
              /*#__PURE__*/
         | 
| 2436 3364 | 
             
              function () {
         | 
| 2437 | 
            -
                var _grantsGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2438 | 
            -
                  return  | 
| 2439 | 
            -
                    while (1)  | 
| 2440 | 
            -
                       | 
| 2441 | 
            -
                         | 
| 2442 | 
            -
             | 
| 2443 | 
            -
             | 
| 2444 | 
            -
                         | 
| 3365 | 
            +
                var _grantsGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
         | 
| 3366 | 
            +
                  return runtime_1.wrap(function _callee5$(_context5) {
         | 
| 3367 | 
            +
                    while (1) {
         | 
| 3368 | 
            +
                      switch (_context5.prev = _context5.next) {
         | 
| 3369 | 
            +
                        case 0:
         | 
| 3370 | 
            +
                          return _context5.abrupt("return", this.api.get(this.baseURL + "/v1/grants"));
         | 
| 3371 | 
            +
             | 
| 3372 | 
            +
                        case 1:
         | 
| 3373 | 
            +
                        case "end":
         | 
| 3374 | 
            +
                          return _context5.stop();
         | 
| 3375 | 
            +
                      }
         | 
| 2445 3376 | 
             
                    }
         | 
| 2446 3377 | 
             
                  }, _callee5, this);
         | 
| 2447 3378 | 
             
                }));
         | 
| 3379 | 
            +
             | 
| 2448 3380 | 
             
                function grantsGet() {
         | 
| 2449 3381 | 
             
                  return _grantsGet.apply(this, arguments);
         | 
| 2450 3382 | 
             
                }
         | 
| 3383 | 
            +
             | 
| 2451 3384 | 
             
                return grantsGet;
         | 
| 2452 3385 | 
             
              }()
         | 
| 2453 3386 | 
             
              /**
         | 
| @@ -2461,112 +3394,141 @@ var VaultService = /*#__PURE__*/function () { | |
| 2461 3394 | 
             
               * @returns
         | 
| 2462 3395 | 
             
               */
         | 
| 2463 3396 | 
             
              ;
         | 
| 3397 | 
            +
             | 
| 2464 3398 | 
             
              _proto.lockboxDataStore =
         | 
| 2465 3399 | 
             
              /*#__PURE__*/
         | 
| 2466 3400 | 
             
              function () {
         | 
| 2467 | 
            -
                var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2468 | 
            -
                  return  | 
| 2469 | 
            -
                    while (1)  | 
| 2470 | 
            -
                       | 
| 2471 | 
            -
                         | 
| 2472 | 
            -
                           | 
| 2473 | 
            -
                             | 
| 2474 | 
            -
             | 
| 2475 | 
            -
             | 
| 2476 | 
            -
             | 
| 2477 | 
            -
             | 
| 2478 | 
            -
             | 
| 2479 | 
            -
                         | 
| 3401 | 
            +
                var _lockboxDataStore = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(lockboxUuid, req, lockboxOwnerUuid, previousDataUuid) {
         | 
| 3402 | 
            +
                  return runtime_1.wrap(function _callee6$(_context6) {
         | 
| 3403 | 
            +
                    while (1) {
         | 
| 3404 | 
            +
                      switch (_context6.prev = _context6.next) {
         | 
| 3405 | 
            +
                        case 0:
         | 
| 3406 | 
            +
                          return _context6.abrupt("return", this.api.post(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data", req, {
         | 
| 3407 | 
            +
                            params: {
         | 
| 3408 | 
            +
                              lockbox_owner_uuid: lockboxOwnerUuid,
         | 
| 3409 | 
            +
                              data_uuid: previousDataUuid
         | 
| 3410 | 
            +
                            }
         | 
| 3411 | 
            +
                          }));
         | 
| 3412 | 
            +
             | 
| 3413 | 
            +
                        case 1:
         | 
| 3414 | 
            +
                        case "end":
         | 
| 3415 | 
            +
                          return _context6.stop();
         | 
| 3416 | 
            +
                      }
         | 
| 2480 3417 | 
             
                    }
         | 
| 2481 3418 | 
             
                  }, _callee6, this);
         | 
| 2482 3419 | 
             
                }));
         | 
| 3420 | 
            +
             | 
| 2483 3421 | 
             
                function lockboxDataStore(_x10, _x11, _x12, _x13) {
         | 
| 2484 3422 | 
             
                  return _lockboxDataStore.apply(this, arguments);
         | 
| 2485 3423 | 
             
                }
         | 
| 3424 | 
            +
             | 
| 2486 3425 | 
             
                return lockboxDataStore;
         | 
| 2487 3426 | 
             
              }();
         | 
| 3427 | 
            +
             | 
| 2488 3428 | 
             
              _proto.lockboxDataGet = /*#__PURE__*/function () {
         | 
| 2489 | 
            -
                var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 3429 | 
            +
                var _lockboxDataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(lockboxUuid, dataUuid, lockboxOwnerUuid, stream) {
         | 
| 2490 3430 | 
             
                  var data;
         | 
| 2491 | 
            -
                  return  | 
| 2492 | 
            -
                    while (1)  | 
| 2493 | 
            -
                       | 
| 2494 | 
            -
                         | 
| 2495 | 
            -
                          stream  | 
| 2496 | 
            -
             | 
| 2497 | 
            -
                        _context7.next = 3;
         | 
| 2498 | 
            -
                        return this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data/" + dataUuid, {
         | 
| 2499 | 
            -
                          params: {
         | 
| 2500 | 
            -
                            lockbox_owner_uuid: lockboxOwnerUuid,
         | 
| 2501 | 
            -
                            stream: stream
         | 
| 3431 | 
            +
                  return runtime_1.wrap(function _callee7$(_context7) {
         | 
| 3432 | 
            +
                    while (1) {
         | 
| 3433 | 
            +
                      switch (_context7.prev = _context7.next) {
         | 
| 3434 | 
            +
                        case 0:
         | 
| 3435 | 
            +
                          if (stream === void 0) {
         | 
| 3436 | 
            +
                            stream = true;
         | 
| 2502 3437 | 
             
                          }
         | 
| 2503 | 
            -
             | 
| 2504 | 
            -
             | 
| 2505 | 
            -
             | 
| 2506 | 
            -
             | 
| 2507 | 
            -
             | 
| 2508 | 
            -
             | 
| 2509 | 
            -
             | 
| 2510 | 
            -
             | 
| 2511 | 
            -
             | 
| 2512 | 
            -
                         | 
| 2513 | 
            -
             | 
| 2514 | 
            -
             | 
| 2515 | 
            -
             | 
| 2516 | 
            -
             | 
| 2517 | 
            -
             | 
| 3438 | 
            +
             | 
| 3439 | 
            +
                          _context7.next = 3;
         | 
| 3440 | 
            +
                          return this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/data/" + dataUuid, {
         | 
| 3441 | 
            +
                            params: {
         | 
| 3442 | 
            +
                              lockbox_owner_uuid: lockboxOwnerUuid,
         | 
| 3443 | 
            +
                              stream: stream
         | 
| 3444 | 
            +
                            }
         | 
| 3445 | 
            +
                          });
         | 
| 3446 | 
            +
             | 
| 3447 | 
            +
                        case 3:
         | 
| 3448 | 
            +
                          data = _context7.sent;
         | 
| 3449 | 
            +
             | 
| 3450 | 
            +
                          if (!stream) {
         | 
| 3451 | 
            +
                            _context7.next = 6;
         | 
| 3452 | 
            +
                            break;
         | 
| 3453 | 
            +
                          }
         | 
| 3454 | 
            +
             | 
| 3455 | 
            +
                          return _context7.abrupt("return", {
         | 
| 3456 | 
            +
                            data: data
         | 
| 3457 | 
            +
                          });
         | 
| 3458 | 
            +
             | 
| 3459 | 
            +
                        case 6:
         | 
| 3460 | 
            +
                          return _context7.abrupt("return", data);
         | 
| 3461 | 
            +
             | 
| 3462 | 
            +
                        case 7:
         | 
| 3463 | 
            +
                        case "end":
         | 
| 3464 | 
            +
                          return _context7.stop();
         | 
| 3465 | 
            +
                      }
         | 
| 2518 3466 | 
             
                    }
         | 
| 2519 3467 | 
             
                  }, _callee7, this);
         | 
| 2520 3468 | 
             
                }));
         | 
| 3469 | 
            +
             | 
| 2521 3470 | 
             
                function lockboxDataGet(_x14, _x15, _x16, _x17) {
         | 
| 2522 3471 | 
             
                  return _lockboxDataGet.apply(this, arguments);
         | 
| 2523 3472 | 
             
                }
         | 
| 3473 | 
            +
             | 
| 2524 3474 | 
             
                return lockboxDataGet;
         | 
| 2525 3475 | 
             
              }();
         | 
| 3476 | 
            +
             | 
| 2526 3477 | 
             
              _proto.lockboxManifestGet = /*#__PURE__*/function () {
         | 
| 2527 | 
            -
                var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2528 | 
            -
                  return  | 
| 2529 | 
            -
                    while (1)  | 
| 2530 | 
            -
                       | 
| 2531 | 
            -
                         | 
| 2532 | 
            -
                           | 
| 2533 | 
            -
                             | 
| 2534 | 
            -
             | 
| 2535 | 
            -
             | 
| 2536 | 
            -
             | 
| 2537 | 
            -
             | 
| 2538 | 
            -
             | 
| 2539 | 
            -
                         | 
| 3478 | 
            +
                var _lockboxManifestGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(lockboxUuid, filter, lockboxOwnerUuid) {
         | 
| 3479 | 
            +
                  return runtime_1.wrap(function _callee8$(_context8) {
         | 
| 3480 | 
            +
                    while (1) {
         | 
| 3481 | 
            +
                      switch (_context8.prev = _context8.next) {
         | 
| 3482 | 
            +
                        case 0:
         | 
| 3483 | 
            +
                          return _context8.abrupt("return", this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid, {
         | 
| 3484 | 
            +
                            params: {
         | 
| 3485 | 
            +
                              lockbox_owner_uuid: lockboxOwnerUuid,
         | 
| 3486 | 
            +
                              filter: filter
         | 
| 3487 | 
            +
                            }
         | 
| 3488 | 
            +
                          }));
         | 
| 3489 | 
            +
             | 
| 3490 | 
            +
                        case 1:
         | 
| 3491 | 
            +
                        case "end":
         | 
| 3492 | 
            +
                          return _context8.stop();
         | 
| 3493 | 
            +
                      }
         | 
| 2540 3494 | 
             
                    }
         | 
| 2541 3495 | 
             
                  }, _callee8, this);
         | 
| 2542 3496 | 
             
                }));
         | 
| 3497 | 
            +
             | 
| 2543 3498 | 
             
                function lockboxManifestGet(_x18, _x19, _x20) {
         | 
| 2544 3499 | 
             
                  return _lockboxManifestGet.apply(this, arguments);
         | 
| 2545 3500 | 
             
                }
         | 
| 3501 | 
            +
             | 
| 2546 3502 | 
             
                return lockboxManifestGet;
         | 
| 2547 3503 | 
             
              }();
         | 
| 3504 | 
            +
             | 
| 2548 3505 | 
             
              _proto.lockboxMetadataGet = /*#__PURE__*/function () {
         | 
| 2549 | 
            -
                var _lockboxMetadataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2550 | 
            -
                  return  | 
| 2551 | 
            -
                    while (1)  | 
| 2552 | 
            -
                       | 
| 2553 | 
            -
                         | 
| 2554 | 
            -
                           | 
| 2555 | 
            -
                             | 
| 2556 | 
            -
             | 
| 2557 | 
            -
             | 
| 2558 | 
            -
             | 
| 2559 | 
            -
             | 
| 2560 | 
            -
             | 
| 2561 | 
            -
             | 
| 2562 | 
            -
             | 
| 2563 | 
            -
                         | 
| 3506 | 
            +
                var _lockboxMetadataGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(lockboxUuid, fields, groupby, filter, lockboxOwnerUuid) {
         | 
| 3507 | 
            +
                  return runtime_1.wrap(function _callee9$(_context9) {
         | 
| 3508 | 
            +
                    while (1) {
         | 
| 3509 | 
            +
                      switch (_context9.prev = _context9.next) {
         | 
| 3510 | 
            +
                        case 0:
         | 
| 3511 | 
            +
                          return _context9.abrupt("return", this.api.get(this.baseURL + "/v1/lockboxes/" + lockboxUuid + "/metadata", {
         | 
| 3512 | 
            +
                            params: {
         | 
| 3513 | 
            +
                              lockbox_owner_uuid: lockboxOwnerUuid,
         | 
| 3514 | 
            +
                              fields: fields,
         | 
| 3515 | 
            +
                              groupby: groupby,
         | 
| 3516 | 
            +
                              filter: filter
         | 
| 3517 | 
            +
                            }
         | 
| 3518 | 
            +
                          }));
         | 
| 3519 | 
            +
             | 
| 3520 | 
            +
                        case 1:
         | 
| 3521 | 
            +
                        case "end":
         | 
| 3522 | 
            +
                          return _context9.stop();
         | 
| 3523 | 
            +
                      }
         | 
| 2564 3524 | 
             
                    }
         | 
| 2565 3525 | 
             
                  }, _callee9, this);
         | 
| 2566 3526 | 
             
                }));
         | 
| 3527 | 
            +
             | 
| 2567 3528 | 
             
                function lockboxMetadataGet(_x21, _x22, _x23, _x24, _x25) {
         | 
| 2568 3529 | 
             
                  return _lockboxMetadataGet.apply(this, arguments);
         | 
| 2569 3530 | 
             
                }
         | 
| 3531 | 
            +
             | 
| 2570 3532 | 
             
                return lockboxMetadataGet;
         | 
| 2571 3533 | 
             
              }()
         | 
| 2572 3534 | 
             
              /**
         | 
| @@ -2577,27 +3539,33 @@ var VaultService = /*#__PURE__*/function () { | |
| 2577 3539 | 
             
               * @param indexOwnerUuid
         | 
| 2578 3540 | 
             
               */
         | 
| 2579 3541 | 
             
              ;
         | 
| 3542 | 
            +
             | 
| 2580 3543 | 
             
              _proto.vaultIndexPut =
         | 
| 2581 3544 | 
             
              /*#__PURE__*/
         | 
| 2582 3545 | 
             
              function () {
         | 
| 2583 | 
            -
                var _vaultIndexPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2584 | 
            -
                  return  | 
| 2585 | 
            -
                    while (1)  | 
| 2586 | 
            -
                       | 
| 2587 | 
            -
                         | 
| 2588 | 
            -
                           | 
| 2589 | 
            -
                             | 
| 2590 | 
            -
             | 
| 2591 | 
            -
             | 
| 2592 | 
            -
             | 
| 2593 | 
            -
             | 
| 2594 | 
            -
                         | 
| 3546 | 
            +
                var _vaultIndexPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(entries, indexOwnerUuid) {
         | 
| 3547 | 
            +
                  return runtime_1.wrap(function _callee10$(_context10) {
         | 
| 3548 | 
            +
                    while (1) {
         | 
| 3549 | 
            +
                      switch (_context10.prev = _context10.next) {
         | 
| 3550 | 
            +
                        case 0:
         | 
| 3551 | 
            +
                          return _context10.abrupt("return", this.api.put(this.baseURL + "/v1/index", entries, {
         | 
| 3552 | 
            +
                            params: {
         | 
| 3553 | 
            +
                              index_owner_uuid: indexOwnerUuid
         | 
| 3554 | 
            +
                            }
         | 
| 3555 | 
            +
                          }));
         | 
| 3556 | 
            +
             | 
| 3557 | 
            +
                        case 1:
         | 
| 3558 | 
            +
                        case "end":
         | 
| 3559 | 
            +
                          return _context10.stop();
         | 
| 3560 | 
            +
                      }
         | 
| 2595 3561 | 
             
                    }
         | 
| 2596 3562 | 
             
                  }, _callee10, this);
         | 
| 2597 3563 | 
             
                }));
         | 
| 3564 | 
            +
             | 
| 2598 3565 | 
             
                function vaultIndexPut(_x26, _x27) {
         | 
| 2599 3566 | 
             
                  return _vaultIndexPut.apply(this, arguments);
         | 
| 2600 3567 | 
             
                }
         | 
| 3568 | 
            +
             | 
| 2601 3569 | 
             
                return vaultIndexPut;
         | 
| 2602 3570 | 
             
              }()
         | 
| 2603 3571 | 
             
              /**
         | 
| @@ -2606,23 +3574,29 @@ var VaultService = /*#__PURE__*/function () { | |
| 2606 3574 | 
             
               * @param entry the encrypted index snapshot
         | 
| 2607 3575 | 
             
               */
         | 
| 2608 3576 | 
             
              ;
         | 
| 3577 | 
            +
             | 
| 2609 3578 | 
             
              _proto.vaultIndexSnapshotPut =
         | 
| 2610 3579 | 
             
              /*#__PURE__*/
         | 
| 2611 3580 | 
             
              function () {
         | 
| 2612 | 
            -
                var _vaultIndexSnapshotPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2613 | 
            -
                  return  | 
| 2614 | 
            -
                    while (1)  | 
| 2615 | 
            -
                       | 
| 2616 | 
            -
                         | 
| 2617 | 
            -
             | 
| 2618 | 
            -
             | 
| 2619 | 
            -
                         | 
| 3581 | 
            +
                var _vaultIndexSnapshotPut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entry) {
         | 
| 3582 | 
            +
                  return runtime_1.wrap(function _callee11$(_context11) {
         | 
| 3583 | 
            +
                    while (1) {
         | 
| 3584 | 
            +
                      switch (_context11.prev = _context11.next) {
         | 
| 3585 | 
            +
                        case 0:
         | 
| 3586 | 
            +
                          return _context11.abrupt("return", this.api.put(this.baseURL + "/v1/index-snapshot", entry));
         | 
| 3587 | 
            +
             | 
| 3588 | 
            +
                        case 1:
         | 
| 3589 | 
            +
                        case "end":
         | 
| 3590 | 
            +
                          return _context11.stop();
         | 
| 3591 | 
            +
                      }
         | 
| 2620 3592 | 
             
                    }
         | 
| 2621 3593 | 
             
                  }, _callee11, this);
         | 
| 2622 3594 | 
             
                }));
         | 
| 3595 | 
            +
             | 
| 2623 3596 | 
             
                function vaultIndexSnapshotPut(_x28) {
         | 
| 2624 3597 | 
             
                  return _vaultIndexSnapshotPut.apply(this, arguments);
         | 
| 2625 3598 | 
             
                }
         | 
| 3599 | 
            +
             | 
| 2626 3600 | 
             
                return vaultIndexSnapshotPut;
         | 
| 2627 3601 | 
             
              }()
         | 
| 2628 3602 | 
             
              /**
         | 
| @@ -2634,31 +3608,38 @@ var VaultService = /*#__PURE__*/function () { | |
| 2634 3608 | 
             
               * @returns the encrypted index
         | 
| 2635 3609 | 
             
               */
         | 
| 2636 3610 | 
             
              ;
         | 
| 3611 | 
            +
             | 
| 2637 3612 | 
             
              _proto.vaultIndexGet =
         | 
| 2638 3613 | 
             
              /*#__PURE__*/
         | 
| 2639 3614 | 
             
              function () {
         | 
| 2640 | 
            -
                var _vaultIndexGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/ | 
| 2641 | 
            -
                  return  | 
| 2642 | 
            -
                    while (1)  | 
| 2643 | 
            -
                       | 
| 2644 | 
            -
                         | 
| 2645 | 
            -
                           | 
| 2646 | 
            -
                             | 
| 2647 | 
            -
             | 
| 2648 | 
            -
             | 
| 2649 | 
            -
             | 
| 2650 | 
            -
             | 
| 2651 | 
            -
             | 
| 2652 | 
            -
             | 
| 2653 | 
            -
                         | 
| 3615 | 
            +
                var _vaultIndexGet = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(indexKeys, identifiers, timestamp) {
         | 
| 3616 | 
            +
                  return runtime_1.wrap(function _callee12$(_context12) {
         | 
| 3617 | 
            +
                    while (1) {
         | 
| 3618 | 
            +
                      switch (_context12.prev = _context12.next) {
         | 
| 3619 | 
            +
                        case 0:
         | 
| 3620 | 
            +
                          return _context12.abrupt("return", this.api.get(this.baseURL + "/v1/index", {
         | 
| 3621 | 
            +
                            params: {
         | 
| 3622 | 
            +
                              index_keys: indexKeys,
         | 
| 3623 | 
            +
                              identifiers: identifiers,
         | 
| 3624 | 
            +
                              timestamp: timestamp
         | 
| 3625 | 
            +
                            }
         | 
| 3626 | 
            +
                          }));
         | 
| 3627 | 
            +
             | 
| 3628 | 
            +
                        case 1:
         | 
| 3629 | 
            +
                        case "end":
         | 
| 3630 | 
            +
                          return _context12.stop();
         | 
| 3631 | 
            +
                      }
         | 
| 2654 3632 | 
             
                    }
         | 
| 2655 3633 | 
             
                  }, _callee12, this);
         | 
| 2656 3634 | 
             
                }));
         | 
| 3635 | 
            +
             | 
| 2657 3636 | 
             
                function vaultIndexGet(_x29, _x30, _x31) {
         | 
| 2658 3637 | 
             
                  return _vaultIndexGet.apply(this, arguments);
         | 
| 2659 3638 | 
             
                }
         | 
| 3639 | 
            +
             | 
| 2660 3640 | 
             
                return vaultIndexGet;
         | 
| 2661 3641 | 
             
              }();
         | 
| 3642 | 
            +
             | 
| 2662 3643 | 
             
              return VaultService;
         | 
| 2663 3644 | 
             
            }();
         | 
| 2664 3645 |  | 
| @@ -2671,7 +3652,10 @@ var WorkflowService = /*#__PURE__*/function () { | |
| 2671 3652 | 
             
               * This function returns all workflows
         | 
| 2672 3653 | 
             
               * @returns desired workflow
         | 
| 2673 3654 | 
             
               */
         | 
| 3655 | 
            +
             | 
| 3656 | 
            +
             | 
| 2674 3657 | 
             
              var _proto = WorkflowService.prototype;
         | 
| 3658 | 
            +
             | 
| 2675 3659 | 
             
              _proto.getWorkflows = function getWorkflows() {
         | 
| 2676 3660 | 
             
                return this.api.get(this.v1Url + "/workflows");
         | 
| 2677 3661 | 
             
              }
         | 
| @@ -2682,7 +3666,9 @@ var WorkflowService = /*#__PURE__*/function () { | |
| 2682 3666 | 
             
               * @param locale (optional) The desired locale of the workflow (default: 'en')
         | 
| 2683 3667 | 
             
               * @param createdAt (optional) The creation date of the workflow (also used for versionning)
         | 
| 2684 3668 | 
             
               * @returns desired workflow
         | 
| 2685 | 
            -
                | 
| 3669 | 
            +
               */
         | 
| 3670 | 
            +
              ;
         | 
| 3671 | 
            +
             | 
| 2686 3672 | 
             
              _proto.getWorkflow = function getWorkflow(id, locale, createdAt) {
         | 
| 2687 3673 | 
             
                return this.api.get(this.v1Url + "/workflows/" + id, {
         | 
| 2688 3674 | 
             
                  params: {
         | 
| @@ -2691,6 +3677,7 @@ var WorkflowService = /*#__PURE__*/function () { | |
| 2691 3677 | 
             
                  }
         | 
| 2692 3678 | 
             
                });
         | 
| 2693 3679 | 
             
              };
         | 
| 3680 | 
            +
             | 
| 2694 3681 | 
             
              return WorkflowService;
         | 
| 2695 3682 | 
             
            }();
         | 
| 2696 3683 |  | 
| @@ -2701,18 +3688,20 @@ var WorkflowService = /*#__PURE__*/function () { | |
| 2701 3688 | 
             
             * @param useLocalStorage (default: true) if true store tokens into local storage (only for browsers)
         | 
| 2702 3689 | 
             
             * @returns an instance of each services with a provided url
         | 
| 2703 3690 | 
             
             */
         | 
| 3691 | 
            +
             | 
| 2704 3692 | 
             
            var init = function init(services, authenticationCallback, useLocalStorage) {
         | 
| 2705 3693 | 
             
              if (useLocalStorage === void 0) {
         | 
| 2706 3694 | 
             
                useLocalStorage = true;
         | 
| 2707 3695 | 
             
              }
         | 
| 3696 | 
            +
             | 
| 2708 3697 | 
             
              var tellerBaseURL = services.tellerBaseURL,
         | 
| 2709 | 
            -
             | 
| 2710 | 
            -
             | 
| 2711 | 
            -
             | 
| 2712 | 
            -
             | 
| 2713 | 
            -
             | 
| 2714 | 
            -
             | 
| 2715 | 
            -
             | 
| 3698 | 
            +
                  practiceBaseURL = services.practiceBaseURL,
         | 
| 3699 | 
            +
                  consultBaseURL = services.consultBaseURL,
         | 
| 3700 | 
            +
                  vaultBaseURL = services.vaultBaseURL,
         | 
| 3701 | 
            +
                  guardBaseURL = services.guardBaseURL,
         | 
| 3702 | 
            +
                  searchBaseURL = services.searchBaseURL,
         | 
| 3703 | 
            +
                  workflowBaseURL = services.workflowBaseURL,
         | 
| 3704 | 
            +
                  diagnosisBaseURL = services.diagnosisBaseURL;
         | 
| 2716 3705 | 
             
              var apiService = new APIService(useLocalStorage, undefined, authenticationCallback);
         | 
| 2717 3706 | 
             
              return {
         | 
| 2718 3707 | 
             
                apiService: apiService,
         |