react-native-timacare 3.3.29 → 3.3.31

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.
Files changed (29) hide show
  1. package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
  2. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +18 -13
  3. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
  4. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  5. package/lib/commonjs/screens/liveness-v2/index.js.flow +2 -7
  6. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  7. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  8. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +21 -99
  9. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  10. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
  11. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +49 -28
  12. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  13. package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
  14. package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
  15. package/lib/module/screens/liveness-v2/index.js +1 -1
  16. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  17. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  18. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  19. package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
  20. package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  21. package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
  22. package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
  23. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
  24. package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/screens/camera/CCCDCameraScreen.tsx +18 -13
  27. package/src/screens/liveness-v2/index.tsx +2 -7
  28. package/src/screens/toan-trinh-so/OCR.tsx +21 -99
  29. package/src/screens/toan-trinh-so/RegisterCamera.tsx +49 -28
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=CCCDCameraScreen;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeVisionCamera=require("react-native-vision-camera");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _CommonStyles=require("../CommonStyles");var _reactNativePermissions=require("react-native-permissions");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/camera/CCCDCameraScreen.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function CCCDCameraScreen(props){var _props$route2,_props$route2$params;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var isFocused=(0,_native.useIsFocused)();var myCamera=(0,_react.useRef)(null);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),passPermission=_useState2[0],setPassPermission=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),shouldRenderCamera=_useState4[0],setShouldRenderCamera=_useState4[1];var device=(0,_reactNativeVisionCamera.useCameraDevice)('back');var format=(0,_reactNativeVisionCamera.useCameraFormat)(device,[{photoResolution:{width:1280,height:720}}]);var takePicture=function _callee(){var _props$route,_props$route$params,data,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(myCamera.current==null)){_context.next=1;break;}return _context.abrupt("return");case 1:_context.prev=1;_context.next=2;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'quality'}));case 2:data=_context.sent;navigation.goBack();if((_props$route=props.route)!=null&&(_props$route$params=_props$route.params)!=null&&_props$route$params.callback){props.route.params.callback('file://'+data.path);}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.error(_t);case 4:case"end":return _context.stop();}},null,null,[[1,3]],Promise);};var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.LIMITED:console.log('The permission is limited: some actions are possible');_reactNative.Alert.alert('Thông báo','Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};(0,_react.useEffect)(function(){_requestPermissions();},[]);(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);if(!passPermission&&!shouldRenderCamera){return _react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:160,columnNumber:7}},_react.default.createElement(_reactNative.ActivityIndicator,{size:"large",color:"#0000ff",__self:this,__source:{fileName:_jsxFileName,lineNumber:161,columnNumber:9}}));}return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'black'},pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:167,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.fill,_CommonStyles.commonStyles.justifyCenter,{position:'absolute',width:_reactNative.Dimensions.get('window').width,height:_reactNative.Dimensions.get('window').height}],__self:this,__source:{fileName:_jsxFileName,lineNumber:171,columnNumber:7}},device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:{width:_reactNative.Dimensions.get('window').width,height:260,overflow:'hidden'},device:device,isActive:true,photo:true,format:format,__self:this,__source:{fileName:_jsxFileName,lineNumber:184,columnNumber:11}}):_react.default.createElement(_reactNative.ActivityIndicator,{__self:this,__source:{fileName:_jsxFileName,lineNumber:197,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:[$back,{top:insets.top+16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:201,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:0,width:48,height:48,zIndex:1000,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:202,columnNumber:9}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:215,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{textAlign:'center',zIndex:10,color:'#FFFFFF',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:217,columnNumber:9}},props!=null&&(_props$route2=props.route)!=null&&(_props$route2$params=_props$route2.params)!=null&&_props$route2$params.front?'Chụp CMND/ CCCD mặt trước':'Chụp CMND/ CCCD mặt sau')),_react.default.createElement(_reactNative.View,{style:{position:'absolute',bottom:24+insets.bottom,alignSelf:'center',flexDirection:'column',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:230,columnNumber:7}},_react.default.createElement(_MText.MText,{style:{color:'#fff',marginBottom:16,textAlign:'center',paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:239,columnNumber:9}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:takePicture,__self:this,__source:{fileName:_jsxFileName,lineNumber:250,columnNumber:9}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:251,columnNumber:11}}))));}var overlayColor='rgba(22, 22, 22, 0.7)';var $back={position:'absolute',left:0,right:0};var $overlay=(0,_extends2.default)({},_reactNative.StyleSheet.absoluteFillObject,{justifyContent:'center',alignItems:'center'});var $container={flex:1,backgroundColor:'#000'};var $row={flexDirection:'row',alignItems:'center'};var $darkOverlayTop={width:'100%',backgroundColor:overlayColor};var $darkOverlayBottom={width:'100%',backgroundColor:overlayColor};var $darkOverlaySide={backgroundColor:overlayColor};var $frameBorder={};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=CCCDCameraScreen;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeVisionCamera=require("react-native-vision-camera");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _CommonStyles=require("../CommonStyles");var _reactNativePermissions=require("react-native-permissions");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/camera/CCCDCameraScreen.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function CCCDCameraScreen(props){var _props$route2,_props$route2$params;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var isFocused=(0,_native.useIsFocused)();var myCamera=(0,_react.useRef)(null);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),passPermission=_useState2[0],setPassPermission=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),shouldRenderCamera=_useState4[0],setShouldRenderCamera=_useState4[1];var device=(0,_reactNativeVisionCamera.useCameraDevice)('back');var format=(0,_reactNativeVisionCamera.useCameraFormat)(device,[{photoResolution:{width:1280,height:720}}]);var takePicture=function _callee(){var _props$route,_props$route$params,data,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(myCamera.current==null)){_context.next=1;break;}return _context.abrupt("return");case 1:_context.prev=1;_context.next=2;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'quality'}));case 2:data=_context.sent;navigation.goBack();if((_props$route=props.route)!=null&&(_props$route$params=_props$route.params)!=null&&_props$route$params.callback){props.route.params.callback('file://'+data.path);}_context.next=4;break;case 3:_context.prev=3;_t=_context["catch"](1);console.error(_t);case 4:case"end":return _context.stop();}},null,null,[[1,3]],Promise);};var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.LIMITED:console.log('The permission is limited: some actions are possible');_reactNative.Alert.alert('Thông báo','Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};(0,_react.useEffect)(function(){_requestPermissions();},[]);(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);if(!passPermission&&!shouldRenderCamera){return _react.default.createElement(_reactNative.View,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:160,columnNumber:7}},_react.default.createElement(_reactNative.ActivityIndicator,{size:"large",color:"#0000ff",__self:this,__source:{fileName:_jsxFileName,lineNumber:161,columnNumber:9}}));}return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'black'},pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:167,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.fill,_CommonStyles.commonStyles.justifyCenter,{position:'absolute',width:_reactNative.Dimensions.get('window').width,height:_reactNative.Dimensions.get('window').height}],__self:this,__source:{fileName:_jsxFileName,lineNumber:171,columnNumber:7}},device?_react.default.createElement(_reactNative.View,{style:$cameraFrame,__self:this,__source:{fileName:_jsxFileName,lineNumber:184,columnNumber:11}},_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:_reactNative.StyleSheet.absoluteFill,device:device,isActive:true,photo:true,format:format,__self:this,__source:{fileName:_jsxFileName,lineNumber:185,columnNumber:13}})):_react.default.createElement(_reactNative.ActivityIndicator,{__self:this,__source:{fileName:_jsxFileName,lineNumber:195,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:[$back,{top:insets.top+16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:199,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:0,width:48,height:48,zIndex:1000,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:200,columnNumber:9}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:213,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{textAlign:'center',zIndex:10,color:'#FFFFFF',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:215,columnNumber:9}},props!=null&&(_props$route2=props.route)!=null&&(_props$route2$params=_props$route2.params)!=null&&_props$route2$params.front?'Chụp CMND/ CCCD mặt trước':'Chụp CMND/ CCCD mặt sau')),_react.default.createElement(_reactNative.View,{style:{position:'absolute',bottom:insets.bottom,alignSelf:'center',flexDirection:'column',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:228,columnNumber:7}},_react.default.createElement(_MText.MText,{style:{color:'#fff',marginBottom:16,textAlign:'center',paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:237,columnNumber:9}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:takePicture,__self:this,__source:{fileName:_jsxFileName,lineNumber:248,columnNumber:9}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:249,columnNumber:11}}))));}var overlayColor='rgba(22, 22, 22, 0.7)';var $back={position:'absolute',left:0,right:0};var $cameraFrame={width:_reactNative.Dimensions.get('window').width,height:260,overflow:'hidden',backgroundColor:'black'};var $overlay=(0,_extends2.default)({},_reactNative.StyleSheet.absoluteFillObject,{justifyContent:'center',alignItems:'center'});var $container={flex:1,backgroundColor:'#000'};var $row={flexDirection:'row',alignItems:'center'};var $darkOverlayTop={width:'100%',backgroundColor:overlayColor};var $darkOverlayBottom={width:'100%',backgroundColor:overlayColor};var $darkOverlaySide={backgroundColor:overlayColor};var $frameBorder={};
2
2
  //# sourceMappingURL=CCCDCameraScreen.js.map
@@ -181,18 +181,16 @@ export default function CCCDCameraScreen(props) {
181
181
  ]}
182
182
  >
183
183
  {device ? (
184
- <VisionCamera
185
- ref={myCamera}
186
- style={{
187
- width: Dimensions.get('window').width,
188
- height: 260,
189
- overflow: 'hidden',
190
- }}
191
- device={device}
192
- isActive={true}
193
- photo={true}
194
- format={format}
195
- />
184
+ <View style={$cameraFrame}>
185
+ <VisionCamera
186
+ ref={myCamera}
187
+ style={StyleSheet.absoluteFill}
188
+ device={device}
189
+ isActive={true}
190
+ photo={true}
191
+ format={format}
192
+ />
193
+ </View>
196
194
  ) : (
197
195
  <ActivityIndicator />
198
196
  )}
@@ -230,7 +228,7 @@ export default function CCCDCameraScreen(props) {
230
228
  <View
231
229
  style={{
232
230
  position: 'absolute',
233
- bottom: 24 + insets.bottom,
231
+ bottom: insets.bottom,
234
232
  alignSelf: 'center',
235
233
  flexDirection: 'column',
236
234
  alignItems: 'center',
@@ -262,6 +260,13 @@ const $back: ViewStyle = {
262
260
  right: 0,
263
261
  };
264
262
 
263
+ const $cameraFrame: ViewStyle = {
264
+ width: Dimensions.get('window').width,
265
+ height: 260,
266
+ overflow: 'hidden',
267
+ backgroundColor: 'black',
268
+ };
269
+
265
270
  const $overlay: ViewStyle = {
266
271
  ...StyleSheet.absoluteFillObject,
267
272
  justifyContent: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeVisionCamera","_icons","_MText","_native","_reactNativeSafeAreaContext","_CommonStyles","_reactNativePermissions","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CCCDCameraScreen","props","_props$route2","_props$route2$params","insets","useSafeAreaInsets","navigation","useNavigation","isFocused","useIsFocused","myCamera","useRef","_useState","useState","_useState2","_slicedToArray2","passPermission","setPassPermission","_useState3","_useState4","shouldRenderCamera","setShouldRenderCamera","device","useCameraDevice","format","useCameraFormat","photoResolution","width","height","takePicture","_callee","_props$route","_props$route$params","data","_t","_regenerator","async","_context","prev","next","current","abrupt","awrap","takePhoto","qualityPrioritization","sent","goBack","route","params","callback","path","console","error","stop","Promise","requestPermissions","request","Platform","OS","PERMISSIONS","IOS","CAMERA","ANDROID","then","result","RESULTS","UNAVAILABLE","log","Alert","alert","text","DENIED","onPress","openSettings","LIMITED","GRANTED","BLOCKED","useEffect","timeout","setTimeout","clearTimeout","createElement","View","style","commonStyles","fill","__self","__source","fileName","lineNumber","columnNumber","ActivityIndicator","size","color","flex","backgroundColor","pointerEvents","alignCenter","justifyCenter","position","Dimensions","Camera","ref","overflow","isActive","photo","$back","top","TouchableOpacity","left","zIndex","alignItems","IconBackWhite","MText","textAlign","fontSize","front","bottom","alignSelf","flexDirection","marginBottom","paddingHorizontal","TakePhotoSvg","overlayColor","right","$overlay","_extends2","StyleSheet","absoluteFillObject","justifyContent","$container","$row","$darkOverlayTop","$darkOverlayBottom","$darkOverlaySide","$frameBorder"],"sourceRoot":"../../../../src","sources":["screens/camera/CCCDCameraScreen.tsx"],"mappings":"waACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,wBAAA,CAAAF,OAAA,+BAK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,CACtBZ,aAAa,CAAE,KAAK,CACpBR,UAAU,CAAE,QACd,CAAC,CAED,GAAM,CAAAqB,eAA0B,CAAG,CACjCzG,KAAK,CAAE,MAAM,CACboE,eAAe,CAAE4B,YACnB,CAAC,CAED,GAAM,CAAAU,kBAA6B,CAAG,CACpC1G,KAAK,CAAE,MAAM,CACboE,eAAe,CAAE4B,YACnB,CAAC,CACD,GAAM,CAAAW,gBAA2B,CAAG,CAClCvC,eAAe,CAAE4B,YACnB,CAAC,CACD,GAAM,CAAAY,YAAuB,CAAG,CAGhC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeVisionCamera","_icons","_MText","_native","_reactNativeSafeAreaContext","_CommonStyles","_reactNativePermissions","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t2","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CCCDCameraScreen","props","_props$route2","_props$route2$params","insets","useSafeAreaInsets","navigation","useNavigation","isFocused","useIsFocused","myCamera","useRef","_useState","useState","_useState2","_slicedToArray2","passPermission","setPassPermission","_useState3","_useState4","shouldRenderCamera","setShouldRenderCamera","device","useCameraDevice","format","useCameraFormat","photoResolution","width","height","takePicture","_callee","_props$route","_props$route$params","data","_t","_regenerator","async","_context","prev","next","current","abrupt","awrap","takePhoto","qualityPrioritization","sent","goBack","route","params","callback","path","console","error","stop","Promise","requestPermissions","request","Platform","OS","PERMISSIONS","IOS","CAMERA","ANDROID","then","result","RESULTS","UNAVAILABLE","log","Alert","alert","text","DENIED","onPress","openSettings","LIMITED","GRANTED","BLOCKED","useEffect","timeout","setTimeout","clearTimeout","createElement","View","style","commonStyles","fill","__self","__source","fileName","lineNumber","columnNumber","ActivityIndicator","size","color","flex","backgroundColor","pointerEvents","alignCenter","justifyCenter","position","Dimensions","$cameraFrame","Camera","ref","StyleSheet","absoluteFill","isActive","photo","$back","top","TouchableOpacity","left","zIndex","alignItems","IconBackWhite","MText","textAlign","fontSize","front","bottom","alignSelf","flexDirection","marginBottom","paddingHorizontal","TakePhotoSvg","overlayColor","right","overflow","$overlay","_extends2","absoluteFillObject","justifyContent","$container","$row","$darkOverlayTop","$darkOverlayBottom","$darkOverlaySide","$frameBorder"],"sourceRoot":"../../../../src","sources":["screens/camera/CCCDCameraScreen.tsx"],"mappings":"waACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,wBAAA,CAAAF,OAAA,+BAKA,IAAAG,MAAA,CAAAH,OAAA,uBACA,IAAAI,MAAA,CAAAJ,OAAA,2BACA,IAAAK,OAAA,CAAAL,OAAA,6BACA,IAAAM,2BAAA,CAAAN,OAAA,mCACA,IAAAO,aAAA,CAAAP,OAAA,oBACA,IAAAQ,uBAAA,CAAAR,OAAA,6BAKkC,IAAAS,YAAA,2FAAAV,wBAAAW,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAb,uBAAA,UAAAA,wBAAAW,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,CAAAM,CAAA,EAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,GAAA,IAAAd,CAAA,aAAAc,GAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,GAAA,KAAAP,CAAA,EAAAD,CAAA,CAAAW,M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AmC,YAAY,CAAG,uBAAuB,CAC5C,GAAM,CAAAjB,KAAgB,CAAG,CACvBT,QAAQ,CAAE,UAAU,CACpBY,IAAI,CAAE,CAAC,CACPe,KAAK,CAAE,CACT,CAAC,CAED,GAAM,CAAAzB,YAAuB,CAAG,CAC9B1E,KAAK,CAAEyE,uBAAU,CAAC5G,GAAG,CAAC,QAAQ,CAAC,CAACmC,KAAK,CACrCC,MAAM,CAAE,GAAG,CACXmG,QAAQ,CAAE,QAAQ,CAClBhC,eAAe,CAAE,OACnB,CAAC,CAED,GAAM,CAAAiC,QAAmB,IAAAC,SAAA,CAAA3I,OAAA,KACpBkH,uBAAU,CAAC0B,kBAAkB,EAChCC,cAAc,CAAE,QAAQ,CACxBlB,UAAU,CAAE,QAAQ,EACrB,CAED,GAAM,CAAAmB,UAAqB,CAAG,CAC5BtC,IAAI,CAAE,CAAC,CACPC,eAAe,CAAE,MACnB,CAAC,CAED,GAAM,CAAAsC,IAAe,CAAG,CACtBZ,aAAa,CAAE,KAAK,CACpBR,UAAU,CAAE,QACd,CAAC,CAED,GAAM,CAAAqB,eAA0B,CAAG,CACjC3G,KAAK,CAAE,MAAM,CACboE,eAAe,CAAE8B,YACnB,CAAC,CAED,GAAM,CAAAU,kBAA6B,CAAG,CACpC5G,KAAK,CAAE,MAAM,CACboE,eAAe,CAAE8B,YACnB,CAAC,CACD,GAAM,CAAAW,gBAA2B,CAAG,CAClCzC,eAAe,CAAE8B,YACnB,CAAC,CACD,GAAM,CAAAY,YAAuB,CAAG,CAGhC,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LivenessV2=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _reactNative=require("react-native");var _reactNativeCircularProgressIndicator=_interopRequireDefault(require("react-native-circular-progress-indicator"));var _reactNativeFs=_interopRequireWildcard(require("react-native-fs"));var _reactNativePermissions=require("react-native-permissions");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _reactNativeVisionCamera=require("react-native-vision-camera");var _LivenessStore=_interopRequireDefault(require("../liveness/LivenessStore"));var _CommonStyles=require("../CommonStyles");var _navigation=require("../../navigation");var _theme=require("../../theme");var _reactNativeCreateThumbnail=require("react-native-create-thumbnail");var _AppStore=_interopRequireDefault(require("../../AppStore"));var _utils=require("../../utils");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/liveness-v2/index.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t3 in e)"default"!==_t3&&{}.hasOwnProperty.call(e,_t3)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t3))&&(i.get||i.set)?o(f,_t3,i):f[_t3]=e[_t3]);return f;})(e,t);}var _Dimensions$get=_reactNative.Dimensions.get('window'),windowWidth=_Dimensions$get.width;var PREVIEW_SIZE=320;var PREVIEW_RECT={minX:(windowWidth-PREVIEW_SIZE)/2,minY:240,width:PREVIEW_SIZE,height:PREVIEW_SIZE};var LivenessV2=exports.LivenessV2=(0,_mobxReactLite.observer)(function LivenessV2(props){var _props$route$params,_this=this;var loan=(_props$route$params=props.route.params)==null?void 0:_props$route$params.loan;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var cameraRef=(0,_react.useRef)(null);var interval=(0,_react.useRef)(null);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),passPermission=_useState2[0],setPassPermission=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var device=(0,_reactNativeVisionCamera.useCameraDevice)('front');var renderHint=function renderHint(key){switch(key){case'blink':return'Nhắm mắt trong 3 giây';case'right':return'Quay sang phải 3 giây';case'left':return'Quay sang trái 3 giây';case'up':return'Nhìn lên trên 3 giây';case'down':return'Nhìn xuống dưới 3 giây';case'mouth':return'Há miệng trong 3 giây';default:return'';}};var renderImg=function renderImg(key){switch(key){case'blink':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/blink.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:11}});case'right':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/right.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:93,columnNumber:11}});case'left':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/left.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:105,columnNumber:11}});case'up':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/up.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:117,columnNumber:11}});case'down':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/down.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:129,columnNumber:11}});case'mouth':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/mouth.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:141,columnNumber:11}});default:return _react.default.createElement(_react.default.Fragment,null);}};var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};var second=3;var start=function start(){_requestPermissions();_LivenessStore.default.getListAction(function(){if(passPermission){interval.current=setInterval(function(){second--;if(second===0){clearInterval(interval.current);startLiveness();}},1000);}});};var extractFramesFromVideo=function _callee(videoPath){var thumbnails,numFrames,i,time,result,base64,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;thumbnails=[];numFrames=3;i=0;case 1:if(!(i<numFrames)){_context.next=5;break;}time=i*300;_context.next=2;return _regenerator.default.awrap((0,_reactNativeCreateThumbnail.createThumbnail)({url:videoPath,timeStamp:time}));case 2:result=_context.sent;console.log("Thumbnail at "+time+"ms: ",result.path);_context.next=3;return _regenerator.default.awrap(_reactNativeFs.default.readFile(result.path,'base64'));case 3:base64=_context.sent;thumbnails.push(base64);case 4:i++;_context.next=1;break;case 5:return _context.abrupt("return",thumbnails);case 6:_context.prev=6;_t=_context["catch"](0);setIsLoading(false);console.log(_t,'LỖI');_reactNative.Alert.alert('Thông báo','Quá trình xử lý hình ảnh thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);case 7:case"end":return _context.stop();}},null,null,[[0,6]],Promise);};(0,_react.useEffect)(function(){start();},[passPermission]);var uploadLiveness=function _callee2(template){var _t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:setIsLoading(true);_context2.prev=1;if(!((loan==null?void 0:loan.typeLoan)===5||(loan==null?void 0:loan.typeLoan)===6||(loan==null?void 0:loan.typeLoan)===4)){_context2.next=3;break;}_context2.next=2;return _regenerator.default.awrap(_LivenessStore.default.verifyLiveness2(loan==null?void 0:loan.id,template,function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);},function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);}));case 2:_context2.next=4;break;case 3:_context2.next=4;return _regenerator.default.awrap(_LivenessStore.default.verifyLiveness(loan==null?void 0:loan.id,template,function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);},function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);}));case 4:_context2.next=6;break;case 5:_context2.prev=5;_t2=_context2["catch"](1);setIsLoading(false);console.log(_t2);case 6:case"end":return _context2.stop();}},null,null,[[1,5]],Promise);};var captureFromVideo=function _callee4(uri){var time,template,output;return _regenerator.default.async(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:try{time=new Date().getTime();template=_reactNativeFs.CachesDirectoryPath+'/'+time;output=template+'_img_%04d.jpg';FFmpegKit.execute("-i "+uri+" -r 2 "+output).then(function _callee3(result){var returnCode;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:console.log("FFmpeg process exited with rc="+result+".");_context3.next=1;return _regenerator.default.awrap(result.getReturnCode());case 1:returnCode=_context3.sent;if(ReturnCode.isSuccess(returnCode)){uploadLiveness(template);}else{setIsLoading(false);_reactNative.Alert.alert('Thông báo','Quá trình xử lý hình ảnh thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);}case 2:case"end":return _context3.stop();}},null,null,null,Promise);});}catch(error){setIsLoading(false);console.log(error);_reactNative.Alert.alert('Thông báo','Quá trình xử lý hình ảnh thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);}case 1:case"end":return _context4.stop();}},null,null,null,Promise);};var startLiveness=function _callee5(){var data,newPath,thump;return _regenerator.default.async(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_LivenessStore.default.ekycSuccess=false;if(!(_LivenessStore.default.listAction.length===0)){_context5.next=1;break;}_LivenessStore.default.ekycSuccess=true;_LivenessStore.default.saveLiveness(loan.id);return _context5.abrupt("return");case 1:if(!cameraRef.current){_context5.next=6;break;}_context5.next=2;return _regenerator.default.awrap(new Promise(function(resolve,reject){var stopped=false;var timeout=setTimeout(function(){if(!stopped){var _cameraRef$current;stopped=true;(_cameraRef$current=cameraRef.current)==null?void 0:_cameraRef$current.stopRecording();}},3000);cameraRef.current.startRecording({videoCodec:_reactNative.Platform.OS==='ios'?'h264':undefined,onRecordingFinished:function onRecordingFinished(video){clearTimeout(timeout);resolve(video);},onRecordingError:function onRecordingError(error){clearTimeout(timeout);reject(error);}});}));case 2:data=_context5.sent;if(!data.path){_context5.next=5;break;}setIsLoading(true);newPath=_reactNativeFs.CachesDirectoryPath+'/'+new Date().getTime()+'.mp4';_context5.next=3;return _regenerator.default.awrap(_reactNativeFs.default.copyFile(data.path,newPath).then(function(){console.log('Copied to:',newPath);}));case 3:_context5.next=4;return _regenerator.default.awrap(extractFramesFromVideo(_reactNative.Platform.OS==='android'?'file://'+data.path:'file://'+newPath));case 4:thump=_context5.sent;if(thump.length>0){uploadLiveness(thump);}_context5.next=6;break;case 5:_reactNative.Alert.alert('Thông báo','Quá trình xác thực thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);case 6:case"end":return _context5.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){var trackingEvent=function _callee6(){return _regenerator.default.async(function(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=1;return _regenerator.default.awrap((0,_utils.logEvent)('ekyc_started',{event:'ekyc_started',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(loan==null?void 0:loan.id),utmSource:loan==null?void 0:loan.utmSource}));case 1:(0,_utils.logEventFb)('ekyc_started');case 2:case"end":return _context6.stop();}},null,null,null,Promise);};trackingEvent();},[]);return _react.default.createElement(_reactNative.View,{style:styles.container,__self:this,__source:{fileName:_jsxFileName,lineNumber:428,columnNumber:5}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:16,top:insets.top+16,width:40,height:40,zIndex:1000},__self:this,__source:{fileName:_jsxFileName,lineNumber:429,columnNumber:7}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:442,columnNumber:9}})),_react.default.createElement(_reactNative.View,{style:[{top:insets.top+16},styles.topOverlay],__self:this,__source:{fileName:_jsxFileName,lineNumber:444,columnNumber:7}},_react.default.createElement(_MText.MText,{style:{color:'white',fontWeight:'600',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:445,columnNumber:9}},"X\xE1c th\u1EF1c khu\xF4n m\u1EB7t"),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:454,columnNumber:9}},function(){return _react.default.createElement(_react.default.Fragment,null,isLoading?_react.default.createElement(_reactNative.View,{style:{marginTop:24},__self:_this,__source:{fileName:_jsxFileName,lineNumber:458,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{textAlign:'center',fontSize:16,color:'white'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:459,columnNumber:19}},"\u0110ang x\xE1c th\u1EF1c"),_react.default.createElement(_reactNative.ActivityIndicator,{size:'large',color:'white',style:{marginTop:8},__self:_this,__source:{fileName:_jsxFileName,lineNumber:468,columnNumber:19}})):_react.default.createElement(_react.default.Fragment,null));})),_react.default.createElement(_reactNative.View,{style:styles.preview,__self:this,__source:{fileName:_jsxFileName,lineNumber:482,columnNumber:7}},passPermission&&device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:cameraRef,style:_reactNative.StyleSheet.absoluteFill,device:device,isActive:true,video:true,audio:false,__self:this,__source:{fileName:_jsxFileName,lineNumber:484,columnNumber:11}}):null,_react.default.createElement(_reactNative.View,{style:{height:'100%',width:'100%',justifyContent:'center',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:493,columnNumber:9}},renderImg(_LivenessStore.default.hintAction),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,marginTop:8,fontWeight:'400'},__self:this,__source:{fileName:_jsxFileName,lineNumber:502,columnNumber:11}},renderHint(_LivenessStore.default.hintAction)))),_react.default.createElement(_reactNative.View,{style:styles.circularProgress,__self:this,__source:{fileName:_jsxFileName,lineNumber:515,columnNumber:7}},_react.default.createElement(_reactNativeCircularProgressIndicator.default,{value:_LivenessStore.default.listAction.length===3?0:_LivenessStore.default.listAction.length===2?100/3:_LivenessStore.default.listAction.length===1?2/3*100:100,radius:PREVIEW_SIZE/2,inActiveStrokeOpacity:0.5,activeStrokeWidth:13,inActiveStrokeWidth:13,showProgressValue:false,activeStrokeColor:"#F05123",inActiveStrokeColor:"#F05123",duration:800,__self:this,__source:{fileName:_jsxFileName,lineNumber:516,columnNumber:9}})),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:540,columnNumber:7}},function(){return _react.default.createElement(_reactNative.View,{style:styles.bottomOverlay,__self:_this,__source:{fileName:_jsxFileName,lineNumber:542,columnNumber:11}},_react.default.createElement(_MText.MText,{style:styles.instructionText,__self:_this,__source:{fileName:_jsxFileName,lineNumber:543,columnNumber:13}},"Vui l\xF2ng \u0111i\u1EC1u ch\u1EC9nh khu\xF4n m\u1EB7t n\u1EB1m g\u1ECDn trong v\xF2ng tr\xF2n \u1EDF tr\xEAn"));}),_react.default.createElement(_reactNative.Modal,{visible:_LivenessStore.default.ekycSuccess,animationType:'fade',transparent:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:550,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'transparent',height:'100%'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:555,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'white',borderRadius:8,padding:16,marginHorizontal:16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:562,columnNumber:11}},_react.default.createElement(_icons.IconEkyc,{__self:this,__source:{fileName:_jsxFileName,lineNumber:574,columnNumber:13}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{marginTop:16,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:575,columnNumber:13}},"Ch\xFAc m\u1EEBng b\u1EA1n \u0111\xE3 th\u1EF1c hi\u1EC7n x\xE1c th\u1EF1c kh\xE1ch h\xE0ng",'\n',"th\xE0nh c\xF4ng."),_react.default.createElement(_reactNative.TouchableOpacity,{style:{marginTop:16,backgroundColor:_theme.color.primary,height:40,alignItems:'center',borderRadius:30,width:150,justifyContent:'center'},onPress:function _callee7(){return _regenerator.default.async(function(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=1;return _regenerator.default.awrap((0,_utils.logEvent)('ekyc_completed',{event:'ekyc_completed',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(loan==null?void 0:loan.id),utmSource:loan==null?void 0:loan.utmSource}));case 1:(0,_utils.logEventFb)('ekyc_completed');_LivenessStore.default.ekycSuccess=false;if((loan==null?void 0:loan.typeLoan)===5||(loan==null?void 0:loan.typeLoan)===6){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.TTSSignLoan,params:{loan:loan}}]}));}else{navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));}case 2:case"end":return _context7.stop();}},null,null,null,Promise);},__self:this,__source:{fileName:_jsxFileName,lineNumber:583,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:622,columnNumber:15}},"\u0110\u1ED3ng \xFD"))))));});var styles=_reactNative.StyleSheet.create({instructionText:{color:'white',fontSize:12,textAlign:'center',paddingHorizontal:50,marginTop:16},bottomOverlay:{marginTop:24},maskedView:{flex:1,flexDirection:'row',height:'100%'},maskWrapper:{backgroundColor:'transparent',flex:1,justifyContent:'center',alignItems:'center'},mask:{borderRadius:PREVIEW_SIZE/2,height:PREVIEW_SIZE-10,width:PREVIEW_SIZE-10,marginTop:PREVIEW_RECT.minY,alignSelf:'center'},container:{flex:1,flexDirection:'column',backgroundColor:'#333333'},topOverlay:{position:'absolute',right:0,left:0,justifyContent:'center',alignItems:'center'},captureFrame:{height:_reactNative.Dimensions.get('window').width-50,marginHorizontal:16,marginTop:'50%',borderRadius:50},preview:{width:PREVIEW_SIZE-29,height:PREVIEW_SIZE-28,marginTop:PREVIEW_RECT.minY+14,marginLeft:PREVIEW_RECT.minX+14,borderRadius:PREVIEW_SIZE/2,overflow:'hidden'},circularProgress:{width:PREVIEW_SIZE,height:PREVIEW_SIZE,marginTop:PREVIEW_RECT.minY,marginLeft:PREVIEW_RECT.minX,zIndex:100,position:'absolute',top:0,left:0,right:0}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LivenessV2=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _native=require("@react-navigation/native");var _mobxReactLite=require("mobx-react-lite");var _reactNative=require("react-native");var _reactNativeCircularProgressIndicator=_interopRequireDefault(require("react-native-circular-progress-indicator"));var _reactNativeFs=_interopRequireWildcard(require("react-native-fs"));var _reactNativePermissions=require("react-native-permissions");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _reactNativeVisionCamera=require("react-native-vision-camera");var _LivenessStore=_interopRequireDefault(require("../liveness/LivenessStore"));var _CommonStyles=require("../CommonStyles");var _navigation=require("../../navigation");var _theme=require("../../theme");var _reactNativeCreateThumbnail=require("react-native-create-thumbnail");var _AppStore=_interopRequireDefault(require("../../AppStore"));var _utils=require("../../utils");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/liveness-v2/index.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t3 in e)"default"!==_t3&&{}.hasOwnProperty.call(e,_t3)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t3))&&(i.get||i.set)?o(f,_t3,i):f[_t3]=e[_t3]);return f;})(e,t);}var _Dimensions$get=_reactNative.Dimensions.get('window'),windowWidth=_Dimensions$get.width;var PREVIEW_SIZE=320;var PREVIEW_RECT={minX:(windowWidth-PREVIEW_SIZE)/2,minY:240,width:PREVIEW_SIZE,height:PREVIEW_SIZE};var LivenessV2=exports.LivenessV2=(0,_mobxReactLite.observer)(function LivenessV2(props){var _props$route$params,_this=this;var loan=(_props$route$params=props.route.params)==null?void 0:_props$route$params.loan;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var navigation=(0,_native.useNavigation)();var cameraRef=(0,_react.useRef)(null);var interval=(0,_react.useRef)(null);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),passPermission=_useState2[0],setPassPermission=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];var device=(0,_reactNativeVisionCamera.useCameraDevice)('front');var renderHint=function renderHint(key){switch(key){case'blink':return'Nhắm mắt trong 3 giây';case'right':return'Quay sang phải 3 giây';case'left':return'Quay sang trái 3 giây';case'up':return'Nhìn lên trên 3 giây';case'down':return'Nhìn xuống dưới 3 giây';case'mouth':return'Há miệng trong 3 giây';default:return'';}};var renderImg=function renderImg(key){switch(key){case'blink':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/blink.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:11}});case'right':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/right.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:93,columnNumber:11}});case'left':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/left.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:105,columnNumber:11}});case'up':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/up.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:117,columnNumber:11}});case'down':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/down.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:129,columnNumber:11}});case'mouth':return _react.default.createElement(_reactNative.Image,{source:require('../../assets/img/mouth.png'),style:{height:24,width:50,resizeMode:'contain',marginTop:40},__self:_this,__source:{fileName:_jsxFileName,lineNumber:141,columnNumber:11}});default:return _react.default.createElement(_react.default.Fragment,null);}};var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};var second=3;var start=function start(){_requestPermissions();_LivenessStore.default.getListAction(function(){if(passPermission){interval.current=setInterval(function(){second--;if(second===0){clearInterval(interval.current);startLiveness();}},1000);}});};var extractFramesFromVideo=function _callee(videoPath){var thumbnails,numFrames,i,time,result,base64,_t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;thumbnails=[];numFrames=3;i=0;case 1:if(!(i<numFrames)){_context.next=5;break;}time=i*300;_context.next=2;return _regenerator.default.awrap((0,_reactNativeCreateThumbnail.createThumbnail)({url:videoPath,timeStamp:time}));case 2:result=_context.sent;console.log("Thumbnail at "+time+"ms: ",result.path);_context.next=3;return _regenerator.default.awrap(_reactNativeFs.default.readFile(result.path,'base64'));case 3:base64=_context.sent;thumbnails.push(base64);case 4:i++;_context.next=1;break;case 5:return _context.abrupt("return",thumbnails);case 6:_context.prev=6;_t=_context["catch"](0);setIsLoading(false);console.log(_t,'LỖI');_reactNative.Alert.alert('Thông báo','Quá trình xử lý hình ảnh thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);case 7:case"end":return _context.stop();}},null,null,[[0,6]],Promise);};(0,_react.useEffect)(function(){start();},[passPermission]);var uploadLiveness=function _callee2(template){var _t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:setIsLoading(true);_context2.prev=1;if(!((loan==null?void 0:loan.typeLoan)===5||(loan==null?void 0:loan.typeLoan)===6||(loan==null?void 0:loan.typeLoan)===4)){_context2.next=3;break;}_context2.next=2;return _regenerator.default.awrap(_LivenessStore.default.verifyLiveness2(loan==null?void 0:loan.id,template,function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);},function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);}));case 2:_context2.next=4;break;case 3:_context2.next=4;return _regenerator.default.awrap(_LivenessStore.default.verifyLiveness(loan==null?void 0:loan.id,template,function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);},function(){setTimeout(function(){startLiveness();},2000);setIsLoading(false);}));case 4:_context2.next=6;break;case 5:_context2.prev=5;_t2=_context2["catch"](1);setIsLoading(false);console.log(_t2);case 6:case"end":return _context2.stop();}},null,null,[[1,5]],Promise);};var captureFromVideo=function _callee4(uri){var time,template,output;return _regenerator.default.async(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:try{time=new Date().getTime();template=_reactNativeFs.CachesDirectoryPath+'/'+time;output=template+'_img_%04d.jpg';FFmpegKit.execute("-i "+uri+" -r 2 "+output).then(function _callee3(result){var returnCode;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:console.log("FFmpeg process exited with rc="+result+".");_context3.next=1;return _regenerator.default.awrap(result.getReturnCode());case 1:returnCode=_context3.sent;if(ReturnCode.isSuccess(returnCode)){uploadLiveness(template);}else{setIsLoading(false);_reactNative.Alert.alert('Thông báo','Quá trình xử lý hình ảnh thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);}case 2:case"end":return _context3.stop();}},null,null,null,Promise);});}catch(error){setIsLoading(false);console.log(error);_reactNative.Alert.alert('Thông báo','Quá trình xử lý hình ảnh thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);}case 1:case"end":return _context4.stop();}},null,null,null,Promise);};var startLiveness=function _callee5(){var data,newPath,thump;return _regenerator.default.async(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_LivenessStore.default.ekycSuccess=false;if(!(_LivenessStore.default.listAction.length===0)){_context5.next=1;break;}_LivenessStore.default.ekycSuccess=true;_LivenessStore.default.saveLiveness(loan.id);return _context5.abrupt("return");case 1:if(!cameraRef.current){_context5.next=6;break;}_context5.next=2;return _regenerator.default.awrap(new Promise(function(resolve,reject){var stopped=false;var timeout=setTimeout(function(){if(!stopped){var _cameraRef$current;stopped=true;(_cameraRef$current=cameraRef.current)==null?void 0:_cameraRef$current.stopRecording();}},3500);cameraRef.current.startRecording({videoCodec:_reactNative.Platform.OS==='ios'?'h264':undefined,onRecordingFinished:function onRecordingFinished(video){clearTimeout(timeout);resolve(video);},onRecordingError:function onRecordingError(error){clearTimeout(timeout);reject(error);}});}));case 2:data=_context5.sent;if(!data.path){_context5.next=5;break;}setIsLoading(true);newPath=_reactNativeFs.CachesDirectoryPath+'/'+new Date().getTime()+'.mp4';_context5.next=3;return _regenerator.default.awrap(_reactNativeFs.default.copyFile(data.path,newPath).then(function(){console.log('Copied to:',newPath);}));case 3:_context5.next=4;return _regenerator.default.awrap(extractFramesFromVideo(data.path));case 4:thump=_context5.sent;if(thump.length>0){uploadLiveness(thump);}_context5.next=6;break;case 5:_reactNative.Alert.alert('Thông báo','Quá trình xác thực thất bại',[{text:'Thử lại',onPress:function onPress(){startLiveness();}}]);case 6:case"end":return _context5.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){var trackingEvent=function _callee6(){return _regenerator.default.async(function(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=1;return _regenerator.default.awrap((0,_utils.logEvent)('ekyc_started',{event:'ekyc_started',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(loan==null?void 0:loan.id),utmSource:loan==null?void 0:loan.utmSource}));case 1:(0,_utils.logEventFb)('ekyc_started');case 2:case"end":return _context6.stop();}},null,null,null,Promise);};trackingEvent();},[]);return _react.default.createElement(_reactNative.View,{style:styles.container,__self:this,__source:{fileName:_jsxFileName,lineNumber:423,columnNumber:5}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.goBack();},style:{position:'absolute',left:16,top:insets.top+16,width:40,height:40,zIndex:1000},__self:this,__source:{fileName:_jsxFileName,lineNumber:424,columnNumber:7}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:437,columnNumber:9}})),_react.default.createElement(_reactNative.View,{style:[{top:insets.top+16},styles.topOverlay],__self:this,__source:{fileName:_jsxFileName,lineNumber:439,columnNumber:7}},_react.default.createElement(_MText.MText,{style:{color:'white',fontWeight:'600',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:440,columnNumber:9}},"X\xE1c th\u1EF1c khu\xF4n m\u1EB7t"),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:449,columnNumber:9}},function(){return _react.default.createElement(_react.default.Fragment,null,isLoading?_react.default.createElement(_reactNative.View,{style:{marginTop:24},__self:_this,__source:{fileName:_jsxFileName,lineNumber:453,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{textAlign:'center',fontSize:16,color:'white'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:454,columnNumber:19}},"\u0110ang x\xE1c th\u1EF1c"),_react.default.createElement(_reactNative.ActivityIndicator,{size:'large',color:'white',style:{marginTop:8},__self:_this,__source:{fileName:_jsxFileName,lineNumber:463,columnNumber:19}})):_react.default.createElement(_react.default.Fragment,null));})),_react.default.createElement(_reactNative.View,{style:styles.preview,__self:this,__source:{fileName:_jsxFileName,lineNumber:477,columnNumber:7}},passPermission&&device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:cameraRef,style:_reactNative.StyleSheet.absoluteFill,device:device,isActive:true,video:true,audio:false,__self:this,__source:{fileName:_jsxFileName,lineNumber:479,columnNumber:11}}):null,_react.default.createElement(_reactNative.View,{style:{height:'100%',width:'100%',justifyContent:'center',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:488,columnNumber:9}},renderImg(_LivenessStore.default.hintAction),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,marginTop:8,fontWeight:'400'},__self:this,__source:{fileName:_jsxFileName,lineNumber:497,columnNumber:11}},renderHint(_LivenessStore.default.hintAction)))),_react.default.createElement(_reactNative.View,{style:styles.circularProgress,__self:this,__source:{fileName:_jsxFileName,lineNumber:510,columnNumber:7}},_react.default.createElement(_reactNativeCircularProgressIndicator.default,{value:_LivenessStore.default.listAction.length===3?0:_LivenessStore.default.listAction.length===2?100/3:_LivenessStore.default.listAction.length===1?2/3*100:100,radius:PREVIEW_SIZE/2,inActiveStrokeOpacity:0.5,activeStrokeWidth:13,inActiveStrokeWidth:13,showProgressValue:false,activeStrokeColor:"#F05123",inActiveStrokeColor:"#F05123",duration:800,__self:this,__source:{fileName:_jsxFileName,lineNumber:511,columnNumber:9}})),_react.default.createElement(_mobxReactLite.Observer,{__self:this,__source:{fileName:_jsxFileName,lineNumber:535,columnNumber:7}},function(){return _react.default.createElement(_reactNative.View,{style:styles.bottomOverlay,__self:_this,__source:{fileName:_jsxFileName,lineNumber:537,columnNumber:11}},_react.default.createElement(_MText.MText,{style:styles.instructionText,__self:_this,__source:{fileName:_jsxFileName,lineNumber:538,columnNumber:13}},"Vui l\xF2ng \u0111i\u1EC1u ch\u1EC9nh khu\xF4n m\u1EB7t n\u1EB1m g\u1ECDn trong v\xF2ng tr\xF2n \u1EDF tr\xEAn"));}),_react.default.createElement(_reactNative.Modal,{visible:_LivenessStore.default.ekycSuccess,animationType:'fade',transparent:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:545,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'transparent',height:'100%'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:550,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'white',borderRadius:8,padding:16,marginHorizontal:16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:557,columnNumber:11}},_react.default.createElement(_icons.IconEkyc,{__self:this,__source:{fileName:_jsxFileName,lineNumber:569,columnNumber:13}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{marginTop:16,textAlign:'center'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:570,columnNumber:13}},"Ch\xFAc m\u1EEBng b\u1EA1n \u0111\xE3 th\u1EF1c hi\u1EC7n x\xE1c th\u1EF1c kh\xE1ch h\xE0ng",'\n',"th\xE0nh c\xF4ng."),_react.default.createElement(_reactNative.TouchableOpacity,{style:{marginTop:16,backgroundColor:_theme.color.primary,height:40,alignItems:'center',borderRadius:30,width:150,justifyContent:'center'},onPress:function _callee7(){return _regenerator.default.async(function(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=1;return _regenerator.default.awrap((0,_utils.logEvent)('ekyc_completed',{event:'ekyc_completed',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(loan==null?void 0:loan.id),utmSource:loan==null?void 0:loan.utmSource}));case 1:(0,_utils.logEventFb)('ekyc_completed');_LivenessStore.default.ekycSuccess=false;if((loan==null?void 0:loan.typeLoan)===5||(loan==null?void 0:loan.typeLoan)===6){navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.TTSSignLoan,params:{loan:loan}}]}));}else{navigation.dispatch(_native.CommonActions.reset({index:1,routes:[{name:_navigation.ScreenNames.Main}]}));}case 2:case"end":return _context7.stop();}},null,null,null,Promise);},__self:this,__source:{fileName:_jsxFileName,lineNumber:578,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:617,columnNumber:15}},"\u0110\u1ED3ng \xFD"))))));});var styles=_reactNative.StyleSheet.create({instructionText:{color:'white',fontSize:12,textAlign:'center',paddingHorizontal:50,marginTop:16},bottomOverlay:{marginTop:24},maskedView:{flex:1,flexDirection:'row',height:'100%'},maskWrapper:{backgroundColor:'transparent',flex:1,justifyContent:'center',alignItems:'center'},mask:{borderRadius:PREVIEW_SIZE/2,height:PREVIEW_SIZE-10,width:PREVIEW_SIZE-10,marginTop:PREVIEW_RECT.minY,alignSelf:'center'},container:{flex:1,flexDirection:'column',backgroundColor:'#333333'},topOverlay:{position:'absolute',right:0,left:0,justifyContent:'center',alignItems:'center'},captureFrame:{height:_reactNative.Dimensions.get('window').width-50,marginHorizontal:16,marginTop:'50%',borderRadius:50},preview:{width:PREVIEW_SIZE-29,height:PREVIEW_SIZE-28,marginTop:PREVIEW_RECT.minY+14,marginLeft:PREVIEW_RECT.minX+14,borderRadius:PREVIEW_SIZE/2,overflow:'hidden'},circularProgress:{width:PREVIEW_SIZE,height:PREVIEW_SIZE,marginTop:PREVIEW_RECT.minY,marginLeft:PREVIEW_RECT.minX,zIndex:100,position:'absolute',top:0,left:0,right:0}});
2
2
  //# sourceMappingURL=index.js.map
@@ -368,7 +368,7 @@ export const LivenessV2 = observer(function LivenessV2(props: any) {
368
368
  stopped = true;
369
369
  cameraRef.current?.stopRecording();
370
370
  }
371
- }, 3000);
371
+ }, 3500);
372
372
  cameraRef.current.startRecording({
373
373
  videoCodec: Platform.OS === 'ios' ? 'h264' : undefined,
374
374
  onRecordingFinished: (video) => {
@@ -383,17 +383,12 @@ export const LivenessV2 = observer(function LivenessV2(props: any) {
383
383
  });
384
384
  if (data.path) {
385
385
  setIsLoading(true);
386
- // captureFromVideo(data.uri);
387
386
  const newPath =
388
387
  CachesDirectoryPath + '/' + new Date().getTime() + '.mp4';
389
388
  await RNFS.copyFile(data.path, newPath).then(() => {
390
389
  console.log('Copied to:', newPath);
391
390
  });
392
- const thump = await extractFramesFromVideo(
393
- Platform.OS === 'android'
394
- ? 'file://' + data.path
395
- : 'file://' + newPath
396
- );
391
+ const thump = await extractFramesFromVideo(data.path);
397
392
  if (thump.length > 0) {
398
393
  uploadLiveness(thump);
399
394
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_native","_mobxReactLite","_reactNative","_reactNativeCircularProgressIndicator","_interopRequireDefault","_reactNativeFs","_reactNativePermissions","_icons","_MText","_reactNativeVisionCamera","_LivenessStore","_CommonStyles","_navigation","_theme","_reactNativeCreateThumbnail","_AppStore","_utils","_reactNativeSafeAreaContext","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t3","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_Dimensions$get","Dimensions","windowWidth","width","PREVIEW_SIZE","PREVIEW_RECT","minX","minY","height","LivenessV2","exports","observer","props","_props$route$params","_this","loan","route","params","insets","useSafeAreaInsets","navigation","useNavigation","cameraRef","useRef","interval","_useState","useState","_useState2","_slicedToArray2","passPermission","setPassPermission","_useState3","_useState4","isLoading","setIsLoading","device","useCameraDevice","renderHint","key","renderImg","createElement","Image","source","style","resizeMode","marginTop","__self","__source","fileName","lineNumber","columnNumber","Fragment","requestPermissions","request","Platform","OS","PERMISSIONS","IOS","CAMERA","ANDROID","then","result","RESULTS","UNAVAILABLE","console","log","Alert","alert","text","DENIED","onPress","openSettings","GRANTED","BLOCKED","second","start","livenessStore","getListAction","current","setInterval","clearInterval","startLiveness","extractFramesFromVideo","_callee","videoPath","thumbnails","numFrames","time","base64","_t","_regenerator","async","_context","prev","next","awrap","createThumbnail","url","timeStamp","sent","path","RNFS","readFile","push","abrupt","stop","Promise","useEffect","uploadLiveness","_callee2","template","_t2","_context2","typeLoan","verifyLiveness2","id","setTimeout","verifyLiveness","captureFromVideo","_callee4","uri","output","_context4","Date","getTime","CachesDirectoryPath","FFmpegKit","execute","_callee3","returnCode","_context3","getReturnCode","ReturnCode","isSuccess","error","_callee5","data","newPath","thump","_context5","ekycSuccess","listAction","length","saveLiveness","resolve","reject","stopped","timeout","_cameraRef$current","stopRecording","startRecording","videoCodec","undefined","onRecordingFinished","video","clearTimeout","onRecordingError","copyFile","trackingEvent","_callee6","_context6","logEvent","event","createdAt","deviceId","appStore","loanId","String","utmSource","logEventFb","View","styles","container","TouchableOpacity","goBack","position","left","top","zIndex","IconBackWhite","topOverlay","MText","color","fontWeight","fontSize","Observer","textAlign","ActivityIndicator","size","preview","Camera","ref","StyleSheet","absoluteFill","isActive","audio","justifyContent","alignItems","hintAction","circularProgress","value","radius","inActiveStrokeOpacity","activeStrokeWidth","inActiveStrokeWidth","showProgressValue","activeStrokeColor","inActiveStrokeColor","duration","bottomOverlay","instructionText","Modal","visible","animationType","transparent","commonStyles","alignCenter","justifyCenter","backgroundColor","borderRadius","padding","marginHorizontal","IconEkyc","textNormalBold","primary","_callee7","_context7","dispatch","CommonActions","reset","index","routes","name","ScreenNames","TTSSignLoan","Main","create","paddingHorizontal","maskedView","flex","flexDirection","maskWrapper","mask","alignSelf","right","captureFrame","marginLeft","overflow"],"sourceRoot":"../../../../src","sources":["screens/liveness-v2/index.tsx"],"mappings":"iVACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,OAAA,CAAAD,OAAA,6BACA,IAAAE,cAAA,CAAAF,OA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AS,CAAE,CACTmE,IAAI,CAAE,CAAC,CACPC,aAAa,CAAE,QAAQ,CACvBtB,eAAe,CAAE,SACnB,CAAC,CACDtC,UAAU,CAAE,CACVL,QAAQ,CAAE,UAAU,CAEpBqE,KAAK,CAAE,CAAC,CACRpE,IAAI,CAAE,CAAC,CACPoB,cAAc,CAAE,QAAQ,CACxBC,UAAU,CAAE,QACd,CAAC,CACDgD,YAAY,CAAE,CACZ7O,MAAM,CAAEP,uBAAU,CAACT,GAAG,CAAC,QAAQ,CAAC,CAACW,KAAK,CAAG,EAAE,CAC3C0N,gBAAgB,CAAE,EAAE,CACpBhL,SAAS,CAAE,KAAK,CAChB8K,YAAY,CAAE,EAChB,CAAC,CACD9B,OAAO,CAAE,CACP1L,KAAK,CAAEC,YAAY,CAAG,EAAE,CACxBI,MAAM,CAAEJ,YAAY,CAAG,EAAE,CACzByC,SAAS,CAAExC,YAAY,CAACE,IAAI,CAAG,EAAE,CACjC+O,UAAU,CAAEjP,YAAY,CAACC,IAAI,CAAG,EAAE,CAClCqN,YAAY,CAAEvN,YAAY,CAAG,CAAC,CAC9BmP,QAAQ,CAAE,QACZ,CAAC,CACDhD,gBAAgB,CAAE,CAChBpM,KAAK,CAAEC,YAAY,CACnBI,MAAM,CAAEJ,YAAY,CACpByC,SAAS,CAAExC,YAAY,CAACE,IAAI,CAC5B+O,UAAU,CAAEjP,YAAY,CAACC,IAAI,CAC7B4K,MAAM,CAAE,GAAG,CACXH,QAAQ,CAAE,UAAU,CACpBE,GAAG,CAAE,CAAC,CACND,IAAI,CAAE,CAAC,CACPoE,KAAK,CAAE,CACT,CACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_native","_mobxReactLite","_reactNative","_reactNativeCircularProgressIndicator","_interopRequireDefault","_reactNativeFs","_reactNativePermissions","_icons","_MText","_reactNativeVisionCamera","_LivenessStore","_CommonStyles","_navigation","_theme","_reactNativeCreateThumbnail","_AppStore","_utils","_reactNativeSafeAreaContext","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t3","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_Dimensions$get","Dimensions","windowWidth","width","PREVIEW_SIZE","PREVIEW_RECT","minX","minY","height","LivenessV2","exports","observer","props","_props$route$params","_this","loan","route","params","insets","useSafeAreaInsets","navigation","useNavigation","cameraRef","useRef","interval","_useState","useState","_useState2","_slicedToArray2","passPermission","setPassPermission","_useState3","_useState4","isLoading","setIsLoading","device","useCameraDevice","renderHint","key","renderImg","createElement","Image","source","style","resizeMode","marginTop","__self","__source","fileName","lineNumber","columnNumber","Fragment","requestPermissions","request","Platform","OS","PERMISSIONS","IOS","CAMERA","ANDROID","then","result","RESULTS","UNAVAILABLE","console","log","Alert","alert","text","DENIED","onPress","openSettings","GRANTED","BLOCKED","second","start","livenessStore","getListAction","current","setInterval","clearInterval","startLiveness","extractFramesFromVideo","_callee","videoPath","thumbnails","numFrames","time","base64","_t","_regenerator","async","_context","prev","next","awrap","createThumbnail","url","timeStamp","sent","path","RNFS","readFile","push","abrupt","stop","Promise","useEffect","uploadLiveness","_callee2","template","_t2","_context2","typeLoan","verifyLiveness2","id","setTimeout","verifyLiveness","captureFromVideo","_callee4","uri","output","_context4","Date","getTime","CachesDirectoryPath","FFmpegKit","execute","_callee3","returnCode","_context3","getReturnCode","ReturnCode","isSuccess","error","_callee5","data","newPath","thump","_context5","ekycSuccess","listAction","length","saveLiveness","resolve","reject","stopped","timeout","_cameraRef$current","stopRecording","startRecording","videoCodec","undefined","onRecordingFinished","video","clearTimeout","onRecordingError","copyFile","trackingEvent","_callee6","_context6","logEvent","event","createdAt","deviceId","appStore","loanId","String","utmSource","logEventFb","View","styles","container","TouchableOpacity","goBack","position","left","top","zIndex","IconBackWhite","topOverlay","MText","color","fontWeight","fontSize","Observer","textAlign","ActivityIndicator","size","preview","Camera","ref","StyleSheet","absoluteFill","isActive","audio","justifyContent","alignItems","hintAction","circularProgress","value","radius","inActiveStrokeOpacity","activeStrokeWidth","inActiveStrokeWidth","showProgressValue","activeStrokeColor","inActiveStrokeColor","duration","bottomOverlay","instructionText","Modal","visible","animationType","transparent","commonStyles","alignCenter","justifyCenter","backgroundColor","borderRadius","padding","marginHorizontal","IconEkyc","textNormalBold","primary","_callee7","_context7","dispatch","CommonActions","reset","index","routes","name","ScreenNames","TTSSignLoan","Main","create","paddingHorizontal","maskedView","flex","flexDirection","maskWrapper","mask","alignSelf","right","captureFrame","marginLeft","overflow"],"sourceRoot":"../../../../src","sources":["screens/liveness-v2/index.tsx"],"mappings":"iVACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,OAAA,CAAAD,OAAA,6BACA,IAAAE,cAAA,CAAAF,OAAA,oBACA,IAAAG,YAAA,CAAAH,OAAA,iBAWA,IAAAI,qCAAA,CAAAC,sBAAA,CAAAL,OAAA,8CACA,IAAAM,cAAA,CAAAP,uBAAA,CAAAC,OAAA,qBACA,IAAAO,uBAAA,CAAAP,OAAA,6BAOA,IAAAQ,MAAA,CAAAR,OAAA,uBACA,IAAAS,MAAA,CAAAT,OAAA,2BACA,IAAAU,wBAAA,CAAAV,OAAA,+BAIA,IAAAW,cAAA,CAAAN,sBAAA,CAAAL,OAAA,+BACA,IAAAY,aAAA,CAAAZ,OAAA,oBACA,IAAAa,WAAA,CAAAb,OAAA,qBACA,IAAAc,MAAA,CAAAd,OAAA,gBACA,IAAAe,2BAAA,CAAAf,OAAA,kCACA,IAAAgB,SAAA,CAAAX,sBAAA,CAAAL,OAAA,oBACA,IAAAiB,MAAA,CAAAjB,OAAA,gBACA,IAAAkB,2BAAA,CAAAlB,OAAA,mCAAmE,IAAAmB,YAAA,qFAAApB,wBAAAqB,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAvB,uBAAA,UAAAA,wBAAAqB,CAAA,CAAAC,CAAA,MA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I,CAC5B+O,UAAU,CAAEjP,YAAY,CAACC,IAAI,CAC7B4K,MAAM,CAAE,GAAG,CACXH,QAAQ,CAAE,UAAU,CACpBE,GAAG,CAAE,CAAC,CACND,IAAI,CAAE,CAAC,CACPoE,KAAK,CAAE,CACT,CACF,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.OCR=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _mobxReactLite=require("mobx-react-lite");var _reactNative=require("react-native");var _MText=require("../../components/MText");var _storage=require("../../utils/storage");var _reactNativePermissions=require("react-native-permissions");var _reactNativeVisionCamera=require("react-native-vision-camera");var _reactNativeModal=_interopRequireDefault(require("react-native-modal"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _icons=require("../../assets/icons");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _CommonStyles=require("../CommonStyles");var _native=require("@react-navigation/native");var _textRecognition=_interopRequireDefault(require("@react-native-ml-kit/text-recognition"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _svgs=require("../../assets/svgs");var _reactNativeImageCropPicker=_interopRequireDefault(require("react-native-image-crop-picker"));var _reactNativeImagePicker=require("react-native-image-picker");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/toan-trinh-so/OCR.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t3 in e)"default"!==_t3&&{}.hasOwnProperty.call(e,_t3)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t3))&&(i.get||i.set)?o(f,_t3,i):f[_t3]=e[_t3]);return f;})(e,t);}var NFCReader=_reactNative.NativeModules.NFCReader;var OCR=exports.OCR=(0,_mobxReactLite.observer)(function OCR(props){var _props$route22,_props$route22$params;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var isFocused=(0,_native.useIsFocused)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var navigation=(0,_native.useNavigation)();var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),showModal=_useState4[0],setShowModal=_useState4[1];var _useState5=(0,_react.useState)('passport'),_useState6=(0,_slicedToArray2.default)(_useState5,2),type=_useState6[0],setType=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),taking=_useState8[0],setTaking=_useState8[1];var _useState9=(0,_react.useState)(false),_useState0=(0,_slicedToArray2.default)(_useState9,2),passPermission=_useState0[0],setPassPermission=_useState0[1];var _useState1=(0,_react.useState)(false),_useState10=(0,_slicedToArray2.default)(_useState1,2),shouldRenderCamera=_useState10[0],setShouldRenderCamera=_useState10[1];var myCamera=(0,_react.useRef)(null);var device=(0,_reactNativeVisionCamera.useCameraDevice)('back');var format=(0,_reactNativeVisionCamera.useCameraFormat)(device,[{photoResolution:{width:1280,height:720}}]);var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.LIMITED:console.log('The permission is limited: some actions are possible');_reactNative.Alert.alert('Thông báo','Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);var loadIntro=function _callee(){var intro;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=1;return _regenerator.default.awrap((0,_storage.load)(_storage.OCR_V1));case 1:intro=_context.sent;if(!intro){setShowModal(true);}case 2:case"end":return _context.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){_requestPermissions();loadIntro();},[]);var saveDataNfc=function _callee2(body){var _props$route,_props$route$params,_props$route$params$l,response,_response$data,_response$data$meta,_response$data2,_response$data2$meta,_t;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=1;return _regenerator.default.awrap(_api.Api.getInstance().saveNfcInfo((0,_extends2.default)({},body,{loanBriefId:props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:(_props$route$params$l=_props$route$params.loan)==null?void 0:_props$route$params$l.id})));case 1:response=_context2.sent;if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){setTimeout(function(){var _props$route2,_props$route2$params;navigation.push(_navigation.ScreenNames.TTSSelfie,{loan:props==null?void 0:(_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:_props$route2$params.loan});},500);}else{_reactNative.Alert.alert('Thông báo',response==null?void 0:(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=3;break;case 2:_context2.prev=2;_t=_context2["catch"](0);console.log(_t);case 3:case"end":return _context2.stop();}},null,null,[[0,2]],Promise);};var convertToDate=function convertToDate(input,end){var yearPrefix=input.substring(0,2);var year=end?'20'+yearPrefix:parseInt(yearPrefix)>20?'19'+yearPrefix:'20'+yearPrefix;var month=input.substring(2,4);var day=input.substring(4,6);return year+'-'+month+'-'+day;};var extractMRZInfo=function extractMRZInfo(text){var documentNumber='';var birthDate='';var expirationDate='';var regex1=/VNM(\d{9})/;var match1=text.match(regex1);if(match1){documentNumber=match1[1];}console.log('documentNumber',documentNumber);var regex=/(\d{6}).[MF](\d{6})/;var match=text.replace(/ /g,'').match(regex);if(match){console.log({documentNumber:documentNumber,birthDate:match[1],expirationDate:match[2]});birthDate=match[1],expirationDate=match[2];}else{return null;}if(documentNumber&&birthDate&&expirationDate){try{NFCReader.readNFCCard(documentNumber,convertToDate(birthDate,false),convertToDate(expirationDate,true),function(error,response){try{var convertData=JSON.parse(response);saveDataNfc(convertData);}catch(e){console.log(e);}});}catch(e){console.log(e);}}};var handleTextRecognition=function _callee3(imagePath){var result,_t2;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=1;return _regenerator.default.awrap(_textRecognition.default.recognize(imagePath));case 1:result=_context3.sent;extractMRZInfo(result.text);_context3.next=3;break;case 2:_context3.prev=2;_t2=_context3["catch"](0);console.log(_t2);case 3:case"end":return _context3.stop();}},null,null,[[0,2]],Promise);};var scanNfc=function _callee4(){var data;return _regenerator.default.async(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!myCamera.current){_context4.next=2;break;}_context4.next=1;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'speed'}));case 1:data=_context4.sent;_context4.next=2;return _regenerator.default.awrap(handleTextRecognition('file://'+data.path));case 2:case"end":return _context4.stop();}},null,null,null,Promise);};var takePhoto=function _callee5(){var _props$route3,_props$route3$params,_props$route4,_props$route4$params,_props$route6,_props$route6$params,_props$route7,_props$route7$params;var data,uri,_props$route5,_props$route5$params,_props$route8,_props$route8$params,_props$route9,_props$route9$params;return _regenerator.default.async(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:if(!(myCamera.current==null||taking)){_context5.next=1;break;}return _context5.abrupt("return");case 1:setTaking(true);_context5.next=2;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'quality'}));case 2:data=_context5.sent;uri='file://'+data.path;setTaking(false);if(props!=null&&(_props$route3=props.route)!=null&&(_props$route3$params=_props$route3.params)!=null&&_props$route3$params.front&&!((_props$route4=props.route)!=null&&(_props$route4$params=_props$route4.params)!=null&&_props$route4$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:uri,loan:props==null?void 0:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:_props$route5$params.loan});}else if(!(props!=null&&(_props$route6=props.route)!=null&&(_props$route6$params=_props$route6.params)!=null&&_props$route6$params.front)&&!((_props$route7=props.route)!=null&&(_props$route7$params=_props$route7.params)!=null&&_props$route7$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:uri,loan:props==null?void 0:(_props$route8=props.route)==null?void 0:(_props$route8$params=_props$route8.params)==null?void 0:_props$route8$params.loan});}else{navigation.goBack();(_props$route9=props.route)==null?void 0:(_props$route9$params=_props$route9.params)==null?void 0:_props$route9$params.callback(uri);}case 3:case"end":return _context5.stop();}},null,null,null,Promise);};var pickImageFromGallery=function _callee6(){var result,_props$route0,_props$route0$params,_props$route1,_props$route1$params,_props$route11,_props$route11$params,_props$route12,_props$route12$params,_result$assets$,_props$route10,_props$route10$params,_result$assets$2,_props$route13,_props$route13$params,_props$route14,_props$route14$params,_result$assets$3;return _regenerator.default.async(function(_context6){while(1)switch(_context6.prev=_context6.next){case 0:if(!(_reactNative.Platform.OS==='android')){_context6.next=2;break;}_context6.next=1;return _regenerator.default.awrap((0,_reactNativeImagePicker.launchImageLibrary)({mediaType:'photo'}));case 1:result=_context6.sent;if(result.assets){if(props!=null&&(_props$route0=props.route)!=null&&(_props$route0$params=_props$route0.params)!=null&&_props$route0$params.front&&!((_props$route1=props.route)!=null&&(_props$route1$params=_props$route1.params)!=null&&_props$route1$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:(_result$assets$=result.assets[0])==null?void 0:_result$assets$.uri,loan:props==null?void 0:(_props$route10=props.route)==null?void 0:(_props$route10$params=_props$route10.params)==null?void 0:_props$route10$params.loan});}else if(!(props!=null&&(_props$route11=props.route)!=null&&(_props$route11$params=_props$route11.params)!=null&&_props$route11$params.front)&&!((_props$route12=props.route)!=null&&(_props$route12$params=_props$route12.params)!=null&&_props$route12$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:(_result$assets$2=result.assets[0])==null?void 0:_result$assets$2.uri,loan:props==null?void 0:(_props$route13=props.route)==null?void 0:(_props$route13$params=_props$route13.params)==null?void 0:_props$route13$params.loan});}else{navigation.goBack();(_props$route14=props.route)==null?void 0:(_props$route14$params=_props$route14.params)==null?void 0:_props$route14$params.callback((_result$assets$3=result.assets[0])==null?void 0:_result$assets$3.uri);}}_context6.next=3;break;case 2:_reactNativeImageCropPicker.default.openPicker({}).then(function(image){var _props$route15,_props$route15$params,_props$route16,_props$route16$params,_props$route18,_props$route18$params,_props$route19,_props$route19$params;if(props!=null&&(_props$route15=props.route)!=null&&(_props$route15$params=_props$route15.params)!=null&&_props$route15$params.front&&!((_props$route16=props.route)!=null&&(_props$route16$params=_props$route16.params)!=null&&_props$route16$params.callback)){var _props$route17,_props$route17$params;navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:_reactNative.Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path),loan:props==null?void 0:(_props$route17=props.route)==null?void 0:(_props$route17$params=_props$route17.params)==null?void 0:_props$route17$params.loan});}else if(!(props!=null&&(_props$route18=props.route)!=null&&(_props$route18$params=_props$route18.params)!=null&&_props$route18$params.front)&&!((_props$route19=props.route)!=null&&(_props$route19$params=_props$route19.params)!=null&&_props$route19$params.callback)){var _props$route20,_props$route20$params;navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:_reactNative.Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path),loan:props==null?void 0:(_props$route20=props.route)==null?void 0:(_props$route20$params=_props$route20.params)==null?void 0:_props$route20$params.loan});}else{var _props$route21,_props$route21$params;navigation.goBack();(_props$route21=props.route)==null?void 0:(_props$route21$params=_props$route21.params)==null?void 0:_props$route21$params.callback(_reactNative.Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path));}});case 3:case"end":return _context6.stop();}},null,null,null,Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'black'},pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:370,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:{alignItems:'center',position:'absolute',top:insets.top+16,left:0,right:0,zIndex:100},__self:this,__source:{fileName:_jsxFileName,lineNumber:374,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.navigate(_navigation.ScreenNames.Main);},style:{position:'absolute',left:10,top:4,width:24,height:24,alignItems:'center',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:384,columnNumber:9}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:398,columnNumber:11}})),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',padding:2,borderRadius:4,alignItems:'center',backgroundColor:'transparent'},__self:this,__source:{fileName:_jsxFileName,lineNumber:400,columnNumber:9}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,textAlign:'center',padding:16,marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:485,columnNumber:9}},type==='passport'&&props!=null&&(_props$route22=props.route)!=null&&(_props$route22$params=_props$route22.params)!=null&&_props$route22$params.front?'Chụp CMND/ CCCD mặt trước':type==='passport'?'Chụp CMND/ CCCD mặt sau':'Dùng camera để quét chuỗi ký tự mặt sau thẻ CCCD gắn chíp ở phía dưới')),passPermission&&type==='passport'&&shouldRenderCamera?_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.fill,_CommonStyles.commonStyles.justifyCenter,{position:'absolute',width:_reactNative.Dimensions.get('window').width,height:_reactNative.Dimensions.get('window').height}],__self:this,__source:{fileName:_jsxFileName,lineNumber:503,columnNumber:9}},device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:{width:_reactNative.Dimensions.get('window').width,height:260,overflow:'hidden'},device:device,isActive:true,photo:true,format:format,__self:this,__source:{fileName:_jsxFileName,lineNumber:516,columnNumber:13}}):_react.default.createElement(_reactNative.ActivityIndicator,{__self:this,__source:{fileName:_jsxFileName,lineNumber:529,columnNumber:13}}),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){pickImageFromGallery();},style:{flexDirection:'row',alignItems:'center',gap:8,marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:531,columnNumber:11}},_react.default.createElement(_svgs.IconUpload,{__self:this,__source:{fileName:_jsxFileName,lineNumber:542,columnNumber:13}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:543,columnNumber:13}},"T\u1EA3i \u1EA3nh t\u1EEB th\u01B0 vi\u1EC7n")),_react.default.createElement(_reactNative.View,{style:[styles.buttonContainer,{bottom:insets.bottom}],__self:this,__source:{fileName:_jsxFileName,lineNumber:553,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:14,textAlign:'center',padding:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:554,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},__self:this,__source:{fileName:_jsxFileName,lineNumber:565,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:570,columnNumber:15}})))):passPermission&&type==='nfc'&&shouldRenderCamera?_react.default.createElement(_react.default.Fragment,null,device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:styles.camera,device:device,isActive:true,photo:true,format:format,__self:this,__source:{fileName:_jsxFileName,lineNumber:577,columnNumber:13}}):null,_react.default.createElement(_reactNative.View,{style:styles.overlay,__self:this,__source:{fileName:_jsxFileName,lineNumber:586,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:styles.overlayTop,__self:this,__source:{fileName:_jsxFileName,lineNumber:587,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:styles.overlayCenter,__self:this,__source:{fileName:_jsxFileName,lineNumber:588,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:styles.overlayLeft,__self:this,__source:{fileName:_jsxFileName,lineNumber:589,columnNumber:15}}),_react.default.createElement(_reactNative.View,{style:styles.overlayRect,__self:this,__source:{fileName:_jsxFileName,lineNumber:590,columnNumber:15}}),_react.default.createElement(_reactNative.View,{style:styles.overlayRight,__self:this,__source:{fileName:_jsxFileName,lineNumber:591,columnNumber:15}})),_react.default.createElement(_reactNative.View,{style:styles.overlayBottom,__self:this,__source:{fileName:_jsxFileName,lineNumber:593,columnNumber:13}})),_react.default.createElement(_reactNative.View,{style:styles.buttonContainer,__self:this,__source:{fileName:_jsxFileName,lineNumber:595,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:14,textAlign:'center',padding:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:596,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t chu\u1ED7i k\xED t\u1EF1 n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){scanNfc();},__self:this,__source:{fileName:_jsxFileName,lineNumber:607,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:612,columnNumber:15}})))):_react.default.createElement(_react.default.Fragment,null),_react.default.createElement(_reactNativeModal.default,{isVisible:showModal,style:$modal,backdropTransitionInTiming:0,nimationOutTiming:200,animationInTiming:200,animationIn:'slideInUp',animationOut:'fadeOutDown',useNativeDriverForBackdrop:true,useNativeDriver:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:620,columnNumber:7}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF8E4F','#EF592E'],style:$container,__self:this,__source:{fileName:_jsxFileName,lineNumber:631,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:$paddingV,__self:this,__source:{fileName:_jsxFileName,lineNumber:632,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){setShowModal(false);setTimeout(function(){navigation.goBack();},100);},style:{width:24,height:24,position:'absolute',left:16,top:24,alignItems:'center',zIndex:10000},__self:this,__source:{fileName:_jsxFileName,lineNumber:633,columnNumber:13}},_react.default.createElement(_icons.CloseIcon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:650,columnNumber:15}})),_react.default.createElement(_MText.MText,{style:$title,__self:this,__source:{fileName:_jsxFileName,lineNumber:652,columnNumber:13}},"NH\u1EACN DI\u1EC6N GI\u1EA4Y T\u1EDC T\xD9Y TH\xC2N"),_react.default.createElement(_MText.MText,{style:$description,__self:this,__source:{fileName:_jsxFileName,lineNumber:653,columnNumber:13}},"Ch\u1EE5p \u1EA3nh 2 m\u1EB7t ho\u1EB7c NFC CCCD/ CMND"),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/vehicleStep.png'),style:$step,__self:this,__source:{fileName:_jsxFileName,lineNumber:657,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:$bg,__self:this,__source:{fileName:_jsxFileName,lineNumber:662,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'column',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:663,columnNumber:15}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011946.png'),style:{width:'60%',height:70,resizeMode:'contain',marginVertical:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:669,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{marginTop:10,paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:679,columnNumber:15}},_react.default.createElement(_MText.MText,{style:[$title2,{textAlign:'left'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:680,columnNumber:17}},"C\xE1ch 1: NFC (\xC1p d\u1EE5ng cho CCCD g\u1EAFn chip)"),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:683,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:684,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:685,columnNumber:19}},"\u0110\u1EB7t ph\u1EA7n chip \u0111\u1ED3ng g\u1EA7n l\u1EA1i v\u1EDBi ph\u1EA7n ph\xEDa tr\xEAn c\u1EE7a",'\n',"m\u1EB7t l\u01B0ng \u0111i\u1EC7n tho\u1EA1i")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:690,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:691,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:692,columnNumber:19}},"Gi\u1EEF nguy\xEAn cho \u0111\u1EBFn khi \u0111\u1ECDc xong th\xF4ng tin th\u1EBB")),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011953.png'),style:{width:'100%',height:70,resizeMode:'contain',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:696,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{marginTop:10,paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:706,columnNumber:15}},_react.default.createElement(_MText.MText,{style:[$title2,{textAlign:'left'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:707,columnNumber:17}},"C\xE1ch 2: Ch\u1EE5p 2 m\u1EB7t"),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:710,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:711,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:712,columnNumber:19}},"N\xEAn \u0111\u1EB7t CCCD/ CMND l\xEAn m\u1EB7t ph\u1EB3ng \u0111\u1EC3 ch\u1EE5p")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:716,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:717,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:718,columnNumber:19}},"\u0110\u1EB7t CCCD/ CMND n\u1EB1m g\u1ECDn trong khung h\xECnh (Kh\xF4ng ",'\n'," qu\xE1 nh\u1ECF hay qu\xE1 to l\xE0m m\u1EA5t chi ti\u1EBFt)")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:723,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:724,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:725,columnNumber:19}},"Ch\u1ECDn n\u01A1i \xE1nh s\xE1ng t\u1ED1t, tr\xE1nh l\xF3a/ ch\xF3i h\xECnh ch\u1EE5p")),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011947.png'),style:{width:'100%',height:80,resizeMode:'contain',marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:729,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',margin:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:740,columnNumber:15}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){setType('passport');setShowModal(false);(0,_storage.save)(_storage.OCR_V1,true);},style:{flex:1,borderWidth:1,borderColor:'#EF592E',height:40,alignItems:'center',justifyContent:'center',borderRadius:40},__self:this,__source:{fileName:_jsxFileName,lineNumber:747,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:764,columnNumber:19}},"Ch\u1EE5p 2 m\u1EB7t"))),_react.default.createElement(_reactNative.View,{style:{height:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:806,columnNumber:15}}))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:812,columnNumber:7}}));});var $row={flexDirection:'row',alignItems:'center',marginTop:5};var $txt={fontSize:12,marginLeft:5};var $bg={backgroundColor:'white',borderTopRightRadius:26,borderTopLeftRadius:26};var $step={height:40,width:'100%',resizeMode:'contain',marginTop:10,marginBottom:10};var $paddingV={paddingTop:16};var $title={fontSize:16,color:'white',fontWeight:'bold',textAlign:'center'};var $title2={fontSize:16,color:'#333333',fontWeight:'bold',textAlign:'center'};var $description={fontSize:12,color:'white',textAlign:'center'};var $flex={flex:1};var $modal={justifyContent:'flex-end',margin:0};var $container={borderTopRightRadius:26,borderTopLeftRadius:26};var styles=_reactNative.StyleSheet.create({container:{flex:1},camera:{flex:1},buttonContainer:{flex:0,flexDirection:'column',justifyContent:'center',alignItems:'center',position:'absolute',left:0,right:0,zIndex:1000},captureButton:{width:56,height:56,borderRadius:35,backgroundColor:'white',justifyContent:'center',alignItems:'center'},innerCaptureButton:{width:60,height:60,borderRadius:30,backgroundColor:'red'},overlay:{position:'absolute',top:0,left:0,right:0,bottom:0,justifyContent:'center',alignItems:'center'},overlayTop:{flex:1,backgroundColor:'black',width:'100%'},overlayCenter:{flexDirection:'row'},overlayLeft:{flex:1,backgroundColor:'black'},overlayRect:{width:'90%',height:100,borderColor:'white',borderWidth:2,justifyContent:'center',alignItems:'center'},instructionText:{color:'white',textAlign:'center',paddingHorizontal:10,fontSize:14,position:'absolute',top:-50},overlayRight:{flex:1,backgroundColor:'black'},overlayBottom:{flex:1,backgroundColor:'black',width:'100%'},mrzContainer:{padding:10},mrzText:{fontSize:16}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.OCR=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _mobxReactLite=require("mobx-react-lite");var _reactNative=require("react-native");var _MText=require("../../components/MText");var _storage=require("../../utils/storage");var _reactNativePermissions=require("react-native-permissions");var _reactNativeVisionCamera=require("react-native-vision-camera");var _reactNativeModal=_interopRequireDefault(require("react-native-modal"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _icons=require("../../assets/icons");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _CommonStyles=require("../CommonStyles");var _native=require("@react-navigation/native");var _textRecognition=_interopRequireDefault(require("@react-native-ml-kit/text-recognition"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _svgs=require("../../assets/svgs");var _reactNativeImageCropPicker=_interopRequireDefault(require("react-native-image-crop-picker"));var _reactNativeImagePicker=require("react-native-image-picker");var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _jsxFileName="/Users/tima/Tima/react-native-timacare/src/screens/toan-trinh-so/OCR.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t3 in e)"default"!==_t3&&{}.hasOwnProperty.call(e,_t3)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t3))&&(i.get||i.set)?o(f,_t3,i):f[_t3]=e[_t3]);return f;})(e,t);}var NFCReader=_reactNative.NativeModules.NFCReader;var OCR=exports.OCR=(0,_mobxReactLite.observer)(function OCR(props){var _props$route22,_props$route22$params;var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();var isFocused=(0,_native.useIsFocused)();var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var navigation=(0,_native.useNavigation)();var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),showModal=_useState4[0],setShowModal=_useState4[1];var _useState5=(0,_react.useState)('passport'),_useState6=(0,_slicedToArray2.default)(_useState5,2),type=_useState6[0],setType=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),taking=_useState8[0],setTaking=_useState8[1];var _useState9=(0,_react.useState)(false),_useState0=(0,_slicedToArray2.default)(_useState9,2),passPermission=_useState0[0],setPassPermission=_useState0[1];var _useState1=(0,_react.useState)(false),_useState10=(0,_slicedToArray2.default)(_useState1,2),shouldRenderCamera=_useState10[0],setShouldRenderCamera=_useState10[1];var myCamera=(0,_react.useRef)(null);var device=(0,_reactNativeVisionCamera.useCameraDevice)('back');var format=(0,_reactNativeVisionCamera.useCameraFormat)(device,[{photoResolution:{width:1280,height:720}}]);var _requestPermissions=function requestPermissions(){(0,_reactNativePermissions.request)(_reactNative.Platform.OS==='ios'?_reactNativePermissions.PERMISSIONS.IOS.CAMERA:_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA).then(function(result){switch(result){case _reactNativePermissions.RESULTS.UNAVAILABLE:console.log('This feature is not available (on this device / in this context)');_reactNative.Alert.alert('Thông báo','Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',[{text:'Đồng ý'}]);break;case _reactNativePermissions.RESULTS.DENIED:console.log('The permission has not been requested / is denied but requestable');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.LIMITED:console.log('The permission is limited: some actions are possible');_reactNative.Alert.alert('Thông báo','Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{_requestPermissions();}}}]);break;case _reactNativePermissions.RESULTS.GRANTED:console.log('The permission is granted');setPassPermission(true);break;case _reactNativePermissions.RESULTS.BLOCKED:console.log('The permission is denied and not requestable anymore');_reactNative.Alert.alert('Thông báo','Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',[{text:'Đồng ý',onPress:function onPress(){if(_reactNative.Platform.OS==='ios'){(0,_reactNativePermissions.openSettings)();}else{(0,_reactNativePermissions.openSettings)();}}}]);break;}});};(0,_react.useEffect)(function(){var timeout;if(isFocused){timeout=setTimeout(function(){setShouldRenderCamera(true);},500);}else{setShouldRenderCamera(false);}return function(){return clearTimeout(timeout);};},[isFocused]);var loadIntro=function _callee(){var intro;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=1;return _regenerator.default.awrap((0,_storage.load)(_storage.OCR_V1));case 1:intro=_context.sent;if(!intro){setShowModal(true);}case 2:case"end":return _context.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){_requestPermissions();loadIntro();},[]);var saveDataNfc=function _callee2(body){var _props$route,_props$route$params,_props$route$params$l,response,_response$data,_response$data$meta,_response$data2,_response$data2$meta,_t;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=1;return _regenerator.default.awrap(_api.Api.getInstance().saveNfcInfo((0,_extends2.default)({},body,{loanBriefId:props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:(_props$route$params$l=_props$route$params.loan)==null?void 0:_props$route$params$l.id})));case 1:response=_context2.sent;if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){setTimeout(function(){var _props$route2,_props$route2$params;navigation.push(_navigation.ScreenNames.TTSSelfie,{loan:props==null?void 0:(_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:_props$route2$params.loan});},500);}else{_reactNative.Alert.alert('Thông báo',response==null?void 0:(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=3;break;case 2:_context2.prev=2;_t=_context2["catch"](0);console.log(_t);case 3:case"end":return _context2.stop();}},null,null,[[0,2]],Promise);};var convertToDate=function convertToDate(input,end){var yearPrefix=input.substring(0,2);var year=end?'20'+yearPrefix:parseInt(yearPrefix)>20?'19'+yearPrefix:'20'+yearPrefix;var month=input.substring(2,4);var day=input.substring(4,6);return year+'-'+month+'-'+day;};var extractMRZInfo=function extractMRZInfo(text){var documentNumber='';var birthDate='';var expirationDate='';var regex1=/VNM(\d{9})/;var match1=text.match(regex1);if(match1){documentNumber=match1[1];}console.log('documentNumber',documentNumber);var regex=/(\d{6}).[MF](\d{6})/;var match=text.replace(/ /g,'').match(regex);if(match){console.log({documentNumber:documentNumber,birthDate:match[1],expirationDate:match[2]});birthDate=match[1],expirationDate=match[2];}else{return null;}if(documentNumber&&birthDate&&expirationDate){try{NFCReader.readNFCCard(documentNumber,convertToDate(birthDate,false),convertToDate(expirationDate,true),function(error,response){try{var convertData=JSON.parse(response);saveDataNfc(convertData);}catch(e){console.log(e);}});}catch(e){console.log(e);}}};var handleTextRecognition=function _callee3(imagePath){var result,_t2;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=1;return _regenerator.default.awrap(_textRecognition.default.recognize(imagePath));case 1:result=_context3.sent;extractMRZInfo(result.text);_context3.next=3;break;case 2:_context3.prev=2;_t2=_context3["catch"](0);console.log(_t2);case 3:case"end":return _context3.stop();}},null,null,[[0,2]],Promise);};var scanNfc=function _callee4(){var data;return _regenerator.default.async(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!myCamera.current){_context4.next=2;break;}_context4.next=1;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'speed'}));case 1:data=_context4.sent;_context4.next=2;return _regenerator.default.awrap(handleTextRecognition('file://'+data.path));case 2:case"end":return _context4.stop();}},null,null,null,Promise);};var takePhoto=function _callee5(){var _props$route3,_props$route3$params,_props$route4,_props$route4$params,_props$route6,_props$route6$params,_props$route7,_props$route7$params;var data,uri,_props$route5,_props$route5$params,_props$route8,_props$route8$params,_props$route9,_props$route9$params;return _regenerator.default.async(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:if(!(myCamera.current==null||taking)){_context5.next=1;break;}return _context5.abrupt("return");case 1:setTaking(true);_context5.next=2;return _regenerator.default.awrap(myCamera.current.takePhoto({qualityPrioritization:'quality'}));case 2:data=_context5.sent;uri='file://'+data.path;setTaking(false);if(props!=null&&(_props$route3=props.route)!=null&&(_props$route3$params=_props$route3.params)!=null&&_props$route3$params.front&&!((_props$route4=props.route)!=null&&(_props$route4$params=_props$route4.params)!=null&&_props$route4$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:uri,loan:props==null?void 0:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:_props$route5$params.loan});}else if(!(props!=null&&(_props$route6=props.route)!=null&&(_props$route6$params=_props$route6.params)!=null&&_props$route6$params.front)&&!((_props$route7=props.route)!=null&&(_props$route7$params=_props$route7.params)!=null&&_props$route7$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:uri,loan:props==null?void 0:(_props$route8=props.route)==null?void 0:(_props$route8$params=_props$route8.params)==null?void 0:_props$route8$params.loan});}else{navigation.goBack();(_props$route9=props.route)==null?void 0:(_props$route9$params=_props$route9.params)==null?void 0:_props$route9$params.callback(uri);}case 3:case"end":return _context5.stop();}},null,null,null,Promise);};var pickImageFromGallery=function _callee6(){var result,_props$route0,_props$route0$params,_props$route1,_props$route1$params,_props$route11,_props$route11$params,_props$route12,_props$route12$params,_result$assets$,_props$route10,_props$route10$params,_result$assets$2,_props$route13,_props$route13$params,_props$route14,_props$route14$params,_result$assets$3;return _regenerator.default.async(function(_context6){while(1)switch(_context6.prev=_context6.next){case 0:if(!(_reactNative.Platform.OS==='android')){_context6.next=2;break;}_context6.next=1;return _regenerator.default.awrap((0,_reactNativeImagePicker.launchImageLibrary)({mediaType:'photo'}));case 1:result=_context6.sent;if(result.assets){if(props!=null&&(_props$route0=props.route)!=null&&(_props$route0$params=_props$route0.params)!=null&&_props$route0$params.front&&!((_props$route1=props.route)!=null&&(_props$route1$params=_props$route1.params)!=null&&_props$route1$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:(_result$assets$=result.assets[0])==null?void 0:_result$assets$.uri,loan:props==null?void 0:(_props$route10=props.route)==null?void 0:(_props$route10$params=_props$route10.params)==null?void 0:_props$route10$params.loan});}else if(!(props!=null&&(_props$route11=props.route)!=null&&(_props$route11$params=_props$route11.params)!=null&&_props$route11$params.front)&&!((_props$route12=props.route)!=null&&(_props$route12$params=_props$route12.params)!=null&&_props$route12$params.callback)){navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:(_result$assets$2=result.assets[0])==null?void 0:_result$assets$2.uri,loan:props==null?void 0:(_props$route13=props.route)==null?void 0:(_props$route13$params=_props$route13.params)==null?void 0:_props$route13$params.loan});}else{navigation.goBack();(_props$route14=props.route)==null?void 0:(_props$route14$params=_props$route14.params)==null?void 0:_props$route14$params.callback((_result$assets$3=result.assets[0])==null?void 0:_result$assets$3.uri);}}_context6.next=3;break;case 2:_reactNativeImageCropPicker.default.openPicker({}).then(function(image){var _props$route15,_props$route15$params,_props$route16,_props$route16$params,_props$route18,_props$route18$params,_props$route19,_props$route19$params;if(props!=null&&(_props$route15=props.route)!=null&&(_props$route15$params=_props$route15.params)!=null&&_props$route15$params.front&&!((_props$route16=props.route)!=null&&(_props$route16$params=_props$route16.params)!=null&&_props$route16$params.callback)){var _props$route17,_props$route17$params;navigation.push(_navigation.ScreenNames.TTSNationalIDFront,{uri:_reactNative.Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path),loan:props==null?void 0:(_props$route17=props.route)==null?void 0:(_props$route17$params=_props$route17.params)==null?void 0:_props$route17$params.loan});}else if(!(props!=null&&(_props$route18=props.route)!=null&&(_props$route18$params=_props$route18.params)!=null&&_props$route18$params.front)&&!((_props$route19=props.route)!=null&&(_props$route19$params=_props$route19.params)!=null&&_props$route19$params.callback)){var _props$route20,_props$route20$params;navigation.push(_navigation.ScreenNames.TTSNationalIDBack,{uri:_reactNative.Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path),loan:props==null?void 0:(_props$route20=props.route)==null?void 0:(_props$route20$params=_props$route20.params)==null?void 0:_props$route20$params.loan});}else{var _props$route21,_props$route21$params;navigation.goBack();(_props$route21=props.route)==null?void 0:(_props$route21$params=_props$route21.params)==null?void 0:_props$route21$params.callback(_reactNative.Platform.OS==='android'?image==null?void 0:image.path:'file://'+(image==null?void 0:image.path));}});case 3:case"end":return _context6.stop();}},null,null,null,Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1,backgroundColor:'black'},pointerEvents:'box-none',__self:this,__source:{fileName:_jsxFileName,lineNumber:370,columnNumber:5}},_react.default.createElement(_reactNative.View,{style:{alignItems:'center',position:'absolute',top:insets.top+16,left:0,right:0,zIndex:100},__self:this,__source:{fileName:_jsxFileName,lineNumber:374,columnNumber:7}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){navigation.navigate(_navigation.ScreenNames.Main);},style:{position:'absolute',left:10,top:4,width:24,height:24,alignItems:'center',justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:384,columnNumber:9}},_react.default.createElement(_icons.IconBackWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:398,columnNumber:11}})),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,textAlign:'center',padding:16,marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:401,columnNumber:9}},type==='passport'&&props!=null&&(_props$route22=props.route)!=null&&(_props$route22$params=_props$route22.params)!=null&&_props$route22$params.front?'Chụp CMND/ CCCD mặt trước':type==='passport'?'Chụp CMND/ CCCD mặt sau':'Dùng camera để quét chuỗi ký tự mặt sau thẻ CCCD gắn chíp ở phía dưới')),passPermission&&type==='passport'&&shouldRenderCamera?_react.default.createElement(_reactNative.View,{style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.fill,_CommonStyles.commonStyles.justifyCenter,{position:'absolute',width:_reactNative.Dimensions.get('window').width,height:_reactNative.Dimensions.get('window').height}],__self:this,__source:{fileName:_jsxFileName,lineNumber:419,columnNumber:9}},device?_react.default.createElement(_reactNative.View,{style:styles.passportCameraFrame,__self:this,__source:{fileName:_jsxFileName,lineNumber:432,columnNumber:13}},_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:_reactNative.StyleSheet.absoluteFill,device:device,isActive:true,photo:true,format:format,__self:this,__source:{fileName:_jsxFileName,lineNumber:433,columnNumber:15}})):_react.default.createElement(_reactNative.ActivityIndicator,{__self:this,__source:{fileName:_jsxFileName,lineNumber:443,columnNumber:13}}),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){pickImageFromGallery();},style:{flexDirection:'row',alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:445,columnNumber:11}},_react.default.createElement(_svgs.IconUpload,{__self:this,__source:{fileName:_jsxFileName,lineNumber:455,columnNumber:13}}),_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:12,marginLeft:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:456,columnNumber:13}},"T\u1EA3i \u1EA3nh t\u1EEB th\u01B0 vi\u1EC7n")),_react.default.createElement(_reactNative.View,{style:[styles.buttonContainer,{bottom:insets.bottom}],__self:this,__source:{fileName:_jsxFileName,lineNumber:467,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:14,textAlign:'center',padding:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:468,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t gi\u1EA5y t\u1EDD n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},__self:this,__source:{fileName:_jsxFileName,lineNumber:479,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:484,columnNumber:15}})))):passPermission&&type==='nfc'&&shouldRenderCamera?_react.default.createElement(_react.default.Fragment,null,device?_react.default.createElement(_reactNativeVisionCamera.Camera,{ref:myCamera,style:styles.camera,device:device,isActive:true,photo:true,format:format,__self:this,__source:{fileName:_jsxFileName,lineNumber:491,columnNumber:13}}):null,_react.default.createElement(_reactNative.View,{style:styles.overlay,__self:this,__source:{fileName:_jsxFileName,lineNumber:500,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:styles.overlayTop,__self:this,__source:{fileName:_jsxFileName,lineNumber:501,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:styles.overlayCenter,__self:this,__source:{fileName:_jsxFileName,lineNumber:502,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:styles.overlayLeft,__self:this,__source:{fileName:_jsxFileName,lineNumber:503,columnNumber:15}}),_react.default.createElement(_reactNative.View,{style:styles.overlayRect,__self:this,__source:{fileName:_jsxFileName,lineNumber:504,columnNumber:15}}),_react.default.createElement(_reactNative.View,{style:styles.overlayRight,__self:this,__source:{fileName:_jsxFileName,lineNumber:505,columnNumber:15}})),_react.default.createElement(_reactNative.View,{style:styles.overlayBottom,__self:this,__source:{fileName:_jsxFileName,lineNumber:507,columnNumber:13}})),_react.default.createElement(_reactNative.View,{style:[styles.buttonContainer,{bottom:insets.bottom+24}],__self:this,__source:{fileName:_jsxFileName,lineNumber:509,columnNumber:11}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:14,textAlign:'center',padding:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:512,columnNumber:13}},"Vui l\xF2ng \u0111\u1EB7t chu\u1ED7i k\xED t\u1EF1 n\u1EB1m v\u1EEBa khung h\xECnh ch\u1EEF nh\u1EADt, ch\u1EE5p \u0111\u1EE7 \xE1nh s\xE1ng v\xE0 r\xF5 n\xE9t."),_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){scanNfc();},__self:this,__source:{fileName:_jsxFileName,lineNumber:523,columnNumber:13}},_react.default.createElement(_icons.TakePhotoSvg,{__self:this,__source:{fileName:_jsxFileName,lineNumber:528,columnNumber:15}})))):_react.default.createElement(_react.default.Fragment,null),_react.default.createElement(_reactNativeModal.default,{isVisible:showModal,style:$modal,backdropTransitionInTiming:0,nimationOutTiming:200,animationInTiming:200,animationIn:'slideInUp',animationOut:'fadeOutDown',useNativeDriverForBackdrop:true,useNativeDriver:true,__self:this,__source:{fileName:_jsxFileName,lineNumber:536,columnNumber:7}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF8E4F','#EF592E'],style:$container,__self:this,__source:{fileName:_jsxFileName,lineNumber:547,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:$paddingV,__self:this,__source:{fileName:_jsxFileName,lineNumber:548,columnNumber:11}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){setShowModal(false);setTimeout(function(){navigation.goBack();},100);},style:{width:24,height:24,position:'absolute',left:16,top:24,alignItems:'center',zIndex:10000},__self:this,__source:{fileName:_jsxFileName,lineNumber:549,columnNumber:13}},_react.default.createElement(_icons.CloseIcon,{__self:this,__source:{fileName:_jsxFileName,lineNumber:566,columnNumber:15}})),_react.default.createElement(_MText.MText,{style:$title,__self:this,__source:{fileName:_jsxFileName,lineNumber:568,columnNumber:13}},"NH\u1EACN DI\u1EC6N GI\u1EA4Y T\u1EDC T\xD9Y TH\xC2N"),_react.default.createElement(_MText.MText,{style:$description,__self:this,__source:{fileName:_jsxFileName,lineNumber:569,columnNumber:13}},"Ch\u1EE5p \u1EA3nh 2 m\u1EB7t ho\u1EB7c NFC CCCD/ CMND"),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/vehicleStep.png'),style:$step,__self:this,__source:{fileName:_jsxFileName,lineNumber:573,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:$bg,__self:this,__source:{fileName:_jsxFileName,lineNumber:578,columnNumber:13}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'column',alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:579,columnNumber:15}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011946.png'),style:{width:'60%',height:70,resizeMode:'contain',marginVertical:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:585,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{marginTop:10,paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:595,columnNumber:15}},_react.default.createElement(_MText.MText,{style:[$title2,{textAlign:'left'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:596,columnNumber:17}},"C\xE1ch 1: NFC (\xC1p d\u1EE5ng cho CCCD g\u1EAFn chip)"),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:599,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:600,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:601,columnNumber:19}},"\u0110\u1EB7t ph\u1EA7n chip \u0111\u1ED3ng g\u1EA7n l\u1EA1i v\u1EDBi ph\u1EA7n ph\xEDa tr\xEAn c\u1EE7a",'\n',"m\u1EB7t l\u01B0ng \u0111i\u1EC7n tho\u1EA1i")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:606,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:607,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:608,columnNumber:19}},"Gi\u1EEF nguy\xEAn cho \u0111\u1EBFn khi \u0111\u1ECDc xong th\xF4ng tin th\u1EBB")),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011953.png'),style:{width:'100%',height:70,resizeMode:'contain',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:612,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{marginTop:10,paddingHorizontal:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:622,columnNumber:15}},_react.default.createElement(_MText.MText,{style:[$title2,{textAlign:'left'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:623,columnNumber:17}},"C\xE1ch 2: Ch\u1EE5p 2 m\u1EB7t"),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:626,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:627,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:628,columnNumber:19}},"N\xEAn \u0111\u1EB7t CCCD/ CMND l\xEAn m\u1EB7t ph\u1EB3ng \u0111\u1EC3 ch\u1EE5p")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:632,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:633,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:634,columnNumber:19}},"\u0110\u1EB7t CCCD/ CMND n\u1EB1m g\u1ECDn trong khung h\xECnh (Kh\xF4ng ",'\n'," qu\xE1 nh\u1ECF hay qu\xE1 to l\xE0m m\u1EA5t chi ti\u1EBFt)")),_react.default.createElement(_reactNative.View,{style:$row,__self:this,__source:{fileName:_jsxFileName,lineNumber:639,columnNumber:17}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:640,columnNumber:19}}),_react.default.createElement(_MText.MText,{style:$txt,__self:this,__source:{fileName:_jsxFileName,lineNumber:641,columnNumber:19}},"Ch\u1ECDn n\u01A1i \xE1nh s\xE1ng t\u1ED1t, tr\xE1nh l\xF3a/ ch\xF3i h\xECnh ch\u1EE5p")),_react.default.createElement(_reactNative.Image,{source:require('../../assets/tts/Frame1000011947.png'),style:{width:'100%',height:80,resizeMode:'contain',marginTop:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:645,columnNumber:17}})),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',margin:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:656,columnNumber:15}},_react.default.createElement(_reactNative.TouchableOpacity,{onPress:function onPress(){setType('passport');setShowModal(false);(0,_storage.save)(_storage.OCR_V1,true);},style:{flex:1,borderWidth:1,borderColor:'#EF592E',height:40,alignItems:'center',justifyContent:'center',borderRadius:40},__self:this,__source:{fileName:_jsxFileName,lineNumber:663,columnNumber:17}},_react.default.createElement(_MText.MText,{style:{color:'#EF592E',fontSize:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:680,columnNumber:19}},"Ch\u1EE5p 2 m\u1EB7t"))),_react.default.createElement(_reactNative.View,{style:{height:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:722,columnNumber:15}}))))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:728,columnNumber:7}}));});var $row={flexDirection:'row',alignItems:'center',marginTop:5};var $txt={fontSize:12,marginLeft:5};var $bg={backgroundColor:'white',borderTopRightRadius:26,borderTopLeftRadius:26};var $step={height:40,width:'100%',resizeMode:'contain',marginTop:10,marginBottom:10};var $paddingV={paddingTop:16};var $title={fontSize:16,color:'white',fontWeight:'bold',textAlign:'center'};var $title2={fontSize:16,color:'#333333',fontWeight:'bold',textAlign:'center'};var $description={fontSize:12,color:'white',textAlign:'center'};var $flex={flex:1};var $modal={justifyContent:'flex-end',margin:0};var $container={borderTopRightRadius:26,borderTopLeftRadius:26};var styles=_reactNative.StyleSheet.create({container:{flex:1},camera:{flex:1},passportCameraFrame:{width:_reactNative.Dimensions.get('window').width,height:260,overflow:'hidden',backgroundColor:'black'},buttonContainer:{flex:0,flexDirection:'column',justifyContent:'center',alignItems:'center',position:'absolute',left:0,right:0,zIndex:1000},captureButton:{width:56,height:56,borderRadius:35,backgroundColor:'white',justifyContent:'center',alignItems:'center'},innerCaptureButton:{width:60,height:60,borderRadius:30,backgroundColor:'red'},overlay:{position:'absolute',top:0,left:0,right:0,bottom:0,justifyContent:'center',alignItems:'center'},overlayTop:{flex:1,backgroundColor:'black',width:'100%'},overlayCenter:{flexDirection:'row'},overlayLeft:{flex:1,backgroundColor:'black'},overlayRect:{width:'90%',height:100,borderColor:'white',borderWidth:2,justifyContent:'center',alignItems:'center'},instructionText:{color:'white',textAlign:'center',paddingHorizontal:10,fontSize:14,position:'absolute',top:-50},overlayRight:{flex:1,backgroundColor:'black'},overlayBottom:{flex:1,backgroundColor:'black',width:'100%'},mrzContainer:{padding:10},mrzText:{fontSize:16}});
2
2
  //# sourceMappingURL=OCR.js.map