@tsocial/tvweb-sdk 5.34.3 → 5.34.5

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.3";
33786
+ return "5.34.5";
33787
33787
  }
33788
33788
  function nI$1() {
33789
33789
  return {
@@ -41261,52 +41261,49 @@
41261
41261
  }();
41262
41262
  let dm = dg;
41263
41263
  function dg(e, t) {
41264
- let r = dy();
41264
+ let r = dv();
41265
41265
  return (dg = function(e, t) {
41266
- return r[e -= 367];
41266
+ return r[e -= 187];
41267
41267
  })(e, t);
41268
41268
  }
41269
- function dy() {
41269
+ let dy = dg, db = dv();
41270
+ for(;;)try {
41271
+ if (-parseInt(dy(192)) / 1 + -parseInt(dy(203)) / 2 * (parseInt(dy(195)) / 3) + parseInt(dy(196)) / 4 + -parseInt(dy(207)) / 5 + -parseInt(dy(190)) / 6 + -parseInt(dy(189)) / 7 * (parseInt(dy(191)) / 8) + parseInt(dy(187)) / 9 === 698852) break;
41272
+ db.push(db.shift());
41273
+ } catch (e) {
41274
+ db.push(db.shift());
41275
+ }
41276
+ function dv() {
41270
41277
  let e = [
41271
- "44P0rKKsZK",
41272
- "MfPrcYTM70",
41278
+ "ssRdXLZEX8",
41279
+ "0301070342",
41273
41280
  "KoZIzj0DAQ",
41274
- "4507063dEvzaV",
41275
- "072a8648ce",
41276
- "223235rNcaea",
41277
- "DepBO8t60S",
41281
+ "ytJdcsPxrD",
41278
41282
  "ZIzj0CAQYI",
41279
- "52vAzYCl",
41280
- "4102938twVDjD",
41281
- "Mjci1ul8mm",
41283
+ "44P0rKKsZK",
41284
+ "78oZoJhH",
41282
41285
  "2a8648ce3d",
41283
41286
  "000",
41284
- "75825zTCCpR",
41285
- "D9EKOWS+U4",
41286
- "9EzrkuM",
41287
- "0301070342",
41288
- "8QVfurr",
41289
- "3d02010608",
41290
- "7975860ZUkdQz",
41287
+ "3059301306",
41288
+ "5437410AYDgCq",
41289
+ "+faHkP3QC3",
41290
+ "Mjci1ul8mm",
41291
+ "37124379gQRvRs",
41292
+ "MFkwEwYHKo",
41293
+ "7ZYIbTa",
41294
+ "4421568SgMIDk",
41295
+ "1587704kuyojg",
41296
+ "850895lAaPpT",
41297
+ "DepBO8t60S",
41291
41298
  "cDQgAE9h6Z",
41292
- "66TBiIus",
41293
- "ssRdXLZEX8",
41294
- "ytJdcsPxrD",
41295
- "937803kIgQTZ",
41296
- "4563906dowYkq"
41299
+ "48579GCEgeE",
41300
+ "316864rFHuHL"
41297
41301
  ];
41298
- return (dy = function() {
41302
+ return (dv = function() {
41299
41303
  return e;
41300
41304
  })();
41301
41305
  }
41302
- let db = dg, dv = dy();
41303
- for(;;)try {
41304
- if (-parseInt(db(368)) / 1 + -parseInt(db(391)) / 2 * (-parseInt(db(383)) / 3) + -parseInt(db(378)) / 4 * (-parseInt(db(375)) / 5) + parseInt(db(369)) / 6 + -parseInt(db(379)) / 7 * (-parseInt(db(387)) / 8) + parseInt(db(385)) / 9 * (-parseInt(db(389)) / 10) + -parseInt(db(373)) / 11 === 616149) break;
41305
- dv.push(dv.shift());
41306
- } catch (e) {
41307
- dv.push(dv.shift());
41308
- }
41309
- let d_ = "3059301306" + dm(374) + dm(388) + dm(381) + dm(386) + dm(382), dx = "MFkwEwYHKo" + dm(377) + dm(372) + dm(390) + dm(376) + dm(367) + "+faHkP3QC3" + dm(370) + dm(380) + dm(384) + dm(371) + dm(392) + "KA==";
41306
+ let d_ = dm(206) + "072a8648ce3d02010608" + dm(204) + dm(198) + dm(205), dx = dm(188) + dm(201) + dm(199) + dm(194) + dm(193) + dm(200) + dm(208) + dm(202) + dm(209) + "D9EKOWS+U4MfPrcYTM70" + dm(197) + "KA==";
41310
41307
  async function dC(e) {
41311
41308
  let t = new TextEncoder().encode(e);
41312
41309
  return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256", t))).map((e)=>e.toString(16).padStart(2, "0")).join("");
@@ -45325,7 +45322,7 @@
45325
45322
  return this.getKey().getPublicKey();
45326
45323
  }, e.prototype.getPublicKeyB64 = function() {
45327
45324
  return this.getKey().getPublicBaseKeyB64();
45328
- }, e.version = "5.34.2", e;
45325
+ }, e.version = "5.34.4", e;
45329
45326
  }();
45330
45327
  let hO = [
45331
45328
  "-",
@@ -110651,13 +110648,11 @@
110651
110648
  }
110652
110649
  return apiClient.detectIDTampering(payload);
110653
110650
  }
110654
- async function readIdCard({ cardType, apiClient, frontCardId, backCardId, isCapturingFrontSide, qrImageId }) {
110651
+ async function readIdCard({ cardType, apiClient, cardImageId, qrImageId }) {
110655
110652
  const payload = {
110656
110653
  card_type: cardType,
110657
- image1: isCapturingFrontSide ? {
110658
- id: frontCardId
110659
- } : {
110660
- id: backCardId
110654
+ image1: {
110655
+ id: cardImageId
110661
110656
  }
110662
110657
  };
110663
110658
  if (qrImageId) {
@@ -110670,10 +110665,6 @@
110670
110665
  return apiClient.readIDCard(payload);
110671
110666
  }
110672
110667
  async function handleApiCheck({ image, frontCardId: existingFrontCardId, qrImageId: existingQRImageId, onError, recordedVideos, apiClient, cardType, cardSide, qrScannedResult, outputEncryptionSettings, enabledServices, fullVideo, capturingVideo, previousCapturingVideoId, previousFullVideoId }) {
110673
- if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
110674
- onError(Errors$3.missing_front_id_card);
110675
- return;
110676
- }
110677
110668
  const uploadPromises = [
110678
110669
  uploadIdCard({
110679
110670
  image,
@@ -110713,15 +110704,6 @@
110713
110704
  }
110714
110705
  const imageId = uploadIdCardResult.data.image_id;
110715
110706
  const qrImageId = uploadQrResult?.data?.image_id || existingQRImageId;
110716
- let frontCardId;
110717
- let backCardId;
110718
- const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
110719
- if (isCapturingFrontSide) {
110720
- frontCardId = imageId;
110721
- } else {
110722
- frontCardId = existingFrontCardId;
110723
- backCardId = imageId;
110724
- }
110725
110707
  const sanityResult = {
110726
110708
  data: null
110727
110709
  };
@@ -110747,9 +110729,7 @@
110747
110729
  const result = await readIdCard({
110748
110730
  cardType,
110749
110731
  apiClient,
110750
- frontCardId,
110751
- backCardId,
110752
- isCapturingFrontSide,
110732
+ cardImageId: imageId,
110753
110733
  qrImageId
110754
110734
  });
110755
110735
  if (result.errors) {
@@ -110767,6 +110747,20 @@
110767
110747
  data: null
110768
110748
  };
110769
110749
  if (enabledServices?.enableDetectIDCardTampering) {
110750
+ // Detect ID Tampering requires front ID card image
110751
+ if (cardSide === IDCardSide$2.BACK && !existingFrontCardId) {
110752
+ onError(Errors$3.missing_front_id_card);
110753
+ return;
110754
+ }
110755
+ let frontCardId;
110756
+ let backCardId;
110757
+ const isCapturingFrontSide = cardSide === IDCardSide$2.FRONT;
110758
+ if (isCapturingFrontSide) {
110759
+ frontCardId = imageId;
110760
+ } else {
110761
+ frontCardId = existingFrontCardId;
110762
+ backCardId = imageId;
110763
+ }
110770
110764
  const result = await detectIDTampering({
110771
110765
  apiClient,
110772
110766
  cardType,
@@ -110806,8 +110800,8 @@
110806
110800
  const { Errors: Errors$2 } = ra$1;
110807
110801
  // eslint-disable-next-line react/require-default-props
110808
110802
  const ReadIDCardWithApiCall = ({ readIDCardUIOnlyComponent: ReadIDCardUIOnly, ...props })=>{
110809
- const { onError: onErrorFromProp, onStepDone: onStepDoneFromProp, apiCredentials, logCredentials, outputEncryptionSettings, serviceSettings, flowId, ...rest } = props;
110810
- const [clientSettings, setClientSettings] = reactExports.useState(null);
110803
+ const { onError: onErrorFromProp, onStepDone: onStepDoneFromProp, apiCredentials, logCredentials, outputEncryptionSettings, serviceSettings, flowId, clientSettings: propClientSettings, ...rest } = props;
110804
+ const [clientSettings, setClientSettings] = reactExports.useState(propClientSettings);
110811
110805
  const [isClientSettingsFetched, setIsClientSettingsFetched] = reactExports.useState(false);
110812
110806
  const { apiClient } = fU.useApiClient({
110813
110807
  apiCredentials,
@@ -110971,7 +110965,7 @@
110971
110965
  onStepDoneWithBilling,
110972
110966
  outputEncryptionSettings
110973
110967
  ]);
110974
- if (!isClientSettingsFetched) {
110968
+ if (enabledServices.enableGetClientSettings && !isClientSettingsFetched) {
110975
110969
  return null;
110976
110970
  }
110977
110971
  return /*#__PURE__*/ jsxRuntimeExports.jsx(dV.LicenseProvider, {
@@ -111002,7 +110996,8 @@
111002
110996
  outputEncryptionSettings: PropTypes.shape({}),
111003
110997
  readIDCardUIOnlyComponent: PropTypes.func,
111004
110998
  serviceSettings: PropTypes.shape({}),
111005
- flowId: PropTypes.string
110999
+ flowId: PropTypes.string,
111000
+ clientSettings: PropTypes.shape({})
111006
111001
  };
111007
111002
  ReadIDCardWithApiCall.defaultProps = {
111008
111003
  onError: ()=>{},
@@ -111028,7 +111023,8 @@
111028
111023
  enableDetectIDCardTampering: true,
111029
111024
  enableReadIDCardInfo: true
111030
111025
  },
111031
- flowId: ''
111026
+ flowId: '',
111027
+ clientSettings: null
111032
111028
  };
111033
111029
 
111034
111030
  /**
@@ -113620,7 +113616,7 @@
113620
113616
  };
113621
113617
  };
113622
113618
 
113623
- const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/5.34.3/assets";
113619
+ const defaultAssetRoot = "https://vision-cdn.trustingsocial.com/tvweb-sdk/5.34.5/assets";
113624
113620
  class TVWebSDK extends gU {
113625
113621
  constructor(props){
113626
113622
  super({