idmission-web-sdk 1.0.190 → 1.0.192

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.
@@ -48,7 +48,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
48
48
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
49
49
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
50
50
 
51
- var webSdkVersion = '1.0.190';
51
+ var webSdkVersion = '1.0.192';
52
52
 
53
53
  function getPlatform() {
54
54
  if (typeof window === 'undefined') return;
@@ -8828,10 +8828,9 @@ var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
8828
8828
  return [3 /*break*/, 4];
8829
8829
  case 3:
8830
8830
  e_1 = _d.sent();
8831
- errorsToIgnore = ['Requested texture size [0x0] is invalid', 'The image argument is a canvas element with a width or height of 0', 'CanvasRenderingContext2D.drawImage: Passed-in canvas is empty'];
8831
+ errorsToIgnore = ['Requested texture size [0x0] is invalid', 'The image argument is a canvas element with a width or height of 0', 'CanvasRenderingContext2D.drawImage: Passed-in canvas is empty', 'The object is in an invalid state'];
8832
8832
  shouldIgnoreError = errorsToIgnore.some(function (message) {
8833
- var _a;
8834
- return (_a = e_1.message) === null || _a === void 0 ? void 0 : _a.includes(message);
8833
+ return e_1.toString().includes(message);
8835
8834
  });
8836
8835
  if (shouldIgnoreError) {
8837
8836
  console.log('ignoring error caught while predicting:', e_1);
@@ -9032,7 +9031,8 @@ function makeDocumentDetectionPredictions(image, logPredictions) {
9032
9031
  startedAt = new Date();
9033
9032
  _e.label = 1;
9034
9033
  case 1:
9035
- _e.trys.push([1, 7,, 8]);
9034
+ _e.trys.push([1, 7, 8, 9]);
9035
+ tf__namespace.engine().startScope();
9036
9036
  tfImg = tf__namespace.browser.fromPixels(image);
9037
9037
  if (logPredictions) console.time('resize');
9038
9038
  tfResize = tf__namespace.image.resizeBilinear(tfImg, [448, 448]);
@@ -9092,6 +9092,9 @@ function makeDocumentDetectionPredictions(image, logPredictions) {
9092
9092
  time: 0
9093
9093
  }];
9094
9094
  case 8:
9095
+ tf__namespace.engine().endScope();
9096
+ return [7 /*endfinally*/];
9097
+ case 9:
9095
9098
  return [2 /*return*/];
9096
9099
  }
9097
9100
  });
@@ -9112,7 +9115,8 @@ function makeFocusPrediction(imageData, canvases, bbox, logPredictions) {
9112
9115
  startedAt = new Date();
9113
9116
  _g.label = 1;
9114
9117
  case 1:
9115
- _g.trys.push([1, 5,, 6]);
9118
+ _g.trys.push([1, 5, 6, 7]);
9119
+ tf__namespace.engine().startScope();
9116
9120
  tfImg = void 0;
9117
9121
  if (bbox) {
9118
9122
  cropped = cropToBoundingBox(imageData, bbox, canvases.cropCanvas);
@@ -9163,6 +9167,9 @@ function makeFocusPrediction(imageData, canvases, bbox, logPredictions) {
9163
9167
  _g.sent();
9164
9168
  return [2 /*return*/, [[0, 0], 0]];
9165
9169
  case 6:
9170
+ tf__namespace.engine().endScope();
9171
+ return [7 /*endfinally*/];
9172
+ case 7:
9166
9173
  return [2 /*return*/];
9167
9174
  }
9168
9175
  });