@onairos/react-native 3.4.1 → 3.6.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 (574) hide show
  1. package/README.md +423 -374
  2. package/lib/commonjs/api/index.js +9 -145
  3. package/lib/commonjs/assets/animations/loaderani.json +1 -0
  4. package/lib/commonjs/assets/animations/persona-animation.json +1 -0
  5. package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  7. package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
  8. package/lib/commonjs/assets/icons/Gmail.png +0 -0
  9. package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
  10. package/lib/commonjs/assets/icons/Redditicon.png +0 -0
  11. package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
  12. package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
  13. package/lib/commonjs/assets/icons/chatgpt.png +0 -0
  14. package/lib/commonjs/assets/icons/claude.png +0 -0
  15. package/lib/commonjs/assets/icons/gemini.png +0 -0
  16. package/lib/commonjs/assets/icons/grok.png +0 -0
  17. package/lib/commonjs/assets/images/Checkbox.svg +3 -0
  18. package/lib/commonjs/assets/images/EnochE.svg +19 -0
  19. package/lib/commonjs/assets/images/Enochicon1.png +0 -0
  20. package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
  21. package/lib/commonjs/assets/images/Facebookicon.png +0 -0
  22. package/lib/commonjs/assets/images/Gmail.png +0 -0
  23. package/lib/commonjs/assets/images/Googlelogo.png +0 -0
  24. package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
  25. package/lib/commonjs/assets/images/OnairosNewLogo.png +0 -0
  26. package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
  27. package/lib/commonjs/assets/images/Personalityprofile.svg +3 -0
  28. package/lib/commonjs/assets/images/Personalitytraits.svg +3 -0
  29. package/lib/commonjs/assets/images/Redditicon.png +0 -0
  30. package/lib/commonjs/assets/images/Userpreferences.svg +3 -0
  31. package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
  32. package/lib/commonjs/assets/images/arrow.svg +20 -0
  33. package/lib/commonjs/assets/images/basicproficon.svg +43 -0
  34. package/lib/commonjs/assets/images/basicprofile.svg +3 -0
  35. package/lib/commonjs/assets/images/chatgpt.png +0 -0
  36. package/lib/commonjs/assets/images/checkmark.svg +4 -0
  37. package/lib/commonjs/assets/images/claude.png +0 -0
  38. package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
  39. package/lib/commonjs/assets/images/contenticon.svg +23 -0
  40. package/lib/commonjs/assets/images/gemini.png +0 -0
  41. package/lib/commonjs/assets/images/grok.png +0 -0
  42. package/lib/commonjs/assets/images/persona1.png +0 -0
  43. package/lib/commonjs/assets/images/persona2.png +0 -0
  44. package/lib/commonjs/assets/images/persona3.png +0 -0
  45. package/lib/commonjs/assets/images/persona4.png +0 -0
  46. package/lib/commonjs/assets/images/persona5.png +0 -0
  47. package/lib/commonjs/assets/images/personalityicon.svg +18 -0
  48. package/lib/commonjs/assets/images/x-close.svg +3 -0
  49. package/lib/commonjs/components/BodyText.js +9 -0
  50. package/lib/commonjs/components/BrandMark.js +10 -0
  51. package/lib/commonjs/components/CodeInput.js +9 -0
  52. package/lib/commonjs/components/EmailInput.js +8 -0
  53. package/lib/commonjs/components/GoogleButton.js +9 -0
  54. package/lib/commonjs/components/HeadingGroup.js +9 -0
  55. package/lib/commonjs/components/LLMDataInputModal.js +14 -0
  56. package/lib/commonjs/components/ModalHeader.js +9 -0
  57. package/lib/commonjs/components/ModalSheet.js +9 -0
  58. package/lib/commonjs/components/Onairos.js +14 -374
  59. package/lib/commonjs/components/OnairosButton.js +13 -309
  60. package/lib/commonjs/components/OnairosSignInButton.js +12 -0
  61. package/lib/commonjs/components/Overlay.js +13 -483
  62. package/lib/commonjs/components/PersonaImage.js +10 -0
  63. package/lib/commonjs/components/PersonaLoadingScreen.js +12 -0
  64. package/lib/commonjs/components/PersonalizationConsentScreen.js +13 -0
  65. package/lib/commonjs/components/PinCreationScreen.js +12 -0
  66. package/lib/commonjs/components/PinInput.js +9 -302
  67. package/lib/commonjs/components/PlatformConnectorsStep.js +23 -0
  68. package/lib/commonjs/components/PlatformList.js +10 -137
  69. package/lib/commonjs/components/PlatformToggle.js +9 -0
  70. package/lib/commonjs/components/PrimaryButton.js +10 -0
  71. package/lib/commonjs/components/SignInMatchAnimation.js +9 -0
  72. package/lib/commonjs/components/SignInStep.js +12 -0
  73. package/lib/commonjs/components/UniversalOnboarding.js +30 -1702
  74. package/lib/commonjs/components/VerificationStep.js +11 -0
  75. package/lib/commonjs/components/WelcomeScreen.js +22 -0
  76. package/lib/commonjs/components/icons/Basicproficon.js +8 -0
  77. package/lib/commonjs/components/icons/Basicprofile.js +8 -0
  78. package/lib/commonjs/components/icons/Checkbox.js +8 -0
  79. package/lib/commonjs/components/icons/Checkmark.js +8 -0
  80. package/lib/commonjs/components/icons/Contentanalysis.js +8 -0
  81. package/lib/commonjs/components/icons/Contenticon.js +8 -0
  82. package/lib/commonjs/components/icons/EnochE.js +8 -0
  83. package/lib/commonjs/components/icons/Personalityicon.js +8 -0
  84. package/lib/commonjs/components/icons/Personalityprofile.js +8 -0
  85. package/lib/commonjs/components/icons/Personalitytraits.js +8 -0
  86. package/lib/commonjs/components/icons/Userpreferences.js +8 -0
  87. package/lib/commonjs/components/icons/index.js +17 -0
  88. package/lib/commonjs/components/onboarding/OAuthWebView.js +18 -827
  89. package/lib/commonjs/components/onboarding/OnboardingHeader.js +10 -74
  90. package/lib/commonjs/components/onboarding/PinInput.js +10 -283
  91. package/lib/commonjs/components/onboarding/PlatformConnector.js +11 -249
  92. package/lib/commonjs/config/api.js +7 -0
  93. package/lib/commonjs/constants/index.js +7 -83
  94. package/lib/commonjs/context/AuthContext.js +10 -0
  95. package/lib/commonjs/hooks/useConnectedAccounts.js +9 -0
  96. package/lib/commonjs/hooks/useConnections.js +8 -159
  97. package/lib/commonjs/hooks/useCredentials.js +10 -177
  98. package/lib/commonjs/hooks/useUserConnections.js +10 -0
  99. package/lib/commonjs/index.js +34 -106
  100. package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
  101. package/lib/commonjs/services/apiClient.js +8 -0
  102. package/lib/commonjs/services/apiKeyService.js +9 -952
  103. package/lib/commonjs/services/authService.js +10 -0
  104. package/lib/commonjs/services/biometricPinService.js +8 -0
  105. package/lib/commonjs/services/chatGPTConversationExtractor.js +8 -0
  106. package/lib/commonjs/services/chatGPTConversationService.js +9 -0
  107. package/lib/commonjs/services/claudeConversationExtractor.js +8 -0
  108. package/lib/commonjs/services/claudeConversationService.js +9 -0
  109. package/lib/commonjs/services/connectedAccountsService.js +10 -0
  110. package/lib/commonjs/services/googleAuthService.js +11 -0
  111. package/lib/commonjs/services/hingeDataExtractor.js +8 -0
  112. package/lib/commonjs/services/hingeDataService.js +9 -0
  113. package/lib/commonjs/services/imageCompressionService.js +7 -0
  114. package/lib/commonjs/services/instagramDataExtractor.js +8 -0
  115. package/lib/commonjs/services/instagramDataService.js +9 -0
  116. package/lib/commonjs/services/jwtStorageService.js +7 -0
  117. package/lib/commonjs/services/linkedinDOMExtractor.js +7 -0
  118. package/lib/commonjs/services/linkedinProfileService.js +9 -0
  119. package/lib/commonjs/services/linkedinScrapingService.js +8 -0
  120. package/lib/commonjs/services/llmDataStorage.js +8 -0
  121. package/lib/commonjs/services/mobileTrainingService.js +8 -0
  122. package/lib/commonjs/services/oauthService.js +11 -390
  123. package/lib/commonjs/services/pinEncryptionService.js +8 -0
  124. package/lib/commonjs/services/pinStorageUtils.js +7 -0
  125. package/lib/commonjs/services/platformAuthService.js +12 -1067
  126. package/lib/commonjs/services/sephoraDataExtractor.js +8 -0
  127. package/lib/commonjs/services/sephoraDataService.js +9 -0
  128. package/lib/commonjs/services/storageService.js +8 -0
  129. package/lib/commonjs/services/telegramDataExtractor.js +8 -0
  130. package/lib/commonjs/services/telegramDataService.js +11 -0
  131. package/lib/commonjs/services/trainingApiHelpers.js +7 -0
  132. package/lib/commonjs/services/userConnectionsService.js +10 -0
  133. package/lib/commonjs/services/youtubeMigrationService.js +10 -0
  134. package/lib/commonjs/theme/index.js +7 -0
  135. package/lib/commonjs/types/ambient.d.js +1 -2
  136. package/lib/commonjs/types/declarations.d.js +1 -2
  137. package/lib/commonjs/types/index.js +1 -6
  138. package/lib/commonjs/types/node-fix.d.js +1 -2
  139. package/lib/commonjs/types/node-override.d.js +1 -2
  140. package/lib/commonjs/types/opacity.d.js +1 -2
  141. package/lib/commonjs/types.js +1 -14
  142. package/lib/commonjs/utils/Portal.js +8 -98
  143. package/lib/commonjs/utils/api.js +9 -129
  144. package/lib/commonjs/utils/assetRegistry.js +33 -0
  145. package/lib/commonjs/utils/auth.js +9 -111
  146. package/lib/commonjs/utils/connectorTests.js +29 -0
  147. package/lib/commonjs/utils/crypto.js +8 -62
  148. package/lib/commonjs/utils/debugHelper.js +1 -64
  149. package/lib/commonjs/utils/encryption.js +7 -76
  150. package/lib/commonjs/utils/eventUtils.js +1 -0
  151. package/lib/commonjs/utils/haptics.js +9 -0
  152. package/lib/commonjs/utils/imagePreloader.js +1 -0
  153. package/lib/commonjs/utils/networkDiagnostics.js +8 -0
  154. package/lib/commonjs/utils/onairosApi.js +9 -350
  155. package/lib/commonjs/utils/programmaticFlow.js +9 -117
  156. package/lib/commonjs/utils/retryHelper.js +1 -220
  157. package/lib/commonjs/utils/secureStorage.js +10 -349
  158. package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -0
  159. package/lib/commonjs/utils/webviewScripts/claude.js +1 -0
  160. package/lib/commonjs/utils/webviewScripts/hinge.js +1 -0
  161. package/lib/commonjs/utils/webviewScripts/index.js +13 -0
  162. package/lib/commonjs/utils/webviewScripts/instagram.js +1 -0
  163. package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -0
  164. package/lib/commonjs/utils/webviewScripts/sephora.js +1 -0
  165. package/lib/commonjs/utils/webviewScripts/telegram.js +1 -0
  166. package/lib/module/api/index.js +1 -139
  167. package/lib/module/assets/animations/loaderani.json +1 -0
  168. package/lib/module/assets/animations/persona-animation.json +1 -0
  169. package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  170. package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  171. package/lib/module/assets/icons/Facebookicon.png +0 -0
  172. package/lib/module/assets/icons/Gmail.png +0 -0
  173. package/lib/module/assets/icons/Linkedinicon.png +0 -0
  174. package/lib/module/assets/icons/Redditicon.png +0 -0
  175. package/lib/module/assets/icons/YouTubeicon2.png +0 -0
  176. package/lib/module/assets/icons/YouTubeicon3.png +0 -0
  177. package/lib/module/assets/icons/chatgpt.png +0 -0
  178. package/lib/module/assets/icons/claude.png +0 -0
  179. package/lib/module/assets/icons/farcaster.png +0 -0
  180. package/lib/module/assets/icons/gemini.png +0 -0
  181. package/lib/module/assets/icons/grok.png +0 -0
  182. package/lib/module/assets/icons/instagram.png +0 -0
  183. package/lib/module/assets/icons/pinterest.png +0 -0
  184. package/lib/module/assets/icons/swerv_logo.png +0 -0
  185. package/lib/module/assets/icons/twitter.jpg +0 -0
  186. package/lib/module/assets/images/Checkbox.svg +3 -0
  187. package/lib/module/assets/images/EnochE.svg +19 -0
  188. package/lib/module/assets/images/Enochicon1.png +0 -0
  189. package/lib/module/assets/images/Face_ID_logo.png +0 -0
  190. package/lib/module/assets/images/Facebookicon.png +0 -0
  191. package/lib/module/assets/images/Gmail.png +0 -0
  192. package/lib/module/assets/images/Googlelogo.png +0 -0
  193. package/lib/module/assets/images/Linkedinicon.png +0 -0
  194. package/lib/module/assets/images/OnairosNewLogo.png +0 -0
  195. package/lib/module/assets/images/Onairoslogo.png +0 -0
  196. package/lib/module/assets/images/Personalityprofile.svg +3 -0
  197. package/lib/module/assets/images/Personalitytraits.svg +3 -0
  198. package/lib/module/assets/images/Redditicon.png +0 -0
  199. package/lib/module/assets/images/Userpreferences.svg +3 -0
  200. package/lib/module/assets/images/YouTubeicon3.png +0 -0
  201. package/lib/module/assets/images/arrow.svg +20 -0
  202. package/lib/module/assets/images/basicproficon.svg +43 -0
  203. package/lib/module/assets/images/basicprofile.svg +3 -0
  204. package/lib/module/assets/images/chatgpt.png +0 -0
  205. package/lib/module/assets/images/checkmark.svg +4 -0
  206. package/lib/module/assets/images/claude.png +0 -0
  207. package/lib/module/assets/images/contentanalysis.svg +3 -0
  208. package/lib/module/assets/images/contenticon.svg +23 -0
  209. package/lib/module/assets/images/gemini.png +0 -0
  210. package/lib/module/assets/images/grok.png +0 -0
  211. package/lib/module/assets/images/persona1.png +0 -0
  212. package/lib/module/assets/images/persona2.png +0 -0
  213. package/lib/module/assets/images/persona3.png +0 -0
  214. package/lib/module/assets/images/persona4.png +0 -0
  215. package/lib/module/assets/images/persona5.png +0 -0
  216. package/lib/module/assets/images/personalityicon.svg +18 -0
  217. package/lib/module/assets/images/x-close.svg +3 -0
  218. package/lib/module/components/BodyText.js +1 -0
  219. package/lib/module/components/BrandMark.js +1 -0
  220. package/lib/module/components/CodeInput.js +1 -0
  221. package/lib/module/components/EmailInput.js +1 -0
  222. package/lib/module/components/GoogleButton.js +1 -0
  223. package/lib/module/components/HeadingGroup.js +1 -0
  224. package/lib/module/components/LLMDataInputModal.js +8 -0
  225. package/lib/module/components/ModalHeader.js +1 -0
  226. package/lib/module/components/ModalSheet.js +1 -0
  227. package/lib/module/components/Onairos.js +1 -367
  228. package/lib/module/components/OnairosButton.js +1 -302
  229. package/lib/module/components/OnairosSignInButton.js +1 -0
  230. package/lib/module/components/Overlay.js +1 -474
  231. package/lib/module/components/PersonaImage.js +1 -0
  232. package/lib/module/components/PersonaLoadingScreen.js +1 -0
  233. package/lib/module/components/PersonalizationConsentScreen.js +1 -0
  234. package/lib/module/components/PinCreationScreen.js +1 -0
  235. package/lib/module/components/PinInput.js +1 -293
  236. package/lib/module/components/PlatformConnectorsStep.js +7 -0
  237. package/lib/module/components/PlatformList.js +1 -129
  238. package/lib/module/components/PlatformToggle.js +1 -0
  239. package/lib/module/components/PrimaryButton.js +1 -0
  240. package/lib/module/components/SignInMatchAnimation.js +1 -0
  241. package/lib/module/components/SignInStep.js +1 -0
  242. package/lib/module/components/UniversalOnboarding.js +1 -1693
  243. package/lib/module/components/VerificationStep.js +1 -0
  244. package/lib/module/components/WelcomeScreen.js +1 -0
  245. package/lib/module/components/icons/Basicproficon.js +1 -0
  246. package/lib/module/components/icons/Basicprofile.js +1 -0
  247. package/lib/module/components/icons/Checkbox.js +1 -0
  248. package/lib/module/components/icons/Checkmark.js +1 -0
  249. package/lib/module/components/icons/Contentanalysis.js +1 -0
  250. package/lib/module/components/icons/Contenticon.js +1 -0
  251. package/lib/module/components/icons/EnochE.js +1 -0
  252. package/lib/module/components/icons/Personalityicon.js +1 -0
  253. package/lib/module/components/icons/Personalityprofile.js +1 -0
  254. package/lib/module/components/icons/Personalitytraits.js +1 -0
  255. package/lib/module/components/icons/Userpreferences.js +1 -0
  256. package/lib/module/components/icons/index.js +1 -0
  257. package/lib/module/components/onboarding/OAuthWebView.js +1 -818
  258. package/lib/module/components/onboarding/OnboardingHeader.js +1 -66
  259. package/lib/module/components/onboarding/PinInput.js +1 -274
  260. package/lib/module/components/onboarding/PlatformConnector.js +1 -240
  261. package/lib/module/config/api.js +1 -0
  262. package/lib/module/constants/index.js +1 -77
  263. package/lib/module/context/AuthContext.js +1 -0
  264. package/lib/module/hooks/useConnectedAccounts.js +1 -0
  265. package/lib/module/hooks/useConnections.js +1 -152
  266. package/lib/module/hooks/useCredentials.js +6 -169
  267. package/lib/module/hooks/useUserConnections.js +1 -0
  268. package/lib/module/index.js +1 -32
  269. package/lib/module/services/SDK_API_KEY_VALIDATION.md +421 -421
  270. package/lib/module/services/apiClient.js +1 -0
  271. package/lib/module/services/apiKeyService.js +1 -925
  272. package/lib/module/services/authService.js +1 -0
  273. package/lib/module/services/biometricPinService.js +1 -0
  274. package/lib/module/services/chatGPTConversationExtractor.js +1 -0
  275. package/lib/module/services/chatGPTConversationService.js +1 -0
  276. package/lib/module/services/claudeConversationExtractor.js +1 -0
  277. package/lib/module/services/claudeConversationService.js +1 -0
  278. package/lib/module/services/connectedAccountsService.js +1 -0
  279. package/lib/module/services/googleAuthService.js +1 -0
  280. package/lib/module/services/hingeDataExtractor.js +1 -0
  281. package/lib/module/services/hingeDataService.js +1 -0
  282. package/lib/module/services/imageCompressionService.js +1 -0
  283. package/lib/module/services/instagramDataExtractor.js +1 -0
  284. package/lib/module/services/instagramDataService.js +1 -0
  285. package/lib/module/services/jwtStorageService.js +1 -0
  286. package/lib/module/services/linkedinDOMExtractor.js +1 -0
  287. package/lib/module/services/linkedinProfileService.js +1 -0
  288. package/lib/module/services/linkedinScrapingService.js +1 -0
  289. package/lib/module/services/llmDataStorage.js +1 -0
  290. package/lib/module/services/mobileTrainingService.js +1 -0
  291. package/lib/module/services/oauthService.js +1 -380
  292. package/lib/module/services/pinEncryptionService.js +7 -0
  293. package/lib/module/services/pinStorageUtils.js +1 -0
  294. package/lib/module/services/platformAuthService.js +1 -1041
  295. package/lib/module/services/sephoraDataExtractor.js +1 -0
  296. package/lib/module/services/sephoraDataService.js +1 -0
  297. package/lib/module/services/storageService.js +1 -0
  298. package/lib/module/services/telegramDataExtractor.js +1 -0
  299. package/lib/module/services/telegramDataService.js +8 -0
  300. package/lib/module/services/trainingApiHelpers.js +1 -0
  301. package/lib/module/services/userConnectionsService.js +1 -0
  302. package/lib/module/services/youtubeMigrationService.js +1 -0
  303. package/lib/module/theme/index.js +1 -0
  304. package/lib/module/types.js +1 -10
  305. package/lib/module/utils/Portal.js +1 -90
  306. package/lib/module/utils/api.js +1 -117
  307. package/lib/module/utils/assetRegistry.js +33 -0
  308. package/lib/module/utils/auth.js +1 -99
  309. package/lib/module/utils/connectorTests.js +28 -0
  310. package/lib/module/utils/crypto.js +1 -54
  311. package/lib/module/utils/debugHelper.js +1 -54
  312. package/lib/module/utils/encryption.js +1 -67
  313. package/lib/module/utils/eventUtils.js +1 -0
  314. package/lib/module/utils/haptics.js +8 -0
  315. package/lib/module/utils/imagePreloader.js +1 -0
  316. package/lib/module/utils/networkDiagnostics.js +1 -0
  317. package/lib/module/utils/onairosApi.js +1 -333
  318. package/lib/module/utils/programmaticFlow.js +1 -111
  319. package/lib/module/utils/retryHelper.js +1 -211
  320. package/lib/module/utils/secureStorage.js +6 -330
  321. package/lib/module/utils/webviewScripts/chatgpt.js +1 -0
  322. package/lib/module/utils/webviewScripts/claude.js +1 -0
  323. package/lib/module/utils/webviewScripts/hinge.js +1 -0
  324. package/lib/module/utils/webviewScripts/index.js +1 -0
  325. package/lib/module/utils/webviewScripts/instagram.js +1 -0
  326. package/lib/module/utils/webviewScripts/linkedin.js +1 -0
  327. package/lib/module/utils/webviewScripts/sephora.js +1 -0
  328. package/lib/module/utils/webviewScripts/telegram.js +1 -0
  329. package/package.json +62 -39
  330. package/lib/commonjs/api/index.js.map +0 -1
  331. package/lib/commonjs/assets/images/email.png +0 -0
  332. package/lib/commonjs/assets/images/linkedin.png +0 -0
  333. package/lib/commonjs/assets/images/reddit.png +0 -0
  334. package/lib/commonjs/assets/images/youtube.png +0 -0
  335. package/lib/commonjs/components/DataRequestModal.js +0 -228
  336. package/lib/commonjs/components/DataRequestModal.js.map +0 -1
  337. package/lib/commonjs/components/DataRequestScreen.js +0 -329
  338. package/lib/commonjs/components/DataRequestScreen.js.map +0 -1
  339. package/lib/commonjs/components/EmailVerificationModal.js +0 -320
  340. package/lib/commonjs/components/EmailVerificationModal.js.map +0 -1
  341. package/lib/commonjs/components/Onairos.js.map +0 -1
  342. package/lib/commonjs/components/OnairosButton.js.map +0 -1
  343. package/lib/commonjs/components/Overlay.js.map +0 -1
  344. package/lib/commonjs/components/PinInput.js.map +0 -1
  345. package/lib/commonjs/components/PlatformList.js.map +0 -1
  346. package/lib/commonjs/components/TrainingModal.js +0 -717
  347. package/lib/commonjs/components/TrainingModal.js.map +0 -1
  348. package/lib/commonjs/components/UniversalOnboarding.js.map +0 -1
  349. package/lib/commonjs/components/UniversalOnboarding.tsx.new +0 -455
  350. package/lib/commonjs/components/onboarding/OAuthWebView.js.map +0 -1
  351. package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +0 -1
  352. package/lib/commonjs/components/onboarding/PinInput.js.map +0 -1
  353. package/lib/commonjs/components/onboarding/PlatformConnector.js.map +0 -1
  354. package/lib/commonjs/components/screens/ConnectorScreen.js +0 -146
  355. package/lib/commonjs/components/screens/ConnectorScreen.js.map +0 -1
  356. package/lib/commonjs/components/screens/LoadingScreen.js +0 -91
  357. package/lib/commonjs/components/screens/LoadingScreen.js.map +0 -1
  358. package/lib/commonjs/components/screens/PinCreationScreen.js +0 -61
  359. package/lib/commonjs/components/screens/PinCreationScreen.js.map +0 -1
  360. package/lib/commonjs/constants/index.js.map +0 -1
  361. package/lib/commonjs/hooks/useConnections.js.map +0 -1
  362. package/lib/commonjs/hooks/useCredentials.js.map +0 -1
  363. package/lib/commonjs/index.js.map +0 -1
  364. package/lib/commonjs/services/apiKeyService.js.map +0 -1
  365. package/lib/commonjs/services/oauthService.js.map +0 -1
  366. package/lib/commonjs/services/platformAuthService.js.map +0 -1
  367. package/lib/commonjs/types/ambient.d.js.map +0 -1
  368. package/lib/commonjs/types/declarations.d.js.map +0 -1
  369. package/lib/commonjs/types/index.d.js.map +0 -1
  370. package/lib/commonjs/types/index.js.map +0 -1
  371. package/lib/commonjs/types/node-fix.d.js.map +0 -1
  372. package/lib/commonjs/types/node-override.d.js.map +0 -1
  373. package/lib/commonjs/types/opacity.d.js.map +0 -1
  374. package/lib/commonjs/types/types.d.js.map +0 -1
  375. package/lib/commonjs/types.js.map +0 -1
  376. package/lib/commonjs/utils/Portal.js.map +0 -1
  377. package/lib/commonjs/utils/api.js.map +0 -1
  378. package/lib/commonjs/utils/auth.js.map +0 -1
  379. package/lib/commonjs/utils/crypto.js.map +0 -1
  380. package/lib/commonjs/utils/debugHelper.js.map +0 -1
  381. package/lib/commonjs/utils/encryption.js.map +0 -1
  382. package/lib/commonjs/utils/onairosApi.js.map +0 -1
  383. package/lib/commonjs/utils/programmaticFlow.js.map +0 -1
  384. package/lib/commonjs/utils/retryHelper.js.map +0 -1
  385. package/lib/commonjs/utils/secureStorage.js.map +0 -1
  386. package/lib/module/api/index.js.map +0 -1
  387. package/lib/module/assets/images/email.png +0 -0
  388. package/lib/module/assets/images/linkedin.png +0 -0
  389. package/lib/module/assets/images/reddit.png +0 -0
  390. package/lib/module/assets/images/youtube.png +0 -0
  391. package/lib/module/components/DataRequestModal.js +0 -220
  392. package/lib/module/components/DataRequestModal.js.map +0 -1
  393. package/lib/module/components/DataRequestScreen.js +0 -321
  394. package/lib/module/components/DataRequestScreen.js.map +0 -1
  395. package/lib/module/components/EmailVerificationModal.js +0 -311
  396. package/lib/module/components/EmailVerificationModal.js.map +0 -1
  397. package/lib/module/components/Onairos.js.map +0 -1
  398. package/lib/module/components/OnairosButton.js.map +0 -1
  399. package/lib/module/components/Overlay.js.map +0 -1
  400. package/lib/module/components/PinInput.js.map +0 -1
  401. package/lib/module/components/PlatformList.js.map +0 -1
  402. package/lib/module/components/TrainingModal.js +0 -708
  403. package/lib/module/components/TrainingModal.js.map +0 -1
  404. package/lib/module/components/UniversalOnboarding.js.map +0 -1
  405. package/lib/module/components/UniversalOnboarding.tsx.new +0 -455
  406. package/lib/module/components/onboarding/OAuthWebView.js.map +0 -1
  407. package/lib/module/components/onboarding/OnboardingHeader.js.map +0 -1
  408. package/lib/module/components/onboarding/PinInput.js.map +0 -1
  409. package/lib/module/components/onboarding/PlatformConnector.js.map +0 -1
  410. package/lib/module/components/screens/ConnectorScreen.js +0 -138
  411. package/lib/module/components/screens/ConnectorScreen.js.map +0 -1
  412. package/lib/module/components/screens/LoadingScreen.js +0 -83
  413. package/lib/module/components/screens/LoadingScreen.js.map +0 -1
  414. package/lib/module/components/screens/PinCreationScreen.js +0 -53
  415. package/lib/module/components/screens/PinCreationScreen.js.map +0 -1
  416. package/lib/module/constants/index.js.map +0 -1
  417. package/lib/module/hooks/useConnections.js.map +0 -1
  418. package/lib/module/hooks/useCredentials.js.map +0 -1
  419. package/lib/module/index.js.map +0 -1
  420. package/lib/module/services/apiKeyService.js.map +0 -1
  421. package/lib/module/services/oauthService.js.map +0 -1
  422. package/lib/module/services/platformAuthService.js.map +0 -1
  423. package/lib/module/types/ambient.d.js.map +0 -1
  424. package/lib/module/types/declarations.d.js.map +0 -1
  425. package/lib/module/types/index.d.js.map +0 -1
  426. package/lib/module/types/index.js.map +0 -1
  427. package/lib/module/types/node-fix.d.js.map +0 -1
  428. package/lib/module/types/node-override.d.js.map +0 -1
  429. package/lib/module/types/opacity.d.js.map +0 -1
  430. package/lib/module/types/types.d.js.map +0 -1
  431. package/lib/module/types.js.map +0 -1
  432. package/lib/module/utils/Portal.js.map +0 -1
  433. package/lib/module/utils/api.js.map +0 -1
  434. package/lib/module/utils/auth.js.map +0 -1
  435. package/lib/module/utils/crypto.js.map +0 -1
  436. package/lib/module/utils/debugHelper.js.map +0 -1
  437. package/lib/module/utils/encryption.js.map +0 -1
  438. package/lib/module/utils/onairosApi.js.map +0 -1
  439. package/lib/module/utils/programmaticFlow.js.map +0 -1
  440. package/lib/module/utils/retryHelper.js.map +0 -1
  441. package/lib/module/utils/secureStorage.js.map +0 -1
  442. package/lib/typescript/api/index.d.ts +0 -8
  443. package/lib/typescript/api/index.d.ts.map +0 -1
  444. package/lib/typescript/components/DataRequestModal.d.ts +0 -11
  445. package/lib/typescript/components/DataRequestModal.d.ts.map +0 -1
  446. package/lib/typescript/components/DataRequestScreen.d.ts +0 -11
  447. package/lib/typescript/components/DataRequestScreen.d.ts.map +0 -1
  448. package/lib/typescript/components/EmailVerificationModal.d.ts +0 -11
  449. package/lib/typescript/components/EmailVerificationModal.d.ts.map +0 -1
  450. package/lib/typescript/components/Onairos.d.ts +0 -4
  451. package/lib/typescript/components/Onairos.d.ts.map +0 -1
  452. package/lib/typescript/components/OnairosButton.d.ts +0 -12
  453. package/lib/typescript/components/OnairosButton.d.ts.map +0 -1
  454. package/lib/typescript/components/Overlay.d.ts +0 -4
  455. package/lib/typescript/components/Overlay.d.ts.map +0 -1
  456. package/lib/typescript/components/PinInput.d.ts +0 -4
  457. package/lib/typescript/components/PinInput.d.ts.map +0 -1
  458. package/lib/typescript/components/PlatformList.d.ts +0 -4
  459. package/lib/typescript/components/PlatformList.d.ts.map +0 -1
  460. package/lib/typescript/components/TrainingModal.d.ts +0 -4
  461. package/lib/typescript/components/TrainingModal.d.ts.map +0 -1
  462. package/lib/typescript/components/UniversalOnboarding.d.ts +0 -4
  463. package/lib/typescript/components/UniversalOnboarding.d.ts.map +0 -1
  464. package/lib/typescript/components/onboarding/OAuthWebView.d.ts +0 -10
  465. package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +0 -1
  466. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +0 -11
  467. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts.map +0 -1
  468. package/lib/typescript/components/onboarding/PinInput.d.ts +0 -4
  469. package/lib/typescript/components/onboarding/PinInput.d.ts.map +0 -1
  470. package/lib/typescript/components/onboarding/PlatformConnector.d.ts +0 -13
  471. package/lib/typescript/components/onboarding/PlatformConnector.d.ts.map +0 -1
  472. package/lib/typescript/components/screens/ConnectorScreen.d.ts +0 -9
  473. package/lib/typescript/components/screens/ConnectorScreen.d.ts.map +0 -1
  474. package/lib/typescript/components/screens/LoadingScreen.d.ts +0 -9
  475. package/lib/typescript/components/screens/LoadingScreen.d.ts.map +0 -1
  476. package/lib/typescript/components/screens/PinCreationScreen.d.ts +0 -10
  477. package/lib/typescript/components/screens/PinCreationScreen.d.ts.map +0 -1
  478. package/lib/typescript/constants/index.d.ts +0 -53
  479. package/lib/typescript/constants/index.d.ts.map +0 -1
  480. package/lib/typescript/hooks/useConnections.d.ts +0 -9
  481. package/lib/typescript/hooks/useConnections.d.ts.map +0 -1
  482. package/lib/typescript/hooks/useCredentials.d.ts +0 -9
  483. package/lib/typescript/hooks/useCredentials.d.ts.map +0 -1
  484. package/lib/typescript/index.d.ts +0 -18
  485. package/lib/typescript/index.d.ts.map +0 -1
  486. package/lib/typescript/services/apiKeyService.d.ts +0 -132
  487. package/lib/typescript/services/apiKeyService.d.ts.map +0 -1
  488. package/lib/typescript/services/oauthService.d.ts +0 -50
  489. package/lib/typescript/services/oauthService.d.ts.map +0 -1
  490. package/lib/typescript/services/platformAuthService.d.ts +0 -144
  491. package/lib/typescript/services/platformAuthService.d.ts.map +0 -1
  492. package/lib/typescript/types/index.d.ts +0 -231
  493. package/lib/typescript/types/index.d.ts.map +0 -1
  494. package/lib/typescript/types.d.ts +0 -270
  495. package/lib/typescript/types.d.ts.map +0 -1
  496. package/lib/typescript/utils/Portal.d.ts +0 -14
  497. package/lib/typescript/utils/Portal.d.ts.map +0 -1
  498. package/lib/typescript/utils/api.d.ts +0 -6
  499. package/lib/typescript/utils/api.d.ts.map +0 -1
  500. package/lib/typescript/utils/auth.d.ts +0 -6
  501. package/lib/typescript/utils/auth.d.ts.map +0 -1
  502. package/lib/typescript/utils/crypto.d.ts +0 -4
  503. package/lib/typescript/utils/crypto.d.ts.map +0 -1
  504. package/lib/typescript/utils/debugHelper.d.ts +0 -29
  505. package/lib/typescript/utils/debugHelper.d.ts.map +0 -1
  506. package/lib/typescript/utils/encryption.d.ts +0 -19
  507. package/lib/typescript/utils/encryption.d.ts.map +0 -1
  508. package/lib/typescript/utils/onairosApi.d.ts +0 -87
  509. package/lib/typescript/utils/onairosApi.d.ts.map +0 -1
  510. package/lib/typescript/utils/programmaticFlow.d.ts +0 -23
  511. package/lib/typescript/utils/programmaticFlow.d.ts.map +0 -1
  512. package/lib/typescript/utils/retryHelper.d.ts +0 -69
  513. package/lib/typescript/utils/retryHelper.d.ts.map +0 -1
  514. package/lib/typescript/utils/secureStorage.d.ts +0 -94
  515. package/lib/typescript/utils/secureStorage.d.ts.map +0 -1
  516. package/src/api/index.ts +0 -111
  517. package/src/assets/images/email.png +0 -0
  518. package/src/assets/images/linkedin.png +0 -0
  519. package/src/assets/images/onairos_logo.png +0 -0
  520. package/src/assets/images/reddit.png +0 -0
  521. package/src/assets/images/youtube.png +0 -0
  522. package/src/components/DataRequestModal.tsx +0 -227
  523. package/src/components/DataRequestScreen.tsx +0 -356
  524. package/src/components/EmailVerificationModal.tsx +0 -364
  525. package/src/components/Onairos.tsx +0 -425
  526. package/src/components/OnairosButton.tsx +0 -359
  527. package/src/components/Overlay.tsx +0 -506
  528. package/src/components/PinInput.tsx +0 -343
  529. package/src/components/PlatformList.tsx +0 -145
  530. package/src/components/TrainingModal.tsx +0 -737
  531. package/src/components/UniversalOnboarding.tsx +0 -1839
  532. package/src/components/UniversalOnboarding.tsx.new +0 -455
  533. package/src/components/onboarding/OAuthWebView.tsx +0 -838
  534. package/src/components/onboarding/OnboardingHeader.tsx +0 -70
  535. package/src/components/onboarding/PinInput.tsx +0 -356
  536. package/src/components/onboarding/PlatformConnector.tsx +0 -302
  537. package/src/components/screens/ConnectorScreen.tsx +0 -153
  538. package/src/components/screens/LoadingScreen.tsx +0 -100
  539. package/src/components/screens/PinCreationScreen.tsx +0 -67
  540. package/src/constants/index.ts +0 -83
  541. package/src/hooks/useConnections.ts +0 -163
  542. package/src/hooks/useCredentials.ts +0 -175
  543. package/src/index.js +0 -14
  544. package/src/index.ts +0 -50
  545. package/src/services/SDK_API_KEY_VALIDATION.md +0 -421
  546. package/src/services/apiKeyService.ts +0 -984
  547. package/src/services/oauthService.ts +0 -412
  548. package/src/services/platformAuthService.ts +0 -1113
  549. package/src/types/ambient.d.ts +0 -29
  550. package/src/types/declarations.d.ts +0 -26
  551. package/src/types/index.d.ts +0 -274
  552. package/src/types/index.ts +0 -244
  553. package/src/types/node-fix.d.ts +0 -19
  554. package/src/types/node-override.d.ts +0 -24
  555. package/src/types/opacity.d.ts +0 -16
  556. package/src/types/types.d.ts +0 -18
  557. package/src/types.ts +0 -298
  558. package/src/utils/Portal.tsx +0 -83
  559. package/src/utils/api.js +0 -112
  560. package/src/utils/auth.js +0 -104
  561. package/src/utils/crypto.js +0 -60
  562. package/src/utils/debugHelper.ts +0 -53
  563. package/src/utils/encryption.ts +0 -69
  564. package/src/utils/onairosApi.ts +0 -391
  565. package/src/utils/programmaticFlow.ts +0 -113
  566. package/src/utils/retryHelper.ts +0 -275
  567. package/src/utils/secureStorage.ts +0 -361
  568. package/types/index.d.ts +0 -218
  569. package/types/node-env.d.ts +0 -15
  570. /package/{src/assets/images → lib/commonjs/assets/icons}/farcaster.png +0 -0
  571. /package/{src/assets/images → lib/commonjs/assets/icons}/instagram.png +0 -0
  572. /package/{src/assets/images → lib/commonjs/assets/icons}/pinterest.png +0 -0
  573. /package/{src/assets/images → lib/commonjs/assets/icons}/swerv_logo.png +0 -0
  574. /package/{src/assets/images → lib/commonjs/assets/icons}/twitter.jpg +0 -0
@@ -0,0 +1 @@
1
+ import React from'react';import{View,StyleSheet,TouchableOpacity,Text}from'react-native';import{COLORS,SPACING}from'../theme';function _0x54bc(){const _0x74a64a=['Go\x20back','button','Close','Fragment','createElement','grabber','container','closeButton','Uoidc','TzCxE','backText','fxfgN','closeText','centerSpacer','spacer','100%','center','#D0D0D0','flex-start','grey800','500'];_0x54bc=function(){return _0x74a64a;};return _0x54bc();}const ModalHeader=({onClose:_0x3da6f2,onBack:_0x46f119,showGrabber:showGrabber=!![],showBackButton:showBackButton=![]})=>{const _0x4eb5de={'Uoidc':_0x4e6b(0x0),'TzCxE':_0x4e6b(0x1),'fxfgN':_0x4e6b(0x2)};return React['createElement'](React[_0x4e6b(0x3)],null,showGrabber&&React[_0x4e6b(0x4)](View,{'style':styles['grabberContainer']},React[_0x4e6b(0x4)](View,{'style':styles[_0x4e6b(0x5)]})),React[_0x4e6b(0x4)](View,{'style':styles[_0x4e6b(0x6)]},showBackButton?React[_0x4e6b(0x4)](TouchableOpacity,{'style':styles[_0x4e6b(0x7)],'onPress':_0x46f119,'activeOpacity':0.7,'accessibilityLabel':_0x4eb5de[_0x4e6b(0x8)],'accessibilityRole':_0x4eb5de[_0x4e6b(0x9)]},React['createElement'](Text,{'style':styles[_0x4e6b(0xa)]},'←')):React[_0x4e6b(0x4)](TouchableOpacity,{'style':styles[_0x4e6b(0x7)],'onPress':_0x3da6f2,'activeOpacity':0.7,'accessibilityLabel':_0x4eb5de[_0x4e6b(0xb)],'accessibilityRole':_0x4eb5de[_0x4e6b(0x9)]},React[_0x4e6b(0x4)](Text,{'style':styles[_0x4e6b(0xc)]},'✕')),React[_0x4e6b(0x4)](View,{'style':styles[_0x4e6b(0xd)]}),React[_0x4e6b(0x4)](View,{'style':styles[_0x4e6b(0xe)]})));},styles=StyleSheet['create']({'grabberContainer':{'width':_0x4e6b(0xf),'alignItems':_0x4e6b(0x10),'paddingTop':0xc,'paddingBottom':0x4},'grabber':{'width':0x64,'height':0x6,'backgroundColor':_0x4e6b(0x11),'borderRadius':0x3},'container':{'flexDirection':'row','alignItems':_0x4e6b(0x12),'justifyContent':_0x4e6b(0x12),'height':0x2c,'paddingTop':0x0,'paddingLeft':0x4,'marginBottom':SPACING['md']},'closeButton':{'width':0x24,'height':0x24,'justifyContent':'center','alignItems':'center','marginTop':0x0},'closeText':{'fontSize':0x14,'color':COLORS[_0x4e6b(0x13)],'fontWeight':_0x4e6b(0x14)},'backText':{'fontSize':0x18,'color':COLORS[_0x4e6b(0x13)],'fontWeight':_0x4e6b(0x14)},'centerSpacer':{'flex':0x1},'spacer':{'width':0x2c,'height':0x2c}});function _0x4e6b(_0x54bc2c,_0x4e6b6b){_0x54bc2c=_0x54bc2c-0x0;const _0x235a58=_0x54bc();let _0x1eb635=_0x235a58[_0x54bc2c];return _0x1eb635;}export{ModalHeader};export default ModalHeader;
@@ -0,0 +1 @@
1
+ import React from'react';function _0x3137(_0x1fdad1,_0x3137d9){_0x1fdad1=_0x1fdad1-0x0;const _0x267f41=_0x1fda();let _0x4f7f5b=_0x267f41[_0x1fdad1];return _0x4f7f5b;}function _0x1fda(){const _0x318266=['modalTopPadding','createElement','container','bottom','create','surface','modalTop','modalHorizontal','80%'];_0x1fda=function(){return _0x318266;};return _0x1fda();}import{View,StyleSheet}from'react-native';import{COLORS,BORDER_RADIUS,SPACING}from'../theme';const ModalSheet=({children:_0x5a39ee,topPadding:topPadding=SPACING[_0x3137(0x0)],onClose:_0x3a6316,showGrabber:showGrabber=!![],style:_0x3e09e4})=>{const _0xb0c0bd={'bottom':0x14};return React[_0x3137(0x1)](View,{'style':[styles[_0x3137(0x2)],{'paddingTop':topPadding,'paddingBottom':_0xb0c0bd[_0x3137(0x3)]||SPACING['lg']},_0x3e09e4]},_0x5a39ee);},styles=StyleSheet[_0x3137(0x4)]({'container':{'backgroundColor':COLORS[_0x3137(0x5)],'borderTopLeftRadius':BORDER_RADIUS[_0x3137(0x6)],'borderTopRightRadius':BORDER_RADIUS[_0x3137(0x6)],'borderBottomLeftRadius':0x0,'borderBottomRightRadius':0x0,'paddingHorizontal':SPACING[_0x3137(0x7)],'flex':0x1,'minHeight':_0x3137(0x8)}});export{ModalSheet};export default ModalSheet;
@@ -1,367 +1 @@
1
- import React, { forwardRef, useImperativeHandle, useState, useCallback, useEffect } from 'react';
2
- import { StyleSheet, View, TouchableOpacity, Text, Image, Alert } from 'react-native';
3
- import { UniversalOnboarding } from './UniversalOnboarding';
4
- import { COLORS } from '../constants';
5
- import { hasCredentials, getCredentials } from '../utils/secureStorage';
6
- import { Portal } from '../utils/Portal';
7
- import { initializeApiKey, isApiKeyInitialized, getApiConfig } from '../services/apiKeyService';
8
- export const Onairos = /*#__PURE__*/forwardRef((props, ref) => {
9
- const {
10
- returnLink,
11
- prefillUrl,
12
- AppName,
13
- buttonType = 'normal',
14
- requestData,
15
- buttonWidth = 200,
16
- buttonHeight = 48,
17
- hasStroke = false,
18
- enabled = true,
19
- buttonForm = 'default',
20
- onRejection,
21
- onResolved,
22
- preCheck,
23
- color = COLORS.primary,
24
- debug = false,
25
- darkMode = false,
26
- preferredPlatform,
27
- testMode = false,
28
- // API Key props
29
- apiKey,
30
- environment = 'production',
31
- enableLogging = true,
32
- timeout = 30000,
33
- retryAttempts = 3
34
- } = props;
35
- const [showOverlay, setShowOverlay] = useState(false);
36
- const [isInitialized, setIsInitialized] = useState(false);
37
- const [initializationError, setInitializationError] = useState(null);
38
- const [isInitializing, setIsInitializing] = useState(false);
39
-
40
- // Initialize API key when component mounts or API key changes
41
- useEffect(() => {
42
- var _getApiConfig;
43
- let isMounted = true;
44
- const initializeApi = async () => {
45
- // Skip if already initializing
46
- if (isInitializing) return;
47
- setIsInitializing(true);
48
- setInitializationError(null);
49
- try {
50
- console.log('🚀 Onairos SDK: Starting API key initialization...');
51
- if (!apiKey) {
52
- throw new Error('API key is required. Please provide a valid API key from your Onairos dashboard.');
53
- }
54
- const config = {
55
- apiKey,
56
- environment,
57
- enableLogging,
58
- timeout,
59
- retryAttempts
60
- };
61
-
62
- // Initialize the API key service
63
- await initializeApiKey(config);
64
- if (isMounted) {
65
- setIsInitialized(true);
66
- setInitializationError(null);
67
- if (enableLogging) {
68
- console.log('✅ Onairos SDK: API key initialization completed successfully');
69
- console.log('📊 Configuration:', {
70
- environment,
71
- enableLogging,
72
- timeout,
73
- retryAttempts,
74
- apiKeyLength: apiKey.length
75
- });
76
- }
77
- }
78
- } catch (error) {
79
- const errorMessage = error instanceof Error ? error.message : 'Unknown initialization error';
80
- console.error('❌ Onairos SDK: API key initialization failed:', errorMessage);
81
- if (isMounted) {
82
- setIsInitialized(false);
83
- setInitializationError(errorMessage);
84
-
85
- // Show developer-friendly error
86
- if (enableLogging) {
87
- console.group('🔧 API Key Troubleshooting Guide');
88
- console.log('1. Check that your API key is correct and not expired');
89
- console.log('2. Verify you have the right permissions for your use case');
90
- console.log('3. Ensure your environment setting matches your API key');
91
- console.log('4. Check your internet connection');
92
- console.log('5. Visit https://dashboard.onairos.uk to manage your API keys');
93
- console.groupEnd();
94
- }
95
-
96
- // Call rejection callback if provided
97
- if (onRejection) {
98
- onRejection(`SDK initialization failed: ${errorMessage}`);
99
- }
100
- }
101
- } finally {
102
- if (isMounted) {
103
- setIsInitializing(false);
104
- }
105
- }
106
- };
107
-
108
- // Only initialize if we have an API key and aren't already initialized correctly
109
- if (apiKey && (!isApiKeyInitialized() || ((_getApiConfig = getApiConfig()) === null || _getApiConfig === void 0 ? void 0 : _getApiConfig.apiKey) !== apiKey)) {
110
- initializeApi();
111
- }
112
- return () => {
113
- isMounted = false;
114
- };
115
- }, [apiKey, environment, enableLogging, timeout, retryAttempts, onRejection]);
116
-
117
- // Imperative methods
118
- useImperativeHandle(ref, () => ({
119
- openOverlay: handleShowOverlay,
120
- closeOverlay: handleCloseOverlay,
121
- isInitialized: () => isInitialized,
122
- getApiConfig: () => getApiConfig()
123
- }));
124
- const handleShowOverlay = useCallback(async () => {
125
- try {
126
- // Check if SDK is initialized
127
- if (!isInitialized) {
128
- const errorMessage = initializationError || 'SDK not initialized. Please check your API key.';
129
- console.error('❌ Cannot open overlay: SDK not initialized');
130
- if (onRejection) {
131
- onRejection(errorMessage);
132
- } else {
133
- Alert.alert('SDK Error', errorMessage, [{
134
- text: 'OK'
135
- }]);
136
- }
137
- return;
138
- }
139
-
140
- // Run pre-check if provided
141
- if (preCheck) {
142
- if (enableLogging) {
143
- console.log('🔍 Running pre-check validation...');
144
- }
145
- try {
146
- const preCheckPassed = await preCheck();
147
- if (!preCheckPassed) {
148
- if (enableLogging) {
149
- console.log('⛔ Pre-check failed, aborting overlay');
150
- }
151
- return;
152
- }
153
- if (enableLogging) {
154
- console.log('✅ Pre-check passed');
155
- }
156
- } catch (preCheckError) {
157
- console.error('❌ Pre-check error:', preCheckError);
158
- if (onRejection) {
159
- onRejection(`Pre-check failed: ${preCheckError.message}`);
160
- }
161
- return;
162
- }
163
- }
164
-
165
- // Check for existing credentials
166
- if (enableLogging) {
167
- console.log('🔍 Checking for existing credentials...');
168
- }
169
- const hasExistingCredentials = await hasCredentials();
170
- if (hasExistingCredentials) {
171
- if (enableLogging) {
172
- console.log('🔑 Existing credentials found, attempting automatic resolution...');
173
- }
174
- try {
175
- const credentials = await getCredentials();
176
- if (credentials && onResolved) {
177
- // For existing users, we can resolve immediately with cached data
178
- const mockApiUrl = 'https://api2.onairos.uk/user/data';
179
- const mockToken = 'existing_user_token';
180
- if (enableLogging) {
181
- console.log('✅ Resolving with existing credentials');
182
- }
183
- onResolved(mockApiUrl, mockToken, credentials);
184
- return;
185
- }
186
- } catch (credentialsError) {
187
- console.warn('⚠️ Failed to retrieve existing credentials:', credentialsError);
188
- // Continue with normal flow
189
- }
190
- }
191
- if (enableLogging) {
192
- console.log('🎨 Opening Onairos overlay...');
193
- }
194
- setShowOverlay(true);
195
- } catch (error) {
196
- console.error('❌ Error opening overlay:', error);
197
- if (onRejection) {
198
- onRejection(`Failed to open overlay: ${error.message}`);
199
- }
200
- }
201
- }, [isInitialized, initializationError, preCheck, enableLogging, onRejection, onResolved]);
202
- const handleCloseOverlay = useCallback(result => {
203
- if (enableLogging) {
204
- console.log('🔽 Closing Onairos overlay');
205
- }
206
- setShowOverlay(false);
207
- if (result && onResolved) {
208
- onResolved(result.apiUrl, result.token, result.userData);
209
- }
210
- }, [enableLogging, onResolved]);
211
- const handleOverlayRejection = useCallback(error => {
212
- if (enableLogging) {
213
- console.log('❌ Overlay rejected:', error);
214
- }
215
- setShowOverlay(false);
216
- if (onRejection) {
217
- onRejection(error);
218
- }
219
- }, [enableLogging, onRejection]);
220
-
221
- // Show error state if initialization failed
222
- if (initializationError && !isInitializing) {
223
- return /*#__PURE__*/React.createElement(View, {
224
- style: styles.errorContainer
225
- }, /*#__PURE__*/React.createElement(TouchableOpacity, {
226
- style: [styles.errorButton, {
227
- backgroundColor: '#FF6B6B'
228
- }],
229
- onPress: () => {
230
- Alert.alert('SDK Error', `Onairos SDK initialization failed:\n\n${initializationError}\n\nPlease check your API key and try again.`, [{
231
- text: 'OK'
232
- }]);
233
- }
234
- }, /*#__PURE__*/React.createElement(Text, {
235
- style: styles.errorButtonText
236
- }, "\u26A0\uFE0F SDK Error")));
237
- }
238
-
239
- // Show loading state while initializing
240
- if (isInitializing || !isInitialized) {
241
- return /*#__PURE__*/React.createElement(View, {
242
- style: styles.loadingContainer
243
- }, /*#__PURE__*/React.createElement(TouchableOpacity, {
244
- style: [styles.loadingButton, {
245
- backgroundColor: '#999'
246
- }],
247
- disabled: true
248
- }, /*#__PURE__*/React.createElement(Text, {
249
- style: styles.loadingButtonText
250
- }, "\uD83D\uDD04 Initializing...")));
251
- }
252
-
253
- // Get button style based on type
254
- const getButtonStyle = () => {
255
- const baseStyle = {
256
- width: buttonWidth,
257
- height: buttonHeight,
258
- backgroundColor: color,
259
- borderRadius: buttonType === 'pill' ? buttonHeight / 2 : 8,
260
- alignItems: 'center',
261
- justifyContent: 'center',
262
- flexDirection: 'row',
263
- opacity: enabled ? 1 : 0.6
264
- };
265
- if (hasStroke) {
266
- baseStyle.borderWidth = 2;
267
- baseStyle.borderColor = darkMode ? '#fff' : '#000';
268
- }
269
- return baseStyle;
270
- };
271
- const getButtonText = () => {
272
- switch (buttonForm) {
273
- case 'connect':
274
- return 'Connect with Onairos';
275
- default:
276
- return 'Continue with Onairos';
277
- }
278
- };
279
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
280
- style: getButtonStyle(),
281
- onPress: handleShowOverlay,
282
- disabled: !enabled || isInitializing || !isInitialized,
283
- activeOpacity: 0.8
284
- }, /*#__PURE__*/React.createElement(Image, {
285
- source: require('../assets/images/onairos_logo.png'),
286
- style: styles.logo,
287
- resizeMode: "contain"
288
- }), /*#__PURE__*/React.createElement(Text, {
289
- style: [styles.buttonText, {
290
- color: darkMode ? '#000' : '#fff'
291
- }]
292
- }, getButtonText())), showOverlay && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(UniversalOnboarding, {
293
- visible: showOverlay,
294
- onClose: handleCloseOverlay,
295
- AppName: AppName,
296
- requestData: requestData || {},
297
- returnLink: returnLink,
298
- prefillUrl: prefillUrl,
299
- onComplete: handleCloseOverlay,
300
- embedd: false,
301
- debug: debug,
302
- testMode: testMode,
303
- preferredPlatform: preferredPlatform,
304
- config: getApiConfig() || undefined
305
- })));
306
- });
307
- const styles = StyleSheet.create({
308
- button: {
309
- flexDirection: 'row',
310
- alignItems: 'center',
311
- justifyContent: 'center',
312
- paddingVertical: 12,
313
- paddingHorizontal: 16,
314
- shadowColor: '#000',
315
- shadowOffset: {
316
- width: 0,
317
- height: 2
318
- },
319
- shadowOpacity: 0.1,
320
- shadowRadius: 4,
321
- elevation: 2
322
- },
323
- buttonContent: {
324
- flexDirection: 'row',
325
- alignItems: 'center',
326
- justifyContent: 'center'
327
- },
328
- logo: {
329
- width: 24,
330
- height: 24,
331
- marginRight: 8
332
- },
333
- buttonText: {
334
- fontSize: 16,
335
- fontWeight: '600',
336
- textAlign: 'center'
337
- },
338
- errorContainer: {
339
- flex: 1,
340
- justifyContent: 'center',
341
- alignItems: 'center'
342
- },
343
- errorButton: {
344
- padding: 16,
345
- borderRadius: 8
346
- },
347
- errorButtonText: {
348
- fontSize: 16,
349
- fontWeight: '600',
350
- color: '#fff'
351
- },
352
- loadingContainer: {
353
- flex: 1,
354
- justifyContent: 'center',
355
- alignItems: 'center'
356
- },
357
- loadingButton: {
358
- padding: 16,
359
- borderRadius: 8
360
- },
361
- loadingButtonText: {
362
- fontSize: 16,
363
- fontWeight: '600',
364
- color: '#fff'
365
- }
366
- });
367
- //# sourceMappingURL=Onairos.js.map
1
+ import React,{forwardRef,useImperativeHandle,useState,useCallback,useEffect}from'react';import{StyleSheet,View,TouchableOpacity,Text,Image,Alert}from'react-native';import{UniversalOnboarding}from'./UniversalOnboarding';function _0x3f48(_0x2d6e4b,_0x3f48d6){_0x2d6e4b=_0x2d6e4b-0x0;const _0x1b46a6=_0x2d6e();let _0x5c1ad1=_0x1b46a6[_0x2d6e4b];return _0x5c1ad1;}import{COLORS}from'../constants';import{hasCredentials,getCredentials}from'../utils/secureStorage';import{initializeApiKey,isApiKeyInitialized,getApiConfig}from'../services/apiKeyService';import{API_CONFIG}from'../config/api';import{BRAND_IMAGES}from'../utils/assetRegistry';export const Onairos=forwardRef((_0x10a256,_0x3234f6)=>{const _0x2758ce={'yujqT':function(_0x5ea5aa,_0x173996){return _0x5ea5aa===_0x173996;},'HOaTG':'NBsQR','mdAyY':function(_0x41e8ad,_0x43b1f0){return _0x41e8ad(_0x43b1f0);},'bZHpV':function(_0x54319f,_0x1797a5){return _0x54319f(_0x1797a5);},'IsfSB':_0x3f48(0x0),'vdaXa':function(_0x3ea13f,_0x40996c){return _0x3ea13f(_0x40996c);},'HDtHH':_0x3f48(0x1),'QbMbe':function(_0x2782aa,_0x2c79c1){return _0x2782aa instanceof _0x2c79c1;},'UJqXG':_0x3f48(0x2),'opQHE':_0x3f48(0x3),'bpWXI':function(_0x3f28ae,_0x515f99){return _0x3f28ae(_0x515f99);},'RUBrm':_0x3f48(0x4),'SWize':_0x3f48(0x5),'EzdaA':_0x3f48(0x6),'GJkrf':'2.\x20Verify\x20you\x20have\x20the\x20right\x20permissions\x20for\x20your\x20use\x20case','ZZLxf':_0x3f48(0x7),'wNwgw':'4.\x20Check\x20your\x20internet\x20connection','FAPsY':_0x3f48(0x8),'RdgQx':function(_0x531183,_0x336551){return _0x531183===_0x336551;},'MDpSU':_0x3f48(0x9),'MmwFG':function(_0x578687,_0x2c9d81){return _0x578687!==_0x2c9d81;},'Benea':_0x3f48(0xa),'gQeyi':_0x3f48(0xb),'INHux':_0x3f48(0xc),'OiCwR':function(_0x4b2749,_0xcab116){return _0x4b2749/_0xcab116;},'KEwOh':_0x3f48(0xd),'bPvIB':_0x3f48(0xe),'Qyehx':_0x3f48(0xf),'RSLOb':function(_0x1e6ecc,_0x2891a2){return _0x1e6ecc(_0x2891a2);},'XYkAz':_0x3f48(0x10),'BjarA':'uzyPg','jbCVX':function(_0x20bc7e){return _0x20bc7e();},'twCon':function(_0x2a2854,_0x3a48b5){return _0x2a2854!==_0x3a48b5;},'wTkdf':_0x3f48(0x11),'fqlAk':function(_0x2af8e5,_0x3377b0){return _0x2af8e5(_0x3377b0);},'LsquG':_0x3f48(0x12),'KLDrK':_0x3f48(0x13),'swusP':function(_0x5e71b3,_0x459a70){return _0x5e71b3(_0x459a70);},'bhXSX':function(_0x141ab9,_0x571420){return _0x141ab9(_0x571420);},'EUOtA':'🔽\x20showOverlay\x20set\x20to\x20false','ZHqVl':_0x3f48(0x14),'atvTL':_0x3f48(0x15),'sZgVC':function(_0x2fe6d6,_0x5adc97){return _0x2fe6d6||_0x5adc97;},'wRzTx':_0x3f48(0x16),'SQnnw':function(_0x29f4aa,_0x14cdfd){return _0x29f4aa!==_0x14cdfd;},'HWsuv':_0x3f48(0x17),'TisPy':_0x3f48(0x18),'mvtPF':function(_0x331687,_0x50a60e){return _0x331687(_0x50a60e);},'BGpBD':'lpjiA','cmtRI':_0x3f48(0x19),'GrHyS':'OKkRZ','mqkKM':_0x3f48(0x1a),'GAVor':function(_0x82f7c2){return _0x82f7c2();},'aVYTL':_0x3f48(0x1b),'BwqxF':_0x3f48(0x1c),'DQGFp':_0x3f48(0x1d),'qAsXt':_0x3f48(0x1e),'QCYZU':function(_0x47e07a,_0x333782){return _0x47e07a(_0x333782);},'YmIzB':_0x3f48(0x1f),'MAnpl':function(_0x3400da){return _0x3400da();},'ckxSR':_0x3f48(0x20),'udvfH':function(_0x20210d){return _0x20210d();},'DWQtj':function(_0x33d3ae,_0x669d30){return _0x33d3ae&&_0x669d30;},'aUpfF':_0x3f48(0x21),'boAyY':_0x3f48(0x22),'pSQtE':_0x3f48(0x23),'QIUHo':function(_0x4aa57f,_0x1b0a24){return _0x4aa57f(_0x1b0a24);},'iniwt':function(_0x3cc048,_0x3653ae){return _0x3cc048(_0x3653ae);},'mQziq':_0x3f48(0x24),'uPjIM':_0x3f48(0x25),'OGgUv':'🔽\x20Closing\x20Onairos\x20overlay,\x20result:','xnshU':function(_0x5ae74a,_0x34cf5e,_0x4e35b7,_0x1c074f){return _0x5ae74a(_0x34cf5e,_0x4e35b7,_0x1c074f);},'tfuuj':_0x3f48(0x26),'AqkDN':_0x3f48(0x27),'HtYDV':function(_0x2e364c,_0x39f597){return _0x2e364c(_0x39f597);},'QkeMC':function(_0x123375,_0x6940fe){return _0x123375(_0x6940fe);},'IsrgY':_0x3f48(0x28),'usXFK':'pill','TByXz':_0x3f48(0x29),'qGEox':_0x3f48(0x2a),'WDHvi':_0x3f48(0x2b),'PVZnd':_0x3f48(0x2c),'HqXMR':function(_0x48986c,_0x35137e){return _0x48986c(_0x35137e);},'DAXQY':function(_0x4858bb,_0x35fb97){return _0x4858bb(_0x35fb97);},'rbJfg':function(_0x318d18,_0x543386){return _0x318d18(_0x543386);},'GtZSa':function(_0x33bfef,_0x50e29e,_0x39acf3){return _0x33bfef(_0x50e29e,_0x39acf3);},'hjxEg':function(_0x2d08ba,_0x4a6939,_0x584977){return _0x2d08ba(_0x4a6939,_0x584977);},'UlNjn':function(_0x39fbc2,_0x5849c0,_0x30ff6f){return _0x39fbc2(_0x5849c0,_0x30ff6f);},'rrLeS':_0x3f48(0x2d),'WBggU':'#999','DoQcu':function(_0x436cc8,_0x27a995){return _0x436cc8||_0x27a995;}},{returnLink:_0x4f3cd3,prefillUrl:_0x29783a,AppName:_0x196170,buttonType:buttonType=_0x2758ce[_0x3f48(0x2e)],requestData:_0x3637f2,buttonWidth:buttonWidth=0xc8,buttonHeight:buttonHeight=0x30,hasStroke:hasStroke=![],enabled:enabled=!![],buttonForm:buttonForm=_0x2758ce[_0x3f48(0x2f)],onRejection:_0x4166d8,onResolved:_0x344df2,preCheck:_0x3db2a0,color:color=COLORS[_0x3f48(0x30)],debug:debug=![],darkMode:darkMode=![],preferredPlatform:_0x31aa35,testMode:testMode=![],apiKey:_0x3dacfd,environment:environment=_0x3f48(0x31),enableLogging:enableLogging=!![],timeout:timeout=0x7530,retryAttempts:retryAttempts=0x3}=_0x10a256,[_0x1030d6,_0x5c4da0]=_0x2758ce[_0x3f48(0x32)](useState,![]),[_0x154efa,_0x14f526]=_0x2758ce[_0x3f48(0x33)](useState,![]),[_0x30b8be,_0x58fa8e]=_0x2758ce['DAXQY'](useState,null),[_0x22cd27,_0x17e286]=_0x2758ce[_0x3f48(0x34)](useState,![]);_0x2758ce['GtZSa'](useEffect,()=>{const _0x42201f={'xUejC':function(_0x418700,_0xf025f5){return _0x2758ce['RSLOb'](_0x418700,_0xf025f5);},'TxFZh':_0x2758ce[_0x3f48(0x35)]};if(_0x2758ce[_0x3f48(0x36)]!==_0x3f48(0x37)){var _0x9418aa;let _0x25bb0d=!![];const _0x25d5b5=async()=>{const _0x237dbb={'jbtln':_0x3f48(0x28)};if(_0x2758ce[_0x3f48(0x38)](_0x2758ce[_0x3f48(0x39)],_0x2758ce[_0x3f48(0x39)])){if(_0x22cd27)return;_0x2758ce[_0x3f48(0x3a)](_0x17e286,!![]),_0x2758ce[_0x3f48(0x3b)](_0x58fa8e,null);try{console[_0x3f48(0x3c)]('🚀\x20Onairos\x20SDK:\x20Starting\x20API\x20key\x20initialization...');if(!_0x3dacfd)throw new Error(_0x2758ce[_0x3f48(0x3d)]);const _0x194dc8={'apiKey':_0x3dacfd,'environment':environment,'enableLogging':enableLogging,'timeout':timeout,'retryAttempts':retryAttempts};await initializeApiKey(_0x194dc8),_0x25bb0d&&(_0x2758ce[_0x3f48(0x3e)](_0x14f526,!![]),_0x58fa8e(null),enableLogging&&(console[_0x3f48(0x3c)]('✅\x20Onairos\x20SDK:\x20API\x20key\x20initialization\x20completed\x20successfully'),console['log'](_0x2758ce[_0x3f48(0x3f)],{'environment':environment,'enableLogging':enableLogging,'timeout':timeout,'retryAttempts':retryAttempts,'apiKeyLength':_0x3dacfd['length']})));}catch(_0x29bc7f){const _0x1e773a=_0x2758ce[_0x3f48(0x40)](_0x29bc7f,Error)?_0x29bc7f[_0x3f48(0x41)]:_0x2758ce[_0x3f48(0x42)];console[_0x3f48(0x43)](_0x2758ce[_0x3f48(0x44)],_0x1e773a),_0x25bb0d&&(_0x2758ce[_0x3f48(0x3e)](_0x14f526,![]),_0x2758ce['bpWXI'](_0x58fa8e,_0x1e773a),enableLogging&&(_0x2758ce[_0x3f48(0x45)]===_0x2758ce[_0x3f48(0x46)]?_0x42201f[_0x3f48(0x47)](_0x1f59bf,![]):(console[_0x3f48(0x48)](_0x2758ce['EzdaA']),console[_0x3f48(0x3c)](_0x3f48(0x13)),console[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x49)]),console[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x4a)]),console['log'](_0x2758ce['wNwgw']),console[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x4b)]),console[_0x3f48(0x4c)]())),_0x4166d8&&_0x2758ce[_0x3f48(0x3e)](_0x4166d8,'SDK\x20initialization\x20failed:\x20'+_0x1e773a));}finally{_0x2758ce[_0x3f48(0x4d)]('oLXIO',_0x2758ce['MDpSU'])?_0x25bb0d&&(_0x2758ce[_0x3f48(0x4e)](_0x2758ce[_0x3f48(0x4f)],'UxZfp')?_0x2848cb[_0x3f48(0x3c)](_0x42201f[_0x3f48(0x50)]):_0x2758ce[_0x3f48(0x51)](_0x17e286,![])):_0x7e6235[_0x3f48(0x3c)](_0x3f48(0x27),_0x386969);}}else Alert[_0x3f48(0x52)](_0x237dbb['jbtln'],_0x3f48(0x53)+_0x5ee44a+_0x3f48(0x54),[{'text':'OK'}]);};if(_0x3dacfd&&(!_0x2758ce[_0x3f48(0x55)](isApiKeyInitialized)||_0x2758ce[_0x3f48(0x56)](_0x2758ce[_0x3f48(0x4d)](_0x9418aa=_0x2758ce['jbCVX'](getApiConfig),null)||_0x9418aa===void 0x0?void 0x0:_0x9418aa[_0x3f48(0x57)],_0x3dacfd)))_0x2758ce[_0x3f48(0x55)](_0x25d5b5);else isApiKeyInitialized()&&(_0x2758ce[_0x3f48(0x38)](_0x2758ce[_0x3f48(0x58)],'rHJyp')?_0x2758ce['vdaXa'](_0x1324a8,_0x3f48(0x59)+_0x292493):(_0x2758ce[_0x3f48(0x3e)](_0x14f526,!![]),_0x2758ce[_0x3f48(0x5a)](_0x17e286,![]),enableLogging&&console[_0x3f48(0x3c)](_0x2758ce['LsquG'])));return()=>{const _0x4daf5f={'mSNzs':function(_0x4941d3,_0x245d00){return _0x4941d3(_0x245d00);},'nItyl':_0x2758ce['gQeyi']};'XYQPV'===_0x2758ce[_0x3f48(0x5b)]?_0x25bb0d=![]:(_0x4daf5f[_0x3f48(0x5c)](_0x4036bd,!![]),_0x4daf5f[_0x3f48(0x5c)](_0x5a3f09,null),_0x5ee65f&&(_0x5df935['log'](_0x4daf5f['nItyl']),_0x40936c[_0x3f48(0x3c)](_0x3f48(0x1),{'environment':_0x482bb2,'enableLogging':_0x1059a0,'timeout':_0x47933a,'retryAttempts':_0x29eb63,'apiKeyLength':_0x12f893[_0x3f48(0x5d)]})));};}else{const _0x2562bf={'width':_0x21a0f9,'height':_0x286449,'backgroundColor':_0x5f4459,'borderRadius':_0x2758ce[_0x3f48(0x4d)](_0x3e1ec5,_0x3f48(0x5e))?_0x2758ce[_0x3f48(0x5f)](_0x2bdae4,0x2):0x8,'alignItems':_0x2758ce[_0x3f48(0x60)],'justifyContent':_0x2758ce['KEwOh'],'flexDirection':_0x3f48(0x29),'opacity':_0x4ac8b3?0x1:0.6};return _0xb61f3&&(_0x2562bf[_0x3f48(0x61)]=0x2,_0x2562bf[_0x3f48(0x62)]=_0x29012c?_0x2758ce[_0x3f48(0x63)]:_0x2758ce[_0x3f48(0x64)]),_0x2562bf;}},[_0x3dacfd,environment,enableLogging,timeout,retryAttempts,_0x4166d8]),_0x2758ce[_0x3f48(0x65)](useImperativeHandle,_0x3234f6,()=>({'openOverlay':_0x13dc9b,'closeOverlay':_0x3ed747,'isInitialized':()=>_0x154efa,'getApiConfig':()=>getApiConfig()}));const _0x13dc9b=_0x2758ce['GtZSa'](useCallback,async()=>{const _0x26b96e={'xibrh':_0x2758ce[_0x3f48(0x66)],'kyRCu':function(_0x32961d,_0x23c43b){return _0x2758ce['swusP'](_0x32961d,_0x23c43b);},'PsJmJ':_0x2758ce[_0x3f48(0x67)]};console['log'](_0x2758ce['ZHqVl'],_0x154efa,_0x3f48(0x68),_0x22cd27,_0x2758ce[_0x3f48(0x69)],_0x1030d6);try{if(!_0x154efa){const _0x51fee1=_0x2758ce['sZgVC'](_0x30b8be,_0x3f48(0x6a));console[_0x3f48(0x43)](_0x2758ce[_0x3f48(0x6b)]);_0x4166d8?_0x2758ce[_0x3f48(0x6c)](_0x2758ce[_0x3f48(0x6d)],_0x2758ce[_0x3f48(0x6e)])?_0x2758ce['mvtPF'](_0x4166d8,_0x51fee1):(_0x288742[_0x3f48(0x48)](_0x2758ce[_0x3f48(0x6f)]),_0x5cfde9[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x70)]),_0x3b7855['log'](_0x3f48(0x71)),_0xb03479[_0x3f48(0x3c)](_0x2758ce['ZZLxf']),_0x38b7e5[_0x3f48(0x3c)](_0x2758ce['wNwgw']),_0x2b6cc4[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x4b)]),_0x2c2d95[_0x3f48(0x4c)]()):Alert[_0x3f48(0x52)](_0x3f48(0x28),_0x51fee1,[{'text':'OK'}]);return;}if(_0x3db2a0){enableLogging&&(_0x2758ce['yujqT'](_0x2758ce[_0x3f48(0x72)],_0x2758ce[_0x3f48(0x73)])?_0x459093&&_0x422708(![]):console[_0x3f48(0x3c)](_0x3f48(0x74)));try{if(_0x2758ce[_0x3f48(0x75)]!==_0x2758ce[_0x3f48(0x76)]){const _0x4bc891=await _0x2758ce[_0x3f48(0x77)](_0x3db2a0);if(!_0x4bc891){if(_0x2758ce[_0x3f48(0x38)](_0x2758ce['aVYTL'],_0x3f48(0x78)))_0x2758ce[_0x3f48(0x79)](_0x1c2a10,'Failed\x20to\x20open\x20overlay:\x20'+_0x1bd503[_0x3f48(0x41)]);else{enableLogging&&console['log'](_0x2758ce['BwqxF']);return;}}enableLogging&&console[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x7a)]);}else _0x30eff2['log'](_0x26b96e['xibrh']);}catch(_0x16f59c){console[_0x3f48(0x43)](_0x2758ce['qAsXt'],_0x16f59c);_0x4166d8&&_0x2758ce[_0x3f48(0x7b)](_0x4166d8,_0x3f48(0x7c)+_0x16f59c[_0x3f48(0x41)]);return;}}enableLogging&&console[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x7d)]);const _0xffc96a=await _0x2758ce[_0x3f48(0x7e)](hasCredentials);if(_0xffc96a){enableLogging&&console[_0x3f48(0x3c)](_0x2758ce['ckxSR']);try{if(_0x3f48(0x7f)===_0x3f48(0x80))_0x3bb30e[_0x3f48(0x3c)](_0x3f48(0x81),_0x4327cc),_0x26b96e[_0x3f48(0x82)](_0x805e91,![]),_0x58bb37[_0x3f48(0x3c)](_0x26b96e[_0x3f48(0x83)]),_0x2a36ab&&_0x342ace&&_0x2e01f5(_0x2ea3ed[_0x3f48(0x84)],_0x18f48c[_0x3f48(0x85)],_0x45838a[_0x3f48(0x86)]);else{const _0x1fe8f0=await _0x2758ce[_0x3f48(0x87)](getCredentials);if(_0x2758ce[_0x3f48(0x88)](_0x1fe8f0,_0x344df2)){const _0x5adf00=API_CONFIG[_0x3f48(0x89)]+'/user/data',_0x8365e0=_0x2758ce['aUpfF'];enableLogging&&console[_0x3f48(0x3c)](_0x3f48(0x10));_0x344df2(_0x5adf00,_0x8365e0,_0x1fe8f0);return;}}}catch(_0x377feb){console[_0x3f48(0x8a)](_0x3f48(0x8b),_0x377feb);}}enableLogging&&(_0x2758ce['twCon'](_0x2758ce[_0x3f48(0x8c)],_0x2758ce[_0x3f48(0x8d)])?console['log']('🎨\x20Opening\x20Onairos\x20overlay...'):(_0x2758ce[_0x3f48(0x51)](_0x3958a5,!![]),_0x2758ce[_0x3f48(0x8e)](_0x63a90,![]),_0xc0335a&&_0x3e956c['log'](_0x2758ce[_0x3f48(0x66)]))),_0x2758ce[_0x3f48(0x8f)](_0x5c4da0,!![]);}catch(_0x7db673){console['error'](_0x3f48(0x90),_0x7db673),_0x4166d8&&_0x2758ce[_0x3f48(0x91)](_0x4166d8,_0x3f48(0x92)+_0x7db673[_0x3f48(0x41)]);}},[_0x154efa,_0x30b8be,_0x3db2a0,enableLogging,_0x4166d8,_0x344df2]),_0x3ed747=useCallback(_0x13a968=>{_0x2758ce[_0x3f48(0x93)]!==_0x2758ce['uPjIM']?(console[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x94)],_0x13a968),_0x2758ce['iniwt'](_0x5c4da0,![]),console[_0x3f48(0x3c)](_0x2758ce['EUOtA']),_0x2758ce[_0x3f48(0x88)](_0x13a968,_0x344df2)&&_0x2758ce[_0x3f48(0x95)](_0x344df2,_0x13a968[_0x3f48(0x84)],_0x13a968[_0x3f48(0x85)],_0x13a968[_0x3f48(0x86)])):_0x3376f7(_0x4bd117);},[enableLogging,_0x344df2]),_0x45a0ef=_0x2758ce[_0x3f48(0x96)](useCallback,_0x32776e=>{const _0xcdf10c={'HTIQd':_0x2758ce[_0x3f48(0x97)]};if(enableLogging){if(_0x3f48(0x26)!==_0x2758ce[_0x3f48(0x98)]){_0x3bb7ba&&_0x48dac4[_0x3f48(0x3c)](_0xcdf10c[_0x3f48(0x99)]);return;}else console[_0x3f48(0x3c)](_0x2758ce[_0x3f48(0x9a)],_0x32776e);}_0x2758ce[_0x3f48(0x9b)](_0x5c4da0,![]),_0x4166d8&&_0x2758ce[_0x3f48(0x9c)](_0x4166d8,_0x32776e);},[enableLogging,_0x4166d8]);if(_0x2758ce[_0x3f48(0x88)](_0x30b8be,!_0x22cd27))return React[_0x3f48(0x9d)](View,{'style':styles[_0x3f48(0x9e)]},React[_0x3f48(0x9d)](TouchableOpacity,{'style':[styles[_0x3f48(0x9f)],{'backgroundColor':_0x3f48(0xa0)}],'onPress':()=>{Alert[_0x3f48(0x52)](_0x2758ce['IsrgY'],_0x3f48(0x53)+_0x30b8be+_0x3f48(0x54),[{'text':'OK'}]);}},React[_0x3f48(0x9d)](Text,{'style':styles['errorButtonText']},_0x2758ce[_0x3f48(0xa1)])));if(_0x22cd27||!_0x154efa)return React[_0x3f48(0x9d)](View,{'style':styles[_0x3f48(0xa2)]},React['createElement'](TouchableOpacity,{'style':[styles[_0x3f48(0xa3)],{'backgroundColor':_0x2758ce[_0x3f48(0xa4)]}],'disabled':!![]},React[_0x3f48(0x9d)](Text,{'style':styles[_0x3f48(0xa5)]},_0x3f48(0xa6))));const _0x280245=()=>{const _0x4ed194={'width':buttonWidth,'height':buttonHeight,'backgroundColor':color,'borderRadius':buttonType===_0x2758ce['usXFK']?_0x2758ce[_0x3f48(0x5f)](buttonHeight,0x2):0x8,'alignItems':_0x3f48(0xd),'justifyContent':_0x2758ce['KEwOh'],'flexDirection':_0x2758ce[_0x3f48(0xa7)],'opacity':enabled?0x1:0.6};return hasStroke&&(_0x4ed194[_0x3f48(0x61)]=0x2,_0x4ed194[_0x3f48(0x62)]=darkMode?_0x2758ce[_0x3f48(0x63)]:_0x2758ce[_0x3f48(0x64)]),_0x4ed194;},_0x5d5b17=()=>{switch(buttonForm){case _0x2758ce[_0x3f48(0xa8)]:return _0x3f48(0xa9);default:return _0x3f48(0xaa);}};return React[_0x3f48(0x9d)](React['Fragment'],null,React[_0x3f48(0x9d)](TouchableOpacity,{'style':_0x280245(),'onPress':_0x13dc9b,'disabled':_0x2758ce[_0x3f48(0xab)](!enabled,_0x22cd27)||!_0x154efa,'activeOpacity':0.8},React[_0x3f48(0x9d)](Image,{'source':BRAND_IMAGES[_0x3f48(0xac)],'style':styles[_0x3f48(0xad)],'resizeMode':'contain'}),React[_0x3f48(0x9d)](Text,{'style':[styles['buttonText'],{'color':darkMode?_0x2758ce['Qyehx']:_0x2758ce[_0x3f48(0x63)]}]},_0x5d5b17())),React[_0x3f48(0x9d)](UniversalOnboarding,{'visible':_0x1030d6,'onClose':_0x3ed747,'AppName':_0x196170,'requestData':_0x2758ce['DoQcu'](_0x3637f2,{}),'returnLink':_0x4f3cd3,'onComplete':_0x3ed747,'embedd':![],'debug':debug,'testMode':testMode,'preferredPlatform':_0x31aa35}));});const styles=StyleSheet[_0x3f48(0xae)]({'button':{'flexDirection':_0x3f48(0x29),'alignItems':_0x3f48(0xd),'justifyContent':_0x3f48(0xd),'paddingVertical':0xc,'paddingHorizontal':0x10,'shadowColor':'#000','shadowOffset':{'width':0x0,'height':0x2},'shadowOpacity':0.1,'shadowRadius':0x4,'elevation':0x2},'buttonContent':{'flexDirection':_0x3f48(0x29),'alignItems':_0x3f48(0xd),'justifyContent':'center'},'logo':{'width':0x18,'height':0x18,'marginRight':0x8},'buttonText':{'fontSize':0x10,'fontWeight':_0x3f48(0xaf),'textAlign':_0x3f48(0xd)},'errorContainer':{'flex':0x1,'justifyContent':_0x3f48(0xd),'alignItems':'center'},'errorButton':{'padding':0x10,'borderRadius':0x8},'errorButtonText':{'fontSize':0x10,'fontWeight':_0x3f48(0xaf),'color':_0x3f48(0xe)},'loadingContainer':{'flex':0x1,'justifyContent':_0x3f48(0xd),'alignItems':_0x3f48(0xd)},'loadingButton':{'padding':0x10,'borderRadius':0x8},'loadingButtonText':{'fontSize':0x10,'fontWeight':_0x3f48(0xaf),'color':'#fff'}});function _0x2d6e(){const _0x14329a=['API\x20key\x20is\x20required.\x20Please\x20provide\x20a\x20valid\x20API\x20key\x20from\x20your\x20Onairos\x20dashboard.','📊\x20Configuration:','Unknown\x20initialization\x20error','❌\x20Onairos\x20SDK:\x20API\x20key\x20initialization\x20failed:','BBpvT','YFXKM','🔧\x20API\x20Key\x20Troubleshooting\x20Guide','3.\x20Ensure\x20your\x20environment\x20setting\x20matches\x20your\x20API\x20key','5.\x20Visit\x20https://dashboard.onairos.uk\x20to\x20manage\x20your\x20API\x20keys','oLXIO','UxZfp','✅\x20Onairos\x20SDK:\x20API\x20key\x20initialization\x20completed\x20successfully','XYQPV','center','#fff','#000','✅\x20Resolving\x20with\x20existing\x20credentials','pFsqa','✅\x20Onairos\x20component:\x20SDK\x20already\x20initialized,\x20syncing\x20state','1.\x20Check\x20that\x20your\x20API\x20key\x20is\x20correct\x20and\x20not\x20expired','🔘\x20Button\x20pressed!\x20isInitialized:','showOverlay:','❌\x20Cannot\x20open\x20overlay:\x20SDK\x20not\x20initialized','BSNAS','qmuZY','xZYYf','NqoOl','NdGqB','⛔\x20Pre-check\x20failed,\x20aborting\x20overlay','✅\x20Pre-check\x20passed','❌\x20Pre-check\x20error:','🔍\x20Checking\x20for\x20existing\x20credentials...','🔑\x20Existing\x20credentials\x20found,\x20attempting\x20automatic\x20resolution...','existing_user_token','FHEfm','HtYiO','FmWip','NdTxB','SDJPQ','❌\x20Overlay\x20rejected:','SDK\x20Error','row','connect','normal','default','⚠️\x20SDK\x20Error','WDHvi','PVZnd','primary','production','HqXMR','DAXQY','rbJfg','XYkAz','BjarA','xentV','yujqT','HOaTG','mdAyY','bZHpV','log','IsfSB','vdaXa','HDtHH','QbMbe','message','UJqXG','error','opQHE','RUBrm','SWize','xUejC','group','GJkrf','ZZLxf','FAPsY','groupEnd','RdgQx','MmwFG','Benea','TxFZh','bpWXI','alert','Onairos\x20SDK\x20initialization\x20failed:\x0a\x0a','\x0a\x0aPlease\x20check\x20your\x20API\x20key\x20and\x20try\x20again.','jbCVX','twCon','apiKey','wTkdf','SDK\x20initialization\x20failed:\x20','fqlAk','INHux','mSNzs','length','pill','OiCwR','KEwOh','borderWidth','borderColor','bPvIB','Qyehx','hjxEg','LsquG','EUOtA','isInitializing:','atvTL','SDK\x20not\x20initialized.\x20Please\x20check\x20your\x20API\x20key.','wRzTx','SQnnw','HWsuv','TisPy','EzdaA','KLDrK','2.\x20Verify\x20you\x20have\x20the\x20right\x20permissions\x20for\x20your\x20use\x20case','BGpBD','cmtRI','🔍\x20Running\x20pre-check\x20validation...','GrHyS','mqkKM','GAVor','wsHiv','swusP','DQGFp','QCYZU','Pre-check\x20failed:\x20','YmIzB','MAnpl','OvnuY','PKKxH','🔽\x20Closing\x20Onairos\x20overlay,\x20result:','kyRCu','PsJmJ','apiUrl','token','userData','udvfH','DWQtj','BASE_URL','warn','⚠️\x20Failed\x20to\x20retrieve\x20existing\x20credentials:','boAyY','pSQtE','bhXSX','QIUHo','❌\x20Error\x20opening\x20overlay:','iniwt','Failed\x20to\x20open\x20overlay:\x20','mQziq','OGgUv','xnshU','UlNjn','BwqxF','tfuuj','HTIQd','AqkDN','HtYDV','QkeMC','createElement','errorContainer','errorButton','#FF6B6B','rrLeS','loadingContainer','loadingButton','WBggU','loadingButtonText','🔄\x20Initializing...','TByXz','qGEox','Connect\x20with\x20Onairos','Continue\x20with\x20Onairos','sZgVC','onairosLogoAlt','logo','create','600'];_0x2d6e=function(){return _0x14329a;};return _0x2d6e();}