@smileid/usesmileid 12.0.2 → 12.1.0

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 (1270) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +65 -39
  3. package/dist/camera/camera_configuration.d.ts +0 -1
  4. package/dist/camera/camera_configuration.js +1 -2
  5. package/dist/camera/camera_defaults.d.ts +1 -2
  6. package/dist/camera/camera_defaults.js +1 -26
  7. package/dist/camera/camera_lens.d.ts +1 -5
  8. package/dist/camera/camera_lens.js +1 -12
  9. package/dist/camera/camera_permissions.d.ts +2 -7
  10. package/dist/camera/camera_permissions.js +1 -23
  11. package/dist/camera/document_image_pipeline.d.ts +0 -1
  12. package/dist/camera/document_image_pipeline.js +1 -70
  13. package/dist/camera/document_resize_target.d.ts +0 -1
  14. package/dist/camera/document_resize_target.js +1 -17
  15. package/dist/camera/focus_state.d.ts +0 -1
  16. package/dist/camera/focus_state.js +1 -13
  17. package/dist/camera/kamera_config_factory.d.ts +8 -0
  18. package/dist/camera/kamera_config_factory.js +1 -0
  19. package/dist/camera/kamera_error_mapping.d.ts +11 -0
  20. package/dist/camera/kamera_error_mapping.js +1 -0
  21. package/dist/camera/use_kamera_camera_permission.d.ts +8 -0
  22. package/dist/camera/use_kamera_camera_permission.js +1 -0
  23. package/dist/camera/use_kamera_orientation.d.ts +9 -0
  24. package/dist/camera/use_kamera_orientation.js +1 -0
  25. package/dist/camera/use_smile_id_frame_stream.d.ts +0 -1
  26. package/dist/camera/use_smile_id_frame_stream.js +1 -93
  27. package/dist/camera/use_smile_id_kamera_camera_system.d.ts +64 -0
  28. package/dist/camera/use_smile_id_kamera_camera_system.js +1 -0
  29. package/dist/camera/use_smile_id_kamera_preview.d.ts +12 -0
  30. package/dist/camera/use_smile_id_kamera_preview.js +1 -0
  31. package/dist/core/exception/agent_mode_with_enhanced_liveness_exception.d.ts +0 -1
  32. package/dist/core/exception/agent_mode_with_enhanced_liveness_exception.js +1 -17
  33. package/dist/core/exception/builder_validation_exception.d.ts +0 -1
  34. package/dist/core/exception/builder_validation_exception.js +1 -37
  35. package/dist/core/exception/capture_validation_exceptions.d.ts +0 -1
  36. package/dist/core/exception/capture_validation_exceptions.js +1 -10
  37. package/dist/core/exception/consent_validation_exceptions.d.ts +0 -1
  38. package/dist/core/exception/consent_validation_exceptions.js +1 -8
  39. package/dist/core/exception/duplicate_screen_type_exception.d.ts +0 -1
  40. package/dist/core/exception/duplicate_screen_type_exception.js +1 -20
  41. package/dist/core/exception/empty_screens_block_exception.d.ts +0 -1
  42. package/dist/core/exception/empty_screens_block_exception.js +1 -17
  43. package/dist/core/exception/flow_exceptions.d.ts +0 -1
  44. package/dist/core/exception/flow_exceptions.js +1 -38
  45. package/dist/core/exception/index.d.ts +3 -2
  46. package/dist/core/exception/index.js +1 -54
  47. package/dist/core/exception/invalid_consent_config_exception.d.ts +0 -1
  48. package/dist/core/exception/invalid_consent_config_exception.js +1 -18
  49. package/dist/core/exception/invalid_consent_information_exception.d.ts +0 -1
  50. package/dist/core/exception/invalid_consent_information_exception.js +1 -19
  51. package/dist/core/exception/invalid_document_capture_config_exception.d.ts +0 -1
  52. package/dist/core/exception/invalid_document_capture_config_exception.js +1 -20
  53. package/dist/core/exception/invalid_field_value_exception.d.ts +0 -1
  54. package/dist/core/exception/invalid_field_value_exception.js +1 -20
  55. package/dist/core/exception/invalid_job_type_screen_config_exception.d.ts +1 -1
  56. package/dist/core/exception/invalid_job_type_screen_config_exception.js +1 -61
  57. package/dist/core/exception/invalid_missing_capture_type_exception.d.ts +0 -1
  58. package/dist/core/exception/invalid_missing_capture_type_exception.js +1 -17
  59. package/dist/core/exception/invalid_screen_order_exception.d.ts +0 -1
  60. package/dist/core/exception/invalid_screen_order_exception.js +1 -22
  61. package/dist/core/exception/invalid_selfie_capture_config_exception.d.ts +0 -1
  62. package/dist/core/exception/invalid_selfie_capture_config_exception.js +1 -20
  63. package/dist/core/exception/issue_severity.d.ts +0 -1
  64. package/dist/core/exception/issue_severity.js +1 -13
  65. package/dist/core/exception/job_validation_exceptions.d.ts +0 -1
  66. package/dist/core/exception/job_validation_exceptions.js +1 -12
  67. package/dist/core/exception/liveness_frame_count_exception.d.ts +0 -1
  68. package/dist/core/exception/liveness_frame_count_exception.js +1 -19
  69. package/dist/core/exception/missing_capture_for_preview_exception.d.ts +0 -1
  70. package/dist/core/exception/missing_capture_for_preview_exception.js +1 -22
  71. package/dist/core/exception/missing_job_type_exception.d.ts +0 -1
  72. package/dist/core/exception/missing_job_type_exception.js +1 -15
  73. package/dist/core/exception/missing_ml_configuration_block_exception.d.ts +0 -1
  74. package/dist/core/exception/missing_ml_configuration_block_exception.js +1 -19
  75. package/dist/core/exception/missing_network_configuration_block_exception.d.ts +0 -1
  76. package/dist/core/exception/missing_network_configuration_block_exception.js +1 -19
  77. package/dist/core/exception/missing_partner_config_exception.d.ts +4 -1
  78. package/dist/core/exception/missing_partner_config_exception.js +1 -35
  79. package/dist/core/exception/missing_required_field_exception.d.ts +0 -1
  80. package/dist/core/exception/missing_required_field_exception.js +1 -18
  81. package/dist/core/exception/screen_config_validation_exceptions.d.ts +0 -1
  82. package/dist/core/exception/screen_config_validation_exceptions.js +1 -11
  83. package/dist/core/exception/unused_job_params_exception.d.ts +16 -0
  84. package/dist/core/exception/unused_job_params_exception.js +1 -0
  85. package/dist/core/exception/use_smile_id_attestation_exception.d.ts +0 -1
  86. package/dist/core/exception/use_smile_id_attestation_exception.js +1 -12
  87. package/dist/core/exception/use_smile_id_builder_exception.d.ts +0 -1
  88. package/dist/core/exception/use_smile_id_builder_exception.js +1 -19
  89. package/dist/core/exception/use_smile_id_camera_exception.d.ts +0 -1
  90. package/dist/core/exception/use_smile_id_camera_exception.js +1 -13
  91. package/dist/core/exception/use_smile_id_camera_surface_exception.d.ts +15 -0
  92. package/dist/core/exception/use_smile_id_camera_surface_exception.js +1 -0
  93. package/dist/core/exception/use_smile_id_error_code.d.ts +8 -1
  94. package/dist/core/exception/use_smile_id_error_code.js +1 -71
  95. package/dist/core/exception/use_smile_id_exception.d.ts +0 -1
  96. package/dist/core/exception/use_smile_id_exception.js +1 -39
  97. package/dist/core/exception/use_smile_id_general_exception.d.ts +0 -1
  98. package/dist/core/exception/use_smile_id_general_exception.js +1 -13
  99. package/dist/core/exception/use_smile_id_network_exception.d.ts +0 -1
  100. package/dist/core/exception/use_smile_id_network_exception.js +1 -203
  101. package/dist/core/exception/use_smile_id_validation_exception.d.ts +0 -1
  102. package/dist/core/exception/use_smile_id_validation_exception.js +1 -13
  103. package/dist/core/models/config.d.ts +8 -1
  104. package/dist/core/models/config.js +1 -2
  105. package/dist/core/models/document_capture_mode.d.ts +0 -1
  106. package/dist/core/models/document_capture_mode.js +1 -47
  107. package/dist/core/models/document_type.d.ts +5 -1
  108. package/dist/core/models/document_type.js +1 -47
  109. package/dist/core/models/flow_step.d.ts +0 -1
  110. package/dist/core/models/flow_step.js +1 -16
  111. package/dist/core/models/global_privacy_control.d.ts +0 -1
  112. package/dist/core/models/global_privacy_control.js +1 -39
  113. package/dist/core/models/head_turn_direction.d.ts +0 -1
  114. package/dist/core/models/head_turn_direction.js +1 -14
  115. package/dist/core/models/job_type.d.ts +0 -1
  116. package/dist/core/models/job_type.js +1 -43
  117. package/dist/core/models/ml_config.d.ts +0 -1
  118. package/dist/core/models/ml_config.js +1 -27
  119. package/dist/core/models/network_config.d.ts +0 -1
  120. package/dist/core/models/network_config.js +1 -41
  121. package/dist/core/models/params.d.ts +0 -1
  122. package/dist/core/models/params.js +1 -5
  123. package/dist/core/models/result.d.ts +0 -1
  124. package/dist/core/models/result.js +1 -17
  125. package/dist/data/api/auth/token_holder.d.ts +0 -1
  126. package/dist/data/api/auth/token_holder.js +1 -67
  127. package/dist/data/api/interceptors/gzip_interceptor.d.ts +0 -1
  128. package/dist/data/api/interceptors/gzip_interceptor.js +1 -29
  129. package/dist/data/api/interceptors/logging_interceptor.d.ts +0 -1
  130. package/dist/data/api/interceptors/logging_interceptor.js +1 -108
  131. package/dist/data/api/interceptors/sensitive_headers.d.ts +0 -1
  132. package/dist/data/api/interceptors/sensitive_headers.js +1 -42
  133. package/dist/data/api/interceptors/smile_auth_interceptor.d.ts +0 -1
  134. package/dist/data/api/interceptors/smile_auth_interceptor.js +1 -57
  135. package/dist/data/api/interceptors/smile_integrity_interceptor.d.ts +0 -1
  136. package/dist/data/api/interceptors/smile_integrity_interceptor.js +1 -79
  137. package/dist/data/api/interceptors/smile_request_mac_interceptor.d.ts +0 -1
  138. package/dist/data/api/interceptors/smile_request_mac_interceptor.js +1 -77
  139. package/dist/data/api/interceptors/token_refresh_interceptor.d.ts +0 -1
  140. package/dist/data/api/interceptors/token_refresh_interceptor.js +1 -58
  141. package/dist/data/api/smile_id_api.d.ts +0 -1
  142. package/dist/data/api/smile_id_api.js +1 -374
  143. package/dist/data/compression/compressible_asset.d.ts +0 -1
  144. package/dist/data/compression/compressible_asset.js +1 -34
  145. package/dist/data/compression/payload_compression_config.d.ts +0 -1
  146. package/dist/data/compression/payload_compression_config.js +1 -52
  147. package/dist/data/compression/payload_compression_runner.d.ts +8 -1
  148. package/dist/data/compression/payload_compression_runner.js +1 -55
  149. package/dist/data/compression/payload_compressor.d.ts +0 -1
  150. package/dist/data/compression/payload_compressor.js +1 -126
  151. package/dist/data/compression/uri_compressible_asset.d.ts +0 -1
  152. package/dist/data/compression/uri_compressible_asset.js +1 -77
  153. package/dist/data/dsl/builder/cache_config_builder.d.ts +0 -1
  154. package/dist/data/dsl/builder/cache_config_builder.js +1 -24
  155. package/dist/data/dsl/builder/config_builder.d.ts +0 -1
  156. package/dist/data/dsl/builder/config_builder.js +1 -137
  157. package/dist/data/dsl/builder/interceptor_config_builder.d.ts +0 -1
  158. package/dist/data/dsl/builder/interceptor_config_builder.js +1 -71
  159. package/dist/data/dsl/builder/retry_config_builder.d.ts +0 -1
  160. package/dist/data/dsl/builder/retry_config_builder.js +1 -46
  161. package/dist/data/dsl/builder/timeout_config_builder.d.ts +0 -1
  162. package/dist/data/dsl/builder/timeout_config_builder.js +1 -26
  163. package/dist/data/dsl/use_smile_id_network_builder.d.ts +0 -1
  164. package/dist/data/dsl/use_smile_id_network_builder.js +1 -83
  165. package/dist/data/factory/networking_factory.d.ts +0 -1
  166. package/dist/data/factory/networking_factory.js +1 -174
  167. package/dist/data/model/image_dimensions.d.ts +0 -1
  168. package/dist/data/model/image_dimensions.js +1 -2
  169. package/dist/data/model/job_request.d.ts +4 -6
  170. package/dist/data/model/job_request.js +1 -2
  171. package/dist/data/model/job_submission_response.d.ts +0 -1
  172. package/dist/data/model/job_submission_response.js +1 -2
  173. package/dist/data/model/sdk_config.d.ts +0 -1
  174. package/dist/data/model/sdk_config.js +1 -68
  175. package/dist/data/model/sdk_config_capture.d.ts +0 -1
  176. package/dist/data/model/sdk_config_capture.js +1 -69
  177. package/dist/data/model/sdk_config_source.d.ts +0 -1
  178. package/dist/data/model/sdk_config_source.js +1 -24
  179. package/dist/data/model/token_payload.d.ts +0 -1
  180. package/dist/data/model/token_payload.js +1 -132
  181. package/dist/data/model/user_details_payload.d.ts +0 -1
  182. package/dist/data/model/user_details_payload.js +1 -53
  183. package/dist/data/repository/use_smile_id_repository.d.ts +2 -2
  184. package/dist/data/repository/use_smile_id_repository.js +1 -2
  185. package/dist/data/repository/use_smile_id_repository_impl.d.ts +2 -2
  186. package/dist/data/repository/use_smile_id_repository_impl.js +1 -149
  187. package/dist/data/security/request_canonicalizer.d.ts +0 -1
  188. package/dist/data/security/request_canonicalizer.js +1 -132
  189. package/dist/data/security/request_timestamp.d.ts +0 -1
  190. package/dist/data/security/request_timestamp.js +1 -13
  191. package/dist/data/security/security_policy.d.ts +0 -1
  192. package/dist/data/security/security_policy.js +1 -61
  193. package/dist/data/security/signing_crypto.d.ts +0 -1
  194. package/dist/data/security/signing_crypto.js +1 -145
  195. package/dist/data/security/smile_id_crypto_error.d.ts +0 -1
  196. package/dist/data/security/smile_id_crypto_error.js +1 -14
  197. package/dist/data/security/smile_id_crypto_manager.d.ts +0 -1
  198. package/dist/data/security/smile_id_crypto_manager.js +1 -40
  199. package/dist/data/smile_id_urls.d.ts +0 -1
  200. package/dist/data/smile_id_urls.js +1 -14
  201. package/dist/data/util/retry_util.d.ts +0 -1
  202. package/dist/data/util/retry_util.js +1 -74
  203. package/dist/data/util/use_smile_id_token_decoder.d.ts +0 -1
  204. package/dist/data/util/use_smile_id_token_decoder.js +1 -148
  205. package/dist/index.d.ts +3 -6
  206. package/dist/index.js +1 -142
  207. package/dist/l10n/strings_en.d.ts +18 -14
  208. package/dist/l10n/strings_en.js +2 -145
  209. package/dist/l10n/use_smile_id_localizations.d.ts +14 -10
  210. package/dist/l10n/use_smile_id_localizations.js +1 -546
  211. package/dist/l10n/use_smile_id_localizations_provider.d.ts +0 -1
  212. package/dist/l10n/use_smile_id_localizations_provider.js +1 -53
  213. package/dist/metadata/builder_configuration.d.ts +0 -1
  214. package/dist/metadata/builder_configuration.js +1 -35
  215. package/dist/metadata/captured_image_properties.d.ts +0 -1
  216. package/dist/metadata/captured_image_properties.js +1 -11
  217. package/dist/metadata/device_orientation_collector.d.ts +0 -1
  218. package/dist/metadata/device_orientation_collector.js +1 -66
  219. package/dist/metadata/document_image_origin.d.ts +0 -1
  220. package/dist/metadata/document_image_origin.js +1 -19
  221. package/dist/metadata/geolocation.d.ts +0 -1
  222. package/dist/metadata/geolocation.js +1 -40
  223. package/dist/metadata/metadata_configuration_mappers.d.ts +0 -1
  224. package/dist/metadata/metadata_configuration_mappers.js +1 -178
  225. package/dist/metadata/model_configuration.d.ts +0 -1
  226. package/dist/metadata/model_configuration.js +1 -44
  227. package/dist/metadata/optional_native_modules.d.ts +0 -1
  228. package/dist/metadata/optional_native_modules.js +1 -206
  229. package/dist/metadata/use_smile_id_metadata.d.ts +0 -1
  230. package/dist/metadata/use_smile_id_metadata.js +1 -188
  231. package/dist/metadata/use_smile_id_metadata_factory.d.ts +11 -1
  232. package/dist/metadata/use_smile_id_metadata_factory.js +1 -501
  233. package/dist/presentation/assets/si_document_green_book_hero_animation.json +4740 -0
  234. package/dist/presentation/assets/si_document_hero_animation.json +4870 -0
  235. package/dist/presentation/assets/si_document_hero_back_animation.json +2122 -0
  236. package/dist/presentation/assets/si_document_passport_hero_animation.json +14540 -0
  237. package/dist/presentation/assets/si_ess_all_directions_hero_animation.json +5906 -0
  238. package/dist/presentation/assets/si_ess_animation_all_directions.json +5906 -0
  239. package/dist/presentation/assets/si_selfie_hero_animation.json +1468 -0
  240. package/dist/presentation/assets/si_smile_to_capture_animation.json +1412 -0
  241. package/dist/presentation/assets/svg/document_shimmer_strings.d.ts +0 -1
  242. package/dist/presentation/assets/svg/document_shimmer_strings.js +1 -14
  243. package/dist/presentation/assets/svg/instruction_svg_strings.d.ts +0 -1
  244. package/dist/presentation/assets/svg/instruction_svg_strings.js +1 -32
  245. package/dist/presentation/assets/svg/svg_strings.d.ts +0 -1
  246. package/dist/presentation/assets/svg/svg_strings.js +15 -46
  247. package/dist/presentation/components/face_oval_defaults.d.ts +0 -1
  248. package/dist/presentation/components/face_oval_defaults.js +1 -41
  249. package/dist/presentation/components/helpers/animated_lottie_view.d.ts +0 -1
  250. package/dist/presentation/components/helpers/animated_lottie_view.js +1 -9
  251. package/dist/presentation/components/helpers/capture_instruction_animation_spec.d.ts +2 -1
  252. package/dist/presentation/components/helpers/capture_instruction_animation_spec.js +1 -47
  253. package/dist/presentation/components/helpers/captured_document_image_fit.d.ts +6 -0
  254. package/dist/presentation/components/helpers/captured_document_image_fit.js +1 -0
  255. package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts +0 -1
  256. package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js +1 -44
  257. package/dist/presentation/components/helpers/scaled_oval_geometry.d.ts +0 -1
  258. package/dist/presentation/components/helpers/scaled_oval_geometry.js +1 -29
  259. package/dist/presentation/components/icons/index.d.ts +0 -1
  260. package/dist/presentation/components/icons/index.js +1 -117
  261. package/dist/presentation/components/status_indicator_state.d.ts +0 -1
  262. package/dist/presentation/components/status_indicator_state.js +1 -19
  263. package/dist/presentation/components/use_smile_id_attribution.d.ts +2 -1
  264. package/dist/presentation/components/use_smile_id_attribution.js +1 -25
  265. package/dist/presentation/components/use_smile_id_back_button.d.ts +2 -1
  266. package/dist/presentation/components/use_smile_id_back_button.js +1 -38
  267. package/dist/presentation/components/use_smile_id_button.d.ts +0 -1
  268. package/dist/presentation/components/use_smile_id_button.js +1 -69
  269. package/dist/presentation/components/use_smile_id_capture_content.d.ts +0 -1
  270. package/dist/presentation/components/use_smile_id_capture_content.js +1 -137
  271. package/dist/presentation/components/use_smile_id_capture_instruction_animation.d.ts +3 -4
  272. package/dist/presentation/components/use_smile_id_capture_instruction_animation.js +1 -50
  273. package/dist/presentation/components/use_smile_id_capture_spinner.d.ts +0 -1
  274. package/dist/presentation/components/use_smile_id_capture_spinner.js +1 -30
  275. package/dist/presentation/components/use_smile_id_captured_document_image.d.ts +4 -5
  276. package/dist/presentation/components/use_smile_id_captured_document_image.js +1 -39
  277. package/dist/presentation/components/use_smile_id_captured_image_oval.d.ts +0 -1
  278. package/dist/presentation/components/use_smile_id_captured_image_oval.js +1 -63
  279. package/dist/presentation/components/use_smile_id_card_surface.d.ts +0 -1
  280. package/dist/presentation/components/use_smile_id_card_surface.js +1 -37
  281. package/dist/presentation/components/use_smile_id_confirmation_buttons.d.ts +0 -1
  282. package/dist/presentation/components/use_smile_id_confirmation_buttons.js +1 -48
  283. package/dist/presentation/components/use_smile_id_consent_row.d.ts +0 -1
  284. package/dist/presentation/components/use_smile_id_consent_row.js +1 -32
  285. package/dist/presentation/components/use_smile_id_content_card.d.ts +0 -1
  286. package/dist/presentation/components/use_smile_id_content_card.js +1 -41
  287. package/dist/presentation/components/use_smile_id_document_capture_controls.d.ts +0 -1
  288. package/dist/presentation/components/use_smile_id_document_capture_controls.js +1 -120
  289. package/dist/presentation/components/use_smile_id_document_overlay.d.ts +0 -1
  290. package/dist/presentation/components/use_smile_id_document_overlay.js +1 -158
  291. package/dist/presentation/components/use_smile_id_document_shimmer.d.ts +0 -1
  292. package/dist/presentation/components/use_smile_id_document_shimmer.js +1 -23
  293. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts +0 -1
  294. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js +1 -77
  295. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.d.ts +0 -1
  296. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.js +1 -21
  297. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.d.ts +0 -1
  298. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.js +1 -14
  299. package/dist/presentation/components/use_smile_id_expandable_icon.d.ts +0 -1
  300. package/dist/presentation/components/use_smile_id_expandable_icon.js +1 -55
  301. package/dist/presentation/components/use_smile_id_face_oval_image.d.ts +0 -1
  302. package/dist/presentation/components/use_smile_id_face_oval_image.js +1 -41
  303. package/dist/presentation/components/use_smile_id_face_overlay.d.ts +0 -1
  304. package/dist/presentation/components/use_smile_id_face_overlay.js +1 -194
  305. package/dist/presentation/components/use_smile_id_failed_content.d.ts +0 -1
  306. package/dist/presentation/components/use_smile_id_failed_content.js +1 -44
  307. package/dist/presentation/components/use_smile_id_guideline_thumbnail.d.ts +0 -1
  308. package/dist/presentation/components/use_smile_id_guideline_thumbnail.js +1 -179
  309. package/dist/presentation/components/use_smile_id_instructions_hero.d.ts +0 -1
  310. package/dist/presentation/components/use_smile_id_instructions_hero.js +1 -164
  311. package/dist/presentation/components/use_smile_id_learn_more_content.d.ts +0 -1
  312. package/dist/presentation/components/use_smile_id_learn_more_content.js +1 -70
  313. package/dist/presentation/components/use_smile_id_loading_content.d.ts +0 -1
  314. package/dist/presentation/components/use_smile_id_loading_content.js +1 -31
  315. package/dist/presentation/components/use_smile_id_loading_indicator.d.ts +0 -1
  316. package/dist/presentation/components/use_smile_id_loading_indicator.js +1 -48
  317. package/dist/presentation/components/use_smile_id_oval_border_palette.d.ts +0 -1
  318. package/dist/presentation/components/use_smile_id_oval_border_palette.js +1 -49
  319. package/dist/presentation/components/use_smile_id_partner_icon.d.ts +3 -1
  320. package/dist/presentation/components/use_smile_id_partner_icon.js +1 -34
  321. package/dist/presentation/components/use_smile_id_processing_center_indicator.d.ts +0 -1
  322. package/dist/presentation/components/use_smile_id_processing_center_indicator.js +1 -44
  323. package/dist/presentation/components/use_smile_id_rounded_checkbox.d.ts +0 -1
  324. package/dist/presentation/components/use_smile_id_rounded_checkbox.js +1 -41
  325. package/dist/presentation/components/use_smile_id_status_indicator.d.ts +0 -1
  326. package/dist/presentation/components/use_smile_id_status_indicator.js +1 -22
  327. package/dist/presentation/components/use_smile_id_success_content.d.ts +0 -1
  328. package/dist/presentation/components/use_smile_id_success_content.js +1 -39
  329. package/dist/presentation/flow/analytics/use_smile_id_analytics_event.d.ts +0 -1
  330. package/dist/presentation/flow/analytics/use_smile_id_analytics_event.js +1 -71
  331. package/dist/presentation/flow/config/attribution_resolver.d.ts +17 -0
  332. package/dist/presentation/flow/config/attribution_resolver.js +1 -0
  333. package/dist/presentation/flow/config/flow_configuration.d.ts +0 -1
  334. package/dist/presentation/flow/config/flow_configuration.js +1 -2
  335. package/dist/presentation/flow/dsl/builder/config_builder.d.ts +5 -1
  336. package/dist/presentation/flow/dsl/builder/config_builder.js +1 -50
  337. package/dist/presentation/flow/dsl/builder/ml_builder.d.ts +0 -1
  338. package/dist/presentation/flow/dsl/builder/ml_builder.js +1 -164
  339. package/dist/presentation/flow/dsl/builder/screens_builder.d.ts +0 -21
  340. package/dist/presentation/flow/dsl/builder/screens_builder.js +1 -215
  341. package/dist/presentation/flow/dsl/builder/theme_builder.d.ts +0 -1
  342. package/dist/presentation/flow/dsl/builder/theme_builder.js +1 -83
  343. package/dist/presentation/flow/dsl/flow_build_result.d.ts +0 -1
  344. package/dist/presentation/flow/dsl/flow_build_result.js +1 -2
  345. package/dist/presentation/flow/dsl/use_smile_id_builder.d.ts +0 -1
  346. package/dist/presentation/flow/dsl/use_smile_id_builder.js +1 -49
  347. package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts +0 -1
  348. package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js +1 -356
  349. package/dist/presentation/flow/flow_navigation_context.d.ts +0 -1
  350. package/dist/presentation/flow/flow_navigation_context.js +1 -34
  351. package/dist/presentation/flow/flow_navigation_manager.d.ts +2 -1
  352. package/dist/presentation/flow/flow_navigation_manager.js +1 -935
  353. package/dist/presentation/flow/graph/screen_renderer.d.ts +0 -1
  354. package/dist/presentation/flow/graph/screen_renderer.js +1 -31
  355. package/dist/presentation/flow/graph/screen_transition.d.ts +8 -0
  356. package/dist/presentation/flow/graph/screen_transition.js +1 -0
  357. package/dist/presentation/flow/job_submission_state.d.ts +0 -1
  358. package/dist/presentation/flow/job_submission_state.js +1 -2
  359. package/dist/presentation/flow/model/instruction_guideline.d.ts +0 -1
  360. package/dist/presentation/flow/model/instruction_guideline.js +1 -2
  361. package/dist/presentation/flow/model/instructions_defaults.d.ts +0 -1
  362. package/dist/presentation/flow/model/instructions_defaults.js +1 -130
  363. package/dist/presentation/flow/screen/helpers/analyzer_lifecycle.d.ts +18 -0
  364. package/dist/presentation/flow/screen/helpers/analyzer_lifecycle.js +1 -0
  365. package/dist/presentation/flow/screen/helpers/face_session_config.d.ts +0 -1
  366. package/dist/presentation/flow/screen/helpers/face_session_config.js +1 -65
  367. package/dist/presentation/flow/screen/helpers/failure_message.d.ts +3 -0
  368. package/dist/presentation/flow/screen/helpers/failure_message.js +1 -0
  369. package/dist/presentation/flow/screen/orchestrated_capture_screen.d.ts +0 -1
  370. package/dist/presentation/flow/screen/orchestrated_capture_screen.js +1 -237
  371. package/dist/presentation/flow/screen/orchestrated_consent_screen.d.ts +0 -1
  372. package/dist/presentation/flow/screen/orchestrated_consent_screen.js +1 -49
  373. package/dist/presentation/flow/screen/orchestrated_instructions_screen.d.ts +0 -1
  374. package/dist/presentation/flow/screen/orchestrated_instructions_screen.js +1 -47
  375. package/dist/presentation/flow/screen/orchestrated_preview_screen.d.ts +0 -1
  376. package/dist/presentation/flow/screen/orchestrated_preview_screen.js +1 -34
  377. package/dist/presentation/flow/screen/orchestrated_processing_screen.d.ts +0 -1
  378. package/dist/presentation/flow/screen/orchestrated_processing_screen.js +1 -79
  379. package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.d.ts +0 -1
  380. package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.js +1 -22
  381. package/dist/presentation/flow/screen/validation_error_screen.d.ts +0 -1
  382. package/dist/presentation/flow/screen/validation_error_screen.js +1 -87
  383. package/dist/presentation/flow/use_smile_id_flow.d.ts +1 -2
  384. package/dist/presentation/flow/use_smile_id_flow.js +1 -297
  385. package/dist/presentation/flow/validation/flow_validator.d.ts +2 -13
  386. package/dist/presentation/flow/validation/flow_validator.js +1 -300
  387. package/dist/presentation/flow/validation/job_type_validator.d.ts +3 -1
  388. package/dist/presentation/flow/validation/job_type_validator.js +1 -459
  389. package/dist/presentation/flow/validation/user_details_validator.d.ts +0 -1
  390. package/dist/presentation/flow/validation/user_details_validator.js +1 -40
  391. package/dist/presentation/flow/validation/validation_state.d.ts +3 -4
  392. package/dist/presentation/flow/validation/validation_state.js +1 -23
  393. package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts +0 -1
  394. package/dist/presentation/screen/helpers/capture_screen_helpers.js +1 -135
  395. package/dist/presentation/screen/helpers/capture_ui_state.d.ts +0 -1
  396. package/dist/presentation/screen/helpers/capture_ui_state.js +1 -179
  397. package/dist/presentation/screen/helpers/consent_screen_helpers.d.ts +0 -1
  398. package/dist/presentation/screen/helpers/consent_screen_helpers.js +1 -68
  399. package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts +0 -1
  400. package/dist/presentation/screen/helpers/ess_turn_haptics.js +1 -53
  401. package/dist/presentation/screen/helpers/feedback_debouncer.d.ts +0 -1
  402. package/dist/presentation/screen/helpers/feedback_debouncer.js +1 -77
  403. package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts +0 -3
  404. package/dist/presentation/screen/helpers/instructions_screen_helpers.js +1 -54
  405. package/dist/presentation/screen/helpers/preview_screen_helpers.d.ts +0 -1
  406. package/dist/presentation/screen/helpers/preview_screen_helpers.js +1 -27
  407. package/dist/presentation/screen/helpers/processing_screen_helpers.d.ts +0 -1
  408. package/dist/presentation/screen/helpers/processing_screen_helpers.js +1 -12
  409. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.d.ts +7 -1
  410. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js +1 -107
  411. package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts +0 -1
  412. package/dist/presentation/screen/helpers/use_capture_orientation_lock.js +1 -79
  413. package/dist/presentation/screen/helpers/use_debounced_feedback_key.d.ts +0 -1
  414. package/dist/presentation/screen/helpers/use_debounced_feedback_key.js +1 -44
  415. package/dist/presentation/screen/use_smile_id_capture_screen.d.ts +8 -11
  416. package/dist/presentation/screen/use_smile_id_capture_screen.js +1 -640
  417. package/dist/presentation/screen/use_smile_id_consent_screen.d.ts +0 -1
  418. package/dist/presentation/screen/use_smile_id_consent_screen.js +1 -176
  419. package/dist/presentation/screen/use_smile_id_document_back_instructions.d.ts +6 -1
  420. package/dist/presentation/screen/use_smile_id_document_back_instructions.js +1 -43
  421. package/dist/presentation/screen/use_smile_id_document_preview_screen.d.ts +0 -1
  422. package/dist/presentation/screen/use_smile_id_document_preview_screen.js +1 -69
  423. package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts +0 -1
  424. package/dist/presentation/screen/use_smile_id_instructions_screen.js +2 -66
  425. package/dist/presentation/screen/use_smile_id_permission_screen.d.ts +0 -1
  426. package/dist/presentation/screen/use_smile_id_permission_screen.js +1 -28
  427. package/dist/presentation/screen/use_smile_id_preview_screen.d.ts +0 -1
  428. package/dist/presentation/screen/use_smile_id_preview_screen.js +1 -71
  429. package/dist/presentation/screen/use_smile_id_processing_screen.d.ts +0 -1
  430. package/dist/presentation/screen/use_smile_id_processing_screen.js +1 -85
  431. package/dist/presentation/state/processing_state.d.ts +0 -1
  432. package/dist/presentation/state/processing_state.js +1 -2
  433. package/dist/presentation/state/use_smile_id_overlay_state.d.ts +1 -3
  434. package/dist/presentation/state/use_smile_id_overlay_state.js +1 -56
  435. package/dist/presentation/theme/theme.d.ts +0 -1
  436. package/dist/presentation/theme/theme.js +1 -226
  437. package/dist/presentation/theme/theme_context.d.ts +0 -1
  438. package/dist/presentation/theme/theme_context.js +1 -31
  439. package/dist/presentation/theme/use_smile_id_motion.d.ts +0 -1
  440. package/dist/presentation/theme/use_smile_id_motion.js +1 -13
  441. package/dist/presentation/theme/use_use_smile_id_fonts.d.ts +0 -1
  442. package/dist/presentation/theme/use_use_smile_id_fonts.js +1 -64
  443. package/dist/presentation/utils/force_max_brightness.d.ts +0 -1
  444. package/dist/presentation/utils/force_max_brightness.js +1 -105
  445. package/dist/presentation/utils/locale_utils.d.ts +0 -1
  446. package/dist/presentation/utils/locale_utils.js +1 -74
  447. package/dist/presentation/utils/use_reduced_motion.d.ts +0 -1
  448. package/dist/presentation/utils/use_reduced_motion.js +1 -24
  449. package/dist/testing/fake_face_analyzer.d.ts +6 -1
  450. package/dist/testing/fake_face_analyzer.js +1 -52
  451. package/dist/testing/index.d.ts +0 -1
  452. package/dist/testing/index.js +1 -7
  453. package/dist/testing/scenario_expectations.d.ts +0 -1
  454. package/dist/testing/scenario_expectations.js +1 -65
  455. package/dist/testing/scenario_loader.d.ts +0 -1
  456. package/dist/testing/scenario_loader.js +1 -64
  457. package/dist/testing/scripted_scan_results.d.ts +3 -2
  458. package/dist/testing/scripted_scan_results.js +1 -52
  459. package/package.json +28 -30
  460. package/dist/camera/camera_configuration.d.ts.map +0 -1
  461. package/dist/camera/camera_configuration.js.map +0 -1
  462. package/dist/camera/camera_defaults.d.ts.map +0 -1
  463. package/dist/camera/camera_defaults.js.map +0 -1
  464. package/dist/camera/camera_lens.d.ts.map +0 -1
  465. package/dist/camera/camera_lens.js.map +0 -1
  466. package/dist/camera/camera_permissions.d.ts.map +0 -1
  467. package/dist/camera/camera_permissions.js.map +0 -1
  468. package/dist/camera/camera_preview_image.d.ts +0 -18
  469. package/dist/camera/camera_preview_image.d.ts.map +0 -1
  470. package/dist/camera/camera_preview_image.js +0 -8
  471. package/dist/camera/camera_preview_image.js.map +0 -1
  472. package/dist/camera/document_image_pipeline.d.ts.map +0 -1
  473. package/dist/camera/document_image_pipeline.js.map +0 -1
  474. package/dist/camera/document_resize_target.d.ts.map +0 -1
  475. package/dist/camera/document_resize_target.js.map +0 -1
  476. package/dist/camera/focus_state.d.ts.map +0 -1
  477. package/dist/camera/focus_state.js.map +0 -1
  478. package/dist/camera/orientation_degrees.d.ts +0 -10
  479. package/dist/camera/orientation_degrees.d.ts.map +0 -1
  480. package/dist/camera/orientation_degrees.js +0 -20
  481. package/dist/camera/orientation_degrees.js.map +0 -1
  482. package/dist/camera/use_smile_id_camera_preview.d.ts +0 -64
  483. package/dist/camera/use_smile_id_camera_preview.d.ts.map +0 -1
  484. package/dist/camera/use_smile_id_camera_preview.js +0 -141
  485. package/dist/camera/use_smile_id_camera_preview.js.map +0 -1
  486. package/dist/camera/use_smile_id_camera_system.d.ts +0 -97
  487. package/dist/camera/use_smile_id_camera_system.d.ts.map +0 -1
  488. package/dist/camera/use_smile_id_camera_system.js +0 -185
  489. package/dist/camera/use_smile_id_camera_system.js.map +0 -1
  490. package/dist/camera/use_smile_id_frame_stream.d.ts.map +0 -1
  491. package/dist/camera/use_smile_id_frame_stream.js.map +0 -1
  492. package/dist/core/exception/agent_mode_with_enhanced_liveness_exception.d.ts.map +0 -1
  493. package/dist/core/exception/agent_mode_with_enhanced_liveness_exception.js.map +0 -1
  494. package/dist/core/exception/builder_validation_exception.d.ts.map +0 -1
  495. package/dist/core/exception/builder_validation_exception.js.map +0 -1
  496. package/dist/core/exception/capture_validation_exceptions.d.ts.map +0 -1
  497. package/dist/core/exception/capture_validation_exceptions.js.map +0 -1
  498. package/dist/core/exception/consent_validation_exceptions.d.ts.map +0 -1
  499. package/dist/core/exception/consent_validation_exceptions.js.map +0 -1
  500. package/dist/core/exception/duplicate_screen_type_exception.d.ts.map +0 -1
  501. package/dist/core/exception/duplicate_screen_type_exception.js.map +0 -1
  502. package/dist/core/exception/empty_screens_block_exception.d.ts.map +0 -1
  503. package/dist/core/exception/empty_screens_block_exception.js.map +0 -1
  504. package/dist/core/exception/flow_exceptions.d.ts.map +0 -1
  505. package/dist/core/exception/flow_exceptions.js.map +0 -1
  506. package/dist/core/exception/index.d.ts.map +0 -1
  507. package/dist/core/exception/index.js.map +0 -1
  508. package/dist/core/exception/invalid_consent_config_exception.d.ts.map +0 -1
  509. package/dist/core/exception/invalid_consent_config_exception.js.map +0 -1
  510. package/dist/core/exception/invalid_consent_information_exception.d.ts.map +0 -1
  511. package/dist/core/exception/invalid_consent_information_exception.js.map +0 -1
  512. package/dist/core/exception/invalid_document_capture_config_exception.d.ts.map +0 -1
  513. package/dist/core/exception/invalid_document_capture_config_exception.js.map +0 -1
  514. package/dist/core/exception/invalid_field_value_exception.d.ts.map +0 -1
  515. package/dist/core/exception/invalid_field_value_exception.js.map +0 -1
  516. package/dist/core/exception/invalid_job_type_screen_config_exception.d.ts.map +0 -1
  517. package/dist/core/exception/invalid_job_type_screen_config_exception.js.map +0 -1
  518. package/dist/core/exception/invalid_missing_capture_type_exception.d.ts.map +0 -1
  519. package/dist/core/exception/invalid_missing_capture_type_exception.js.map +0 -1
  520. package/dist/core/exception/invalid_screen_order_exception.d.ts.map +0 -1
  521. package/dist/core/exception/invalid_screen_order_exception.js.map +0 -1
  522. package/dist/core/exception/invalid_selfie_capture_config_exception.d.ts.map +0 -1
  523. package/dist/core/exception/invalid_selfie_capture_config_exception.js.map +0 -1
  524. package/dist/core/exception/issue_severity.d.ts.map +0 -1
  525. package/dist/core/exception/issue_severity.js.map +0 -1
  526. package/dist/core/exception/job_validation_exceptions.d.ts.map +0 -1
  527. package/dist/core/exception/job_validation_exceptions.js.map +0 -1
  528. package/dist/core/exception/liveness_frame_count_exception.d.ts.map +0 -1
  529. package/dist/core/exception/liveness_frame_count_exception.js.map +0 -1
  530. package/dist/core/exception/missing_capture_for_preview_exception.d.ts.map +0 -1
  531. package/dist/core/exception/missing_capture_for_preview_exception.js.map +0 -1
  532. package/dist/core/exception/missing_job_type_exception.d.ts.map +0 -1
  533. package/dist/core/exception/missing_job_type_exception.js.map +0 -1
  534. package/dist/core/exception/missing_ml_configuration_block_exception.d.ts.map +0 -1
  535. package/dist/core/exception/missing_ml_configuration_block_exception.js.map +0 -1
  536. package/dist/core/exception/missing_network_configuration_block_exception.d.ts.map +0 -1
  537. package/dist/core/exception/missing_network_configuration_block_exception.js.map +0 -1
  538. package/dist/core/exception/missing_partner_config_exception.d.ts.map +0 -1
  539. package/dist/core/exception/missing_partner_config_exception.js.map +0 -1
  540. package/dist/core/exception/missing_required_field_exception.d.ts.map +0 -1
  541. package/dist/core/exception/missing_required_field_exception.js.map +0 -1
  542. package/dist/core/exception/screen_config_validation_exceptions.d.ts.map +0 -1
  543. package/dist/core/exception/screen_config_validation_exceptions.js.map +0 -1
  544. package/dist/core/exception/use_smile_id_attestation_exception.d.ts.map +0 -1
  545. package/dist/core/exception/use_smile_id_attestation_exception.js.map +0 -1
  546. package/dist/core/exception/use_smile_id_builder_exception.d.ts.map +0 -1
  547. package/dist/core/exception/use_smile_id_builder_exception.js.map +0 -1
  548. package/dist/core/exception/use_smile_id_camera_exception.d.ts.map +0 -1
  549. package/dist/core/exception/use_smile_id_camera_exception.js.map +0 -1
  550. package/dist/core/exception/use_smile_id_error_code.d.ts.map +0 -1
  551. package/dist/core/exception/use_smile_id_error_code.js.map +0 -1
  552. package/dist/core/exception/use_smile_id_exception.d.ts.map +0 -1
  553. package/dist/core/exception/use_smile_id_exception.js.map +0 -1
  554. package/dist/core/exception/use_smile_id_general_exception.d.ts.map +0 -1
  555. package/dist/core/exception/use_smile_id_general_exception.js.map +0 -1
  556. package/dist/core/exception/use_smile_id_network_exception.d.ts.map +0 -1
  557. package/dist/core/exception/use_smile_id_network_exception.js.map +0 -1
  558. package/dist/core/exception/use_smile_id_validation_exception.d.ts.map +0 -1
  559. package/dist/core/exception/use_smile_id_validation_exception.js.map +0 -1
  560. package/dist/core/models/config.d.ts.map +0 -1
  561. package/dist/core/models/config.js.map +0 -1
  562. package/dist/core/models/document_capture_mode.d.ts.map +0 -1
  563. package/dist/core/models/document_capture_mode.js.map +0 -1
  564. package/dist/core/models/document_type.d.ts.map +0 -1
  565. package/dist/core/models/document_type.js.map +0 -1
  566. package/dist/core/models/flow_step.d.ts.map +0 -1
  567. package/dist/core/models/flow_step.js.map +0 -1
  568. package/dist/core/models/global_privacy_control.d.ts.map +0 -1
  569. package/dist/core/models/global_privacy_control.js.map +0 -1
  570. package/dist/core/models/head_turn_direction.d.ts.map +0 -1
  571. package/dist/core/models/head_turn_direction.js.map +0 -1
  572. package/dist/core/models/job_type.d.ts.map +0 -1
  573. package/dist/core/models/job_type.js.map +0 -1
  574. package/dist/core/models/ml_config.d.ts.map +0 -1
  575. package/dist/core/models/ml_config.js.map +0 -1
  576. package/dist/core/models/network_config.d.ts.map +0 -1
  577. package/dist/core/models/network_config.js.map +0 -1
  578. package/dist/core/models/params.d.ts.map +0 -1
  579. package/dist/core/models/params.js.map +0 -1
  580. package/dist/core/models/result.d.ts.map +0 -1
  581. package/dist/core/models/result.js.map +0 -1
  582. package/dist/data/api/auth/token_holder.d.ts.map +0 -1
  583. package/dist/data/api/auth/token_holder.js.map +0 -1
  584. package/dist/data/api/interceptors/gzip_interceptor.d.ts.map +0 -1
  585. package/dist/data/api/interceptors/gzip_interceptor.js.map +0 -1
  586. package/dist/data/api/interceptors/logging_interceptor.d.ts.map +0 -1
  587. package/dist/data/api/interceptors/logging_interceptor.js.map +0 -1
  588. package/dist/data/api/interceptors/sensitive_headers.d.ts.map +0 -1
  589. package/dist/data/api/interceptors/sensitive_headers.js.map +0 -1
  590. package/dist/data/api/interceptors/smile_auth_interceptor.d.ts.map +0 -1
  591. package/dist/data/api/interceptors/smile_auth_interceptor.js.map +0 -1
  592. package/dist/data/api/interceptors/smile_integrity_interceptor.d.ts.map +0 -1
  593. package/dist/data/api/interceptors/smile_integrity_interceptor.js.map +0 -1
  594. package/dist/data/api/interceptors/smile_request_mac_interceptor.d.ts.map +0 -1
  595. package/dist/data/api/interceptors/smile_request_mac_interceptor.js.map +0 -1
  596. package/dist/data/api/interceptors/token_refresh_interceptor.d.ts.map +0 -1
  597. package/dist/data/api/interceptors/token_refresh_interceptor.js.map +0 -1
  598. package/dist/data/api/smile_id_api.d.ts.map +0 -1
  599. package/dist/data/api/smile_id_api.js.map +0 -1
  600. package/dist/data/compression/compressible_asset.d.ts.map +0 -1
  601. package/dist/data/compression/compressible_asset.js.map +0 -1
  602. package/dist/data/compression/payload_compression_config.d.ts.map +0 -1
  603. package/dist/data/compression/payload_compression_config.js.map +0 -1
  604. package/dist/data/compression/payload_compression_runner.d.ts.map +0 -1
  605. package/dist/data/compression/payload_compression_runner.js.map +0 -1
  606. package/dist/data/compression/payload_compressor.d.ts.map +0 -1
  607. package/dist/data/compression/payload_compressor.js.map +0 -1
  608. package/dist/data/compression/uri_compressible_asset.d.ts.map +0 -1
  609. package/dist/data/compression/uri_compressible_asset.js.map +0 -1
  610. package/dist/data/dsl/builder/cache_config_builder.d.ts.map +0 -1
  611. package/dist/data/dsl/builder/cache_config_builder.js.map +0 -1
  612. package/dist/data/dsl/builder/config_builder.d.ts.map +0 -1
  613. package/dist/data/dsl/builder/config_builder.js.map +0 -1
  614. package/dist/data/dsl/builder/interceptor_config_builder.d.ts.map +0 -1
  615. package/dist/data/dsl/builder/interceptor_config_builder.js.map +0 -1
  616. package/dist/data/dsl/builder/retry_config_builder.d.ts.map +0 -1
  617. package/dist/data/dsl/builder/retry_config_builder.js.map +0 -1
  618. package/dist/data/dsl/builder/timeout_config_builder.d.ts.map +0 -1
  619. package/dist/data/dsl/builder/timeout_config_builder.js.map +0 -1
  620. package/dist/data/dsl/use_smile_id_network_builder.d.ts.map +0 -1
  621. package/dist/data/dsl/use_smile_id_network_builder.js.map +0 -1
  622. package/dist/data/factory/networking_factory.d.ts.map +0 -1
  623. package/dist/data/factory/networking_factory.js.map +0 -1
  624. package/dist/data/model/image_dimensions.d.ts.map +0 -1
  625. package/dist/data/model/image_dimensions.js.map +0 -1
  626. package/dist/data/model/job_request.d.ts.map +0 -1
  627. package/dist/data/model/job_request.js.map +0 -1
  628. package/dist/data/model/job_submission_response.d.ts.map +0 -1
  629. package/dist/data/model/job_submission_response.js.map +0 -1
  630. package/dist/data/model/sdk_config.d.ts.map +0 -1
  631. package/dist/data/model/sdk_config.js.map +0 -1
  632. package/dist/data/model/sdk_config_capture.d.ts.map +0 -1
  633. package/dist/data/model/sdk_config_capture.js.map +0 -1
  634. package/dist/data/model/sdk_config_source.d.ts.map +0 -1
  635. package/dist/data/model/sdk_config_source.js.map +0 -1
  636. package/dist/data/model/token_payload.d.ts.map +0 -1
  637. package/dist/data/model/token_payload.js.map +0 -1
  638. package/dist/data/model/user_details_payload.d.ts.map +0 -1
  639. package/dist/data/model/user_details_payload.js.map +0 -1
  640. package/dist/data/repository/use_smile_id_repository.d.ts.map +0 -1
  641. package/dist/data/repository/use_smile_id_repository.js.map +0 -1
  642. package/dist/data/repository/use_smile_id_repository_impl.d.ts.map +0 -1
  643. package/dist/data/repository/use_smile_id_repository_impl.js.map +0 -1
  644. package/dist/data/security/request_canonicalizer.d.ts.map +0 -1
  645. package/dist/data/security/request_canonicalizer.js.map +0 -1
  646. package/dist/data/security/request_timestamp.d.ts.map +0 -1
  647. package/dist/data/security/request_timestamp.js.map +0 -1
  648. package/dist/data/security/security_policy.d.ts.map +0 -1
  649. package/dist/data/security/security_policy.js.map +0 -1
  650. package/dist/data/security/signing_crypto.d.ts.map +0 -1
  651. package/dist/data/security/signing_crypto.js.map +0 -1
  652. package/dist/data/security/smile_id_crypto_error.d.ts.map +0 -1
  653. package/dist/data/security/smile_id_crypto_error.js.map +0 -1
  654. package/dist/data/security/smile_id_crypto_manager.d.ts.map +0 -1
  655. package/dist/data/security/smile_id_crypto_manager.js.map +0 -1
  656. package/dist/data/smile_id_urls.d.ts.map +0 -1
  657. package/dist/data/smile_id_urls.js.map +0 -1
  658. package/dist/data/util/retry_util.d.ts.map +0 -1
  659. package/dist/data/util/retry_util.js.map +0 -1
  660. package/dist/data/util/use_smile_id_token_decoder.d.ts.map +0 -1
  661. package/dist/data/util/use_smile_id_token_decoder.js.map +0 -1
  662. package/dist/index.d.ts.map +0 -1
  663. package/dist/index.js.map +0 -1
  664. package/dist/l10n/strings_en.d.ts.map +0 -1
  665. package/dist/l10n/strings_en.js.map +0 -1
  666. package/dist/l10n/use_smile_id_localizations.d.ts.map +0 -1
  667. package/dist/l10n/use_smile_id_localizations.js.map +0 -1
  668. package/dist/l10n/use_smile_id_localizations_provider.d.ts.map +0 -1
  669. package/dist/l10n/use_smile_id_localizations_provider.js.map +0 -1
  670. package/dist/metadata/builder_configuration.d.ts.map +0 -1
  671. package/dist/metadata/builder_configuration.js.map +0 -1
  672. package/dist/metadata/captured_image_properties.d.ts.map +0 -1
  673. package/dist/metadata/captured_image_properties.js.map +0 -1
  674. package/dist/metadata/device_orientation_collector.d.ts.map +0 -1
  675. package/dist/metadata/device_orientation_collector.js.map +0 -1
  676. package/dist/metadata/document_image_origin.d.ts.map +0 -1
  677. package/dist/metadata/document_image_origin.js.map +0 -1
  678. package/dist/metadata/geolocation.d.ts.map +0 -1
  679. package/dist/metadata/geolocation.js.map +0 -1
  680. package/dist/metadata/metadata_configuration_mappers.d.ts.map +0 -1
  681. package/dist/metadata/metadata_configuration_mappers.js.map +0 -1
  682. package/dist/metadata/model_configuration.d.ts.map +0 -1
  683. package/dist/metadata/model_configuration.js.map +0 -1
  684. package/dist/metadata/optional_native_modules.d.ts.map +0 -1
  685. package/dist/metadata/optional_native_modules.js.map +0 -1
  686. package/dist/metadata/use_smile_id_metadata.d.ts.map +0 -1
  687. package/dist/metadata/use_smile_id_metadata.js.map +0 -1
  688. package/dist/metadata/use_smile_id_metadata_factory.d.ts.map +0 -1
  689. package/dist/metadata/use_smile_id_metadata_factory.js.map +0 -1
  690. package/dist/presentation/assets/svg/document_shimmer_strings.d.ts.map +0 -1
  691. package/dist/presentation/assets/svg/document_shimmer_strings.js.map +0 -1
  692. package/dist/presentation/assets/svg/instruction_svg_strings.d.ts.map +0 -1
  693. package/dist/presentation/assets/svg/instruction_svg_strings.js.map +0 -1
  694. package/dist/presentation/assets/svg/svg_strings.d.ts.map +0 -1
  695. package/dist/presentation/assets/svg/svg_strings.js.map +0 -1
  696. package/dist/presentation/components/face_oval_defaults.d.ts.map +0 -1
  697. package/dist/presentation/components/face_oval_defaults.js.map +0 -1
  698. package/dist/presentation/components/helpers/animated_lottie_view.d.ts.map +0 -1
  699. package/dist/presentation/components/helpers/animated_lottie_view.js.map +0 -1
  700. package/dist/presentation/components/helpers/capture_instruction_animation_spec.d.ts.map +0 -1
  701. package/dist/presentation/components/helpers/capture_instruction_animation_spec.js.map +0 -1
  702. package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.d.ts.map +0 -1
  703. package/dist/presentation/components/helpers/enhanced_smart_selfie_animation_frames.js.map +0 -1
  704. package/dist/presentation/components/helpers/scaled_oval_geometry.d.ts.map +0 -1
  705. package/dist/presentation/components/helpers/scaled_oval_geometry.js.map +0 -1
  706. package/dist/presentation/components/icons/index.d.ts.map +0 -1
  707. package/dist/presentation/components/icons/index.js.map +0 -1
  708. package/dist/presentation/components/status_indicator_state.d.ts.map +0 -1
  709. package/dist/presentation/components/status_indicator_state.js.map +0 -1
  710. package/dist/presentation/components/use_smile_id_attribution.d.ts.map +0 -1
  711. package/dist/presentation/components/use_smile_id_attribution.js.map +0 -1
  712. package/dist/presentation/components/use_smile_id_back_button.d.ts.map +0 -1
  713. package/dist/presentation/components/use_smile_id_back_button.js.map +0 -1
  714. package/dist/presentation/components/use_smile_id_button.d.ts.map +0 -1
  715. package/dist/presentation/components/use_smile_id_button.js.map +0 -1
  716. package/dist/presentation/components/use_smile_id_capture_content.d.ts.map +0 -1
  717. package/dist/presentation/components/use_smile_id_capture_content.js.map +0 -1
  718. package/dist/presentation/components/use_smile_id_capture_instruction_animation.d.ts.map +0 -1
  719. package/dist/presentation/components/use_smile_id_capture_instruction_animation.js.map +0 -1
  720. package/dist/presentation/components/use_smile_id_capture_spinner.d.ts.map +0 -1
  721. package/dist/presentation/components/use_smile_id_capture_spinner.js.map +0 -1
  722. package/dist/presentation/components/use_smile_id_captured_document_image.d.ts.map +0 -1
  723. package/dist/presentation/components/use_smile_id_captured_document_image.js.map +0 -1
  724. package/dist/presentation/components/use_smile_id_captured_image_oval.d.ts.map +0 -1
  725. package/dist/presentation/components/use_smile_id_captured_image_oval.js.map +0 -1
  726. package/dist/presentation/components/use_smile_id_card_surface.d.ts.map +0 -1
  727. package/dist/presentation/components/use_smile_id_card_surface.js.map +0 -1
  728. package/dist/presentation/components/use_smile_id_confirmation_buttons.d.ts.map +0 -1
  729. package/dist/presentation/components/use_smile_id_confirmation_buttons.js.map +0 -1
  730. package/dist/presentation/components/use_smile_id_consent_row.d.ts.map +0 -1
  731. package/dist/presentation/components/use_smile_id_consent_row.js.map +0 -1
  732. package/dist/presentation/components/use_smile_id_content_card.d.ts.map +0 -1
  733. package/dist/presentation/components/use_smile_id_content_card.js.map +0 -1
  734. package/dist/presentation/components/use_smile_id_document_capture_controls.d.ts.map +0 -1
  735. package/dist/presentation/components/use_smile_id_document_capture_controls.js.map +0 -1
  736. package/dist/presentation/components/use_smile_id_document_overlay.d.ts.map +0 -1
  737. package/dist/presentation/components/use_smile_id_document_overlay.js.map +0 -1
  738. package/dist/presentation/components/use_smile_id_document_shimmer.d.ts.map +0 -1
  739. package/dist/presentation/components/use_smile_id_document_shimmer.js.map +0 -1
  740. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.d.ts.map +0 -1
  741. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_clip.js.map +0 -1
  742. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.d.ts.map +0 -1
  743. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.js.map +0 -1
  744. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.d.ts.map +0 -1
  745. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.js.map +0 -1
  746. package/dist/presentation/components/use_smile_id_expandable_icon.d.ts.map +0 -1
  747. package/dist/presentation/components/use_smile_id_expandable_icon.js.map +0 -1
  748. package/dist/presentation/components/use_smile_id_face_oval_image.d.ts.map +0 -1
  749. package/dist/presentation/components/use_smile_id_face_oval_image.js.map +0 -1
  750. package/dist/presentation/components/use_smile_id_face_overlay.d.ts.map +0 -1
  751. package/dist/presentation/components/use_smile_id_face_overlay.js.map +0 -1
  752. package/dist/presentation/components/use_smile_id_failed_content.d.ts.map +0 -1
  753. package/dist/presentation/components/use_smile_id_failed_content.js.map +0 -1
  754. package/dist/presentation/components/use_smile_id_guideline_thumbnail.d.ts.map +0 -1
  755. package/dist/presentation/components/use_smile_id_guideline_thumbnail.js.map +0 -1
  756. package/dist/presentation/components/use_smile_id_instructions_hero.d.ts.map +0 -1
  757. package/dist/presentation/components/use_smile_id_instructions_hero.js.map +0 -1
  758. package/dist/presentation/components/use_smile_id_learn_more_content.d.ts.map +0 -1
  759. package/dist/presentation/components/use_smile_id_learn_more_content.js.map +0 -1
  760. package/dist/presentation/components/use_smile_id_loading_content.d.ts.map +0 -1
  761. package/dist/presentation/components/use_smile_id_loading_content.js.map +0 -1
  762. package/dist/presentation/components/use_smile_id_loading_indicator.d.ts.map +0 -1
  763. package/dist/presentation/components/use_smile_id_loading_indicator.js.map +0 -1
  764. package/dist/presentation/components/use_smile_id_oval_border_palette.d.ts.map +0 -1
  765. package/dist/presentation/components/use_smile_id_oval_border_palette.js.map +0 -1
  766. package/dist/presentation/components/use_smile_id_partner_icon.d.ts.map +0 -1
  767. package/dist/presentation/components/use_smile_id_partner_icon.js.map +0 -1
  768. package/dist/presentation/components/use_smile_id_processing_center_indicator.d.ts.map +0 -1
  769. package/dist/presentation/components/use_smile_id_processing_center_indicator.js.map +0 -1
  770. package/dist/presentation/components/use_smile_id_rounded_checkbox.d.ts.map +0 -1
  771. package/dist/presentation/components/use_smile_id_rounded_checkbox.js.map +0 -1
  772. package/dist/presentation/components/use_smile_id_status_indicator.d.ts.map +0 -1
  773. package/dist/presentation/components/use_smile_id_status_indicator.js.map +0 -1
  774. package/dist/presentation/components/use_smile_id_success_content.d.ts.map +0 -1
  775. package/dist/presentation/components/use_smile_id_success_content.js.map +0 -1
  776. package/dist/presentation/flow/analytics/use_smile_id_analytics_event.d.ts.map +0 -1
  777. package/dist/presentation/flow/analytics/use_smile_id_analytics_event.js.map +0 -1
  778. package/dist/presentation/flow/config/flow_configuration.d.ts.map +0 -1
  779. package/dist/presentation/flow/config/flow_configuration.js.map +0 -1
  780. package/dist/presentation/flow/dsl/builder/config_builder.d.ts.map +0 -1
  781. package/dist/presentation/flow/dsl/builder/config_builder.js.map +0 -1
  782. package/dist/presentation/flow/dsl/builder/ml_builder.d.ts.map +0 -1
  783. package/dist/presentation/flow/dsl/builder/ml_builder.js.map +0 -1
  784. package/dist/presentation/flow/dsl/builder/screens_builder.d.ts.map +0 -1
  785. package/dist/presentation/flow/dsl/builder/screens_builder.js.map +0 -1
  786. package/dist/presentation/flow/dsl/builder/theme_builder.d.ts.map +0 -1
  787. package/dist/presentation/flow/dsl/builder/theme_builder.js.map +0 -1
  788. package/dist/presentation/flow/dsl/flow_build_result.d.ts.map +0 -1
  789. package/dist/presentation/flow/dsl/flow_build_result.js.map +0 -1
  790. package/dist/presentation/flow/dsl/use_smile_id_builder.d.ts.map +0 -1
  791. package/dist/presentation/flow/dsl/use_smile_id_builder.js.map +0 -1
  792. package/dist/presentation/flow/dsl/use_smile_id_flow_builder.d.ts.map +0 -1
  793. package/dist/presentation/flow/dsl/use_smile_id_flow_builder.js.map +0 -1
  794. package/dist/presentation/flow/flow_navigation_context.d.ts.map +0 -1
  795. package/dist/presentation/flow/flow_navigation_context.js.map +0 -1
  796. package/dist/presentation/flow/flow_navigation_manager.d.ts.map +0 -1
  797. package/dist/presentation/flow/flow_navigation_manager.js.map +0 -1
  798. package/dist/presentation/flow/graph/screen_renderer.d.ts.map +0 -1
  799. package/dist/presentation/flow/graph/screen_renderer.js.map +0 -1
  800. package/dist/presentation/flow/job_submission_state.d.ts.map +0 -1
  801. package/dist/presentation/flow/job_submission_state.js.map +0 -1
  802. package/dist/presentation/flow/model/instruction_guideline.d.ts.map +0 -1
  803. package/dist/presentation/flow/model/instruction_guideline.js.map +0 -1
  804. package/dist/presentation/flow/model/instructions_defaults.d.ts.map +0 -1
  805. package/dist/presentation/flow/model/instructions_defaults.js.map +0 -1
  806. package/dist/presentation/flow/screen/helpers/face_session_config.d.ts.map +0 -1
  807. package/dist/presentation/flow/screen/helpers/face_session_config.js.map +0 -1
  808. package/dist/presentation/flow/screen/orchestrated_capture_screen.d.ts.map +0 -1
  809. package/dist/presentation/flow/screen/orchestrated_capture_screen.js.map +0 -1
  810. package/dist/presentation/flow/screen/orchestrated_consent_screen.d.ts.map +0 -1
  811. package/dist/presentation/flow/screen/orchestrated_consent_screen.js.map +0 -1
  812. package/dist/presentation/flow/screen/orchestrated_instructions_screen.d.ts.map +0 -1
  813. package/dist/presentation/flow/screen/orchestrated_instructions_screen.js.map +0 -1
  814. package/dist/presentation/flow/screen/orchestrated_preview_screen.d.ts.map +0 -1
  815. package/dist/presentation/flow/screen/orchestrated_preview_screen.js.map +0 -1
  816. package/dist/presentation/flow/screen/orchestrated_processing_screen.d.ts.map +0 -1
  817. package/dist/presentation/flow/screen/orchestrated_processing_screen.js.map +0 -1
  818. package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.d.ts.map +0 -1
  819. package/dist/presentation/flow/screen/use_smile_id_orchestrated_screen_host.js.map +0 -1
  820. package/dist/presentation/flow/screen/validation_error_screen.d.ts.map +0 -1
  821. package/dist/presentation/flow/screen/validation_error_screen.js.map +0 -1
  822. package/dist/presentation/flow/use_smile_id_flow.d.ts.map +0 -1
  823. package/dist/presentation/flow/use_smile_id_flow.js.map +0 -1
  824. package/dist/presentation/flow/validation/flow_validator.d.ts.map +0 -1
  825. package/dist/presentation/flow/validation/flow_validator.js.map +0 -1
  826. package/dist/presentation/flow/validation/job_type_validator.d.ts.map +0 -1
  827. package/dist/presentation/flow/validation/job_type_validator.js.map +0 -1
  828. package/dist/presentation/flow/validation/user_details_validator.d.ts.map +0 -1
  829. package/dist/presentation/flow/validation/user_details_validator.js.map +0 -1
  830. package/dist/presentation/flow/validation/validation_state.d.ts.map +0 -1
  831. package/dist/presentation/flow/validation/validation_state.js.map +0 -1
  832. package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts.map +0 -1
  833. package/dist/presentation/screen/helpers/capture_screen_helpers.js.map +0 -1
  834. package/dist/presentation/screen/helpers/capture_ui_state.d.ts.map +0 -1
  835. package/dist/presentation/screen/helpers/capture_ui_state.js.map +0 -1
  836. package/dist/presentation/screen/helpers/consent_screen_helpers.d.ts.map +0 -1
  837. package/dist/presentation/screen/helpers/consent_screen_helpers.js.map +0 -1
  838. package/dist/presentation/screen/helpers/ess_turn_haptics.d.ts.map +0 -1
  839. package/dist/presentation/screen/helpers/ess_turn_haptics.js.map +0 -1
  840. package/dist/presentation/screen/helpers/feedback_debouncer.d.ts.map +0 -1
  841. package/dist/presentation/screen/helpers/feedback_debouncer.js.map +0 -1
  842. package/dist/presentation/screen/helpers/instructions_screen_helpers.d.ts.map +0 -1
  843. package/dist/presentation/screen/helpers/instructions_screen_helpers.js.map +0 -1
  844. package/dist/presentation/screen/helpers/preview_screen_helpers.d.ts.map +0 -1
  845. package/dist/presentation/screen/helpers/preview_screen_helpers.js.map +0 -1
  846. package/dist/presentation/screen/helpers/processing_screen_helpers.d.ts.map +0 -1
  847. package/dist/presentation/screen/helpers/processing_screen_helpers.js.map +0 -1
  848. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.d.ts.map +0 -1
  849. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js.map +0 -1
  850. package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts.map +0 -1
  851. package/dist/presentation/screen/helpers/use_capture_orientation_lock.js.map +0 -1
  852. package/dist/presentation/screen/helpers/use_debounced_feedback_key.d.ts.map +0 -1
  853. package/dist/presentation/screen/helpers/use_debounced_feedback_key.js.map +0 -1
  854. package/dist/presentation/screen/use_smile_id_capture_screen.d.ts.map +0 -1
  855. package/dist/presentation/screen/use_smile_id_capture_screen.js.map +0 -1
  856. package/dist/presentation/screen/use_smile_id_consent_screen.d.ts.map +0 -1
  857. package/dist/presentation/screen/use_smile_id_consent_screen.js.map +0 -1
  858. package/dist/presentation/screen/use_smile_id_document_back_instructions.d.ts.map +0 -1
  859. package/dist/presentation/screen/use_smile_id_document_back_instructions.js.map +0 -1
  860. package/dist/presentation/screen/use_smile_id_document_preview_screen.d.ts.map +0 -1
  861. package/dist/presentation/screen/use_smile_id_document_preview_screen.js.map +0 -1
  862. package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts.map +0 -1
  863. package/dist/presentation/screen/use_smile_id_instructions_screen.js.map +0 -1
  864. package/dist/presentation/screen/use_smile_id_permission_screen.d.ts.map +0 -1
  865. package/dist/presentation/screen/use_smile_id_permission_screen.js.map +0 -1
  866. package/dist/presentation/screen/use_smile_id_preview_screen.d.ts.map +0 -1
  867. package/dist/presentation/screen/use_smile_id_preview_screen.js.map +0 -1
  868. package/dist/presentation/screen/use_smile_id_processing_screen.d.ts.map +0 -1
  869. package/dist/presentation/screen/use_smile_id_processing_screen.js.map +0 -1
  870. package/dist/presentation/state/processing_state.d.ts.map +0 -1
  871. package/dist/presentation/state/processing_state.js.map +0 -1
  872. package/dist/presentation/state/use_smile_id_overlay_state.d.ts.map +0 -1
  873. package/dist/presentation/state/use_smile_id_overlay_state.js.map +0 -1
  874. package/dist/presentation/theme/theme.d.ts.map +0 -1
  875. package/dist/presentation/theme/theme.js.map +0 -1
  876. package/dist/presentation/theme/theme_context.d.ts.map +0 -1
  877. package/dist/presentation/theme/theme_context.js.map +0 -1
  878. package/dist/presentation/theme/use_smile_id_motion.d.ts.map +0 -1
  879. package/dist/presentation/theme/use_smile_id_motion.js.map +0 -1
  880. package/dist/presentation/theme/use_use_smile_id_fonts.d.ts.map +0 -1
  881. package/dist/presentation/theme/use_use_smile_id_fonts.js.map +0 -1
  882. package/dist/presentation/utils/force_max_brightness.d.ts.map +0 -1
  883. package/dist/presentation/utils/force_max_brightness.js.map +0 -1
  884. package/dist/presentation/utils/locale_utils.d.ts.map +0 -1
  885. package/dist/presentation/utils/locale_utils.js.map +0 -1
  886. package/dist/presentation/utils/use_reduced_motion.d.ts.map +0 -1
  887. package/dist/presentation/utils/use_reduced_motion.js.map +0 -1
  888. package/dist/testing/fake_face_analyzer.d.ts.map +0 -1
  889. package/dist/testing/fake_face_analyzer.js.map +0 -1
  890. package/dist/testing/index.d.ts.map +0 -1
  891. package/dist/testing/index.js.map +0 -1
  892. package/dist/testing/scenario_expectations.d.ts.map +0 -1
  893. package/dist/testing/scenario_expectations.js.map +0 -1
  894. package/dist/testing/scenario_loader.d.ts.map +0 -1
  895. package/dist/testing/scenario_loader.js.map +0 -1
  896. package/dist/testing/scripted_scan_results.d.ts.map +0 -1
  897. package/dist/testing/scripted_scan_results.js.map +0 -1
  898. package/src/__tests__/dsl.test.ts +0 -1165
  899. package/src/__tests__/enum_parity.test.ts +0 -84
  900. package/src/__tests__/react_native_mock.tsx +0 -240
  901. package/src/__tests__/setup_react_native.ts +0 -368
  902. package/src/__tests__/snapshots/__snapshots__/screens_structural.test.tsx.snap +0 -5267
  903. package/src/__tests__/snapshots/screens_structural.test.tsx +0 -230
  904. package/src/__tests__/theme.test.ts +0 -156
  905. package/src/camera/__tests__/camera_defaults.test.ts +0 -28
  906. package/src/camera/__tests__/camera_lens.test.ts +0 -18
  907. package/src/camera/__tests__/camera_permissions.test.ts +0 -72
  908. package/src/camera/__tests__/camera_system_focus.test.ts +0 -173
  909. package/src/camera/__tests__/document_resize_target.test.ts +0 -44
  910. package/src/camera/__tests__/focus_state.test.ts +0 -48
  911. package/src/camera/__tests__/orientation_degrees.test.ts +0 -21
  912. package/src/camera/__tests__/use_smile_id_camera_preview.test.tsx +0 -461
  913. package/src/camera/__tests__/use_smile_id_camera_system.test.ts +0 -103
  914. package/src/camera/__tests__/use_smile_id_frame_stream.test.ts +0 -227
  915. package/src/camera/__tests__/use_smile_id_frame_stream_hook.test.tsx +0 -229
  916. package/src/camera/camera_configuration.ts +0 -32
  917. package/src/camera/camera_defaults.ts +0 -28
  918. package/src/camera/camera_lens.ts +0 -13
  919. package/src/camera/camera_permissions.ts +0 -36
  920. package/src/camera/camera_preview_image.ts +0 -19
  921. package/src/camera/document_image_pipeline.ts +0 -101
  922. package/src/camera/document_resize_target.ts +0 -22
  923. package/src/camera/focus_state.ts +0 -26
  924. package/src/camera/orientation_degrees.ts +0 -21
  925. package/src/camera/use_smile_id_camera_preview.tsx +0 -256
  926. package/src/camera/use_smile_id_camera_system.ts +0 -236
  927. package/src/camera/use_smile_id_frame_stream.ts +0 -189
  928. package/src/core/exception/__tests__/builder_validation_exceptions.test.ts +0 -81
  929. package/src/core/exception/__tests__/network_exception_mapper.test.ts +0 -179
  930. package/src/core/exception/agent_mode_with_enhanced_liveness_exception.ts +0 -20
  931. package/src/core/exception/builder_validation_exception.ts +0 -40
  932. package/src/core/exception/capture_validation_exceptions.ts +0 -9
  933. package/src/core/exception/consent_validation_exceptions.ts +0 -7
  934. package/src/core/exception/duplicate_screen_type_exception.ts +0 -22
  935. package/src/core/exception/empty_screens_block_exception.ts +0 -19
  936. package/src/core/exception/flow_exceptions.test.ts +0 -49
  937. package/src/core/exception/flow_exceptions.ts +0 -43
  938. package/src/core/exception/index.ts +0 -74
  939. package/src/core/exception/invalid_consent_config_exception.ts +0 -20
  940. package/src/core/exception/invalid_consent_information_exception.ts +0 -21
  941. package/src/core/exception/invalid_document_capture_config_exception.ts +0 -22
  942. package/src/core/exception/invalid_field_value_exception.ts +0 -21
  943. package/src/core/exception/invalid_job_type_screen_config_exception.ts +0 -70
  944. package/src/core/exception/invalid_missing_capture_type_exception.ts +0 -19
  945. package/src/core/exception/invalid_screen_order_exception.ts +0 -28
  946. package/src/core/exception/invalid_selfie_capture_config_exception.ts +0 -22
  947. package/src/core/exception/issue_severity.ts +0 -14
  948. package/src/core/exception/job_validation_exceptions.ts +0 -11
  949. package/src/core/exception/liveness_frame_count_exception.ts +0 -21
  950. package/src/core/exception/missing_capture_for_preview_exception.ts +0 -24
  951. package/src/core/exception/missing_job_type_exception.ts +0 -18
  952. package/src/core/exception/missing_ml_configuration_block_exception.ts +0 -21
  953. package/src/core/exception/missing_network_configuration_block_exception.ts +0 -22
  954. package/src/core/exception/missing_partner_config_exception.ts +0 -38
  955. package/src/core/exception/missing_required_field_exception.ts +0 -19
  956. package/src/core/exception/screen_config_validation_exceptions.ts +0 -10
  957. package/src/core/exception/use_smile_id_attestation_exception.ts +0 -11
  958. package/src/core/exception/use_smile_id_builder_exception.ts +0 -18
  959. package/src/core/exception/use_smile_id_camera_exception.ts +0 -12
  960. package/src/core/exception/use_smile_id_error_code.ts +0 -84
  961. package/src/core/exception/use_smile_id_exception.ts +0 -52
  962. package/src/core/exception/use_smile_id_general_exception.ts +0 -12
  963. package/src/core/exception/use_smile_id_network_exception.ts +0 -279
  964. package/src/core/exception/use_smile_id_validation_exception.ts +0 -12
  965. package/src/core/models/__tests__/document_capture_mode.test.ts +0 -43
  966. package/src/core/models/__tests__/document_type.test.ts +0 -66
  967. package/src/core/models/__tests__/flow_models.test.ts +0 -26
  968. package/src/core/models/__tests__/job_type.test.ts +0 -48
  969. package/src/core/models/config.ts +0 -58
  970. package/src/core/models/document_capture_mode.ts +0 -73
  971. package/src/core/models/document_type.ts +0 -79
  972. package/src/core/models/flow_step.ts +0 -17
  973. package/src/core/models/global_privacy_control.ts +0 -45
  974. package/src/core/models/head_turn_direction.ts +0 -15
  975. package/src/core/models/job_type.ts +0 -53
  976. package/src/core/models/ml_config.ts +0 -47
  977. package/src/core/models/network_config.ts +0 -138
  978. package/src/core/models/params.ts +0 -98
  979. package/src/core/models/result.test.ts +0 -20
  980. package/src/core/models/result.ts +0 -33
  981. package/src/data/api/__tests__/smile_id_api.test.ts +0 -1471
  982. package/src/data/api/auth/token_holder.ts +0 -72
  983. package/src/data/api/interceptors/__tests__/credential_header_redaction.test.ts +0 -144
  984. package/src/data/api/interceptors/__tests__/gzip_interceptor.test.ts +0 -83
  985. package/src/data/api/interceptors/__tests__/logging_interceptor.test.ts +0 -252
  986. package/src/data/api/interceptors/__tests__/sensitive_headers.test.ts +0 -29
  987. package/src/data/api/interceptors/__tests__/smile_integrity_interceptor.test.ts +0 -192
  988. package/src/data/api/interceptors/__tests__/smile_request_mac_interceptor.test.ts +0 -156
  989. package/src/data/api/interceptors/__tests__/token_refresh_interceptor.test.ts +0 -173
  990. package/src/data/api/interceptors/gzip_interceptor.ts +0 -31
  991. package/src/data/api/interceptors/logging_interceptor.ts +0 -155
  992. package/src/data/api/interceptors/sensitive_headers.ts +0 -46
  993. package/src/data/api/interceptors/smile_auth_interceptor.ts +0 -73
  994. package/src/data/api/interceptors/smile_integrity_interceptor.ts +0 -99
  995. package/src/data/api/interceptors/smile_request_mac_interceptor.ts +0 -106
  996. package/src/data/api/interceptors/token_refresh_interceptor.ts +0 -122
  997. package/src/data/api/smile_id_api.ts +0 -475
  998. package/src/data/compression/__tests__/payload_compressor.test.ts +0 -200
  999. package/src/data/compression/__tests__/payload_compressor_real_jpeg.test.ts +0 -226
  1000. package/src/data/compression/compressible_asset.ts +0 -62
  1001. package/src/data/compression/payload_compression_config.ts +0 -53
  1002. package/src/data/compression/payload_compression_runner.ts +0 -102
  1003. package/src/data/compression/payload_compressor.ts +0 -164
  1004. package/src/data/compression/uri_compressible_asset.ts +0 -85
  1005. package/src/data/dsl/__tests__/use_smile_id_network_builder.test.ts +0 -157
  1006. package/src/data/dsl/builder/__tests__/config_builders.test.ts +0 -62
  1007. package/src/data/dsl/builder/__tests__/interceptor_config_builder.test.ts +0 -173
  1008. package/src/data/dsl/builder/cache_config_builder.ts +0 -28
  1009. package/src/data/dsl/builder/config_builder.ts +0 -156
  1010. package/src/data/dsl/builder/interceptor_config_builder.ts +0 -83
  1011. package/src/data/dsl/builder/retry_config_builder.ts +0 -57
  1012. package/src/data/dsl/builder/timeout_config_builder.ts +0 -31
  1013. package/src/data/dsl/use_smile_id_network_builder.ts +0 -86
  1014. package/src/data/factory/__tests__/networking_factory_order.test.ts +0 -201
  1015. package/src/data/factory/__tests__/retry_gzip_mac_composition.test.ts +0 -163
  1016. package/src/data/factory/__tests__/signed_job_submission_headers.test.ts +0 -110
  1017. package/src/data/factory/networking_factory.ts +0 -201
  1018. package/src/data/model/__tests__/sdk_config.test.ts +0 -85
  1019. package/src/data/model/__tests__/sdk_config_capture.test.ts +0 -140
  1020. package/src/data/model/__tests__/token_payload.test.ts +0 -224
  1021. package/src/data/model/__tests__/user_details_payload.test.ts +0 -100
  1022. package/src/data/model/image_dimensions.ts +0 -15
  1023. package/src/data/model/job_request.ts +0 -165
  1024. package/src/data/model/job_submission_response.ts +0 -17
  1025. package/src/data/model/sdk_config.ts +0 -74
  1026. package/src/data/model/sdk_config_capture.ts +0 -78
  1027. package/src/data/model/sdk_config_source.ts +0 -26
  1028. package/src/data/model/token_payload.ts +0 -182
  1029. package/src/data/model/user_details_payload.ts +0 -84
  1030. package/src/data/repository/__tests__/network_retries.test.ts +0 -117
  1031. package/src/data/repository/__tests__/repository_dispatch.test.ts +0 -366
  1032. package/src/data/repository/__tests__/use_smile_id_repository.test.ts +0 -118
  1033. package/src/data/repository/use_smile_id_repository.ts +0 -19
  1034. package/src/data/repository/use_smile_id_repository_impl.ts +0 -181
  1035. package/src/data/security/__tests__/request_canonicalizer.test.ts +0 -132
  1036. package/src/data/security/__tests__/security_policy.test.ts +0 -96
  1037. package/src/data/security/__tests__/signing_crypto.test.ts +0 -203
  1038. package/src/data/security/__tests__/smile_id_crypto_manager.test.ts +0 -176
  1039. package/src/data/security/request_canonicalizer.ts +0 -161
  1040. package/src/data/security/request_timestamp.ts +0 -12
  1041. package/src/data/security/security_policy.ts +0 -70
  1042. package/src/data/security/signing_crypto.ts +0 -219
  1043. package/src/data/security/smile_id_crypto_error.ts +0 -13
  1044. package/src/data/security/smile_id_crypto_manager.ts +0 -46
  1045. package/src/data/smile_id_urls.ts +0 -13
  1046. package/src/data/util/__tests__/retry_util.test.ts +0 -182
  1047. package/src/data/util/__tests__/use_smile_id_token_decoder.test.ts +0 -430
  1048. package/src/data/util/retry_util.ts +0 -81
  1049. package/src/data/util/use_smile_id_token_decoder.ts +0 -207
  1050. package/src/index.ts +0 -514
  1051. package/src/l10n/__tests__/use_smile_id_localizations.test.ts +0 -244
  1052. package/src/l10n/__tests__/use_smile_id_localizations_provider.test.tsx +0 -112
  1053. package/src/l10n/__tests__/use_smile_id_localizations_surface.test.ts +0 -231
  1054. package/src/l10n/strings_en.ts +0 -176
  1055. package/src/l10n/use_smile_id_localizations.ts +0 -768
  1056. package/src/l10n/use_smile_id_localizations_provider.tsx +0 -71
  1057. package/src/metadata/__tests__/device_orientation_collector.test.ts +0 -15
  1058. package/src/metadata/__tests__/device_orientation_sampling.test.ts +0 -165
  1059. package/src/metadata/__tests__/geolocation.test.ts +0 -150
  1060. package/src/metadata/__tests__/metadata_configuration_mappers.test.ts +0 -254
  1061. package/src/metadata/__tests__/metadata_configuration_objects.test.ts +0 -86
  1062. package/src/metadata/__tests__/metadata_device_context.test.ts +0 -147
  1063. package/src/metadata/__tests__/metadata_device_os_android.test.ts +0 -18
  1064. package/src/metadata/__tests__/metadata_golden_fixture.json +0 -13
  1065. package/src/metadata/__tests__/metadata_payload_golden.test.ts +0 -193
  1066. package/src/metadata/__tests__/optional_native_modules.test.ts +0 -234
  1067. package/src/metadata/__tests__/use_smile_id_metadata.test.ts +0 -430
  1068. package/src/metadata/__tests__/use_smile_id_metadata_factory.test.ts +0 -615
  1069. package/src/metadata/builder_configuration.ts +0 -69
  1070. package/src/metadata/captured_image_properties.ts +0 -10
  1071. package/src/metadata/device_orientation_collector.ts +0 -75
  1072. package/src/metadata/document_image_origin.ts +0 -22
  1073. package/src/metadata/geolocation.ts +0 -46
  1074. package/src/metadata/metadata_configuration_mappers.ts +0 -248
  1075. package/src/metadata/model_configuration.ts +0 -68
  1076. package/src/metadata/optional_native_modules.ts +0 -274
  1077. package/src/metadata/use_smile_id_metadata.ts +0 -305
  1078. package/src/metadata/use_smile_id_metadata_factory.ts +0 -580
  1079. package/src/presentation/assets/si_document_green_book_hero_animation.json +0 -1
  1080. package/src/presentation/assets/si_document_hero_animation.json +0 -1
  1081. package/src/presentation/assets/si_document_hero_back_animation.json +0 -1
  1082. package/src/presentation/assets/si_document_passport_hero_animation.json +0 -1
  1083. package/src/presentation/assets/si_ess_all_directions_hero_animation.json +0 -1
  1084. package/src/presentation/assets/si_ess_animation_all_directions.json +0 -1
  1085. package/src/presentation/assets/si_selfie_hero_animation.json +0 -1
  1086. package/src/presentation/assets/si_smile_to_capture_animation.json +0 -1
  1087. package/src/presentation/assets/svg/document_shimmer_strings.ts +0 -17
  1088. package/src/presentation/assets/svg/instruction_svg_strings.ts +0 -54
  1089. package/src/presentation/assets/svg/svg_strings.ts +0 -158
  1090. package/src/presentation/components/__tests__/capture_instruction_animation_spec.test.ts +0 -49
  1091. package/src/presentation/components/__tests__/enhanced_smart_selfie_animation_frames.test.ts +0 -89
  1092. package/src/presentation/components/__tests__/use_smile_id_capture_content.test.tsx +0 -348
  1093. package/src/presentation/components/__tests__/use_smile_id_confirmation_buttons.test.tsx +0 -131
  1094. package/src/presentation/components/__tests__/use_smile_id_content_card.test.tsx +0 -112
  1095. package/src/presentation/components/__tests__/use_smile_id_enhanced_smart_selfie_clip.test.tsx +0 -256
  1096. package/src/presentation/components/__tests__/use_smile_id_enhanced_smart_selfie_direction_animation.test.tsx +0 -138
  1097. package/src/presentation/components/__tests__/use_smile_id_face_oval_image.test.tsx +0 -190
  1098. package/src/presentation/components/__tests__/use_smile_id_face_overlay.test.tsx +0 -211
  1099. package/src/presentation/components/__tests__/use_smile_id_guideline_thumbnail.test.tsx +0 -112
  1100. package/src/presentation/components/__tests__/use_smile_id_instructions_hero.test.tsx +0 -150
  1101. package/src/presentation/components/__tests__/use_smile_id_learn_more_content.test.tsx +0 -159
  1102. package/src/presentation/components/__tests__/use_smile_id_loading_indicator.test.tsx +0 -45
  1103. package/src/presentation/components/__tests__/use_smile_id_oval_border_palette.test.ts +0 -103
  1104. package/src/presentation/components/__tests__/use_smile_id_processing_center_indicator.test.tsx +0 -88
  1105. package/src/presentation/components/face_oval_defaults.ts +0 -51
  1106. package/src/presentation/components/helpers/__tests__/scaled_oval_geometry.test.ts +0 -69
  1107. package/src/presentation/components/helpers/animated_lottie_view.ts +0 -9
  1108. package/src/presentation/components/helpers/capture_instruction_animation_spec.ts +0 -77
  1109. package/src/presentation/components/helpers/enhanced_smart_selfie_animation_frames.ts +0 -64
  1110. package/src/presentation/components/helpers/scaled_oval_geometry.ts +0 -44
  1111. package/src/presentation/components/icons/index.tsx +0 -334
  1112. package/src/presentation/components/status_indicator_state.ts +0 -21
  1113. package/src/presentation/components/use_smile_id_attribution.tsx +0 -48
  1114. package/src/presentation/components/use_smile_id_back_button.tsx +0 -59
  1115. package/src/presentation/components/use_smile_id_button.tsx +0 -98
  1116. package/src/presentation/components/use_smile_id_capture_content.tsx +0 -368
  1117. package/src/presentation/components/use_smile_id_capture_instruction_animation.tsx +0 -84
  1118. package/src/presentation/components/use_smile_id_capture_spinner.tsx +0 -63
  1119. package/src/presentation/components/use_smile_id_captured_document_image.tsx +0 -81
  1120. package/src/presentation/components/use_smile_id_captured_image_oval.tsx +0 -151
  1121. package/src/presentation/components/use_smile_id_card_surface.tsx +0 -54
  1122. package/src/presentation/components/use_smile_id_confirmation_buttons.tsx +0 -123
  1123. package/src/presentation/components/use_smile_id_consent_row.tsx +0 -58
  1124. package/src/presentation/components/use_smile_id_content_card.tsx +0 -65
  1125. package/src/presentation/components/use_smile_id_document_capture_controls.tsx +0 -219
  1126. package/src/presentation/components/use_smile_id_document_overlay.tsx +0 -335
  1127. package/src/presentation/components/use_smile_id_document_shimmer.tsx +0 -51
  1128. package/src/presentation/components/use_smile_id_enhanced_smart_selfie_clip.tsx +0 -155
  1129. package/src/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.tsx +0 -46
  1130. package/src/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.tsx +0 -29
  1131. package/src/presentation/components/use_smile_id_expandable_icon.tsx +0 -102
  1132. package/src/presentation/components/use_smile_id_face_oval_image.tsx +0 -90
  1133. package/src/presentation/components/use_smile_id_face_overlay.tsx +0 -387
  1134. package/src/presentation/components/use_smile_id_failed_content.tsx +0 -94
  1135. package/src/presentation/components/use_smile_id_guideline_thumbnail.tsx +0 -263
  1136. package/src/presentation/components/use_smile_id_instructions_hero.tsx +0 -296
  1137. package/src/presentation/components/use_smile_id_learn_more_content.tsx +0 -115
  1138. package/src/presentation/components/use_smile_id_loading_content.tsx +0 -54
  1139. package/src/presentation/components/use_smile_id_loading_indicator.tsx +0 -81
  1140. package/src/presentation/components/use_smile_id_oval_border_palette.ts +0 -64
  1141. package/src/presentation/components/use_smile_id_partner_icon.tsx +0 -56
  1142. package/src/presentation/components/use_smile_id_processing_center_indicator.tsx +0 -77
  1143. package/src/presentation/components/use_smile_id_rounded_checkbox.tsx +0 -67
  1144. package/src/presentation/components/use_smile_id_status_indicator.tsx +0 -44
  1145. package/src/presentation/components/use_smile_id_success_content.tsx +0 -76
  1146. package/src/presentation/flow/__tests__/document_flow_navigation.test.ts +0 -484
  1147. package/src/presentation/flow/__tests__/flow_navigation_manager.test.ts +0 -1534
  1148. package/src/presentation/flow/__tests__/use_smile_id_flow.test.tsx +0 -651
  1149. package/src/presentation/flow/analytics/__tests__/use_smile_id_analytics_event.test.ts +0 -105
  1150. package/src/presentation/flow/analytics/use_smile_id_analytics_event.ts +0 -83
  1151. package/src/presentation/flow/config/flow_configuration.ts +0 -12
  1152. package/src/presentation/flow/dsl/__tests__/use_smile_id_builder_component.test.tsx +0 -120
  1153. package/src/presentation/flow/dsl/builder/__tests__/config_builder.test.ts +0 -25
  1154. package/src/presentation/flow/dsl/builder/__tests__/ml_builder.test.ts +0 -161
  1155. package/src/presentation/flow/dsl/builder/__tests__/theme_builder.test.ts +0 -102
  1156. package/src/presentation/flow/dsl/builder/config_builder.ts +0 -57
  1157. package/src/presentation/flow/dsl/builder/ml_builder.ts +0 -210
  1158. package/src/presentation/flow/dsl/builder/screens_builder.ts +0 -276
  1159. package/src/presentation/flow/dsl/builder/theme_builder.ts +0 -119
  1160. package/src/presentation/flow/dsl/flow_build_result.ts +0 -37
  1161. package/src/presentation/flow/dsl/use_smile_id_builder.tsx +0 -125
  1162. package/src/presentation/flow/dsl/use_smile_id_flow_builder.ts +0 -454
  1163. package/src/presentation/flow/flow_navigation_context.tsx +0 -50
  1164. package/src/presentation/flow/flow_navigation_manager.ts +0 -1166
  1165. package/src/presentation/flow/graph/__tests__/screen_renderer.test.tsx +0 -102
  1166. package/src/presentation/flow/graph/screen_renderer.tsx +0 -35
  1167. package/src/presentation/flow/job_submission_state.ts +0 -17
  1168. package/src/presentation/flow/model/instruction_guideline.ts +0 -21
  1169. package/src/presentation/flow/model/instructions_defaults.ts +0 -198
  1170. package/src/presentation/flow/screen/__tests__/orchestrated_capture_screen.test.tsx +0 -836
  1171. package/src/presentation/flow/screen/__tests__/orchestrated_consent_screen.test.tsx +0 -165
  1172. package/src/presentation/flow/screen/__tests__/orchestrated_instructions_screen.test.tsx +0 -163
  1173. package/src/presentation/flow/screen/__tests__/orchestrated_preview_screen.test.tsx +0 -224
  1174. package/src/presentation/flow/screen/__tests__/orchestrated_processing_screen.test.tsx +0 -338
  1175. package/src/presentation/flow/screen/helpers/__tests__/face_session_config.test.ts +0 -115
  1176. package/src/presentation/flow/screen/helpers/face_session_config.ts +0 -77
  1177. package/src/presentation/flow/screen/orchestrated_capture_screen.tsx +0 -344
  1178. package/src/presentation/flow/screen/orchestrated_consent_screen.tsx +0 -71
  1179. package/src/presentation/flow/screen/orchestrated_instructions_screen.tsx +0 -103
  1180. package/src/presentation/flow/screen/orchestrated_preview_screen.tsx +0 -62
  1181. package/src/presentation/flow/screen/orchestrated_processing_screen.tsx +0 -148
  1182. package/src/presentation/flow/screen/use_smile_id_orchestrated_screen_host.tsx +0 -39
  1183. package/src/presentation/flow/screen/validation_error_screen.tsx +0 -147
  1184. package/src/presentation/flow/use_smile_id_flow.tsx +0 -389
  1185. package/src/presentation/flow/validation/__tests__/flow_validator.test.ts +0 -616
  1186. package/src/presentation/flow/validation/__tests__/job_type_validator.test.ts +0 -968
  1187. package/src/presentation/flow/validation/flow_validator.ts +0 -461
  1188. package/src/presentation/flow/validation/job_type_validator.ts +0 -703
  1189. package/src/presentation/flow/validation/user_details_validator.ts +0 -53
  1190. package/src/presentation/flow/validation/validation_state.ts +0 -65
  1191. package/src/presentation/screen/__tests__/capture_screen_helpers.test.ts +0 -112
  1192. package/src/presentation/screen/__tests__/capture_ui_state.test.ts +0 -398
  1193. package/src/presentation/screen/__tests__/consent_screen_helpers.test.ts +0 -63
  1194. package/src/presentation/screen/__tests__/ess_turn_haptics.test.ts +0 -82
  1195. package/src/presentation/screen/__tests__/feedback_copy_table.test.ts +0 -145
  1196. package/src/presentation/screen/__tests__/feedback_debouncer.test.ts +0 -111
  1197. package/src/presentation/screen/__tests__/instructions_screen_helpers.test.ts +0 -154
  1198. package/src/presentation/screen/__tests__/preview_screen_helpers.test.ts +0 -53
  1199. package/src/presentation/screen/__tests__/processing_screen_helpers.test.ts +0 -39
  1200. package/src/presentation/screen/__tests__/scan_state_to_overlay_state.test.ts +0 -223
  1201. package/src/presentation/screen/__tests__/use_smile_id_capture_screen.test.tsx +0 -1128
  1202. package/src/presentation/screen/__tests__/use_smile_id_consent_screen.test.tsx +0 -288
  1203. package/src/presentation/screen/__tests__/use_smile_id_document_back_instructions.test.tsx +0 -138
  1204. package/src/presentation/screen/__tests__/use_smile_id_instructions_screen.test.tsx +0 -245
  1205. package/src/presentation/screen/__tests__/use_smile_id_permission_screen.test.tsx +0 -68
  1206. package/src/presentation/screen/__tests__/use_smile_id_preview_screen.test.tsx +0 -193
  1207. package/src/presentation/screen/__tests__/use_smile_id_processing_screen.test.tsx +0 -333
  1208. package/src/presentation/screen/helpers/__tests__/use_capture_orientation_lock.test.tsx +0 -212
  1209. package/src/presentation/screen/helpers/capture_screen_helpers.ts +0 -153
  1210. package/src/presentation/screen/helpers/capture_ui_state.ts +0 -298
  1211. package/src/presentation/screen/helpers/consent_screen_helpers.ts +0 -106
  1212. package/src/presentation/screen/helpers/ess_turn_haptics.ts +0 -67
  1213. package/src/presentation/screen/helpers/feedback_debouncer.ts +0 -89
  1214. package/src/presentation/screen/helpers/instructions_screen_helpers.ts +0 -113
  1215. package/src/presentation/screen/helpers/preview_screen_helpers.ts +0 -41
  1216. package/src/presentation/screen/helpers/processing_screen_helpers.ts +0 -27
  1217. package/src/presentation/screen/helpers/scan_state_to_overlay_state.ts +0 -131
  1218. package/src/presentation/screen/helpers/use_capture_orientation_lock.ts +0 -108
  1219. package/src/presentation/screen/helpers/use_debounced_feedback_key.ts +0 -52
  1220. package/src/presentation/screen/use_smile_id_capture_screen.tsx +0 -912
  1221. package/src/presentation/screen/use_smile_id_consent_screen.tsx +0 -393
  1222. package/src/presentation/screen/use_smile_id_document_back_instructions.tsx +0 -125
  1223. package/src/presentation/screen/use_smile_id_document_preview_screen.tsx +0 -152
  1224. package/src/presentation/screen/use_smile_id_instructions_screen.tsx +0 -198
  1225. package/src/presentation/screen/use_smile_id_permission_screen.tsx +0 -52
  1226. package/src/presentation/screen/use_smile_id_preview_screen.tsx +0 -127
  1227. package/src/presentation/screen/use_smile_id_processing_screen.tsx +0 -223
  1228. package/src/presentation/state/__tests__/use_smile_id_overlay_state.test.ts +0 -30
  1229. package/src/presentation/state/processing_state.ts +0 -19
  1230. package/src/presentation/state/use_smile_id_overlay_state.ts +0 -70
  1231. package/src/presentation/theme/__tests__/use_use_smile_id_fonts.test.tsx +0 -166
  1232. package/src/presentation/theme/theme.ts +0 -401
  1233. package/src/presentation/theme/theme_context.tsx +0 -45
  1234. package/src/presentation/theme/use_smile_id_motion.ts +0 -12
  1235. package/src/presentation/theme/use_use_smile_id_fonts.ts +0 -71
  1236. package/src/presentation/utils/__tests__/force_max_brightness.test.tsx +0 -237
  1237. package/src/presentation/utils/__tests__/locale_utils.test.ts +0 -78
  1238. package/src/presentation/utils/force_max_brightness.tsx +0 -113
  1239. package/src/presentation/utils/locale_utils.ts +0 -80
  1240. package/src/presentation/utils/use_reduced_motion.ts +0 -26
  1241. package/src/testing/__tests__/fake_face_analyzer.test.ts +0 -42
  1242. package/src/testing/__tests__/scenario_expectations.test.ts +0 -110
  1243. package/src/testing/__tests__/scenario_loader.test.ts +0 -64
  1244. package/src/testing/fake_face_analyzer.ts +0 -82
  1245. package/src/testing/index.ts +0 -15
  1246. package/src/testing/scenario_expectations.ts +0 -87
  1247. package/src/testing/scenario_loader.ts +0 -83
  1248. package/src/testing/scripted_scan_results.ts +0 -66
  1249. /package/{src → dist}/presentation/assets/fonts/DMSans-Bold.ttf +0 -0
  1250. /package/{src → dist}/presentation/assets/fonts/DMSans-ExtraBold.ttf +0 -0
  1251. /package/{src → dist}/presentation/assets/fonts/DMSans-Medium.ttf +0 -0
  1252. /package/{src → dist}/presentation/assets/fonts/DMSans-Regular.ttf +0 -0
  1253. /package/{src → dist}/presentation/assets/fonts/DMSans-SemiBold.ttf +0 -0
  1254. /package/{src → dist}/presentation/assets/fonts/OFL.txt +0 -0
  1255. /package/{src → dist}/presentation/assets/si_dark_lighting_animation.json +0 -0
  1256. /package/{src → dist}/presentation/assets/si_device_orientation_animation.json +0 -0
  1257. /package/{src → dist}/presentation/assets/svg/si_attribution.svg +0 -0
  1258. /package/{src → dist}/presentation/assets/svg/si_attribution_dark.svg +0 -0
  1259. /package/{src → dist}/presentation/assets/svg/si_checkbox_check.svg +0 -0
  1260. /package/{src → dist}/presentation/assets/svg/si_consent_biometric.svg +0 -0
  1261. /package/{src → dist}/presentation/assets/svg/si_consent_biometric_dark.svg +0 -0
  1262. /package/{src → dist}/presentation/assets/svg/si_consent_contact.svg +0 -0
  1263. /package/{src → dist}/presentation/assets/svg/si_consent_contact_dark.svg +0 -0
  1264. /package/{src → dist}/presentation/assets/svg/si_consent_device.svg +0 -0
  1265. /package/{src → dist}/presentation/assets/svg/si_consent_device_dark.svg +0 -0
  1266. /package/{src → dist}/presentation/assets/svg/si_consent_personal.svg +0 -0
  1267. /package/{src → dist}/presentation/assets/svg/si_consent_personal_dark.svg +0 -0
  1268. /package/{src → dist}/presentation/assets/svg/si_expand_more.svg +0 -0
  1269. /package/{src → dist}/presentation/assets/svg/si_plus.svg +0 -0
  1270. /package/{src → dist}/presentation/assets/svg/si_smile_consent_icon.svg +0 -0
@@ -1,935 +1 @@
1
- import { JobType } from "../../core/models/job_type";
2
- import { CaptureType } from "../../core/models/ml_config";
3
- import { defaultFrameAspectRatio, } from "../../core/models/document_type";
4
- import { MissingJobTypeException, MissingRequiredFieldException, } from "../../core/exception/job_validation_exceptions";
5
- import { UseSmileIDAnalyticsEventTypes, UseSmileIDAnalyticsParamKeys, UseSmileIDAnalyticsScreenNames, } from "./analytics/use_smile_id_analytics_event";
6
- import { UseSmileIDMetadataFactory, } from "../../metadata/use_smile_id_metadata_factory";
7
- import { DOCUMENT_BACK_IMAGE_ORIGIN_KEY, DOCUMENT_FRONT_IMAGE_ORIGIN_KEY, } from "../../metadata/document_image_origin";
8
- import { configurationMetadataEntries } from "../../metadata/metadata_configuration_mappers";
9
- import { CAPTURE_IMAGE_COLOR_DEPTH, CAPTURE_IMAGE_PIXEL_CONFIG, } from "../../metadata/captured_image_properties";
10
- import { numSamplesOverride } from "../../data/model/sdk_config";
11
- import { decodeSmileIDToken, } from "../../data/util/use_smile_id_token_decoder";
12
- import { isTokenConsentComplete, bindsRequiredUserDetails, } from "../../data/model/token_payload";
13
- import { isUserDetailsPayloadEmpty, userDetailsPayloadFrom, } from "../../data/model/user_details_payload";
14
- import { DocumentSide, EnhancedSmartSelfieConfig, } from "@smileid/usesmileid_bridge";
15
- import { ScanPerformanceProfile } from "@smileid/usesmileid_bridge";
16
- const DEFAULT_CONSENT = Object.freeze({
17
- granted: false,
18
- grantedAt: "",
19
- noticeLanguage: "",
20
- noticePrivacyPolicyUrl: "",
21
- });
22
- export class FlowNavigationManager {
23
- /**
24
- * Navigation stack and source of truth — top is the active screen.
25
- * Active screen + first/last predicates derive from this path (no
26
- * parallel index). Mutated only via the navigate* methods.
27
- */
28
- _navigationPath = [];
29
- _captured = { livenessPaths: [] };
30
- /**
31
- * Set once the partner skips the document back side via the flip
32
- * interstitial. Routes `getNextScreen()` past the back capture's preview so
33
- * submission proceeds with `backDocument` unset. Cleared when the front is
34
- * retaken.
35
- */
36
- _documentBackSkipped = false;
37
- /**
38
- * How each captured document side was produced (auto / manual / gallery).
39
- * Emitted as `DocumentFront/BackImageOrigin` submission metadata; an entry is
40
- * removed when its side is retaken.
41
- */
42
- _documentImageOrigins = new Map();
43
- // Capture telemetry recorded at capture completion (selfie + per document side).
44
- _selfieCaptureTelemetry;
45
- _documentCaptureTelemetry = new Map();
46
- // Identifier of the camera used for the most recent capture.
47
- _cameraName;
48
- // Accelerometer telemetry from the most recent capture (device_positions / movement).
49
- _devicePositions = [];
50
- _deviceMovementDetected = null;
51
- _jobSubmissionState = { kind: "notAttempted" };
52
- _listeners = new Set();
53
- _steps;
54
- _configuration;
55
- _repository;
56
- _metadataProvider;
57
- _onExit;
58
- _disposed = false;
59
- _submissionResponse;
60
- /**
61
- * Decoded `sdk_config` JWT claim, resolved once at construction.
62
- * `undefined` for offline mode / no token / no valid claim — SDK
63
- * defaults apply throughout the flow in those cases.
64
- */
65
- resolvedSdkConfig;
66
- /** Canonical `partner_id` decoded from the JWT (raw); resolved via the [partnerId] getter. */
67
- _resolvedPartnerId;
68
- /**
69
- * Token-bound user-detail/consent bindings decoded from the JWT
70
- * `payload` claim, resolved once at construction alongside
71
- * `resolvedSdkConfig`. `undefined` for offline mode / no token /
72
- * legacy token — assembly then requires and sends everything exactly
73
- * as before token support existed.
74
- */
75
- _resolvedTokenPayload;
76
- /**
77
- * Partner identifier the capture screen stamps into the Smile EXIF tag — the tag's HMAC/AES
78
- * keys derive from it and the backend validates the tag against the request's partner_id.
79
- *
80
- * Sourced from the JWT `partner_id` claim (server-canonical form, e.g. `"002"`) so the stamped
81
- * value matches what the backend keys on; falls back to the partner-supplied config value when
82
- * the claim is absent/blank. Empty = skip tagging.
83
- */
84
- get partnerId() {
85
- const jwtPartnerId = this._resolvedPartnerId;
86
- if (jwtPartnerId && jwtPartnerId.length > 0)
87
- return jwtPartnerId;
88
- return this._configuration.network?.config?.partnerConfig?.partnerId ?? "";
89
- }
90
- /** Stable per-flow session id, stamped into every analytics event's `session_id`. */
91
- _sessionId;
92
- /** Submission attempts so far — stamped into `job_submitted` as `attempt`. */
93
- _submissionAttemptCount = 0;
94
- constructor(options) {
95
- this._configuration = options.configuration;
96
- this._onExit = options.onExit;
97
- this._repository = options.repository;
98
- // Fall back to a fresh factory so capture-only harnesses still build
99
- // well-formed requests; the factory reads expo-device lazily and
100
- // degrades to empty values when the peer dep is absent.
101
- this._metadataProvider =
102
- options.metadataProvider ?? new UseSmileIDMetadataFactory();
103
- this._sessionId = this._metadataProvider.sessionId;
104
- const decodedToken = FlowNavigationManager._decodeToken(options.configuration);
105
- this.resolvedSdkConfig = decodedToken?.sdkConfig;
106
- this._resolvedPartnerId = decodedToken?.partnerId;
107
- this._resolvedTokenPayload = decodedToken?.tokenPayload;
108
- // Token consent always wins: a complete binding drops the consent
109
- // screen from the flow — the server injects the token's record, so
110
- // nothing is collected here.
111
- const steps = options.configuration.screens.steps;
112
- this._steps = isTokenConsentComplete(decodedToken?.tokenPayload?.consent)
113
- ? steps.filter((s) => s.kind !== "consent")
114
- : steps;
115
- // Seed the path with the first screen so currentScreen/renderer have a
116
- // deterministic start. Empty path → host renders the "no screens"
117
- // sentinel (validation rejects empty screens at build time anyway).
118
- const firstScreen = this._steps[0];
119
- if (firstScreen) {
120
- this._navigationPath = [firstScreen];
121
- }
122
- this._logEvent(UseSmileIDAnalyticsEventTypes.flowStarted, {
123
- [UseSmileIDAnalyticsParamKeys.jobType]: this._jobTypeName(),
124
- });
125
- if (firstScreen) {
126
- this._logEvent(UseSmileIDAnalyticsEventTypes.screenViewed, {
127
- [UseSmileIDAnalyticsParamKeys.screenName]: this._screenAnalyticsName(firstScreen),
128
- });
129
- }
130
- }
131
- get configuration() {
132
- return this._configuration;
133
- }
134
- /** Whether any selfie step enabled Enhanced Smart Selfie (drives the instructions hero swap and oval-progress suppression). */
135
- get enhancedLivenessEnabled() {
136
- return this._steps.some((step) => step.kind === "capture" &&
137
- step.config.selfieConfig?.enableEnhancedLiveness === true);
138
- }
139
- /** Document type from the flow's document capture step, if any (drives the instructions document variant). */
140
- get documentType() {
141
- for (const step of this._steps) {
142
- if (step.kind === "capture" &&
143
- step.config.captureType === CaptureType.document) {
144
- return step.config.documentConfig?.documentType;
145
- }
146
- }
147
- return undefined;
148
- }
149
- /**
150
- * Resolved document capture-frame aspect ratio (width / height), shared by
151
- * capture, preview, and processing. Precedence: type `knownAspectRatio` →
152
- * partner `knownIdAspectRatio` → orientation default.
153
- */
154
- get documentFrameAspectRatio() {
155
- for (const step of this._steps) {
156
- if (step.kind === "capture" &&
157
- step.config.captureType === CaptureType.document) {
158
- const documentConfig = step.config.documentConfig;
159
- return (documentConfig?.resolvedAspectRatio ??
160
- defaultFrameAspectRatio(documentConfig?.documentType?.orientation ?? "Landscape"));
161
- }
162
- }
163
- return undefined;
164
- }
165
- // --- navigation path --------------------------------------------------
166
- /** Read-only navigation stack; top is the active screen. */
167
- get navigationPath() {
168
- return this._navigationPath;
169
- }
170
- /** Active screen (top of the path); `undefined` only when no screens are configured. */
171
- get currentScreen() {
172
- return this._navigationPath[this._navigationPath.length - 1];
173
- }
174
- /**
175
- * Depth of the active screen — stable id for React view identity so
176
- * stack frames at the same configured-screen position stay distinct.
177
- */
178
- get currentDepth() {
179
- return this._navigationPath.length - 1;
180
- }
181
- get isFirstScreen() {
182
- return this._navigationPath.length <= 1;
183
- }
184
- get isLastScreen() {
185
- return this.getNextScreen() === undefined;
186
- }
187
- /** Next screen `navigateToNext()` would land on; `undefined` at the terminal screen. */
188
- getNextScreen() {
189
- const current = this.currentScreen;
190
- if (!current)
191
- return undefined;
192
- const currentIdx = this._steps.indexOf(current);
193
- if (currentIdx < 0)
194
- return undefined;
195
- // Per-side document loop: after previewing the FRONT, route back to the
196
- // document capture step to capture the BACK. Gated so it fires only on a
197
- // document preview with the back still pending and not skipped — the back
198
- // preview (back already captured) falls through to the linear next step.
199
- if (current.kind === "preview" &&
200
- this._precedingStepIsDocumentCapture(currentIdx) &&
201
- this.documentCapturesBack() &&
202
- this._captured.backDocumentPath === undefined &&
203
- !this._documentBackSkipped) {
204
- const documentCapture = this._steps[currentIdx - 1];
205
- if (documentCapture !== undefined)
206
- return documentCapture;
207
- }
208
- // Back skipped at the interstitial: skip the document preview that would
209
- // otherwise follow the capture and advance past it (no back to preview).
210
- if (current.kind === "capture" &&
211
- current.config.captureType === CaptureType.document &&
212
- this._documentBackSkipped) {
213
- const next = this._steps[currentIdx + 1];
214
- if (next?.kind === "preview")
215
- return this._steps[currentIdx + 2];
216
- }
217
- // At the document capture step with the front captured, the back still
218
- // pending, and no document preview to drive the per-side loop, re-enter the
219
- // capture step for the back side so captureBothSides is honoured even when
220
- // the flow omits the document preview { } step. When a preview does follow,
221
- // the per-side loop above handles the back instead.
222
- if (current.kind === "capture" &&
223
- current.config.captureType === CaptureType.document &&
224
- this.documentCapturesBack() &&
225
- this._captured.frontDocumentPath !== undefined &&
226
- this._captured.backDocumentPath === undefined &&
227
- !this._documentBackSkipped &&
228
- !this.documentPreviewFollowsCapture()) {
229
- return current;
230
- }
231
- return this._steps[currentIdx + 1];
232
- }
233
- /**
234
- * Advance to the next screen. Past the last screen, exits via `onExit`
235
- * `{ kind: 'completed', job }` (job is the successful response, or an
236
- * empty-fields stand-in for flows with no processing screen).
237
- *
238
- * Advancing into a `processing` screen sets `loading` synchronously
239
- * before the async submit, closing the race with the screen's
240
- * mount-time `beginSubmissionIfNeeded()` so it never flashes
241
- * `notAttempted`.
242
- */
243
- navigateToNext() {
244
- if (this._disposed)
245
- return;
246
- const nextScreen = this.getNextScreen();
247
- if (!nextScreen) {
248
- // Past the last screen: deliver the stored success response,
249
- // surface a failure, else the empty-fields completed carrier
250
- // (flows with no processing screen still get `completed`).
251
- const state = this._jobSubmissionState;
252
- if (this._submissionResponse) {
253
- this._finishFlow({ kind: "completed", job: this._submissionResponse });
254
- return;
255
- }
256
- if (state.kind === "failure") {
257
- this._finishFlow({ kind: "failed", error: state.error });
258
- return;
259
- }
260
- const job = state.kind === "success"
261
- ? state.response
262
- : { userId: "", jobId: "", status: "", message: "" };
263
- this._finishFlow({ kind: "completed", job });
264
- return;
265
- }
266
- this._navigationPath = [...this._navigationPath, nextScreen];
267
- this._logEvent(UseSmileIDAnalyticsEventTypes.screenViewed, {
268
- [UseSmileIDAnalyticsParamKeys.screenName]: this._screenAnalyticsName(nextScreen),
269
- });
270
- // Mark loading synchronously so the processing screen's mount-time
271
- // beginSubmissionIfNeeded() sees the transition has started — guards
272
- // the brief notAttempted flash before the async submit is scheduled.
273
- if (nextScreen.kind === "processing" &&
274
- this._jobSubmissionState.kind === "notAttempted" &&
275
- this._repository !== undefined) {
276
- this._jobSubmissionState = { kind: "loading" };
277
- }
278
- this._notify();
279
- if (nextScreen.kind === "processing" &&
280
- this._jobSubmissionState.kind === "loading" &&
281
- this._repository !== undefined) {
282
- // Macrotask defer so React paints the loading processing screen
283
- // before _submit blocks the JS thread with request assembly +
284
- // signing. The pre-set loading keeps beginSubmissionIfNeeded() a
285
- // no-op, so it still submits exactly once.
286
- setTimeout(() => {
287
- if (this._disposed)
288
- return;
289
- void this._submit();
290
- }, 0);
291
- }
292
- }
293
- /** Pop the active screen; from the first screen, exits via `onExit` `{ kind: 'cancelled' }`. */
294
- navigateBack() {
295
- if (this._disposed)
296
- return;
297
- if (this.isFirstScreen) {
298
- this._onExit({ kind: "cancelled" });
299
- return;
300
- }
301
- // Going back from a non-first screen is a retake of the prior step.
302
- this._logEvent(UseSmileIDAnalyticsEventTypes.retakeRequested);
303
- this._navigationPath = this._navigationPath.slice(0, -1);
304
- this._notify();
305
- }
306
- /** Reset the path to the first screen (flow restart after terminal failure, manager kept alive). */
307
- navigateToStart() {
308
- if (this._disposed)
309
- return;
310
- const firstScreen = this._steps[0];
311
- this._navigationPath = firstScreen ? [firstScreen] : [];
312
- this._notify();
313
- }
314
- /** Exit the flow with a partner-supplied reason (processing onExit, consent denied, etc.). */
315
- exit(reason = { kind: "cancelled" }) {
316
- if (this._disposed)
317
- return;
318
- this._finishFlow(reason);
319
- }
320
- // --- captured artifacts -----------------------------------------------
321
- get captured() {
322
- return this._captured;
323
- }
324
- setCapturedSelfie(selfiePath, livenessPaths) {
325
- if (this._disposed)
326
- return;
327
- this._captured = {
328
- ...this._captured,
329
- selfiePath,
330
- livenessPaths: Object.freeze([...livenessPaths]),
331
- };
332
- this._logEvent(UseSmileIDAnalyticsEventTypes.selfieCaptured, {
333
- [UseSmileIDAnalyticsParamKeys.livenessImageCount]: String(livenessPaths.length),
334
- });
335
- this._notify();
336
- }
337
- setCapturedFrontDocument(path) {
338
- if (this._disposed)
339
- return;
340
- this._captured = { ...this._captured, frontDocumentPath: path };
341
- this._logEvent(UseSmileIDAnalyticsEventTypes.documentCaptured, {
342
- [UseSmileIDAnalyticsParamKeys.documentSide]: "front",
343
- });
344
- this._notify();
345
- }
346
- setCapturedBackDocument(path) {
347
- if (this._disposed)
348
- return;
349
- this._captured = { ...this._captured, backDocumentPath: path };
350
- // `both` is the single completion-event value for a two-sided capture.
351
- this._logEvent(UseSmileIDAnalyticsEventTypes.documentCaptured, {
352
- [UseSmileIDAnalyticsParamKeys.documentSide]: "both",
353
- });
354
- this._notify();
355
- }
356
- // --- document per-side preview loop -----------------------------------
357
- /** Whether the configured document capture asks for a back side. */
358
- documentCapturesBack() {
359
- for (const step of this._steps) {
360
- if (step.kind === "capture" &&
361
- step.config.captureType === CaptureType.document) {
362
- const documentConfig = step.config.documentConfig;
363
- return (documentConfig?.documentType?.hasBackSide === true &&
364
- (documentConfig?.captureBothSides ?? false));
365
- }
366
- }
367
- return false;
368
- }
369
- /** Whether a `preview {}` immediately follows the document capture step. */
370
- documentPreviewFollowsCapture() {
371
- const index = this._steps.findIndex((step) => step.kind === "capture" &&
372
- step.config.captureType === CaptureType.document);
373
- if (index < 0)
374
- return false;
375
- return this._steps[index + 1]?.kind === "preview";
376
- }
377
- /** Whether the active preview previews a document side (vs the selfie). */
378
- currentPreviewIsDocument() {
379
- const current = this.currentScreen;
380
- if (!current || current.kind !== "preview")
381
- return false;
382
- return this._precedingStepIsDocumentCapture(this._steps.indexOf(current));
383
- }
384
- /** Path of the document side under review: the back if captured, else the front. */
385
- currentDocumentPreviewPath() {
386
- return this._captured.backDocumentPath ?? this._captured.frontDocumentPath;
387
- }
388
- /**
389
- * Discard the side under review for re-capture: the back if captured,
390
- * else the front (which also un-skips the back). Does not navigate.
391
- */
392
- retakeCurrentDocumentSide() {
393
- if (this._disposed)
394
- return;
395
- const next = { ...this._captured };
396
- if (next.backDocumentPath !== undefined) {
397
- delete next.backDocumentPath;
398
- this._documentImageOrigins.delete(DocumentSide.Back);
399
- }
400
- else {
401
- delete next.frontDocumentPath;
402
- this._documentImageOrigins.delete(DocumentSide.Front);
403
- this._documentBackSkipped = false;
404
- }
405
- this._captured = next;
406
- this._notify();
407
- }
408
- /** Skip the document back side from the flip interstitial ("Skip"). */
409
- skipDocumentBack() {
410
- if (this._disposed)
411
- return;
412
- this._documentBackSkipped = true;
413
- this._notify();
414
- }
415
- /**
416
- * Record how a side was produced (→ `DocumentFront/BackImageOrigin`
417
- * metadata). Metadata-only, so it intentionally does not `_notify()`.
418
- */
419
- recordDocumentImageOrigin(side, origin) {
420
- if (this._disposed)
421
- return;
422
- this._documentImageOrigins.set(side, origin);
423
- }
424
- /** Records selfie capture telemetry (duration + retries) at capture completion. */
425
- recordSelfieCaptureTelemetry(telemetry) {
426
- if (this._disposed)
427
- return;
428
- this._selfieCaptureTelemetry = telemetry;
429
- this._captureCameraName(telemetry);
430
- }
431
- /** Records per-side document capture telemetry at each side's completion. */
432
- recordDocumentCaptureTelemetry(side, telemetry) {
433
- if (this._disposed)
434
- return;
435
- this._documentCaptureTelemetry.set(side, telemetry);
436
- this._captureCameraName(telemetry);
437
- }
438
- _captureCameraName(telemetry) {
439
- if (telemetry.cameraName)
440
- this._cameraName = telemetry.cameraName;
441
- if (telemetry.devicePositions.length > 0) {
442
- this._devicePositions = telemetry.devicePositions;
443
- this._deviceMovementDetected = telemetry.deviceMovementDetected;
444
- }
445
- }
446
- /** Per-side document origin wire entries (front then back; omitted when unset). */
447
- _documentImageOriginEntries() {
448
- const entries = [];
449
- const front = this._documentImageOrigins.get(DocumentSide.Front);
450
- if (front !== undefined) {
451
- entries.push({ name: DOCUMENT_FRONT_IMAGE_ORIGIN_KEY, value: front });
452
- }
453
- const back = this._documentImageOrigins.get(DocumentSide.Back);
454
- if (back !== undefined) {
455
- entries.push({ name: DOCUMENT_BACK_IMAGE_ORIGIN_KEY, value: back });
456
- }
457
- return entries;
458
- }
459
- /**
460
- * Capture telemetry + image-property wire entries. Durations and retries keep
461
- * a meaningful 0 (capture ran) and are omitted only when that capture type
462
- * never ran. Color depth / pixel config are emitted for each present capture;
463
- * document sizes when measured.
464
- */
465
- _captureTelemetryEntries() {
466
- const entries = [];
467
- const push = (name, value) => entries.push({ name, value });
468
- const selfie = this._selfieCaptureTelemetry;
469
- if (selfie) {
470
- // Duration + retries keep a meaningful 0 (capture ran); telemetry is absent only when the
471
- // capture type never ran.
472
- push("selfie_capture_duration_ms", String(selfie.durationMs));
473
- push("selfie_capture_retries", String(selfie.retries));
474
- }
475
- if (this._captured.selfiePath !== undefined) {
476
- push("selfie_image_color_depth", String(CAPTURE_IMAGE_COLOR_DEPTH));
477
- push("selfie_image_pixel_config", CAPTURE_IMAGE_PIXEL_CONFIG);
478
- }
479
- if (this._cameraName) {
480
- push("camera_name", this._cameraName);
481
- }
482
- if (this._devicePositions.length > 0) {
483
- push("device_positions", JSON.stringify(this._devicePositions));
484
- if (this._deviceMovementDetected !== null) {
485
- push("device_movement_detected", String(this._deviceMovementDetected));
486
- }
487
- }
488
- const sideKey = (side) => side === DocumentSide.Back ? "back" : "front";
489
- for (const side of [DocumentSide.Front, DocumentSide.Back]) {
490
- const key = sideKey(side);
491
- const telemetry = this._documentCaptureTelemetry.get(side);
492
- if (telemetry) {
493
- push(`document_${key}_capture_duration_ms`, String(telemetry.durationMs));
494
- push(`document_${key}_capture_retries`, String(telemetry.retries));
495
- push(`document_${key}_image_color_depth`, String(CAPTURE_IMAGE_COLOR_DEPTH));
496
- push(`document_${key}_image_pixel_config`, CAPTURE_IMAGE_PIXEL_CONFIG);
497
- }
498
- }
499
- // Per-image original + final compressed sizes are stamped in the repository around the
500
- // compression pass (it owns both the before and after byte counts), not here.
501
- return entries;
502
- }
503
- _precedingStepIsDocumentCapture(index) {
504
- const preceding = this._steps[index - 1];
505
- return (preceding?.kind === "capture" &&
506
- preceding.config.captureType === CaptureType.document);
507
- }
508
- setConsent(info) {
509
- if (this._disposed)
510
- return;
511
- this._captured = { ...this._captured, consentInformation: info };
512
- this._logEvent(UseSmileIDAnalyticsEventTypes.consentCaptured, {
513
- [UseSmileIDAnalyticsParamKeys.decision]: "granted",
514
- });
515
- this._notify();
516
- }
517
- // --- job submission ---------------------------------------------------
518
- get jobSubmissionState() {
519
- return this._jobSubmissionState;
520
- }
521
- /**
522
- * Idempotent submission entry point (called on processing-screen
523
- * mount). The `notAttempted` guard prevents re-mounts re-firing.
524
- */
525
- beginSubmissionIfNeeded() {
526
- if (this._disposed)
527
- return;
528
- if (this._jobSubmissionState.kind !== "notAttempted")
529
- return;
530
- void this._submit();
531
- }
532
- /**
533
- * Reset to `notAttempted` and re-fire submission (processing screen's
534
- * onRetry). Ignored while a submission is in flight — resetting then would
535
- * defeat `beginSubmissionIfNeeded()`'s single-flight guard.
536
- */
537
- retrySubmission() {
538
- if (this._disposed)
539
- return;
540
- if (this._jobSubmissionState.kind === "loading")
541
- return;
542
- this._setSubmissionState({ kind: "notAttempted" });
543
- this.beginSubmissionIfNeeded();
544
- }
545
- _setSubmissionState(state) {
546
- if (this._disposed)
547
- return;
548
- this._jobSubmissionState = state;
549
- this._notify();
550
- }
551
- /**
552
- * Build the request, dispatch via repository, update state. Errors
553
- * from `_assembleJob` (missing captures / bad job type) map to the
554
- * `failure` state rather than propagating as unhandled rejections.
555
- */
556
- async _submit() {
557
- if (!this._repository) {
558
- this._setSubmissionState({
559
- kind: "failure",
560
- error: new Error("Job submission not configured — no network/repository was " +
561
- "supplied to <UseSmileIDBuilder>. Call `b.network((n) => n.config((c) => " +
562
- "{ c.token = ...; c.partnerConfig((p) => { p.partnerId = ...; }); }))`."),
563
- });
564
- return;
565
- }
566
- let request;
567
- try {
568
- request = this._assembleJob();
569
- }
570
- catch (error) {
571
- this._setSubmissionState({
572
- kind: "failure",
573
- error: error instanceof Error ? error : new Error(String(error)),
574
- });
575
- return;
576
- }
577
- this._setSubmissionState({ kind: "loading" });
578
- this._submissionAttemptCount += 1;
579
- this._logEvent(UseSmileIDAnalyticsEventTypes.jobSubmitted, {
580
- [UseSmileIDAnalyticsParamKeys.jobType]: this._jobTypeName(),
581
- [UseSmileIDAnalyticsParamKeys.attempt]: String(this._submissionAttemptCount),
582
- });
583
- const result = await this._repository.submit(request);
584
- if (this._disposed)
585
- return;
586
- if (result.status === "success") {
587
- // Cache so a later navigateToNext() past the last screen can
588
- // deliver the result without rebuilding the request (capture
589
- // artifacts may have been released by then).
590
- this._submissionResponse = result.value;
591
- this._setSubmissionState({ kind: "success", response: result.value });
592
- }
593
- else if (result.status === "failure") {
594
- // `result.error` is `unknown`; coerce defensively in case a
595
- // mock/partner repository hands back a non-Error.
596
- const error = result.error instanceof Error
597
- ? result.error
598
- : new Error(String(result.error));
599
- this._setSubmissionState({ kind: "failure", error });
600
- }
601
- // No `cancelled` branch: that outcome comes only from a user-initiated exit.
602
- }
603
- /**
604
- * Build a typed `JobRequest` from `jobType` + captured artifacts.
605
- * Throws a descriptive message when a required capture is missing.
606
- */
607
- _assembleJob() {
608
- const config = this._configuration;
609
- const jobType = config.network?.config?.jobType ?? JobType.unknown;
610
- // Token consent always wins: the `consent` part is omitted — the
611
- // server injects the token's record — and any local preset or
612
- // capture is ignored. Without a token binding, a local source
613
- // (captured on the consent screen, else the builder preset) is
614
- // sent in full, and the legacy DEFAULT_CONSENT placeholder covers
615
- // the no-source case.
616
- const consent = isTokenConsentComplete(this._resolvedTokenPayload?.consent)
617
- ? undefined
618
- : (this._captured.consentInformation ??
619
- config.consentInformation ??
620
- DEFAULT_CONSENT);
621
- const consentField = consent !== undefined ? { consent } : {};
622
- // Build the per-submission metadata snapshot so it travels on the
623
- // request (API layer serializes `request.metadata` directly).
624
- // Dynamic fields (orientation, locale, timezone) re-resolve per
625
- // make() so a mid-flow rotation is captured. resolvedSdkConfig drives
626
- // sdk_config_source + image_width/height provenance.
627
- const baseMetadata = this._metadataProvider.make(this.resolvedSdkConfig);
628
- // Append the per-side document origins plus the partner's builder setup and
629
- // the active detection models, all as flat wire entries.
630
- // configurationMetadataEntries always contributes the builder + model config objects, so
631
- // there is always at least one extra entry to append.
632
- const extraEntries = [
633
- ...this._documentImageOriginEntries(),
634
- ...this._captureTelemetryEntries(),
635
- ...configurationMetadataEntries(config),
636
- ];
637
- const metadata = baseMetadata.withAdditionalEntries(extraEntries);
638
- switch (jobType) {
639
- // enableEnhancedLiveness is a screen-level capture flag, not a
640
- // distinct job type — enrollment still hits /v3/registration.
641
- case JobType.smartSelfieEnrollment: {
642
- const selfie = this._requireSelfie();
643
- const userDetails = this._requireUserDetails(config);
644
- return {
645
- jobType: JobType.smartSelfieEnrollment,
646
- selfieImage: selfie.selfiePath,
647
- livenessImages: selfie.livenessPaths,
648
- ...(userDetails !== undefined ? { userDetails } : {}),
649
- ...consentField,
650
- metadata,
651
- enhanced: false,
652
- expectedLivenessImageCount: this._expectedLivenessImageCount(),
653
- };
654
- }
655
- case JobType.smartSelfieAuthentication: {
656
- const selfie = this._requireSelfie();
657
- const userDetails = this._requireUserDetails(config);
658
- const userId = this._requireUserId(config);
659
- return {
660
- jobType: JobType.smartSelfieAuthentication,
661
- selfieImage: selfie.selfiePath,
662
- livenessImages: selfie.livenessPaths,
663
- ...(userDetails !== undefined ? { userDetails } : {}),
664
- userId,
665
- ...consentField,
666
- metadata,
667
- enhanced: false,
668
- expectedLivenessImageCount: this._expectedLivenessImageCount(),
669
- };
670
- }
671
- case JobType.biometricKyc: {
672
- const selfie = this._requireSelfie();
673
- const params = config.biometricKYCParams;
674
- if (!params) {
675
- throw new MissingRequiredFieldException({
676
- fieldName: "biometricKYCParams",
677
- });
678
- }
679
- const userDetails = this._requireUserDetails(config);
680
- return {
681
- jobType: JobType.biometricKyc,
682
- selfieImage: selfie.selfiePath,
683
- livenessImages: selfie.livenessPaths,
684
- params,
685
- ...(userDetails !== undefined ? { userDetails } : {}),
686
- ...consentField,
687
- metadata,
688
- expectedLivenessImageCount: this._expectedLivenessImageCount(),
689
- };
690
- }
691
- case JobType.documentVerification: {
692
- const selfie = this._requireSelfie();
693
- const front = this._requireFrontDocument();
694
- const params = config.documentVerificationParams;
695
- if (!params) {
696
- throw new MissingRequiredFieldException({
697
- fieldName: "documentVerificationParams",
698
- });
699
- }
700
- const userDetails = this._requireUserDetails(config);
701
- return {
702
- jobType: JobType.documentVerification,
703
- ...this._documentRequestFields(selfie, front),
704
- country: params.country,
705
- // Optional — omit when unset so the server classifies the document.
706
- ...(params.idType ? { idType: params.idType } : {}),
707
- ...(userDetails !== undefined ? { userDetails } : {}),
708
- ...consentField,
709
- metadata,
710
- expectedLivenessImageCount: this._expectedLivenessImageCount(),
711
- };
712
- }
713
- case JobType.enhancedDocumentVerification: {
714
- const selfie = this._requireSelfie();
715
- const front = this._requireFrontDocument();
716
- const params = config.enhancedDocumentVerificationParams;
717
- if (!params) {
718
- throw new MissingRequiredFieldException({
719
- fieldName: "enhancedDocumentVerificationParams",
720
- });
721
- }
722
- const userDetails = this._requireUserDetails(config);
723
- return {
724
- jobType: JobType.enhancedDocumentVerification,
725
- ...this._documentRequestFields(selfie, front),
726
- country: params.country,
727
- idType: params.idType,
728
- ...(userDetails !== undefined ? { userDetails } : {}),
729
- ...consentField,
730
- metadata,
731
- expectedLivenessImageCount: this._expectedLivenessImageCount(),
732
- };
733
- }
734
- case JobType.enhancedKyc: {
735
- const params = config.enhancedKYCParams;
736
- if (!params) {
737
- throw new MissingRequiredFieldException({
738
- fieldName: "enhancedKYCParams",
739
- });
740
- }
741
- const userDetails = this._requireUserDetails(config);
742
- return {
743
- jobType: JobType.enhancedKyc,
744
- params,
745
- ...(userDetails !== undefined ? { userDetails } : {}),
746
- ...consentField,
747
- metadata,
748
- };
749
- }
750
- case JobType.bvn: {
751
- // Dedicated `bvn` request kind; the repository rejects it with
752
- // "BVN submission is not yet supported" until the endpoint lands.
753
- // Deliberately not silently mapped onto /v3/enhanced_kyc so
754
- // partners see the unsupported state explicitly.
755
- const params = config.enhancedKYCParams;
756
- if (!params) {
757
- throw new MissingRequiredFieldException({
758
- fieldName: "enhancedKYCParams",
759
- });
760
- }
761
- const userDetails = this._requireUserDetails(config);
762
- return {
763
- jobType: JobType.bvn,
764
- params,
765
- ...(userDetails !== undefined ? { userDetails } : {}),
766
- ...consentField,
767
- metadata,
768
- };
769
- }
770
- case JobType.unknown:
771
- default:
772
- throw new MissingJobTypeException();
773
- }
774
- }
775
- _requireSelfie() {
776
- const { selfiePath, livenessPaths } = this._captured;
777
- if (!selfiePath) {
778
- throw new MissingRequiredFieldException({ fieldName: "selfieImage" });
779
- }
780
- return { selfiePath, livenessPaths };
781
- }
782
- /**
783
- * Resolve `b.userDetails` for the wire. May legitimately return
784
- * `undefined` when the token binds every required field
785
- * (`given_names`, `last_name`, and a contact field) — the
786
- * `user_details` part is then omitted and the server injects the
787
- * token's values. Otherwise throws exactly as before token support.
788
- */
789
- _requireUserDetails(config) {
790
- const userDetails = config.userDetails;
791
- if (!userDetails) {
792
- if (bindsRequiredUserDetails(this._resolvedTokenPayload)) {
793
- return undefined;
794
- }
795
- throw new MissingRequiredFieldException({ fieldName: "userDetails" });
796
- }
797
- const payload = userDetailsPayloadFrom(userDetails, this._resolvedTokenPayload);
798
- return isUserDetailsPayloadEmpty(payload) ? undefined : payload;
799
- }
800
- /**
801
- * Resolve `b.userId` for smartSelfieAuthentication —
802
- * `/v3/authentication` requires the prior-enrollment `user_id` to
803
- * match the attempt. Throws `MissingRequiredFieldException` if blank.
804
- */
805
- _requireUserId(config) {
806
- const userId = config.userId?.trim();
807
- if (!userId) {
808
- throw new MissingRequiredFieldException({ fieldName: "userId" });
809
- }
810
- return userId;
811
- }
812
- _requireFrontDocument() {
813
- const { frontDocumentPath } = this._captured;
814
- if (!frontDocumentPath) {
815
- throw new MissingRequiredFieldException({ fieldName: "frontDocument" });
816
- }
817
- return frontDocumentPath;
818
- }
819
- /** Capture-artifact fields shared by both document request variants. */
820
- _documentRequestFields(selfie, frontDocument) {
821
- const { backDocumentPath } = this._captured;
822
- return {
823
- selfieImage: selfie.selfiePath,
824
- livenessImages: selfie.livenessPaths,
825
- frontDocument,
826
- ...(backDocumentPath ? { backDocument: backDocumentPath } : {}),
827
- };
828
- }
829
- // --- analytics --------------------------------------------------------
830
- /** Emit terminal `flow_completed` (completed/failed only; not cancelled), then exit via `onExit`. */
831
- _finishFlow(reason) {
832
- if (reason.kind === "completed") {
833
- const extras = {
834
- [UseSmileIDAnalyticsParamKeys.result]: "success",
835
- };
836
- if (reason.job.jobId) {
837
- extras[UseSmileIDAnalyticsParamKeys.jobId] = reason.job.jobId;
838
- }
839
- this._logEvent(UseSmileIDAnalyticsEventTypes.flowCompleted, extras);
840
- }
841
- else if (reason.kind === "failed") {
842
- this._logEvent(UseSmileIDAnalyticsEventTypes.flowCompleted, {
843
- [UseSmileIDAnalyticsParamKeys.result]: "failure",
844
- [UseSmileIDAnalyticsParamKeys.errorMessage]: reason.error instanceof Error
845
- ? reason.error.message
846
- : String(reason.error),
847
- });
848
- }
849
- this._onExit(reason);
850
- }
851
- /** Forward a lifecycle event to `onAnalyticsEvent`, adding `session_id` + `timestamp`. No-op without a callback. */
852
- _logEvent(type, extras = {}) {
853
- const onAnalyticsEvent = this._configuration.onAnalyticsEvent;
854
- if (!onAnalyticsEvent)
855
- return;
856
- onAnalyticsEvent({
857
- type,
858
- extras: {
859
- ...extras,
860
- [UseSmileIDAnalyticsParamKeys.sessionId]: this._sessionId,
861
- [UseSmileIDAnalyticsParamKeys.timestamp]: String(Date.now()),
862
- },
863
- });
864
- }
865
- _jobTypeName() {
866
- return String(this._configuration.network?.config?.jobType ?? JobType.unknown);
867
- }
868
- _screenAnalyticsName(screen) {
869
- const names = {
870
- consent: UseSmileIDAnalyticsScreenNames.consent,
871
- instructions: UseSmileIDAnalyticsScreenNames.instructions,
872
- capture: UseSmileIDAnalyticsScreenNames.capture,
873
- preview: UseSmileIDAnalyticsScreenNames.preview,
874
- processing: UseSmileIDAnalyticsScreenNames.processing,
875
- };
876
- return names[screen.kind];
877
- }
878
- // --- subscription -----------------------------------------------------
879
- /** Subscribe to state changes; returns an unsubscribe (safe after `dispose()`). */
880
- subscribe(listener) {
881
- this._listeners.add(listener);
882
- return () => {
883
- this._listeners.delete(listener);
884
- };
885
- }
886
- /** Tear down — drop listeners, make methods no-ops (orchestrator's useEffect cleanup). */
887
- dispose() {
888
- this._disposed = true;
889
- this._listeners.clear();
890
- }
891
- /**
892
- * Expected liveness image count: ESS uses its fixed count (head-turn
893
- * flow self-manages); else the token's livenessImageCount override;
894
- * else the ScanPerformanceProfile default (`numSamples - 1`).
895
- */
896
- _expectedLivenessImageCount() {
897
- const isEnhancedLiveness = this.enhancedLivenessEnabled;
898
- if (isEnhancedLiveness) {
899
- return EnhancedSmartSelfieConfig.EXPECTED_LIVENESS_IMAGE_COUNT;
900
- }
901
- const override = numSamplesOverride(this.resolvedSdkConfig);
902
- if (override !== undefined) {
903
- // numSamplesOverride = livenessImageCount + 1; subtract the selfie.
904
- return override - 1;
905
- }
906
- // Profile numSamples (default Balanced = 8) minus the reference selfie.
907
- const profileNumSamples = this._configuration.ml?.analyzers.selfieConfig?.numSamples ??
908
- ScanPerformanceProfile.Balanced.numSamples;
909
- return profileNumSamples - 1;
910
- }
911
- /**
912
- * Decode the partner JWT into its claims (`sdk_config`, `partner_id`). `undefined` for offline
913
- * mode, no token, or an unparseable token — SDK defaults apply in those cases.
914
- */
915
- static _decodeToken(configuration) {
916
- if (configuration.config?.allowOfflineMode)
917
- return undefined;
918
- const token = configuration.network?.config?.token;
919
- if (!token || token.length === 0)
920
- return undefined;
921
- return decodeSmileIDToken(token);
922
- }
923
- _notify() {
924
- for (const listener of this._listeners) {
925
- try {
926
- listener();
927
- }
928
- catch {
929
- // Swallow so one bad listener can't poison the dispatch chain;
930
- // the orchestrator-level boundary handles crash reporting.
931
- }
932
- }
933
- }
934
- }
935
- //# sourceMappingURL=flow_navigation_manager.js.map
1
+ "use strict";import{File as b}from"expo-file-system";import{JobType as n}from"../../core/models/job_type";import{CaptureType as _}from"../../core/models/ml_config";import{defaultFrameAspectRatio as y}from"../../core/models/document_type";import{MissingJobTypeException as P,MissingRequiredFieldException as h}from"../../core/exception/job_validation_exceptions";import{InvalidFieldValueException as I}from"../../core/exception/invalid_field_value_exception";import{UseSmileIDAnalyticsEventTypes as m,UseSmileIDAnalyticsParamKeys as a,UseSmileIDAnalyticsScreenNames as g}from"./analytics/use_smile_id_analytics_event";import{UseSmileIDMetadataFactory as C}from"../../metadata/use_smile_id_metadata_factory";import{DOCUMENT_BACK_IMAGE_ORIGIN_KEY as D,DOCUMENT_FRONT_IMAGE_ORIGIN_KEY as T}from"../../metadata/document_image_origin";import{configurationMetadataEntries as w}from"../../metadata/metadata_configuration_mappers";import{CAPTURE_IMAGE_COLOR_DEPTH as v,CAPTURE_IMAGE_PIXEL_CONFIG as S}from"../../metadata/captured_image_properties";import{numSamplesOverride as E}from"../../data/model/sdk_config";import{decodeSmileIDToken as N}from"../../data/util/use_smile_id_token_decoder";import{isTokenConsentComplete as k,bindsRequiredUserDetails as x}from"../../data/model/token_payload";import{isUserDetailsPayloadEmpty as j,userDetailsPayloadFrom as F}from"../../data/model/user_details_payload";import{DocumentSide as p,EnhancedSmartSelfieConfig as A}from"@smileid/usesmileid_bridge";import{ScanPerformanceProfile as O}from"@smileid/usesmileid_bridge";const q=Object.freeze({granted:!1,grantedAt:"",noticeLanguage:"",noticePrivacyPolicyUrl:""});export class FlowNavigationManager{_navigationPath=[];_captured={livenessPaths:[]};_documentBackSkipped=!1;_documentImageOrigins=new Map;_selfieCaptureTelemetry;_documentCaptureTelemetry=new Map;_cameraName;_devicePositions=[];_deviceMovementDetected=null;_jobSubmissionState={kind:"notAttempted"};_listeners=new Set;_steps;_configuration;_repository;_metadataProvider;_onExit;_disposed=!1;_submissionResponse;resolvedSdkConfig;_resolvedPartnerId;_resolvedTokenPayload;get partnerId(){const e=this._resolvedPartnerId;return e&&e.length>0?e:this._configuration.network?.config?.partnerConfig?.partnerId??""}_sessionId;_submissionAttemptCount=0;constructor(e){this._configuration=e.configuration,this._onExit=e.onExit,this._repository=e.repository,this._metadataProvider=e.metadataProvider??new C,this._sessionId=this._metadataProvider.sessionId;const t=FlowNavigationManager._decodeToken(e.configuration);this.resolvedSdkConfig=t?.sdkConfig,this._resolvedPartnerId=t?.partnerId,this._resolvedTokenPayload=t?.tokenPayload;const i=e.configuration.screens.steps;this._steps=k(t?.tokenPayload?.consent)?i.filter(c=>c.kind!=="consent"):i;const s=this._steps[0];s&&(this._navigationPath=[s]),this._logEvent(m.flowStarted,{[a.jobType]:this._jobTypeName()}),s&&this._logEvent(m.screenViewed,{[a.screenName]:this._screenAnalyticsName(s)})}get configuration(){return this._configuration}get enhancedLivenessEnabled(){return this._steps.some(e=>e.kind==="capture"&&e.config.selfieConfig?.enableEnhancedLiveness===!0)}get documentType(){for(const e of this._steps)if(e.kind==="capture"&&e.config.captureType===_.document)return e.config.documentConfig?.documentType}get documentFrameAspectRatio(){for(const e of this._steps)if(e.kind==="capture"&&e.config.captureType===_.document){const t=e.config.documentConfig;return t?.resolvedAspectRatio??y(t?.documentType?.orientation??"Landscape")}}get navigationPath(){return this._navigationPath}get currentScreen(){return this._navigationPath[this._navigationPath.length-1]}get currentDepth(){return this._navigationPath.length-1}get isFirstScreen(){return this._navigationPath.length<=1}get isLastScreen(){return this.getNextScreen()===void 0}getNextScreen(){const e=this.currentScreen;if(!e)return;const t=this._steps.indexOf(e);if(!(t<0)){if(e.kind==="preview"&&this._precedingStepIsDocumentCapture(t)&&this.documentCapturesBack()&&this._captured.backDocumentPath===void 0&&!this._documentBackSkipped){const i=this._steps[t-1];if(i!==void 0)return i}return e.kind==="capture"&&e.config.captureType===_.document&&this._documentBackSkipped&&this._steps[t+1]?.kind==="preview"?this._steps[t+2]:e.kind==="capture"&&e.config.captureType===_.document&&this.documentCapturesBack()&&this._captured.frontDocumentPath!==void 0&&this._captured.backDocumentPath===void 0&&!this._documentBackSkipped&&!this.documentPreviewFollowsCapture()?e:this._steps[t+1]}}navigateToNext(){if(this._disposed)return;const e=this.getNextScreen();if(!e){const t=this._jobSubmissionState;if(this._submissionResponse){this._finishFlow({kind:"completed",job:this._submissionResponse});return}if(t.kind==="failure"){this._finishFlow({kind:"failed",error:t.error});return}const i=t.kind==="success"?t.response:{userId:"",jobId:"",status:"",message:""};this._finishFlow({kind:"completed",job:i});return}this._navigationPath=[...this._navigationPath,e],this._logEvent(m.screenViewed,{[a.screenName]:this._screenAnalyticsName(e)}),e.kind==="processing"&&this._jobSubmissionState.kind==="notAttempted"&&this._repository!==void 0&&(this._jobSubmissionState={kind:"loading"}),this._notify(),e.kind==="processing"&&this._jobSubmissionState.kind==="loading"&&this._repository!==void 0&&setTimeout(()=>{this._disposed||this._submit()},0)}navigateBack(){if(!this._disposed){if(this.isFirstScreen){this._onExit({kind:"cancelled"});return}this._logEvent(m.retakeRequested),this._navigationPath=this._navigationPath.slice(0,-1),this._notify()}}navigateToStart(){if(this._disposed)return;const e=this._steps[0];this._navigationPath=e?[e]:[],this._notify()}exit(e={kind:"cancelled"}){this._disposed||this._finishFlow(e)}get captured(){return this._captured}setCapturedSelfie(e,t){this._disposed||(this._captured={...this._captured,selfiePath:e,livenessPaths:Object.freeze([...t])},this._logEvent(m.selfieCaptured,{[a.livenessImageCount]:String(t.length)}),this._notify())}setCapturedFrontDocument(e){this._disposed||(this._captured={...this._captured,frontDocumentPath:e},this._logEvent(m.documentCaptured,{[a.documentSide]:"front"}),this._notify())}setCapturedBackDocument(e){this._disposed||(this._captured={...this._captured,backDocumentPath:e},this._logEvent(m.documentCaptured,{[a.documentSide]:"both"}),this._notify())}documentCapturesBack(){for(const e of this._steps)if(e.kind==="capture"&&e.config.captureType===_.document){const t=e.config.documentConfig;return t?.documentType?.hasBackSide===!0&&(t?.captureBothSides??!1)}return!1}documentPreviewFollowsCapture(){const e=this._steps.findIndex(t=>t.kind==="capture"&&t.config.captureType===_.document);return e<0?!1:this._steps[e+1]?.kind==="preview"}currentPreviewIsDocument(){const e=this.currentScreen;return!e||e.kind!=="preview"?!1:this._precedingStepIsDocumentCapture(this._steps.indexOf(e))}currentDocumentPreviewPath(){return this._captured.backDocumentPath??this._captured.frontDocumentPath}retakeCurrentDocumentSide(){if(this._disposed)return;const e={...this._captured};e.backDocumentPath!==void 0?(delete e.backDocumentPath,this._documentImageOrigins.delete(p.Back)):(delete e.frontDocumentPath,this._documentImageOrigins.delete(p.Front),this._documentBackSkipped=!1),this._captured=e,this._notify()}skipDocumentBack(){this._disposed||(this._documentBackSkipped=!0,this._notify())}recordDocumentImageOrigin(e,t){this._disposed||this._documentImageOrigins.set(e,t)}recordSelfieCaptureTelemetry(e){this._disposed||(this._selfieCaptureTelemetry=e,this._captureCameraName(e))}recordDocumentCaptureTelemetry(e,t){this._disposed||(this._documentCaptureTelemetry.set(e,t),this._captureCameraName(t))}_captureCameraName(e){e.cameraName&&(this._cameraName=e.cameraName),e.devicePositions.length>0&&(this._devicePositions=e.devicePositions,this._deviceMovementDetected=e.deviceMovementDetected)}_documentImageOriginEntries(){const e=[],t=this._documentImageOrigins.get(p.Front);t!==void 0&&e.push({name:T,value:t});const i=this._documentImageOrigins.get(p.Back);return i!==void 0&&e.push({name:D,value:i}),e}_captureTelemetryEntries(){const e=[],t=(c,u)=>e.push({name:c,value:u}),i=this._selfieCaptureTelemetry;i&&(t("selfie_capture_duration_ms",String(i.durationMs)),t("selfie_capture_retries",String(i.retries))),this._captured.selfiePath!==void 0&&(t("selfie_image_color_depth",String(v)),t("selfie_image_pixel_config",S)),this._cameraName&&t("camera_name",this._cameraName),this._devicePositions.length>0&&(t("device_positions",JSON.stringify(this._devicePositions)),this._deviceMovementDetected!==null&&t("device_movement_detected",String(this._deviceMovementDetected)));const s=c=>c===p.Back?"back":"front";for(const c of[p.Front,p.Back]){const u=s(c),f=this._documentCaptureTelemetry.get(c);f&&(t(`document_${u}_capture_duration_ms`,String(f.durationMs)),t(`document_${u}_capture_retries`,String(f.retries)),t(`document_${u}_image_color_depth`,String(v)),t(`document_${u}_image_pixel_config`,S))}return e}_precedingStepIsDocumentCapture(e){const t=this._steps[e-1];return t?.kind==="capture"&&t.config.captureType===_.document}setConsent(e){this._disposed||(this._captured={...this._captured,consentInformation:e},this._logEvent(m.consentCaptured,{[a.decision]:"granted"}),this._notify())}get jobSubmissionState(){return this._jobSubmissionState}beginSubmissionIfNeeded(){this._disposed||this._jobSubmissionState.kind==="notAttempted"&&this._submit()}retrySubmission(){this._disposed||this._jobSubmissionState.kind!=="loading"&&(this._setSubmissionState({kind:"notAttempted"}),this.beginSubmissionIfNeeded())}_setSubmissionState(e){this._disposed||(this._jobSubmissionState=e,this._notify())}async _submit(){if(!this._repository){this._setSubmissionState({kind:"failure",error:new Error("Job submission not configured \u2014 no network/repository was supplied to <UseSmileIDBuilder>. Call `b.network((n) => n.config((c) => { c.token = ...; c.partnerConfig((p) => { p.partnerId = ...; }); }))`.")});return}let e;try{e=this._assembleJob()}catch(i){this._setSubmissionState({kind:"failure",error:i instanceof Error?i:new Error(String(i))});return}this._setSubmissionState({kind:"loading"}),this._submissionAttemptCount+=1,this._logEvent(m.jobSubmitted,{[a.jobType]:this._jobTypeName(),[a.attempt]:String(this._submissionAttemptCount)});const t=await this._repository.submit(e,this.resolvedSdkConfig);if(!this._disposed){if(t.status==="success")this._submissionResponse=t.value,this._setSubmissionState({kind:"success",response:t.value});else if(t.status==="failure"){const i=t.error instanceof Error?t.error:new Error(String(t.error));this._setSubmissionState({kind:"failure",error:i})}}}_assembleJob(){const e=this._configuration,t=e.network?.config?.jobType??n.unknown,i=k(this._resolvedTokenPayload?.consent)?void 0:this._captured.consentInformation??e.consentInformation??q,s=i!==void 0?{consent:i}:{},c=this._metadataProvider.make(this.resolvedSdkConfig),u=[...this._documentImageOriginEntries(),...this._captureTelemetryEntries(),...w(e)],f=c.withAdditionalEntries(u);switch(t){case n.smartSelfieEnrollment:{const r=this._requireSelfie(),o=this._requireUserDetails(e);return{jobType:n.smartSelfieEnrollment,selfieImage:r.selfiePath,livenessImages:r.livenessPaths,...o!==void 0?{userDetails:o}:{},...s,metadata:f,enhanced:!1,expectedLivenessImageCount:this._expectedLivenessImageCount()}}case n.smartSelfieAuthentication:{const r=this._requireSelfie(),o=this._requireUserDetails(e),d=this._requireUserId(e);return{jobType:n.smartSelfieAuthentication,selfieImage:r.selfiePath,livenessImages:r.livenessPaths,...o!==void 0?{userDetails:o}:{},userId:d,...s,metadata:f,enhanced:!1,expectedLivenessImageCount:this._expectedLivenessImageCount()}}case n.biometricKyc:{const r=this._requireSelfie(),o=e.biometricKYCParams;if(!o)throw new h({fieldName:"biometricKYCParams"});const d=this._requireUserDetails(e);return{jobType:n.biometricKyc,selfieImage:r.selfiePath,livenessImages:r.livenessPaths,params:o,...d!==void 0?{userDetails:d}:{},...s,metadata:f,expectedLivenessImageCount:this._expectedLivenessImageCount()}}case n.documentVerification:{const r=this._requireSelfie(),o=this._requireFrontDocument(),d=e.documentVerificationParams;if(!d)throw new h({fieldName:"documentVerificationParams"});const l=this._requireUserDetails(e);return{jobType:n.documentVerification,...this._documentRequestFields(r,o),country:d.country,...d.idType?{idType:d.idType}:{},...l!==void 0?{userDetails:l}:{},...s,metadata:f,expectedLivenessImageCount:this._expectedLivenessImageCount()}}case n.enhancedDocumentVerification:{const r=this._requireSelfie(),o=this._requireFrontDocument(),d=e.enhancedDocumentVerificationParams;if(!d)throw new h({fieldName:"enhancedDocumentVerificationParams"});const l=this._requireUserDetails(e);return{jobType:n.enhancedDocumentVerification,...this._documentRequestFields(r,o),country:d.country,idType:d.idType,...l!==void 0?{userDetails:l}:{},...s,metadata:f,expectedLivenessImageCount:this._expectedLivenessImageCount()}}case n.enhancedKyc:{const r=e.enhancedKYCParams;if(!r)throw new h({fieldName:"enhancedKYCParams"});const o=this._requireUserDetails(e);return{jobType:n.enhancedKyc,params:r,...o!==void 0?{userDetails:o}:{},...s,metadata:f}}case n.bvn:throw new I({fieldName:"jobType",reason:"BVN submission is not yet supported"});case n.unknown:default:throw new P}}_requireSelfie(){const{selfiePath:e,livenessPaths:t}=this._captured;if(!e)throw new h({fieldName:"selfieImage"});return{selfiePath:e,livenessPaths:t}}_requireUserDetails(e){const t=e.userDetails;if(!t){if(x(this._resolvedTokenPayload))return;throw new h({fieldName:"userDetails"})}const i=F(t,this._resolvedTokenPayload);return j(i)?void 0:i}_requireUserId(e){const t=e.userId?.trim();if(!t)throw new h({fieldName:"userId"});return t}_requireFrontDocument(){const{frontDocumentPath:e}=this._captured;if(!e)throw new h({fieldName:"frontDocument"});return e}_documentRequestFields(e,t){const{backDocumentPath:i}=this._captured;return{selfieImage:e.selfiePath,livenessImages:e.livenessPaths,frontDocument:t,...i?{backDocument:i}:{}}}_deleteCapturedFiles(){if(this._configuration.config?.allowOfflineMode)return;const{selfiePath:e,livenessPaths:t,frontDocumentPath:i,backDocumentPath:s}=this._captured;for(const c of[e,...t,i,s])if(c)try{const u=new b(c);u.exists&&u.delete()}catch{}}_finishFlow(e){if(this._deleteCapturedFiles(),e.kind==="completed"){const t={[a.result]:"success"};e.job.jobId&&(t[a.jobId]=e.job.jobId),this._logEvent(m.flowCompleted,t)}else e.kind==="failed"&&this._logEvent(m.flowCompleted,{[a.result]:"failure",[a.errorMessage]:e.error instanceof Error?e.error.message:String(e.error)});this._onExit(e)}_logEvent(e,t={}){const i=this._configuration.onAnalyticsEvent;i&&i({type:e,extras:{...t,[a.sessionId]:this._sessionId,[a.timestamp]:String(Date.now())}})}_jobTypeName(){return String(this._configuration.network?.config?.jobType??n.unknown)}_screenAnalyticsName(e){return{consent:g.consent,instructions:g.instructions,capture:g.capture,preview:g.preview,processing:g.processing}[e.kind]}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}dispose(){this._disposed=!0,this._listeners.clear()}_expectedLivenessImageCount(){if(this.enhancedLivenessEnabled)return A.EXPECTED_LIVENESS_IMAGE_COUNT;const t=E(this.resolvedSdkConfig);return t!==void 0?t-1:(this._configuration.ml?.analyzers.selfieConfig?.numSamples??O.Balanced.numSamples)-1}static _decodeToken(e){if(e.config?.allowOfflineMode)return;const t=e.network?.config?.token;if(!(!t||t.length===0))return N(t)}_notify(){for(const e of this._listeners)try{e()}catch{}}}