@onairos/react-native 3.4.0 → 3.5.4
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.
- package/README.md +62 -13
- package/lib/commonjs/api/index.js +9 -145
- package/lib/commonjs/assets/animations/loaderani.json +1 -0
- package/lib/commonjs/assets/animations/persona-animation.json +1 -0
- package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
- package/lib/commonjs/assets/icons/Gmail.png +0 -0
- package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/icons/Redditicon.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/icons/chatgpt.png +0 -0
- package/lib/commonjs/assets/icons/claude.png +0 -0
- package/lib/commonjs/assets/icons/gemini.png +0 -0
- package/lib/commonjs/assets/icons/grok.png +0 -0
- package/lib/commonjs/assets/images/Checkbox.svg +3 -0
- package/lib/commonjs/assets/images/EnochE.svg +19 -0
- package/lib/commonjs/assets/images/Enochicon1.png +0 -0
- package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
- package/lib/commonjs/assets/images/Facebookicon.png +0 -0
- package/lib/commonjs/assets/images/Gmail.png +0 -0
- package/lib/commonjs/assets/images/Googlelogo.png +0 -0
- package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
- package/lib/commonjs/assets/images/Personalityprofile.svg +3 -0
- package/lib/commonjs/assets/images/Personalitytraits.svg +3 -0
- package/lib/commonjs/assets/images/Redditicon.png +0 -0
- package/lib/commonjs/assets/images/Userpreferences.svg +3 -0
- package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/images/arrow.svg +20 -0
- package/lib/commonjs/assets/images/basicproficon.svg +43 -0
- package/lib/commonjs/assets/images/basicprofile.svg +3 -0
- package/lib/commonjs/assets/images/chatgpt.png +0 -0
- package/lib/commonjs/assets/images/checkmark.svg +4 -0
- package/lib/commonjs/assets/images/claude.png +0 -0
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
- package/lib/commonjs/assets/images/contenticon.svg +23 -0
- package/lib/commonjs/assets/images/gemini.png +0 -0
- package/lib/commonjs/assets/images/grok.png +0 -0
- package/lib/commonjs/assets/images/persona1.png +0 -0
- package/lib/commonjs/assets/images/persona2.png +0 -0
- package/lib/commonjs/assets/images/persona3.png +0 -0
- package/lib/commonjs/assets/images/persona4.png +0 -0
- package/lib/commonjs/assets/images/persona5.png +0 -0
- package/lib/commonjs/assets/images/personalityicon.svg +18 -0
- package/lib/commonjs/assets/images/x-close.svg +3 -0
- package/lib/commonjs/components/BodyText.js +9 -0
- package/lib/commonjs/components/BrandMark.js +10 -0
- package/lib/commonjs/components/CodeInput.js +9 -0
- package/lib/commonjs/components/EmailInput.js +8 -0
- package/lib/commonjs/components/GoogleButton.js +9 -0
- package/lib/commonjs/components/HeadingGroup.js +9 -0
- package/lib/commonjs/components/LLMDataInputModal.js +14 -0
- package/lib/commonjs/components/ModalHeader.js +9 -0
- package/lib/commonjs/components/ModalSheet.js +9 -0
- package/lib/commonjs/components/Onairos.js +14 -374
- package/lib/commonjs/components/OnairosButton.js +13 -309
- package/lib/commonjs/components/OnairosSignInButton.js +12 -0
- package/lib/commonjs/components/Overlay.js +13 -483
- package/lib/commonjs/components/PersonaImage.js +10 -0
- package/lib/commonjs/components/PersonaLoadingScreen.js +12 -0
- package/lib/commonjs/components/PersonalizationConsentScreen.js +13 -0
- package/lib/commonjs/components/PinCreationScreen.js +12 -0
- package/lib/commonjs/components/PinInput.js +9 -302
- package/lib/commonjs/components/PlatformConnectorsStep.js +22 -0
- package/lib/commonjs/components/PlatformList.js +10 -137
- package/lib/commonjs/components/PlatformToggle.js +9 -0
- package/lib/commonjs/components/PrimaryButton.js +10 -0
- package/lib/commonjs/components/SignInMatchAnimation.js +9 -0
- package/lib/commonjs/components/SignInStep.js +12 -0
- package/lib/commonjs/components/UniversalOnboarding.js +29 -1702
- package/lib/commonjs/components/VerificationStep.js +11 -0
- package/lib/commonjs/components/WelcomeScreen.js +21 -0
- package/lib/commonjs/components/icons/Basicproficon.js +8 -0
- package/lib/commonjs/components/icons/Basicprofile.js +8 -0
- package/lib/commonjs/components/icons/Checkbox.js +8 -0
- package/lib/commonjs/components/icons/Checkmark.js +8 -0
- package/lib/commonjs/components/icons/Contentanalysis.js +8 -0
- package/lib/commonjs/components/icons/Contenticon.js +8 -0
- package/lib/commonjs/components/icons/EnochE.js +8 -0
- package/lib/commonjs/components/icons/Personalityicon.js +8 -0
- package/lib/commonjs/components/icons/Personalityprofile.js +8 -0
- package/lib/commonjs/components/icons/Personalitytraits.js +8 -0
- package/lib/commonjs/components/icons/Userpreferences.js +8 -0
- package/lib/commonjs/components/icons/index.js +17 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js +14 -827
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +10 -74
- package/lib/commonjs/components/onboarding/PinInput.js +10 -283
- package/lib/commonjs/components/onboarding/PlatformConnector.js +11 -249
- package/lib/commonjs/config/api.js +7 -0
- package/lib/commonjs/constants/index.js +7 -83
- package/lib/commonjs/context/AuthContext.js +10 -0
- package/lib/commonjs/hooks/useConnectedAccounts.js +9 -0
- package/lib/commonjs/hooks/useConnections.js +8 -159
- package/lib/commonjs/hooks/useCredentials.js +10 -177
- package/lib/commonjs/hooks/useUserConnections.js +10 -0
- package/lib/commonjs/index.js +35 -106
- package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +31 -38
- package/lib/commonjs/services/apiClient.js +8 -0
- package/lib/commonjs/services/apiKeyService.js +9 -946
- package/lib/commonjs/services/authService.js +10 -0
- package/lib/commonjs/services/biometricPinService.js +8 -0
- package/lib/commonjs/services/chatGPTConversationExtractor.js +8 -0
- package/lib/commonjs/services/chatGPTConversationService.js +9 -0
- package/lib/commonjs/services/claudeConversationExtractor.js +8 -0
- package/lib/commonjs/services/claudeConversationService.js +9 -0
- package/lib/commonjs/services/connectedAccountsService.js +10 -0
- package/lib/commonjs/services/googleAuthService.js +11 -0
- package/lib/commonjs/services/imageCompressionService.js +7 -0
- package/lib/commonjs/services/jwtStorageService.js +7 -0
- package/lib/commonjs/services/linkedinDOMExtractor.js +7 -0
- package/lib/commonjs/services/linkedinProfileService.js +9 -0
- package/lib/commonjs/services/linkedinScrapingService.js +8 -0
- package/lib/commonjs/services/llmDataStorage.js +8 -0
- package/lib/commonjs/services/mobileTrainingService.js +8 -0
- package/lib/commonjs/services/oauthService.js +11 -390
- package/lib/commonjs/services/pinEncryptionService.js +8 -0
- package/lib/commonjs/services/pinStorageUtils.js +7 -0
- package/lib/commonjs/services/platformAuthService.js +12 -1067
- package/lib/commonjs/services/storageService.js +8 -0
- package/lib/commonjs/services/trainingApiHelpers.js +7 -0
- package/lib/commonjs/services/userConnectionsService.js +10 -0
- package/lib/commonjs/services/youtubeMigrationService.js +10 -0
- package/lib/commonjs/theme/index.js +7 -0
- package/lib/commonjs/types/ambient.d.js +1 -2
- package/lib/commonjs/types/declarations.d.js +1 -2
- package/lib/commonjs/types/index.js +1 -6
- package/lib/commonjs/types/node-fix.d.js +1 -2
- package/lib/commonjs/types/node-override.d.js +1 -2
- package/lib/commonjs/types/opacity.d.js +1 -2
- package/lib/commonjs/types.js +1 -14
- package/lib/commonjs/utils/Portal.js +8 -98
- package/lib/commonjs/utils/api.js +9 -129
- package/lib/commonjs/utils/assetRegistry.js +33 -0
- package/lib/commonjs/utils/auth.js +9 -111
- package/lib/commonjs/utils/crypto.js +8 -62
- package/lib/commonjs/utils/debugHelper.js +1 -64
- package/lib/commonjs/utils/encryption.js +7 -76
- package/lib/commonjs/utils/eventUtils.js +1 -0
- package/lib/commonjs/utils/haptics.js +9 -0
- package/lib/commonjs/utils/imagePreloader.js +1 -0
- package/lib/commonjs/utils/networkDiagnostics.js +8 -0
- package/lib/commonjs/utils/onairosApi.js +9 -350
- package/lib/commonjs/utils/programmaticFlow.js +9 -117
- package/lib/commonjs/utils/retryHelper.js +1 -220
- package/lib/commonjs/utils/secureStorage.js +10 -349
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -0
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -0
- package/lib/commonjs/utils/webviewScripts/index.js +9 -0
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -0
- package/lib/module/api/index.js +1 -139
- package/lib/module/assets/animations/loaderani.json +1 -0
- package/lib/module/assets/animations/persona-animation.json +1 -0
- package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/module/assets/icons/Facebookicon.png +0 -0
- package/lib/module/assets/icons/Gmail.png +0 -0
- package/lib/module/assets/icons/Linkedinicon.png +0 -0
- package/lib/module/assets/icons/Redditicon.png +0 -0
- package/lib/module/assets/icons/YouTubeicon2.png +0 -0
- package/lib/module/assets/icons/YouTubeicon3.png +0 -0
- package/lib/module/assets/icons/chatgpt.png +0 -0
- package/lib/module/assets/icons/claude.png +0 -0
- package/lib/module/assets/icons/farcaster.png +0 -0
- package/lib/module/assets/icons/gemini.png +0 -0
- package/lib/module/assets/icons/grok.png +0 -0
- package/lib/module/assets/icons/instagram.png +0 -0
- package/lib/module/assets/icons/pinterest.png +0 -0
- package/lib/module/assets/icons/swerv_logo.png +0 -0
- package/lib/module/assets/icons/twitter.jpg +0 -0
- package/lib/module/assets/images/Checkbox.svg +3 -0
- package/lib/module/assets/images/EnochE.svg +19 -0
- package/lib/module/assets/images/Enochicon1.png +0 -0
- package/lib/module/assets/images/Face_ID_logo.png +0 -0
- package/lib/module/assets/images/Facebookicon.png +0 -0
- package/lib/module/assets/images/Gmail.png +0 -0
- package/lib/module/assets/images/Googlelogo.png +0 -0
- package/lib/module/assets/images/Linkedinicon.png +0 -0
- package/lib/module/assets/images/Onairoslogo.png +0 -0
- package/lib/module/assets/images/Personalityprofile.svg +3 -0
- package/lib/module/assets/images/Personalitytraits.svg +3 -0
- package/lib/module/assets/images/Redditicon.png +0 -0
- package/lib/module/assets/images/Userpreferences.svg +3 -0
- package/lib/module/assets/images/YouTubeicon3.png +0 -0
- package/lib/module/assets/images/arrow.svg +20 -0
- package/lib/module/assets/images/basicproficon.svg +43 -0
- package/lib/module/assets/images/basicprofile.svg +3 -0
- package/lib/module/assets/images/chatgpt.png +0 -0
- package/lib/module/assets/images/checkmark.svg +4 -0
- package/lib/module/assets/images/claude.png +0 -0
- package/lib/module/assets/images/contentanalysis.svg +3 -0
- package/lib/module/assets/images/contenticon.svg +23 -0
- package/lib/module/assets/images/gemini.png +0 -0
- package/lib/module/assets/images/grok.png +0 -0
- package/lib/module/assets/images/persona1.png +0 -0
- package/lib/module/assets/images/persona2.png +0 -0
- package/lib/module/assets/images/persona3.png +0 -0
- package/lib/module/assets/images/persona4.png +0 -0
- package/lib/module/assets/images/persona5.png +0 -0
- package/lib/module/assets/images/personalityicon.svg +18 -0
- package/lib/module/assets/images/x-close.svg +3 -0
- package/lib/module/components/BodyText.js +1 -0
- package/lib/module/components/BrandMark.js +1 -0
- package/lib/module/components/CodeInput.js +1 -0
- package/lib/module/components/EmailInput.js +1 -0
- package/lib/module/components/GoogleButton.js +1 -0
- package/lib/module/components/HeadingGroup.js +1 -0
- package/lib/module/components/LLMDataInputModal.js +8 -0
- package/lib/module/components/ModalHeader.js +1 -0
- package/lib/module/components/ModalSheet.js +1 -0
- package/lib/module/components/Onairos.js +1 -367
- package/lib/module/components/OnairosButton.js +1 -302
- package/lib/module/components/OnairosSignInButton.js +1 -0
- package/lib/module/components/Overlay.js +1 -474
- package/lib/module/components/PersonaImage.js +1 -0
- package/lib/module/components/PersonaLoadingScreen.js +1 -0
- package/lib/module/components/PersonalizationConsentScreen.js +1 -0
- package/lib/module/components/PinCreationScreen.js +1 -0
- package/lib/module/components/PinInput.js +1 -293
- package/lib/module/components/PlatformConnectorsStep.js +1 -0
- package/lib/module/components/PlatformList.js +1 -129
- package/lib/module/components/PlatformToggle.js +1 -0
- package/lib/module/components/PrimaryButton.js +1 -0
- package/lib/module/components/SignInMatchAnimation.js +1 -0
- package/lib/module/components/SignInStep.js +1 -0
- package/lib/module/components/UniversalOnboarding.js +1 -1693
- package/lib/module/components/VerificationStep.js +1 -0
- package/lib/module/components/WelcomeScreen.js +1 -0
- package/lib/module/components/icons/Basicproficon.js +1 -0
- package/lib/module/components/icons/Basicprofile.js +1 -0
- package/lib/module/components/icons/Checkbox.js +1 -0
- package/lib/module/components/icons/Checkmark.js +1 -0
- package/lib/module/components/icons/Contentanalysis.js +1 -0
- package/lib/module/components/icons/Contenticon.js +1 -0
- package/lib/module/components/icons/EnochE.js +1 -0
- package/lib/module/components/icons/Personalityicon.js +1 -0
- package/lib/module/components/icons/Personalityprofile.js +1 -0
- package/lib/module/components/icons/Personalitytraits.js +1 -0
- package/lib/module/components/icons/Userpreferences.js +1 -0
- package/lib/module/components/icons/index.js +1 -0
- package/lib/module/components/onboarding/OAuthWebView.js +1 -818
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -66
- package/lib/module/components/onboarding/PinInput.js +1 -274
- package/lib/module/components/onboarding/PlatformConnector.js +1 -240
- package/lib/module/config/api.js +1 -0
- package/lib/module/constants/index.js +1 -77
- package/lib/module/context/AuthContext.js +1 -0
- package/lib/module/hooks/useConnectedAccounts.js +1 -0
- package/lib/module/hooks/useConnections.js +1 -152
- package/lib/module/hooks/useCredentials.js +6 -169
- package/lib/module/hooks/useUserConnections.js +1 -0
- package/lib/module/index.js +1 -32
- package/lib/module/services/SDK_API_KEY_VALIDATION.md +31 -38
- package/lib/module/services/apiClient.js +1 -0
- package/lib/module/services/apiKeyService.js +1 -919
- package/lib/module/services/authService.js +1 -0
- package/lib/module/services/biometricPinService.js +1 -0
- package/lib/module/services/chatGPTConversationExtractor.js +1 -0
- package/lib/module/services/chatGPTConversationService.js +1 -0
- package/lib/module/services/claudeConversationExtractor.js +1 -0
- package/lib/module/services/claudeConversationService.js +1 -0
- package/lib/module/services/connectedAccountsService.js +1 -0
- package/lib/module/services/googleAuthService.js +1 -0
- package/lib/module/services/imageCompressionService.js +1 -0
- package/lib/module/services/jwtStorageService.js +1 -0
- package/lib/module/services/linkedinDOMExtractor.js +1 -0
- package/lib/module/services/linkedinProfileService.js +1 -0
- package/lib/module/services/linkedinScrapingService.js +1 -0
- package/lib/module/services/llmDataStorage.js +1 -0
- package/lib/module/services/mobileTrainingService.js +1 -0
- package/lib/module/services/oauthService.js +1 -380
- package/lib/module/services/pinEncryptionService.js +7 -0
- package/lib/module/services/pinStorageUtils.js +1 -0
- package/lib/module/services/platformAuthService.js +1 -1041
- package/lib/module/services/storageService.js +1 -0
- package/lib/module/services/trainingApiHelpers.js +1 -0
- package/lib/module/services/userConnectionsService.js +1 -0
- package/lib/module/services/youtubeMigrationService.js +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/types.js +1 -10
- package/lib/module/utils/Portal.js +1 -90
- package/lib/module/utils/api.js +1 -117
- package/lib/module/utils/assetRegistry.js +33 -0
- package/lib/module/utils/auth.js +1 -99
- package/lib/module/utils/crypto.js +1 -54
- package/lib/module/utils/debugHelper.js +1 -54
- package/lib/module/utils/encryption.js +1 -67
- package/lib/module/utils/eventUtils.js +1 -0
- package/lib/module/utils/haptics.js +8 -0
- package/lib/module/utils/imagePreloader.js +1 -0
- package/lib/module/utils/networkDiagnostics.js +1 -0
- package/lib/module/utils/onairosApi.js +1 -333
- package/lib/module/utils/programmaticFlow.js +1 -111
- package/lib/module/utils/retryHelper.js +1 -211
- package/lib/module/utils/secureStorage.js +6 -330
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -0
- package/lib/module/utils/webviewScripts/claude.js +1 -0
- package/lib/module/utils/webviewScripts/index.js +1 -0
- package/lib/module/utils/webviewScripts/linkedin.js +1 -0
- package/package.json +62 -39
- package/lib/commonjs/api/index.js.map +0 -1
- package/lib/commonjs/assets/images/email.png +0 -0
- package/lib/commonjs/assets/images/linkedin.png +0 -0
- package/lib/commonjs/assets/images/reddit.png +0 -0
- package/lib/commonjs/assets/images/youtube.png +0 -0
- package/lib/commonjs/components/DataRequestModal.js +0 -228
- package/lib/commonjs/components/DataRequestModal.js.map +0 -1
- package/lib/commonjs/components/DataRequestScreen.js +0 -329
- package/lib/commonjs/components/DataRequestScreen.js.map +0 -1
- package/lib/commonjs/components/EmailVerificationModal.js +0 -320
- package/lib/commonjs/components/EmailVerificationModal.js.map +0 -1
- package/lib/commonjs/components/Onairos.js.map +0 -1
- package/lib/commonjs/components/OnairosButton.js.map +0 -1
- package/lib/commonjs/components/Overlay.js.map +0 -1
- package/lib/commonjs/components/PinInput.js.map +0 -1
- package/lib/commonjs/components/PlatformList.js.map +0 -1
- package/lib/commonjs/components/TrainingModal.js +0 -717
- package/lib/commonjs/components/TrainingModal.js.map +0 -1
- package/lib/commonjs/components/UniversalOnboarding.js.map +0 -1
- package/lib/commonjs/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +0 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +0 -1
- package/lib/commonjs/components/onboarding/PinInput.js.map +0 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js.map +0 -1
- package/lib/commonjs/components/screens/ConnectorScreen.js +0 -146
- package/lib/commonjs/components/screens/ConnectorScreen.js.map +0 -1
- package/lib/commonjs/components/screens/LoadingScreen.js +0 -91
- package/lib/commonjs/components/screens/LoadingScreen.js.map +0 -1
- package/lib/commonjs/components/screens/PinCreationScreen.js +0 -61
- package/lib/commonjs/components/screens/PinCreationScreen.js.map +0 -1
- package/lib/commonjs/constants/index.js.map +0 -1
- package/lib/commonjs/hooks/useConnections.js.map +0 -1
- package/lib/commonjs/hooks/useCredentials.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/services/apiKeyService.js.map +0 -1
- package/lib/commonjs/services/oauthService.js.map +0 -1
- package/lib/commonjs/services/platformAuthService.js.map +0 -1
- package/lib/commonjs/types/ambient.d.js.map +0 -1
- package/lib/commonjs/types/declarations.d.js.map +0 -1
- package/lib/commonjs/types/index.d.js.map +0 -1
- package/lib/commonjs/types/index.js.map +0 -1
- package/lib/commonjs/types/node-fix.d.js.map +0 -1
- package/lib/commonjs/types/node-override.d.js.map +0 -1
- package/lib/commonjs/types/opacity.d.js.map +0 -1
- package/lib/commonjs/types/types.d.js.map +0 -1
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/utils/Portal.js.map +0 -1
- package/lib/commonjs/utils/api.js.map +0 -1
- package/lib/commonjs/utils/auth.js.map +0 -1
- package/lib/commonjs/utils/crypto.js.map +0 -1
- package/lib/commonjs/utils/debugHelper.js.map +0 -1
- package/lib/commonjs/utils/encryption.js.map +0 -1
- package/lib/commonjs/utils/onairosApi.js.map +0 -1
- package/lib/commonjs/utils/programmaticFlow.js.map +0 -1
- package/lib/commonjs/utils/retryHelper.js.map +0 -1
- package/lib/commonjs/utils/secureStorage.js.map +0 -1
- package/lib/module/api/index.js.map +0 -1
- package/lib/module/assets/images/email.png +0 -0
- package/lib/module/assets/images/linkedin.png +0 -0
- package/lib/module/assets/images/reddit.png +0 -0
- package/lib/module/assets/images/youtube.png +0 -0
- package/lib/module/components/DataRequestModal.js +0 -220
- package/lib/module/components/DataRequestModal.js.map +0 -1
- package/lib/module/components/DataRequestScreen.js +0 -321
- package/lib/module/components/DataRequestScreen.js.map +0 -1
- package/lib/module/components/EmailVerificationModal.js +0 -311
- package/lib/module/components/EmailVerificationModal.js.map +0 -1
- package/lib/module/components/Onairos.js.map +0 -1
- package/lib/module/components/OnairosButton.js.map +0 -1
- package/lib/module/components/Overlay.js.map +0 -1
- package/lib/module/components/PinInput.js.map +0 -1
- package/lib/module/components/PlatformList.js.map +0 -1
- package/lib/module/components/TrainingModal.js +0 -708
- package/lib/module/components/TrainingModal.js.map +0 -1
- package/lib/module/components/UniversalOnboarding.js.map +0 -1
- package/lib/module/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/module/components/onboarding/OAuthWebView.js.map +0 -1
- package/lib/module/components/onboarding/OnboardingHeader.js.map +0 -1
- package/lib/module/components/onboarding/PinInput.js.map +0 -1
- package/lib/module/components/onboarding/PlatformConnector.js.map +0 -1
- package/lib/module/components/screens/ConnectorScreen.js +0 -138
- package/lib/module/components/screens/ConnectorScreen.js.map +0 -1
- package/lib/module/components/screens/LoadingScreen.js +0 -83
- package/lib/module/components/screens/LoadingScreen.js.map +0 -1
- package/lib/module/components/screens/PinCreationScreen.js +0 -53
- package/lib/module/components/screens/PinCreationScreen.js.map +0 -1
- package/lib/module/constants/index.js.map +0 -1
- package/lib/module/hooks/useConnections.js.map +0 -1
- package/lib/module/hooks/useCredentials.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/services/apiKeyService.js.map +0 -1
- package/lib/module/services/oauthService.js.map +0 -1
- package/lib/module/services/platformAuthService.js.map +0 -1
- package/lib/module/types/ambient.d.js.map +0 -1
- package/lib/module/types/declarations.d.js.map +0 -1
- package/lib/module/types/index.d.js.map +0 -1
- package/lib/module/types/index.js.map +0 -1
- package/lib/module/types/node-fix.d.js.map +0 -1
- package/lib/module/types/node-override.d.js.map +0 -1
- package/lib/module/types/opacity.d.js.map +0 -1
- package/lib/module/types/types.d.js.map +0 -1
- package/lib/module/types.js.map +0 -1
- package/lib/module/utils/Portal.js.map +0 -1
- package/lib/module/utils/api.js.map +0 -1
- package/lib/module/utils/auth.js.map +0 -1
- package/lib/module/utils/crypto.js.map +0 -1
- package/lib/module/utils/debugHelper.js.map +0 -1
- package/lib/module/utils/encryption.js.map +0 -1
- package/lib/module/utils/onairosApi.js.map +0 -1
- package/lib/module/utils/programmaticFlow.js.map +0 -1
- package/lib/module/utils/retryHelper.js.map +0 -1
- package/lib/module/utils/secureStorage.js.map +0 -1
- package/lib/typescript/api/index.d.ts +0 -8
- package/lib/typescript/api/index.d.ts.map +0 -1
- package/lib/typescript/components/DataRequestModal.d.ts +0 -11
- package/lib/typescript/components/DataRequestModal.d.ts.map +0 -1
- package/lib/typescript/components/DataRequestScreen.d.ts +0 -11
- package/lib/typescript/components/DataRequestScreen.d.ts.map +0 -1
- package/lib/typescript/components/EmailVerificationModal.d.ts +0 -11
- package/lib/typescript/components/EmailVerificationModal.d.ts.map +0 -1
- package/lib/typescript/components/Onairos.d.ts +0 -4
- package/lib/typescript/components/Onairos.d.ts.map +0 -1
- package/lib/typescript/components/OnairosButton.d.ts +0 -12
- package/lib/typescript/components/OnairosButton.d.ts.map +0 -1
- package/lib/typescript/components/Overlay.d.ts +0 -4
- package/lib/typescript/components/Overlay.d.ts.map +0 -1
- package/lib/typescript/components/PinInput.d.ts +0 -4
- package/lib/typescript/components/PinInput.d.ts.map +0 -1
- package/lib/typescript/components/PlatformList.d.ts +0 -4
- package/lib/typescript/components/PlatformList.d.ts.map +0 -1
- package/lib/typescript/components/TrainingModal.d.ts +0 -4
- package/lib/typescript/components/TrainingModal.d.ts.map +0 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts +0 -4
- package/lib/typescript/components/UniversalOnboarding.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts +0 -10
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +0 -11
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/PinInput.d.ts +0 -4
- package/lib/typescript/components/onboarding/PinInput.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts +0 -13
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts.map +0 -1
- package/lib/typescript/components/screens/ConnectorScreen.d.ts +0 -9
- package/lib/typescript/components/screens/ConnectorScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/LoadingScreen.d.ts +0 -9
- package/lib/typescript/components/screens/LoadingScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/PinCreationScreen.d.ts +0 -10
- package/lib/typescript/components/screens/PinCreationScreen.d.ts.map +0 -1
- package/lib/typescript/constants/index.d.ts +0 -53
- package/lib/typescript/constants/index.d.ts.map +0 -1
- package/lib/typescript/hooks/useConnections.d.ts +0 -9
- package/lib/typescript/hooks/useConnections.d.ts.map +0 -1
- package/lib/typescript/hooks/useCredentials.d.ts +0 -9
- package/lib/typescript/hooks/useCredentials.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -18
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/services/apiKeyService.d.ts +0 -132
- package/lib/typescript/services/apiKeyService.d.ts.map +0 -1
- package/lib/typescript/services/oauthService.d.ts +0 -50
- package/lib/typescript/services/oauthService.d.ts.map +0 -1
- package/lib/typescript/services/platformAuthService.d.ts +0 -144
- package/lib/typescript/services/platformAuthService.d.ts.map +0 -1
- package/lib/typescript/types/index.d.ts +0 -231
- package/lib/typescript/types/index.d.ts.map +0 -1
- package/lib/typescript/types.d.ts +0 -270
- package/lib/typescript/types.d.ts.map +0 -1
- package/lib/typescript/utils/Portal.d.ts +0 -14
- package/lib/typescript/utils/Portal.d.ts.map +0 -1
- package/lib/typescript/utils/api.d.ts +0 -6
- package/lib/typescript/utils/api.d.ts.map +0 -1
- package/lib/typescript/utils/auth.d.ts +0 -6
- package/lib/typescript/utils/auth.d.ts.map +0 -1
- package/lib/typescript/utils/crypto.d.ts +0 -4
- package/lib/typescript/utils/crypto.d.ts.map +0 -1
- package/lib/typescript/utils/debugHelper.d.ts +0 -29
- package/lib/typescript/utils/debugHelper.d.ts.map +0 -1
- package/lib/typescript/utils/encryption.d.ts +0 -19
- package/lib/typescript/utils/encryption.d.ts.map +0 -1
- package/lib/typescript/utils/onairosApi.d.ts +0 -87
- package/lib/typescript/utils/onairosApi.d.ts.map +0 -1
- package/lib/typescript/utils/programmaticFlow.d.ts +0 -23
- package/lib/typescript/utils/programmaticFlow.d.ts.map +0 -1
- package/lib/typescript/utils/retryHelper.d.ts +0 -69
- package/lib/typescript/utils/retryHelper.d.ts.map +0 -1
- package/lib/typescript/utils/secureStorage.d.ts +0 -94
- package/lib/typescript/utils/secureStorage.d.ts.map +0 -1
- package/src/api/index.ts +0 -111
- package/src/assets/images/email.png +0 -0
- package/src/assets/images/linkedin.png +0 -0
- package/src/assets/images/onairos_logo.png +0 -0
- package/src/assets/images/reddit.png +0 -0
- package/src/assets/images/youtube.png +0 -0
- package/src/components/DataRequestModal.tsx +0 -227
- package/src/components/DataRequestScreen.tsx +0 -356
- package/src/components/EmailVerificationModal.tsx +0 -364
- package/src/components/Onairos.tsx +0 -425
- package/src/components/OnairosButton.tsx +0 -359
- package/src/components/Overlay.tsx +0 -506
- package/src/components/PinInput.tsx +0 -343
- package/src/components/PlatformList.tsx +0 -145
- package/src/components/TrainingModal.tsx +0 -737
- package/src/components/UniversalOnboarding.tsx +0 -1839
- package/src/components/UniversalOnboarding.tsx.new +0 -455
- package/src/components/onboarding/OAuthWebView.tsx +0 -838
- package/src/components/onboarding/OnboardingHeader.tsx +0 -70
- package/src/components/onboarding/PinInput.tsx +0 -356
- package/src/components/onboarding/PlatformConnector.tsx +0 -302
- package/src/components/screens/ConnectorScreen.tsx +0 -153
- package/src/components/screens/LoadingScreen.tsx +0 -100
- package/src/components/screens/PinCreationScreen.tsx +0 -67
- package/src/constants/index.ts +0 -83
- package/src/hooks/useConnections.ts +0 -163
- package/src/hooks/useCredentials.ts +0 -175
- package/src/index.js +0 -14
- package/src/index.ts +0 -50
- package/src/services/SDK_API_KEY_VALIDATION.md +0 -428
- package/src/services/apiKeyService.ts +0 -979
- package/src/services/oauthService.ts +0 -412
- package/src/services/platformAuthService.ts +0 -1113
- package/src/types/ambient.d.ts +0 -29
- package/src/types/declarations.d.ts +0 -26
- package/src/types/index.d.ts +0 -274
- package/src/types/index.ts +0 -244
- package/src/types/node-fix.d.ts +0 -19
- package/src/types/node-override.d.ts +0 -24
- package/src/types/opacity.d.ts +0 -16
- package/src/types/types.d.ts +0 -18
- package/src/types.ts +0 -298
- package/src/utils/Portal.tsx +0 -83
- package/src/utils/api.js +0 -112
- package/src/utils/auth.js +0 -104
- package/src/utils/crypto.js +0 -60
- package/src/utils/debugHelper.ts +0 -53
- package/src/utils/encryption.ts +0 -69
- package/src/utils/onairosApi.ts +0 -391
- package/src/utils/programmaticFlow.ts +0 -113
- package/src/utils/retryHelper.ts +0 -275
- package/src/utils/secureStorage.ts +0 -361
- package/types/index.d.ts +0 -218
- package/types/node-env.d.ts +0 -15
- /package/{src/assets/images → lib/commonjs/assets/icons}/farcaster.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/instagram.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/pinterest.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/swerv_logo.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/twitter.jpg +0 -0
|
@@ -1,77 +1 @@
|
|
|
1
|
-
export const COLORS = {
|
|
2
|
-
primary: '#1BA9D4',
|
|
3
|
-
headerBg: '#F8F9FA',
|
|
4
|
-
text: {
|
|
5
|
-
primary: '#000000',
|
|
6
|
-
secondary: '#666666'
|
|
7
|
-
},
|
|
8
|
-
border: '#E5E5E5',
|
|
9
|
-
success: '#34C759',
|
|
10
|
-
error: '#FF3B30',
|
|
11
|
-
instagram: '#E1306C',
|
|
12
|
-
pinterest: '#E60023',
|
|
13
|
-
reddit: '#FF4500',
|
|
14
|
-
youtube: '#FF0000',
|
|
15
|
-
white: '#FFFFFF',
|
|
16
|
-
black: '#000000',
|
|
17
|
-
gray: '#666666',
|
|
18
|
-
lightGray: '#E5E5E5'
|
|
19
|
-
};
|
|
20
|
-
export const PLATFORMS = {
|
|
21
|
-
instagram: {
|
|
22
|
-
name: 'Instagram',
|
|
23
|
-
icon: 'instagram',
|
|
24
|
-
color: COLORS.instagram,
|
|
25
|
-
description: 'Connect your Instagram account to train your AI model'
|
|
26
|
-
},
|
|
27
|
-
pinterest: {
|
|
28
|
-
name: 'Pinterest',
|
|
29
|
-
icon: 'pinterest',
|
|
30
|
-
color: COLORS.pinterest,
|
|
31
|
-
description: 'Use your Pinterest boards for AI training'
|
|
32
|
-
},
|
|
33
|
-
reddit: {
|
|
34
|
-
name: 'Reddit',
|
|
35
|
-
icon: 'reddit',
|
|
36
|
-
color: COLORS.reddit,
|
|
37
|
-
description: 'Connect Reddit to enhance your AI model'
|
|
38
|
-
},
|
|
39
|
-
youtube: {
|
|
40
|
-
name: 'YouTube',
|
|
41
|
-
icon: 'youtube',
|
|
42
|
-
color: COLORS.youtube,
|
|
43
|
-
description: 'Use YouTube data to improve AI recommendations'
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
export const API_ENDPOINTS = {
|
|
47
|
-
base: 'https://api2.onairos.uk',
|
|
48
|
-
oauth: {
|
|
49
|
-
instagram: '/instagram/auth',
|
|
50
|
-
pinterest: '/pinterest/auth',
|
|
51
|
-
reddit: '/reddit/auth',
|
|
52
|
-
youtube: '/youtube/auth'
|
|
53
|
-
},
|
|
54
|
-
callback: {
|
|
55
|
-
instagram: '/instagram/callback',
|
|
56
|
-
pinterest: '/pinterest/callback',
|
|
57
|
-
reddit: '/reddit/callback',
|
|
58
|
-
youtube: '/youtube/callback'
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
export const STORAGE_KEYS = {
|
|
62
|
-
credentials: 'onairos_credentials',
|
|
63
|
-
connections: 'onairos_connections'
|
|
64
|
-
};
|
|
65
|
-
export const PIN_REQUIREMENTS = {
|
|
66
|
-
minLength: 8,
|
|
67
|
-
requireUppercase: true,
|
|
68
|
-
requireLowercase: true,
|
|
69
|
-
requireNumber: true,
|
|
70
|
-
requireSpecialChar: true
|
|
71
|
-
};
|
|
72
|
-
export const DEEP_LINK_CONFIG = {
|
|
73
|
-
scheme: 'onairosanime',
|
|
74
|
-
host: 'authenticate',
|
|
75
|
-
redirectUri: 'onairosanime://auth/'
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{API_CONFIG}from'../config/api';export const COLORS={'primary':'#1BA9D4','headerBg':'#F8F9FA','text':{'primary':'#000000','secondary':_0x3b5d(0x0)},'border':_0x3b5d(0x1),'success':_0x3b5d(0x2),'error':_0x3b5d(0x3),'instagram':'#E1306C','pinterest':_0x3b5d(0x4),'reddit':'#FF4500','youtube':'#FF0000','chatgpt':'#10A37F','llm':'#10A37F','white':_0x3b5d(0x5),'black':_0x3b5d(0x6),'gray':'#666666','lightGray':_0x3b5d(0x1)};function _0x4097(){const _0xa0c09b=['#666666','#E5E5E5','#34C759','#FF3B30','#E60023','#FFFFFF','#000000','instagram','Connect\x20your\x20Instagram\x20account\x20to\x20train\x20your\x20AI\x20model','Pinterest','pinterest','Use\x20your\x20Pinterest\x20boards\x20for\x20AI\x20training','Reddit','reddit','YouTube','youtube','ChatGPT','Connect\x20your\x20ChatGPT\x20conversations\x20for\x20AI\x20insights','LLM\x20Data','psychology','Connect\x20your\x20AI\x20conversation\x20data','BASE_URL','/instagram/auth','/youtube/auth','/chatgpt/auth','/instagram/callback','/youtube/callback','/chatgpt/callback','/llmdata','/llmdata/request','onairos_credentials','onairos_connections','onairosanime','onairosanime://auth/'];_0x4097=function(){return _0xa0c09b;};return _0x4097();}export const PLATFORMS={'instagram':{'name':'Instagram','icon':_0x3b5d(0x7),'color':COLORS[_0x3b5d(0x7)],'description':_0x3b5d(0x8)},'pinterest':{'name':_0x3b5d(0x9),'icon':_0x3b5d(0xa),'color':COLORS[_0x3b5d(0xa)],'description':_0x3b5d(0xb)},'reddit':{'name':_0x3b5d(0xc),'icon':_0x3b5d(0xd),'color':COLORS[_0x3b5d(0xd)],'description':'Connect\x20Reddit\x20to\x20enhance\x20your\x20AI\x20model'},'youtube':{'name':_0x3b5d(0xe),'icon':_0x3b5d(0xf),'color':COLORS[_0x3b5d(0xf)],'description':'Use\x20YouTube\x20data\x20to\x20improve\x20AI\x20recommendations'},'chatgpt':{'name':_0x3b5d(0x10),'icon':'chat','color':COLORS['chatgpt'],'description':_0x3b5d(0x11)},'llm':{'name':_0x3b5d(0x12),'icon':_0x3b5d(0x13),'color':COLORS['llm'],'description':_0x3b5d(0x14)}};export const API_ENDPOINTS={'base':API_CONFIG[_0x3b5d(0x15)],'oauth':{'instagram':_0x3b5d(0x16),'pinterest':'/pinterest/auth','reddit':'/reddit/auth','youtube':_0x3b5d(0x17),'chatgpt':_0x3b5d(0x18),'llm':_0x3b5d(0x18)},'callback':{'instagram':_0x3b5d(0x19),'pinterest':'/pinterest/callback','reddit':'/reddit/callback','youtube':_0x3b5d(0x1a),'chatgpt':_0x3b5d(0x1b),'llm':'/chatgpt/callback'},'llm':{'dataIngest':_0x3b5d(0x1c),'dataRequest':_0x3b5d(0x1d)}};export const STORAGE_KEYS={'credentials':_0x3b5d(0x1e),'connections':_0x3b5d(0x1f)};function _0x3b5d(_0x40974f,_0x3b5d99){_0x40974f=_0x40974f-0x0;const _0x41f815=_0x4097();let _0x34c2c1=_0x41f815[_0x40974f];return _0x34c2c1;}export const PIN_REQUIREMENTS={'minLength':0x8,'requireUppercase':!![],'requireLowercase':!![],'requireNumber':!![],'requireSpecialChar':!![]};export const DEEP_LINK_CONFIG={'scheme':_0x3b5d(0x20),'host':'authenticate','redirectUri':_0x3b5d(0x21)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x45ce(_0x3e9b35,_0x45ce04){_0x3e9b35=_0x3e9b35-0x0;const _0x3d519c=_0x3e9b();let _0x544bcd=_0x3d519c[_0x3e9b35];return _0x544bcd;}import React,{createContext,useState,useEffect,useContext}from'react';import AsyncStorage from'@react-native-async-storage/async-storage';import{saveAuthToken,getAuthToken,removeAuthToken,verifyToken,getUserProfile,authenticateWithApple,authenticateWithOnairos,updateUserOnboardedStatus}from'../services/authService';function _0x3e9b(){const _0x990b1f=['🎯\x20Found\x20event\x20access\x20token\x20-\x20user\x20has\x20completed\x20onboarding,\x20authentication\x20confirmed','Failed\x20to\x20complete\x20onboarding:','useAuth\x20must\x20be\x20used\x20within\x20an\x20AuthProvider','user','1|0|4|3|5|2','rZNXI','🌐\x20Network\x20verification\x20failed,\x20using\x20local\x20token\x20validation:','💾\x20Network\x20unreachable,\x20trusting\x20local\x20authentication\x20state','KxCbV','mshef','xCoQk','iolRV','syWmB','kCGTz','Failed\x20to\x20fetch\x20user\x20profile:','🌐\x20Profile\x20fetch\x20failed\x20(likely\x20network),\x20keeping\x20authentication\x20state','offline_user','user@onairos.com','onboardingCompleted','UEejx','Failed\x20to\x20update\x20onboarded\x20status:','vgbEs','apple','onairos','authentication','User\x20logged\x20in\x20with\x20onboarded=false:','dRNJX','Failed\x20to\x20save\x20user\x20data:','auth_method','hasConnectedOnairos','onairosUserId','lastConnectedAt','🔗\x20No\x20Onairos\x20connection\x20info\x20from\x20backend,\x20defaulting\x20to\x20false','Apple\x20sign-in\x20failed:','jHFGX','🔑\x20Onairos\x20sign-in\x20completed\x20-\x20auth_method\x20set\x20to\x20\x22onairos\x22','adLSb','Onairos\x20sign-in\x20failed:','COEHY','Cwhra','Failed\x20to\x20delete\x20account:','kRAFN','Failed\x20to\x20update\x20user\x20data:','fuZmv','gORVe','zICdz','Account\x20deleted\x20successfully','zhEyi','veQgu','YXphE','hwtoz','XsfCP','ZZaeC','zRdWb','JugoD','PjkHk','lBkxG','dHjrG','wGHco','FPOhz','wLlbf','getItem','PEUrq','Pvbfg','parse','log','fQWIP','rjmLa','cFPqD','split','KhCwT','xabtC','EViSv','warn','nOAzh','yYkqK','jXQfS','qNQHP','FPspO','WVkiq','xqlNU','mExAH','QrkOv','CdHEq','error','kODpN','uEsol','lQWhk','sRBdy','stringify','XzuzI','glwmy','wJLFp','DXpPb','includes','401','qWGLX','QmLJU','RkhFV','akImj','hWsvZ','setItem','tYfEd','true','kESEI','Failed\x20to\x20load\x20authentication\x20state:','ECjuN','fhAVx','UhbcR','DFBTm','OVloN','email','dchzY','Oicsd','name','VcQaY','sFQDo','LgBoq','token','zZLjT','BhUje','toString','HxgjL','QhMoj','🔗\x20Stored\x20Onairos\x20connection\x20status:','false','VLfVd','profilePicture','Failed\x20to\x20remove\x20user\x20data:','uZlIP','RPIrx','jabib','SVfzs','vkula','YkJvb','pwaLy','KmpWp','NVVvE','DdKwn','wgJcD','RIIMc','ipONP','AmWrt','DeFHD','beJHr','removeItem','WQqOf','hWcGR','QJvHR','createElement','Provider','FgmdG','woykA'];_0x3e9b=function(){return _0x990b1f;};return _0x3e9b();}import{saveAuthState,clearUserData,getResumeTarget,markStepCompleted,updateLastScreen,isReturningUser,markEventPageReached,hasEventAccessToken}from'../services/storageService';const AuthContext=createContext(undefined);export const AuthProvider=({children:_0x426528})=>{const _0x22cb10={'JugoD':function(_0x43d433,_0x5149af){return _0x43d433(_0x5149af);},'PjkHk':function(_0x4d0450,_0x5b1a41){return _0x4d0450(_0x5b1a41);},'lBkxG':_0x45ce(0x0),'DdKwn':_0x45ce(0x1),'dHjrG':_0x45ce(0x2),'wGHco':function(_0x260a19,_0x1fd5ef){return _0x260a19!==_0x1fd5ef;},'FPOhz':'upfKu','onphd':'GTuvK','wLlbf':function(_0x1bd7ee){return _0x1bd7ee();},'PEUrq':_0x45ce(0x3),'Pvbfg':_0x45ce(0x4),'DFBTm':function(_0x3ff2ad,_0xa8aa94){return _0x3ff2ad(_0xa8aa94);},'fQWIP':function(_0x294b9a,_0x4138d7){return _0x294b9a(_0x4138d7);},'zhEyi':function(_0x5922ba,_0x1c8aff){return _0x5922ba(_0x1c8aff);},'yQSjy':function(_0x4c5a91,_0x1bc0f6){return _0x4c5a91(_0x1bc0f6);},'rjmLa':_0x45ce(0x5),'nOAzh':_0x45ce(0x6),'yYkqK':function(_0x271553,_0x1e6af0){return _0x271553===_0x1e6af0;},'qNQHP':'jXQfS','hwtoz':_0x45ce(0x7),'FEKNM':_0x45ce(0x8),'WVkiq':'QVbWK','mExAH':function(_0x24aaf5,_0x52d0c3){return _0x24aaf5!==_0x52d0c3;},'QrkOv':_0x45ce(0x9),'KoKDO':_0x45ce(0xa),'CdHEq':function(_0xcb7ac,_0x2b8245){return _0xcb7ac(_0x2b8245);},'uEsol':function(_0x10a080,_0x414b74){return _0x10a080===_0x414b74;},'VPYgu':_0x45ce(0xb),'sRBdy':function(_0x252002){return _0x252002();},'XzuzI':_0x45ce(0xc),'glwmy':_0x45ce(0xd),'wJLFp':_0x45ce(0xe),'DXpPb':function(_0x36a16d,_0x23fa95){return _0x36a16d instanceof _0x23fa95;},'qWGLX':'403','QmLJU':_0x45ce(0xf),'RkhFV':_0x45ce(0x10),'akImj':'Onairos\x20User','hWsvZ':_0x45ce(0x11),'tYfEd':_0x45ce(0x12),'YTuFq':function(_0x259128,_0x468e48){return _0x259128(_0x468e48);},'nzthf':function(_0xacd40b,_0x37ac7a){return _0xacd40b===_0x37ac7a;},'HVjPt':_0x45ce(0x13),'kESEI':'Failed\x20to\x20load\x20authentication\x20state:','XsfCP':_0x45ce(0x14),'ZZaeC':function(_0x58622f,_0x1be6f8){return _0x58622f===_0x1be6f8;},'zRdWb':_0x45ce(0x15),'fhAVx':'UhbcR','OVloN':function(_0x302f93,_0x44c604){return _0x302f93!==_0x44c604;},'dchzY':_0x45ce(0x16),'Oicsd':_0x45ce(0x17),'ygBRJ':_0x45ce(0x18),'MvnaZ':_0x45ce(0x19),'VcQaY':function(_0x50df70,_0x4b024b){return _0x50df70!==_0x4b024b;},'whkYZ':_0x45ce(0x1a),'sFQDo':_0x45ce(0x1b),'LgBoq':function(_0x5f4c85,_0x2668be){return _0x5f4c85(_0x2668be);},'zZLjT':_0x45ce(0x1c),'BhUje':_0x45ce(0x1d),'HxgjL':_0x45ce(0x1e),'QhMoj':_0x45ce(0x1f),'VLfVd':_0x45ce(0x20),'PiAui':function(_0x10a066,_0x297684){return _0x10a066(_0x297684);},'rdqax':'🍎\x20Apple\x20sign-in\x20completed\x20-\x20auth_method\x20set\x20to\x20\x22apple\x22','ZILxB':_0x45ce(0x21),'vRSIm':_0x45ce(0x22),'uZlIP':'dYcDv','RPIrx':function(_0x293ea6,_0x4b411a){return _0x293ea6(_0x4b411a);},'Wzijd':_0x45ce(0x23),'SVfzs':_0x45ce(0x24),'YkJvb':_0x45ce(0x25),'pwaLy':_0x45ce(0x26),'NVVvE':'UWOSH','WaSPT':_0x45ce(0x27),'QJvHR':_0x45ce(0x28),'wgJcD':_0x45ce(0x29),'RIIMc':'IZQfM','ipONP':_0x45ce(0x2a),'DeFHD':_0x45ce(0x2b),'beJHr':_0x45ce(0x2c),'cClxo':_0x45ce(0x2d),'WQqOf':function(_0x30309b,_0x3d9fe4){return _0x30309b(_0x3d9fe4);},'hWcGR':_0x45ce(0x2e),'veQgu':function(_0x478526,_0x24c83f){return _0x478526(_0x24c83f);},'YXphE':function(_0x144a84,_0x129bcf){return _0x144a84(_0x129bcf);}},[_0x334898,_0x3bdfad]=_0x22cb10[_0x45ce(0x2f)](useState,null),[_0x2b5fde,_0x4ae326]=useState(!![]),[_0x3c0ef9,_0x2036b4]=_0x22cb10[_0x45ce(0x30)](useState,![]),[_0x34edd3,_0x6c09aa]=_0x22cb10[_0x45ce(0x31)](useState,![]);useEffect(()=>{const _0x971c3d={'FPspO':_0x45ce(0x6),'npmfN':_0x22cb10[_0x45ce(0x32)],'ECjuN':_0x22cb10[_0x45ce(0x33)]};if(_0x22cb10[_0x45ce(0x34)](_0x22cb10[_0x45ce(0x35)],_0x22cb10['zRdWb'])){const _0x3847ee=async()=>{const _0x2744e9={'cFPqD':'4|2|0|5|3|1','KhCwT':function(_0x226ce4,_0x595a87){return _0x22cb10[_0x45ce(0x36)](_0x226ce4,_0x595a87);},'RYoyp':function(_0xf464d5,_0x244b2a){return _0x22cb10[_0x45ce(0x37)](_0xf464d5,_0x244b2a);},'xabtC':_0x22cb10[_0x45ce(0x38)],'EViSv':function(_0x3360b6,_0x47e054){return _0x22cb10[_0x45ce(0x36)](_0x3360b6,_0x47e054);},'xqlNU':function(_0x56b825,_0x41d0c4){return _0x56b825(_0x41d0c4);},'kODpN':_0x22cb10['DdKwn'],'lQWhk':_0x22cb10[_0x45ce(0x39)]};if(_0x22cb10[_0x45ce(0x3a)](_0x22cb10[_0x45ce(0x3b)],_0x22cb10['onphd']))try{const _0xed2bbb=await _0x22cb10[_0x45ce(0x3c)](hasEventAccessToken),_0x1dead0=await AsyncStorage[_0x45ce(0x3d)](_0x22cb10[_0x45ce(0x3e)]);if(_0xed2bbb&&_0x1dead0){const _0x1d737a=_0x22cb10[_0x45ce(0x3f)]['split']('|');let _0x10a465=0x0;while(!![]){switch(_0x1d737a[_0x10a465++]){case'0':_0x22cb10['DFBTm'](_0x3bdfad,JSON[_0x45ce(0x40)](_0x1dead0));continue;case'1':console[_0x45ce(0x41)](_0x22cb10[_0x45ce(0x38)]);continue;case'2':return;case'3':_0x22cb10[_0x45ce(0x42)](_0x2036b4,!![]);continue;case'4':_0x22cb10[_0x45ce(0x2f)](_0x6c09aa,!![]);continue;case'5':_0x22cb10['yQSjy'](_0x4ae326,![]);continue;}break;}}const _0xf77849=await _0x22cb10['wLlbf'](getAuthToken);if(_0xf77849){if(_0x22cb10[_0x45ce(0x3a)](_0x22cb10[_0x45ce(0x43)],_0x45ce(0x5))){const _0x54e3f1=_0x2744e9[_0x45ce(0x44)][_0x45ce(0x45)]('|');let _0x2057fd=0x0;while(!![]){switch(_0x54e3f1[_0x2057fd++]){case'0':_0x2744e9[_0x45ce(0x46)](_0x6b255b,!![]);continue;case'1':return;case'2':_0x2744e9['RYoyp'](_0x27f0a0,_0xaddea8[_0x45ce(0x40)](_0x7ddd51));continue;case'3':_0x2744e9['RYoyp'](_0x20c3d4,![]);continue;case'4':_0x24ad47[_0x45ce(0x41)](_0x2744e9[_0x45ce(0x47)]);continue;case'5':_0x2744e9[_0x45ce(0x48)](_0x58e5ee,!![]);continue;}break;}}else{let _0x5efb50=![];try{_0x5efb50=await _0x22cb10['wLlbf'](verifyToken);}catch(_0x57da5a){console[_0x45ce(0x49)](_0x22cb10[_0x45ce(0x4a)],_0x57da5a),_0x1dead0&&(_0x22cb10[_0x45ce(0x4b)](_0x45ce(0x4c),_0x22cb10[_0x45ce(0x4d)])?(console['log'](_0x22cb10[_0x45ce(0x32)]),_0x5efb50=!![]):(_0x32b744['warn'](_0x971c3d[_0x45ce(0x4e)],_0x46b108),_0x450a49&&(_0x198412[_0x45ce(0x41)](_0x971c3d['npmfN']),_0x3f91ba=!![])));}if(_0x5efb50){if(_0x22cb10[_0x45ce(0x4b)](_0x22cb10['FEKNM'],_0x22cb10[_0x45ce(0x4f)]))_0x2744e9[_0x45ce(0x50)](_0x35c5db,![]);else{if(_0x1dead0){if(_0x22cb10[_0x45ce(0x51)](_0x22cb10[_0x45ce(0x52)],_0x22cb10['KoKDO']))_0x22cb10[_0x45ce(0x53)](_0x3bdfad,JSON[_0x45ce(0x40)](_0x1dead0)),_0x22cb10[_0x45ce(0x37)](_0x6c09aa,!![]);else{_0x1c7c06[_0x45ce(0x54)](_0x2744e9[_0x45ce(0x55)],_0xa4f591);throw _0x5914ef;}}else try{if(_0x22cb10[_0x45ce(0x56)](_0x22cb10['VPYgu'],'panTj'))throw new _0x54d97d(_0x2744e9[_0x45ce(0x57)]);else{const _0x4913f1=await _0x22cb10[_0x45ce(0x58)](getUserProfile);await AsyncStorage['setItem'](_0x45ce(0x3),JSON[_0x45ce(0x59)](_0x4913f1)),_0x3bdfad(_0x4913f1),_0x22cb10[_0x45ce(0x37)](_0x6c09aa,!![]);}}catch(_0x5b6121){if(_0x22cb10['uEsol'](_0x22cb10[_0x45ce(0x5a)],_0x22cb10[_0x45ce(0x5b)])){_0x575129[_0x45ce(0x54)](_0x45ce(0x21),_0x9a4dda);throw _0x1af2b7;}else{console[_0x45ce(0x54)](_0x22cb10[_0x45ce(0x5c)],_0x5b6121);const _0x35af45=_0x22cb10[_0x45ce(0x5d)](_0x5b6121,Error)?_0x5b6121['message']:String(_0x5b6121);if(_0x35af45[_0x45ce(0x5e)](_0x45ce(0x5f))||_0x35af45[_0x45ce(0x5e)](_0x22cb10[_0x45ce(0x60)]))await _0x22cb10[_0x45ce(0x58)](removeAuthToken);else{console['log'](_0x22cb10[_0x45ce(0x61)]);if(_0xf77849){const _0x53bcb0={'id':_0x22cb10[_0x45ce(0x62)],'name':_0x22cb10[_0x45ce(0x63)],'email':_0x22cb10[_0x45ce(0x64)],'onboarded':![]};await AsyncStorage[_0x45ce(0x65)](_0x22cb10['PEUrq'],JSON['stringify'](_0x53bcb0)),_0x3bdfad(_0x53bcb0),_0x6c09aa(!![]);}}}}}}else await _0x22cb10[_0x45ce(0x58)](removeAuthToken);}}const _0x3215f8=await AsyncStorage[_0x45ce(0x3d)](_0x22cb10[_0x45ce(0x66)]);_0x22cb10[_0x45ce(0x4b)](_0x3215f8,_0x45ce(0x67))&&_0x22cb10['YTuFq'](_0x2036b4,!![]);}catch(_0x55b9d9){_0x22cb10['nzthf'](_0x22cb10['HVjPt'],_0x22cb10['HVjPt'])?console['error'](_0x22cb10[_0x45ce(0x68)],_0x55b9d9):(_0x236dfe[_0x45ce(0x41)](_0x971c3d['npmfN']),_0x1c5e08=!![]);}finally{_0x22cb10[_0x45ce(0x42)](_0x4ae326,![]);}else _0x40ad68[_0x45ce(0x54)](_0x45ce(0x69),_0x408bca);};_0x22cb10[_0x45ce(0x58)](_0x3847ee);}else{_0x111211['error'](_0x971c3d[_0x45ce(0x6a)],_0x17b756);throw _0x5c6dbf;}},[]);const _0x3bcfcb=async _0x11a962=>{if(_0x22cb10[_0x45ce(0x6b)]!==_0x45ce(0x6c))_0x13160f(![]);else try{var _0x3e989a;const _0x7a223={..._0x11a962,'onboarded':![]};await AsyncStorage[_0x45ce(0x65)](_0x22cb10[_0x45ce(0x3e)],JSON[_0x45ce(0x59)](_0x7a223)),_0x22cb10[_0x45ce(0x6d)](_0x3bdfad,_0x7a223),_0x6c09aa(!![]),await _0x22cb10[_0x45ce(0x2f)](saveAuthState,{'isAuthenticated':!![],'authMethod':_0x22cb10[_0x45ce(0x6e)](_0x3e989a=_0x11a962[_0x45ce(0x6f)],null)&&_0x22cb10[_0x45ce(0x3a)](_0x3e989a,void 0x0)&&_0x3e989a[_0x45ce(0x5e)](_0x22cb10[_0x45ce(0x70)])?_0x22cb10[_0x45ce(0x70)]:_0x22cb10[_0x45ce(0x71)],'hasValidToken':!![],'userEmail':_0x11a962[_0x45ce(0x6f)],'userName':_0x11a962[_0x45ce(0x72)]}),await markStepCompleted(_0x22cb10['ygBRJ']),console[_0x45ce(0x41)](_0x22cb10['MvnaZ'],_0x7a223);}catch(_0x170f5d){if(_0x22cb10[_0x45ce(0x73)](_0x22cb10['whkYZ'],'WorMk'))console[_0x45ce(0x54)](_0x22cb10[_0x45ce(0x74)],_0x170f5d);else{const _0x5f3a09=useContext(_0x36e5fb);if(_0x5f3a09===_0x4590f5)throw new _0x46ea0f(_0x45ce(0x2));return _0x5f3a09;}}},_0x556136=async _0x540d33=>{try{_0x22cb10['YTuFq'](_0x4ae326,!![]);const _0x580bfc=await _0x22cb10[_0x45ce(0x75)](authenticateWithApple,_0x540d33);await _0x22cb10[_0x45ce(0x53)](saveAuthToken,_0x580bfc[_0x45ce(0x76)]),await AsyncStorage[_0x45ce(0x65)](_0x22cb10[_0x45ce(0x77)],_0x45ce(0x16));_0x580bfc[_0x45ce(0x17)]?(await AsyncStorage[_0x45ce(0x65)](_0x22cb10[_0x45ce(0x78)],_0x580bfc[_0x45ce(0x17)]['hasConnectedOnairos'][_0x45ce(0x79)]()),_0x580bfc[_0x45ce(0x17)][_0x45ce(0x1e)]&&await AsyncStorage[_0x45ce(0x65)](_0x22cb10[_0x45ce(0x7a)],_0x580bfc[_0x45ce(0x17)]['onairosUserId']),_0x580bfc[_0x45ce(0x17)]['lastConnectedAt']&&await AsyncStorage[_0x45ce(0x65)](_0x22cb10[_0x45ce(0x7b)],_0x580bfc[_0x45ce(0x17)][_0x45ce(0x1f)]),console[_0x45ce(0x41)](_0x45ce(0x7c),_0x580bfc[_0x45ce(0x17)][_0x45ce(0x1d)])):(await AsyncStorage[_0x45ce(0x65)](_0x22cb10[_0x45ce(0x78)],_0x45ce(0x7d)),console[_0x45ce(0x41)](_0x22cb10[_0x45ce(0x7e)]));const _0x2d8390={'id':_0x580bfc[_0x45ce(0x3)]['id'],'name':_0x580bfc[_0x45ce(0x3)][_0x45ce(0x72)]||_0x22cb10['akImj'],'email':_0x580bfc['user']['email'],'profilePicture':_0x580bfc['user'][_0x45ce(0x7f)],'onboarded':![]};return await AsyncStorage['setItem'](_0x22cb10[_0x45ce(0x3e)],JSON[_0x45ce(0x59)](_0x2d8390)),_0x22cb10[_0x45ce(0x6d)](_0x3bdfad,_0x2d8390),_0x22cb10['PiAui'](_0x6c09aa,!![]),console[_0x45ce(0x41)](_0x22cb10['rdqax']),_0x2d8390;}catch(_0x21d780){console[_0x45ce(0x54)](_0x22cb10['ZILxB'],_0x21d780);throw _0x21d780;}finally{_0x22cb10[_0x45ce(0x51)](_0x22cb10['vRSIm'],_0x22cb10['vRSIm'])?_0xb7a2d0(!![]):_0x4ae326(![]);}},_0x2510d3=async _0x2db6d6=>{const _0x5053e5={'jabib':_0x45ce(0x80),'vkula':_0x45ce(0x1b),'KmpWp':function(_0x2a9020,_0x1c9b33){return _0x2a9020(_0x1c9b33);}};try{if(_0x22cb10[_0x45ce(0x81)]!=='DrtpY'){_0x4ae326(!![]);const _0x362375=await _0x22cb10['PiAui'](authenticateWithOnairos,_0x2db6d6);await saveAuthToken(_0x362375[_0x45ce(0x76)]),await AsyncStorage['setItem'](_0x45ce(0x1c),_0x22cb10[_0x45ce(0x71)]);const _0x478199={'id':_0x362375[_0x45ce(0x3)]['id'],'name':_0x362375['user'][_0x45ce(0x72)]||_0x22cb10['akImj'],'email':_0x362375[_0x45ce(0x3)][_0x45ce(0x6f)],'profilePicture':_0x362375[_0x45ce(0x3)]['profilePicture'],'onboarded':![]};return await AsyncStorage[_0x45ce(0x65)](_0x22cb10[_0x45ce(0x3e)],JSON[_0x45ce(0x59)](_0x478199)),_0x22cb10[_0x45ce(0x42)](_0x3bdfad,_0x478199),_0x22cb10[_0x45ce(0x82)](_0x6c09aa,!![]),console[_0x45ce(0x41)](_0x22cb10['Wzijd']),_0x478199;}else _0x40bc56[_0x45ce(0x54)](_0x5053e5[_0x45ce(0x83)],_0xdd1b26);}catch(_0x3f510a){if(_0x22cb10['OVloN'](_0x22cb10['SVfzs'],_0x22cb10[_0x45ce(0x84)]))_0x54b3fe['error'](_0x5053e5[_0x45ce(0x85)],_0x3380a7);else{console['error'](_0x22cb10[_0x45ce(0x86)],_0x3f510a);throw _0x3f510a;}}finally{_0x22cb10[_0x45ce(0x87)]===_0x22cb10[_0x45ce(0x87)]?_0x22cb10[_0x45ce(0x53)](_0x4ae326,![]):(_0x5053e5[_0x45ce(0x88)](_0x48e04e,_0x3abc1a[_0x45ce(0x40)](_0x587759)),_0x32f1f5(!![]));}},_0x23657c=async()=>{if(_0x22cb10[_0x45ce(0x89)]===_0x22cb10['WaSPT'])_0x57bc2a[_0x45ce(0x54)](_0x45ce(0x2a),_0x5ce1e8);else try{await clearUserData(),_0x3bdfad(null),_0x22cb10['DFBTm'](_0x6c09aa,![]);}catch(_0x5c8f59){console['error']('Failed\x20to\x20remove\x20user\x20data:',_0x5c8f59);}},_0x8e0c03=async _0x395705=>{try{const _0x3ac022={..._0x334898,..._0x395705};await AsyncStorage[_0x45ce(0x65)](_0x22cb10[_0x45ce(0x3e)],JSON[_0x45ce(0x59)](_0x3ac022)),_0x3bdfad(_0x3ac022),await _0x22cb10[_0x45ce(0x58)](_0x2177f0);}catch(_0x1e4a9f){console[_0x45ce(0x54)](_0x22cb10[_0x45ce(0x8a)],_0x1e4a9f);throw _0x1e4a9f;}},_0x5cfa6b=async _0x26d8fd=>{const _0x406d77={'AmWrt':function(_0x38cd37,_0x149aab){return _0x22cb10[_0x45ce(0x6d)](_0x38cd37,_0x149aab);}};if(_0x22cb10['nzthf'](_0x22cb10[_0x45ce(0x8b)],_0x45ce(0x29)))try{if(!_0x334898)return;const _0x3e1003={..._0x334898,..._0x26d8fd};await AsyncStorage['setItem'](_0x22cb10[_0x45ce(0x3e)],JSON['stringify'](_0x3e1003)),_0x22cb10[_0x45ce(0x2f)](_0x3bdfad,_0x3e1003);}catch(_0x510eeb){if(_0x22cb10[_0x45ce(0x4b)](_0x22cb10[_0x45ce(0x8c)],_0x22cb10[_0x45ce(0x8c)]))console[_0x45ce(0x54)](_0x22cb10[_0x45ce(0x8d)],_0x510eeb);else{_0x4b8ed0[_0x45ce(0x54)](_0x22cb10['QJvHR'],_0x43dfef);throw _0x4c0c54;}}else _0x406d77[_0x45ce(0x8e)](_0x5c90f5,![]);},_0x2177f0=async()=>{if(_0x22cb10['yYkqK'](_0x45ce(0x2b),_0x22cb10[_0x45ce(0x8f)]))try{_0x22cb10[_0x45ce(0x42)](_0x4ae326,!![]),await _0x22cb10[_0x45ce(0x58)](updateUserOnboardedStatus);if(_0x334898){const _0x29bf8c={..._0x334898,'onboarded':!![]};await AsyncStorage['setItem'](_0x22cb10[_0x45ce(0x3e)],JSON[_0x45ce(0x59)](_0x29bf8c)),_0x22cb10[_0x45ce(0x82)](_0x3bdfad,_0x29bf8c);}}catch(_0x158b73){console[_0x45ce(0x54)](_0x22cb10['XsfCP'],_0x158b73);throw _0x158b73;}finally{_0x22cb10['ZZaeC'](_0x22cb10[_0x45ce(0x90)],_0x22cb10['cClxo'])?_0x22cb10[_0x45ce(0x53)](_0x2125fe,![]):_0x22cb10[_0x45ce(0x53)](_0x4ae326,![]);}else{_0x5c08e7[_0x45ce(0x54)](_0x45ce(0x25),_0xe50e1f);throw _0x3f9cd2;}},_0x1ed915=async()=>{try{await AsyncStorage[_0x45ce(0x91)](_0x22cb10[_0x45ce(0x3e)]),await _0x22cb10[_0x45ce(0x3c)](removeAuthToken),await AsyncStorage[_0x45ce(0x91)](_0x22cb10[_0x45ce(0x66)]),_0x22cb10['JugoD'](_0x3bdfad,null),_0x22cb10[_0x45ce(0x92)](_0x6c09aa,![]),_0x2036b4(![]),console['log'](_0x22cb10[_0x45ce(0x93)]);}catch(_0x1a1831){console[_0x45ce(0x54)](_0x22cb10[_0x45ce(0x94)],_0x1a1831);throw _0x1a1831;}};return React[_0x45ce(0x95)](AuthContext[_0x45ce(0x96)],{'value':{'user':_0x334898,'isLoading':_0x2b5fde,'hasCompletedOnboarding':_0x3c0ef9,'login':_0x3bcfcb,'logout':_0x23657c,'deleteAccount':_0x1ed915,'completeOnboarding':_0x8e0c03,'updateUser':_0x5cfa6b,'appleSignIn':_0x556136,'onairosSignIn':_0x2510d3,'isAuthenticated':_0x34edd3,'updateOnboardedStatus':_0x2177f0,'getResumeTarget':getResumeTarget,'markStepCompleted':markStepCompleted,'updateLastScreen':updateLastScreen,'isReturningUser':isReturningUser,'markEventPageReached':markEventPageReached,'hasEventAccessToken':hasEventAccessToken}},_0x426528);};export const useAuth=()=>{const _0x2bb9be={'cRcsZ':function(_0x2117c0,_0x497f69){return _0x2117c0(_0x497f69);},'FgmdG':function(_0x5a150d,_0xaa5096){return _0x5a150d===_0xaa5096;},'woykA':_0x45ce(0x2)},_0x46f953=_0x2bb9be['cRcsZ'](useContext,AuthContext);if(_0x2bb9be[_0x45ce(0x97)](_0x46f953,undefined))throw new Error(_0x2bb9be[_0x45ce(0x98)]);return _0x46f953;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState,useEffect,useCallback}from'react';import{getConnectedAccountsSmart}from'../services/connectedAccountsService';function _0x3296(){const _0x208158=['🚀\x20[HOOK]\x20Starting\x20connected\x20accounts\x20fetch\x20with\x20new\x20smart\x20API...','Failed\x20to\x20load\x20connected\x20accounts','❌\x20[HOOK]\x20Error\x20fetching\x20connected\x20accounts:','🔄\x20[HOOK]\x20Refreshing\x20connected\x20accounts...','rgzic','YditS','hXsBM','gjCSY','OZoCx','riIRf','lkqCC','QWfLV','ePCUk','EDENb','vtrhx','log','pRLWs','AxelO','email','name','error','fUfAJ','SSkYy','LzcnE','rioev','uKGlW','✅\x20[HOOK]\x20Account\x20removed\x20locally:','yOraI','https://','toLowerCase','.com/','uMcgR','some','platform','qmBUS','TqOhr','YYcYh','map','FhmeM','WcAXu','rTcsm','cyHwx','KagRf','🔍\x20No\x20user\x20available\x20for\x20fetching\x20connected\x20accounts','HBhCb','filter'];_0x3296=function(){return _0x208158;};return _0x3296();}import{useAuth}from'../context/AuthContext';function _0x3477(_0x3296b0,_0x3477c2){_0x3296b0=_0x3296b0-0x0;const _0x29bda0=_0x3296();let _0x4bb789=_0x29bda0[_0x3296b0];return _0x4bb789;}export const useConnectedAccounts=()=>{const _0x638738={'riIRf':function(_0xd684d3,_0x33ebb3){return _0xd684d3(_0x33ebb3);},'lkqCC':'🔍\x20No\x20user\x20available\x20for\x20fetching\x20connected\x20accounts','QWfLV':function(_0x2d45f7,_0xba0a89){return _0x2d45f7(_0xba0a89);},'ePCUk':function(_0xec794a,_0x182f6e){return _0xec794a===_0x182f6e;},'EDENb':'JnnXQ','vtrhx':function(_0x2a60c5,_0x402100){return _0x2a60c5(_0x402100);},'pRLWs':_0x3477(0x0),'AxelO':'🚀\x20[HOOK]\x20User\x20info\x20available:','fUfAJ':function(_0x4cd073,_0x2ebffa){return _0x4cd073(_0x2ebffa);},'SSkYy':_0x3477(0x1),'CuDgS':_0x3477(0x2),'qBYgF':function(_0x483200,_0x37a069){return _0x483200(_0x37a069);},'rioev':function(_0x3c9a45,_0x5265ac){return _0x3c9a45!==_0x5265ac;},'uKGlW':'DsaTq','FTvRp':_0x3477(0x3),'hXsBM':function(_0xbf5fb){return _0xbf5fb();},'FwRMc':_0x3477(0x4),'cyHwx':'✅\x20[HOOK]\x20Account\x20added\x20locally:','uqNEN':function(_0x592d29,_0x2500a6){return _0x592d29(_0x2500a6);},'TLZUF':function(_0x3d4061,_0x3d5380){return _0x3d4061!==_0x3d5380;},'LnGUe':_0x3477(0x5),'HBhCb':function(_0x46f3e3,_0x36fa30){return _0x46f3e3(_0x36fa30);},'jwSOk':function(_0x504307){return _0x504307();},'ghebo':function(_0x58b2b5,_0x5337c2){return _0x58b2b5(_0x5337c2);},'gjCSY':function(_0x301c45,_0x1259f7){return _0x301c45(_0x1259f7);},'OZoCx':function(_0x2b137a,_0x1f4439){return _0x2b137a(_0x1f4439);},'qxVlh':function(_0x796e69,_0x3b8a7b,_0x45f464){return _0x796e69(_0x3b8a7b,_0x45f464);},'LzcnE':function(_0x552286,_0x5cbbe2,_0x14024d){return _0x552286(_0x5cbbe2,_0x14024d);},'KagRf':function(_0x1d2363,_0x5342f4,_0x1163fd){return _0x1d2363(_0x5342f4,_0x1163fd);}},{user:_0x566f73}=_0x638738[_0x3477(0x6)](useAuth),[_0x4c13a0,_0x5b1c88]=_0x638738['ghebo'](useState,[]),[_0x5affc3,_0x549bff]=_0x638738[_0x3477(0x7)](useState,!![]),[_0x2adb94,_0x2540fc]=_0x638738[_0x3477(0x8)](useState,null),_0x19342f=_0x638738['qxVlh'](useCallback,async()=>{const _0x1da86e={'ZQwSD':function(_0x511161,_0x234618){return _0x638738[_0x3477(0x9)](_0x511161,_0x234618);}};if(!_0x566f73){console['log'](_0x638738[_0x3477(0xa)]),_0x638738[_0x3477(0xb)](_0x549bff,![]);return;}try{if(_0x638738[_0x3477(0xc)](_0x638738[_0x3477(0xd)],_0x638738[_0x3477(0xd)])){_0x549bff(!![]),_0x638738[_0x3477(0xe)](_0x2540fc,null),console[_0x3477(0xf)](_0x638738[_0x3477(0x10)]),console['log'](_0x638738[_0x3477(0x11)],{'email':_0x566f73[_0x3477(0x12)],'id':_0x566f73['id'],'name':_0x566f73[_0x3477(0x13)]});const _0x5b5b71=await getConnectedAccountsSmart(_0x566f73[_0x3477(0x12)],_0x566f73['id'],_0x566f73[_0x3477(0x13)]);console[_0x3477(0xf)]('✅\x20[HOOK]\x20Connected\x20accounts\x20loaded\x20via\x20smart\x20API:\x20'+_0x5b5b71['length']+'\x20accounts'),_0x638738[_0x3477(0xe)](_0x5b1c88,_0x5b5b71);}else _0x1da86e['ZQwSD'](_0x4ab8f2,![]);}catch(_0x47a0e7){console[_0x3477(0x14)]('❌\x20[HOOK]\x20Error\x20fetching\x20connected\x20accounts:',_0x47a0e7),_0x638738[_0x3477(0x15)](_0x2540fc,_0x638738[_0x3477(0x16)]);}finally{_0x549bff(![]);}},[_0x566f73]),_0x24197a=_0x638738[_0x3477(0x17)](useCallback,async()=>{_0x638738[_0x3477(0x18)](_0x638738[_0x3477(0x19)],_0x638738[_0x3477(0x19)])?(_0x33e7a2['error'](_0x638738['CuDgS'],_0x4997e7),_0x638738['qBYgF'](_0x2dc76f,_0x638738[_0x3477(0x16)])):(console[_0x3477(0xf)](_0x638738['FTvRp']),await _0x638738[_0x3477(0x6)](_0x19342f));},[_0x19342f]),_0x3fb74b=useCallback((_0x2a928c,_0x4eb4ef)=>{const _0x592a40={'uMcgR':function(_0x4efc73,_0x699c86){return _0x4efc73(_0x699c86);},'YvhCo':_0x3477(0x1a),'qmBUS':function(_0x1d9956,_0x32e3ad){return _0x638738['ePCUk'](_0x1d9956,_0x32e3ad);},'TqOhr':_0x3477(0x1b),'FhmeM':_0x638738['FwRMc']},_0x1b2fbb=_0x3477(0x1c)+_0x2a928c[_0x3477(0x1d)]()+_0x3477(0x1e)+_0x4eb4ef,_0x55e511={'platform':_0x2a928c,'username':_0x4eb4ef,'url':_0x1b2fbb};_0x638738['fUfAJ'](_0x5b1c88,_0x38a25f=>{const _0x147c31={'WcAXu':function(_0xe9dc69,_0x568667){return _0x592a40[_0x3477(0x1f)](_0xe9dc69,_0x568667);},'rTcsm':_0x592a40['YvhCo']},_0x170195=_0x38a25f[_0x3477(0x20)](_0x20aa06=>_0x20aa06[_0x3477(0x21)][_0x3477(0x1d)]()===_0x2a928c[_0x3477(0x1d)]());if(_0x170195){if(_0x592a40[_0x3477(0x22)](_0x592a40[_0x3477(0x23)],_0x3477(0x24))){const _0x155943=_0x159861['some'](_0x463d37=>_0x463d37[_0x3477(0x21)][_0x3477(0x1d)]()===_0x5b0b91[_0x3477(0x1d)]());return _0x155943?_0x768fb8[_0x3477(0x25)](_0x58ea2e=>_0x58ea2e['platform'][_0x3477(0x1d)]()===_0x1986b5[_0x3477(0x1d)]()?_0x15eb28:_0x58ea2e):[..._0x2123f7,_0x2c75dd];}else return _0x38a25f['map'](_0x2e3210=>_0x2e3210[_0x3477(0x21)][_0x3477(0x1d)]()===_0x2a928c[_0x3477(0x1d)]()?_0x55e511:_0x2e3210);}else{if(_0x592a40['FhmeM']!==_0x592a40[_0x3477(0x26)])_0x147c31[_0x3477(0x27)](_0x4abdbd,_0x1cdab9=>_0x1cdab9['filter'](_0x54aed1=>_0x54aed1[_0x3477(0x21)]['toLowerCase']()!==_0x4dc926['toLowerCase']())),_0x469de8['log'](_0x147c31[_0x3477(0x28)],_0x55120a);else return[..._0x38a25f,_0x55e511];}}),console[_0x3477(0xf)](_0x638738[_0x3477(0x29)],_0x55e511);},[]),_0x528a76=_0x638738[_0x3477(0x2a)](useCallback,_0x1f1ac2=>{if(_0x638738['TLZUF'](_0x638738['LnGUe'],_0x638738['LnGUe'])){_0x25d459['log'](_0x3477(0x2b)),_0x638738['uqNEN'](_0x49391d,![]);return;}else _0x638738[_0x3477(0x2c)](_0x5b1c88,_0x25ada0=>_0x25ada0[_0x3477(0x2d)](_0x5bd52b=>_0x5bd52b[_0x3477(0x21)]['toLowerCase']()!==_0x1f1ac2['toLowerCase']())),console['log'](_0x3477(0x1a),_0x1f1ac2);},[]);return useEffect(()=>{_0x638738['jwSOk'](_0x19342f);},[_0x19342f]),{'connectedAccounts':_0x4c13a0,'isLoading':_0x5affc3,'error':_0x2adb94,'refreshAccounts':_0x24197a,'addAccount':_0x3fb74b,'removeAccount':_0x528a76};};
|
|
@@ -1,152 +1 @@
|
|
|
1
|
-
import { useState, useCallback }
|
|
2
|
-
import { STORAGE_KEYS } from '../constants';
|
|
3
|
-
// Create a mock storage for environments without Keychain access (like Expo Go)
|
|
4
|
-
const mockConnectionStorage = {};
|
|
5
|
-
|
|
6
|
-
// Try to import Keychain, but provide fallbacks if not available
|
|
7
|
-
let Keychain = null;
|
|
8
|
-
try {
|
|
9
|
-
// This import might fail in Expo Go or environments without native modules
|
|
10
|
-
Keychain = require('react-native-keychain');
|
|
11
|
-
} catch (error) {
|
|
12
|
-
console.warn('react-native-keychain module not available in useConnections, using mock storage');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Check if Keychain is properly initialized and available
|
|
16
|
-
const isKeychainAvailable = () => {
|
|
17
|
-
try {
|
|
18
|
-
return Keychain && typeof Keychain.getGenericPassword === 'function';
|
|
19
|
-
} catch (e) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
export const useConnections = () => {
|
|
24
|
-
const [isConnecting, setIsConnecting] = useState(false);
|
|
25
|
-
const getConnectionStatus = useCallback(async () => {
|
|
26
|
-
try {
|
|
27
|
-
if (isKeychainAvailable()) {
|
|
28
|
-
try {
|
|
29
|
-
const stored = await Keychain.getGenericPassword({
|
|
30
|
-
service: STORAGE_KEYS.connections
|
|
31
|
-
});
|
|
32
|
-
if (stored && stored.password) {
|
|
33
|
-
const parsed = JSON.parse(stored.password);
|
|
34
|
-
// Validate the parsed data structure
|
|
35
|
-
if (parsed && typeof parsed === 'object') {
|
|
36
|
-
return parsed;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
} catch (keychainError) {
|
|
40
|
-
console.warn('Keychain access failed, using fallback:', keychainError);
|
|
41
|
-
// Clear corrupted data
|
|
42
|
-
try {
|
|
43
|
-
await Keychain.resetGenericPassword({
|
|
44
|
-
service: STORAGE_KEYS.connections
|
|
45
|
-
});
|
|
46
|
-
} catch (resetError) {
|
|
47
|
-
console.warn('Failed to reset keychain:', resetError);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Use in-memory mock storage if Keychain is not available or failed
|
|
53
|
-
const mockData = mockConnectionStorage[STORAGE_KEYS.connections] || {};
|
|
54
|
-
console.log('Using mock connection storage:', mockData);
|
|
55
|
-
return mockData;
|
|
56
|
-
} catch (error) {
|
|
57
|
-
console.error('Error getting connection status:', error);
|
|
58
|
-
|
|
59
|
-
// Always return empty object as safe fallback
|
|
60
|
-
console.log('Returning empty connections due to error');
|
|
61
|
-
return {};
|
|
62
|
-
}
|
|
63
|
-
}, []);
|
|
64
|
-
const saveConnectionStatus = useCallback(async status => {
|
|
65
|
-
try {
|
|
66
|
-
if (isKeychainAvailable()) {
|
|
67
|
-
await Keychain.setGenericPassword('connections', JSON.stringify(status), {
|
|
68
|
-
service: STORAGE_KEYS.connections
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
// Use in-memory mock storage if Keychain is not available
|
|
72
|
-
mockConnectionStorage[STORAGE_KEYS.connections] = status;
|
|
73
|
-
}
|
|
74
|
-
} catch (error) {
|
|
75
|
-
console.error('Error saving connection status:', error);
|
|
76
|
-
// Save to mock storage as fallback
|
|
77
|
-
mockConnectionStorage[STORAGE_KEYS.connections] = status;
|
|
78
|
-
}
|
|
79
|
-
}, []);
|
|
80
|
-
const connectPlatform = useCallback(async platform => {
|
|
81
|
-
setIsConnecting(true);
|
|
82
|
-
try {
|
|
83
|
-
console.log(`[Mock] Connecting to ${platform}`);
|
|
84
|
-
|
|
85
|
-
// Simulate connection delay
|
|
86
|
-
await new Promise(resolve => {
|
|
87
|
-
setTimeout(() => resolve(), 1000);
|
|
88
|
-
});
|
|
89
|
-
const status = await getConnectionStatus();
|
|
90
|
-
status[platform] = {
|
|
91
|
-
userName: `Mock User (${platform})`,
|
|
92
|
-
connected: true
|
|
93
|
-
};
|
|
94
|
-
await saveConnectionStatus(status);
|
|
95
|
-
console.log(`[Mock] Successfully connected to ${platform}`);
|
|
96
|
-
} catch (error) {
|
|
97
|
-
console.error(`Error connecting to ${platform}:`, error);
|
|
98
|
-
// In development, provide mock data even on error
|
|
99
|
-
if (__DEV__) {
|
|
100
|
-
const status = {
|
|
101
|
-
[platform]: {
|
|
102
|
-
userName: `Fallback User (${platform})`,
|
|
103
|
-
connected: true
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
await saveConnectionStatus(status);
|
|
107
|
-
} else {
|
|
108
|
-
throw error;
|
|
109
|
-
}
|
|
110
|
-
} finally {
|
|
111
|
-
setIsConnecting(false);
|
|
112
|
-
}
|
|
113
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
114
|
-
const disconnectPlatform = useCallback(async platform => {
|
|
115
|
-
try {
|
|
116
|
-
const status = await getConnectionStatus();
|
|
117
|
-
if (status && platform in status) {
|
|
118
|
-
delete status[platform];
|
|
119
|
-
await saveConnectionStatus(status);
|
|
120
|
-
}
|
|
121
|
-
} catch (error) {
|
|
122
|
-
console.error(`Error disconnecting ${platform}:`, error);
|
|
123
|
-
// Don't throw in development mode
|
|
124
|
-
if (!__DEV__) {
|
|
125
|
-
throw error;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
129
|
-
const handleOAuthCallback = useCallback(async (platform, data) => {
|
|
130
|
-
try {
|
|
131
|
-
console.log(`[Mock] Handling callback for ${platform}`);
|
|
132
|
-
const status = await getConnectionStatus();
|
|
133
|
-
status[platform] = {
|
|
134
|
-
userName: data.userName || `Mock User (${platform})`,
|
|
135
|
-
connected: true
|
|
136
|
-
};
|
|
137
|
-
await saveConnectionStatus(status);
|
|
138
|
-
return true;
|
|
139
|
-
} catch (error) {
|
|
140
|
-
console.error('Error handling callback:', error);
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
}, [getConnectionStatus, saveConnectionStatus]);
|
|
144
|
-
return {
|
|
145
|
-
isConnecting,
|
|
146
|
-
connectPlatform,
|
|
147
|
-
disconnectPlatform,
|
|
148
|
-
getConnectionStatus,
|
|
149
|
-
handleOAuthCallback
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
//# sourceMappingURL=useConnections.js.map
|
|
1
|
+
import{useState,useCallback}from'react';import{initiateNativeAuth}from'../services/platformAuthService';function _0x5be6(_0x41e330,_0x5be660){_0x41e330=_0x41e330-0x0;const _0x1f019d=_0x41e3();let _0x1b13eb=_0x1f019d[_0x41e330];return _0x1b13eb;}export const useConnections=()=>{const _0x1e50b6={'tNiFQ':function(_0x16fd73,_0x24d0a8){return _0x16fd73(_0x24d0a8);},'uZQyq':_0x5be6(0x0),'ivwTL':_0x5be6(0x1),'yUBGw':function(_0x51c0e7,_0x292e93){return _0x51c0e7(_0x292e93);},'uyauw':function(_0x244b6d,_0x12cad5){return _0x244b6d===_0x12cad5;},'xQLCY':_0x5be6(0x2),'CdItd':function(_0x32589f,_0x41b8ae){return _0x32589f===_0x41b8ae;},'IjnQB':'instagram','rxrdl':function(_0x40d11d,_0x2449a2,_0x32fcb0){return _0x40d11d(_0x2449a2,_0x32fcb0);},'TwPvK':_0x5be6(0x3),'JEjBt':function(_0x4a25da,_0x529aa1){return _0x4a25da===_0x529aa1;},'WOkJC':_0x5be6(0x4),'JWkRw':_0x5be6(0x5),'umtkT':function(_0x4b15bf,_0x55c322,_0x32c9d1){return _0x4b15bf(_0x55c322,_0x32c9d1);}},[_0x116989,_0x31985a]=useState({}),[_0x4cc5e8,_0x2d0714]=_0x1e50b6[_0x5be6(0x6)](useState,![]),_0xcd9b9d=useCallback(async(_0x4aa958,_0x3370fb)=>{try{if(_0x1e50b6['ivwTL']!==_0x1e50b6['ivwTL'])return _0x1e50b6[_0x5be6(0x7)](_0x468885,_0x103c1d=>({..._0x103c1d,[_0x183619]:{'userName':_0x113e42,'connected':!![]}})),_0x545aae[_0x5be6(0x8)](_0x5be6(0x9)+_0x1a2be5+_0x5be6(0xa)),_0x241d50[_0x5be6(0x8)](_0x1e50b6[_0x5be6(0xb)]),!![];else{_0x1e50b6[_0x5be6(0x6)](_0x2d0714,!![]);const useNativeSDK=_0x1e50b6['uyauw'](_0x4aa958,_0x1e50b6['xQLCY'])||_0x1e50b6[_0x5be6(0xc)](_0x4aa958,_0x1e50b6[_0x5be6(0xd)]);let _0x5b05dc=![];useNativeSDK?_0x5b05dc=await _0x1e50b6[_0x5be6(0xe)](initiateNativeAuth,_0x4aa958,_0x3370fb):(await new Promise(_0x4d41d7=>setTimeout(()=>_0x4d41d7(undefined),0x3e8)),_0x5b05dc=!![]);if(_0x5b05dc)return _0x31985a(_0x38d8af=>({..._0x38d8af,[_0x4aa958]:{'userName':_0x3370fb,'connected':!![]}})),console[_0x5be6(0x8)]('✅\x20Platform\x20'+_0x4aa958+_0x5be6(0xa)),console[_0x5be6(0x8)](_0x1e50b6['uZQyq']),!![];return![];}}catch(_0x4ef775){return console['error'](_0x5be6(0xf)+_0x4aa958+':',_0x4ef775),![];}finally{_0x1e50b6[_0x5be6(0x6)](_0x2d0714,![]);}},[]),_0x1b5b08=_0x1e50b6['rxrdl'](useCallback,async(_0x524102,_0x3405ff)=>{try{if(_0x1e50b6[_0x5be6(0x10)](_0x1e50b6[_0x5be6(0x11)],_0x1e50b6[_0x5be6(0x12)])){const _0x3c5c21={..._0x25a89c};return delete _0x3c5c21[_0x451e47],_0x3c5c21;}else return _0x31985a(_0x162930=>{if(_0x1e50b6[_0x5be6(0xc)](_0x1e50b6[_0x5be6(0x13)],_0x5be6(0x3))){const _0x34727a={..._0x162930};return delete _0x34727a[_0x524102],_0x34727a;}else return _0x3da0ae[_0x5be6(0x14)]('Error\x20disconnecting\x20platform\x20'+_0xeafefa+':',_0x4d9867),![];}),console[_0x5be6(0x8)](_0x5be6(0x9)+_0x524102+_0x5be6(0x15)),console[_0x5be6(0x8)](_0x5be6(0x0)),!![];}catch(_0x38669c){return console[_0x5be6(0x14)](_0x5be6(0x16)+_0x524102+':',_0x38669c),![];}},[]),_0x309351=_0x1e50b6[_0x5be6(0x17)](useCallback,async()=>{return _0x5be6(0x18)!==_0x5be6(0x19)?_0x116989:_0x1c63b7;},[_0x116989]);return{'connections':_0x116989,'connectPlatform':_0xcd9b9d,'disconnectPlatform':_0x1b5b08,'getConnectionStatus':_0x309351,'isConnecting':_0x4cc5e8};};function _0x41e3(){const _0x336b4d=['ℹ️\x20NOTE:\x20Backend\x20sync\x20removed\x20from\x20SDK\x20-\x20app\x20should\x20call\x20/enoch/users/update\x20if\x20needed','xpQQg','youtube','cKQuI','Iwxoz','DOpND','yUBGw','tNiFQ','log','✅\x20Platform\x20','\x20connected\x20locally','uZQyq','CdItd','IjnQB','rxrdl','Error\x20connecting\x20platform\x20','JEjBt','WOkJC','JWkRw','TwPvK','error','\x20disconnected\x20locally','Error\x20disconnecting\x20platform\x20','umtkT','BDRqY','GIzdT'];_0x41e3=function(){return _0x336b4d;};return _0x41e3();}
|
|
@@ -1,170 +1,7 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
import { STORAGE_KEYS } from '../constants';
|
|
3
|
-
// Create a mock storage for environments without Keychain access
|
|
4
|
-
const mockCredentialStorage = {};
|
|
5
1
|
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
console.warn('react-native-keychain module not available in useCredentials, using mock storage');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Check if Keychain is properly initialized and available
|
|
15
|
-
const isKeychainAvailable = () => {
|
|
16
|
-
try {
|
|
17
|
-
return Keychain && typeof Keychain.getGenericPassword === 'function';
|
|
18
|
-
} catch (e) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// Safe wrapper for getGenericPassword
|
|
24
|
-
const safeGetGenericPassword = async options => {
|
|
25
|
-
try {
|
|
26
|
-
if (isKeychainAvailable()) {
|
|
27
|
-
return await Keychain.getGenericPassword(options);
|
|
28
|
-
} else {
|
|
29
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
30
|
-
return mockCredentialStorage[key] || null;
|
|
31
|
-
}
|
|
32
|
-
} catch (error) {
|
|
33
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
34
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
35
|
-
return mockCredentialStorage[key] || null;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// Safe wrapper for setGenericPassword
|
|
40
|
-
const safeSetGenericPassword = async (username, password, options) => {
|
|
41
|
-
try {
|
|
42
|
-
if (isKeychainAvailable()) {
|
|
43
|
-
return await Keychain.setGenericPassword(username, password, options);
|
|
44
|
-
} else {
|
|
45
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
46
|
-
mockCredentialStorage[key] = {
|
|
47
|
-
username,
|
|
48
|
-
password
|
|
49
|
-
};
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
} catch (error) {
|
|
53
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
54
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
55
|
-
mockCredentialStorage[key] = {
|
|
56
|
-
username,
|
|
57
|
-
password
|
|
58
|
-
};
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// Safe wrapper for resetGenericPassword
|
|
64
|
-
const safeResetGenericPassword = async options => {
|
|
65
|
-
try {
|
|
66
|
-
if (isKeychainAvailable()) {
|
|
67
|
-
return await Keychain.resetGenericPassword(options);
|
|
68
|
-
} else {
|
|
69
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
70
|
-
delete mockCredentialStorage[key];
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
} catch (error) {
|
|
74
|
-
console.warn('Keychain access failed, using mock storage', error);
|
|
75
|
-
const key = (options === null || options === void 0 ? void 0 : options.service) || 'default';
|
|
76
|
-
delete mockCredentialStorage[key];
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
export const useCredentials = () => {
|
|
81
|
-
const hasCredentials = useCallback(async () => {
|
|
82
|
-
try {
|
|
83
|
-
const credentials = await safeGetGenericPassword({
|
|
84
|
-
service: STORAGE_KEYS.credentials
|
|
85
|
-
});
|
|
86
|
-
return !!credentials;
|
|
87
|
-
} catch (error) {
|
|
88
|
-
console.error('Error checking credentials:', error);
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
}, []);
|
|
92
|
-
const getCredentials = useCallback(async () => {
|
|
93
|
-
try {
|
|
94
|
-
const credentials = await safeGetGenericPassword({
|
|
95
|
-
service: STORAGE_KEYS.credentials
|
|
96
|
-
});
|
|
97
|
-
if (credentials) {
|
|
98
|
-
return JSON.parse(credentials.password);
|
|
99
|
-
}
|
|
100
|
-
return null;
|
|
101
|
-
} catch (error) {
|
|
102
|
-
console.error('Error getting credentials:', error);
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
}, []);
|
|
106
|
-
const storeCredentials = useCallback(async (username, userPin, accessToken) => {
|
|
107
|
-
try {
|
|
108
|
-
const options = {
|
|
109
|
-
service: STORAGE_KEYS.credentials
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
// Only use secure storage options on real devices
|
|
113
|
-
if (isKeychainAvailable()) {
|
|
114
|
-
var _Keychain$ACCESS_CONT, _Keychain$ACCESSIBLE;
|
|
115
|
-
options.accessControl = (_Keychain$ACCESS_CONT = Keychain.ACCESS_CONTROL) === null || _Keychain$ACCESS_CONT === void 0 ? void 0 : _Keychain$ACCESS_CONT.BIOMETRY_ANY;
|
|
116
|
-
options.accessible = (_Keychain$ACCESSIBLE = Keychain.ACCESSIBLE) === null || _Keychain$ACCESSIBLE === void 0 ? void 0 : _Keychain$ACCESSIBLE.WHEN_UNLOCKED;
|
|
117
|
-
}
|
|
118
|
-
await safeSetGenericPassword(username, JSON.stringify({
|
|
119
|
-
userPin,
|
|
120
|
-
accessToken
|
|
121
|
-
}), options);
|
|
122
|
-
return true;
|
|
123
|
-
} catch (error) {
|
|
124
|
-
console.error('Error storing credentials:', error);
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
}, []);
|
|
128
|
-
const clearCredentials = useCallback(async () => {
|
|
129
|
-
try {
|
|
130
|
-
await safeResetGenericPassword({
|
|
131
|
-
service: STORAGE_KEYS.credentials
|
|
132
|
-
});
|
|
133
|
-
} catch (error) {
|
|
134
|
-
console.error('Error clearing credentials:', error);
|
|
135
|
-
}
|
|
136
|
-
}, []);
|
|
137
|
-
const validateCredentials = useCallback(async username => {
|
|
138
|
-
try {
|
|
139
|
-
const response = await fetch(`https://api2.onairos.uk/validate`, {
|
|
140
|
-
method: 'POST',
|
|
141
|
-
headers: {
|
|
142
|
-
'Content-Type': 'application/json'
|
|
143
|
-
},
|
|
144
|
-
body: JSON.stringify({
|
|
145
|
-
username
|
|
146
|
-
})
|
|
147
|
-
});
|
|
148
|
-
const data = await response.json();
|
|
149
|
-
return {
|
|
150
|
-
success: true,
|
|
151
|
-
isValid: data.valid,
|
|
152
|
-
credentials: data.credentials
|
|
153
|
-
};
|
|
154
|
-
} catch (error) {
|
|
155
|
-
console.error('Error validating credentials:', error);
|
|
156
|
-
return {
|
|
157
|
-
success: false,
|
|
158
|
-
isValid: false
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}, []);
|
|
162
|
-
return {
|
|
163
|
-
hasCredentials,
|
|
164
|
-
getCredentials,
|
|
165
|
-
storeCredentials,
|
|
166
|
-
clearCredentials,
|
|
167
|
-
validateCredentials
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
//# sourceMappingURL=useCredentials.js.map
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require('react-native-keychain')
|
|
5
|
+
];
|
|
6
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
7
|
+
import{useCallback}from'react';import{STORAGE_KEYS}from'../constants';import{API_CONFIG}from'../config/api';const mockCredentialStorage={};function _0x2d0f(){const _0x307ceb=['warn','function','bgsYi','getGenericPassword','SieYf','gMLox','error','Error\x20getting\x20credentials:','LLBie','default','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','eLKpS','gHYRD','service','nAVBc','SbxWP','RfiTN','yaVMB','SNxLw','qXXbZ','QFiDE','xbejO','JdWur','resetGenericPassword','LqwYr','rzSZN','pYUzJ','eHgVR','AteNw','lzFAb','FHdQr','dPjCm','Error\x20checking\x20credentials:','keyIy','WNvVV','Error\x20storing\x20credentials:','GRiqy','Error\x20clearing\x20credentials:','YTUCA','AvtbP','dEJLL','Error\x20validating\x20credentials:','HLXsj','rJECy','credentials','AKuqI','lTPHQ','AIJdR','parse','password','jumqj','baqsF','aprhr','HvosC','gANaZ','accessControl','ACCESS_CONTROL','azUKW','BIOMETRY_ANY','accessible','GRhVw','WHEN_UNLOCKED','BOQxa','BZeMf','WILKH','OTpfW','NcqZT','fovej','/validate','stringify','json','LfyBM','UKWsO','GGAYt','JSFxw','arSEW'];_0x2d0f=function(){return _0x307ceb;};return _0x2d0f();}let Keychain=null;function _0x2e45(_0x2d0fda,_0x2e45f4){_0x2d0fda=_0x2d0fda-0x0;const _0xf8ca3f=_0x2d0f();let _0x20d350=_0xf8ca3f[_0x2d0fda];return _0x20d350;}try{Keychain=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x361e11){console[_0x2e45(0x0)]('react-native-keychain module not available in useCredentials, using mock storage');}const isKeychainAvailable=()=>{const _0x3eed33={'bgsYi':function(_0x1f4d3f,_0xd0c78){return _0x1f4d3f===_0xd0c78;},'SieYf':_0x2e45(0x1),'OSCMy':function(_0x5507a6,_0xc4e2eb){return _0x5507a6===_0xc4e2eb;},'jekqq':'gMLox'};try{return Keychain&&_0x3eed33[_0x2e45(0x2)](typeof Keychain[_0x2e45(0x3)],_0x3eed33[_0x2e45(0x4)]);}catch(_0x35697c){return _0x3eed33['OSCMy'](_0x2e45(0x5),_0x3eed33['jekqq'])?![]:(_0x442311[_0x2e45(0x6)](_0x2e45(0x7),_0x5c3c2a),null);}},safeGetGenericPassword=async _0x3c1a68=>{const _0x1d35c3={'eLKpS':_0x2e45(0x8),'AxmLw':function(_0x39eb82,_0x1f4d74){return _0x39eb82===_0x1f4d74;},'nAVBc':_0x2e45(0x9),'SbxWP':_0x2e45(0xa)};try{if(_0x1d35c3[_0x2e45(0xb)]===_0x2e45(0xc))_0x366bcd[_0x2e45(0x0)]('react-native-keychain module not available in useCredentials, using mock storage');else{if(isKeychainAvailable())return await Keychain[_0x2e45(0x3)](_0x3c1a68);else{const _0x5675a6=(_0x3c1a68===null||_0x1d35c3['AxmLw'](_0x3c1a68,void 0x0)?void 0x0:_0x3c1a68[_0x2e45(0xd)])||_0x1d35c3[_0x2e45(0xe)];return mockCredentialStorage[_0x5675a6]||null;}}}catch(_0x3928a4){console['warn'](_0x1d35c3[_0x2e45(0xf)],_0x3928a4);const _0x489b19=(_0x3c1a68===null||_0x1d35c3['AxmLw'](_0x3c1a68,void 0x0)?void 0x0:_0x3c1a68[_0x2e45(0xd)])||_0x1d35c3[_0x2e45(0xe)];return mockCredentialStorage[_0x489b19]||null;}},safeSetGenericPassword=async(_0x4a8495,_0x544e98,_0x189724)=>{const _0xa7ebfc={'SNxLw':'Keychain\x20access\x20failed,\x20using\x20mock\x20storage','tGSwU':function(_0x211afb,_0x4fe933){return _0x211afb===_0x4fe933;},'qXXbZ':_0x2e45(0x9),'ZIhyp':function(_0x38a9e2){return _0x38a9e2();},'yaVMB':_0x2e45(0x10),'QFiDE':function(_0x7dfc8,_0x2ac499){return _0x7dfc8===_0x2ac499;},'pylyV':function(_0x14da98,_0x227f08){return _0x14da98===_0x227f08;}};try{if(_0xa7ebfc['ZIhyp'](isKeychainAvailable)){if(_0x2e45(0x10)!==_0xa7ebfc[_0x2e45(0x11)]){_0x1a6fff[_0x2e45(0x0)](_0xa7ebfc[_0x2e45(0x12)],_0x1d1423);const _0x1ee541=(_0x3a01c7===null||_0xa7ebfc['tGSwU'](_0x43bccd,void 0x0)?void 0x0:_0x534ebc[_0x2e45(0xd)])||_0xa7ebfc[_0x2e45(0x13)];return _0x210a5a[_0x1ee541]||null;}else return await Keychain['setGenericPassword'](_0x4a8495,_0x544e98,_0x189724);}else{const _0x5ee665=(_0xa7ebfc['QFiDE'](_0x189724,null)||_0xa7ebfc[_0x2e45(0x14)](_0x189724,void 0x0)?void 0x0:_0x189724['service'])||_0xa7ebfc['qXXbZ'];return mockCredentialStorage[_0x5ee665]={'username':_0x4a8495,'password':_0x544e98},!![];}}catch(_0x595643){console[_0x2e45(0x0)](_0xa7ebfc[_0x2e45(0x12)],_0x595643);const _0x5ad5a0=(_0xa7ebfc['pylyV'](_0x189724,null)||_0xa7ebfc[_0x2e45(0x14)](_0x189724,void 0x0)?void 0x0:_0x189724[_0x2e45(0xd)])||_0xa7ebfc[_0x2e45(0x13)];return mockCredentialStorage[_0x5ad5a0]={'username':_0x4a8495,'password':_0x544e98},!![];}},safeResetGenericPassword=async _0x113421=>{const _0x2d0a6f={'eHgVR':function(_0x58f99a,_0x47194d){return _0x58f99a(_0x47194d);},'JdWur':function(_0xd96aba){return _0xd96aba();},'LqwYr':function(_0x2bd40b,_0x5e7efb){return _0x2bd40b===_0x5e7efb;},'rzSZN':_0x2e45(0x15),'pYUzJ':function(_0x3f9c2e,_0x46fc2b){return _0x3f9c2e===_0x46fc2b;},'AteNw':_0x2e45(0xa),'lzFAb':_0x2e45(0x9)};try{if(_0x2d0a6f[_0x2e45(0x16)](isKeychainAvailable))return await Keychain[_0x2e45(0x17)](_0x113421);else{if(_0x2d0a6f[_0x2e45(0x18)](_0x2d0a6f[_0x2e45(0x19)],_0x2e45(0x15))){const _0x1d0994=(_0x113421===null||_0x2d0a6f[_0x2e45(0x1a)](_0x113421,void 0x0)?void 0x0:_0x113421[_0x2e45(0xd)])||'default';return delete mockCredentialStorage[_0x1d0994],!![];}else Keychain=_0x2d0a6f[_0x2e45(0x1b)](_0x51168c,0x0);}}catch(_0x45480d){console[_0x2e45(0x0)](_0x2d0a6f[_0x2e45(0x1c)],_0x45480d);const _0x18b4c4=(_0x113421===null||_0x2d0a6f[_0x2e45(0x18)](_0x113421,void 0x0)?void 0x0:_0x113421[_0x2e45(0xd)])||_0x2d0a6f[_0x2e45(0x1d)];return delete mockCredentialStorage[_0x18b4c4],!![];}};export const useCredentials=()=>{const _0x1906d8={'kISRz':function(_0x1b4dd8,_0xa2b378){return _0x1b4dd8!==_0xa2b378;},'HLXsj':_0x2e45(0x1e),'rJECy':_0x2e45(0x1f),'WILKH':function(_0x500bff,_0x2cbeb1){return _0x500bff(_0x2cbeb1);},'AKuqI':_0x2e45(0x20),'jumqj':function(_0x5553c7,_0x576aa1){return _0x5553c7===_0x576aa1;},'baqsF':function(_0xd32c3d,_0x3440f3){return _0xd32c3d===_0x3440f3;},'eXGkF':_0x2e45(0x9),'AIJdR':'gfJCS','BZeMf':function(_0x2bc1f2,_0x3a184e){return _0x2bc1f2===_0x3a184e;},'OvYIJ':function(_0x1121a2,_0x68fc17){return _0x1121a2===_0x68fc17;},'aprhr':_0x2e45(0x21),'HvosC':function(_0x5ddfa5,_0x3b17bf){return _0x5ddfa5!==_0x3b17bf;},'gANaZ':_0x2e45(0x22),'uYKUZ':function(_0x724bad){return _0x724bad();},'azUKW':function(_0x4d202f,_0x1c9b11){return _0x4d202f===_0x1c9b11;},'GRhVw':function(_0x2b9c77,_0x17e514){return _0x2b9c77===_0x17e514;},'BOQxa':_0x2e45(0x23),'QQPJk':function(_0x3030c2,_0x80b00d){return _0x3030c2===_0x80b00d;},'EXUcP':_0x2e45(0x24),'OTpfW':_0x2e45(0x25),'NcqZT':'function','fovej':_0x2e45(0x26),'GqgMC':function(_0x1438d2,_0x2e8a90){return _0x1438d2===_0x2e8a90;},'GGAYt':_0x2e45(0x27),'JSFxw':_0x2e45(0x28),'arSEW':_0x2e45(0x29),'lTPHQ':function(_0x4bfd63,_0x15f8e9,_0x33ca03){return _0x4bfd63(_0x15f8e9,_0x33ca03);},'KQlJZ':function(_0x11614e,_0x174c89,_0x33b8f0){return _0x11614e(_0x174c89,_0x33b8f0);}},_0x255b0b=useCallback(async()=>{if(_0x1906d8['kISRz'](_0x1906d8[_0x2e45(0x2a)],_0x1906d8[_0x2e45(0x2b)]))try{const _0x2c4f4f=await _0x1906d8['WILKH'](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x2e45(0x2c)]});return!!_0x2c4f4f;}catch(_0x5c6d40){return console[_0x2e45(0x6)](_0x1906d8[_0x2e45(0x2d)],_0x5c6d40),![];}else return _0x1407e9['error'](_0x2e45(0x20),_0x457553),![];},[]),_0x50b382=_0x1906d8[_0x2e45(0x2e)](useCallback,async()=>{try{const _0x4ed115=await safeGetGenericPassword({'service':STORAGE_KEYS[_0x2e45(0x2c)]});if(_0x4ed115){if(_0x1906d8['AIJdR']===_0x1906d8[_0x2e45(0x2f)])return JSON[_0x2e45(0x30)](_0x4ed115[_0x2e45(0x31)]);else{const _0xfc074b=(_0x1906d8[_0x2e45(0x32)](_0x35d180,null)||_0x1906d8[_0x2e45(0x33)](_0x465eec,void 0x0)?void 0x0:_0x17070b[_0x2e45(0xd)])||_0x1906d8['eXGkF'];return _0x3427d5[_0xfc074b]={'username':_0x503c8b,'password':_0x44c8c6},!![];}}return null;}catch(_0x44d1f7){return console[_0x2e45(0x6)](_0x2e45(0x7),_0x44d1f7),null;}},[]),_0x48d3d7=_0x1906d8['KQlJZ'](useCallback,async(_0x1469a0,_0x5deff2,_0x29516c)=>{if(_0x1906d8['OvYIJ'](_0x2e45(0x21),_0x1906d8[_0x2e45(0x34)]))try{if(_0x1906d8[_0x2e45(0x35)](_0x1906d8[_0x2e45(0x36)],_0x1906d8[_0x2e45(0x36)]))return _0x40807c[_0x2e45(0x30)](_0x24fede[_0x2e45(0x31)]);else{const _0x23a3ae={'service':STORAGE_KEYS[_0x2e45(0x2c)]};if(_0x1906d8['uYKUZ'](isKeychainAvailable)){var _0x5ee23c,_0x1cea7d;_0x23a3ae[_0x2e45(0x37)]=(_0x5ee23c=Keychain[_0x2e45(0x38)])===null||_0x1906d8[_0x2e45(0x39)](_0x5ee23c,void 0x0)?void 0x0:_0x5ee23c[_0x2e45(0x3a)],_0x23a3ae[_0x2e45(0x3b)]=_0x1906d8[_0x2e45(0x3c)](_0x1cea7d=Keychain['ACCESSIBLE'],null)||_0x1cea7d===void 0x0?void 0x0:_0x1cea7d[_0x2e45(0x3d)];}return await safeSetGenericPassword(_0x1469a0,JSON['stringify']({'userPin':_0x5deff2,'accessToken':_0x29516c}),_0x23a3ae),!![];}}catch(_0x24f029){return console[_0x2e45(0x6)](_0x1906d8[_0x2e45(0x3e)],_0x24f029),![];}else{const _0x484c9e=(_0x1906d8['jumqj'](_0x17b426,null)||_0x1906d8[_0x2e45(0x3f)](_0x2a832a,void 0x0)?void 0x0:_0x1d279f['service'])||_0x2e45(0x9);return delete _0x37e9b5[_0x484c9e],!![];}},[]),_0x1a1d8a=useCallback(async()=>{try{await _0x1906d8[_0x2e45(0x40)](safeResetGenericPassword,{'service':STORAGE_KEYS[_0x2e45(0x2c)]});}catch(_0xbb539){_0x1906d8['QQPJk'](_0x1906d8['EXUcP'],_0x2e45(0x24))?console[_0x2e45(0x6)](_0x1906d8[_0x2e45(0x41)],_0xbb539):_0x1d907c[_0x2e45(0x6)](_0x2e45(0x25),_0x208365);}},[]),_0x2a1529=useCallback(async _0x3c9451=>{const _0x53b00f={'LfyBM':function(_0x320d4b,_0x204f67){return _0x320d4b===_0x204f67;},'UKWsO':_0x1906d8[_0x2e45(0x42)]};try{if('YTUCA'===_0x1906d8[_0x2e45(0x43)]){const _0xefef60=await fetch(API_CONFIG['BASE_URL']+_0x2e45(0x44),{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x2e45(0x45)]({'username':_0x3c9451})}),_0x1dd09f=await _0xefef60[_0x2e45(0x46)]();return{'success':!![],'isValid':_0x1dd09f['valid'],'credentials':_0x1dd09f[_0x2e45(0x2c)]};}else try{return Keychain&&_0x53b00f[_0x2e45(0x47)](typeof Keychain[_0x2e45(0x3)],_0x53b00f[_0x2e45(0x48)]);}catch(_0x4a39e0){return![];}}catch(_0x1eb7ef){return _0x1906d8['GqgMC'](_0x1906d8[_0x2e45(0x49)],_0x1906d8[_0x2e45(0x4a)])?![]:(console[_0x2e45(0x6)](_0x1906d8[_0x2e45(0x4b)],_0x1eb7ef),{'success':![],'isValid':![]});}},[]);return{'hasCredentials':_0x255b0b,'getCredentials':_0x50b382,'storeCredentials':_0x48d3d7,'clearCredentials':_0x1a1d8a,'validateCredentials':_0x2a1529};};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState,useEffect,useCallback}from'react';function _0x3fa5(){const _0x5675b1=['onairos_jwt_token','🎯\x20[DEMO\x20MODE]\x20Reviewer\x20bypass\x20detected\x20-\x20skipping\x20API\x20call\x20for\x20demo','❌\x20[CONNECTIONS\x20HOOK]\x20Unexpected\x20null\x20token\x20after\x20validation','Authentication\x20error','🔄\x20Loading\x20user\x20connections\x20with\x20authentication...','✅\x20Connections\x20loaded:','Failed\x20to\x20load\x20connections','❌\x20Error\x20loading\x20connections:','BnGHs','✅\x20[CONNECTIONS\x20HOOK]\x20Connections\x20refresh\x20completed','Authentication\x20required\x20for\x20connections','🔑\x20[CONNECTIONS\x20HOOK]\x20Using\x20auth\x20token:','⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20username\x20connections','CpfcW','HUDVZ','mCLko','📷\x20Uploading\x20profile\x20picture\x20for\x20user:','TQrpQ','FSiOE','DlzPF','gRSTp','reviewer-bypass-token','zFhqg','warn','QSRwW','YYEHa','etdaR','SgPxR','WZSqf','log','lxMTL','error','wIaGt','IcdXx','substring','...','fdqAY','length','InfZi','message','YHXPD','ZftWE','yAJaB','QyCVe','POJOj','MeZSD','CjzbA','VcMvi','FoDcl','split','ZQvbp','vZBLO','mXIOs','⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20user\x20ID\x20connections','dHtOR','pmTTW','qlgvZ','NvXca','LFweN','Wjirj','success','UqrzB','❌\x20Error\x20uploading\x20profile\x20picture:','qxCxF','VRvHD'];_0x3fa5=function(){return _0x5675b1;};return _0x3fa5();}import{getUserConnections,getUserConnectionsByUsername,getUserConnectionsByUserId,uploadProfilePicture}from'../services/userConnectionsService';function _0x529d(_0x3fa56a,_0x529d5f){_0x3fa56a=_0x3fa56a-0x0;const _0x3924b8=_0x3fa5();let _0x25a9a6=_0x3924b8[_0x3fa56a];return _0x25a9a6;}import{getAuthToken}from'../services/authService';import AsyncStorage from'@react-native-async-storage/async-storage';export const useUserConnections=()=>{const _0x5d2231={'THfuV':function(_0x371a57,_0x1e2afc){return _0x371a57(_0x1e2afc);},'DlzPF':function(_0x4c6cc9,_0x3acc84){return _0x4c6cc9(_0x3acc84);},'gRSTp':function(_0x353076){return _0x353076();},'ppHNv':_0x529d(0x0),'tflvA':function(_0x18126a,_0x22d1d4){return _0x18126a===_0x22d1d4;},'zFhqg':function(_0xc0c256,_0x1f0848){return _0xc0c256&&_0x1f0848;},'QSRwW':'⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20connections\x20refresh','vZBLO':'⚠️\x20[CONNECTIONS\x20HOOK]\x20Skipping\x20API\x20call\x20to\x20prevent\x20unauthenticated\x20requests','YYEHa':function(_0x5d9903,_0x194279){return _0x5d9903(_0x194279);},'etdaR':function(_0xe083ab,_0x4c0940){return _0xe083ab(_0x4c0940);},'VHJzm':function(_0x5b5bc9,_0x69191e){return _0x5b5bc9!==_0x69191e;},'lxMTL':_0x529d(0x1),'CFiMy':_0x529d(0x2),'wIaGt':_0x529d(0x3),'IcdXx':_0x529d(0x4),'fdqAY':_0x529d(0x5),'InfZi':function(_0x2a32d4,_0x5c6439){return _0x2a32d4 instanceof _0x5c6439;},'YHXPD':_0x529d(0x6),'ZftWE':_0x529d(0x7),'yAJaB':function(_0x2e8672,_0x213c2d){return _0x2e8672(_0x213c2d);},'QyCVe':function(_0x7ab049,_0x1b78ba){return _0x7ab049(_0x1b78ba);},'POJOj':_0x529d(0x8),'MeZSD':_0x529d(0x9),'ZQvbp':function(_0x4fa5e2,_0x37cb04){return _0x4fa5e2(_0x37cb04);},'FSiOE':function(_0x1f7bb3,_0x49054f){return _0x1f7bb3(_0x49054f);},'zYrnS':_0x529d(0xa),'VcMvi':_0x529d(0xb),'FoDcl':'VFncz','dHtOR':'🔍\x20Fetching\x20connections\x20by\x20userId:','pmTTW':'❌\x20Error\x20fetching\x20connections\x20by\x20userId:','qlgvZ':_0x529d(0xc),'NvXca':function(_0x1c4bf5,_0x1d7cbc){return _0x1c4bf5===_0x1d7cbc;},'LFweN':_0x529d(0xd),'Wjirj':_0x529d(0xe),'IgzsN':_0x529d(0xf),'oEdMe':_0x529d(0x10),'VRvHD':function(_0x2bee76,_0x131ee7){return _0x2bee76(_0x131ee7);},'qxCxF':_0x529d(0x11),'JlBGC':function(_0x255ba5,_0x348e7f,_0x59a618){return _0x255ba5(_0x348e7f,_0x59a618);},'CjzbA':function(_0x5ca2a7,_0x5aa937,_0x1daca4){return _0x5ca2a7(_0x5aa937,_0x1daca4);},'mXIOs':function(_0x23a2bc,_0x554fb9,_0x203200){return _0x23a2bc(_0x554fb9,_0x203200);}},[_0x6c3b13,_0x20e9f0]=_0x5d2231['YYEHa'](useState,[]),[_0x5daa0b,_0x38fd2e]=useState(!![]),[_0x2d821a,_0x1de71e]=_0x5d2231[_0x529d(0x12)](useState,null),_0x15d6f5=useCallback(async()=>{const _0x1cf5f2={'WZSqf':function(_0x36495c,_0x400d84){return _0x36495c(_0x400d84);}};try{_0x5d2231['THfuV'](_0x38fd2e,!![]),_0x5d2231[_0x529d(0x13)](_0x1de71e,null);const _0x11c321=await _0x5d2231[_0x529d(0x14)](getAuthToken),_0x4098a2=await AsyncStorage['getItem'](_0x5d2231['ppHNv']),_0x1acdeb=_0x5d2231['tflvA'](_0x4098a2,_0x529d(0x15));if(_0x5d2231[_0x529d(0x16)](!_0x11c321,!_0x1acdeb)){console[_0x529d(0x17)](_0x5d2231[_0x529d(0x18)]),console[_0x529d(0x17)](_0x5d2231['vZBLO']),_0x5d2231[_0x529d(0x19)](_0x20e9f0,[]),_0x5d2231[_0x529d(0x1a)](_0x1de71e,_0x529d(0xa));return;}if(_0x1acdeb){if(_0x5d2231['VHJzm'](_0x529d(0x1b),'SgPxR'))_0x1cf5f2[_0x529d(0x1c)](_0x4e59da,![]);else{console[_0x529d(0x1d)](_0x5d2231[_0x529d(0x1e)]),_0x20e9f0([]),_0x5d2231[_0x529d(0x1a)](_0x1de71e,null);return;}}if(!_0x11c321){console[_0x529d(0x1f)](_0x5d2231['CFiMy']),_0x20e9f0([]),_0x5d2231[_0x529d(0x13)](_0x1de71e,_0x5d2231[_0x529d(0x20)]);return;}console[_0x529d(0x1d)](_0x5d2231[_0x529d(0x21)]),console[_0x529d(0x1d)](_0x529d(0xb),_0x11c321[_0x529d(0x22)](0x0,0x14)+_0x529d(0x23));const _0x297791=await _0x5d2231[_0x529d(0x14)](getUserConnections);_0x5d2231[_0x529d(0x13)](_0x20e9f0,_0x297791),console['log'](_0x5d2231[_0x529d(0x24)],_0x297791[_0x529d(0x25)]);}catch(_0x26f703){const _0x3f74de=_0x5d2231[_0x529d(0x26)](_0x26f703,Error)?_0x26f703[_0x529d(0x27)]:_0x5d2231[_0x529d(0x28)];console[_0x529d(0x1f)](_0x5d2231[_0x529d(0x29)],_0x3f74de),_0x5d2231['yAJaB'](_0x1de71e,_0x3f74de),_0x20e9f0([]);}finally{_0x5d2231[_0x529d(0x2a)](_0x38fd2e,![]);}},[]),_0x20fed2=_0x5d2231['JlBGC'](useCallback,async()=>{const _0x3661b7={'okTap':_0x5d2231[_0x529d(0x29)],'UfTal':function(_0x2df1f2,_0x4d1388){return _0x5d2231[_0x529d(0x2b)](_0x2df1f2,_0x4d1388);}};if(_0x5d2231['tflvA'](_0x5d2231[_0x529d(0x2c)],_0x5d2231['POJOj']))console[_0x529d(0x1d)]('🔄\x20[CONNECTIONS\x20HOOK]\x20Refreshing\x20connections...'),await _0x5d2231[_0x529d(0x14)](_0x15d6f5),console['log'](_0x5d2231[_0x529d(0x2d)]);else{const _0x527c9f=_0x351e58 instanceof _0x2b28e8?_0x510a3d['message']:_0x529d(0x6);_0x4812d1['error'](_0x3661b7['okTap'],_0x527c9f),_0x3661b7['UfTal'](_0x269124,_0x527c9f),_0x2aead1([]);}},[_0x15d6f5]),_0x9672dd=_0x5d2231[_0x529d(0x2e)](useCallback,async _0x50f72e=>{try{const _0x9d04ce=await _0x5d2231[_0x529d(0x14)](getAuthToken);if(!_0x9d04ce)return console[_0x529d(0x17)](_0x529d(0xc)),[];return console[_0x529d(0x1d)]('🔍\x20Fetching\x20connections\x20by\x20username:',_0x50f72e),console[_0x529d(0x1d)](_0x5d2231[_0x529d(0x2f)],_0x9d04ce['substring'](0x0,0x14)+_0x529d(0x23)),await _0x5d2231['yAJaB'](getUserConnectionsByUsername,_0x50f72e);}catch(_0x338677){if(_0x5d2231[_0x529d(0x30)]!==_0x5d2231['FoDcl']){const _0x2b742f='3|4|0|2|1'[_0x529d(0x31)]('|');let _0x4dc5a8=0x0;while(!![]){switch(_0x2b742f[_0x4dc5a8++]){case'0':_0x5d2231[_0x529d(0x32)](_0xf976f7,[]);continue;case'1':return;case'2':_0x5d2231[_0x529d(0x12)](_0x4cf84a,_0x5d2231['zYrnS']);continue;case'3':_0x3baad8['warn'](_0x5d2231[_0x529d(0x18)]);continue;case'4':_0x2425c4['warn'](_0x5d2231[_0x529d(0x33)]);continue;}break;}}else return console[_0x529d(0x1f)]('❌\x20Error\x20fetching\x20connections\x20by\x20username:',_0x338677),[];}},[]),_0x2ea945=_0x5d2231[_0x529d(0x34)](useCallback,async _0x4ad52d=>{try{const _0x59fef9=await _0x5d2231['gRSTp'](getAuthToken);if(!_0x59fef9)return console[_0x529d(0x17)](_0x529d(0x35)),[];return console[_0x529d(0x1d)](_0x5d2231[_0x529d(0x36)],_0x4ad52d),console[_0x529d(0x1d)](_0x529d(0xb),_0x59fef9['substring'](0x0,0x14)+_0x529d(0x23)),await getUserConnectionsByUserId(_0x4ad52d);}catch(_0x1029e5){return console[_0x529d(0x1f)](_0x5d2231[_0x529d(0x37)],_0x1029e5),[];}},[]),_0x470b10=useCallback(async(_0x3e8384,_0x59ef39='jpg')=>{const _0x50901b={'UqrzB':_0x5d2231[_0x529d(0x38)]};if(_0x5d2231[_0x529d(0x39)](_0x5d2231[_0x529d(0x3a)],_0x5d2231[_0x529d(0x3a)]))try{if(_0x5d2231[_0x529d(0x3b)]!==_0x5d2231['IgzsN']){console[_0x529d(0x1d)](_0x5d2231['oEdMe']);const _0x4c63dc=await uploadProfilePicture(_0x3e8384,_0x59ef39);return _0x4c63dc[_0x529d(0x3c)];}else return _0xafcea4[_0x529d(0x17)](_0x50901b[_0x529d(0x3d)]),[];}catch(_0x413ad7){return console['error'](_0x529d(0x3e),_0x413ad7),![];}else return _0x531d38[_0x529d(0x1f)](_0x5d2231['pmTTW'],_0x425921),[];},[]);return _0x5d2231[_0x529d(0x2e)](useEffect,()=>{if(_0x5d2231['qxCxF']===_0x5d2231[_0x529d(0x3f)])_0x15d6f5();else{_0x2a9ad8[_0x529d(0x1d)]('🎯\x20[DEMO\x20MODE]\x20Reviewer\x20bypass\x20detected\x20-\x20skipping\x20API\x20call\x20for\x20demo'),_0x5d2231[_0x529d(0x13)](_0x4fccfc,[]),_0x5d2231[_0x529d(0x40)](_0x26b167,null);return;}},[_0x15d6f5]),{'connections':_0x6c3b13,'isLoading':_0x5daa0b,'error':_0x2d821a,'refreshConnections':_0x20fed2,'getConnectionsByUsername':_0x9672dd,'getConnectionsByUserId':_0x2ea945,'uploadUserProfilePicture':_0x470b10};};
|
package/lib/module/index.js
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Onairos React Native SDK
|
|
3
|
-
* A React Native implementation for Onairos personalized data integration
|
|
4
|
-
*
|
|
5
|
-
* PUBLIC API - Only expose what developers need
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Essential Types Only
|
|
9
|
-
|
|
10
|
-
// Core Components
|
|
11
|
-
export { OnairosButton } from './components/OnairosButton';
|
|
12
|
-
export { Onairos } from './components/Onairos';
|
|
13
|
-
|
|
14
|
-
// SDK Initialization
|
|
15
|
-
export { initializeApiKey, ADMIN_API_KEY, extractUsernameFromJWT, extractUserDataFromJWT, decodeJWTPayload } from './services/apiKeyService';
|
|
16
|
-
|
|
17
|
-
// Authentication & PIN Management
|
|
18
|
-
export {
|
|
19
|
-
// storePinAfterBiometric, // TODO: Commented out temporarily - biometric functionality disabled
|
|
20
|
-
getStoredJwtToken, clearStoredTokens, requestEmailVerification, verifyEmailCode, checkEmailVerificationStatus } from './services/platformAuthService';
|
|
21
|
-
|
|
22
|
-
// Programmatic Function (for custom buttons)
|
|
23
|
-
export { executeOnairosFlow } from './utils/programmaticFlow';
|
|
24
|
-
|
|
25
|
-
// Default export for convenience
|
|
26
|
-
import { OnairosButton } from './components/OnairosButton';
|
|
27
|
-
import { Onairos } from './components/Onairos';
|
|
28
|
-
export default {
|
|
29
|
-
OnairosButton,
|
|
30
|
-
Onairos
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
console[_0x1998(0x0)]('🚀\x20[ONAIROS\x20SDK]\x20LOCAL\x20SDK\x20LOADED\x20-\x20Version\x205.0.0-local-dev'),console['log']('\uD83D\uDE80 [ONAIROS SDK] Source: onairos-npm-react-native/src/index.ts');export{OnairosButton}from'./components/OnairosButton';export{OnairosSignInButton}from'./components/OnairosSignInButton';export{Onairos}from'./components/Onairos';export{UniversalOnboarding}from'./components/UniversalOnboarding';export{OAuthWebView}from'./components/onboarding/OAuthWebView';export{PortalHost,Portal}from'./utils/Portal';export{default as WelcomeScreen}from'./components/WelcomeScreen';export{PrimaryButton}from'./components/PrimaryButton';export{ModalSheet}from'./components/ModalSheet';export{ModalHeader}from'./components/ModalHeader';export{BrandMark}from'./components/BrandMark';export{HeadingGroup}from'./components/HeadingGroup';export{BodyText}from'./components/BodyText';export{SignInStep}from'./components/SignInStep';export{VerificationStep}from'./components/VerificationStep';function _0x1998(_0x219a14,_0x19985e){_0x219a14=_0x219a14-0x0;var _0x1beaaf=_0x219a();var _0x7a3767=_0x1beaaf[_0x219a14];return _0x7a3767;}export{default as PlatformConnectorsStep}from'./components/PlatformConnectorsStep';export{PersonalizationConsentScreen}from'./components/PersonalizationConsentScreen';export{PinCreationScreen}from'./components/PinCreationScreen';export{useConnections}from'./hooks/useConnections';export{default as PersonaImage}from'./components/PersonaImage';export{initializeApiKey,extractUsernameFromJWT,extractUserDataFromJWT,decodeJWTPayload}from'./services/apiKeyService';export{getOnairosUsername,getAuthToken,saveAuthToken,removeAuthToken,clearAllAuthTokens,isAuthenticated,authenticateWithApple,authenticateWithOnairos,authenticateWithOnairosSignIn,sendEmailVerificationCode,confirmEmailVerificationCode}from'./services/authService';export{storeJWT,getJWT,clearJWT,hasValidJWT,replaceJWT}from'./services/jwtStorageService';export{initiateOAuth,initiateNativeAuth,hasNativeSDK,isOAuthCallback,testApiConnectivity}from'./services/platformAuthService';export{runFullDiagnostics,isApiReachable,getNetworkStatus}from'./utils/networkDiagnostics';export{updateGoogleClientIds,signInWithGoogle,isGoogleSignedIn,signOutFromGoogle}from'./services/googleAuthService';export{ApiClient}from'./services/apiClient';export{scrapeLinkedInProfile,extractLinkedInUsername,isValidLinkedInUrl,formatLinkedInUrl,canScrapeProfile,getLinkedInConnectionStatus}from'./services/linkedinScrapingService';export{parseExtractionMessage,startLinkedInScraping,getScrapingStatus,resetScrapingStatus,getProfileExtractionScript}from'./services/linkedinDOMExtractor';function _0x219a(){var _0x552d78=['log'];_0x219a=function(){return _0x552d78;};return _0x219a();}
|