@onairos/react-native 3.4.1 → 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/apiClient.js +8 -0
- package/lib/commonjs/services/apiKeyService.js +9 -952
- 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/apiClient.js +1 -0
- package/lib/module/services/apiKeyService.js +1 -925
- 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 -421
- package/src/services/apiKeyService.ts +0 -984
- 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,111 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Programmatic Onairos Flow
|
|
3
|
-
*
|
|
4
|
-
* This function executes the complete Onairos authentication and onboarding flow
|
|
5
|
-
* that can be attached to custom buttons or called programmatically.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { initializePlatformAuthService } from '../services/platformAuthService';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Execute the complete Onairos flow programmatically
|
|
12
|
-
* This is the same logic that the OnairosButton uses internally
|
|
13
|
-
*
|
|
14
|
-
* @param options Configuration options for the flow
|
|
15
|
-
* @returns Promise that resolves when flow is complete
|
|
16
|
-
*/
|
|
17
|
-
export const executeOnairosFlow = async options => {
|
|
18
|
-
try {
|
|
19
|
-
console.log('🚀 Starting Onairos flow programmatically...');
|
|
20
|
-
|
|
21
|
-
// Initialize API key service if not already initialized
|
|
22
|
-
await initializePlatformAuthService();
|
|
23
|
-
|
|
24
|
-
// Import components dynamically to avoid circular dependencies
|
|
25
|
-
const {
|
|
26
|
-
UniversalOnboarding
|
|
27
|
-
} = await import('../components/UniversalOnboarding');
|
|
28
|
-
const React = await import('react');
|
|
29
|
-
|
|
30
|
-
// Create a promise that resolves when the flow is complete
|
|
31
|
-
return new Promise((resolve, reject) => {
|
|
32
|
-
let modalRef = null;
|
|
33
|
-
const handleComplete = (apiUrl, token, userData) => {
|
|
34
|
-
console.log('✅ Onairos flow completed successfully');
|
|
35
|
-
|
|
36
|
-
// Clean up modal
|
|
37
|
-
if (modalRef && modalRef.close) {
|
|
38
|
-
modalRef.close();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Call user's onResolved callback
|
|
42
|
-
if (options.onResolved) {
|
|
43
|
-
options.onResolved(apiUrl, token, userData);
|
|
44
|
-
}
|
|
45
|
-
resolve();
|
|
46
|
-
};
|
|
47
|
-
const handleRejection = error => {
|
|
48
|
-
console.log('❌ Onairos flow rejected:', error);
|
|
49
|
-
|
|
50
|
-
// Clean up modal
|
|
51
|
-
if (modalRef && modalRef.close) {
|
|
52
|
-
modalRef.close();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Call user's onRejection callback
|
|
56
|
-
if (options.onRejection) {
|
|
57
|
-
options.onRejection(error);
|
|
58
|
-
}
|
|
59
|
-
reject(new Error(error || 'Onairos flow was rejected'));
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// Create and show the Universal Onboarding modal
|
|
63
|
-
const modalElement = React.createElement(UniversalOnboarding, {
|
|
64
|
-
visible: true,
|
|
65
|
-
onClose: () => handleRejection('User closed the modal'),
|
|
66
|
-
AppName: options.AppName,
|
|
67
|
-
requestData: options.requestData,
|
|
68
|
-
returnLink: options.returnLink,
|
|
69
|
-
onComplete: handleComplete,
|
|
70
|
-
preferredPlatform: options.preferredPlatform,
|
|
71
|
-
debug: options.debug,
|
|
72
|
-
testMode: options.testMode
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
// Store modal reference for cleanup
|
|
76
|
-
modalRef = modalElement;
|
|
77
|
-
|
|
78
|
-
// Note: In a real implementation, you'd need to render this modal
|
|
79
|
-
// This is a simplified version - the actual implementation would
|
|
80
|
-
// need to handle React rendering in the current app context
|
|
81
|
-
console.log('📱 Onairos modal should be displayed');
|
|
82
|
-
});
|
|
83
|
-
} catch (error) {
|
|
84
|
-
console.error('❌ Failed to execute Onairos flow:', error);
|
|
85
|
-
throw error;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Simple wrapper function that matches the OnairosButton click behavior
|
|
91
|
-
*
|
|
92
|
-
* @param options Configuration options for the flow
|
|
93
|
-
* @returns Promise that resolves when flow is complete
|
|
94
|
-
*/
|
|
95
|
-
export const startOnairosFlow = async options => {
|
|
96
|
-
// Pre-check if provided
|
|
97
|
-
if (options.preCheck) {
|
|
98
|
-
const canProceed = await options.preCheck();
|
|
99
|
-
if (!canProceed) {
|
|
100
|
-
console.log('❌ Pre-check failed, not starting Onairos flow');
|
|
101
|
-
if (options.onRejection) {
|
|
102
|
-
options.onRejection('Pre-check failed');
|
|
103
|
-
}
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Execute the flow
|
|
109
|
-
return executeOnairosFlow(options);
|
|
110
|
-
};
|
|
111
|
-
//# sourceMappingURL=programmaticFlow.js.map
|
|
1
|
+
import{initializePlatformAuthService}from'../services/platformAuthService';export const executeOnairosFlow=async _0x2b6069=>{const _0x4b5306={'BJqrp':'❌\x20Pre-check\x20failed,\x20not\x20starting\x20Onairos\x20flow','DEUsW':_0x587f(0x0),'hslnB':function(_0x28e6a5){return _0x28e6a5();},'wdViw':'❌\x20Failed\x20to\x20execute\x20Onairos\x20flow:','voCrq':'❌\x20Onairos\x20flow\x20rejected:','QGFxn':'kbYTz','pVcyb':function(_0x1f6e0d,_0xb2cfa3){return _0x1f6e0d(_0xb2cfa3);},'sgpyq':function(_0x592517,_0x56094c){return _0x592517||_0x56094c;},'SYIsw':_0x587f(0x1),'TNyOa':_0x587f(0x2),'Coqcc':function(_0xca7b2d,_0x445ff5){return _0xca7b2d!==_0x445ff5;},'BwkfG':_0x587f(0x3),'cmguN':_0x587f(0x4),'JxFuK':_0x587f(0x5)};try{if(_0x4b5306['Coqcc'](_0x587f(0x3),_0x4b5306[_0x587f(0x6)])){_0x4b7937[_0x587f(0x7)](_0x4b5306[_0x587f(0x8)]);_0xc7d378['onRejection']&&_0x1ca5f7['onRejection']('Pre-check\x20failed');return;}else{console['log'](_0x4b5306[_0x587f(0x9)]),await initializePlatformAuthService();const {UniversalOnboarding:_0x13b46b}=await import(_0x4b5306[_0x587f(0xa)]),React=await import('react');return new Promise((_0x55d6e3,_0x243e34)=>{const _0x514209={'nCawV':_0x4b5306['DEUsW'],'HulGt':function(_0x494b90){return _0x4b5306[_0x587f(0xb)](_0x494b90);},'BGdRI':_0x4b5306['wdViw'],'ErByr':_0x4b5306[_0x587f(0xc)],'KKBqN':function(_0x565580,_0x189fa0){return _0x565580!==_0x189fa0;},'NuEwJ':_0x4b5306[_0x587f(0xd)],'gZUBx':function(_0x445d55,_0x355c34){return _0x4b5306[_0x587f(0xe)](_0x445d55,_0x355c34);},'QddZz':function(_0xb78b12,_0x2e0eee){return _0x4b5306[_0x587f(0xf)](_0xb78b12,_0x2e0eee);},'aslpM':_0x4b5306[_0x587f(0x10)]};let _0xd3adc5=null;const _0x3c1808=(_0x49f997,_0x525583,_0x4b8757)=>{console[_0x587f(0x7)](_0x514209[_0x587f(0x11)]),_0xd3adc5&&_0xd3adc5[_0x587f(0x12)]&&_0xd3adc5['close'](),_0x2b6069[_0x587f(0x13)]&&_0x2b6069[_0x587f(0x13)](_0x49f997,_0x525583,_0x4b8757),_0x514209[_0x587f(0x14)](_0x55d6e3);},_0x48df5c=_0xd74fc8=>{const _0x436739={'yZiqP':_0x514209['BGdRI']};console['log'](_0x514209[_0x587f(0x15)],_0xd74fc8);if(_0xd3adc5&&_0xd3adc5[_0x587f(0x12)]){if(_0x514209['KKBqN']('kbYTz',_0x514209[_0x587f(0x16)])){_0x49e5f0[_0x587f(0x17)](_0x436739['yZiqP'],_0x4aaa56);throw _0x35b7e6;}else _0xd3adc5[_0x587f(0x12)]();}_0x2b6069['onRejection']&&_0x2b6069[_0x587f(0x18)](_0xd74fc8),_0x514209[_0x587f(0x19)](_0x243e34,new Error(_0x514209[_0x587f(0x1a)](_0xd74fc8,_0x514209[_0x587f(0x1b)])));},_0x28a086=React[_0x587f(0x1c)](_0x13b46b,{'visible':!![],'onClose':()=>_0x48df5c(_0x587f(0x1d)),'AppName':_0x2b6069[_0x587f(0x1e)],'requestData':_0x2b6069[_0x587f(0x1f)],'returnLink':_0x2b6069['returnLink'],'onComplete':_0x3c1808,'preferredPlatform':_0x2b6069[_0x587f(0x20)],'debug':_0x2b6069[_0x587f(0x21)],'testMode':_0x2b6069[_0x587f(0x22)]});_0xd3adc5=_0x28a086,console[_0x587f(0x7)](_0x4b5306[_0x587f(0x23)]);});}}catch(_0x10ea33){console[_0x587f(0x17)](_0x4b5306[_0x587f(0x24)],_0x10ea33);throw _0x10ea33;}};function _0x587f(_0xa0b9e3,_0x587f02){_0xa0b9e3=_0xa0b9e3-0x0;const _0x4d0f1f=_0xa0b9();let _0x521cb3=_0x4d0f1f[_0xa0b9e3];return _0x521cb3;}export const startOnairosFlow=async _0x10809c=>{const _0x5a903a={'NHnfo':_0x587f(0x25),'YzSyB':function(_0x2dcc8a,_0x34677f){return _0x2dcc8a(_0x34677f);}};if(_0x10809c[_0x587f(0x26)]){const _0x6070be=await _0x10809c[_0x587f(0x26)]();if(!_0x6070be){console[_0x587f(0x7)](_0x5a903a['NHnfo']);_0x10809c['onRejection']&&_0x10809c[_0x587f(0x18)]('Pre-check\x20failed');return;}}return _0x5a903a[_0x587f(0x27)](executeOnairosFlow,_0x10809c);};function _0xa0b9(){const _0x40560f=['✅\x20Onairos\x20flow\x20completed\x20successfully','Onairos\x20flow\x20was\x20rejected','📱\x20Onairos\x20modal\x20should\x20be\x20displayed','ACiEs','🚀\x20Starting\x20Onairos\x20flow\x20programmatically...','../components/UniversalOnboarding','BwkfG','log','BJqrp','cmguN','JxFuK','hslnB','voCrq','QGFxn','pVcyb','sgpyq','SYIsw','nCawV','close','onResolved','HulGt','ErByr','NuEwJ','error','onRejection','gZUBx','QddZz','aslpM','createElement','User\x20closed\x20the\x20modal','AppName','requestData','preferredPlatform','debug','testMode','TNyOa','wdViw','❌\x20Pre-check\x20failed,\x20not\x20starting\x20Onairos\x20flow','preCheck','YzSyB'];_0xa0b9=function(){return _0x40560f;};return _0xa0b9();}
|
|
@@ -1,211 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* 🔄 Retry Helper Utility
|
|
3
|
-
*
|
|
4
|
-
* Provides robust retry logic with exponential backoff for network operations.
|
|
5
|
-
* Used throughout the Onairos SDK for handling transient failures gracefully.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Default retry options for the Onairos SDK
|
|
10
|
-
*/
|
|
11
|
-
export const DEFAULT_RETRY_OPTIONS = {
|
|
12
|
-
maxRetries: 3,
|
|
13
|
-
baseDelay: 1000,
|
|
14
|
-
maxDelay: 5000,
|
|
15
|
-
exponentialBackoff: true,
|
|
16
|
-
enableLogging: false,
|
|
17
|
-
shouldRetry: (error, attempt) => {
|
|
18
|
-
// Don't retry client errors (4xx) except for 408 (timeout) and 429 (rate limit)
|
|
19
|
-
if (error.status >= 400 && error.status < 500 && error.status !== 408 && error.status !== 429) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Retry network errors, timeouts, and server errors (5xx)
|
|
24
|
-
if (error.name === 'AbortError' || error.message.includes('Network request failed') || error.message.includes('fetch') || error.message.includes('ENOTFOUND') || error.message.includes('timeout') || error.status >= 500) {
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Retry JSON parse errors (likely server issues)
|
|
29
|
-
if (error.message.includes('JSON Parse error') || error.message.includes('Unexpected character')) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Execute a function with retry logic and exponential backoff
|
|
38
|
-
* @param fn Function to execute (should return a Promise)
|
|
39
|
-
* @param options Retry configuration options
|
|
40
|
-
* @returns Promise with retry result
|
|
41
|
-
*/
|
|
42
|
-
export async function withRetry(fn, options = {}) {
|
|
43
|
-
const config = {
|
|
44
|
-
...DEFAULT_RETRY_OPTIONS,
|
|
45
|
-
...options
|
|
46
|
-
};
|
|
47
|
-
const startTime = Date.now();
|
|
48
|
-
let lastError = null;
|
|
49
|
-
for (let attempt = 1; attempt <= config.maxRetries + 1; attempt++) {
|
|
50
|
-
try {
|
|
51
|
-
if (config.enableLogging && attempt > 1) {
|
|
52
|
-
console.log(`🔄 Retry attempt ${attempt}/${config.maxRetries + 1}`);
|
|
53
|
-
}
|
|
54
|
-
const result = await fn();
|
|
55
|
-
return {
|
|
56
|
-
success: true,
|
|
57
|
-
data: result,
|
|
58
|
-
attempts: attempt,
|
|
59
|
-
totalDuration: Date.now() - startTime
|
|
60
|
-
};
|
|
61
|
-
} catch (error) {
|
|
62
|
-
lastError = error;
|
|
63
|
-
|
|
64
|
-
// Check if we should retry this error
|
|
65
|
-
const shouldRetryError = config.shouldRetry ? config.shouldRetry(error, attempt) : true;
|
|
66
|
-
|
|
67
|
-
// If this is the last attempt or we shouldn't retry, throw the error
|
|
68
|
-
if (attempt > config.maxRetries || !shouldRetryError) {
|
|
69
|
-
if (config.enableLogging) {
|
|
70
|
-
console.error(`❌ All retry attempts exhausted or error not retryable: ${error.message}`);
|
|
71
|
-
}
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Calculate delay for next attempt
|
|
76
|
-
let delay = config.baseDelay;
|
|
77
|
-
if (config.exponentialBackoff) {
|
|
78
|
-
delay = Math.min(config.baseDelay * Math.pow(2, attempt - 1), config.maxDelay);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Add some jitter to prevent thundering herd
|
|
82
|
-
const jitter = Math.random() * 0.1 * delay;
|
|
83
|
-
delay = Math.floor(delay + jitter);
|
|
84
|
-
if (config.onRetry) {
|
|
85
|
-
config.onRetry(error, attempt, delay);
|
|
86
|
-
}
|
|
87
|
-
if (config.enableLogging) {
|
|
88
|
-
console.log(`⏳ Waiting ${delay}ms before retry (attempt ${attempt}/${config.maxRetries + 1})`);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Wait before next attempt
|
|
92
|
-
await new Promise(resolve => setTimeout(() => resolve(), delay));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
success: false,
|
|
97
|
-
error: lastError || new Error('Unknown error'),
|
|
98
|
-
attempts: config.maxRetries + 1,
|
|
99
|
-
totalDuration: Date.now() - startTime
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Retry configuration for API calls
|
|
105
|
-
*/
|
|
106
|
-
export const API_RETRY_OPTIONS = {
|
|
107
|
-
maxRetries: 3,
|
|
108
|
-
baseDelay: 1000,
|
|
109
|
-
maxDelay: 5000,
|
|
110
|
-
exponentialBackoff: true,
|
|
111
|
-
shouldRetry: (error, attempt) => {
|
|
112
|
-
// Enhanced retry logic for API calls
|
|
113
|
-
|
|
114
|
-
// Never retry authentication errors (401) or permission errors (403)
|
|
115
|
-
if (error.status === 401 || error.status === 403) {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Never retry bad request errors (400) or not found (404) unless it's a specific case
|
|
120
|
-
if (error.status === 400 || error.status === 404 && !error.message.includes('validation endpoint')) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// Retry rate limiting (429) with longer delays
|
|
125
|
-
if (error.status === 429) {
|
|
126
|
-
return attempt <= 2; // Limit retries for rate limiting
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Retry server errors (5xx)
|
|
130
|
-
if (error.status >= 500) {
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Retry timeout and network errors
|
|
135
|
-
if (error.name === 'AbortError' || error.message.includes('timeout') || error.message.includes('Network request failed') || error.message.includes('fetch') || error.message.includes('ENOTFOUND')) {
|
|
136
|
-
return true;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Retry JSON parse errors (server returning HTML instead of JSON)
|
|
140
|
-
if (error.message.includes('JSON Parse error') || error.message.includes('Unexpected character') || error.message.includes('HTML page instead of JSON')) {
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
return false;
|
|
144
|
-
},
|
|
145
|
-
onRetry: (error, attempt, delay) => {
|
|
146
|
-
console.warn(`⚠️ API call failed (attempt ${attempt}), retrying in ${delay}ms: ${error.message}`);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Specialized retry for network/connectivity issues
|
|
152
|
-
*/
|
|
153
|
-
export const NETWORK_RETRY_OPTIONS = {
|
|
154
|
-
maxRetries: 2,
|
|
155
|
-
baseDelay: 2000,
|
|
156
|
-
maxDelay: 8000,
|
|
157
|
-
exponentialBackoff: true,
|
|
158
|
-
shouldRetry: (error, attempt) => {
|
|
159
|
-
// Only retry actual network/connectivity issues
|
|
160
|
-
return error.message.includes('Network request failed') || error.message.includes('ENOTFOUND') || error.message.includes('DNS') || error.name === 'AbortError';
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Create a retry wrapper for fetch requests
|
|
166
|
-
* @param url Request URL
|
|
167
|
-
* @param options Fetch options
|
|
168
|
-
* @param retryOptions Retry configuration
|
|
169
|
-
* @returns Promise with fetch response
|
|
170
|
-
*/
|
|
171
|
-
export async function fetchWithRetry(url, options = {}, retryOptions = API_RETRY_OPTIONS) {
|
|
172
|
-
const result = await withRetry(() => fetch(url, options), retryOptions);
|
|
173
|
-
if (!result.success) {
|
|
174
|
-
throw result.error;
|
|
175
|
-
}
|
|
176
|
-
return result.data;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Health check function with retry for testing connectivity
|
|
181
|
-
* @param url URL to check
|
|
182
|
-
* @param timeout Timeout in milliseconds
|
|
183
|
-
* @returns Promise indicating if the service is reachable
|
|
184
|
-
*/
|
|
185
|
-
export async function healthCheck(url, timeout = 5000) {
|
|
186
|
-
const startTime = Date.now();
|
|
187
|
-
try {
|
|
188
|
-
const controller = new AbortController();
|
|
189
|
-
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
190
|
-
const response = await fetch(url, {
|
|
191
|
-
method: 'GET',
|
|
192
|
-
signal: controller.signal,
|
|
193
|
-
headers: {
|
|
194
|
-
'User-Agent': 'OnairosReactNative/HealthCheck'
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
clearTimeout(timeoutId);
|
|
198
|
-
return {
|
|
199
|
-
reachable: true,
|
|
200
|
-
status: response.status,
|
|
201
|
-
duration: Date.now() - startTime
|
|
202
|
-
};
|
|
203
|
-
} catch (error) {
|
|
204
|
-
return {
|
|
205
|
-
reachable: false,
|
|
206
|
-
error: error.message,
|
|
207
|
-
duration: Date.now() - startTime
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
//# sourceMappingURL=retryHelper.js.map
|
|
1
|
+
export const DEFAULT_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'enableLogging':![],'shouldRetry':(_0x58a73c,_0x352436)=>{const _0xe9fe03={'GeJBK':function(_0x51619c,_0x3d840f){return _0x51619c+_0x3d840f;},'SEElm':function(_0x5c3f39,_0x313491){return _0x5c3f39>=_0x313491;},'UnXSa':function(_0x513bc0,_0x1d0b5e){return _0x513bc0!==_0x1d0b5e;},'vfmQP':_0x4f8b(0x0),'cqNJG':'AbortError','aFDBi':'timeout','DEDsb':_0x4f8b(0x1),'tMMPW':function(_0x166947,_0x234d48){return _0x166947!==_0x234d48;},'NVVIB':'UvMqh','JrIvV':_0x4f8b(0x2)};if(_0xe9fe03[_0x4f8b(0x3)](_0x58a73c['status'],0x190)&&_0x58a73c['status']<0x1f4&&_0xe9fe03[_0x4f8b(0x4)](_0x58a73c[_0x4f8b(0x5)],0x198)&&_0xe9fe03[_0x4f8b(0x4)](_0x58a73c[_0x4f8b(0x5)],0x1ad))return _0xe9fe03[_0x4f8b(0x6)]!==_0xe9fe03[_0x4f8b(0x6)]?!![]:![];if(_0x58a73c[_0x4f8b(0x7)]===_0xe9fe03[_0x4f8b(0x8)]||_0x58a73c[_0x4f8b(0x9)][_0x4f8b(0xa)]('Network\x20request\x20failed')||_0x58a73c['message'][_0x4f8b(0xa)](_0x4f8b(0xb))||_0x58a73c[_0x4f8b(0x9)][_0x4f8b(0xa)](_0x4f8b(0xc))||_0x58a73c[_0x4f8b(0x9)]['includes'](_0xe9fe03[_0x4f8b(0xd)])||_0xe9fe03['SEElm'](_0x58a73c[_0x4f8b(0x5)],0x1f4))return!![];if(_0x58a73c[_0x4f8b(0x9)]['includes'](_0x4f8b(0xe))||_0x58a73c[_0x4f8b(0x9)]['includes'](_0xe9fe03[_0x4f8b(0xf)])){if(_0xe9fe03['tMMPW'](_0xe9fe03[_0x4f8b(0x10)],_0xe9fe03[_0x4f8b(0x11)]))return!![];else _0x35154c['log'](_0x4f8b(0x12)+_0x31707c+_0x4f8b(0x13)+_0x36fa2e+'/'+_0xe9fe03['GeJBK'](_0x10abf9[_0x4f8b(0x14)],0x1)+')');}return![];}};function _0x2179(){const _0x221611=['EQOwS','Unexpected\x20character','TvKXO','SEElm','UnXSa','status','vfmQP','name','cqNJG','message','includes','fetch','ENOTFOUND','aFDBi','JSON\x20Parse\x20error','DEDsb','NVVIB','JrIvV','⏳\x20Waiting\x20','ms\x20before\x20retry\x20(attempt\x20','maxRetries','aAKwx','now','qPVUd','enableLogging','log','🔄\x20Retry\x20attempt\x20','ywvgL','GzxHp','shouldRetry','vlGgt','❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20','exponentialBackoff','min','maxDelay','ayFub','feIKt','random','floor','onRetry','Klfzi','lMXFS','warn','⚠️\x20API\x20call\x20failed\x20(attempt\x20','ms:\x20','PksiM','Unknown\x20error','LaZCn','timeout','Network\x20request\x20failed','HTML\x20page\x20instead\x20of\x20JSON','pASNs','validation\x20endpoint','LZNgy','jqnsu','jcSTR','TcEqQ','LreEJ','RMadP','zBZvB','jsyOJ','JAoCB','),\x20retrying\x20in\x20','AbortError','iGzkl','DNS','UfgCN','BwEyf','success','error','data','abort','BkELl','signal','LJJXQ','jNHYa'];_0x2179=function(){return _0x221611;};return _0x2179();}export async function withRetry(_0x5dcd62,_0x1742d1={}){const _0x5a8b0d={'IkVho':function(_0x1e9bec,_0x2e5fea){return _0x1e9bec<=_0x2e5fea;},'qPVUd':function(_0x17cda2,_0x5d43a5){return _0x17cda2+_0x5d43a5;},'ywvgL':function(_0x409e14,_0x3deada){return _0x409e14+_0x3deada;},'GzxHp':function(_0xdf3ea2){return _0xdf3ea2();},'yHJQq':function(_0x2adf02,_0x13679c){return _0x2adf02-_0x13679c;},'vlGgt':function(_0x4099f1,_0x36279e){return _0x4099f1>_0x36279e;},'bdAFA':function(_0x1ad3e6,_0x50f725){return _0x1ad3e6*_0x50f725;},'cDGEo':function(_0x346010,_0x3ccf0f){return _0x346010-_0x3ccf0f;},'ayFub':function(_0x43afc4,_0x5082e1){return _0x43afc4*_0x5082e1;},'feIKt':function(_0x509e14,_0x2d43f2){return _0x509e14*_0x2d43f2;},'fLIKu':function(_0xb8d117,_0x4c94d2){return _0xb8d117+_0x4c94d2;},'lMXFS':'Klfzi','PksiM':_0x4f8b(0x15),'ozWIt':function(_0x35b593,_0x3d80fb){return _0x35b593+_0x3d80fb;}},_0x4f771e={...DEFAULT_RETRY_OPTIONS,..._0x1742d1},_0x40274f=Date[_0x4f8b(0x16)]();let _0x341bba=null;for(let _0x1200a6=0x1;_0x5a8b0d['IkVho'](_0x1200a6,_0x5a8b0d[_0x4f8b(0x17)](_0x4f771e[_0x4f8b(0x14)],0x1));_0x1200a6++){try{_0x4f771e[_0x4f8b(0x18)]&&_0x1200a6>0x1&&console[_0x4f8b(0x19)](_0x4f8b(0x1a)+_0x1200a6+'/'+_0x5a8b0d[_0x4f8b(0x1b)](_0x4f771e[_0x4f8b(0x14)],0x1));const _0x44459a=await _0x5a8b0d[_0x4f8b(0x1c)](_0x5dcd62);return{'success':!![],'data':_0x44459a,'attempts':_0x1200a6,'totalDuration':_0x5a8b0d['yHJQq'](Date[_0x4f8b(0x16)](),_0x40274f)};}catch(_0x21dd96){_0x341bba=_0x21dd96;const _0xc5e200=_0x4f771e[_0x4f8b(0x1d)]?_0x4f771e[_0x4f8b(0x1d)](_0x21dd96,_0x1200a6):!![];if(_0x5a8b0d[_0x4f8b(0x1e)](_0x1200a6,_0x4f771e[_0x4f8b(0x14)])||!_0xc5e200){_0x4f771e[_0x4f8b(0x18)]&&console['error'](_0x4f8b(0x1f)+_0x21dd96['message']);break;}let _0x2417e1=_0x4f771e['baseDelay'];_0x4f771e[_0x4f8b(0x20)]&&(_0x2417e1=Math[_0x4f8b(0x21)](_0x5a8b0d['bdAFA'](_0x4f771e['baseDelay'],Math['pow'](0x2,_0x5a8b0d['cDGEo'](_0x1200a6,0x1))),_0x4f771e[_0x4f8b(0x22)]));const _0x4db217=_0x5a8b0d[_0x4f8b(0x23)](_0x5a8b0d[_0x4f8b(0x24)](Math[_0x4f8b(0x25)](),0.1),_0x2417e1);_0x2417e1=Math[_0x4f8b(0x26)](_0x5a8b0d['fLIKu'](_0x2417e1,_0x4db217)),_0x4f771e[_0x4f8b(0x27)]&&(_0x4f8b(0x28)===_0x5a8b0d[_0x4f8b(0x29)]?_0x4f771e['onRetry'](_0x21dd96,_0x1200a6,_0x2417e1):_0x2546a0[_0x4f8b(0x2a)](_0x4f8b(0x2b)+_0x3d265b+'),\x20retrying\x20in\x20'+_0x2c5cba+_0x4f8b(0x2c)+_0x409223[_0x4f8b(0x9)])),_0x4f771e[_0x4f8b(0x18)]&&(_0x5a8b0d[_0x4f8b(0x2d)]!==_0x5a8b0d['PksiM']?_0x499734[_0x4f8b(0x27)](_0x901229,_0x486f29,_0x1bd1a4):console[_0x4f8b(0x19)](_0x4f8b(0x12)+_0x2417e1+'ms\x20before\x20retry\x20(attempt\x20'+_0x1200a6+'/'+_0x5a8b0d['ozWIt'](_0x4f771e[_0x4f8b(0x14)],0x1)+')')),await new Promise(_0x47916d=>setTimeout(()=>_0x47916d(),_0x2417e1));}}return{'success':![],'error':_0x341bba||new Error(_0x4f8b(0x2e)),'attempts':_0x4f771e[_0x4f8b(0x14)]+0x1,'totalDuration':_0x5a8b0d['cDGEo'](Date[_0x4f8b(0x16)](),_0x40274f)};}function _0x4f8b(_0x2179bb,_0x4f8b4f){_0x2179bb=_0x2179bb-0x0;const _0x6995d6=_0x2179();let _0x509bfd=_0x6995d6[_0x2179bb];return _0x509bfd;}export const API_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'shouldRetry':(_0x1c7b7d,_0x46bfea)=>{const _0x1b66d7={'jcSTR':function(_0x50d78a,_0xc3bea4){return _0x50d78a-_0xc3bea4;},'pASNs':function(_0x1f5555,_0x27300e){return _0x1f5555===_0x27300e;},'Myisw':function(_0x5df87e,_0x1017f1){return _0x5df87e===_0x1017f1;},'ciPWM':function(_0x238018,_0x179320){return _0x238018===_0x179320;},'jqnsu':function(_0x4b62e4,_0x30a6ac){return _0x4b62e4<=_0x30a6ac;},'hljea':function(_0x16a910,_0x4149a8){return _0x16a910>=_0x4149a8;},'RbDSf':_0x4f8b(0x2f),'TcEqQ':'AbortError','LreEJ':_0x4f8b(0x30),'RMadP':_0x4f8b(0x31),'zBZvB':'ENOTFOUND','jsyOJ':_0x4f8b(0xe),'xqGFW':'Unexpected\x20character','JAoCB':_0x4f8b(0x32)};if(_0x1b66d7[_0x4f8b(0x33)](_0x1c7b7d['status'],0x191)||_0x1b66d7['Myisw'](_0x1c7b7d['status'],0x193))return![];if(_0x1c7b7d[_0x4f8b(0x5)]===0x190||_0x1b66d7[_0x4f8b(0x33)](_0x1c7b7d[_0x4f8b(0x5)],0x194)&&!_0x1c7b7d[_0x4f8b(0x9)][_0x4f8b(0xa)](_0x4f8b(0x34)))return![];if(_0x1b66d7[_0x4f8b(0x33)](_0x1c7b7d[_0x4f8b(0x5)],0x1ad))return _0x1b66d7['ciPWM'](_0x4f8b(0x35),_0x4f8b(0x35))?_0x1b66d7[_0x4f8b(0x36)](_0x46bfea,0x2):!![];if(_0x1b66d7['hljea'](_0x1c7b7d['status'],0x1f4))return _0x4f8b(0x2f)===_0x1b66d7['RbDSf']?!![]:{'reachable':![],'error':_0x56642f['message'],'duration':_0x1b66d7[_0x4f8b(0x37)](_0x3b54d1[_0x4f8b(0x16)](),_0x18f128)};if(_0x1b66d7[_0x4f8b(0x33)](_0x1c7b7d[_0x4f8b(0x7)],_0x1b66d7[_0x4f8b(0x38)])||_0x1c7b7d['message']['includes'](_0x1b66d7[_0x4f8b(0x39)])||_0x1c7b7d['message'][_0x4f8b(0xa)](_0x1b66d7[_0x4f8b(0x3a)])||_0x1c7b7d['message'][_0x4f8b(0xa)](_0x4f8b(0xb))||_0x1c7b7d[_0x4f8b(0x9)][_0x4f8b(0xa)](_0x1b66d7[_0x4f8b(0x3b)]))return!![];if(_0x1c7b7d[_0x4f8b(0x9)][_0x4f8b(0xa)](_0x1b66d7[_0x4f8b(0x3c)])||_0x1c7b7d['message'][_0x4f8b(0xa)](_0x1b66d7['xqGFW'])||_0x1c7b7d[_0x4f8b(0x9)][_0x4f8b(0xa)](_0x1b66d7[_0x4f8b(0x3d)]))return!![];return![];},'onRetry':(_0x19ba31,_0x402ccc,_0x50ea55)=>{console[_0x4f8b(0x2a)](_0x4f8b(0x2b)+_0x402ccc+_0x4f8b(0x3e)+_0x50ea55+_0x4f8b(0x2c)+_0x19ba31[_0x4f8b(0x9)]);}};export const NETWORK_RETRY_OPTIONS={'maxRetries':0x2,'baseDelay':0x7d0,'maxDelay':0x1f40,'exponentialBackoff':!![],'shouldRetry':(_0x4ab0a8,_0x12ffd9)=>{const _0x1dd7e2={'LyozV':_0x4f8b(0x31),'iGzkl':_0x4f8b(0xc),'UfgCN':function(_0x411d2c,_0x1cbbce){return _0x411d2c===_0x1cbbce;},'BwEyf':_0x4f8b(0x3f)};return _0x4ab0a8[_0x4f8b(0x9)][_0x4f8b(0xa)](_0x1dd7e2['LyozV'])||_0x4ab0a8[_0x4f8b(0x9)][_0x4f8b(0xa)](_0x1dd7e2[_0x4f8b(0x40)])||_0x4ab0a8[_0x4f8b(0x9)]['includes'](_0x4f8b(0x41))||_0x1dd7e2[_0x4f8b(0x42)](_0x4ab0a8[_0x4f8b(0x7)],_0x1dd7e2[_0x4f8b(0x43)]);}};export async function fetchWithRetry(_0x13e53e,_0x32ea78={},_0x2ff317=API_RETRY_OPTIONS){const _0x26b7c5=await withRetry(()=>fetch(_0x13e53e,_0x32ea78),_0x2ff317);if(!_0x26b7c5[_0x4f8b(0x44)])throw _0x26b7c5[_0x4f8b(0x45)];return _0x26b7c5[_0x4f8b(0x46)];}export async function healthCheck(_0x3ccb83,_0x280264=0x1388){const _0x58753d={'BkELl':function(_0x576d85,_0x2d145a,_0x5b1c06){return _0x576d85(_0x2d145a,_0x5b1c06);},'LJJXQ':'OnairosReactNative/HealthCheck','BqVsA':function(_0x43910d,_0x2094c4){return _0x43910d(_0x2094c4);},'jNHYa':function(_0x1c0530,_0x66690){return _0x1c0530-_0x66690;}},_0x4f8d4d=Date['now']();try{const _0x363a1e=new AbortController(),_0x4a7178=setTimeout(()=>_0x363a1e[_0x4f8b(0x47)](),_0x280264),_0x4d87b5=await _0x58753d[_0x4f8b(0x48)](fetch,_0x3ccb83,{'method':'GET','signal':_0x363a1e[_0x4f8b(0x49)],'headers':{'User-Agent':_0x58753d[_0x4f8b(0x4a)]}});return _0x58753d['BqVsA'](clearTimeout,_0x4a7178),{'reachable':!![],'status':_0x4d87b5[_0x4f8b(0x5)],'duration':_0x58753d[_0x4f8b(0x4b)](Date['now'](),_0x4f8d4d)};}catch(_0x12b66d){return{'reachable':![],'error':_0x12b66d[_0x4f8b(0x9)],'duration':_0x58753d[_0x4f8b(0x4b)](Date[_0x4f8b(0x16)](),_0x4f8d4d)};}}
|