idmission-web-sdk 2.3.32 → 2.3.34

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.
@@ -211,7 +211,7 @@
211
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
212
  };
213
213
 
214
- var webSdkVersion = '2.3.32';
214
+ var webSdkVersion = '2.3.34';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -17054,12 +17054,10 @@
17054
17054
  canvas.style.height = '0';
17055
17055
  }
17056
17056
 
17057
- var IdCardGuideImageContainer = styled(IdCardBorder)(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n aspect-ratio: ", ";\n display: flex;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n aspect-ratio: ", ";\n display: flex;\n"])), function (props) {
17057
+ var IdCardGuideImageContainer = styled(IdCardBorder)(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n"])), function (props) {
17058
17058
  return props.$isVisible ? '' : 'opacity: 0;';
17059
- }, function (props) {
17060
- return props.$aspectRatio;
17061
17059
  });
17062
- var IdCardGuideImage = styled.img(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n transform-style: preserve-3d;\n ", "\n ", "\n max-width: 100%;\n max-height: 100%;\n"], ["\n transform-style: preserve-3d;\n ", "\n ", "\n max-width: 100%;\n max-height: 100%;\n"])), function (props) {
17060
+ var IdCardGuideImage = styled.img(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"], ["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"])), function (props) {
17063
17061
  return props.$isMirrored ? 'transform: scaleX(-1);' : '';
17064
17062
  }, function (props) {
17065
17063
  return props.$isInvisible ? 'opacity: 0;' : '';
@@ -17075,19 +17073,20 @@
17075
17073
  borderRadius = _u === void 0 ? 25 : _u,
17076
17074
  _v = _a.borderColor,
17077
17075
  borderColor = _v === void 0 ? 'white' : _v,
17078
- aspectRatio = _a.aspectRatio,
17079
- _w = _a.progress,
17080
- progress = _w === void 0 ? 0 : _w,
17076
+ _w = _a.aspectRatio,
17077
+ aspectRatio = _w === void 0 ? 1 : _w,
17078
+ _x = _a.progress,
17079
+ progress = _x === void 0 ? 0 : _x,
17081
17080
  props = __rest(_a, ["children", "status", "borderWidth", "borderRadius", "borderColor", "aspectRatio", "progress"]);
17082
- var _x = useResizeObserver(),
17083
- ref = _x.ref,
17084
- _y = _x.width,
17085
- width = _y === void 0 ? 0 : _y,
17086
- _z = _x.height,
17087
- height = _z === void 0 ? 0 : _z;
17088
- var _0 = React.useState(0),
17089
- progressResets = _0[0],
17090
- setProgressResets = _0[1];
17081
+ var _y = useResizeObserver(),
17082
+ ref = _y.ref,
17083
+ _z = _y.width,
17084
+ width = _z === void 0 ? 0 : _z,
17085
+ _0 = _y.height,
17086
+ height = _0 === void 0 ? 0 : _0;
17087
+ var _1 = React.useState(0),
17088
+ progressResets = _1[0],
17089
+ setProgressResets = _1[1];
17091
17090
  React.useEffect(function () {
17092
17091
  if (progress === 0 && status === 'capturing') {
17093
17092
  setProgressResets(function (n) {
@@ -17101,11 +17100,17 @@
17101
17100
  var progressBarColor = (_k = (_j = (_h = theme.idCapture) === null || _h === void 0 ? void 0 : _h.guideBox) === null || _j === void 0 ? void 0 : _j.progressBarColor) !== null && _k !== void 0 ? _k : borderColor;
17102
17101
  var progressBarIndicatorColor = (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.progressBarIndicatorColor) !== null && _o !== void 0 ? _o : '#287ec6';
17103
17102
  var progressBarWidth = (_r = (_q = (_p = theme.idCapture) === null || _p === void 0 ? void 0 : _p.guideBox) === null || _q === void 0 ? void 0 : _q.progressBarWidth) !== null && _r !== void 0 ? _r : borderWidth;
17104
- return /*#__PURE__*/React.createElement(IdCardBorderContainer, _assign({}, props), /*#__PURE__*/React.createElement("div", {
17103
+ return /*#__PURE__*/React.createElement(IdCardBorderContainer, _assign({}, props, {
17104
+ style: {
17105
+ aspectRatio: aspectRatio
17106
+ }
17107
+ }), /*#__PURE__*/React.createElement("div", {
17105
17108
  ref: ref,
17106
17109
  style: {
17107
- aspectRatio: aspectRatio,
17108
- flex: 1
17110
+ maxHeight: '100%',
17111
+ maxWidth: '100%',
17112
+ display: 'flex',
17113
+ aspectRatio: aspectRatio
17109
17114
  }
17110
17115
  }, children), status === 'ready' && !wavesDisabled && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IdCardBorderSvg, {
17111
17116
  width: width,
@@ -17204,7 +17209,7 @@
17204
17209
  className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
17205
17210
  }));
17206
17211
  }
17207
- var IdCardBorderContainer = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
17212
+ var IdCardBorderContainer = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n max-width: 100%;\n max-height: 100%;\n\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
17208
17213
  var SvgOverlay = styled.svg(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
17209
17214
  var IdCardBorderRect = styled.rect(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"], ["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"])), progressBorderAnimation, function (props) {
17210
17215
  var _a;
@@ -17396,65 +17401,6 @@
17396
17401
  });
17397
17402
  var templateObject_1$z;
17398
17403
 
17399
- var GuideOrientationContext = /*#__PURE__*/React.createContext({
17400
- orientation: 'landscape',
17401
- wrapperWidth: 1,
17402
- wrapperHeight: 1,
17403
- wrapperAspectRatio: 0,
17404
- imageAspectRatio: 0,
17405
- wrapperRef: null,
17406
- setDimensions: function setDimensions() {
17407
- return null;
17408
- },
17409
- onImageLoaded: function onImageLoaded() {
17410
- return null;
17411
- }
17412
- });
17413
- function GuideOrientationContextProvider(_a) {
17414
- var children = _a.children;
17415
- var setDimensions = React.useState({
17416
- width: 1,
17417
- height: 1
17418
- })[1];
17419
- var _b = React.useState(1),
17420
- imageAspectRatio = _b[0],
17421
- setImageAspectRatio = _b[1];
17422
- var _c = useResizeObserver(),
17423
- wrapperRef = _c.ref,
17424
- _d = _c.width,
17425
- wrapperWidth = _d === void 0 ? 1 : _d,
17426
- _e = _c.height,
17427
- wrapperHeight = _e === void 0 ? 1 : _e;
17428
- var wrapperAspectRatio = React.useMemo(function () {
17429
- return wrapperWidth / wrapperHeight;
17430
- }, [wrapperHeight, wrapperWidth]);
17431
- var onImageLoaded = React.useCallback(function (e) {
17432
- var img = e.target;
17433
- setImageAspectRatio(img.naturalWidth / img.naturalHeight);
17434
- }, []);
17435
- var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
17436
- var value = React.useMemo(function () {
17437
- return {
17438
- orientation: orientation,
17439
- wrapperWidth: wrapperWidth,
17440
- wrapperHeight: wrapperHeight,
17441
- wrapperAspectRatio: wrapperAspectRatio,
17442
- imageAspectRatio: imageAspectRatio,
17443
- setDimensions: setDimensions,
17444
- wrapperRef: wrapperRef,
17445
- onImageLoaded: onImageLoaded
17446
- };
17447
- }, [imageAspectRatio, onImageLoaded, setDimensions, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
17448
- return /*#__PURE__*/React.createElement(GuideOrientationContext.Provider, {
17449
- value: value
17450
- }, children);
17451
- }
17452
- function useGuideOrientationContext() {
17453
- var ctx = React.useContext(GuideOrientationContext);
17454
- if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
17455
- return ctx;
17456
- }
17457
-
17458
17404
  var FlipIdPrompt = function FlipIdPrompt(_a) {
17459
17405
  var _b = _a.images,
17460
17406
  images = _b === void 0 ? defaultIdCaptureGuideImages : _b,
@@ -17472,7 +17418,6 @@
17472
17418
  portraitGuidesOnMobile = _g === void 0 ? true : _g,
17473
17419
  _h = _a.classNames,
17474
17420
  classNames = _h === void 0 ? {} : _h;
17475
- var onImageLoaded = useGuideOrientationContext().onImageLoaded;
17476
17421
  var orientation = getOrientation(portraitGuidesOnMobile);
17477
17422
  var _j = React.useState(1),
17478
17423
  transitionTime = _j[0],
@@ -17514,7 +17459,6 @@
17514
17459
  alt: "",
17515
17460
  src: images[orientation].SHOW_ID_FRONT.url,
17516
17461
  className: classNames.frontImage,
17517
- onLoad: onImageLoaded,
17518
17462
  width: width,
17519
17463
  height: height
17520
17464
  })), /*#__PURE__*/React.createElement(FlipImageContainer, {
@@ -17535,86 +17479,114 @@
17535
17479
  })));
17536
17480
  };
17537
17481
 
17482
+ var GuideOrientationContext = /*#__PURE__*/React.createContext({
17483
+ orientation: 'landscape',
17484
+ wrapperWidth: 1,
17485
+ wrapperHeight: 1,
17486
+ wrapperAspectRatio: 0,
17487
+ imageAspectRatio: 0,
17488
+ wrapperRef: null,
17489
+ setImageAspectRatio: function setImageAspectRatio() {
17490
+ return null;
17491
+ }
17492
+ });
17493
+ function GuideOrientationContextProvider(_a) {
17494
+ var children = _a.children;
17495
+ var _b = React.useState(1),
17496
+ imageAspectRatio = _b[0],
17497
+ setImageAspectRatio = _b[1];
17498
+ var _c = useResizeObserver(),
17499
+ wrapperRef = _c.ref,
17500
+ _d = _c.width,
17501
+ wrapperWidth = _d === void 0 ? 1 : _d,
17502
+ _e = _c.height,
17503
+ wrapperHeight = _e === void 0 ? 1 : _e;
17504
+ var wrapperAspectRatio = React.useMemo(function () {
17505
+ return wrapperWidth / wrapperHeight;
17506
+ }, [wrapperHeight, wrapperWidth]);
17507
+ var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
17508
+ var value = React.useMemo(function () {
17509
+ return {
17510
+ orientation: orientation,
17511
+ wrapperWidth: wrapperWidth,
17512
+ wrapperHeight: wrapperHeight,
17513
+ wrapperAspectRatio: wrapperAspectRatio,
17514
+ imageAspectRatio: imageAspectRatio,
17515
+ setImageAspectRatio: setImageAspectRatio,
17516
+ wrapperRef: wrapperRef
17517
+ };
17518
+ }, [imageAspectRatio, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
17519
+ return /*#__PURE__*/React.createElement(GuideOrientationContext.Provider, {
17520
+ value: value
17521
+ }, children);
17522
+ }
17523
+ function useGuideOrientationContext() {
17524
+ var ctx = React.useContext(GuideOrientationContext);
17525
+ if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
17526
+ return ctx;
17527
+ }
17528
+
17538
17529
  var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
17539
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
17540
- var _p = _a.classNames,
17541
- classNames = _p === void 0 ? {} : _p,
17542
- _q = _a.images,
17543
- userSuppliedImages = _q === void 0 ? defaultIdCaptureGuideImages : _q,
17530
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
17531
+ var _s = _a.classNames,
17532
+ classNames = _s === void 0 ? {} : _s,
17533
+ _t = _a.images,
17534
+ userSuppliedImages = _t === void 0 ? defaultIdCaptureGuideImages : _t,
17544
17535
  userSuppliedPadding = _a.padding,
17545
17536
  userSuppliedImagePadding = _a.imagePadding,
17546
- _r = _a.imageVisible,
17547
- imageVisible = _r === void 0 ? true : _r,
17537
+ _u = _a.imageVisible,
17538
+ imageVisible = _u === void 0 ? true : _u,
17548
17539
  borderWidth = _a.borderWidth,
17549
17540
  borderColor = _a.borderColor,
17550
- _s = _a.idCardBorderWidth,
17551
- idCardBorderWidth = _s === void 0 ? '2.5%' : _s,
17552
- _t = _a.idCardBorderColor,
17553
- idCardBorderColor = _t === void 0 ? 'white' : _t,
17541
+ _v = _a.idCardBorderWidth,
17542
+ idCardBorderWidth = _v === void 0 ? '2.5%' : _v,
17543
+ _w = _a.idCardBorderColor,
17544
+ idCardBorderColor = _w === void 0 ? 'white' : _w,
17554
17545
  maskColor = _a.maskColor,
17555
- _u = _a.isMirrored,
17556
- isMirrored = _u === void 0 ? false : _u,
17557
- _v = _a.isBackToFront,
17558
- isBackToFront = _v === void 0 ? false : _v,
17559
- _w = _a.portraitGuidesOnMobile,
17560
- portraitGuidesOnMobile = _w === void 0 ? true : _w,
17561
- _x = _a.instruction,
17562
- instruction = _x === void 0 ? '' : _x,
17563
- _y = _a.requestedAction,
17564
- requestedAction = _y === void 0 ? 'SHOW_ID_FRONT' : _y,
17565
- _z = _a.progress,
17566
- progress = _z === void 0 ? 0 : _z,
17567
- _0 = _a.status,
17568
- status = _0 === void 0 ? 'ready' : _0,
17546
+ _x = _a.isMirrored,
17547
+ isMirrored = _x === void 0 ? false : _x,
17548
+ _y = _a.isBackToFront,
17549
+ isBackToFront = _y === void 0 ? false : _y,
17550
+ _z = _a.portraitGuidesOnMobile,
17551
+ portraitGuidesOnMobile = _z === void 0 ? true : _z,
17552
+ _0 = _a.instruction,
17553
+ instruction = _0 === void 0 ? '' : _0,
17554
+ _1 = _a.requestedAction,
17555
+ requestedAction = _1 === void 0 ? 'SHOW_ID_FRONT' : _1,
17556
+ _2 = _a.progress,
17557
+ progress = _2 === void 0 ? 0 : _2,
17558
+ _3 = _a.status,
17559
+ status = _3 === void 0 ? 'ready' : _3,
17569
17560
  onClick = _a.onClick;
17570
- var _1 = useGuideOrientationContext(),
17571
- wrapperRef = _1.wrapperRef,
17572
- wrapperWidth = _1.wrapperWidth,
17573
- wrapperHeight = _1.wrapperHeight,
17574
- imageAspectRatio = _1.imageAspectRatio,
17575
- wrapperAspectRatio = _1.wrapperAspectRatio,
17576
- guideOrientationOnImageLoaded = _1.onImageLoaded,
17577
- setDimensions = _1.setDimensions;
17578
- var state = useIdCaptureStore();
17561
+ var _4 = useGuideOrientationContext(),
17562
+ wrapperRef = _4.wrapperRef,
17563
+ wrapperWidth = _4.wrapperWidth,
17564
+ imageAspectRatio = _4.imageAspectRatio,
17565
+ wrapperAspectRatio = _4.wrapperAspectRatio,
17566
+ setImageAspectRatio = _4.setImageAspectRatio;
17567
+ var _5 = useResizeObserver(),
17568
+ innerRef = _5.ref,
17569
+ innerWidth = _5.width,
17570
+ innerHeight = _5.height;
17579
17571
  var theme = styled.useTheme();
17580
17572
  if (borderWidth === undefined) borderWidth = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 4;
17581
- React.useEffect(function () {
17582
- setDimensions({
17583
- width: wrapperWidth,
17584
- height: wrapperHeight
17585
- });
17586
- }, [setDimensions, wrapperHeight, wrapperWidth]);
17587
17573
  var padding = userSuppliedPadding !== null && userSuppliedPadding !== void 0 ? userSuppliedPadding : isMobile() ? (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.mobilePadding) !== null && _g !== void 0 ? _g : 0 : (_k = (_j = (_h = theme.idCapture) === null || _h === void 0 ? void 0 : _h.guideBox) === null || _j === void 0 ? void 0 : _j.desktopPadding) !== null && _k !== void 0 ? _k : 50;
17588
17574
  var paddingAndBorderPx = padding * 2 + (borderWidth !== null && borderWidth !== void 0 ? borderWidth : 0) * 2;
17589
17575
  var images = useImagesWithBackToFront(userSuppliedImages, isBackToFront);
17590
- var imagesByUrl = useGuideImagesByUrl(images);
17591
17576
  var orientation = getOrientation(portraitGuidesOnMobile);
17592
17577
  var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
17593
- var imagePadding = (_o = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.imagePadding) !== null && _o !== void 0 ? _o : '0 50px';
17594
- if (typeof imagePadding === 'number') {
17595
- imagePadding = "".concat(imagePadding, "px");
17596
- }
17597
- var paddingForMath = imagePadding.replace(/[^0-9\s]/g, '').split(' ').map(Number);
17598
- var paddingForMathMax = Math.max.apply(Math, paddingForMath);
17599
- var imageWidth = state.guideRectWidth - paddingForMathMax * 2;
17600
- var imageHeight = state.guideRectHeight - paddingForMathMax * 2;
17578
+ var imagePadding = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : isMobile() ? (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.mobileImagePadding) !== null && _o !== void 0 ? _o : 0 : (_r = (_q = (_p = theme.idCapture) === null || _p === void 0 ? void 0 : _p.guideBox) === null || _q === void 0 ? void 0 : _q.imagePadding) !== null && _r !== void 0 ? _r : 50;
17601
17579
  var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
17602
- var cardAspectRatio = imageAspectRatio > 1 ? '1.6' : '0.625';
17603
- var onImageLoaded = React.useCallback(function (e) {
17604
- var _a, _b;
17605
- guideOrientationOnImageLoaded(e);
17606
- var img = e.currentTarget;
17607
- var imageByUrl = imagesByUrl[img.src];
17608
- var width = (_a = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.width) !== null && _a !== void 0 ? _a : img.naturalWidth;
17609
- var height = (_b = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.height) !== null && _b !== void 0 ? _b : img.naturalHeight;
17580
+ function onImageLoaded() {
17581
+ setImageAspectRatio(currentImage.width / currentImage.height);
17610
17582
  dispatchIdCaptureAction({
17611
17583
  type: 'guideImageLoaded',
17612
17584
  payload: {
17613
- width: width,
17614
- height: height
17585
+ width: currentImage.width,
17586
+ height: currentImage.height
17615
17587
  }
17616
17588
  });
17617
- }, [guideOrientationOnImageLoaded, imagesByUrl]);
17589
+ }
17618
17590
  return /*#__PURE__*/React.createElement(StyledPageContainer, {
17619
17591
  ref: wrapperRef,
17620
17592
  onClick: onClick,
@@ -17643,14 +17615,19 @@
17643
17615
  "$padding": imagePadding,
17644
17616
  className: classNames.centerRegionBorder
17645
17617
  }, /*#__PURE__*/React.createElement(GuideCenterInner, {
17646
- className: classNames.centerRegionInner
17618
+ "$isLandscape": orientation === 'landscape',
17619
+ ref: innerRef,
17620
+ className: classNames.centerRegionInner,
17621
+ style: {
17622
+ aspectRatio: imageAspectRatio
17623
+ }
17647
17624
  }, /*#__PURE__*/React.createElement(IdCardGuideImageContainer, {
17648
17625
  status: status,
17649
17626
  progress: progress,
17650
17627
  borderWidth: idCardBorderWidth,
17651
17628
  borderColor: idCardBorderColor,
17652
17629
  "$isVisible": requestedAction !== 'FLIP_ID',
17653
- "$aspectRatio": cardAspectRatio
17630
+ aspectRatio: imageAspectRatio
17654
17631
  }, /*#__PURE__*/React.createElement(IdCardGuideImage, {
17655
17632
  alt: "",
17656
17633
  src: currentImage.url,
@@ -17658,8 +17635,8 @@
17658
17635
  className: classNames.image,
17659
17636
  "$isInvisible": !imageVisible,
17660
17637
  "$isMirrored": isMirrored,
17661
- width: imageWidth,
17662
- height: imageHeight
17638
+ width: innerWidth || currentImage.width,
17639
+ height: innerHeight || currentImage.height
17663
17640
  })), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React.createElement(FlipIdPrompt, {
17664
17641
  images: images,
17665
17642
  borderWidth: idCardBorderWidth,
@@ -17667,8 +17644,8 @@
17667
17644
  portraitGuidesOnMobile: portraitGuidesOnMobile,
17668
17645
  isMirrored: isMirrored,
17669
17646
  classNames: classNames.flipIdPrompt,
17670
- width: imageWidth,
17671
- height: imageHeight
17647
+ width: currentImage.width,
17648
+ height: currentImage.height
17672
17649
  }))))), /*#__PURE__*/React.createElement(Spacer, {
17673
17650
  "$maskColor": maskColor,
17674
17651
  "$minWidth": padding,
@@ -17708,14 +17685,16 @@
17708
17685
  }, function (props) {
17709
17686
  return props.$isMirrored ? 'transform: scaleX(-1);' : '';
17710
17687
  });
17711
- var GuideCenterBorder = styled.div(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject(["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"], ["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"])), function (props) {
17688
+ var GuideCenterBorder = styled.div(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject(["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n max-width: 100%;\n position: relative;\n ", "\n"], ["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n max-width: 100%;\n position: relative;\n ", "\n"])), function (props) {
17712
17689
  var _a, _b;
17713
17690
  return "".concat((_a = props.$borderWidth) !== null && _a !== void 0 ? _a : 4, "px solid ").concat((_b = props.$borderColor) !== null && _b !== void 0 ? _b : 'white');
17714
17691
  }, function (props) {
17715
- return props.$padding ? "padding: ".concat(props.$padding, ";") : '';
17692
+ return props.$padding ? "padding: ".concat(props.$padding, "px;") : '';
17716
17693
  });
17717
17694
  var GuideText = styled.span(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"])));
17718
- var GuideCenterInner = styled.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n"], ["\n position: relative;\n margin: auto;\n"])));
17695
+ var GuideCenterInner = styled.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n position: relative;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (props) {
17696
+ return props.$isLandscape ? 'height: 100%;' : 'width: 90%;';
17697
+ });
17719
17698
  var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$6, templateObject_7$4, templateObject_8$2, templateObject_9$2;
17720
17699
 
17721
17700
  var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
@@ -25616,7 +25595,8 @@
25616
25595
  borderWidth: 4,
25617
25596
  desktopPadding: 50,
25618
25597
  mobilePadding: 0,
25619
- imagePadding: '0 50px',
25598
+ imagePadding: 50,
25599
+ mobileImagePadding: 0,
25620
25600
  wavesDisabled: false,
25621
25601
  wavesColor: '#287ec6',
25622
25602
  progressBarColor: 'white',