@smileid/usesmileid 12.3.1-SNAPSHOT.75 → 12.4.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 (136) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +2 -2
  3. package/dist/data/api/bridge_submissions.js +1 -1
  4. package/dist/l10n/strings_en.d.ts +1 -6
  5. package/dist/l10n/strings_en.js +2 -2
  6. package/dist/l10n/use_smile_id_localizations.d.ts +0 -5
  7. package/dist/l10n/use_smile_id_localizations.js +1 -1
  8. package/dist/metadata/builder_configuration.d.ts +1 -1
  9. package/dist/metadata/metadata_configuration_mappers.d.ts +1 -1
  10. package/dist/metadata/metadata_configuration_mappers.js +1 -1
  11. package/dist/metadata/use_smile_id_metadata_factory.js +1 -1
  12. package/dist/presentation/assets/png/si_guideline_document_green_book_not_blurry.png +0 -0
  13. package/dist/presentation/assets/png/si_guideline_document_not_blurry.png +0 -0
  14. package/dist/presentation/assets/png/si_guideline_document_passport_not_blurry.png +0 -0
  15. package/dist/presentation/assets/svg/document_shimmer_strings.d.ts +4 -4
  16. package/dist/presentation/assets/svg/document_shimmer_strings.js +200 -1
  17. package/dist/presentation/assets/svg/instruction_svg_strings.d.ts +16 -19
  18. package/dist/presentation/assets/svg/instruction_svg_strings.js +504 -1
  19. package/dist/presentation/assets/svg/svg_strings.d.ts +22 -22
  20. package/dist/presentation/assets/svg/svg_strings.js +53 -17
  21. package/dist/presentation/components/helpers/button_label_padding.d.ts +6 -0
  22. package/dist/presentation/components/helpers/button_label_padding.js +1 -0
  23. package/dist/presentation/components/helpers/enhanced_smart_selfie_turn_directive.d.ts +63 -0
  24. package/dist/presentation/components/helpers/enhanced_smart_selfie_turn_directive.js +1 -0
  25. package/dist/presentation/components/helpers/partner_icon_fit.d.ts +10 -0
  26. package/dist/presentation/components/helpers/partner_icon_fit.js +1 -0
  27. package/dist/presentation/components/icons/index.d.ts +18 -14
  28. package/dist/presentation/components/icons/index.js +1 -1
  29. package/dist/presentation/components/use_smile_id_attribution.d.ts +1 -5
  30. package/dist/presentation/components/use_smile_id_attribution.js +1 -1
  31. package/dist/presentation/components/use_smile_id_back_button.d.ts +2 -2
  32. package/dist/presentation/components/use_smile_id_back_button.js +1 -1
  33. package/dist/presentation/components/use_smile_id_button.d.ts +8 -2
  34. package/dist/presentation/components/use_smile_id_button.js +1 -1
  35. package/dist/presentation/components/use_smile_id_capture_content.d.ts +1 -1
  36. package/dist/presentation/components/use_smile_id_capture_content.js +1 -1
  37. package/dist/presentation/components/use_smile_id_capture_instruction_animation.js +1 -1
  38. package/dist/presentation/components/use_smile_id_captured_document_image.d.ts +4 -0
  39. package/dist/presentation/components/use_smile_id_captured_document_image.js +1 -1
  40. package/dist/presentation/components/use_smile_id_captured_image_oval.d.ts +5 -0
  41. package/dist/presentation/components/use_smile_id_captured_image_oval.js +1 -1
  42. package/dist/presentation/components/use_smile_id_card_surface.d.ts +14 -3
  43. package/dist/presentation/components/use_smile_id_card_surface.js +1 -1
  44. package/dist/presentation/components/use_smile_id_close_button.d.ts +22 -0
  45. package/dist/presentation/components/use_smile_id_close_button.js +1 -0
  46. package/dist/presentation/components/use_smile_id_component_specs.d.ts +238 -0
  47. package/dist/presentation/components/use_smile_id_component_specs.js +1 -0
  48. package/dist/presentation/components/use_smile_id_confirmation_buttons.d.ts +3 -3
  49. package/dist/presentation/components/use_smile_id_confirmation_buttons.js +1 -1
  50. package/dist/presentation/components/use_smile_id_consent_row.js +1 -1
  51. package/dist/presentation/components/use_smile_id_content_card.d.ts +15 -12
  52. package/dist/presentation/components/use_smile_id_content_card.js +1 -1
  53. package/dist/presentation/components/use_smile_id_document_capture_controls.js +1 -1
  54. package/dist/presentation/components/use_smile_id_document_capture_spinner.d.ts +12 -0
  55. package/dist/presentation/components/use_smile_id_document_capture_spinner.js +1 -0
  56. package/dist/presentation/components/use_smile_id_document_feedback_chip.d.ts +11 -0
  57. package/dist/presentation/components/use_smile_id_document_feedback_chip.js +1 -0
  58. package/dist/presentation/components/use_smile_id_document_overlay.d.ts +6 -2
  59. package/dist/presentation/components/use_smile_id_document_overlay.js +1 -1
  60. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.d.ts +10 -2
  61. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_direction_animation.js +1 -1
  62. package/dist/presentation/components/use_smile_id_enhanced_smart_selfie_full_animation.js +1 -1
  63. package/dist/presentation/components/use_smile_id_expandable_icon.d.ts +3 -2
  64. package/dist/presentation/components/use_smile_id_expandable_icon.js +1 -1
  65. package/dist/presentation/components/use_smile_id_face_overlay.js +1 -1
  66. package/dist/presentation/components/use_smile_id_failed_content.d.ts +9 -0
  67. package/dist/presentation/components/use_smile_id_failed_content.js +1 -1
  68. package/dist/presentation/components/use_smile_id_guideline_thumbnail.js +1 -1
  69. package/dist/presentation/components/use_smile_id_instructions_hero.js +1 -1
  70. package/dist/presentation/components/use_smile_id_loading_content.js +1 -1
  71. package/dist/presentation/components/use_smile_id_loading_indicator.d.ts +4 -2
  72. package/dist/presentation/components/use_smile_id_loading_indicator.js +1 -1
  73. package/dist/presentation/components/use_smile_id_oval_border_palette.js +1 -1
  74. package/dist/presentation/components/use_smile_id_partner_icon.d.ts +8 -12
  75. package/dist/presentation/components/use_smile_id_partner_icon.js +1 -1
  76. package/dist/presentation/components/use_smile_id_rounded_checkbox.d.ts +2 -2
  77. package/dist/presentation/components/use_smile_id_rounded_checkbox.js +1 -1
  78. package/dist/presentation/components/use_smile_id_status_indicator.d.ts +3 -0
  79. package/dist/presentation/components/use_smile_id_status_indicator.js +1 -1
  80. package/dist/presentation/components/use_smile_id_success_content.d.ts +5 -0
  81. package/dist/presentation/components/use_smile_id_success_content.js +1 -1
  82. package/dist/presentation/flow/dsl/screen_builders.d.ts +14 -3
  83. package/dist/presentation/flow/dsl/screen_builders.js +1 -1
  84. package/dist/presentation/flow/dsl/theme_config_builder.d.ts +6 -1
  85. package/dist/presentation/flow/dsl/theme_config_builder.js +1 -1
  86. package/dist/presentation/flow/large_screen_frame.d.ts +61 -0
  87. package/dist/presentation/flow/large_screen_frame.js +1 -0
  88. package/dist/presentation/flow/model/instructions_defaults.js +1 -1
  89. package/dist/presentation/flow/screen/orchestrated_capture_screen.js +1 -1
  90. package/dist/presentation/flow/screen/orchestrated_consent_screen.d.ts +2 -2
  91. package/dist/presentation/flow/screen/orchestrated_consent_screen.js +1 -1
  92. package/dist/presentation/flow/use_smile_id_flow.js +1 -1
  93. package/dist/presentation/flow/validation/flow_validator.d.ts +1 -1
  94. package/dist/presentation/flow/validation/flow_validator.js +1 -1
  95. package/dist/presentation/screen/helpers/capture_screen_helpers.d.ts +5 -0
  96. package/dist/presentation/screen/helpers/capture_screen_helpers.js +1 -1
  97. package/dist/presentation/screen/helpers/capture_ui_state.js +1 -1
  98. package/dist/presentation/screen/helpers/scan_state_to_overlay_state.js +1 -1
  99. package/dist/presentation/screen/helpers/use_capture_orientation_lock.d.ts +4 -0
  100. package/dist/presentation/screen/helpers/use_capture_orientation_lock.js +1 -1
  101. package/dist/presentation/screen/use_smile_id_capture_screen.d.ts +4 -0
  102. package/dist/presentation/screen/use_smile_id_capture_screen.js +1 -1
  103. package/dist/presentation/screen/use_smile_id_consent_screen.d.ts +6 -4
  104. package/dist/presentation/screen/use_smile_id_consent_screen.js +1 -1
  105. package/dist/presentation/screen/use_smile_id_document_back_instructions.js +1 -1
  106. package/dist/presentation/screen/use_smile_id_document_preview_screen.js +1 -1
  107. package/dist/presentation/screen/use_smile_id_instructions_screen.d.ts +2 -1
  108. package/dist/presentation/screen/use_smile_id_instructions_screen.js +2 -2
  109. package/dist/presentation/screen/use_smile_id_preview_screen.js +1 -1
  110. package/dist/presentation/screen/use_smile_id_processing_screen.d.ts +2 -0
  111. package/dist/presentation/screen/use_smile_id_processing_screen.js +1 -1
  112. package/dist/presentation/state/use_smile_id_overlay_state.d.ts +5 -8
  113. package/dist/presentation/state/use_smile_id_overlay_state.js +1 -1
  114. package/dist/presentation/theme/theme.d.ts +27 -17
  115. package/dist/presentation/theme/theme.js +1 -1
  116. package/dist/presentation/use_smile_id_test_ids.d.ts +63 -0
  117. package/dist/presentation/use_smile_id_test_ids.js +1 -0
  118. package/dist/presentation/utils/use_high_contrast.d.ts +5 -0
  119. package/dist/presentation/utils/use_high_contrast.js +1 -0
  120. package/package.json +7 -7
  121. package/dist/presentation/assets/svg/si_attribution.svg +0 -19
  122. package/dist/presentation/assets/svg/si_attribution_dark.svg +0 -19
  123. package/dist/presentation/assets/svg/si_checkbox_check.svg +0 -3
  124. package/dist/presentation/assets/svg/si_consent_biometric.svg +0 -9
  125. package/dist/presentation/assets/svg/si_consent_biometric_dark.svg +0 -9
  126. package/dist/presentation/assets/svg/si_consent_contact.svg +0 -8
  127. package/dist/presentation/assets/svg/si_consent_contact_dark.svg +0 -8
  128. package/dist/presentation/assets/svg/si_consent_device.svg +0 -12
  129. package/dist/presentation/assets/svg/si_consent_device_dark.svg +0 -12
  130. package/dist/presentation/assets/svg/si_consent_personal.svg +0 -6
  131. package/dist/presentation/assets/svg/si_consent_personal_dark.svg +0 -6
  132. package/dist/presentation/assets/svg/si_expand_more.svg +0 -3
  133. package/dist/presentation/assets/svg/si_plus.svg +0 -4
  134. package/dist/presentation/assets/svg/si_smile_consent_icon.svg +0 -4
  135. package/dist/presentation/components/use_smile_id_capture_spinner.d.ts +0 -8
  136. package/dist/presentation/components/use_smile_id_capture_spinner.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  Full release notes: [Smile ID docs](https://docs.usesmileid.com/developer-resources/sdks/mobile/release-notes/react-native-expo).
2
2
 
3
+ ## 12.4.0
4
+
5
+ See the repository CHANGELOG for the 12.4.0 release notes.
6
+
7
+
3
8
  ## 12.3.0
4
9
 
5
10
  See the repository CHANGELOG for the 12.3.0 release notes.
package/README.md CHANGED
@@ -32,7 +32,7 @@ Sizes are measured on every push to `main` and updated automatically by CI.
32
32
  - Xcode (latest stable) — iOS 16.4 deployment target (set by Expo SDK 56's modules; the Smile ID iOS SDK itself supports iOS 15)
33
33
  - Android Gradle Plugin 8.11.1+ — `compileSdk` 36 or newer (React Native's default; nothing to set) and `minSdk` 24, matching the native Smile ID SDK and the kamera engine. The ML Kit config plugins set the Kotlin and KSP versions the AARs were compiled with. The 12.0.0–12.0.2 AARs required compileSdk 37 and `minSdk` 26 instead; on those releases, install platform 37 before Gradle runs (on EAS, an `eas-build-pre-install` script: `yes | sdkmanager --licenses >/dev/null; sdkmanager "platforms;android-37.0"`).
34
34
 
35
- `12.3.0` is built and verified against Expo SDK 57 and React Native 0.86. The floors above are the supported minimum and keep working.
35
+ `12.4.0` is built and verified against Expo SDK 57 and React Native 0.86. The floors above are the supported minimum and keep working.
36
36
 
37
37
  ## Installation
38
38
 
@@ -372,7 +372,7 @@ import { CaptureType } from "@smileid/usesmileid";
372
372
  b.screens((screens) => {
373
373
  screens.consent((c) => {
374
374
  c.partnerName = "Acme Corp";
375
- c.partnerIcon = <Image source={require("./assets/logo.png")} style={{ width: 36, height: 36 }} />;
375
+ c.partnerIcon = <Image source={require("./assets/logo.png")} style={{ width: 30, height: 30 }} />;
376
376
  c.partnerPrivacyPolicyUrl = "https://acme.com/privacy";
377
377
  c.onConsentGranted = (info) => console.log("Consent:", info);
378
378
  });
@@ -1 +1 @@
1
- "use strict";import{File as S}from"expo-file-system";import{filePath as w}from"../util/file_path";import{withScratchDirectory as x}from"../util/scratch_directory";import{sourceSdkIdentifier as k}from"@smileid/usesmileid_bridge";import{NativeNetworkClient as b,NativeNetworkError as y,toNativeNetworkError as E}from"@smileid/usesmileid_bridge/internal";import{usesSandbox as C}from"./environment";import{testRoutePort as D}from"./test_route";import{LogLevel as d,RetryStrategy as m}from"../../core/models/network_config";import{decodeSecurityPolicyBitCode as M}from"../util/use_smile_id_token_decoder";import{NetworkServerException as T,NetworkTimeoutException as _,NetworkTransportException as v}from"../../core/exception/use_smile_id_network_exception";import{UseSmileIDErrorCode as c}from"../../core/exception/use_smile_id_error_code";const I="12.3.0";export class BridgeSubmissions{_client;_routed;constructor(t,n){this._client=t,this._routed=n}static configure(t,n=b.shared(),i=D(t)??null){const a=t.config?.logging,o=t.config?.onTokenExpired,{onRequest:s,onResponse:l}=t,h={...BridgeSubmissions.wireConfig(t),...i===null?{}:{testRoute:{port:i}}},N={onRequest:s?r=>s({method:String(r.method??""),url:String(r.url??""),headers:g(r.headers)}):void 0,onResponse:l?r=>l({method:String(r.method??""),url:String(r.url??""),status:Number(r.status??0),durationMillis:Number(r.durationMillis??0),headers:g(r.headers)}):void 0,onTokenExpired:o,onLog:a?.enabled&&a.level!==d.none?r=>console.log(`[UseSmileID] ${r}`):void 0};try{n.configure(h,N)}catch(r){throw E(r)}return new BridgeSubmissions(n,i!==null)}static wireConfig(t){const n=t.config,i=n?.token??"",a=t.timeouts,o=n?.logging;return{partnerId:n?.partnerConfig?.partnerId??"",environment:C(n?.partnerConfig)?"sandbox":"production",token:i,sourceSdk:k(),sourceSdkVersion:I,policy:M(i)??null,timeouts:{connectSeconds:a?.connect??60,readSeconds:a?.read??60,writeSeconds:a?.write??60,callSeconds:a?.call??120},retry:R(t.retry),cache:{enabled:t.cache?.enabled??!0,maxSizeBytes:t.cache?.maxSize??50*1024*1024},logging:{enabled:o?.enabled??!0,level:(o?.level??d.basic).toUpperCase(),redactHeaders:o?.redactHeaders??[]}}}warm(){this._routed||this._client.warm()}async submit(t,n){try{return await this._client.submit({path:t,parts:n.toWire()})}catch(i){throw p(i)}}async seal(t,n){return x("si_sealed",async i=>{const a=new S(i,"package.json");try{await this._client.seal({path:t,parts:n.toWire()},w(a.uri))}catch(s){throw p(s)}const o=JSON.parse(await a.text());return{headers:Object.fromEntries(Object.entries(o.headers??{}).map(([s,l])=>[s,String(l)])),encryptedPackage:o.encryptedPackage,packageNonce:o.packageNonce,packageTag:o.packageTag}})}}function p(e){if(!(e instanceof y))return e;const t=O.find(n=>n===e.code);return e.status!==void 0?new T({statusCode:e.status,message:e.message,cause:e,...t===c.Network.CallbackUrlRequired?{errorCode:t}:{}}):t===c.Network.Timeout?new _({message:e.message,cause:e}):new v({message:e.message,cause:e,errorCode:t??(e.retryable===!0?c.Network.ConnectionFailed:c.Network.RequestFailed)})}const O=Object.values(c.Network);export class BridgeSealed extends Error{sealed;constructor(t){super("Sealed by the native client"),this.sealed=t,this.name="BridgeSealed"}}function g(e){const t={};if(e===null||typeof e!="object")return t;for(const[n,i]of Object.entries(e))t[n]=Array.isArray(i)?i.map(String).join(", "):String(i);return t}function R(e){if(e===void 0||e.strategy===m.none)return{strategy:"none"};const t=Number.isNaN(e.maxAttempts)?1:Math.min(j,Math.max(1,Math.ceil(e.maxAttempts)));return e.strategy===m.fixed?{strategy:"fixed",maxAttempts:t,fixedDelaySeconds:u(e.fixedDelay)}:{strategy:"exponential",maxAttempts:t,initialDelaySeconds:u(e.initialDelay),multiplier:F(e),maxDelaySeconds:f(e),jitter:Number.isNaN(e.jitter)?0:Math.min(1,Math.max(0,e.jitter))}}const j=2**31-1,A=86400;function f(e){return e.maxDelay===Number.POSITIVE_INFINITY?A:u(e.maxDelay)}function u(e){return Number.isFinite(e)?Math.max(0,e):0}function F(e){const t=u(e.initialDelay);return t===0||Number.isNaN(e.multiplier)?1:Number.isFinite(e.multiplier)?Math.max(0,e.multiplier):e.multiplier>0?Math.max(1,f(e)/t):0}
1
+ "use strict";import{File as S}from"expo-file-system";import{filePath as w}from"../util/file_path";import{withScratchDirectory as x}from"../util/scratch_directory";import{sourceSdkIdentifier as k}from"@smileid/usesmileid_bridge";import{NativeNetworkClient as b,NativeNetworkError as y,toNativeNetworkError as E}from"@smileid/usesmileid_bridge/internal";import{usesSandbox as C}from"./environment";import{testRoutePort as D}from"./test_route";import{LogLevel as d,RetryStrategy as m}from"../../core/models/network_config";import{decodeSecurityPolicyBitCode as M}from"../util/use_smile_id_token_decoder";import{NetworkServerException as T,NetworkTimeoutException as _,NetworkTransportException as v}from"../../core/exception/use_smile_id_network_exception";import{UseSmileIDErrorCode as c}from"../../core/exception/use_smile_id_error_code";const I="12.4.0";export class BridgeSubmissions{_client;_routed;constructor(t,n){this._client=t,this._routed=n}static configure(t,n=b.shared(),i=D(t)??null){const a=t.config?.logging,o=t.config?.onTokenExpired,{onRequest:s,onResponse:l}=t,h={...BridgeSubmissions.wireConfig(t),...i===null?{}:{testRoute:{port:i}}},N={onRequest:s?r=>s({method:String(r.method??""),url:String(r.url??""),headers:g(r.headers)}):void 0,onResponse:l?r=>l({method:String(r.method??""),url:String(r.url??""),status:Number(r.status??0),durationMillis:Number(r.durationMillis??0),headers:g(r.headers)}):void 0,onTokenExpired:o,onLog:a?.enabled&&a.level!==d.none?r=>console.log(`[UseSmileID] ${r}`):void 0};try{n.configure(h,N)}catch(r){throw E(r)}return new BridgeSubmissions(n,i!==null)}static wireConfig(t){const n=t.config,i=n?.token??"",a=t.timeouts,o=n?.logging;return{partnerId:n?.partnerConfig?.partnerId??"",environment:C(n?.partnerConfig)?"sandbox":"production",token:i,sourceSdk:k(),sourceSdkVersion:I,policy:M(i)??null,timeouts:{connectSeconds:a?.connect??60,readSeconds:a?.read??60,writeSeconds:a?.write??60,callSeconds:a?.call??120},retry:R(t.retry),cache:{enabled:t.cache?.enabled??!0,maxSizeBytes:t.cache?.maxSize??50*1024*1024},logging:{enabled:o?.enabled??!0,level:(o?.level??d.basic).toUpperCase(),redactHeaders:o?.redactHeaders??[]}}}warm(){this._routed||this._client.warm()}async submit(t,n){try{return await this._client.submit({path:t,parts:n.toWire()})}catch(i){throw p(i)}}async seal(t,n){return x("si_sealed",async i=>{const a=new S(i,"package.json");try{await this._client.seal({path:t,parts:n.toWire()},w(a.uri))}catch(s){throw p(s)}const o=JSON.parse(await a.text());return{headers:Object.fromEntries(Object.entries(o.headers??{}).map(([s,l])=>[s,String(l)])),encryptedPackage:o.encryptedPackage,packageNonce:o.packageNonce,packageTag:o.packageTag}})}}function p(e){if(!(e instanceof y))return e;const t=O.find(n=>n===e.code);return e.status!==void 0?new T({statusCode:e.status,message:e.message,cause:e,...t===c.Network.CallbackUrlRequired?{errorCode:t}:{}}):t===c.Network.Timeout?new _({message:e.message,cause:e}):new v({message:e.message,cause:e,errorCode:t??(e.retryable===!0?c.Network.ConnectionFailed:c.Network.RequestFailed)})}const O=Object.values(c.Network);export class BridgeSealed extends Error{sealed;constructor(t){super("Sealed by the native client"),this.sealed=t,this.name="BridgeSealed"}}function g(e){const t={};if(e===null||typeof e!="object")return t;for(const[n,i]of Object.entries(e))t[n]=Array.isArray(i)?i.map(String).join(", "):String(i);return t}function R(e){if(e===void 0||e.strategy===m.none)return{strategy:"none"};const t=Number.isNaN(e.maxAttempts)?1:Math.min(j,Math.max(1,Math.ceil(e.maxAttempts)));return e.strategy===m.fixed?{strategy:"fixed",maxAttempts:t,fixedDelaySeconds:u(e.fixedDelay)}:{strategy:"exponential",maxAttempts:t,initialDelaySeconds:u(e.initialDelay),multiplier:F(e),maxDelaySeconds:f(e),jitter:Number.isNaN(e.jitter)?0:Math.min(1,Math.max(0,e.jitter))}}const j=2**31-1,A=86400;function f(e){return e.maxDelay===Number.POSITIVE_INFINITY?A:u(e.maxDelay)}function u(e){return Number.isFinite(e)?Math.max(0,e):0}function F(e){const t=u(e.initialDelay);return t===0||Number.isNaN(e.multiplier)?1:Number.isFinite(e.multiplier)?Math.max(0,e.multiplier):e.multiplier>0?Math.max(1,f(e)/t):0}
@@ -56,7 +56,6 @@ export declare const enStrings: {
56
56
  readonly si_capture_rotate_device: "Please hold your device upright";
57
57
  readonly si_capture_smile: "Please smile…";
58
58
  readonly si_capture_start_button: "Start Capture";
59
- readonly si_capture_warning_text: "Avoid poor lighting, accessories, or looking away as this may lead to rejection of your selfie.";
60
59
  readonly si_capture_hold_steady: "Hold still…";
61
60
  readonly si_capture_timeout: "Capture timed out. Try again.";
62
61
  readonly si_capture_failed: "Capture failed. Please try again.";
@@ -88,7 +87,6 @@ export declare const enStrings: {
88
87
  readonly si_cd_success: "Success";
89
88
  readonly si_cd_failure: "Failure";
90
89
  readonly si_cd_powered_by_smile_id: "Powered by Smile ID";
91
- readonly si_cd_add: "Add";
92
90
  readonly si_cd_close: "Close";
93
91
  readonly si_cd_document_capture_shutter: "Capture document";
94
92
  readonly si_cd_document_gallery: "Upload document from gallery";
@@ -99,9 +97,6 @@ export declare const enStrings: {
99
97
  readonly si_cd_expanded: "Expanded";
100
98
  readonly si_cd_collapsed: "Collapsed";
101
99
  readonly si_cd_smile_id: "Smile ID";
102
- readonly si_camera_error_title: "Camera error";
103
- readonly si_camera_error_body: "The camera is unavailable. Try again.";
104
- readonly si_label_ok: "OK";
105
100
  readonly si_document_center: "Centre the document in the frame";
106
101
  readonly si_document_too_far: "Move closer to the document";
107
102
  readonly si_document_too_close: "Move farther from the document";
@@ -139,4 +134,4 @@ export declare const enStrings: {
139
134
  };
140
135
  export type SiKey = keyof typeof enStrings;
141
136
  /** Total canonical key count — pinned in tests to catch a missed addition/deletion at PR time. */
142
- export declare const CANONICAL_KEY_COUNT: 130;
137
+ export declare const CANONICAL_KEY_COUNT: 125;
@@ -1,2 +1,2 @@
1
- "use strict";export const enStrings={si_selfie_capture_complete:"Selfie capture is complete",si_capturing:"Capturing\u2026",si_selfie_capture_unsatisfied:"Some requirements have not been met for selfie capture",si_label_continue:"Continue",si_consent_title:"{partnerName} would like to verify your identity using Smile ID.",si_consent_subtitle:"By selecting {allow}, you consent to {smile_id} collecting and processing your personal data for the purpose of providing identity verification and fraud prevention services, and securely sharing the results with {partner}.",si_consent_subtitle_smile_id:"Smile ID",si_consent_processing:"This may include processing:",si_consent_contact:"Contact Information",si_consent_personal:"Personal Information",si_consent_biometric:"Biometric Data and Identification Documents",si_consent_device:"Device Information",si_consent_consent:"I consent to my identity information and related data being shared with service providers to prevent fraud and securely process this transaction.",si_consent_allow:"Allow",si_consent_deny:"Deny",si_consent_learn_more:"Learn more",si_consent_learn_more_description:"{smile_id} and {partner} process your personal and biometric data to verify your identity and prevent fraud. We retain your data for {retention} to meet legal obligations. We may share data with specific partners to complete this check.",si_consent_learn_more_description_smile_id:"Smile ID",si_consent_learn_more_description_retention:"5 years",si_consent_learn_more_dsar_prefix:"You can withdraw consent, access your data, or exercise your rights at our ",si_consent_learn_more_dsar_link:"DSAR page",si_consent_learn_more_privacy_prefix:"Full details are in the ",si_consent_learn_more_privacy_smile_link:"Smile ID",si_consent_learn_more_privacy_and:" and ",si_consent_learn_more_privacy_partner_link:"{partnerName}",si_consent_learn_more_privacy_suffix:" Privacy Policies.",si_instructions_title_prefix:"Get ready to capture your",si_instructions_emphasis_selfie:"selfie",si_instructions_emphasis_visa:"Visa",si_instructions_capture_guidelines:"Capture Guidelines",si_instructions_guideline_good:"Good",si_instructions_guideline_accessories:"Accessories",si_instructions_guideline_multiple_faces:"Multiple Faces",si_instructions_guideline_poor_lighting:"Poor Lighting",si_cd_guideline_allowed:"Allowed",si_cd_guideline_blocked:"Not allowed",si_instructions_next:"Next",si_start_capture_instruction:"Place your head in the frame and press Start Capture to proceed",si_capture_initial_instruction:"Centre your face in the frame and follow the instruction on the screen",si_capture_too_close:"Move your device away from your face",si_capture_too_far:"Move your device closer to your face",si_capture_center_face:"Centre your face within the oval frame",si_capture_move_left:"Move your device to the left",si_capture_move_right:"Move your device to the right",si_capture_move_higher:"Move your device higher",si_capture_move_lower:"Move your device lower",si_capture_low_light:"Move to a well lit environment",si_capture_rotate_device:"Please hold your device upright",si_capture_smile:"Please smile\u2026",si_capture_start_button:"Start Capture",si_capture_warning_text:"Avoid poor lighting, accessories, or looking away as this may lead to rejection of your selfie.",si_capture_hold_steady:"Hold still\u2026",si_capture_timeout:"Capture timed out. Try again.",si_capture_failed:"Capture failed. Please try again.",si_capture_camera_unavailable:"No camera frames received. Close other apps using the camera, then try again.",si_capture_adjusting:"Adjusting\u2026",si_capture_bright_light:"Please move away from direct light",si_preview_title:"Confirm image quality",si_preview_subtitle:"Make sure that the image is clear.",si_preview_retake:"Retake",si_preview_confirm:"Confirm",si_preview_accessibility_image:"Captured image. Review it, then tap Confirm to continue or Retake to capture again.",si_preview_accessibility_retake:"Retake",si_processing_submitting:"Submitting\u2026",si_processing_submitting_subtitle:`This might take a moment\u2026
2
- Do not close or refresh this page`,si_processing_success_title:"Submission Complete",si_processing_success_message:"Thank you for your submission. We are currently verifying your details.",si_processing_failed_title:"Submission Failed",si_processing_failed_message:"Reasons for failure",si_processing_error_no_connection:"No internet connection.",si_processing_error_generic:"Something went wrong. Try again.",si_processing_error_retry_later:"Try again in a moment.",si_processing_error_camera_permission:"Allow camera access in your device settings.",si_processing_error_unavailable:"Something went wrong. Contact support.",si_processing_retry:"Retry",si_processing_exit:"Exit",si_accessibility_capture_progress:"Capture progress",si_cd_back:"Back",si_cd_captured_image:"Captured image",si_cd_success:"Success",si_cd_failure:"Failure",si_cd_powered_by_smile_id:"Powered by Smile ID",si_cd_add:"Add",si_cd_close:"Close",si_cd_document_capture_shutter:"Capture document",si_cd_document_gallery:"Upload document from gallery",si_cd_checkbox:"Checkbox",si_cd_checkbox_checked:"Checked",si_cd_checkbox_unchecked:"Unchecked",si_cd_expand:"Expand",si_cd_expanded:"Expanded",si_cd_collapsed:"Collapsed",si_cd_smile_id:"Smile ID",si_camera_error_title:"Camera error",si_camera_error_body:"The camera is unavailable. Try again.",si_label_ok:"OK",si_document_center:"Centre the document in the frame",si_document_too_far:"Move closer to the document",si_document_too_close:"Move farther from the document",si_document_hold_still:"Hold still",si_document_blurry:"Hold the document steady and flat",si_document_glare:"Tilt the document away from the light",si_doc_v_capture_directive_wrong_aspect_ratio:"Match the document to the outline",si_document_initial_instruction:"Align document in frame",si_document_ready:"Align document in frame and press capture to proceed",si_document_capturing:"Capturing document\u2026",si_document_capture_complete:"Document captured",si_document_capture_unsatisfied:"Document lost. Try again.",si_document_gallery_image_too_small:"Selected image is too small. Choose a higher-resolution photo.",si_document_gallery_image_failed:"Couldn't load the selected image. Try another.",si_capture_button_document:"Capture Document",si_document_flip_title:"Flip your {id_type}",si_document_type_passport:"Passport",si_document_type_green_book:"Green Book",si_document_type_generic:"Document",si_document_capture_back:"Capture Back of ID",si_document_skip_back:"Skip",si_document_guideline_good:"Good",si_document_guideline_not_cropped:"Not cropped",si_document_guideline_not_blurry:"Not blurry",si_document_guideline_not_reflective:"Not reflective",si_document_preview_title:"Confirm image quality",si_document_preview_subtitle:"Make sure that all the information is readable",si_document_processing_complete:"Submission Complete",si_ess_look_left:"Turn your head to the left",si_ess_look_right:"Turn your head to the right",si_ess_look_up:"Turn your head slightly upwards",si_ess_look_at_camera:"Look at the camera",si_ess_capture_initial_instruction:"Centre your face in the frame and turn your head in the direction of the arrow.",si_ess_hold_still:"Hold still\u2026"},CANONICAL_KEY_COUNT=130;
1
+ "use strict";export const enStrings={si_selfie_capture_complete:"Selfie capture is complete",si_capturing:"Capturing\u2026",si_selfie_capture_unsatisfied:"Some requirements have not been met for selfie capture",si_label_continue:"Continue",si_consent_title:"{partnerName} would like to verify your identity using Smile ID.",si_consent_subtitle:"By selecting {allow}, you consent to {smile_id} collecting and processing your personal data for the purpose of providing identity verification and fraud prevention services, and securely sharing the results with {partner}.",si_consent_subtitle_smile_id:"Smile ID",si_consent_processing:"This may include processing:",si_consent_contact:"Contact Information",si_consent_personal:"Personal Information",si_consent_biometric:"Biometric Data and Identification Documents",si_consent_device:"Device Information",si_consent_consent:"I consent to my identity information and related data being shared with service providers to prevent fraud and securely process this transaction.",si_consent_allow:"Allow",si_consent_deny:"Deny",si_consent_learn_more:"Learn more",si_consent_learn_more_description:"{smile_id} and {partner} process your personal and biometric data to verify your identity and prevent fraud. We retain your data for {retention} to meet legal obligations. We may share data with specific partners to complete this check.",si_consent_learn_more_description_smile_id:"Smile ID",si_consent_learn_more_description_retention:"5 years",si_consent_learn_more_dsar_prefix:"You can withdraw consent, access your data, or exercise your rights at our ",si_consent_learn_more_dsar_link:"DSAR page",si_consent_learn_more_privacy_prefix:"Full details are in the ",si_consent_learn_more_privacy_smile_link:"Smile ID",si_consent_learn_more_privacy_and:" and ",si_consent_learn_more_privacy_partner_link:"{partnerName}",si_consent_learn_more_privacy_suffix:" Privacy Policies.",si_instructions_title_prefix:"Get ready to capture your",si_instructions_emphasis_selfie:"selfie",si_instructions_emphasis_visa:"Visa",si_instructions_capture_guidelines:"Capture Guidelines",si_instructions_guideline_good:"Good",si_instructions_guideline_accessories:"Accessories",si_instructions_guideline_multiple_faces:"Multiple Faces",si_instructions_guideline_poor_lighting:"Poor Lighting",si_cd_guideline_allowed:"Allowed",si_cd_guideline_blocked:"Not allowed",si_instructions_next:"Next",si_start_capture_instruction:"Place your head in the frame and press Start Capture to proceed",si_capture_initial_instruction:"Centre your face in the frame and follow the instruction on the screen",si_capture_too_close:"Move your device away from your face",si_capture_too_far:"Move your device closer to your face",si_capture_center_face:"Centre your face within the oval frame",si_capture_move_left:"Move your device to the left",si_capture_move_right:"Move your device to the right",si_capture_move_higher:"Move your device higher",si_capture_move_lower:"Move your device lower",si_capture_low_light:"Move to a well lit environment",si_capture_rotate_device:"Please hold your device upright",si_capture_smile:"Please smile\u2026",si_capture_start_button:"Start Capture",si_capture_hold_steady:"Hold still\u2026",si_capture_timeout:"Capture timed out. Try again.",si_capture_failed:"Capture failed. Please try again.",si_capture_camera_unavailable:"No camera frames received. Close other apps using the camera, then try again.",si_capture_adjusting:"Adjusting\u2026",si_capture_bright_light:"Please move away from direct light",si_preview_title:"Confirm image quality",si_preview_subtitle:"Make sure that the image is clear.",si_preview_retake:"Retake",si_preview_confirm:"Confirm",si_preview_accessibility_image:"Captured image. Review it, then tap Confirm to continue or Retake to capture again.",si_preview_accessibility_retake:"Retake",si_processing_submitting:"Submitting\u2026",si_processing_submitting_subtitle:`This might take a moment\u2026
2
+ Do not close or refresh this page`,si_processing_success_title:"Submission Complete",si_processing_success_message:"Thank you for your submission. We are currently verifying your details.",si_processing_failed_title:"Submission Failed",si_processing_failed_message:"Reasons for failure",si_processing_error_no_connection:"No internet connection.",si_processing_error_generic:"Something went wrong. Try again.",si_processing_error_retry_later:"Try again in a moment.",si_processing_error_camera_permission:"Allow camera access in your device settings.",si_processing_error_unavailable:"Something went wrong. Contact support.",si_processing_retry:"Retry",si_processing_exit:"Exit",si_accessibility_capture_progress:"Capture progress",si_cd_back:"Back",si_cd_captured_image:"Captured image",si_cd_success:"Success",si_cd_failure:"Failure",si_cd_powered_by_smile_id:"Powered by Smile ID",si_cd_close:"Close",si_cd_document_capture_shutter:"Capture document",si_cd_document_gallery:"Upload document from gallery",si_cd_checkbox:"Checkbox",si_cd_checkbox_checked:"Checked",si_cd_checkbox_unchecked:"Unchecked",si_cd_expand:"Expand",si_cd_expanded:"Expanded",si_cd_collapsed:"Collapsed",si_cd_smile_id:"Smile ID",si_document_center:"Centre the document in the frame",si_document_too_far:"Move closer to the document",si_document_too_close:"Move farther from the document",si_document_hold_still:"Hold still",si_document_blurry:"Hold the document steady and flat",si_document_glare:"Tilt the document away from the light",si_doc_v_capture_directive_wrong_aspect_ratio:"Match the document to the outline",si_document_initial_instruction:"Align document in frame",si_document_ready:"Align document in frame and press capture to proceed",si_document_capturing:"Capturing document\u2026",si_document_capture_complete:"Document captured",si_document_capture_unsatisfied:"Document lost. Try again.",si_document_gallery_image_too_small:"Selected image is too small. Choose a higher-resolution photo.",si_document_gallery_image_failed:"Couldn't load the selected image. Try another.",si_capture_button_document:"Capture Document",si_document_flip_title:"Flip your {id_type}",si_document_type_passport:"Passport",si_document_type_green_book:"Green Book",si_document_type_generic:"Document",si_document_capture_back:"Capture Back of ID",si_document_skip_back:"Skip",si_document_guideline_good:"Good",si_document_guideline_not_cropped:"Not cropped",si_document_guideline_not_blurry:"Not blurry",si_document_guideline_not_reflective:"Not reflective",si_document_preview_title:"Confirm image quality",si_document_preview_subtitle:"Make sure that all the information is readable",si_document_processing_complete:"Submission Complete",si_ess_look_left:"Turn your head to the left",si_ess_look_right:"Turn your head to the right",si_ess_look_up:"Turn your head slightly upwards",si_ess_look_at_camera:"Look at the camera",si_ess_capture_initial_instruction:"Centre your face in the frame and turn your head in the direction of the arrow.",si_ess_hold_still:"Hold still\u2026"},CANONICAL_KEY_COUNT=125;
@@ -56,7 +56,6 @@ export declare class UseSmileIDLocalizations {
56
56
  */
57
57
  private _t;
58
58
  get siLabelContinue(): string;
59
- get siLabelOk(): string;
60
59
  get siSelfieCaptureComplete(): string;
61
60
  get siCapturing(): string;
62
61
  get siSelfieCaptureUnsatisfied(): string;
@@ -106,7 +105,6 @@ export declare class UseSmileIDLocalizations {
106
105
  get siCaptureRotateDevice(): string;
107
106
  get siCaptureSmile(): string;
108
107
  get siCaptureStartButton(): string;
109
- get siCaptureWarningText(): string;
110
108
  get siCaptureHoldSteady(): string;
111
109
  get siCaptureCameraUnavailable(): string;
112
110
  get siCaptureTimeout(): string;
@@ -139,7 +137,6 @@ export declare class UseSmileIDLocalizations {
139
137
  get siCdSuccess(): string;
140
138
  get siCdFailure(): string;
141
139
  get siCdPoweredBySmileId(): string;
142
- get siCdAdd(): string;
143
140
  get siCdClose(): string;
144
141
  get siCdDocumentCaptureShutter(): string;
145
142
  get siCdDocumentGallery(): string;
@@ -150,8 +147,6 @@ export declare class UseSmileIDLocalizations {
150
147
  get siCdExpanded(): string;
151
148
  get siCdCollapsed(): string;
152
149
  get siCdSmileId(): string;
153
- get siCameraErrorTitle(): string;
154
- get siCameraErrorBody(): string;
155
150
  get siDocumentCenter(): string;
156
151
  get siDocumentTooFar(): string;
157
152
  get siDocumentTooClose(): string;
@@ -1 +1 @@
1
- "use strict";import{enStrings as e}from"./strings_en";import{isDevelopmentBuild as c}from"../core/is_development_build";import{getDeviceLocale as l}from"../presentation/utils/locale_utils";const g="\u2068",d="\u2069",u=new Set;function p(r){!c()||u.has(r)||(u.add(r),console.warn(`[UseSmileID] No translations registered for locale '${r}' \u2014 the SDK is rendering English. Call UseSmileIDLocalizations.register('`+r+"', \u2026) at startup, or set b.localizations explicitly."))}export class UseSmileIDLocalizations{_overrides;constructor(s={}){this._overrides=s}static fromOverrides(s){const i={};for(const[t,_]of Object.entries(s))t.startsWith("@")||typeof _=="string"&&(i[t]=_);return new UseSmileIDLocalizations(i)}static _registry=new Map;static _registryRevision=0;static localeResolver=()=>l().split("-")[0]||"en";static register(s,i){const t={};for(const[_,n]of Object.entries(i))_.startsWith("@")||typeof n=="string"&&(t[_]=n);UseSmileIDLocalizations._registry.set(s,t),UseSmileIDLocalizations._registryRevision+=1}static clearRegistry(){UseSmileIDLocalizations._registry.clear(),UseSmileIDLocalizations._registryRevision+=1}static hasRegisteredLocales(){return UseSmileIDLocalizations._registry.size>0}static get activeLocaleKey(){return`${UseSmileIDLocalizations.localeResolver()}#${UseSmileIDLocalizations._registryRevision}`}static forActiveLocale(){const s=UseSmileIDLocalizations.localeResolver(),i=UseSmileIDLocalizations._registry.get(s);if(i)return new UseSmileIDLocalizations(i);const t=s.split("-")[0];if(t&&t!==s){const _=UseSmileIDLocalizations._registry.get(t);if(_)return new UseSmileIDLocalizations(_)}return p(s),new UseSmileIDLocalizations}_warnedMissingKey=!1;_lookup(s,i){const t=this._overrides[s];return t!==void 0?t:(c()&&!this._warnedMissingKey&&Object.keys(this._overrides).length>0&&(this._warnedMissingKey=!0,console.warn(`[UseSmileID] '${s}' is missing from the supplied translations and is rendering English; other keys may be too. Compare your overrides against the si_* key set in the SDK's English strings.`)),i)}_s(s,i){return this._lookup(s,i)}_t(s,i,t){let _=this._lookup(s,i);for(const[n,o]of Object.entries(t)){const a=o===""?o:`${g}${o}${d}`;_=_.split(`{${n}}`).join(a)}return _}get siLabelContinue(){return this._s("si_label_continue",e.si_label_continue)}get siLabelOk(){return this._s("si_label_ok",e.si_label_ok)}get siSelfieCaptureComplete(){return this._s("si_selfie_capture_complete",e.si_selfie_capture_complete)}get siCapturing(){return this._s("si_capturing",e.si_capturing)}get siSelfieCaptureUnsatisfied(){return this._s("si_selfie_capture_unsatisfied",e.si_selfie_capture_unsatisfied)}siConsentTitle(s){return this._t("si_consent_title",e.si_consent_title,{partnerName:s})}get siConsentSubtitle(){return this._s("si_consent_subtitle",e.si_consent_subtitle)}get siConsentSubtitleSmileId(){return this._s("si_consent_subtitle_smile_id",e.si_consent_subtitle_smile_id)}get siConsentProcessing(){return this._s("si_consent_processing",e.si_consent_processing)}get siConsentContact(){return this._s("si_consent_contact",e.si_consent_contact)}get siConsentPersonal(){return this._s("si_consent_personal",e.si_consent_personal)}get siConsentBiometric(){return this._s("si_consent_biometric",e.si_consent_biometric)}get siConsentDevice(){return this._s("si_consent_device",e.si_consent_device)}get siConsentConsent(){return this._s("si_consent_consent",e.si_consent_consent)}get siConsentAllow(){return this._s("si_consent_allow",e.si_consent_allow)}get siConsentDeny(){return this._s("si_consent_deny",e.si_consent_deny)}get siConsentLearnMore(){return this._s("si_consent_learn_more",e.si_consent_learn_more)}get siConsentLearnMoreDescription(){return this._s("si_consent_learn_more_description",e.si_consent_learn_more_description)}get siConsentLearnMoreDescriptionSmileId(){return this._s("si_consent_learn_more_description_smile_id",e.si_consent_learn_more_description_smile_id)}get siConsentLearnMoreDescriptionRetention(){return this._s("si_consent_learn_more_description_retention",e.si_consent_learn_more_description_retention)}get siConsentLearnMoreDsarPrefix(){return this._s("si_consent_learn_more_dsar_prefix",e.si_consent_learn_more_dsar_prefix)}get siConsentLearnMoreDsarLink(){return this._s("si_consent_learn_more_dsar_link",e.si_consent_learn_more_dsar_link)}get siConsentLearnMorePrivacyPrefix(){return this._s("si_consent_learn_more_privacy_prefix",e.si_consent_learn_more_privacy_prefix)}get siConsentLearnMorePrivacySmileLink(){return this._s("si_consent_learn_more_privacy_smile_link",e.si_consent_learn_more_privacy_smile_link)}get siConsentLearnMorePrivacyAnd(){return this._s("si_consent_learn_more_privacy_and",e.si_consent_learn_more_privacy_and)}siConsentLearnMorePrivacyPartnerLink(s){return this._t("si_consent_learn_more_privacy_partner_link",e.si_consent_learn_more_privacy_partner_link,{partnerName:s})}get siConsentLearnMorePrivacySuffix(){return this._s("si_consent_learn_more_privacy_suffix",e.si_consent_learn_more_privacy_suffix)}get siInstructionsTitlePrefix(){return this._s("si_instructions_title_prefix",e.si_instructions_title_prefix)}get siInstructionsEmphasisSelfie(){return this._s("si_instructions_emphasis_selfie",e.si_instructions_emphasis_selfie)}get siInstructionsEmphasisVisa(){return this._s("si_instructions_emphasis_visa",e.si_instructions_emphasis_visa)}get siInstructionsCaptureGuidelines(){return this._s("si_instructions_capture_guidelines",e.si_instructions_capture_guidelines)}get siInstructionsGuidelineGood(){return this._s("si_instructions_guideline_good",e.si_instructions_guideline_good)}get siInstructionsGuidelineAccessories(){return this._s("si_instructions_guideline_accessories",e.si_instructions_guideline_accessories)}get siInstructionsGuidelineMultipleFaces(){return this._s("si_instructions_guideline_multiple_faces",e.si_instructions_guideline_multiple_faces)}get siInstructionsGuidelinePoorLighting(){return this._s("si_instructions_guideline_poor_lighting",e.si_instructions_guideline_poor_lighting)}get siCdGuidelineAllowed(){return this._s("si_cd_guideline_allowed",e.si_cd_guideline_allowed)}get siCdGuidelineBlocked(){return this._s("si_cd_guideline_blocked",e.si_cd_guideline_blocked)}get siInstructionsNext(){return this._s("si_instructions_next",e.si_instructions_next)}get siStartCaptureInstruction(){return this._s("si_start_capture_instruction",e.si_start_capture_instruction)}get siCaptureInitialInstruction(){return this._s("si_capture_initial_instruction",e.si_capture_initial_instruction)}get siCaptureTooClose(){return this._s("si_capture_too_close",e.si_capture_too_close)}get siCaptureTooFar(){return this._s("si_capture_too_far",e.si_capture_too_far)}get siCaptureCenterFace(){return this._s("si_capture_center_face",e.si_capture_center_face)}get siCaptureMoveLeft(){return this._s("si_capture_move_left",e.si_capture_move_left)}get siCaptureMoveRight(){return this._s("si_capture_move_right",e.si_capture_move_right)}get siCaptureMoveHigher(){return this._s("si_capture_move_higher",e.si_capture_move_higher)}get siCaptureMoveLower(){return this._s("si_capture_move_lower",e.si_capture_move_lower)}get siCaptureLowLight(){return this._s("si_capture_low_light",e.si_capture_low_light)}get siCaptureRotateDevice(){return this._s("si_capture_rotate_device",e.si_capture_rotate_device)}get siCaptureSmile(){return this._s("si_capture_smile",e.si_capture_smile)}get siCaptureStartButton(){return this._s("si_capture_start_button",e.si_capture_start_button)}get siCaptureWarningText(){return this._s("si_capture_warning_text",e.si_capture_warning_text)}get siCaptureHoldSteady(){return this._s("si_capture_hold_steady",e.si_capture_hold_steady)}get siCaptureCameraUnavailable(){return this._s("si_capture_camera_unavailable",e.si_capture_camera_unavailable)}get siCaptureTimeout(){return this._s("si_capture_timeout",e.si_capture_timeout)}get siCaptureFailed(){return this._s("si_capture_failed",e.si_capture_failed)}get siCaptureAdjusting(){return this._s("si_capture_adjusting",e.si_capture_adjusting)}get siCaptureBrightLight(){return this._s("si_capture_bright_light",e.si_capture_bright_light)}get siCaptureButtonDocument(){return this._s("si_capture_button_document",e.si_capture_button_document)}get siPreviewTitle(){return this._s("si_preview_title",e.si_preview_title)}get siPreviewSubtitle(){return this._s("si_preview_subtitle",e.si_preview_subtitle)}get siPreviewRetake(){return this._s("si_preview_retake",e.si_preview_retake)}get siPreviewConfirm(){return this._s("si_preview_confirm",e.si_preview_confirm)}get siPreviewAccessibilityImage(){return this._s("si_preview_accessibility_image",e.si_preview_accessibility_image)}get siPreviewAccessibilityRetake(){return this._s("si_preview_accessibility_retake",e.si_preview_accessibility_retake)}get siProcessingSubmitting(){return this._s("si_processing_submitting",e.si_processing_submitting)}get siProcessingSubmittingSubtitle(){return this._s("si_processing_submitting_subtitle",e.si_processing_submitting_subtitle)}get siProcessingSuccessTitle(){return this._s("si_processing_success_title",e.si_processing_success_title)}get siProcessingSuccessMessage(){return this._s("si_processing_success_message",e.si_processing_success_message)}get siProcessingFailedTitle(){return this._s("si_processing_failed_title",e.si_processing_failed_title)}get siProcessingFailedMessage(){return this._s("si_processing_failed_message",e.si_processing_failed_message)}get siProcessingErrorNoConnection(){return this._s("si_processing_error_no_connection",e.si_processing_error_no_connection)}get siProcessingErrorGeneric(){return this._s("si_processing_error_generic",e.si_processing_error_generic)}get siProcessingErrorRetryLater(){return this._s("si_processing_error_retry_later",e.si_processing_error_retry_later)}get siProcessingErrorCameraPermission(){return this._s("si_processing_error_camera_permission",e.si_processing_error_camera_permission)}get siProcessingErrorUnavailable(){return this._s("si_processing_error_unavailable",e.si_processing_error_unavailable)}get siProcessingRetry(){return this._s("si_processing_retry",e.si_processing_retry)}get siProcessingExit(){return this._s("si_processing_exit",e.si_processing_exit)}get siAccessibilityCaptureProgress(){return this._s("si_accessibility_capture_progress",e.si_accessibility_capture_progress)}get siCdBack(){return this._s("si_cd_back",e.si_cd_back)}get siCdCapturedImage(){return this._s("si_cd_captured_image",e.si_cd_captured_image)}get siCdSuccess(){return this._s("si_cd_success",e.si_cd_success)}get siCdFailure(){return this._s("si_cd_failure",e.si_cd_failure)}get siCdPoweredBySmileId(){return this._s("si_cd_powered_by_smile_id",e.si_cd_powered_by_smile_id)}get siCdAdd(){return this._s("si_cd_add",e.si_cd_add)}get siCdClose(){return this._s("si_cd_close",e.si_cd_close)}get siCdDocumentCaptureShutter(){return this._s("si_cd_document_capture_shutter",e.si_cd_document_capture_shutter)}get siCdDocumentGallery(){return this._s("si_cd_document_gallery",e.si_cd_document_gallery)}get siCdCheckbox(){return this._s("si_cd_checkbox",e.si_cd_checkbox)}get siCdCheckboxChecked(){return this._s("si_cd_checkbox_checked",e.si_cd_checkbox_checked)}get siCdCheckboxUnchecked(){return this._s("si_cd_checkbox_unchecked",e.si_cd_checkbox_unchecked)}get siCdExpand(){return this._s("si_cd_expand",e.si_cd_expand)}get siCdExpanded(){return this._s("si_cd_expanded",e.si_cd_expanded)}get siCdCollapsed(){return this._s("si_cd_collapsed",e.si_cd_collapsed)}get siCdSmileId(){return this._s("si_cd_smile_id",e.si_cd_smile_id)}get siCameraErrorTitle(){return this._s("si_camera_error_title",e.si_camera_error_title)}get siCameraErrorBody(){return this._s("si_camera_error_body",e.si_camera_error_body)}get siDocumentCenter(){return this._s("si_document_center",e.si_document_center)}get siDocumentTooFar(){return this._s("si_document_too_far",e.si_document_too_far)}get siDocumentTooClose(){return this._s("si_document_too_close",e.si_document_too_close)}get siDocumentWrongAspectRatio(){return this._s("si_doc_v_capture_directive_wrong_aspect_ratio",e.si_doc_v_capture_directive_wrong_aspect_ratio)}get siDocumentHoldStill(){return this._s("si_document_hold_still",e.si_document_hold_still)}get siDocumentBlurry(){return this._s("si_document_blurry",e.si_document_blurry)}get siDocumentGlare(){return this._s("si_document_glare",e.si_document_glare)}get siDocumentInitialInstruction(){return this._s("si_document_initial_instruction",e.si_document_initial_instruction)}get siDocumentReady(){return this._s("si_document_ready",e.si_document_ready)}get siDocumentCapturing(){return this._s("si_document_capturing",e.si_document_capturing)}get siDocumentCaptureComplete(){return this._s("si_document_capture_complete",e.si_document_capture_complete)}get siDocumentCaptureUnsatisfied(){return this._s("si_document_capture_unsatisfied",e.si_document_capture_unsatisfied)}get siDocumentGalleryImageTooSmall(){return this._s("si_document_gallery_image_too_small",e.si_document_gallery_image_too_small)}get siDocumentGalleryImageFailed(){return this._s("si_document_gallery_image_failed",e.si_document_gallery_image_failed)}siDocumentFlipTitle(s){return this._t("si_document_flip_title",e.si_document_flip_title,{id_type:s})}get siDocumentTypePassport(){return this._s("si_document_type_passport",e.si_document_type_passport)}get siDocumentTypeGreenBook(){return this._s("si_document_type_green_book",e.si_document_type_green_book)}get siDocumentTypeGeneric(){return this._s("si_document_type_generic",e.si_document_type_generic)}get siDocumentCaptureBack(){return this._s("si_document_capture_back",e.si_document_capture_back)}get siDocumentSkipBack(){return this._s("si_document_skip_back",e.si_document_skip_back)}get siDocumentGuidelineGood(){return this._s("si_document_guideline_good",e.si_document_guideline_good)}get siDocumentGuidelineNotCropped(){return this._s("si_document_guideline_not_cropped",e.si_document_guideline_not_cropped)}get siDocumentGuidelineNotBlurry(){return this._s("si_document_guideline_not_blurry",e.si_document_guideline_not_blurry)}get siDocumentGuidelineNotReflective(){return this._s("si_document_guideline_not_reflective",e.si_document_guideline_not_reflective)}get siDocumentPreviewTitle(){return this._s("si_document_preview_title",e.si_document_preview_title)}get siDocumentPreviewSubtitle(){return this._s("si_document_preview_subtitle",e.si_document_preview_subtitle)}get siDocumentProcessingComplete(){return this._s("si_document_processing_complete",e.si_document_processing_complete)}get siEssLookLeft(){return this._s("si_ess_look_left",e.si_ess_look_left)}get siEssLookRight(){return this._s("si_ess_look_right",e.si_ess_look_right)}get siEssLookUp(){return this._s("si_ess_look_up",e.si_ess_look_up)}get siEssLookAtCamera(){return this._s("si_ess_look_at_camera",e.si_ess_look_at_camera)}get siEssCaptureInitialInstruction(){return this._s("si_ess_capture_initial_instruction",e.si_ess_capture_initial_instruction)}get siEssHoldStill(){return this._s("si_ess_hold_still",e.si_ess_hold_still)}}
1
+ "use strict";import{enStrings as e}from"./strings_en";import{isDevelopmentBuild as c}from"../core/is_development_build";import{getDeviceLocale as l}from"../presentation/utils/locale_utils";const g="\u2068",d="\u2069",u=new Set;function p(r){!c()||u.has(r)||(u.add(r),console.warn(`[UseSmileID] No translations registered for locale '${r}' \u2014 the SDK is rendering English. Call UseSmileIDLocalizations.register('`+r+"', \u2026) at startup, or set b.localizations explicitly."))}export class UseSmileIDLocalizations{_overrides;constructor(s={}){this._overrides=s}static fromOverrides(s){const i={};for(const[t,_]of Object.entries(s))t.startsWith("@")||typeof _=="string"&&(i[t]=_);return new UseSmileIDLocalizations(i)}static _registry=new Map;static _registryRevision=0;static localeResolver=()=>l().split("-")[0]||"en";static register(s,i){const t={};for(const[_,n]of Object.entries(i))_.startsWith("@")||typeof n=="string"&&(t[_]=n);UseSmileIDLocalizations._registry.set(s,t),UseSmileIDLocalizations._registryRevision+=1}static clearRegistry(){UseSmileIDLocalizations._registry.clear(),UseSmileIDLocalizations._registryRevision+=1}static hasRegisteredLocales(){return UseSmileIDLocalizations._registry.size>0}static get activeLocaleKey(){return`${UseSmileIDLocalizations.localeResolver()}#${UseSmileIDLocalizations._registryRevision}`}static forActiveLocale(){const s=UseSmileIDLocalizations.localeResolver(),i=UseSmileIDLocalizations._registry.get(s);if(i)return new UseSmileIDLocalizations(i);const t=s.split("-")[0];if(t&&t!==s){const _=UseSmileIDLocalizations._registry.get(t);if(_)return new UseSmileIDLocalizations(_)}return p(s),new UseSmileIDLocalizations}_warnedMissingKey=!1;_lookup(s,i){const t=this._overrides[s];return t!==void 0?t:(c()&&!this._warnedMissingKey&&Object.keys(this._overrides).length>0&&(this._warnedMissingKey=!0,console.warn(`[UseSmileID] '${s}' is missing from the supplied translations and is rendering English; other keys may be too. Compare your overrides against the si_* key set in the SDK's English strings.`)),i)}_s(s,i){return this._lookup(s,i)}_t(s,i,t){let _=this._lookup(s,i);for(const[n,o]of Object.entries(t)){const a=o===""?o:`${g}${o}${d}`;_=_.split(`{${n}}`).join(a)}return _}get siLabelContinue(){return this._s("si_label_continue",e.si_label_continue)}get siSelfieCaptureComplete(){return this._s("si_selfie_capture_complete",e.si_selfie_capture_complete)}get siCapturing(){return this._s("si_capturing",e.si_capturing)}get siSelfieCaptureUnsatisfied(){return this._s("si_selfie_capture_unsatisfied",e.si_selfie_capture_unsatisfied)}siConsentTitle(s){return this._t("si_consent_title",e.si_consent_title,{partnerName:s})}get siConsentSubtitle(){return this._s("si_consent_subtitle",e.si_consent_subtitle)}get siConsentSubtitleSmileId(){return this._s("si_consent_subtitle_smile_id",e.si_consent_subtitle_smile_id)}get siConsentProcessing(){return this._s("si_consent_processing",e.si_consent_processing)}get siConsentContact(){return this._s("si_consent_contact",e.si_consent_contact)}get siConsentPersonal(){return this._s("si_consent_personal",e.si_consent_personal)}get siConsentBiometric(){return this._s("si_consent_biometric",e.si_consent_biometric)}get siConsentDevice(){return this._s("si_consent_device",e.si_consent_device)}get siConsentConsent(){return this._s("si_consent_consent",e.si_consent_consent)}get siConsentAllow(){return this._s("si_consent_allow",e.si_consent_allow)}get siConsentDeny(){return this._s("si_consent_deny",e.si_consent_deny)}get siConsentLearnMore(){return this._s("si_consent_learn_more",e.si_consent_learn_more)}get siConsentLearnMoreDescription(){return this._s("si_consent_learn_more_description",e.si_consent_learn_more_description)}get siConsentLearnMoreDescriptionSmileId(){return this._s("si_consent_learn_more_description_smile_id",e.si_consent_learn_more_description_smile_id)}get siConsentLearnMoreDescriptionRetention(){return this._s("si_consent_learn_more_description_retention",e.si_consent_learn_more_description_retention)}get siConsentLearnMoreDsarPrefix(){return this._s("si_consent_learn_more_dsar_prefix",e.si_consent_learn_more_dsar_prefix)}get siConsentLearnMoreDsarLink(){return this._s("si_consent_learn_more_dsar_link",e.si_consent_learn_more_dsar_link)}get siConsentLearnMorePrivacyPrefix(){return this._s("si_consent_learn_more_privacy_prefix",e.si_consent_learn_more_privacy_prefix)}get siConsentLearnMorePrivacySmileLink(){return this._s("si_consent_learn_more_privacy_smile_link",e.si_consent_learn_more_privacy_smile_link)}get siConsentLearnMorePrivacyAnd(){return this._s("si_consent_learn_more_privacy_and",e.si_consent_learn_more_privacy_and)}siConsentLearnMorePrivacyPartnerLink(s){return this._t("si_consent_learn_more_privacy_partner_link",e.si_consent_learn_more_privacy_partner_link,{partnerName:s})}get siConsentLearnMorePrivacySuffix(){return this._s("si_consent_learn_more_privacy_suffix",e.si_consent_learn_more_privacy_suffix)}get siInstructionsTitlePrefix(){return this._s("si_instructions_title_prefix",e.si_instructions_title_prefix)}get siInstructionsEmphasisSelfie(){return this._s("si_instructions_emphasis_selfie",e.si_instructions_emphasis_selfie)}get siInstructionsEmphasisVisa(){return this._s("si_instructions_emphasis_visa",e.si_instructions_emphasis_visa)}get siInstructionsCaptureGuidelines(){return this._s("si_instructions_capture_guidelines",e.si_instructions_capture_guidelines)}get siInstructionsGuidelineGood(){return this._s("si_instructions_guideline_good",e.si_instructions_guideline_good)}get siInstructionsGuidelineAccessories(){return this._s("si_instructions_guideline_accessories",e.si_instructions_guideline_accessories)}get siInstructionsGuidelineMultipleFaces(){return this._s("si_instructions_guideline_multiple_faces",e.si_instructions_guideline_multiple_faces)}get siInstructionsGuidelinePoorLighting(){return this._s("si_instructions_guideline_poor_lighting",e.si_instructions_guideline_poor_lighting)}get siCdGuidelineAllowed(){return this._s("si_cd_guideline_allowed",e.si_cd_guideline_allowed)}get siCdGuidelineBlocked(){return this._s("si_cd_guideline_blocked",e.si_cd_guideline_blocked)}get siInstructionsNext(){return this._s("si_instructions_next",e.si_instructions_next)}get siStartCaptureInstruction(){return this._s("si_start_capture_instruction",e.si_start_capture_instruction)}get siCaptureInitialInstruction(){return this._s("si_capture_initial_instruction",e.si_capture_initial_instruction)}get siCaptureTooClose(){return this._s("si_capture_too_close",e.si_capture_too_close)}get siCaptureTooFar(){return this._s("si_capture_too_far",e.si_capture_too_far)}get siCaptureCenterFace(){return this._s("si_capture_center_face",e.si_capture_center_face)}get siCaptureMoveLeft(){return this._s("si_capture_move_left",e.si_capture_move_left)}get siCaptureMoveRight(){return this._s("si_capture_move_right",e.si_capture_move_right)}get siCaptureMoveHigher(){return this._s("si_capture_move_higher",e.si_capture_move_higher)}get siCaptureMoveLower(){return this._s("si_capture_move_lower",e.si_capture_move_lower)}get siCaptureLowLight(){return this._s("si_capture_low_light",e.si_capture_low_light)}get siCaptureRotateDevice(){return this._s("si_capture_rotate_device",e.si_capture_rotate_device)}get siCaptureSmile(){return this._s("si_capture_smile",e.si_capture_smile)}get siCaptureStartButton(){return this._s("si_capture_start_button",e.si_capture_start_button)}get siCaptureHoldSteady(){return this._s("si_capture_hold_steady",e.si_capture_hold_steady)}get siCaptureCameraUnavailable(){return this._s("si_capture_camera_unavailable",e.si_capture_camera_unavailable)}get siCaptureTimeout(){return this._s("si_capture_timeout",e.si_capture_timeout)}get siCaptureFailed(){return this._s("si_capture_failed",e.si_capture_failed)}get siCaptureAdjusting(){return this._s("si_capture_adjusting",e.si_capture_adjusting)}get siCaptureBrightLight(){return this._s("si_capture_bright_light",e.si_capture_bright_light)}get siCaptureButtonDocument(){return this._s("si_capture_button_document",e.si_capture_button_document)}get siPreviewTitle(){return this._s("si_preview_title",e.si_preview_title)}get siPreviewSubtitle(){return this._s("si_preview_subtitle",e.si_preview_subtitle)}get siPreviewRetake(){return this._s("si_preview_retake",e.si_preview_retake)}get siPreviewConfirm(){return this._s("si_preview_confirm",e.si_preview_confirm)}get siPreviewAccessibilityImage(){return this._s("si_preview_accessibility_image",e.si_preview_accessibility_image)}get siPreviewAccessibilityRetake(){return this._s("si_preview_accessibility_retake",e.si_preview_accessibility_retake)}get siProcessingSubmitting(){return this._s("si_processing_submitting",e.si_processing_submitting)}get siProcessingSubmittingSubtitle(){return this._s("si_processing_submitting_subtitle",e.si_processing_submitting_subtitle)}get siProcessingSuccessTitle(){return this._s("si_processing_success_title",e.si_processing_success_title)}get siProcessingSuccessMessage(){return this._s("si_processing_success_message",e.si_processing_success_message)}get siProcessingFailedTitle(){return this._s("si_processing_failed_title",e.si_processing_failed_title)}get siProcessingFailedMessage(){return this._s("si_processing_failed_message",e.si_processing_failed_message)}get siProcessingErrorNoConnection(){return this._s("si_processing_error_no_connection",e.si_processing_error_no_connection)}get siProcessingErrorGeneric(){return this._s("si_processing_error_generic",e.si_processing_error_generic)}get siProcessingErrorRetryLater(){return this._s("si_processing_error_retry_later",e.si_processing_error_retry_later)}get siProcessingErrorCameraPermission(){return this._s("si_processing_error_camera_permission",e.si_processing_error_camera_permission)}get siProcessingErrorUnavailable(){return this._s("si_processing_error_unavailable",e.si_processing_error_unavailable)}get siProcessingRetry(){return this._s("si_processing_retry",e.si_processing_retry)}get siProcessingExit(){return this._s("si_processing_exit",e.si_processing_exit)}get siAccessibilityCaptureProgress(){return this._s("si_accessibility_capture_progress",e.si_accessibility_capture_progress)}get siCdBack(){return this._s("si_cd_back",e.si_cd_back)}get siCdCapturedImage(){return this._s("si_cd_captured_image",e.si_cd_captured_image)}get siCdSuccess(){return this._s("si_cd_success",e.si_cd_success)}get siCdFailure(){return this._s("si_cd_failure",e.si_cd_failure)}get siCdPoweredBySmileId(){return this._s("si_cd_powered_by_smile_id",e.si_cd_powered_by_smile_id)}get siCdClose(){return this._s("si_cd_close",e.si_cd_close)}get siCdDocumentCaptureShutter(){return this._s("si_cd_document_capture_shutter",e.si_cd_document_capture_shutter)}get siCdDocumentGallery(){return this._s("si_cd_document_gallery",e.si_cd_document_gallery)}get siCdCheckbox(){return this._s("si_cd_checkbox",e.si_cd_checkbox)}get siCdCheckboxChecked(){return this._s("si_cd_checkbox_checked",e.si_cd_checkbox_checked)}get siCdCheckboxUnchecked(){return this._s("si_cd_checkbox_unchecked",e.si_cd_checkbox_unchecked)}get siCdExpand(){return this._s("si_cd_expand",e.si_cd_expand)}get siCdExpanded(){return this._s("si_cd_expanded",e.si_cd_expanded)}get siCdCollapsed(){return this._s("si_cd_collapsed",e.si_cd_collapsed)}get siCdSmileId(){return this._s("si_cd_smile_id",e.si_cd_smile_id)}get siDocumentCenter(){return this._s("si_document_center",e.si_document_center)}get siDocumentTooFar(){return this._s("si_document_too_far",e.si_document_too_far)}get siDocumentTooClose(){return this._s("si_document_too_close",e.si_document_too_close)}get siDocumentWrongAspectRatio(){return this._s("si_doc_v_capture_directive_wrong_aspect_ratio",e.si_doc_v_capture_directive_wrong_aspect_ratio)}get siDocumentHoldStill(){return this._s("si_document_hold_still",e.si_document_hold_still)}get siDocumentBlurry(){return this._s("si_document_blurry",e.si_document_blurry)}get siDocumentGlare(){return this._s("si_document_glare",e.si_document_glare)}get siDocumentInitialInstruction(){return this._s("si_document_initial_instruction",e.si_document_initial_instruction)}get siDocumentReady(){return this._s("si_document_ready",e.si_document_ready)}get siDocumentCapturing(){return this._s("si_document_capturing",e.si_document_capturing)}get siDocumentCaptureComplete(){return this._s("si_document_capture_complete",e.si_document_capture_complete)}get siDocumentCaptureUnsatisfied(){return this._s("si_document_capture_unsatisfied",e.si_document_capture_unsatisfied)}get siDocumentGalleryImageTooSmall(){return this._s("si_document_gallery_image_too_small",e.si_document_gallery_image_too_small)}get siDocumentGalleryImageFailed(){return this._s("si_document_gallery_image_failed",e.si_document_gallery_image_failed)}siDocumentFlipTitle(s){return this._t("si_document_flip_title",e.si_document_flip_title,{id_type:s})}get siDocumentTypePassport(){return this._s("si_document_type_passport",e.si_document_type_passport)}get siDocumentTypeGreenBook(){return this._s("si_document_type_green_book",e.si_document_type_green_book)}get siDocumentTypeGeneric(){return this._s("si_document_type_generic",e.si_document_type_generic)}get siDocumentCaptureBack(){return this._s("si_document_capture_back",e.si_document_capture_back)}get siDocumentSkipBack(){return this._s("si_document_skip_back",e.si_document_skip_back)}get siDocumentGuidelineGood(){return this._s("si_document_guideline_good",e.si_document_guideline_good)}get siDocumentGuidelineNotCropped(){return this._s("si_document_guideline_not_cropped",e.si_document_guideline_not_cropped)}get siDocumentGuidelineNotBlurry(){return this._s("si_document_guideline_not_blurry",e.si_document_guideline_not_blurry)}get siDocumentGuidelineNotReflective(){return this._s("si_document_guideline_not_reflective",e.si_document_guideline_not_reflective)}get siDocumentPreviewTitle(){return this._s("si_document_preview_title",e.si_document_preview_title)}get siDocumentPreviewSubtitle(){return this._s("si_document_preview_subtitle",e.si_document_preview_subtitle)}get siDocumentProcessingComplete(){return this._s("si_document_processing_complete",e.si_document_processing_complete)}get siEssLookLeft(){return this._s("si_ess_look_left",e.si_ess_look_left)}get siEssLookRight(){return this._s("si_ess_look_right",e.si_ess_look_right)}get siEssLookUp(){return this._s("si_ess_look_up",e.si_ess_look_up)}get siEssLookAtCamera(){return this._s("si_ess_look_at_camera",e.si_ess_look_at_camera)}get siEssCaptureInitialInstruction(){return this._s("si_ess_capture_initial_instruction",e.si_ess_capture_initial_instruction)}get siEssHoldStill(){return this._s("si_ess_hold_still",e.si_ess_hold_still)}}
@@ -8,7 +8,7 @@
8
8
  */
9
9
  /**
10
10
  * Intrinsic pixel dimensions of the partner-supplied consent icon. On React
11
- * Native the consent icon is a `ReactNode` with no measurable pixel size at
11
+ * Native the consent icon is a React element with no measurable pixel size at
12
12
  * configuration time, so this is currently always reported as `null`.
13
13
  */
14
14
  export type ConsentIconDimensions = {
@@ -10,7 +10,7 @@ import type { MetadataEntry } from "./use_smile_id_metadata";
10
10
  * Fields that do not apply to the assembled flow report their accurate "absent"
11
11
  * value (`false`, or `autocapture_default` for the capture mode) rather than
12
12
  * being omitted, so the object always carries the full schema.
13
- * `consent_icon_dimensions` is always `null`: the consent icon is a `ReactNode`
13
+ * `consent_icon_dimensions` is always `null`: the consent icon is a React element
14
14
  * with no measurable pixel size at configuration time.
15
15
  */
16
16
  export declare function flowConfigurationToBuilderConfiguration(configuration: FlowConfiguration): BuilderConfiguration;
@@ -1 +1 @@
1
- "use strict";import{GlobalPrivacyControl as g}from"../presentation/flow/config/global_privacy_control";import{AnalyzerFactoryKey as c,DocumentAnalyzerKey as u}from"@smileid/usesmileid_bridge";import{CaptureType as f}from"../core/models/ml_config";import{JobType as y}from"../core/models/job_type";import{autoCaptureWireValue as b}from"../presentation/flow/config/document_capture_mode";import{flowShowAttribution as w}from"../presentation/flow/config/attribution_resolver";import{builderConfigurationToJson as C}from"./builder_configuration";import{MODEL_DESCRIPTOR_UNKNOWN as _,ModelProvider as r,modelConfigurationToJson as T}from"./model_configuration";export function flowConfigurationToBuilderConfiguration(e){const o=e.screens.steps;let n;const t=[];let d=!1,a=!1,p=!1;for(const i of o)switch(i.kind){case"consent":n=i.config;break;case"instructions":d=!0;break;case"capture":t.push(i.config);break;case"preview":a=!0;break;case"processing":p=!0;break;case"partner":break}const l=t.find(i=>i.selfieConfig)?.selfieConfig,s=t.find(i=>i.documentConfig)?.documentConfig,v=l!==void 0||t.some(i=>i.captureType===f.selfie),m=s!==void 0||t.some(i=>i.captureType===f.document);return{consentScreenUsed:n!==void 0,consentIconProvided:n?.partnerIcon!=null,consentIconDimensions:null,consentAttributionShown:n!==void 0&&w(e),instructionsScreenUsed:d,selfiePreviewEnabled:a&&v,documentPreviewEnabled:a&&m,submissionSkipped:!p,allowAgentMode:l?.allowAgentMode??!1,enhancedLivenessEnabled:l?.enableEnhancedLiveness??!1,autoCaptureEnabled:b(s?.captureMode),allowGalleryUpload:s?.allowGalleryUpload??!1,captureBothSides:e.network?.config?.jobType===y.residencyDocumentVerification&&m||(s?.captureBothSides??!1),allowSkipBack:s?.allowSkipBack??!1,globalPrivacyControl:e.config?.globalPrivacyControl??g.OptOut}}export function flowConfigurationToModelConfiguration(e){const o=e.ml?.analyzers.selfieConfig?.analyzerFactoryKey,n=e.ml?.analyzers.document?.key;return{faceModel:O(o),documentModel:h(n)}}export function configurationMetadataEntries(e){const o=[{name:"builder_configuration_object",value:JSON.stringify(C(flowConfigurationToBuilderConfiguration(e)))},{name:"model_configuration_object",value:JSON.stringify(T(flowConfigurationToModelConfiguration(e)))}],n=flowConfigurationToSelfieLivenessTelemetry(e);return n.activeLivenessType!==null&&o.push({name:"active_liveness_type",value:n.activeLivenessType},{name:"active_liveness_version",value:n.activeLivenessVersion},{name:"selfie_image_origin",value:n.selfieImageOrigin}),o}export function flowConfigurationToSelfieLivenessTelemetry(e){let o,n=!1;for(const t of e.screens.steps)t.kind==="capture"&&(o??=t.config.selfieConfig,t.config.captureType===f.selfie&&(n=!0));return!n&&o===void 0?{activeLivenessType:null,activeLivenessVersion:null,selfieImageOrigin:null}:{activeLivenessType:S(o),activeLivenessVersion:"2.0.0",selfieImageOrigin:k(o)}}function S(e){return e?.enableEnhancedLiveness?"head_pose":"smile"}function k(e){return e?.allowAgentMode?"back_camera":"front_camera"}function O(e){switch(e){case c.MLKitFace:return{provider:r.Google,name:"play-services-mlkit-face-detection",version:"17.1.0",bundled:!1};case c.HuaweiFace:return{provider:r.Huawei,name:"ml-computer-vision-face",version:"3.18.1.300",bundled:!1};case c.VisionFace:return{provider:r.Apple,name:"vision_face_detector",version:"system",bundled:!0};default:return _}}function h(e){switch(e){case u.MLKitDocument:return{provider:r.Google,name:"object-detection",version:"17.0.2",bundled:!0};case u.HuaweiDocument:return{provider:r.Huawei,name:"ml-computer-vision-object",version:"3.7.0.301",bundled:!1};case u.VisionDocument:return{provider:r.Apple,name:"vision_document_detector",version:"system",bundled:!0};default:return L}}const L={provider:r.Smile,name:"noop_document_detector",version:"12.3.0",bundled:!0};
1
+ "use strict";import{GlobalPrivacyControl as g}from"../presentation/flow/config/global_privacy_control";import{AnalyzerFactoryKey as l,DocumentAnalyzerKey as u}from"@smileid/usesmileid_bridge";import{CaptureType as f}from"../core/models/ml_config";import{JobType as y}from"../core/models/job_type";import{autoCaptureWireValue as b}from"../presentation/flow/config/document_capture_mode";import{flowShowAttribution as w}from"../presentation/flow/config/attribution_resolver";import{hasPartnerIcon as C}from"../presentation/flow/dsl/screen_builders";import{builderConfigurationToJson as _}from"./builder_configuration";import{MODEL_DESCRIPTOR_UNKNOWN as T,ModelProvider as r,modelConfigurationToJson as S}from"./model_configuration";export function flowConfigurationToBuilderConfiguration(e){const o=e.screens.steps;let n;const t=[];let d=!1,a=!1,p=!1;for(const i of o)switch(i.kind){case"consent":n=i.config;break;case"instructions":d=!0;break;case"capture":t.push(i.config);break;case"preview":a=!0;break;case"processing":p=!0;break;case"partner":break}const c=t.find(i=>i.selfieConfig)?.selfieConfig,s=t.find(i=>i.documentConfig)?.documentConfig,v=c!==void 0||t.some(i=>i.captureType===f.selfie),m=s!==void 0||t.some(i=>i.captureType===f.document);return{consentScreenUsed:n!==void 0,consentIconProvided:n!==void 0&&C(n),consentIconDimensions:null,consentAttributionShown:n!==void 0&&w(e),instructionsScreenUsed:d,selfiePreviewEnabled:a&&v,documentPreviewEnabled:a&&m,submissionSkipped:!p,allowAgentMode:c?.allowAgentMode??!1,enhancedLivenessEnabled:c?.enableEnhancedLiveness??!1,autoCaptureEnabled:b(s?.captureMode),allowGalleryUpload:s?.allowGalleryUpload??!1,captureBothSides:e.network?.config?.jobType===y.residencyDocumentVerification&&m||(s?.captureBothSides??!1),allowSkipBack:s?.allowSkipBack??!1,globalPrivacyControl:e.config?.globalPrivacyControl??g.OptOut}}export function flowConfigurationToModelConfiguration(e){const o=e.ml?.analyzers.selfieConfig?.analyzerFactoryKey,n=e.ml?.analyzers.document?.key;return{faceModel:O(o),documentModel:L(n)}}export function configurationMetadataEntries(e){const o=[{name:"builder_configuration_object",value:JSON.stringify(_(flowConfigurationToBuilderConfiguration(e)))},{name:"model_configuration_object",value:JSON.stringify(S(flowConfigurationToModelConfiguration(e)))}],n=flowConfigurationToSelfieLivenessTelemetry(e);return n.activeLivenessType!==null&&o.push({name:"active_liveness_type",value:n.activeLivenessType},{name:"active_liveness_version",value:n.activeLivenessVersion},{name:"selfie_image_origin",value:n.selfieImageOrigin}),o}export function flowConfigurationToSelfieLivenessTelemetry(e){let o,n=!1;for(const t of e.screens.steps)t.kind==="capture"&&(o??=t.config.selfieConfig,t.config.captureType===f.selfie&&(n=!0));return!n&&o===void 0?{activeLivenessType:null,activeLivenessVersion:null,selfieImageOrigin:null}:{activeLivenessType:h(o),activeLivenessVersion:"2.0.0",selfieImageOrigin:k(o)}}function h(e){return e?.enableEnhancedLiveness?"head_pose":"smile"}function k(e){return e?.allowAgentMode?"back_camera":"front_camera"}function O(e){switch(e){case l.MLKitFace:return{provider:r.Google,name:"play-services-mlkit-face-detection",version:"17.1.0",bundled:!1};case l.HuaweiFace:return{provider:r.Huawei,name:"ml-computer-vision-face",version:"3.18.1.300",bundled:!1};case l.VisionFace:return{provider:r.Apple,name:"vision_face_detector",version:"system",bundled:!0};default:return T}}function L(e){switch(e){case u.MLKitDocument:return{provider:r.Google,name:"object-detection",version:"17.0.2",bundled:!0};case u.HuaweiDocument:return{provider:r.Huawei,name:"ml-computer-vision-object",version:"3.7.0.301",bundled:!1};case u.VisionDocument:return{provider:r.Apple,name:"vision_document_detector",version:"system",bundled:!0};default:return D}}const D={provider:r.Smile,name:"noop_document_detector",version:"12.4.0",bundled:!0};
@@ -1 +1 @@
1
- "use strict";import{KameraKit as I}from"@smileid/kamera";import{Dimensions as d,Platform as r}from"react-native";import{Attestation as b,DeviceIntegrityProvider as S,PrivilegesProvider as A}from"@smileid/usesmileid_bridge";import{RuntimeIntegrityProvider as D}from"@smileid/usesmileid_bridge/internal";import{UseSmileIDMetadata as O}from"./use_smile_id_metadata";import{loadAsyncStorage as C,loadExpoBattery as P,loadExpoCellular as U,loadExpoDevice as l,loadExpoNetwork as M}from"./optional_native_modules";import{resolveGeolocation as k}from"./geolocation";import{resolveDimensions as u}from"../data/model/sdk_config_capture";import{SdkConfigSource as h}from"../data/model/sdk_config_source";import{CameraDefaults as o}from"../camera/core/camera_defaults";const m="12.3.0",N="12.0.0",x="react-native-expo",p="com.usesmileid.metadata.sdk_launch_count";export class UseSmileIDMetadataFactory{_sessionId;_deviceOs;_deviceModel;_appName;_hostApplication;_systemArchitecture;_memoryInfoMb;_buildBrand;_buildDevice;_buildFingerprint;_buildProduct;_carrierInfo;_batteryStatus;_sdkLaunchCount;_geolocation;_privileges;_runtimeIntegrity;_deviceIntegrity;_clientIp="";_networkConnection="";_hardwareAttestation;_deviceProfile;_warmup;constructor(t={}){this._sessionId=generateSessionId(),this._deviceOs=R(),this._appName=t.appName??"",this._hostApplication=t.hostApplication??"";const e=l();e?(this._deviceModel=resolveDeviceModel(e),this._systemArchitecture=e.supportedCpuArchitectures?.[0]?.trim()??"",this._memoryInfoMb=typeof e.totalMemory=="number"&&e.totalMemory>0?Math.round(e.totalMemory/(1024*1024)):0,this._buildBrand=e.brand?.trim()??"",this._buildDevice=(r.OS==="ios"?e.modelId:e.designName)?.trim()??"",this._buildFingerprint=e.osBuildFingerprint?.trim()??"",this._buildProduct=e.productName?.trim()??""):(this._deviceModel="",this._systemArchitecture="",this._memoryInfoMb=0,this._buildBrand="",this._buildDevice="",this._buildFingerprint="",this._buildProduct=""),this._carrierInfo=U()?.carrier?.trim()??"",this._warmup=this._warmupAsync(),this._warmUpHardwareAttestation(),this._warmUpDeviceProfile()}async _warmUpDeviceProfile(){try{this._deviceProfile=await I.deviceProfile()}catch{}}get sessionId(){return this._sessionId}warmup(){return this._warmup}async _warmupAsync(){await Promise.allSettled([this._warmUpNetwork(),this._warmUpBatteryStatus(),this._warmUpLaunchCount(),this._warmUpGeolocation(),this._warmUpPrivileges(),this._warmUpDeviceIntegrity()]),await this._warmUpRuntimeIntegrity()}async _warmUpNetwork(){const t=M();if(!t)return;const e=t.getNetworkStateAsync().then(s=>{this._networkConnection=(s.type??"").toString()}).catch(()=>{}),n=t.getIpAddressAsync?t.getIpAddressAsync().then(s=>{this._clientIp=s??""}).catch(()=>{}):Promise.resolve();await Promise.all([e,n])}async _warmUpGeolocation(){const t=await k();t&&(this._geolocation=t)}async _warmUpPrivileges(){const t=await A.privileges();t.length>0&&(this._privileges=t)}async _warmUpRuntimeIntegrity(){const t=await D.runtimeIntegrity();t!==void 0&&(this._runtimeIntegrity=t)}async _warmUpDeviceIntegrity(){this._deviceIntegrity=await S.signals()}async _warmUpLaunchCount(){const t=C();if(t)try{const n=(Number(await t.getItem(p))||0)+1;await t.setItem(p,String(n)),this._sdkLaunchCount=n}catch{}}async _warmUpBatteryStatus(){const t=P();if(t)try{switch(await t.getBatteryStateAsync()){case 1:this._batteryStatus=0;break;case 2:case 3:this._batteryStatus=1;break;default:this._batteryStatus=-1}}catch{}}async _warmUpHardwareAttestation(){try{this._hardwareAttestation=await b.generateHardwareAttestation(this._sessionId)}catch{}}make(t){const e=this._hardwareAttestation,n=r.OS==="android"&&e?{hardwareAttestationSecurityLevel:e.securityLevel,...e.certificateChain&&e.certificateChain.length>0?{attestationCertificateChain:e.certificateChain}:{}}:{},s=r.OS==="ios"&&e?{supportsAppAttest:e.supportsAppAttest}:{},a=u(t?.selfie),_=t!==void 0?h.sdkConfig:h.defaultSource,f=a?.width??o.selfieJpegTargetWidth,g=a?.height??o.selfieJpegTargetHeight,c=u(t?.liveness),y=c?.width??o.selfieJpegTargetWidth,v=c?.height??o.selfieJpegTargetHeight,w={sdkVersion:m,sdk:x,deviceOs:this._deviceOs,deviceModel:this._deviceModel,appName:this._appName,sessionId:this._sessionId,clientIp:this._clientIp,networkConnection:this._networkConnection,carrierInfo:this._carrierInfo,timezone:B(),timezoneOffsetMinutes:E(),locale:H(),screenResolution:F(),memoryInfoMb:this._memoryInfoMb,deviceOrientation:V(),systemArchitecture:this._systemArchitecture,numberOfCameras:0,hostApplication:this._hostApplication,securityPolicyVersion:N,...n,...s,sdkConfigSource:_,imageWidth:f,imageHeight:g,livenessImageWidth:y,livenessImageHeight:v,buildBrand:this._buildBrand,buildDevice:this._buildDevice,buildFingerprint:this._buildFingerprint,buildProduct:this._buildProduct,buildHardware:this._deviceIntegrity?.buildHardware??"",buildSource:this._deviceIntegrity?.buildSource??"",packageName:this._deviceIntegrity?.packageName??"",fingerprint:this._deviceIntegrity?.fingerprint??"",localTimeOfEnrolment:L(),wrapperName:"react_native_expo",wrapperVersion:m,...this._deviceIntegrity?.vpn!==void 0?{vpn:this._deviceIntegrity.vpn}:{},...this._deviceIntegrity?.certificateDigest!==void 0?{certificateDigest:this._deviceIntegrity.certificateDigest}:{},...this._batteryStatus!==void 0?{batteryStatus:this._batteryStatus}:{},...this._sdkLaunchCount!==void 0?{sdkLaunchCount:this._sdkLaunchCount}:{},...this._geolocation!==void 0?{geolocation:this._geolocation}:{},...this._privileges!==void 0?{privileges:this._privileges}:{},...this._runtimeIntegrity!==void 0?{runtimeIntegrity:this._runtimeIntegrity}:{},...this._deviceProfile!==void 0?{deviceTier:this._deviceProfile.tier,deviceProfile:deviceProfileMetadataJson(this._deviceProfile)}:{}};return new O(w)}}export function deviceProfileMetadataJson(i){const t={lowRamDevice:i.lowRamDevice,maxCpuFreqKHz:i.maxCpuFreqKHz,mediaPerformanceClass:i.mediaPerformanceClass,modelIdentifier:i.modelIdentifier,possibleCores:i.possibleCores,socModel:i.socModel,tier:i.tier,totalRamBytes:i.totalRamBytes};return JSON.stringify(Object.fromEntries(Object.entries(t).filter(([,e])=>e!==null)))}export function resolveDeviceModel(i=l()){if(!i)return"";const t=i.brand?.trim()??"",e=i.modelName?.trim()??"";return[t,e].filter(Boolean).join(" ")}function R(){const i=r.OS==="ios"?"iOS":r.OS==="android"?"Android":r.OS,t=T();return t?`${i} ${t}`:i}function T(){if(r.OS==="android"){const i=r.constants?.Release;if(i!=null&&`${i}`!="")return`${i}`}return typeof r.Version<"u"?String(r.Version):""}function L(){try{return new Date().toISOString()}catch{return""}}function B(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??""}catch{return""}}function E(){return-new Date().getTimezoneOffset()}function H(){try{return Intl.DateTimeFormat().resolvedOptions().locale??""}catch{return""}}function F(){try{const{width:i,height:t,scale:e}=d.get("screen");if(!i||!t)return"";const n=Math.round(i*(e||1)),s=Math.round(t*(e||1));return`${n} \xD7 ${s}`}catch{return""}}function V(){try{const{width:i,height:t}=d.get("window");return!i||!t?"":t>=i?"Portrait":"Landscape"}catch{return""}}export function generateSessionId(){const i=globalThis.crypto;if(i&&typeof i.randomUUID=="function")return i.randomUUID();const t=()=>typeof i?.getRandomValues=="function"?i.getRandomValues(new Uint16Array(1))[0]??0:Math.floor(Math.random()*65536),e=()=>t().toString(16).padStart(4,"0");return[e()+e(),e(),"4"+e().slice(1),(parseInt(e(),16)&16383|32768).toString(16),e()+e()+e()].join("-")}
1
+ "use strict";import{KameraKit as I}from"@smileid/kamera";import{Dimensions as d,Platform as r}from"react-native";import{Attestation as b,DeviceIntegrityProvider as S,PrivilegesProvider as A}from"@smileid/usesmileid_bridge";import{RuntimeIntegrityProvider as D}from"@smileid/usesmileid_bridge/internal";import{UseSmileIDMetadata as O}from"./use_smile_id_metadata";import{loadAsyncStorage as C,loadExpoBattery as P,loadExpoCellular as U,loadExpoDevice as l,loadExpoNetwork as M}from"./optional_native_modules";import{resolveGeolocation as k}from"./geolocation";import{resolveDimensions as u}from"../data/model/sdk_config_capture";import{SdkConfigSource as h}from"../data/model/sdk_config_source";import{CameraDefaults as o}from"../camera/core/camera_defaults";const m="12.4.0",N="12.0.0",x="react-native-expo",p="com.usesmileid.metadata.sdk_launch_count";export class UseSmileIDMetadataFactory{_sessionId;_deviceOs;_deviceModel;_appName;_hostApplication;_systemArchitecture;_memoryInfoMb;_buildBrand;_buildDevice;_buildFingerprint;_buildProduct;_carrierInfo;_batteryStatus;_sdkLaunchCount;_geolocation;_privileges;_runtimeIntegrity;_deviceIntegrity;_clientIp="";_networkConnection="";_hardwareAttestation;_deviceProfile;_warmup;constructor(t={}){this._sessionId=generateSessionId(),this._deviceOs=R(),this._appName=t.appName??"",this._hostApplication=t.hostApplication??"";const e=l();e?(this._deviceModel=resolveDeviceModel(e),this._systemArchitecture=e.supportedCpuArchitectures?.[0]?.trim()??"",this._memoryInfoMb=typeof e.totalMemory=="number"&&e.totalMemory>0?Math.round(e.totalMemory/(1024*1024)):0,this._buildBrand=e.brand?.trim()??"",this._buildDevice=(r.OS==="ios"?e.modelId:e.designName)?.trim()??"",this._buildFingerprint=e.osBuildFingerprint?.trim()??"",this._buildProduct=e.productName?.trim()??""):(this._deviceModel="",this._systemArchitecture="",this._memoryInfoMb=0,this._buildBrand="",this._buildDevice="",this._buildFingerprint="",this._buildProduct=""),this._carrierInfo=U()?.carrier?.trim()??"",this._warmup=this._warmupAsync(),this._warmUpHardwareAttestation(),this._warmUpDeviceProfile()}async _warmUpDeviceProfile(){try{this._deviceProfile=await I.deviceProfile()}catch{}}get sessionId(){return this._sessionId}warmup(){return this._warmup}async _warmupAsync(){await Promise.allSettled([this._warmUpNetwork(),this._warmUpBatteryStatus(),this._warmUpLaunchCount(),this._warmUpGeolocation(),this._warmUpPrivileges(),this._warmUpDeviceIntegrity()]),await this._warmUpRuntimeIntegrity()}async _warmUpNetwork(){const t=M();if(!t)return;const e=t.getNetworkStateAsync().then(s=>{this._networkConnection=(s.type??"").toString()}).catch(()=>{}),n=t.getIpAddressAsync?t.getIpAddressAsync().then(s=>{this._clientIp=s??""}).catch(()=>{}):Promise.resolve();await Promise.all([e,n])}async _warmUpGeolocation(){const t=await k();t&&(this._geolocation=t)}async _warmUpPrivileges(){const t=await A.privileges();t.length>0&&(this._privileges=t)}async _warmUpRuntimeIntegrity(){const t=await D.runtimeIntegrity();t!==void 0&&(this._runtimeIntegrity=t)}async _warmUpDeviceIntegrity(){this._deviceIntegrity=await S.signals()}async _warmUpLaunchCount(){const t=C();if(t)try{const n=(Number(await t.getItem(p))||0)+1;await t.setItem(p,String(n)),this._sdkLaunchCount=n}catch{}}async _warmUpBatteryStatus(){const t=P();if(t)try{switch(await t.getBatteryStateAsync()){case 1:this._batteryStatus=0;break;case 2:case 3:this._batteryStatus=1;break;default:this._batteryStatus=-1}}catch{}}async _warmUpHardwareAttestation(){try{this._hardwareAttestation=await b.generateHardwareAttestation(this._sessionId)}catch{}}make(t){const e=this._hardwareAttestation,n=r.OS==="android"&&e?{hardwareAttestationSecurityLevel:e.securityLevel,...e.certificateChain&&e.certificateChain.length>0?{attestationCertificateChain:e.certificateChain}:{}}:{},s=r.OS==="ios"&&e?{supportsAppAttest:e.supportsAppAttest}:{},a=u(t?.selfie),_=t!==void 0?h.sdkConfig:h.defaultSource,f=a?.width??o.selfieJpegTargetWidth,g=a?.height??o.selfieJpegTargetHeight,c=u(t?.liveness),y=c?.width??o.selfieJpegTargetWidth,v=c?.height??o.selfieJpegTargetHeight,w={sdkVersion:m,sdk:x,deviceOs:this._deviceOs,deviceModel:this._deviceModel,appName:this._appName,sessionId:this._sessionId,clientIp:this._clientIp,networkConnection:this._networkConnection,carrierInfo:this._carrierInfo,timezone:B(),timezoneOffsetMinutes:E(),locale:H(),screenResolution:F(),memoryInfoMb:this._memoryInfoMb,deviceOrientation:V(),systemArchitecture:this._systemArchitecture,numberOfCameras:0,hostApplication:this._hostApplication,securityPolicyVersion:N,...n,...s,sdkConfigSource:_,imageWidth:f,imageHeight:g,livenessImageWidth:y,livenessImageHeight:v,buildBrand:this._buildBrand,buildDevice:this._buildDevice,buildFingerprint:this._buildFingerprint,buildProduct:this._buildProduct,buildHardware:this._deviceIntegrity?.buildHardware??"",buildSource:this._deviceIntegrity?.buildSource??"",packageName:this._deviceIntegrity?.packageName??"",fingerprint:this._deviceIntegrity?.fingerprint??"",localTimeOfEnrolment:L(),wrapperName:"react_native_expo",wrapperVersion:m,...this._deviceIntegrity?.vpn!==void 0?{vpn:this._deviceIntegrity.vpn}:{},...this._deviceIntegrity?.certificateDigest!==void 0?{certificateDigest:this._deviceIntegrity.certificateDigest}:{},...this._batteryStatus!==void 0?{batteryStatus:this._batteryStatus}:{},...this._sdkLaunchCount!==void 0?{sdkLaunchCount:this._sdkLaunchCount}:{},...this._geolocation!==void 0?{geolocation:this._geolocation}:{},...this._privileges!==void 0?{privileges:this._privileges}:{},...this._runtimeIntegrity!==void 0?{runtimeIntegrity:this._runtimeIntegrity}:{},...this._deviceProfile!==void 0?{deviceTier:this._deviceProfile.tier,deviceProfile:deviceProfileMetadataJson(this._deviceProfile)}:{}};return new O(w)}}export function deviceProfileMetadataJson(i){const t={lowRamDevice:i.lowRamDevice,maxCpuFreqKHz:i.maxCpuFreqKHz,mediaPerformanceClass:i.mediaPerformanceClass,modelIdentifier:i.modelIdentifier,possibleCores:i.possibleCores,socModel:i.socModel,tier:i.tier,totalRamBytes:i.totalRamBytes};return JSON.stringify(Object.fromEntries(Object.entries(t).filter(([,e])=>e!==null)))}export function resolveDeviceModel(i=l()){if(!i)return"";const t=i.brand?.trim()??"",e=i.modelName?.trim()??"";return[t,e].filter(Boolean).join(" ")}function R(){const i=r.OS==="ios"?"iOS":r.OS==="android"?"Android":r.OS,t=T();return t?`${i} ${t}`:i}function T(){if(r.OS==="android"){const i=r.constants?.Release;if(i!=null&&`${i}`!="")return`${i}`}return typeof r.Version<"u"?String(r.Version):""}function L(){try{return new Date().toISOString()}catch{return""}}function B(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??""}catch{return""}}function E(){return-new Date().getTimezoneOffset()}function H(){try{return Intl.DateTimeFormat().resolvedOptions().locale??""}catch{return""}}function F(){try{const{width:i,height:t,scale:e}=d.get("screen");if(!i||!t)return"";const n=Math.round(i*(e||1)),s=Math.round(t*(e||1));return`${n} \xD7 ${s}`}catch{return""}}function V(){try{const{width:i,height:t}=d.get("window");return!i||!t?"":t>=i?"Portrait":"Landscape"}catch{return""}}export function generateSessionId(){const i=globalThis.crypto;if(i&&typeof i.randomUUID=="function")return i.randomUUID();const t=()=>typeof i?.getRandomValues=="function"?i.getRandomValues(new Uint16Array(1))[0]??0:Math.floor(Math.random()*65536),e=()=>t().toString(16).padStart(4,"0");return[e()+e(),e(),"4"+e().slice(1),(parseInt(e(),16)&16383|32768).toString(16),e()+e()+e()].join("-")}