@tsocial/tvweb-sdk 0.0.0-beta.20260106-111700 → 0.0.0-beta.20260113-112310

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 "0.0.0-beta.20260106-111700";
33786
+ return "0.0.0-beta.20260113-112310";
33787
33787
  }
33788
33788
  function nI$1() {
33789
33789
  return {
@@ -41260,52 +41260,52 @@
41260
41260
  }(), uG);
41261
41261
  }();
41262
41262
  function dm(e, t) {
41263
- let r = dg();
41263
+ let r = dv();
41264
41264
  return (dm = function(e, t) {
41265
- return r[e -= 354];
41265
+ return r[e -= 317];
41266
41266
  })(e, t);
41267
41267
  }
41268
- function dg() {
41268
+ let dg = dm, dy = dm, db = dv();
41269
+ for(;;)try {
41270
+ if (parseInt(dy(339)) / 1 + -parseInt(dy(321)) / 2 * (parseInt(dy(331)) / 3) + parseInt(dy(319)) / 4 * (parseInt(dy(335)) / 5) + -parseInt(dy(322)) / 6 + parseInt(dy(326)) / 7 * (parseInt(dy(323)) / 8) + parseInt(dy(334)) / 9 * (-parseInt(dy(332)) / 10) + -parseInt(dy(324)) / 11 * (-parseInt(dy(337)) / 12) === 239699) break;
41271
+ db.push(db.shift());
41272
+ } catch (e) {
41273
+ db.push(db.shift());
41274
+ }
41275
+ function dv() {
41269
41276
  let e = [
41270
- "ytJdcsPxrD",
41271
- "3325580IJRjfa",
41272
- "1962rbKEwo",
41273
- "359892gaKbdX",
41274
- "DepBO8t60S",
41277
+ "MFkwEwYHKo",
41275
41278
  "2a8648ce3d",
41276
- "0301070342",
41277
41279
  "Mjci1ul8mm",
41278
- "KA==",
41280
+ "ZIzj0CAQYI",
41281
+ "8AzvxTw",
41279
41282
  "KoZIzj0DAQ",
41280
- "458668Wltqkx",
41283
+ "13522XetbDO",
41284
+ "49104pREmCz",
41285
+ "8ifaAZX",
41286
+ "95689TLpVMg",
41287
+ "072a8648ce",
41288
+ "1419082NKlgHK",
41289
+ "0301070342",
41290
+ "3059301306",
41281
41291
  "+faHkP3QC3",
41292
+ "cDQgAE9h6Z",
41293
+ "183zCtLuB",
41294
+ "2925870RahsTq",
41295
+ "MfPrcYTM70",
41296
+ "9cvkkNK",
41297
+ "412345ggqcuY",
41298
+ "DepBO8t60S",
41299
+ "684DooIYO",
41282
41300
  "ssRdXLZEX8",
41283
- "81cVsDSQ",
41284
- "940nLufso",
41285
- "2474NuulkO",
41286
- "000",
41287
- "9xZGYZu",
41288
- "MFkwEwYHKo",
41289
- "35640hpKjQn",
41290
- "D9EKOWS+U4",
41291
- "1362880fRAHgM",
41292
- "44P0rKKsZK",
41293
- "3d02010608",
41294
- "ZIzj0CAQYI",
41295
- "072a8648ce"
41301
+ "89384WSmvmG",
41302
+ "44P0rKKsZK"
41296
41303
  ];
41297
- return (dg = function() {
41304
+ return (dv = function() {
41298
41305
  return e;
41299
41306
  })();
41300
41307
  }
41301
- let dy = dm, db = dm, dv = dg();
41302
- for(;;)try {
41303
- if (parseInt(db(376)) / 1 + parseInt(db(372)) / 2 * (parseInt(db(370)) / 3) + parseInt(db(360)) / 4 + parseInt(db(371)) / 5 * (parseInt(db(359)) / 6) + parseInt(db(367)) / 7 + parseInt(db(378)) / 8 + -parseInt(db(374)) / 9 * (parseInt(db(358)) / 10) === 123814) break;
41304
- dv.push(dv.shift());
41305
- } catch (e) {
41306
- dv.push(dv.shift());
41307
- }
41308
- let d_ = "3059301306" + dy(356) + dy(354) + dy(362) + dy(363) + dy(373), dx = dy(375) + dy(355) + dy(366) + "cDQgAE9h6Z" + dy(361) + dy(357) + dy(368) + dy(379) + dy(364) + dy(377) + "MfPrcYTM70" + dy(369) + dy(365);
41308
+ let d_ = dg(328) + dg(325) + "3d02010608" + dg(342) + dg(327) + "000", dx = dg(341) + dg(318) + dg(320) + dg(330) + dg(336) + "ytJdcsPxrD" + dg(329) + dg(340) + dg(317) + "D9EKOWS+U4" + dg(333) + dg(338) + "KA==";
41309
41309
  async function dC(e) {
41310
41310
  let t = new TextEncoder().encode(e);
41311
41311
  return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256", t))).map((e)=>e.toString(16).padStart(2, "0")).join("");
@@ -45324,7 +45324,7 @@
45324
45324
  return this.getKey().getPublicKey();
45325
45325
  }, e.prototype.getPublicKeyB64 = function() {
45326
45326
  return this.getKey().getPublicBaseKeyB64();
45327
- }, e.version = "5.34.1", e;
45327
+ }, e.version = "5.34.5", e;
45328
45328
  }();
45329
45329
  let hO = [
45330
45330
  "-",
@@ -88700,204 +88700,6 @@
88700
88700
  return videoCanvas;
88701
88701
  };
88702
88702
 
88703
- const MODE = {
88704
- LANDSCAPE: 'landscape',
88705
- PORTRAIT: 'portrait',
88706
- DESKTOP: 'desktop'
88707
- };
88708
- const useDetectOrientation = (onOrientationChange)=>{
88709
- const portraitQuery = reactExports.useRef(window.matchMedia('(orientation: portrait)'));
88710
- const initOrientation = reactExports.useRef(portraitQuery.current.matches ? MODE.PORTRAIT : MODE.LANDSCAPE);
88711
- const [curOrientation, setCurOrientation] = reactExports.useState(initOrientation.current);
88712
- reactExports.useEffect(()=>{
88713
- function handleResizeForScreen() {
88714
- const orientationType = get(screen, 'orientation.type')?.split('-')?.[0];
88715
- setCurOrientation(orientationType);
88716
- if (typeof onOrientationChange === 'function') {
88717
- onOrientationChange(orientationType);
88718
- }
88719
- }
88720
- function handleResizeForQuery(e) {
88721
- let orientation;
88722
- if (e.matches) {
88723
- orientation = MODE.PORTRAIT;
88724
- } else {
88725
- orientation = MODE.LANDSCAPE;
88726
- }
88727
- setCurOrientation(orientation);
88728
- if (typeof onOrientationChange === 'function') {
88729
- onOrientationChange(orientation);
88730
- }
88731
- }
88732
- if (screen.orientation) {
88733
- screen.orientation.addEventListener('change', handleResizeForScreen);
88734
- } else {
88735
- // screen.orientation only available on ios > 16.4
88736
- // fallback to window.matchMedia
88737
- portraitQuery.current.addEventListener('change', handleResizeForQuery);
88738
- }
88739
- return ()=>{
88740
- if (screen.orientation) {
88741
- screen.orientation.removeEventListener('change', handleResizeForScreen);
88742
- } else {
88743
- // eslint-disable-next-line react-hooks/exhaustive-deps
88744
- portraitQuery.current.removeEventListener('change', handleResizeForQuery);
88745
- }
88746
- };
88747
- }, [
88748
- onOrientationChange
88749
- ]);
88750
- return libExports.isMobile ? {
88751
- curOrientation,
88752
- initOrientation: initOrientation.current
88753
- } : {
88754
- curOrientation: MODE.DESKTOP
88755
- };
88756
- };
88757
-
88758
- /**
88759
- * Custom hook to delay rendering when transitioning from hidden to visible state.
88760
- * Useful for waiting for browser dimension updates after orientation changes.
88761
- *
88762
- * @param params - Hook parameters
88763
- * @param params.isVisible - Whether the component is currently visible
88764
- * @param params.enableDelay - Whether to apply delay logic for show transitions
88765
- * @param params.delayMs - Delay in milliseconds before showing (default: 500)
88766
- * @returns Delayed visibility state
88767
- */ function useDelayedRender({ isVisible, enableDelay, delayMs = 500 }) {
88768
- const [isVisibleDelayed, setIsVisibleDelayed] = reactExports.useState(isVisible);
88769
- const prevIsVisibleRef = reactExports.useRef(isVisible);
88770
- const timeoutRef = reactExports.useRef(null);
88771
- reactExports.useEffect(()=>{
88772
- const prevIsVisible = prevIsVisibleRef.current;
88773
- // When delay is disabled, always sync immediately
88774
- if (!enableDelay) {
88775
- setIsVisibleDelayed(isVisible);
88776
- prevIsVisibleRef.current = isVisible;
88777
- return undefined;
88778
- }
88779
- // Handle transitions when delay is enabled
88780
- const isTransitionToShow = !prevIsVisible && isVisible;
88781
- const isTransitionToHide = prevIsVisible && !isVisible;
88782
- if (isTransitionToShow) {
88783
- // Delay showing when transitioning from hidden to visible
88784
- timeoutRef.current = setTimeout(()=>{
88785
- setIsVisibleDelayed(true);
88786
- }, delayMs);
88787
- } else if (isTransitionToHide) {
88788
- // Immediately hide and cancel pending show
88789
- if (timeoutRef.current) {
88790
- clearTimeout(timeoutRef.current);
88791
- timeoutRef.current = null;
88792
- }
88793
- setIsVisibleDelayed(false);
88794
- }
88795
- prevIsVisibleRef.current = isVisible;
88796
- return ()=>{
88797
- if (timeoutRef.current) {
88798
- clearTimeout(timeoutRef.current);
88799
- }
88800
- };
88801
- }, [
88802
- isVisible,
88803
- enableDelay,
88804
- delayMs
88805
- ]);
88806
- return isVisibleDelayed;
88807
- }
88808
-
88809
- const PopupContent$1 = dt$1.div`
88810
- text-align: center;
88811
- font-size: 20px;
88812
- font-weight: 600;
88813
- `;
88814
- const ChildrenWrapper$1 = dt$1.div`
88815
- width: 100%;
88816
- height: 100%;
88817
- opacity: ${({ $showChildren })=>$showChildren ? 1 : 0};
88818
- `;
88819
- const defaultPreferredOrientations = [
88820
- MODE.PORTRAIT,
88821
- MODE.DESKTOP
88822
- ];
88823
- function OrientationDetectionV2({ onOrientationChange = noop$1, unmountOnHidden = false, remountDelayMs = 500, preferredOrientations = defaultPreferredOrientations, children }) {
88824
- const t = gB();
88825
- const { curOrientation } = useDetectOrientation(onOrientationChange);
88826
- const hasCorrectOrientation = preferredOrientations.includes(curOrientation);
88827
- const isVisible = useDelayedRender({
88828
- isVisible: hasCorrectOrientation,
88829
- enableDelay: unmountOnHidden,
88830
- delayMs: remountDelayMs
88831
- });
88832
- const shouldMountChildrenOnDom = unmountOnHidden ? isVisible : true;
88833
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
88834
- children: [
88835
- !preferredOrientations.includes(curOrientation) && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
88836
- open: true,
88837
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent$1, {
88838
- children: t('wrong_orientation')
88839
- })
88840
- }),
88841
- shouldMountChildrenOnDom && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper$1, {
88842
- $showChildren: hasCorrectOrientation,
88843
- children: children
88844
- })
88845
- ]
88846
- });
88847
- }
88848
-
88849
- const PopupContent = dt$1.div`
88850
- text-align: center;
88851
- font-size: 20px;
88852
- font-weight: 600;
88853
- `;
88854
- const ChildrenWrapper = dt$1.div`
88855
- width: 100%;
88856
- height: 100%;
88857
- opacity: ${({ showChildren })=>showChildren ? 1 : 0};
88858
- `;
88859
- // eslint-disable-next-line react/require-default-props
88860
- function OrientationDetectionV1({ onOrientationChange, unmountOnHidden, children }) {
88861
- const t = gB();
88862
- const { curOrientation } = useDetectOrientation(onOrientationChange);
88863
- const shouldShowChildren = curOrientation === MODE.PORTRAIT || curOrientation === MODE.DESKTOP;
88864
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
88865
- children: [
88866
- curOrientation === MODE.LANDSCAPE && /*#__PURE__*/ jsxRuntimeExports.jsx(PopupComponent, {
88867
- open: true,
88868
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(PopupContent, {
88869
- children: t('wrong_orientation')
88870
- })
88871
- }),
88872
- (unmountOnHidden ? shouldShowChildren : true) && /*#__PURE__*/ jsxRuntimeExports.jsx(ChildrenWrapper, {
88873
- showChildren: shouldShowChildren,
88874
- children: children
88875
- })
88876
- ]
88877
- });
88878
- }
88879
- OrientationDetectionV1.defaultProps = {
88880
- onOrientationChange: ()=>{},
88881
- unmountOnHidden: false
88882
- };
88883
- OrientationDetectionV1.propTypes = {
88884
- onOrientationChange: PropTypes.func,
88885
- unmountOnHidden: PropTypes.bool
88886
- };
88887
-
88888
- function OrientationDetection({ version = 'v1', children, ...rest }) {
88889
- if (version === 'v2') {
88890
- return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV2, {
88891
- ...rest,
88892
- children: children
88893
- });
88894
- }
88895
- return /*#__PURE__*/ jsxRuntimeExports.jsx(OrientationDetectionV1, {
88896
- ...rest,
88897
- children: children
88898
- });
88899
- }
88900
-
88901
88703
  const useEkycSession = ()=>{
88902
88704
  const [sessionId, setSessionId] = reactExports.useState(Date.now());
88903
88705
  const updateSessionId = reactExports.useCallback(()=>{
@@ -89117,7 +88919,7 @@
89117
88919
  width: 6px;
89118
88920
  height: 6px;
89119
88921
  border-radius: 50%;
89120
- background-color: ${getTheme('FlashLiveness.progressBar.mainColor')};
88922
+ background-color: ${getTheme('FlashLiveness.progressBar.textColor')};
89121
88923
  margin-right: 5px;
89122
88924
  margin-bottom: 2px;
89123
88925
  }
@@ -91389,15 +91191,6 @@
91389
91191
  useRunEffectWhen(()=>logEvent('selfie_flash', 'user_activity.start_flash'), step === STEP.START_FLASHING);
91390
91192
  const progressPercentage = colorIndex === STOP_COLOR ? 0 : Math.min(Math.round((colorIndex + 1) / (colors.length * framesPerColor) * 100), 100);
91391
91193
  const { Loading } = styledComponent;
91392
- const onOrientationChange = reactExports.useCallback((curOrientation)=>{
91393
- if (curOrientation === MODE.LANDSCAPE) {
91394
- videoRef.current?.pause();
91395
- } else {
91396
- videoRef.current?.play();
91397
- }
91398
- }, [
91399
- videoRef
91400
- ]);
91401
91194
  // ============================= Timer =============================
91402
91195
  const onTimeout = reactExports.useCallback(()=>{
91403
91196
  setIsAutoCapturing(false);
@@ -91434,8 +91227,7 @@
91434
91227
  const errorMessage = getErrorMessage(faceError);
91435
91228
  // error message should be centered in the oval
91436
91229
  const errorY = cropArea.y + cropArea.height / 2 + ovalVerticalOffset;
91437
- return /*#__PURE__*/ jsxRuntimeExports.jsxs(OrientationDetection, {
91438
- onOrientationChange: onOrientationChange,
91230
+ return /*#__PURE__*/ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
91439
91231
  children: [
91440
91232
  /*#__PURE__*/ jsxRuntimeExports.jsx(NormalCamera, {
91441
91233
  frontCamera: frontCamera,
@@ -91921,17 +91713,219 @@
91921
91713
  });
91922
91714
  };
91923
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
+
91924
91914
  // eslint-disable-next-line react/require-default-props
91925
91915
  const FlashLiveness = (props)=>{
91926
91916
  const { apiCredentials, outputEncryptionSettings, mode } = props;
91927
- return /*#__PURE__*/ jsxRuntimeExports.jsx(ApiClientProvider, {
91928
- apiCredentials: apiCredentials,
91929
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashModeProvider, {
91930
- flashMode: mode,
91931
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(OutputEncryptionProvider, {
91932
- settings: outputEncryptionSettings,
91933
- children: /*#__PURE__*/ jsxRuntimeExports.jsx(FlashLivenessContainer, {
91934
- ...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
+ })
91935
91929
  })
91936
91930
  })
91937
91931
  })
@@ -110650,13 +110644,11 @@
110650
110644
  }
110651
110645
  return apiClient.detectIDTampering(payload);
110652
110646
  }
110653
- async function readIdCard({ cardType, apiClient, frontCardId, backCardId, isCapturingFrontSide, qrImageId }) {
110647
+ async function readIdCard({ cardType, apiClient, cardImageId, qrImageId }) {
110654
110648
  const payload = {
110655
110649
  card_type: cardType,
110656
- image1: isCapturingFrontSide ? {
110657
- id: frontCardId
110658
- } : {
110659
- id: backCardId
110650
+ image1: {
110651
+ id: cardImageId
110660
110652
  }
110661
110653
  };
110662
110654
  if (qrImageId) {
@@ -110669,10 +110661,6 @@
110669
110661
  return apiClient.readIDCard(payload);
110670
110662
  }
110671
110663
  async function handleApiCheck({ image, frontCardId: existingFrontCardId, qrImageId: existingQRImageId, onError, recordedVideos, apiClient, cardType, cardSide, qrScannedResult, outputEncryptionSettings, enabledServices, fullVideo, capturingVideo, previousCapturingVideoId, previousFullVideoId }) {
110672
- if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
110673
- onError(Errors$3.missing_front_id_card);
110674
- return;
110675
- }
110676
110664
  const uploadPromises = [
110677
110665
  uploadIdCard({
110678
110666
  image,
@@ -110712,15 +110700,6 @@
110712
110700
  }
110713
110701
  const imageId = uploadIdCardResult.data.image_id;
110714
110702
  const qrImageId = uploadQrResult?.data?.image_id || existingQRImageId;
110715
- let frontCardId;
110716
- let backCardId;
110717
- const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
110718
- if (isCapturingFrontSide) {
110719
- frontCardId = imageId;
110720
- } else {
110721
- frontCardId = existingFrontCardId;
110722
- backCardId = imageId;
110723
- }
110724
110703
  const sanityResult = {
110725
110704
  data: null
110726
110705
  };
@@ -110746,9 +110725,7 @@
110746
110725
  const result = await readIdCard({
110747
110726
  cardType,
110748
110727
  apiClient,
110749
- frontCardId,
110750
- backCardId,
110751
- isCapturingFrontSide,
110728
+ cardImageId: imageId,
110752
110729
  qrImageId
110753
110730
  });
110754
110731
  if (result.errors) {
@@ -110766,6 +110743,20 @@
110766
110743
  data: null
110767
110744
  };
110768
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
+ }
110769
110760
  const result = await detectIDTampering({
110770
110761
  apiClient,
110771
110762
  cardType,
@@ -110805,8 +110796,8 @@
110805
110796
  const { Errors: Errors$2 } = ra$1;
110806
110797
  // eslint-disable-next-line react/require-default-props
110807
110798
  const ReadIDCardWithApiCall = ({ readIDCardUIOnlyComponent: ReadIDCardUIOnly, ...props })=>{
110808
- const { onError: onErrorFromProp, onStepDone: onStepDoneFromProp, apiCredentials, logCredentials, outputEncryptionSettings, serviceSettings, flowId, ...rest } = props;
110809
- const [clientSettings, setClientSettings] = reactExports.useState(null);
110799
+ const { onError: onErrorFromProp, onStepDone: onStepDoneFromProp, apiCredentials, logCredentials, outputEncryptionSettings, serviceSettings, flowId, clientSettings: propClientSettings, ...rest } = props;
110800
+ const [clientSettings, setClientSettings] = reactExports.useState(propClientSettings);
110810
110801
  const [isClientSettingsFetched, setIsClientSettingsFetched] = reactExports.useState(false);
110811
110802
  const { apiClient } = fU.useApiClient({
110812
110803
  apiCredentials,
@@ -110970,7 +110961,7 @@
110970
110961
  onStepDoneWithBilling,
110971
110962
  outputEncryptionSettings
110972
110963
  ]);
110973
- if (!isClientSettingsFetched) {
110964
+ if (enabledServices.enableGetClientSettings && !isClientSettingsFetched) {
110974
110965
  return null;
110975
110966
  }
110976
110967
  return /*#__PURE__*/ jsxRuntimeExports.jsx(dV.LicenseProvider, {
@@ -111001,7 +110992,8 @@
111001
110992
  outputEncryptionSettings: PropTypes.shape({}),
111002
110993
  readIDCardUIOnlyComponent: PropTypes.func,
111003
110994
  serviceSettings: PropTypes.shape({}),
111004
- flowId: PropTypes.string
110995
+ flowId: PropTypes.string,
110996
+ clientSettings: PropTypes.shape({})
111005
110997
  };
111006
110998
  ReadIDCardWithApiCall.defaultProps = {
111007
110999
  onError: ()=>{},
@@ -111027,7 +111019,8 @@
111027
111019
  enableDetectIDCardTampering: true,
111028
111020
  enableReadIDCardInfo: true
111029
111021
  },
111030
- flowId: ''
111022
+ flowId: '',
111023
+ clientSettings: null
111031
111024
  };
111032
111025
 
111033
111026
  /**
@@ -113619,7 +113612,7 @@
113619
113612
  };
113620
113613
  };
113621
113614
 
113622
- const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/0.0.0-beta.20260106-111700/assets";
113615
+ const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/0.0.0-beta.20260113-112310/assets";
113623
113616
  class TVWebSDK extends gU {
113624
113617
  constructor(props){
113625
113618
  super({