@tsocial/tvweb-sdk 5.34.4 → 5.34.6

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.
@@ -33783,7 +33783,7 @@
33783
33783
  }, nS$1;
33784
33784
  }();
33785
33785
  function nB$1() {
33786
- return "5.34.4";
33786
+ return "5.34.6";
33787
33787
  }
33788
33788
  function nI$1() {
33789
33789
  return {
@@ -41259,50 +41259,48 @@
41259
41259
  }, uz;
41260
41260
  }(), uG);
41261
41261
  }();
41262
- let dm = db, dg = db, dy = dx();
41262
+ let dm = dv, dg = dv, dy = dx();
41263
41263
  for(;;)try {
41264
- if (parseInt(dg(458)) / 1 * (parseInt(dg(480)) / 2) + -parseInt(dg(455)) / 3 * (-parseInt(dg(457)) / 4) + -parseInt(dg(471)) / 5 + -parseInt(dg(465)) / 6 + parseInt(dg(463)) / 7 * (-parseInt(dg(477)) / 8) + -parseInt(dg(460)) / 9 * (parseInt(dg(468)) / 10) + -parseInt(dg(476)) / 11 * (-parseInt(dg(473)) / 12) === 233663) break;
41264
+ if (-parseInt(dg(400)) / 1 + -parseInt(dg(412)) / 2 * (parseInt(dg(413)) / 3) + -parseInt(dg(398)) / 4 + parseInt(dg(393)) / 5 * (-parseInt(dg(403)) / 6) + -parseInt(dg(414)) / 7 + parseInt(dg(404)) / 8 * (-parseInt(dg(405)) / 9) + parseInt(dg(410)) / 10 === 675039) break;
41265
41265
  dy.push(dy.shift());
41266
41266
  } catch (e) {
41267
41267
  dy.push(dy.shift());
41268
41268
  }
41269
- function db(e, t) {
41269
+ let db = dm(399) + dm(397) + "3d02010608" + dm(402) + dm(409) + dm(417);
41270
+ function dv(e, t) {
41270
41271
  let r = dx();
41271
- return (db = function(e, t) {
41272
- return r[e -= 454];
41272
+ return (dv = function(e, t) {
41273
+ return r[e -= 393];
41273
41274
  })(e, t);
41274
41275
  }
41275
- let dv = dm(462) + dm(467) + dm(479) + dm(459) + "0301070342" + dm(472), d_ = dm(474) + dm(466) + dm(456) + dm(478) + dm(454) + "ytJdcsPxrD" + dm(461) + dm(464) + "Mjci1ul8mm" + dm(475) + dm(481) + dm(470) + dm(469);
41276
+ let d_ = dm(396) + dm(415) + dm(406) + dm(407) + dm(416) + dm(394) + "+faHkP3QC3" + dm(408) + dm(411) + "D9EKOWS+U4" + dm(395) + dm(401) + "KA==";
41276
41277
  function dx() {
41277
41278
  let e = [
41278
- "D9EKOWS+U4",
41279
- "4532icGLnQ",
41280
- "18448xyLlKj",
41281
- "cDQgAE9h6Z",
41282
- "3d02010608",
41283
- "204126ixklsL",
41284
- "MfPrcYTM70",
41285
- "DepBO8t60S",
41286
- "87nmVtHP",
41287
- "KoZIzj0DAQ",
41288
- "55712UVQONf",
41289
- "2EfgRUw",
41290
- "2a8648ce3d",
41291
- "136242zgynFf",
41292
- "+faHkP3QC3",
41293
- "3059301306",
41294
- "553JRucLG",
41295
- "44P0rKKsZK",
41296
- "879336fcuqSw",
41279
+ "754034MVAlGX",
41280
+ "9qfvzvF",
41281
+ "9231341WBMLOs",
41297
41282
  "ZIzj0CAQYI",
41283
+ "DepBO8t60S",
41284
+ "000",
41285
+ "575PumApD",
41286
+ "ytJdcsPxrD",
41287
+ "MfPrcYTM70",
41288
+ "MFkwEwYHKo",
41298
41289
  "072a8648ce",
41299
- "20JpJYZN",
41300
- "KA==",
41290
+ "4960704BbpIae",
41291
+ "3059301306",
41292
+ "1049264TQjxFs",
41301
41293
  "ssRdXLZEX8",
41302
- "241645RDykmR",
41303
- "000",
41304
- "960aXGJaK",
41305
- "MFkwEwYHKo"
41294
+ "2a8648ce3d",
41295
+ "12156RnmUwF",
41296
+ "40rodesL",
41297
+ "1651338WhfRhr",
41298
+ "KoZIzj0DAQ",
41299
+ "cDQgAE9h6Z",
41300
+ "44P0rKKsZK",
41301
+ "0301070342",
41302
+ "65646930BDCMCU",
41303
+ "Mjci1ul8mm"
41306
41304
  ];
41307
41305
  return (dx = function() {
41308
41306
  return e;
@@ -41412,7 +41410,7 @@
41412
41410
  isValid: !1,
41413
41411
  error: i0$1.invalid_license
41414
41412
  };
41415
- let { mode: a, license: o, signature: s } = dS(e), c = dw(i4$1(o)), l = (r = t || d_, n = i4$1(r).replace(dv, ""), i = new dp.ec("p256").keyFromPublic(n, "hex"), {
41413
+ let { mode: a, license: o, signature: s } = dS(e), c = dw(i4$1(o)), l = (r = t || d_, n = i4$1(r).replace(db, ""), i = new dp.ec("p256").keyFromPublic(n, "hex"), {
41416
41414
  verifySignature: async (e, t)=>{
41417
41415
  try {
41418
41416
  let r = await dC(e), n = i4$1(t);
@@ -45326,7 +45324,7 @@
45326
45324
  return this.getKey().getPublicKey();
45327
45325
  }, e.prototype.getPublicKeyB64 = function() {
45328
45326
  return this.getKey().getPublicBaseKeyB64();
45329
- }, e.version = "5.34.3", e;
45327
+ }, e.version = "5.34.5", e;
45330
45328
  }();
45331
45329
  let hO = [
45332
45330
  "-",
@@ -88702,204 +88700,6 @@
88702
88700
  return videoCanvas;
88703
88701
  };
88704
88702
 
88705
- const MODE = {
88706
- LANDSCAPE: 'landscape',
88707
- PORTRAIT: 'portrait',
88708
- DESKTOP: 'desktop'
88709
- };
88710
- const useDetectOrientation = (onOrientationChange)=>{
88711
- const portraitQuery = reactExports.useRef(window.matchMedia('(orientation: portrait)'));
88712
- const initOrientation = reactExports.useRef(portraitQuery.current.matches ? MODE.PORTRAIT : MODE.LANDSCAPE);
88713
- const [curOrientation, setCurOrientation] = reactExports.useState(initOrientation.current);
88714
- reactExports.useEffect(()=>{
88715
- function handleResizeForScreen() {
88716
- const orientationType = get(screen, 'orientation.type')?.split('-')?.[0];
88717
- setCurOrientation(orientationType);
88718
- if (typeof onOrientationChange === 'function') {
88719
- onOrientationChange(orientationType);
88720
- }
88721
- }
88722
- function handleResizeForQuery(e) {
88723
- let orientation;
88724
- if (e.matches) {
88725
- orientation = MODE.PORTRAIT;
88726
- } else {
88727
- orientation = MODE.LANDSCAPE;
88728
- }
88729
- setCurOrientation(orientation);
88730
- if (typeof onOrientationChange === 'function') {
88731
- onOrientationChange(orientation);
88732
- }
88733
- }
88734
- if (screen.orientation) {
88735
- screen.orientation.addEventListener('change', handleResizeForScreen);
88736
- } else {
88737
- // screen.orientation only available on ios > 16.4
88738
- // fallback to window.matchMedia
88739
- portraitQuery.current.addEventListener('change', handleResizeForQuery);
88740
- }
88741
- return ()=>{
88742
- if (screen.orientation) {
88743
- screen.orientation.removeEventListener('change', handleResizeForScreen);
88744
- } else {
88745
- // eslint-disable-next-line react-hooks/exhaustive-deps
88746
- portraitQuery.current.removeEventListener('change', handleResizeForQuery);
88747
- }
88748
- };
88749
- }, [
88750
- onOrientationChange
88751
- ]);
88752
- return libExports.isMobile ? {
88753
- curOrientation,
88754
- initOrientation: initOrientation.current
88755
- } : {
88756
- curOrientation: MODE.DESKTOP
88757
- };
88758
- };
88759
-
88760
- /**
88761
- * Custom hook to delay rendering when transitioning from hidden to visible state.
88762
- * Useful for waiting for browser dimension updates after orientation changes.
88763
- *
88764
- * @param params - Hook parameters
88765
- * @param params.isVisible - Whether the component is currently visible
88766
- * @param params.enableDelay - Whether to apply delay logic for show transitions
88767
- * @param params.delayMs - Delay in milliseconds before showing (default: 500)
88768
- * @returns Delayed visibility state
88769
- */ function useDelayedRender({ isVisible, enableDelay, delayMs = 500 }) {
88770
- const [isVisibleDelayed, setIsVisibleDelayed] = reactExports.useState(isVisible);
88771
- const prevIsVisibleRef = reactExports.useRef(isVisible);
88772
- const timeoutRef = reactExports.useRef(null);
88773
- reactExports.useEffect(()=>{
88774
- const prevIsVisible = prevIsVisibleRef.current;
88775
- // When delay is disabled, always sync immediately
88776
- if (!enableDelay) {
88777
- setIsVisibleDelayed(isVisible);
88778
- prevIsVisibleRef.current = isVisible;
88779
- return undefined;
88780
- }
88781
- // Handle transitions when delay is enabled
88782
- const isTransitionToShow = !prevIsVisible && isVisible;
88783
- const isTransitionToHide = prevIsVisible && !isVisible;
88784
- if (isTransitionToShow) {
88785
- // Delay showing when transitioning from hidden to visible
88786
- timeoutRef.current = setTimeout(()=>{
88787
- setIsVisibleDelayed(true);
88788
- }, delayMs);
88789
- } else if (isTransitionToHide) {
88790
- // Immediately hide and cancel pending show
88791
- if (timeoutRef.current) {
88792
- clearTimeout(timeoutRef.current);
88793
- timeoutRef.current = null;
88794
- }
88795
- setIsVisibleDelayed(false);
88796
- }
88797
- prevIsVisibleRef.current = isVisible;
88798
- return ()=>{
88799
- if (timeoutRef.current) {
88800
- clearTimeout(timeoutRef.current);
88801
- }
88802
- };
88803
- }, [
88804
- isVisible,
88805
- enableDelay,
88806
- delayMs
88807
- ]);
88808
- return isVisibleDelayed;
88809
- }
88810
-
88811
- const PopupContent$1 = dt$1.div`
88812
- text-align: center;
88813
- font-size: 20px;
88814
- font-weight: 600;
88815
- `;
88816
- const ChildrenWrapper$1 = dt$1.div`
88817
- width: 100%;
88818
- height: 100%;
88819
- opacity: ${({ $showChildren })=>$showChildren ? 1 : 0};
88820
- `;
88821
- const defaultPreferredOrientations = [
88822
- MODE.PORTRAIT,
88823
- MODE.DESKTOP
88824
- ];
88825
- function OrientationDetectionV2({ onOrientationChange = noop$1, unmountOnHidden = false, remountDelayMs = 500, preferredOrientations = defaultPreferredOrientations, children }) {
88826
- const t = gB();
88827
- const { curOrientation } = useDetectOrientation(onOrientationChange);
88828
- const hasCorrectOrientation = preferredOrientations.includes(curOrientation);
88829
- const isVisible = useDelayedRender({
88830
- isVisible: hasCorrectOrientation,
88831
- enableDelay: unmountOnHidden,
88832
- delayMs: remountDelayMs
88833
- });
88834
- const shouldMountChildrenOnDom = unmountOnHidden ? isVisible : true;
88835
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
88836
- children: [
88837
- !preferredOrientations.includes(curOrientation) && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
88838
- open: true,
88839
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent$1, {
88840
- children: t('wrong_orientation')
88841
- })
88842
- }),
88843
- shouldMountChildrenOnDom && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper$1, {
88844
- $showChildren: hasCorrectOrientation,
88845
- children: children
88846
- })
88847
- ]
88848
- });
88849
- }
88850
-
88851
- const PopupContent = dt$1.div`
88852
- text-align: center;
88853
- font-size: 20px;
88854
- font-weight: 600;
88855
- `;
88856
- const ChildrenWrapper = dt$1.div`
88857
- width: 100%;
88858
- height: 100%;
88859
- opacity: ${({ showChildren })=>showChildren ? 1 : 0};
88860
- `;
88861
- // eslint-disable-next-line react/require-default-props
88862
- function OrientationDetectionV1({ onOrientationChange, unmountOnHidden, children }) {
88863
- const t = gB();
88864
- const { curOrientation } = useDetectOrientation(onOrientationChange);
88865
- const shouldShowChildren = curOrientation === MODE.PORTRAIT || curOrientation === MODE.DESKTOP;
88866
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
88867
- children: [
88868
- curOrientation === MODE.LANDSCAPE && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
88869
- open: true,
88870
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent, {
88871
- children: t('wrong_orientation')
88872
- })
88873
- }),
88874
- (unmountOnHidden ? shouldShowChildren : true) && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper, {
88875
- showChildren: shouldShowChildren,
88876
- children: children
88877
- })
88878
- ]
88879
- });
88880
- }
88881
- OrientationDetectionV1.defaultProps = {
88882
- onOrientationChange: ()=>{},
88883
- unmountOnHidden: false
88884
- };
88885
- OrientationDetectionV1.propTypes = {
88886
- onOrientationChange: PropTypes.func,
88887
- unmountOnHidden: PropTypes.bool
88888
- };
88889
-
88890
- function OrientationDetection({ version = 'v1', children, ...rest }) {
88891
- if (version === 'v2') {
88892
- return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV2, {
88893
- ...rest,
88894
- children: children
88895
- });
88896
- }
88897
- return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV1, {
88898
- ...rest,
88899
- children: children
88900
- });
88901
- }
88902
-
88903
88703
  const useEkycSession = ()=>{
88904
88704
  const [sessionId, setSessionId] = reactExports.useState(Date.now());
88905
88705
  const updateSessionId = reactExports.useCallback(()=>{
@@ -91391,15 +91191,6 @@
91391
91191
  useRunEffectWhen(()=>logEvent('selfie_flash', 'user_activity.start_flash'), step === STEP.START_FLASHING);
91392
91192
  const progressPercentage = colorIndex === STOP_COLOR ? 0 : Math.min(Math.round((colorIndex + 1) / (colors.length * framesPerColor) * 100), 100);
91393
91193
  const { Loading } = styledComponent;
91394
- const onOrientationChange = reactExports.useCallback((curOrientation)=>{
91395
- if (curOrientation === MODE.LANDSCAPE) {
91396
- videoRef.current?.pause();
91397
- } else {
91398
- videoRef.current?.play();
91399
- }
91400
- }, [
91401
- videoRef
91402
- ]);
91403
91194
  // ============================= Timer =============================
91404
91195
  const onTimeout = reactExports.useCallback(()=>{
91405
91196
  setIsAutoCapturing(false);
@@ -91436,8 +91227,7 @@
91436
91227
  const errorMessage = getErrorMessage(faceError);
91437
91228
  // error message should be centered in the oval
91438
91229
  const errorY = cropArea.y + cropArea.height / 2 + ovalVerticalOffset;
91439
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(OrientationDetection, {
91440
- onOrientationChange: onOrientationChange,
91230
+ return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
91441
91231
  children: [
91442
91232
  /*#__PURE__*/ jsxRuntimeExports.jsx(NormalCamera, {
91443
91233
  frontCamera: frontCamera,
@@ -91923,17 +91713,219 @@
91923
91713
  });
91924
91714
  };
91925
91715
 
91716
+ const MODE = {
91717
+ LANDSCAPE: 'landscape',
91718
+ PORTRAIT: 'portrait',
91719
+ DESKTOP: 'desktop'
91720
+ };
91721
+ const useDetectOrientation = (onOrientationChange)=>{
91722
+ const portraitQuery = reactExports.useRef(window.matchMedia('(orientation: portrait)'));
91723
+ const initOrientation = reactExports.useRef(portraitQuery.current.matches ? MODE.PORTRAIT : MODE.LANDSCAPE);
91724
+ const [curOrientation, setCurOrientation] = reactExports.useState(initOrientation.current);
91725
+ reactExports.useEffect(()=>{
91726
+ function handleResizeForScreen() {
91727
+ const orientationType = get(screen, 'orientation.type')?.split('-')?.[0];
91728
+ setCurOrientation(orientationType);
91729
+ if (typeof onOrientationChange === 'function') {
91730
+ onOrientationChange(orientationType);
91731
+ }
91732
+ }
91733
+ function handleResizeForQuery(e) {
91734
+ let orientation;
91735
+ if (e.matches) {
91736
+ orientation = MODE.PORTRAIT;
91737
+ } else {
91738
+ orientation = MODE.LANDSCAPE;
91739
+ }
91740
+ setCurOrientation(orientation);
91741
+ if (typeof onOrientationChange === 'function') {
91742
+ onOrientationChange(orientation);
91743
+ }
91744
+ }
91745
+ if (screen.orientation) {
91746
+ screen.orientation.addEventListener('change', handleResizeForScreen);
91747
+ } else {
91748
+ // screen.orientation only available on ios > 16.4
91749
+ // fallback to window.matchMedia
91750
+ portraitQuery.current.addEventListener('change', handleResizeForQuery);
91751
+ }
91752
+ return ()=>{
91753
+ if (screen.orientation) {
91754
+ screen.orientation.removeEventListener('change', handleResizeForScreen);
91755
+ } else {
91756
+ // eslint-disable-next-line react-hooks/exhaustive-deps
91757
+ portraitQuery.current.removeEventListener('change', handleResizeForQuery);
91758
+ }
91759
+ };
91760
+ }, [
91761
+ onOrientationChange
91762
+ ]);
91763
+ return libExports.isMobile ? {
91764
+ curOrientation,
91765
+ initOrientation: initOrientation.current
91766
+ } : {
91767
+ curOrientation: MODE.DESKTOP
91768
+ };
91769
+ };
91770
+
91771
+ /**
91772
+ * Custom hook to delay rendering when transitioning from hidden to visible state.
91773
+ * Useful for waiting for browser dimension updates after orientation changes.
91774
+ *
91775
+ * @param params - Hook parameters
91776
+ * @param params.isVisible - Whether the component is currently visible
91777
+ * @param params.enableDelay - Whether to apply delay logic for show transitions
91778
+ * @param params.delayMs - Delay in milliseconds before showing (default: 500)
91779
+ * @returns Delayed visibility state
91780
+ */ function useDelayedRender({ isVisible, enableDelay, delayMs = 500 }) {
91781
+ const [isVisibleDelayed, setIsVisibleDelayed] = reactExports.useState(isVisible);
91782
+ const prevIsVisibleRef = reactExports.useRef(isVisible);
91783
+ const timeoutRef = reactExports.useRef(null);
91784
+ reactExports.useEffect(()=>{
91785
+ const prevIsVisible = prevIsVisibleRef.current;
91786
+ // When delay is disabled, always sync immediately
91787
+ if (!enableDelay) {
91788
+ setIsVisibleDelayed(isVisible);
91789
+ prevIsVisibleRef.current = isVisible;
91790
+ return undefined;
91791
+ }
91792
+ // Handle transitions when delay is enabled
91793
+ const isTransitionToShow = !prevIsVisible && isVisible;
91794
+ const isTransitionToHide = prevIsVisible && !isVisible;
91795
+ if (isTransitionToShow) {
91796
+ // Delay showing when transitioning from hidden to visible
91797
+ timeoutRef.current = setTimeout(()=>{
91798
+ setIsVisibleDelayed(true);
91799
+ }, delayMs);
91800
+ } else if (isTransitionToHide) {
91801
+ // Immediately hide and cancel pending show
91802
+ if (timeoutRef.current) {
91803
+ clearTimeout(timeoutRef.current);
91804
+ timeoutRef.current = null;
91805
+ }
91806
+ setIsVisibleDelayed(false);
91807
+ }
91808
+ prevIsVisibleRef.current = isVisible;
91809
+ return ()=>{
91810
+ if (timeoutRef.current) {
91811
+ clearTimeout(timeoutRef.current);
91812
+ }
91813
+ };
91814
+ }, [
91815
+ isVisible,
91816
+ enableDelay,
91817
+ delayMs
91818
+ ]);
91819
+ return isVisibleDelayed;
91820
+ }
91821
+
91822
+ const PopupContent$1 = dt$1.div`
91823
+ text-align: center;
91824
+ font-size: 20px;
91825
+ font-weight: 600;
91826
+ `;
91827
+ const ChildrenWrapper$1 = dt$1.div`
91828
+ width: 100%;
91829
+ height: 100%;
91830
+ opacity: ${({ $showChildren })=>$showChildren ? 1 : 0};
91831
+ `;
91832
+ const defaultPreferredOrientations = [
91833
+ MODE.PORTRAIT,
91834
+ MODE.DESKTOP
91835
+ ];
91836
+ function OrientationDetectionV2({ onOrientationChange = noop$1, unmountOnHidden = false, remountDelayMs = 500, preferredOrientations = defaultPreferredOrientations, children }) {
91837
+ const t = gB();
91838
+ const { curOrientation } = useDetectOrientation(onOrientationChange);
91839
+ const hasCorrectOrientation = preferredOrientations.includes(curOrientation);
91840
+ const isVisible = useDelayedRender({
91841
+ isVisible: hasCorrectOrientation,
91842
+ enableDelay: unmountOnHidden,
91843
+ delayMs: remountDelayMs
91844
+ });
91845
+ const shouldMountChildrenOnDom = unmountOnHidden ? isVisible : true;
91846
+ return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
91847
+ children: [
91848
+ !preferredOrientations.includes(curOrientation) && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
91849
+ open: true,
91850
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent$1, {
91851
+ children: t('wrong_orientation')
91852
+ })
91853
+ }),
91854
+ shouldMountChildrenOnDom && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper$1, {
91855
+ $showChildren: hasCorrectOrientation,
91856
+ children: children
91857
+ })
91858
+ ]
91859
+ });
91860
+ }
91861
+
91862
+ const PopupContent = dt$1.div`
91863
+ text-align: center;
91864
+ font-size: 20px;
91865
+ font-weight: 600;
91866
+ `;
91867
+ const ChildrenWrapper = dt$1.div`
91868
+ width: 100%;
91869
+ height: 100%;
91870
+ opacity: ${({ showChildren })=>showChildren ? 1 : 0};
91871
+ `;
91872
+ // eslint-disable-next-line react/require-default-props
91873
+ function OrientationDetectionV1({ onOrientationChange, unmountOnHidden, children }) {
91874
+ const t = gB();
91875
+ const { curOrientation } = useDetectOrientation(onOrientationChange);
91876
+ const shouldShowChildren = curOrientation === MODE.PORTRAIT || curOrientation === MODE.DESKTOP;
91877
+ return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
91878
+ children: [
91879
+ curOrientation === MODE.LANDSCAPE && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
91880
+ open: true,
91881
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent, {
91882
+ children: t('wrong_orientation')
91883
+ })
91884
+ }),
91885
+ (unmountOnHidden ? shouldShowChildren : true) && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper, {
91886
+ showChildren: shouldShowChildren,
91887
+ children: children
91888
+ })
91889
+ ]
91890
+ });
91891
+ }
91892
+ OrientationDetectionV1.defaultProps = {
91893
+ onOrientationChange: ()=>{},
91894
+ unmountOnHidden: false
91895
+ };
91896
+ OrientationDetectionV1.propTypes = {
91897
+ onOrientationChange: PropTypes.func,
91898
+ unmountOnHidden: PropTypes.bool
91899
+ };
91900
+
91901
+ function OrientationDetection({ version = 'v1', children, ...rest }) {
91902
+ if (version === 'v2') {
91903
+ return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV2, {
91904
+ ...rest,
91905
+ children: children
91906
+ });
91907
+ }
91908
+ return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV1, {
91909
+ ...rest,
91910
+ children: children
91911
+ });
91912
+ }
91913
+
91926
91914
  // eslint-disable-next-line react/require-default-props
91927
91915
  const FlashLiveness = (props)=>{
91928
91916
  const { apiCredentials, outputEncryptionSettings, mode } = props;
91929
- return /*#__PURE__*/ jsxRuntimeExports.jsx(ApiClientProvider, {
91930
- apiCredentials: apiCredentials,
91931
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashModeProvider, {
91932
- flashMode: mode,
91933
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(OutputEncryptionProvider, {
91934
- settings: outputEncryptionSettings,
91935
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashLivenessContainer, {
91936
- ...props
91917
+ return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetection, {
91918
+ version: "v2",
91919
+ unmountOnHidden: true,
91920
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(ApiClientProvider, {
91921
+ apiCredentials: apiCredentials,
91922
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashModeProvider, {
91923
+ flashMode: mode,
91924
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(OutputEncryptionProvider, {
91925
+ settings: outputEncryptionSettings,
91926
+ children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashLivenessContainer, {
91927
+ ...props
91928
+ })
91937
91929
  })
91938
91930
  })
91939
91931
  })
@@ -110652,13 +110644,11 @@
110652
110644
  }
110653
110645
  return apiClient.detectIDTampering(payload);
110654
110646
  }
110655
- async function readIdCard({ cardType, apiClient, frontCardId, backCardId, isCapturingFrontSide, qrImageId }) {
110647
+ async function readIdCard({ cardType, apiClient, cardImageId, qrImageId }) {
110656
110648
  const payload = {
110657
110649
  card_type: cardType,
110658
- image1: isCapturingFrontSide ? {
110659
- id: frontCardId
110660
- } : {
110661
- id: backCardId
110650
+ image1: {
110651
+ id: cardImageId
110662
110652
  }
110663
110653
  };
110664
110654
  if (qrImageId) {
@@ -110671,10 +110661,6 @@
110671
110661
  return apiClient.readIDCard(payload);
110672
110662
  }
110673
110663
  async function handleApiCheck({ image, frontCardId: existingFrontCardId, qrImageId: existingQRImageId, onError, recordedVideos, apiClient, cardType, cardSide, qrScannedResult, outputEncryptionSettings, enabledServices, fullVideo, capturingVideo, previousCapturingVideoId, previousFullVideoId }) {
110674
- if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
110675
- onError(Errors$3.missing_front_id_card);
110676
- return;
110677
- }
110678
110664
  const uploadPromises = [
110679
110665
  uploadIdCard({
110680
110666
  image,
@@ -110714,15 +110700,6 @@
110714
110700
  }
110715
110701
  const imageId = uploadIdCardResult.data.image_id;
110716
110702
  const qrImageId = uploadQrResult?.data?.image_id || existingQRImageId;
110717
- let frontCardId;
110718
- let backCardId;
110719
- const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
110720
- if (isCapturingFrontSide) {
110721
- frontCardId = imageId;
110722
- } else {
110723
- frontCardId = existingFrontCardId;
110724
- backCardId = imageId;
110725
- }
110726
110703
  const sanityResult = {
110727
110704
  data: null
110728
110705
  };
@@ -110748,9 +110725,7 @@
110748
110725
  const result = await readIdCard({
110749
110726
  cardType,
110750
110727
  apiClient,
110751
- frontCardId,
110752
- backCardId,
110753
- isCapturingFrontSide,
110728
+ cardImageId: imageId,
110754
110729
  qrImageId
110755
110730
  });
110756
110731
  if (result.errors) {
@@ -110768,6 +110743,20 @@
110768
110743
  data: null
110769
110744
  };
110770
110745
  if (enabledServices?.enableDetectIDCardTampering) {
110746
+ // Detect ID Tampering requires front ID card image
110747
+ if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
110748
+ onError(Errors$3.missing_front_id_card);
110749
+ return;
110750
+ }
110751
+ let frontCardId;
110752
+ let backCardId;
110753
+ const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
110754
+ if (isCapturingFrontSide) {
110755
+ frontCardId = imageId;
110756
+ } else {
110757
+ frontCardId = existingFrontCardId;
110758
+ backCardId = imageId;
110759
+ }
110771
110760
  const result = await detectIDTampering({
110772
110761
  apiClient,
110773
110762
  cardType,
@@ -113623,7 +113612,7 @@
113623
113612
  };
113624
113613
  };
113625
113614
 
113626
- const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/5.34.4/assets";
113615
+ const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/5.34.6/assets";
113627
113616
  class TVWebSDK extends gU {
113628
113617
  constructor(props){
113629
113618
  super({